buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public IStatus run(IProgressMonitor monitor) { IDiscoveryService discovery = JMDNSPlugin.getDefault().getDiscoveryService(); if (discovery == null) { try { IContainer discoveryContainer = new JMDNSDiscoveryContainer(InetAddress.getLocalHost()); discoveryContainer.connect(null, null); Properties prop...
public IStatus run(IProgressMonitor monitor) { IDiscoveryService discovery = JMDNSPlugin.getDefault().getDiscoveryService(); if (discovery == null) { try { IContainer discoveryContainer = new JMDNSDiscoveryContainer(InetAddress.getLocalHost()); discoveryContainer.connect(null, null); Properties prop...
public void actionPerformed(ActionEvent e) { if (e.getSource() == newIterator) { Node node = document; // whatToShow section int [] indices = whatToShow.getSelectedIndices(); int mask = 0x0; for (int i = 0; i < indices.length...
public void actionPerformed(ActionEvent e) { if (e.getSource() == newIterator) { Node node = document; // whatToShow section int [] indices = whatToShow.getSelectedIndices(); int mask = 0x0; for (int i = 0; i < indices.length...
public void actionPerformed(ActionEvent e) { if (e.getSource() == newIterator) { TreeNode treeNode = (TreeNode)jtree.getLastSelectedPathComponent(); if (treeNode == null) { messageText.append("Must select a tree component."); retu...
public void actionPerformed(ActionEvent e) { if (e.getSource() == newIterator) { TreeNode treeNode = (TreeNode)jtree.getLastSelectedPathComponent(); if (treeNode == null) { messageText.append("Must select a tree component."); retu...
private void sendElementEvent( String elementName, Vector attributes, XMLString elementValue) { if (elementValue == null || elementValue.equals("")) { if (attributes == null) { attributes = new Vector(); } attributes.add("xsi:nil");...
private void sendElementEvent( String elementName, Vector attributes, XMLString elementValue) { if (elementValue == null || elementValue.length == 0) { if (attributes == null) { attributes = new Vector(); } attributes.add("xsi:nil")...
protected IRequestTarget resolveSharedResource(final RequestCycle requestCycle, final RequestParameters requestParameters) { String resourceKey = requestParameters.getResourceKey(); return new SharedResourceRequestTarget(resourceKey); }
protected IRequestTarget resolveSharedResource(final RequestCycle requestCycle, final RequestParameters requestParameters) { String resourceKey = requestParameters.getResourceKey(); return new SharedResourceRequestTarget(resourceKey, requestParameters); }
public void widgetSelected (SelectionEvent event) { setUnselectedCloseVisible(); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); /* Create a group for the CTabFolder */ tabFolderGroup = new Group (exampleGroup, SWT.NONE); tabFolderGr...
public void widgetSelected (SelectionEvent event) { setUnselectedCloseVisible(); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); /* Create a group for the CTabFolder */ tabFolderGroup = new Group (exampleGroup, SWT.NONE); tabFolderGr...
protected void fireIterEvents() { if (isFirst()) { fireIterationStart(); first = false; } }
protected void fireIterEvents() { if (isFirst()) { fireIterationStart(); first = false; // TODO - should this use setFirst() ? } }
private static final String returnLocationWithContextPath(String location) { // WICKET-59 allow external URLs. if (location.startsWith("http://") || location.startsWith("https://")) { return location; } else { StringBuilder b = new StringBuilder(); String contextPath = Application.get().getAppli...
private static final String returnLocationWithContextPath(String location) { // WICKET-59 allow external URLs. if (location.startsWith("http://") || location.startsWith("https://")) { return location; } else { StringBuffer b = new StringBuffer(); String contextPath = Application.get().getApplica...
public IIDEntry getEntry(ID id); }
public IIDEntry store(ID id); }
private static final String[][] DEFAULT_ICONS = { { "org.apache.jmeter.control.gui.TestPlanGui", "org/apache/jmeter/images/beaker.gif" }, //$NON-NLS-1$ $NON-NLS-2$ { "org.apache.jmeter.timers.gui.AbstractTimerGui", "org/apache/jmeter/images/timer.gif" }, //$NON-NLS-1$ $NON-NLS-2$ ...
private static final String[][] DEFAULT_ICONS = { { "org.apache.jmeter.control.gui.TestPlanGui", "org/apache/jmeter/images/beaker.gif" }, //$NON-NLS-1$ $NON-NLS-2$ { "org.apache.jmeter.timers.gui.AbstractTimerGui", "org/apache/jmeter/images/timer.gif" }, //$NON-NLS-1$ $NON-NLS-2$ ...
protected void setupProxies() { // If it's been set directly (via ECF API) then this overrides platform settings if (proxy == null) { try { IProxyService proxyService = Activator.getDefault().getProxyService(); // Only do this if platform service exists if (proxyService != null) { // Setup via ...
protected void setupProxies() { // If it's been set directly (via ECF API) then this overrides platform settings if (proxy == null) { try { IProxyService proxyService = Activator.getDefault().getProxyService(); // Only do this if platform service exists if (proxyService != null && proxyService.isPro...
protected void setupProxies() { // If it's been set directly (via ECF API) then this overrides platform settings if (proxy == null) { try { IProxyService proxyService = Activator.getDefault().getProxyService(); // Only do this if platform service exists if (proxyService != null) { // Setup via ...
protected void setupProxies() { // If it's been set directly (via ECF API) then this overrides platform settings if (proxy == null) { try { IProxyService proxyService = Activator.getDefault().getProxyService(); // Only do this if platform service exists if (proxyService != null && proxyService.isPro...
protected void setUp() throws Exception { super.setUp(); // Find the configurer m_configurer = (Configurer)getServiceManager().lookup( Configurer.ROLE ); // Setup a context m_context = new DefaultTaskContext(); final File baseDir = new File( "." ).getAbsoluteFil...
protected void setUp() throws Exception { super.setUp(); // Find the configurer m_configurer = (Configurer)getServiceManager().lookup( Configurer.ROLE ); // Setup a context m_context = new DefaultTaskContext( null, getServiceManager(), getLogger() ); final File ...
public @interface M2tNoFunction { /* Copyright (c) 2008 Arno Haase. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: ...
public @interface M2tNoFunction { /* Copyright (c) 2008 Arno Haase. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: ...
package org.eclipse.xtend.middleend.plugins; /* Copyright (c) 2008 Arno Haase. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contr...
package org.eclipse.xtend.middleend.plugins; /* Copyright (c) 2008 Arno Haase. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contr...
protected String getVersionDateLabel() { if (m_Version != null) { return FLAG_VERSION + m_Version; } else if (m_Date != null) { return FLAG_VERSION_DATE + m_Date; } else { // Use getShortLabel() so labels longer then 30 char are truncated // an...
protected String getVersionDateLabel() { if (m_Version != null) { return FLAG_VERSION + m_Version; } else if (m_Date != null) { return FLAG_VERSION_DATE + m_Date; } else { // Use getShortLabel() so labels longer then 30 char are truncated // an...
package wicket.authorization.strategies.role.metadata; /* * $Id$ * $Revision$ * $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may ...
package wicket.authorization.strategies.role.metadata; /* * $Id$ * $Revision$ * $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may ...
protected void onEvent(AjaxRequestTarget target, MouseEvent event) { StringBuffer output = new StringBuffer(); output.append("Event type: on").append(eventType.name().toLowerCase()).append("\n"); output.append("Mouse button: ").append(event.getButton()).append("\n"); output.append("X position: ")...
protected void onEvent(final AjaxRequestTarget target, final MouseEvent event) { StringBuffer output = new StringBuffer(); output.append("Event type: on").append(eventType.name().toLowerCase()).append("\n"); output.append("Mouse button: ").append(event.getButton()).append("\n"); output.append("X ...
protected void onTimer(AjaxRequestTarget target) { target.addComponent(la); target.addComponent(ny); target.addComponent(moscow); target.addComponent(prague); target.addComponent(london); } }); } }
protected void onTimer(final AjaxRequestTarget target) { target.addComponent(la); target.addComponent(ny); target.addComponent(moscow); target.addComponent(prague); target.addComponent(london); } }); } }
public void onClick(AjaxRequestTarget target) { ModalWindow.close(target); } }; } }
public void onClick(final AjaxRequestTarget target) { ModalWindow.close(target); } }; } }
public ModalPanel1(MarkupContainer parent, String id) { super(parent, id); } }
public ModalPanel1(final MarkupContainer parent, final String id) { super(parent, id); } }
public AnotherPanel(MarkupContainer parent, String id) { super(parent, id); } }
public AnotherPanel(final MarkupContainer parent, final String id) { super(parent, id); } }
public BookmarkablePage(PageParameters pageParameters) { // get the message from the passed 'message' parameter or fall back to // the default // when no parameters were passed. String message; // note: the null check is here as a matter of defensive programming. // Actually, as this // constructor is ...
public BookmarkablePage(final PageParameters pageParameters) { // get the message from the passed 'message' parameter or fall back to // the default // when no parameters were passed. String message; // note: the null check is here as a matter of defensive programming. // Actually, as this // construct...
public ExplainPanel(MarkupContainer parent, String html, String code) { super(parent, "explainPanel"); new MultiLineLabel(this, "html", html); new MultiLineLabel(this, "code", code).setEscapeModelStrings(false); } }
public ExplainPanel(final MarkupContainer parent, final String html, final String code) { super(parent, "explainPanel"); new MultiLineLabel(this, "html", html); new MultiLineLabel(this, "code", code).setEscapeModelStrings(false); } }
public MyBorder(MarkupContainer parent, String id) { super(parent, id); } }
public MyBorder(final MarkupContainer parent, final String id) { super(parent, id); } }
public MyPanel(MarkupContainer parent, String id) { super(parent, id); new Label(this, "label", "yep, this is from a component proper"); new AnotherPanel(this, "otherPanel"); } }
public MyPanel(final MarkupContainer parent, final String id) { super(parent, id); new Label(this, "label", "yep, this is from a component proper"); new AnotherPanel(this, "otherPanel"); } }
public IResourceStream getMarkupResourceStream(final MarkupContainer container, Class< ? extends MarkupContainer> containerClass) { // load a template with a totally different name from this package using // this component's class loader final URL url = PageWithCustomLoading.class.getResource("CustomLoadedTe...
public IResourceStream getMarkupResourceStream(final MarkupContainer container, final Class< ? extends MarkupContainer> containerClass) { // load a template with a totally different name from this package using // this component's class loader final URL url = PageWithCustomLoading.class.getResource("CustomLo...
public ApplicationView(MarkupContainer parent, final String id, final Application application) { super(parent, id); // Basic attributes new Label(this, "name", application.getName()); new Label(this, "componentUseCheck", "" + application.getDebugSettings().getComponentUseCheck()); new Label(this, "comp...
public ApplicationView(final MarkupContainer parent, final String id, final Application application) { super(parent, id); // Basic attributes new Label(this, "name", application.getName()); new Label(this, "componentUseCheck", "" + application.getDebugSettings().getComponentUseCheck()); new Label(this,...
public InspectorBug(MarkupContainer parent, final String id, final WebPage page) { super(parent, id); PageParameters parameters = new PageParameters(); parameters.put("pageId", page.getId()); Link link = new BookmarkablePageLink(this, "link", InspectorPage.class, parameters); new Image(link, "bug"); } }
public InspectorBug(final MarkupContainer parent, final String id, final WebPage page) { super(parent, id); PageParameters parameters = new PageParameters(); parameters.put("pageId", page.getId()); Link link = new BookmarkablePageLink(this, "link", InspectorPage.class, parameters); new Image(link, "bug"); ...
protected Component newLabel(MarkupContainer parent, String id) { return new SmartLinkLabel(parent, id); } }; } }
protected Component newLabel(final MarkupContainer parent, final String id) { return new SmartLinkLabel(parent, id); } }; } }
protected void onSelectionChanged(Object newSelection) { int anz = Integer.parseInt((String)newSelection); Label info5 = (Label)ExamplePaging.this.get("info5"); List<ListObject> data5 = (List)ExamplePaging.this.get("rows5").getModelObject(); if (anz > 0) { data5.addAll(data.subList(0, a...
protected void onSelectionChanged(final Object newSelection) { int anz = Integer.parseInt((String)newSelection); Label info5 = (Label)ExamplePaging.this.get("info5"); List<ListObject> data5 = (List)ExamplePaging.this.get("rows5").getModelObject(); if (anz > 0) { data5.addAll(data.subLis...
public Page3(PageParameters parameters) { new Label(this, "id", parameters.getString("id")); } }
public Page3(final PageParameters parameters) { new Label(this, "id", parameters.getString("id")); } }
protected Object escapeColumnValue(Object value) { if (value != null) { String stringValue = StringUtils.trim(value.toString()); if (!StringUtils.containsNone(stringValue, new char[] { '\n', ',' })) { return "\"" + StringUtils.replace(stringValue, "\"", "\\\"") + "\""; } return stringValue; ...
protected Object escapeColumnValue(final Object value) { if (value != null) { String stringValue = StringUtils.trim(value.toString()); if (!StringUtils.containsNone(stringValue, new char[] { '\n', ',' })) { return "\"" + StringUtils.replace(stringValue, "\"", "\\\"") + "\""; } return stringVal...
protected Object escapeColumnValue(Object value) { if (value != null) { // quotes around fields are needed to avoid occasional "Sylk format // invalid" messages from excel return "\"" + StringUtils.replace(StringUtils.trim(value.toString()), "\"", "\"\"") + "\""; } return null; } }
protected Object escapeColumnValue(final Object value) { if (value != null) { // quotes around fields are needed to avoid occasional "Sylk format // invalid" messages from excel return "\"" + StringUtils.replace(StringUtils.trim(value.toString()), "\"", "\"\"") + "\""; } return null; } }
protected Object escapeColumnValue(Object value) { if (value != null) { return StringEscapeUtils.escapeXml(value.toString()); } return null; } }
protected Object escapeColumnValue(final Object value) { if (value != null) { return StringEscapeUtils.escapeXml(value.toString()); } return null; } }
public void setMessage(String message) { this.message = message; } }
public void setMessage(final String message) { this.message = message; } }
public Session newSession(Request request) { return new GuestBookSession(GuestBookApplication.this); } }; } }
public Session newSession(final Request request) { return new GuestBookSession(GuestBookApplication.this); } }; } }
public void setTitle(String title) { this.title = title; } }
public void setTitle(final String title) { this.title = title; } }
public Page1(PageParameters parameters) { } }
public Page1(final PageParameters parameters) { } }
public Page2(PageParameters parameters) { } }
public Page2(final PageParameters parameters) { } }
public Page3(PageParameters parameters) { new Label(this, "bookmarkparameter", parameters.getString("bookmarkparameter")); } }
public Page3(final PageParameters parameters) { new Label(this, "bookmarkparameter", parameters.getString("bookmarkparameter")); } }
public NavomaticBorder(MarkupContainer parent, final String id) { super(parent, id); new BoxBorder(this, "navigationBorder"); Border bodyBorder = new BoxBorder(this, "bodyBorder"); setBorderBodyContainer(bodyBorder); } }
public NavomaticBorder(final MarkupContainer parent, final String id) { super(parent, id); new BoxBorder(this, "navigationBorder"); Border bodyBorder = new BoxBorder(this, "bodyBorder"); setBorderBodyContainer(bodyBorder); } }
public Page1(PageParameters parameters) { new BookmarkablePageLink(this, "homeLink", Home.class); } }
public Page1(final PageParameters parameters) { new BookmarkablePageLink(this, "homeLink", Home.class); } }
public Page2QP(PageParameters parameters) { super(parameters); } }
public Page2QP(final PageParameters parameters) { super(parameters); } }
public Page3(PageParameters parameters) { new BookmarkablePageLink(this, "homeLink", Home.class); } }
public Page3(final PageParameters parameters) { new BookmarkablePageLink(this, "homeLink", Home.class); } }
public Page4(PageParameters parameters) { new BookmarkablePageLink(this, "homeLink", Home.class); } }
public Page4(final PageParameters parameters) { new BookmarkablePageLink(this, "homeLink", Home.class); } }
public void populateItem(Item cellItem, String componentId, IModel model) { new ActionPanel(cellItem, componentId, model); } }); columns.add(new PropertyColumn<String>(new Model<String>("ID"), "id")); columns.add(new PropertyColumn<String>(new Model<String>("First Name"), "firstName", "firstName"));...
public void populateItem(final Item cellItem, final String componentId, final IModel model) { new ActionPanel(cellItem, componentId, model); } }); columns.add(new PropertyColumn<String>(new Model<String>("ID"), "id")); columns.add(new PropertyColumn<String>(new Model<String>("First Name"), "firstNam...
public boolean signIn(String username, String password) { return ((SignIn2Session)getSession()).authenticate(username, password); } }; } }
public boolean signIn(final String username, final String password) { return ((SignIn2Session)getSession()).authenticate(username, password); } }; } }
public void setLinkClickCount(int linkClickCount) { this.linkClickCount = linkClickCount; } }
public void setLinkClickCount(final int linkClickCount) { this.linkClickCount = linkClickCount; } }
public void setSymbol(String symbol) { this.symbol = symbol; } } }
public void setSymbol(final String symbol) { this.symbol = symbol; } } }
protected WebRequest newWebRequest(HttpServletRequest servletRequest) { return new UploadWebRequest(servletRequest); } }
protected WebRequest newWebRequest(final HttpServletRequest servletRequest) { return new UploadWebRequest(servletRequest); } }
public WizardPage(Class wizardClass) { if (wizardClass == null) { throw new IllegalArgumentException("argument wizardClass must be not null"); } try { Constructor ctor = wizardClass.getConstructor(new Class[] { MarkupContainer.class, String.class }); ctor.newInstance(new Object[] { this, "wizard" }...
public WizardPage(final Class wizardClass) { if (wizardClass == null) { throw new IllegalArgumentException("argument wizardClass must be not null"); } try { Constructor ctor = wizardClass.getConstructor(new Class[] { MarkupContainer.class, String.class }); ctor.newInstance(new Object[] { this, "wiz...
public void dispose() { if (handle == 0) return; if (data.device.isDisposed()) return; int brush = data.brush; if (brush != 0) OS.GCHandle_Free(brush); data.brush = 0; int pen = data.brush; if (pen != 0) OS.GCHandle_Free(pen); data.pen = 0; int clip = data.clip; if (clip != 0) OS.GCHandle_Free(clip); data.c...
public void dispose() { if (handle == 0) return; if (data.device.isDisposed()) return; int brush = data.brush; if (brush != 0) OS.GCHandle_Free(brush); data.brush = 0; int pen = data.pen; if (pen != 0) OS.GCHandle_Free(pen); data.pen = 0; int clip = data.clip; if (clip != 0) OS.GCHandle_Free(clip); data.cli...
private void validate(MyAjaxSelfUpdatingTimerBehavior timer, boolean inBodyOnLoad) { String document = tester.getServletResponse().getDocument(); String updateScript = timer.getUpdateScript(); String bodyOnLoadUpdateScript = "<body onload=\"" + Strings.replaceAll(updateScript, "\"", "\\\"")+ "\">"; if (inBo...
private void validate(MyAjaxSelfUpdatingTimerBehavior timer, boolean inBodyOnLoad) { String document = tester.getServletResponse().getDocument(); String updateScript = timer.getUpdateScript(); String bodyOnLoadUpdateScript = "Wicket.Event.add(window, \"load\", function() { " + updateScript + ";});"; if (inB...
public String toString() { return getStringValue(); }
public String toString() { return name + "=" + getStringValue(); }
public AjCompilerAdapter(Compiler compiler, boolean isBatchCompile, BcelWorld world, BcelWeaver weaver, EclipseFactory eFactory, IIntermediateResultsRequestor intRequestor, IProgressListener progressListener, IOutputClassFileNameProvider outputFileNameProvider, ...
public AjCompilerAdapter(Compiler compiler, boolean isBatchCompile, BcelWorld world, BcelWeaver weaver, EclipseFactory eFactory, IIntermediateResultsRequestor intRequestor, IProgressListener progressListener, IOutputClassFileNameProvider outputFileNameProvider, ...
public void testEncodeStringArray() { WebRequestCodingStrategy wrcs = new WebRequestCodingStrategy(); WicketTester app = new WicketTester(); app.startPage(MockPage.class); PageParameters params = new PageParameters(); params.add("a", "1"); params.add("a", "2"); BookmarkablePageRequestTarget requestTarge...
public void testEncodeStringArray() { WebRequestCodingStrategy wrcs = new WebRequestCodingStrategy(); WicketTester app = new WicketTester(); app.startPage(MockPage.class); PageParameters params = new PageParameters(); params.add("a", "1"); params.add("a", "2"); BookmarkablePageRequestTarget requestTarge...
public void testIndexedUrlMountedPageWithComponentThatUsesUrlForResourceListener() throws Exception { tester.getApplication().mount( new IndexedParamUrlCodingStrategy("/test", TestPageWithIFrame.class)); TestPageWithIFrame test = new TestPageWithIFrame(new PageParameters("0=foo,1=bar")); tester.startPage(t...
public void testIndexedUrlMountedPageWithComponentThatUsesUrlForResourceListener() throws Exception { tester.getApplication().mount( new IndexedParamUrlCodingStrategy("/test", TestPageWithIFrame.class)); TestPageWithIFrame test = new TestPageWithIFrame(new PageParameters("0=foo,1=bar")); tester.startPage(t...
public void setCr(AddAsisRemove attr) { log("DEPRECATED: The cr attribute has been deprecated,", Project.MSG_WARN); log("Please us the eol attribute instead", Project.MSG_WARN); String option = attr.getValue(); CrLf c = new CrLf(); if (option.equals("remove")) { ...
public void setCr(AddAsisRemove attr) { log("DEPRECATED: The cr attribute has been deprecated,", Project.MSG_WARN); log("Please use the eol attribute instead", Project.MSG_WARN); String option = attr.getValue(); CrLf c = new CrLf(); if (option.equals("remove")) {...
public void deselectAll () { checkWidget (); NSTableView widget = (NSTableView)view; ignoreSelect = true; widget.deselectAll(null); ignoreSelect = false; } void destroyItem (TableColumn column) { int index = 0; while (index < columnCount) { if (columns [index] == column) break; index++; } for (int i=0; i<...
public void deselectAll () { checkWidget (); NSTableView widget = (NSTableView)view; ignoreSelect = true; widget.deselectAll(null); ignoreSelect = false; } void destroyItem (TableColumn column) { int index = 0; while (index < columnCount) { if (columns [index] == column) break; index++; } for (int i=0; i<...
public void deselect (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); // ignoreSelect = true; // /* // * Bug in the Macintosh. When the DataBroswer selection flags includes // * both kDataBrowserNeverEmptySelectionSet an...
public void deselect (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); // ignoreSelect = true; // /* // * Bug in the Macintosh. When the DataBroswer selection flags includes // * both kDataBrowserNeverEmptySelectionSet an...
protected void removeRoomView(RoomWithAView roomView) { chatRooms.remove(roomView); }
protected void removeRoomView(RoomWithAView roomView) { chatRooms.remove(roomView.getID()); }
public void connect(ID aTargetID, IConnectContext connectContext) throws ContainerConnectException { if (getConfig() == null) { throw new ContainerConnectException(Messages.JSLPDiscoveryContainer_0); } targetID = (aTargetID == null) ? getConfig().getID() : aTargetID; fireContainerEvent(new ContainerConnecti...
public void connect(ID aTargetID, IConnectContext connectContext) throws ContainerConnectException { if (targetID != null || getConfig() == null) { throw new ContainerConnectException(Messages.JSLPDiscoveryContainer_0); } targetID = (aTargetID == null) ? getConfig().getID() : aTargetID; fireContainerEvent(n...
public final void handleSubmit() { // Construct a copy of the edited comment final Comment newComment = new Comment(comment); // Set date of comment to add newComment.setDate(new Date()); // Add the component we edited to the list of comments synchronized (commentListView.getModelLock()...
public final void handleValidSubmit() { // Construct a copy of the edited comment final Comment newComment = new Comment(comment); // Set date of comment to add newComment.setDate(new Date()); // Add the component we edited to the list of comments synchronized (commentListView.getModelL...
public final void handleSubmit() { // Construct a copy of the edited comment final Comment newComment = new Comment(comment); // Set date of comment to add newComment.setDate(new Date()); // Add the component we edited to the list of comments commentList.add(0, newComment); try { // G...
public final void handleValidSubmit() { // Construct a copy of the edited comment final Comment newComment = new Comment(comment); // Set date of comment to add newComment.setDate(new Date()); // Add the component we edited to the list of comments commentList.add(0, newComment); try { ...
public final void handleSubmit() { final RequestCycle cycle = getRequestCycle(); PageParameters parameters = new PageParameters(); parameters.put("id", new Long(book.getId())); cycle.setPage(getPageFactory().newPage(BookDetails.class, parameters)); ...
public final void handleValidSubmit() { final RequestCycle cycle = getRequestCycle(); PageParameters parameters = new PageParameters(); parameters.put("id", new Long(book.getId())); cycle.setPage(getPageFactory().newPage(BookDetails.class, parameters)); ...
public Object component(final Component component) { ((Form)component).setFormComponentValuesFromPersister(); return CONTINUE_TRAVERSAL; } }); }
public Object component(final Component component) { ((Form)component).loadPersistentFormComponentValues(); return CONTINUE_TRAVERSAL; } }); }
public void testSetCookieOnForm() throws IOException, ServletException { // initialize this.form.setFormComponentValuesFromPersister(); // validate FormComponent username = (FormComponent)panel.get("signInForm.username"); FormComponent password = (FormComponent)panel.get("signInForm...
public void testSetCookieOnForm() throws IOException, ServletException { // initialize this.form.loadPersistentFormComponentValues(); // validate FormComponent username = (FormComponent)panel.get("signInForm.username"); FormComponent password = (FormComponent)panel.get("signInForm.p...
public static HTTPSamplerBase newInstance(String alias) { if (alias.length() == 0) { alias = DEFAULT_CLASSNAME; } if (alias.equals(HTTP_SAMPLER_JAVA) || alias.equals(IMPL_JAVA)) { return new HTTPSamplerProxy(IMPL_JAVA); } if (alias.equals(HTTP_SAMPLER_...
public static HTTPSamplerBase newInstance(String alias) { if (alias.length() == 0) { alias = DEFAULT_CLASSNAME; } if (alias.equals(HTTP_SAMPLER_JAVA) || alias.equals(IMPL_JAVA)) { return new HTTPSamplerProxy(IMPL_JAVA); } if (alias.equals(HTTP_SAMPLER_...
public void connect(final ID targetID, final IConnectContext connectContext) throws ContainerConnectException { Assert.isNotNull(targetID); Assert.isNotNull(connectContext); if (containerID != null) { throw new ContainerConnectException("Container is already connected to " + containerID); //$NON-NLS-1$ } ...
public void connect(final ID targetID, final IConnectContext connectContext) throws ContainerConnectException { Assert.isNotNull(targetID); //Assert.isNotNull(connectContext); if (containerID != null) { throw new ContainerConnectException("Container is already connected to " + containerID); //$NON-NLS-1$ }...
private static Object unwrapCollection(MultiProperty prop,String type) { if(prop instanceof CollectionProperty) { Collection values = new LinkedList(); PropertyIterator iter = prop.iterator(); while(iter.hasNext()) { JMeterProperty propVal = iter.next(); try { values.add(Converter.con...
private static Object unwrapCollection(MultiProperty prop,String type) { if(prop instanceof CollectionProperty) { Collection values = new LinkedList(); PropertyIterator iter = prop.iterator(); while(iter.hasNext()) { JMeterProperty propVal = iter.next(); try { values.add(Converter.con...
public void layout (Control [] changed) { checkWidget (); if (changed == null) error (SWT.ERROR_INVALID_ARGUMENT); for (int i=0; i<changed.length; i++) { Control control = changed [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); bool...
public void layout (Control [] changed) { checkWidget (); if (changed == null) error (SWT.ERROR_INVALID_ARGUMENT); for (int i=0; i<changed.length; i++) { Control control = changed [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); bool...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget(); int width = 0, height = 0; if ((style & SWT.HORIZONTAL) != 0) { width += DEFAULT_WIDTH; height += 5; } else { width += 5; height += DEFAULT_HEIGHT; } if (wHint != SWT.DEFAULT) width = wHint; if (hHint != SWT.DEFAULT) height = ...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget(); int width = 0, height = 0; if ((style & SWT.HORIZONTAL) != 0) { width += DEFAULT_WIDTH; height += 5; } else { width += 5; height += DEFAULT_HEIGHT; } if (wHint != SWT.DEFAULT) width = wHint; if (hHint != SWT.DEFAULT) height = ...
public URL find(final String pathname) { for (final Iterator iterator = folders.iterator(); iterator.hasNext();) { final Folder folder = (Folder)iterator.next(); final File file = new File(folder, pathname); if (file.exists()) { try { return file.toURL(); } catch (MalformedURLExc...
public URL find(final String pathname) { for (final Iterator iterator = folders.iterator(); iterator.hasNext();) { final Folder folder = (Folder)iterator.next(); final File file = new File(folder, pathname); if (file.exists()) { try { return file.toURI().toURL(); } catch (Malform...
public void SFFTest1() throws Exception { StringFromFile sff1 = SFFParams("testfiles/SFFTest#.txt", "", "1", "3"); assertEquals("uno", sff1.execute()); assertEquals("dos", sff1.execute()); assertEquals("tres", sff1.execute()); assertEquals("cuatro", sff1.execute()); assertEquals("cinco", sff1.execute()); ...
public void SFFTest1() throws Exception { StringFromFile sff1 = SFFParams("testfiles/SFFTest#'.'txt", "", "1", "3"); assertEquals("uno", sff1.execute()); assertEquals("dos", sff1.execute()); assertEquals("tres", sff1.execute()); assertEquals("cuatro", sff1.execute()); assertEquals("cinco", sff1.execute());...
private String name; @ManyToMany @JoinTable(name="ENROLLMENTS", joinColumns=@JoinColumn(name="STUDENT"),
private String name; @ManyToMany @JoinTable(name="TENROLLMNTS", joinColumns=@JoinColumn(name="STUDENT"),
public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground, int flags) { checkLayout (); if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if (selectionForeground != null && selectionF...
public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground, int flags) { checkLayout (); if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if (selectionForeground != null && selectionF...
public void setRequestToComponent(final Component component) { final IPageMap pageMap = component.getPage().getPageMap(); final String pageMapName = pageMap.isDefault() ? "" : pageMap.getName(); if (component instanceof BookmarkablePageLink) { final Class<? extends Page> clazz = ((BookmarkablePageLink<?>)c...
public void setRequestToComponent(final Component component) { final IPageMap pageMap = component.getPage().getPageMap(); final String pageMapName = pageMap.isDefault() ? "" : pageMap.getName(); if (component instanceof BookmarkablePageLink) { final Class<? extends Page> clazz = ((BookmarkablePageLink<?>)c...
protected CharSequence encode(RequestCycle requestCycle, IListenerInterfaceRequestTarget requestTarget) { final RequestListenerInterface rli = requestTarget.getRequestListenerInterface(); // Start string buffer for url final AppendingStringBuffer url = new AppendingStringBuffer(64); url.append('?'); url....
protected CharSequence encode(RequestCycle requestCycle, IListenerInterfaceRequestTarget requestTarget) { final RequestListenerInterface rli = requestTarget.getRequestListenerInterface(); // Start string buffer for url final AppendingStringBuffer url = new AppendingStringBuffer(64); url.append('?'); url....
public void testPageSerialization() throws Exception { PageB b = new PageB("test"); PageA a = new PageA(b); b.setA(a); tester.setupRequestAndResponse(); Session.get(); a.getPageMap().put(a); a.getPageMap().put(b); PageA a2 = (PageA)a.getPageMap().get(a.getNumericId(), a.getCurrentVersionNumber());...
public void testPageSerialization() throws Exception { PageB b = new PageB("test"); PageA a = new PageA(b); b.setA(a); tester.setupRequestAndResponse(); Session.get(); a.getPageMap().put(a); a.getPageMap().put(b); PageA a2 = (PageA)a.getPageMap().get(a.getNumericId(), 0); Assert.assertEquals(a,...
protected final void onComponentTag(final ComponentTag tag) { // Default handling for tag super.onComponentTag(tag); // Set href to link to this link's linkClicked method CharSequence url = getURL(); // append any anchor url = appendAnchor(tag, url); // If we're disabled if (!isEnabled()) { di...
protected void onComponentTag(final ComponentTag tag) { // Default handling for tag super.onComponentTag(tag); // Set href to link to this link's linkClicked method CharSequence url = getURL(); // append any anchor url = appendAnchor(tag, url); // If we're disabled if (!isEnabled()) { disableL...
package org.apache.wicket.examples.authentication; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apac...
package org.apache.wicket.examples.authentication; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apac...
package org.apache.wicket.examples.authentication; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apac...
package org.apache.wicket.examples.authentication; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apac...
package org.apache.wicket.examples.authentication; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apac...
package org.apache.wicket.examples.authentication; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apac...
package org.apache.wicket.examples.authentication; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apac...
package org.apache.wicket.examples.authentication; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apac...
public boolean addResult(IResultList list) { users.clear(); users.add(list); treeViewer.setInput(users); pageBook.showPage(treeViewer.getControl()); treeViewer.expandToLevel(DEFAULT_EXPAND_LEVEL); helpMessageLabel.setText(""); return true; }
public boolean addResult(IResultList list) { users.clear(); users.add(list); treeViewer.setInput(users); pageBook.showPage(treeViewer.getControl()); treeViewer.expandToLevel(DEFAULT_EXPAND_LEVEL); helpMessageLabel.setText(""); //$NON-NLS-1$ return true; }
protected boolean buildAll( Module module, List errors, boolean rebuild, boolean assembleAll) { String[] buildList = getAntecedantModuleNames(module, rebuild); if ((null != buildList) && (0 < buildList.length)) { final Modules modules = module.getModules(); final Messager handler = this.handler; f...
protected boolean buildAll( Module module, List errors, boolean rebuild, boolean assembleAll) { String[] buildList = getAntecedantModuleNames(module, rebuild); if ((null != buildList) && (0 < buildList.length)) { final Modules modules = module.getModules(); final Messager handler = this.handler; f...
private boolean initClasspath() { // meaning testsrc directory, junit library, etc. File file = new File(moduleDir, ".classpath"); // XXXFileLiteral FileReader fin = null; try { fin = new FileReader(file); BufferedReader reader = new BufferedReader(fin); ...
private boolean initClasspath() { // meaning testsrc directory, junit library, etc. File file = new File(moduleDir, ".classpath"); // XXXFileLiteral FileReader fin = null; try { fin = new FileReader(file); BufferedReader reader = new BufferedReader(fin); ...
protected ISynchAsynchConnection getClientConnection(ID remoteSpace, Object data) throws ConnectionInstantiationException { return null; } }
protected ISynchAsynchConnection makeConnection(ID remoteSpace, Object data) throws ConnectionInstantiationException { return null; } }
protected void onBeforeRender() { super.onBeforeRender(); if (!getFlag(TYPE_RESOLVED)) { // Set the type, but only if it's not a String (see WICKET-606). // Otherwise, getConvertEmptyInputStringToNull() won't work. Class type = getModelType(getModel()); if (!String.class.equals(type)) { setTy...
protected void onBeforeRender() { super.onBeforeRender(); if (!getFlag(TYPE_RESOLVED) && getType() == null) { // Set the type, but only if it's not a String (see WICKET-606). // Otherwise, getConvertEmptyInputStringToNull() won't work. Class type = getModelType(getModel()); if (!String.class.equals(...
private void implementMungers() { World world = getIWorld(); for (Iterator iter = mungers.iterator(); iter.hasNext();) { ShadowMunger munger = (ShadowMunger) iter.next(); munger.implementOn(this); if (world.getModel() != null) { //System.err.println("munger: " + munger + " on " + this); AsmAdaptor...
private void implementMungers() { World world = getIWorld(); for (Iterator iter = mungers.iterator(); iter.hasNext();) { ShadowMunger munger = (ShadowMunger) iter.next(); munger.implementOn(this); if (world.getModel() != null) { //System.err.println("munger: " + munger + " on " + this); AsmAdaptor...
public void method (); }
public void interfaceMethod (); public interface Interface { public void interfaceMethod (); }
protected void addBookmarkablePageParameters(final Request request, final RequestParameters parameters) { final String requestString = request .getParameter(WebRequestCodingStrategy.BOOKMARKABLE_PAGE_PARAMETER_NAME); if (requestString != null) { final String[] components = Strings.split(requestString,...
protected void addBookmarkablePageParameters(final Request request, final RequestParameters parameters) { final String requestString = request .getParameter(WebRequestCodingStrategy.BOOKMARKABLE_PAGE_PARAMETER_NAME); if (requestString != null) { final String[] components = Strings.split(requestString,...
protected void onRenderHeadContribution(final Response response) { super.onRenderHeadContribution(response); if (this.attachedBodyOnLoadModifier == false) { this.attachedBodyOnLoadModifier = true; ((WebPage)getComponent().getPage()).getBodyContainer().addOnLoadModifier( getJsTimeoutCall(updateInterv...
protected void onRenderHeadContribution(final Response response) { super.onRenderHeadContribution(response); if (this.attachedBodyOnLoadModifier == false) { this.attachedBodyOnLoadModifier = true; ((WebPage)getComponent().getPage()).getBodyContainer().addOnLoadModifier( getJsTimeoutCall(updateInterv...
private void checkBodyOnLoad() { // Gracefully getAssociateMarkupStream. Throws no exception in case // markup is not found final MarkupStream associatedMarkupStream = container.getAssociatedMarkupStream(false); // No associated markup => no body tag if (associatedMarkupStream == null) { return; } ...
private void checkBodyOnLoad() { // Gracefully getAssociateMarkupStream. Throws no exception in case // markup is not found final MarkupStream associatedMarkupStream = container.getAssociatedMarkupStream(false); // No associated markup => no body tag if (associatedMarkupStream == null) { return; } ...
public void run() { throw new Error(""); } } class U { static void e(String event) { System.err.println(event); Tester.event(event); } static void ee(String event) { Tester.expectEvent(event); } } aspect A { static { U.ee("before handler"); U...
public void run() { throw new Error(""); } } class U { static void e(String event) { System.err.println(event); Tester.event(event); } static void ee(String event) { Tester.expectEvent(event); } } aspect A { static { U.ee("before handler"); /...
private void runRobot(String hostName, String password, String targetIMUser) throws ECFException, Exception, InterruptedException { // Create client and connect to host client = new XMPPChatClient(this); client.setupContainer(); client.setupPresence(); // Get ISharedObjectContainer adapter ISharedObjec...
private void runRobot(String hostName, String password, String targetIMUser) throws ECFException, Exception, InterruptedException { // Create client and connect to host client = new XMPPChatClient(this); client.setupContainer(); client.setupPresence(); // Get ISharedObjectContainer adapter ISharedObjec...
public Map getParameterMap() { HashMap map = new HashMap(parameters.size(),1); Iterator it = parameters.keySet().iterator(); while (it.hasNext()) { String param = (String)it.next(); map.put(param, getParameter(param)); } return Collections.unmodifiableMap(map); }
public Map getParameterMap() { Map map = new HashMap(parameters.size(),1); Iterator it = parameters.keySet().iterator(); while (it.hasNext()) { String param = (String)it.next(); map.put(param, getParameter(param)); } return Collections.unmodifiableMap(map); }
public final String encode(final RequestCycle requestCycle, final IRequestTarget requestTarget) { // first check whether the target was mounted IRequestTargetUrlCodingStrategy encoder = getMountEncoder(requestTarget); if (encoder != null) { final StringBuffer prefix = new StringBuffer(urlPrefix(requestCycl...
public final String encode(final RequestCycle requestCycle, final IRequestTarget requestTarget) { // first check whether the target was mounted IRequestTargetUrlCodingStrategy encoder = getMountEncoder(requestTarget); if (encoder != null) { final StringBuffer prefix = new StringBuffer(urlPrefix(requestCycl...
public String getText(Object element) { if (element instanceof IResult) { return ((IResult) element).getUser().getName(); } else if (element instanceof IResultList) { return ((IResultList) element).geResults().size() + Messages.UserSearchLabelProvider_ContactsFound; } return element.toString(); }
public String getText(Object element) { if (element instanceof IResult) { return ((IResult) element).getUser().getName(); } else if (element instanceof IResultList) { return ((IResultList) element).getResults().size() + Messages.UserSearchLabelProvider_ContactsFound; } return element.toString(); }