buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public AbstractMeldingPage() { new Label(this, "foo", "FooBar"); }
public AbstractMeldingPage() { add(new Label("foo", "FooBar")); }
public AbstractSecurePage() { new Label(this, "username", "Pietje Puk"); }
public AbstractSecurePage() { add(new Label("username", "Pietje Puk")); }
private void checkValueOf(String[] inputs, int expectedNumber, String expectedString) { List<String> list = new ArrayList<String>(); Object[] objects = new Object[inputs.length]; for (int i = 0; i < inputs.length; i++) { String input = inputs[i]; list.add(input); objects[i] = input; } checkStrin...
private void checkValueOf(String[] inputs, int expectedNumber, String expectedString) { List list = new ArrayList(); Object[] objects = new Object[inputs.length]; for (int i = 0; i < inputs.length; i++) { String input = inputs[i]; list.add(input); objects[i] = input; } checkStringList(expectedNu...
private void loadResourceMaps() throws BuildException { Locale locale = new Locale(bundleLanguage, bundleCountry, bundleVariant); String language = locale.getLanguage().length() > 0 ? "_" + locale.getLanguage() : ...
private void loadResourceMaps() throws BuildException { Locale locale = new Locale(bundleLanguage, bundleCountry, bundleVariant); String language = locale.getLanguage().length() > 0 ? "_" + locale.getLanguage() : ...
public HelloWorld() { new Label("message", "Hello World!"); }
public HelloWorld() { add(new Label("message", "Hello World!")); }
private void process(File baseDir, String xmlFile, File destDir, File stylesheet) throws BuildException { String fileExt=targetExtension; File outFile=null; File inFile=null; try { long styleSheetLastModified = stylesheet.lastModifie...
private void process(File baseDir, String xmlFile, File destDir, File stylesheet) throws BuildException { String fileExt=targetExtension; File outFile=null; File inFile=null; try { long styleSheetLastModified = stylesheet.lastModifie...
public PackageResourceReference(Application application, String name) { this(application, null, name); }
public PackageResourceReference(Application application, String name) { this(application, Application.class, name); }
public SignInPage(final PageParameters parameters) { add(new SignInPanel("signInPanel")); }
public SignInPage(final PageParameters parameters) { new SignInPanel(this,"signInPanel"); }
public Index() { // normal link instead of an autolink as it looks a bit weird to refer // to PageWithCustomLoading.html while the template has got a very // different name (CustomLoadedTemplate.html) add(new BookmarkablePageLink("customLoadingPageLink", PageWithCustomLoading.class)); }
public Index() { // normal link instead of an autolink as it looks a bit weird to refer // to PageWithCustomLoading.html while the template has got a very // different name (CustomLoadedTemplate.html) new BookmarkablePageLink(this, "customLoadingPageLink", PageWithCustomLoading.class); }
public HelloWorld() { add(new Label("message", "Hello World!")); }
public HelloWorld() { new Label(this, "message", "Hello World!"); }
List<IBreadCrumbParticipant> allBreadCrumbParticipants(); /* * $Id: org.eclipse.jdt.ui.prefs 5004 2006-03-17 20:47:08 -0800 (Fri, 17 Mar * 2006) eelco12 $ $Revision: 5004 $ $Date: 2006-03-17 20:47:08 -0800 (Fri, 17 * Mar 2006) $ * * ============================================================================== ...
List<IBreadCrumbParticipant> allBreadCrumbParticipants(); /* * $Id: org.eclipse.jdt.ui.prefs 5004 2006-03-17 20:47:08 -0800 (Fri, 17 Mar * 2006) eelco12 $ $Revision: 5004 $ $Date: 2006-03-17 20:47:08 -0800 (Fri, 17 * Mar 2006) $ * * ============================================================================== ...
Iterator<IWizardStep> stepIterator(); /* * $Id: org.eclipse.jdt.ui.prefs 5004 2006-03-17 20:47:08 -0800 (Fri, 17 Mar * 2006) eelco12 $ $Revision: 5004 $ $Date: 2006-03-17 20:47:08 -0800 (Fri, 17 * Mar 2006) $ * * ============================================================================== * Licensed under the...
Iterator<IWizardStep> stepIterator(); /* * $Id: org.eclipse.jdt.ui.prefs 5004 2006-03-17 20:47:08 -0800 (Fri, 17 Mar * 2006) eelco12 $ $Revision: 5004 $ $Date: 2006-03-17 20:47:08 -0800 (Fri, 17 * Mar 2006) $ * * ============================================================================== * Licensed under the...
package wicket.extensions.proxy.util; package wicket.proxy.util; /** * Tester object that is valid as long as equals/hashCode/toString have not been * called on it. * * @author Igor Vaynberg (ivaynberg) * */ public interface IObjectMethodTester { /** * @return true if object is valid, false otherwise */...
package wicket.extensions.proxy.util; package wicket.extensions.proxy.util; /** * Tester object that is valid as long as equals/hashCode/toString have not been * called on it. * * @author Igor Vaynberg (ivaynberg) * */ public interface IObjectMethodTester { /** * @return true if object is valid, false oth...
public Home() { add(new Applet("sprocket", new Model("foo"), SimpleApplet.class)); }
public Home() { new Applet(this,"sprocket", new Model("foo"), SimpleApplet.class); }
package wicket.markup.html.tree; package wicket.extensions.markup.html.tree; import javax.swing.tree.TreeNode; /** * Methods this interface are called when tree state is changing. * * @author Matej Knopp */ public interface ITreeStateListener { /** * Fired when all nodes are collapsed. */ void allNodesCol...
package wicket.markup.html.tree; package wicket.markup.html.tree; import javax.swing.tree.TreeNode; /** * Methods this interface are called when tree state is changing. * * @author Matej Knopp */ public interface ITreeStateListener { /** * Fired when all nodes are collapsed. */ void allNodesCollapsed(); ...
public AccessDeniedPortletPage() { add(new BookmarkablePageLink("homePageLink",getApplication().getHomePage())); }
public AccessDeniedPortletPage() { new BookmarkablePageLink(this,"homePageLink",getApplication().getHomePage()); }
public InternalErrorPortletPage() { add(new BookmarkablePageLink("homePageLink",getApplication().getHomePage())); }
public InternalErrorPortletPage() { new BookmarkablePageLink(this,"homePageLink",getApplication().getHomePage()); }
public PageExpiredPortletPage() { add(new BookmarkablePageLink("homePageLink",getApplication().getHomePage())); }
public PageExpiredPortletPage() { new BookmarkablePageLink(this,"homePageLink",getApplication().getHomePage()); }
List<IComponentResolver> getComponentResolvers(); package wicket.settings; import java.util.List; import wicket.markup.html.WebPage; import wicket.markup.resolver.AutoComponentResolver; import wicket.markup.resolver.IComponentResolver; /** * Interface for page related settings. * * @author Igor Vaynberg (ivaynb...
List<IComponentResolver> getComponentResolvers(); package wicket.settings; import java.util.List; import wicket.markup.html.WebPage; import wicket.markup.resolver.AutoComponentResolver; import wicket.markup.resolver.IComponentResolver; /** * Interface for page related settings. * * @author Igor Vaynberg (ivaynb...
public SimplePage_12() { add(new BookmarkablePageLink("link", SimplePage_3.class)); }
public SimplePage_12() { new BookmarkablePageLink(this, "link", SimplePage_3.class); }
public ConcretePage() { add(new MyPanel("panel")); }
public ConcretePage() { new MyPanel(this, "panel"); }
public ConcretePage2() { add(new MyPanel2("panel")); }
public ConcretePage2() { new MyPanel2(this, "panel"); }
public TestPage() { add(new TestExtendedPanel()); }
public TestPage() { new TestExtendedPanel(this); }
public AbstractMeldingPage() { add(new Label("foo", "FooBar")); }
public AbstractMeldingPage() { new Label(this, "foo", "FooBar"); }
public AbstractSecurePage() { add(new Label("username", "Pietje Puk")); }
public AbstractSecurePage() { new Label(this, "username", "Pietje Puk"); }
private void checkValueOf(String[] inputs, int expectedNumber, String expectedString) { List list = new ArrayList(); Object[] objects = new Object[inputs.length]; for (int i = 0; i < inputs.length; i++) { String input = inputs[i]; list.add(input); objects[i] = input; } checkStringList(expectedNu...
private void checkValueOf(String[] inputs, int expectedNumber, String expectedString) { List<String> list = new ArrayList<String>(); Object[] objects = new Object[inputs.length]; for (int i = 0; i < inputs.length; i++) { String input = inputs[i]; list.add(input); objects[i] = input; } checkStrin...
public Issues check(EObject rootObject) { String checkFile = path(rootObject) + ExtXptFacade.CHECK_EXT; List<EObject> all = new ArrayList<EObject>(); all.add(rootObject); EObject rootContainer = EcoreUtil.getRootContainer(rootObject); TreeIterator<EObject> iter = rootContainer.eAllContents(); while (iter.h...
public Issues check(EObject rootObject) { String checkFile = path(rootObject) + ExtXptFacade.CHECK_EXT; List<EObject> all = new ArrayList<EObject>(); all.add(rootObject); EObject rootContainer = EcoreUtil.getRootContainer(rootObject); TreeIterator<EObject> iter = rootContainer.eAllContents(); while (iter.h...
public final void setSrcAttribute(final ComponentTag tag) { // If locale has changed from the initial locale used to attach image // resource, then we need to reload the resource in the new locale Locale l = component.getLocale(); String s = component.getStyle(); if (resourceKind == null && (!Objects.eq...
public final void setSrcAttribute(final ComponentTag tag) { // If locale has changed from the initial locale used to attach image // resource, then we need to reload the resource in the new locale Locale l = component.getLocale(); String s = component.getStyle(); if (resourceKind == null || (!Objects.eq...
public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection,typedListener); addListener (SWT.DefaultSelection,typedListener); } int /*long*/ callWindowP...
public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection,typedListener); addListener (SWT.DefaultSelection,typedListener); } int /*long*/ callWindowP...
private String getFilterPath(String filterName, InputStream is) throws ServletException { String prefix = servletMode ? "servlet" : "filter"; String mapping = prefix + "-mapping"; String name = prefix + "-name"; // Filter mappings look like this: // // <filter-mapping> <filter-name>WicketFilter</filt...
private String getFilterPath(String filterName, InputStream is) throws ServletException { String prefix = servletMode ? "servlet" : "filter"; String mapping = prefix + "-mapping"; String name = prefix + "-name"; // Filter mappings look like this: // // <filter-mapping> <filter-name>WicketFilter</filt...
public GC(Drawable drawable, int style) { if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); GCData data = new GCData (); data.style = checkStyle(style); int hDC = drawable.internal_new_GC(data); Device device = data.device; if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SW...
public GC(Drawable drawable, int style) { if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); GCData data = new GCData (); data.style = checkStyle(style); int hDC = drawable.internal_new_GC(data); Device device = data.device; if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SW...
public Page1() { super(); setPageTitle("Template example, page 1"); add(new Panel1("panel1")); }
public Page1() { super(); setPageTitle("Template example, page 1"); new Panel1(this, "panel1"); }
package wicket.markup.html.tree; /* * $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 obtain a copy of * the Lice...
package wicket.markup.html.tree; /* * $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 obtain a copy of * the Lice...
public void testPage() throws Exception { application.setHomePage(Page1.class); application.mount("/page2", new IndexedParamUrlCodingStrategy("/page2", Page2.class)); executeTest(Page1.class, "IndexedParamTest_ExpectedResult-1.html"); // Click the autolink application.setupRequestAndResponse(); WebReque...
public void testPage() throws Exception { application.setHomePage(Page1.class); application.mount(new IndexedParamUrlCodingStrategy("/page2", Page2.class)); executeTest(Page1.class, "IndexedParamTest_ExpectedResult-1.html"); // Click the autolink application.setupRequestAndResponse(); WebRequestCycle cy...
protected static String debugPrefix = "/debug/"; static { try { ON = Platform.inDebugMode(); isEclipse = true; pluginName = ClientPlugin.PLUGIN_ID; } catch (Exception e) { try { String val = System.getProperty(ClientPlugin.PLUGIN_ID...
protected static String debugPrefix = "/debug/"; static { try { ON = Platform.inDebugMode(); isEclipse = true; pluginName = ClientPlugin.PLUGIN_ID; } catch (Exception e) { try { String val = System.getProperty(ClientPlugin.PLUGIN_ID...
protected static String debugPrefix = "/debug/"; static { try { ON = Platform.inDebugMode(); String val = System.getProperty(ECFPlugin.PLUGIN_ID+".Trace"); if (val != null) { setTrace(true); isEclipse = false; // No ecli...
protected static String debugPrefix = "/debug/"; static { try { ON = Platform.inDebugMode(); String val = System.getProperty(ECFPlugin.PLUGIN_ID+".Trace"); if (val != null) { setTrace(true); isEclipse = false; // No ecli...
protected String getClassName(IType type, IMethod method) { try { String methodName = method.getElementName(); return getPackageName(type) + methodName.substring(0, 1).toUpperCase(Locale.getDefault()) + methodName.substring(1) + AnnotationUtils.accountForOverloadedMet...
protected String getClassName(IType type, IMethod method) { try { String methodName = method.getElementName(); return getPackageName(type) + methodName.substring(0, 1).toUpperCase() + methodName.substring(1) + AnnotationUtils.accountForOverloadedMethods(type, method);...
protected String getClassName(IType type, IMethod method) { try { String methodName = method.getElementName() + RESPONSE_SUFFIX; return getPackageName(type) + methodName.substring(0, 1).toUpperCase(Locale.getDefault()) + methodName.substring(1) + AnnotationUtils.accou...
protected String getClassName(IType type, IMethod method) { try { String methodName = method.getElementName() + RESPONSE_SUFFIX; return getPackageName(type) + methodName.substring(0, 1).toUpperCase() + methodName.substring(1) + AnnotationUtils.accountForOverloadedMeth...
public void setIncrement (int value) { checkWidget (); if (value < 1) return; int /*long*/ hHeap = OS.GetProcessHeap (); int count = (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETACCEL, 0, (UDACCEL)null); int /*long*/ udaccels = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, UDACCEL.sizeof * count); OS.SendMessage ...
public void setIncrement (int value) { checkWidget (); if (value < 1) return; int /*long*/ hHeap = OS.GetProcessHeap (); int count = (int)/*64*/OS.SendMessage (hwndUpDown, OS.UDM_GETACCEL, 0, (UDACCEL)null); int /*long*/ udaccels = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, UDACCEL.sizeof * count); OS.SendMessage ...
protected int Release() { /* Workaround for javac 1.1.8 bug */ return super.Release(); } int ResizeBorder(int prcBorder, int pUIWindow, int fFrameWindow) { return COM.E_NOTIMPL; } int ShowContextMenu(int dwID, int ppt, int pcmdtReserved, int pdispReserved) { Browser browser = (Browser)getParent().getParent(); Ev...
protected int Release() { /* Workaround for javac 1.1.8 bug */ return super.Release(); } int ResizeBorder(int prcBorder, int pUIWindow, int fFrameWindow) { return COM.E_NOTIMPL; } int ShowContextMenu(int dwID, int ppt, int pcmdtReserved, int pdispReserved) { Browser browser = (Browser)getParent().getParent(); Ev...
public WicketPortletSession getSession(final WicketPortletRequest request) { ISessionStore sessionStore = getSessionStore(); Session session = sessionStore.lookup(request); if (session == null) { // Create session using session factory session = getSessionFactory().newSession(request); // Set the c...
public WicketPortletSession getSession(final WicketPortletRequest request) { ISessionStore sessionStore = getSessionStore(); Session session = sessionStore.lookup(request); if (session == null) { // Create session using session factory session = getSessionFactory().newSession(); // Set the client L...
public String getDataEncodingWithDefault() { if (getDataEncodingNoDefault() == null && getContentType().startsWith("text/html")){ // $NON-NLS-1$ byte[] bytes=getResponseData(); // get the start of the file String prefix = new String(bytes,0,Math.min(bytes.length, 1000)).toLowerCase(); ...
public String getDataEncodingWithDefault() { if (getDataEncodingNoDefault() == null && getContentType().startsWith("text/html")){ // $NON-NLS-1$ byte[] bytes=getResponseData(); // get the start of the file String prefix = new String(bytes,0,Math.min(bytes.length, 1000)).toLowerCase(java...
public static String getEncodingFromContentType(String contentType){ String charSet = null; if (contentType != null) { int charSetStartPos = contentType.toLowerCase().indexOf(CHARSET_EQ); if (charSetStartPos >= 0) { charSet = contentType.substring(charSetStart...
public static String getEncodingFromContentType(String contentType){ String charSet = null; if (contentType != null) { int charSetStartPos = contentType.toLowerCase(java.util.Locale.ENGLISH).indexOf(CHARSET_EQ); if (charSetStartPos >= 0) { charSet = contentTyp...
public int numMessages(IMessage.Kind kind, boolean orGreater) { if (null != proxy) { return proxy.numMessages(kind, orGreater); } int result = 0; if (null == kind) { for (Enumeration enum = counters.elements(); enum.hasMoreElements();) { result...
public int numMessages(IMessage.Kind kind, boolean orGreater) { if (null != proxy) { return proxy.numMessages(kind, orGreater); } int result = 0; if (null == kind) { for (Enumeration enum = counters.elements(); enum.hasMoreElements();) { result...
private void addCommandsToList(final ListIterator listIterator) { //create the command to run Java, including user specified options getActualVMCommand().addCommandToList(listIterator); // properties are part of the vm options... sysProperties.addDefinitionsToList(listIterator); ...
private void addCommandsToList(final ListIterator listIterator) { //create the command to run Java, including user specified options getActualVMCommand().addCommandToList(listIterator); // properties are part of the vm options... sysProperties.addDefinitionsToList(listIterator); ...
public DOMBuilderImpl(SymbolTable symbolTable) { this( (XMLParserConfiguration) ObjectFactory.createObject( "org.apache.xerces.xni.parser.XMLParserConfiguration", "org.apache.xerces.parsers.IntegratedParserConfiguration")); fConfiguration.setProperty( Constants.XERCES_PROPERTY_PREFIX + Constants.SYMB...
public DOMBuilderImpl(SymbolTable symbolTable) { this( (XMLParserConfiguration) ObjectFactory.createObject( "org.apache.xerces.xni.parser.XMLParserConfiguration", "org.apache.xerces.parsers.XML11Configuration")); fConfiguration.setProperty( Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PR...
public DOMParser(SymbolTable symbolTable, XMLGrammarPool grammarPool) { super((XMLParserConfiguration)ObjectFactory.createObject( "org.apache.xerces.xni.parser.XMLParserConfiguration", "org.apache.xerces.parsers.IntegratedParserConfiguration" )); // set propertie...
public DOMParser(SymbolTable symbolTable, XMLGrammarPool grammarPool) { super((XMLParserConfiguration)ObjectFactory.createObject( "org.apache.xerces.xni.parser.XMLParserConfiguration", "org.apache.xerces.parsers.XML11Configuration" )); // set properties f...
private void processPSVIFacets(XSSimpleTypeDefinition type) { if (type == null) return; XSObjectList facets = type.getFacets(); XSObjectList multiValueFacets = type.getMultiValueFacets(); if ((facets == null || facets.getLength() == 0) && (multiValueFacets == ...
private void processPSVIFacets(XSSimpleTypeDefinition type) { if (type == null) return; XSObjectList facets = type.getFacets(); XSObjectList multiValueFacets = type.getMultiValueFacets(); if ((facets == null || facets.getLength() == 0) && (multiValueFacets == ...
public final void onSubmit() { final RequestCycle cycle = getRequestCycle(); PageParameters parameters = new PageParameters(); final Book book = (Book)getModelObject(); parameters.put("id", new Long(book.getId())); cycle.setResponsePage(getPageFactory().newPage(BookDetails.class, parameters)); cyc...
public final void onSubmit() { final RequestCycle cycle = getRequestCycle(); PageParameters parameters = new PageParameters(); final Book book = (Book)getModelObject(); parameters.put("id", book.getId()); cycle.setResponsePage(getPageFactory().newPage(BookDetails.class, parameters)); cycle.setRedi...
public int hashCode() { return new Long(id).hashCode(); }
public int hashCode() { return Long.valueOf(id).hashCode(); }
public void initializeDefaultPreferences() { IEclipsePreferences store = new DefaultScope().getNode(XQDTCorePlugin.PLUGIN_ID); store.put(IXQDTCorePreferences.LANGUAGE_LEVEL, IXQDTCorePreferences.LANGUAGE_NAME_XQUERY); }
public void initializeDefaultPreferences() { IEclipsePreferences store = new DefaultScope().getNode(XQDTCorePlugin.PLUGIN_ID); store.put(IXQDTCorePreferences.LANGUAGE_LEVEL, IXQDTCorePreferences.LANGUAGE_NAME_XQUERY_SCRIPTING); }
// public int compare (Object object1, Object object2) { // TableItem item1 = (TableItem) object1, item2 = (TableItem) object2; // if (sortDirection == SWT.UP || sortDirection == SWT.NONE) { // return item1.getText (index).compareTo (item2.getText (index)); // } else { // return item2.getText (index).compa...
// public int compare (Object object1, Object object2) { // TableItem item1 = (TableItem) object1, item2 = (TableItem) object2; // if (sortDirection == SWT.UP || sortDirection == SWT.NONE) { // return item1.getText (index).compareTo (item2.getText (index)); // } else { // return item2.getText (index).compa...
public DeepNodeListImpl(NodeImpl rootNode, String nsName, String tagName) { this(rootNode, tagName); this.nsName = (nsName != null && !nsName.equals("")) ? nsName : null; enableNS = true; }
public DeepNodeListImpl(NodeImpl rootNode, String nsName, String tagName) { this(rootNode, tagName); this.nsName = (nsName != null && nsName.length() != 0) ? nsName : null; enableNS = true; }
protected boolean fValidateAnnotations = false; // used to validate default/fixed attribute values ValidationState fValidationState = new ValidationState(); XSDAbstractTraverser (XSDHandler handler, XSAttributeChecker attrChecker) { fSchemaHandler = handler; ...
protected boolean fValidateAnnotations = false; // used to validate default/fixed attribute values ValidationState fValidationState = new ValidationState(); XSDAbstractTraverser (XSDHandler handler, XSAttributeChecker attrChecker) { fSchemaHandler = handler; ...
public int addAttribute(QName name, String type, String value) { int index; if (fLength < SIZE_LIMIT) { index = name.uri != null && !name.uri.equals("") ? getIndexFast(name.uri, name.localpart) : getIndexFast(name.rawname); if (index == -1) ...
public int addAttribute(QName name, String type, String value) { int index; if (fLength < SIZE_LIMIT) { index = name.uri != null && name.uri.length() != 0 ? getIndexFast(name.uri, name.localpart) : getIndexFast(name.rawname); if (index == -1)...
public void setFile(String filename) { this.file = file; }
public void setFile(String filename) { this.file = filename; }
public void setRedraw (boolean redraw) { checkWidget (); /* * Bug in Windows. For some reason, when WM_SETREDRAW * is used to turn redraw on for a tree and the tree * contains no items, the last item in the tree does * not redraw properly. If the tree has only one item, * that item is not drawn. If another wi...
public void setRedraw (boolean redraw) { checkWidget (); /* * Bug in Windows. For some reason, when WM_SETREDRAW * is used to turn redraw on for a tree and the tree * contains no items, the last item in the tree does * not redraw properly. If the tree has only one item, * that item is not drawn. If another wi...
public void testAddBinaryFile() { tester.startPage(MockFormFileUploadPage.class); MockFormFileUploadPage page = (MockFormFileUploadPage)tester.getLastRenderedPage(); MockDomainObjectFileUpload domainObject = page.getDomainObject(); tester.createRequestCycle(); assertNull(page.getFileUpload()); assertNot...
public void testAddBinaryFile() { tester.startPage(MockFormFileUploadPage.class); MockFormFileUploadPage page = (MockFormFileUploadPage)tester.getLastRenderedPage(); MockDomainObjectFileUpload domainObject = page.getDomainObject(); tester.createRequestCycle(); assertNull(page.getFileUpload()); assertNot...
public void run(IAction action) { if (!connected) { JoinGroupWizard wizard = new JoinGroupWizard(resource, PlatformUI .getWorkbench()); Shell shell = null; if (targetPart == null) { shell = window.getShell(); } else { shell = targetPart.getSite().getShell(); } // Create the wizard dial...
public void run(IAction action) { if (!connected) { JoinGroupWizard wizard = new JoinGroupWizard(resource, PlatformUI .getWorkbench()); Shell shell = null; if (targetPart == null) { shell = (window == null)?null:window.getShell(); } else { shell = targetPart.getSite().getShell(); } // ...
public final void touch(Page page) { // Touch the page in its pagemap. page.getPageMap().put(page.getPageMapEntry()); }
public final void touch(Page page) { // Touch the page in its pagemap. page.getPageMap().put(page); }
public void setEditor (Control editor) { if (editor == null) { // this is the case where the caller is setting the editor to be blank // set all the values accordingly this.editor = null; return; } this.editor = editor; _resize(); if (editor == null || editor.isDisposed()) return; editor.setVisible(tr...
public void setEditor (Control editor) { if (editor == null) { // this is the case where the caller is setting the editor to be blank // set all the values accordingly this.editor = null; return; } this.editor = editor; _resize(); if (this.editor == null || this.editor.isDisposed()) return; editor.set...
public void startNonGui(CLOption testFile, CLOption logFile){ System.setProperty("JMeter.NonGui", "true"); JMeterReport driver = new JMeterReport(); driver.parent = this; PluginManager.install(this, false); }
public void startNonGui(CLOption testFile, CLOption logFile){ System.setProperty(JMeter.JMETER_NON_GUI, "true"); JMeterReport driver = new JMeterReport(); driver.parent = this; PluginManager.install(this, false); }
/*protected*/ StreamPumper createInputPump(InputStream is, OutputStream os, boolean closeWhenExhausted) { StreamPumper pumper = new StreamPumper(is, os, closeWhenExhausted, true); pumper.setAutoflush(true); return...
/*protected*/ StreamPumper createInputPump(InputStream is, OutputStream os, boolean closeWhenExhausted) { StreamPumper pumper = new StreamPumper(is, os, closeWhenExhausted, false); pumper.setAutoflush(true); retur...
public int getStyle () { checkWidget (); return style; } int /*long*/ gtk_activate (int /*long*/ widget) { return 0; } int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { return 0; } int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ event) { return 0; } int /...
public int getStyle () { checkWidget (); return style; } int /*long*/ gtk_activate (int /*long*/ widget) { return 0; } int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { return 0; } int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ event) { return 0; } int /...
public Page1() { super(); setPageTitle("Template example, page 1"); new Panel1(this, "panel1"); }
public Page1() { super(); setPageTitle("Template example, page 1"); add(new Panel1("panel1")); }
public SimplePage_12() { new BookmarkablePageLink(this, "link", SimplePage_3.class); }
public SimplePage_12() { add(new BookmarkablePageLink("link", SimplePage_3.class)); }
public void testPage() throws Exception { application.setHomePage(Page1.class); application.mount(new IndexedParamUrlCodingStrategy("/page2", Page2.class)); executeTest(Page1.class, "IndexedParamTest_ExpectedResult-1.html"); // Click the autolink application.setupRequestAndResponse(); WebRequestCycle cy...
public void testPage() throws Exception { application.setHomePage(Page1.class); application.mount("/page2", new IndexedParamUrlCodingStrategy("/page2", Page2.class)); executeTest(Page1.class, "IndexedParamTest_ExpectedResult-1.html"); // Click the autolink application.setupRequestAndResponse(); WebReque...
public void appendTo(Select sel, ExpContext ctx, BinaryOpExpState bstate, SQLBuffer buf, boolean val1Null, boolean val2Null) { if (val1Null && val2Null) buf.appendValue(null).append(" IS ").appendValue(null); else if (val1Null || val2Null) { Val val = (val1Null) ? ge...
public void appendTo(Select sel, ExpContext ctx, BinaryOpExpState bstate, SQLBuffer buf, boolean val1Null, boolean val2Null) { if (val1Null && val2Null) buf.append("1 = 1"); else if (val1Null || val2Null) { Val val = (val1Null) ? getValue2() : getValue1(); ...
public void testToString() { assertNull(Strings.toString((Object)null)); assertEquals("", Strings.toString("")); assertEquals("<Null Throwable>", Strings.toString(null)); try { throw new IllegalArgumentException("Foo"); } catch (IllegalArgumentException e) { final String toString = Strings.toSt...
public void testToString() { assertNull(Strings.toString((Object)null)); assertEquals("", Strings.toString("")); assertEquals("<Null Throwable>", Strings.toString(null)); try { throw new IllegalArgumentException("Foo"); } catch (IllegalArgumentException e) { final String toString = Strings.toSt...
protected void setMappedBy(OpenJPAStateManager sm, FieldMapping mappedByFieldMapping, Object mappedByObject) { ClassMapping mapping = (ClassMapping) sm.getMetaData(); FieldMapping[] fms = mapping.getDeclaredFieldMappings(); for (int i = 0; i < fms.length; i++) { if (fms[i...
protected void setMappedBy(OpenJPAStateManager sm, FieldMapping mappedByFieldMapping, Object mappedByObject) { ClassMapping mapping = (ClassMapping) sm.getMetaData(); FieldMapping[] fms = mapping.getFieldMappings(); for (int i = 0; i < fms.length; i++) { if (fms[i] == map...
private void activateSelectorFor(IdentityConstraint ic) throws XNIException { Selector selector = ic.getSelector(); FieldActivator activator = this; if (selector == null) return; XPathMatcher matcher = selector.createMatcher(activator); fMatcherStack.addMatcher(ma...
private void activateSelectorFor(IdentityConstraint ic) throws XNIException { Selector selector = ic.getSelector(); FieldActivator activator = this; if (selector == null) return; XPathMatcher matcher = selector.createMatcher(activator); fMatcherStack.addMatcher(ma...
public boolean dragDetect (MouseEvent event) { checkWidget (); if (event == null) error (SWT.ERROR_NULL_ARGUMENT); return dragDetect (event.button, event.count, event.stateMask, event.x, event.y); } boolean dragDetect (int button, int count, int stateMask, int x, int y) { if (button != 1 || count != 1) return fals...
public boolean dragDetect (MouseEvent event) { checkWidget (); if (event == null) error (SWT.ERROR_NULL_ARGUMENT); return dragDetect (event.button, event.count, event.stateMask, event.x, event.y); } boolean dragDetect (int button, int count, int stateMask, int x, int y) { if (button != 1 || count != 1) return fals...
public Object nativeToJava(TransferData transferData) { if (!isSupportedType(transferData) || transferData.data == null) return null; if (transferData.data.length == 0) return null; int count = transferData.data.length; String[] fileNames = new String[count]; for (int i=0; i<count; i++) { byte[] data = transferD...
public Object nativeToJava(TransferData transferData) { if (!isSupportedType(transferData) || transferData.data == null) return null; if (transferData.data.length == 0) return null; int count = transferData.data.length; String[] fileNames = new String[count]; for (int i=0; i<count; i++) { byte[] data = transferD...
private void fillToAnalyseWithReverseReferencedResources() { Set<IXtendXpandResource> reverseReferences = new HashSet<IXtendXpandResource>(); for (final Object name : toAnalyze) { final IXtendXpandResource res = (IXtendXpandResource) name; final IResource resource = (IResource) res.getUnderlyingStorage(); ...
private void fillToAnalyseWithReverseReferencedResources() { Set<IXtendXpandResource> reverseReferences = new HashSet<IXtendXpandResource>(); for (final Object name : toAnalyze) { final IXtendXpandResource res = (IXtendXpandResource) name; final IResource resource = (IResource) res.getUnderlyingStorage(); ...
public Object getObject(final Component component) { return (pageLink.linksTo(getPage())) ? "selectedTab" : null; } })); } }
public Object getObject(final Component component) { return (pageLink.linksTo(findPage())) ? "selectedTab" : null; } })); } }
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public void setSelection (int value) { checkWidget (); /* * Feature in Vista. When the progress bar is not in * a normal state, PBM_SETPOS does not set the position. * This is undocumented. The fix is to temporarily * set the state to PBST_NORMAL, set the position, then * reset the state. */ int state = 0; ...
public void setSelection (int value) { checkWidget (); /* * Feature in Vista. When the progress bar is not in * a normal state, PBM_SETPOS does not set the position. * This is undocumented. The fix is to temporarily * set the state to PBST_NORMAL, set the position, then * reset the state. */ int /*long*/ sta...
public ScrollBar getVerticalBar () { checkWidget (); return verticalBar; } void releaseChildren (boolean destroy) { if (horizontalBar != null) { horizontalBar.release (false); horizontalBar = null; } if (verticalBar != null) { verticalBar.release (false); verticalBar = null; } super.releaseChildren (des...
public ScrollBar getVerticalBar () { checkWidget (); return verticalBar; } void releaseChildren (boolean destroy) { if (horizontalBar != null) { horizontalBar.release (false); horizontalBar = null; } if (verticalBar != null) { verticalBar.release (false); verticalBar = null; } super.releaseChildren (des...
public void doAction(ActionEvent e) { Copy.setCopiedNode( GuiPackage.getInstance().getTreeListener().getDraggedNode()); JMeterTreeListener treeListener = GuiPackage.getInstance().getTreeListener(); JMeterTreeNode currentNode = treeListener.getCurrentNode(); ...
public void doAction(ActionEvent e) { Copy.setCopiedNode( GuiPackage.getInstance().getTreeListener().getDraggedNode()); JMeterTreeListener treeListener = GuiPackage.getInstance().getTreeListener(); JMeterTreeNode currentNode = treeListener.getCurrentNode();//NOTUS...
public QueryDefinition selectDistinct(List<SelectItem> items) { return select(items, false); }
public QueryDefinition selectDistinct(List<SelectItem> items) { return select(items, true); }
public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener(listener); addListener (SWT.Selection,typedListener); addListener (SWT.DefaultSelection,typedListener); } protected void checkSubcl...
public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener(listener); addListener (SWT.Selection,typedListener); addListener (SWT.DefaultSelection,typedListener); } protected void checkSubcl...
public JSLPDiscoveryJob(final JSLPDiscoveryContainer container) { super(Messages.JSLPDiscoveryJob_TITLE); discoveryContainer = container; services = Collections.synchronizedMap(new HashMap()); }
public JSLPDiscoveryJob(final JSLPDiscoveryContainer container) { super("SLP Discovery"); //$NON-NLS-1$ discoveryContainer = container; services = Collections.synchronizedMap(new HashMap()); }
public void execute() throws BuildException { if (getHost() == null) { throw new BuildException("Host is required."); } if (getUserInfo().getName() == null) { throw new BuildException("Username is required."); } if (getUserInfo().getKeyfile() == null ...
public void execute() throws BuildException { if (getHost() == null) { throw new BuildException("Host is required."); } if (getUserInfo().getName() == null) { throw new BuildException("Username is required."); } if (getUserInfo().getKeyfile() == null ...
protected void fireParticipant(ID fromID, IPresence presence) { for (Iterator i = participantListeners.iterator(); i.hasNext();) { IChatRoomParticipantListener l = (IChatRoomParticipantListener) i .next(); l.handlePresence(fromID, presence); } }
protected void fireParticipant(ID fromID, IPresence presence) { for (Iterator i = participantListeners.iterator(); i.hasNext();) { IChatRoomParticipantListener l = (IChatRoomParticipantListener) i .next(); l.handlePresenceUpdated(fromID, presence); } }
private static SLPMessage handleMessage(final SLPMessage message) throws ServiceLocationException { if (message == null) { return null; } platform.logTraceMessage("RECEIVED (" + message.address + ":" + message.port + ") " + message); switch (message.funcID) { case SLPMessage.DAADVERT: // drop...
private static SLPMessage handleMessage(final SLPMessage message) throws ServiceLocationException { if (message == null) { return null; } platform.logTraceMessage("RECEIVED (" + message.address + ":" + message.port + ") " + message); switch (message.funcID) { case SLPMessage.DAADVERT: // drop...
public void run() { while (running) { try { Socket con = socket.accept(); DataInputStream in = new DataInputStream( new BufferedInputStream(con.getInputStream())); SLPMessage msg = SLPMessage.parse(con.getInetAddress(), con .getPort(), in, true); ReplyMessage reply = handleMe...
public void run() { while (running) { try { Socket con = socket.accept(); DataInputStream in = new DataInputStream( new BufferedInputStream(con.getInputStream())); SLPMessage msg = SLPMessage.parse(con.getInetAddress(), con .getPort(), in, true); ReplyMessage reply = handleMe...
private final List /* SerializedPageWithSession */cache; SerializedPageWithSession removePage(Page page) { if (size > 0) { synchronized (cache) { for (Iterator i = cache.iterator(); i.hasNext();) { SoftReference ref = (SoftReference) i.next(); SerializedPageWithSession entry = (Seri...
private final List /* SerializedPageWithSession */cache; SerializedPageWithSession removePage(Page page) { if (size > 0) { synchronized (cache) { for (Iterator i = cache.iterator(); i.hasNext();) { SoftReference ref = (SoftReference) i.next(); SerializedPageWithSession entry = (Seri...
public HTMLElement insertRow( int index ) { HTMLTableRowElementImpl newRow; newRow = new HTMLTableRowElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TR" ); newRow.insertCell( 0 ); insertRowX( index, newRow ); return newRow; }
public HTMLElement insertRow( int index ) { HTMLTableRowElementImpl newRow; newRow = new HTMLTableRowElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TR" ); //newRow.insertCell( 0 ); insertRowX( index, newRow ); return newRow; }
protected boolean isVotingCompleted() throws SharedObjectAddAbortException { // The test here is is we've received any indication of failed // participants in // the transaction. If so, we throw. if (failed.size() > getMinFailedToAbort()) { // Abort! trace("isVotingCompleted() aborting: failed > " +...
protected boolean isVotingCompleted() throws SharedObjectAddAbortException { // The test here is is we've received any indication of failed // participants in // the transaction. If so, we throw. if (failed.size() > getMinFailedToAbort()) { // Abort! trace("isVotingCompleted() aborting: failed > " +...
public RosterBuddy fillPresence(RosterBuddy obj, IPresence presence) { obj.setPresence(presence); obj.removeChildren(); obj.addChild(new RosterObject("XMPPID: " + obj.getID().getName())); obj .addChild(new RosterObject("Type: " + presence.getType().toString())); obj .addChild(new RosterObject("...
public RosterBuddy fillPresence(RosterBuddy obj, IPresence presence) { obj.setPresence(presence); obj.removeChildren(); obj.addChild(new RosterObject("ID: " + obj.getID().getName())); obj .addChild(new RosterObject("Type: " + presence.getType().toString())); obj .addChild(new RosterObject("Mode...
public void weaveTest(String name, String outName, ShadowMunger planner) throws IOException { List l = new ArrayList(1); l.add(planner); weaveTest(name, outName, l); } static String classDir = "../bcweaver/bin"; static String outDir = "out";
public void weaveTest(String name, String outName, ShadowMunger planner) throws IOException { List l = new ArrayList(1); l.add(planner); weaveTest(name, outName, l); } static String classDir = "../weaver/bin"; static String outDir = "out";
private IRequestHandler internalMap(Exception e) { final Application application = Application.get(); // check if we are processing an Ajax request and if we want to invoke the failure handler if (isProcessingAjaxRequest()) { switch (application.getExceptionSettings().getAjaxErrorHandlingStrategy()) { ...
private IRequestHandler internalMap(Exception e) { final Application application = Application.get(); // check if we are processing an Ajax request and if we want to invoke the failure handler if (isProcessingAjaxRequest()) { switch (application.getExceptionSettings().getAjaxErrorHandlingStrategy()) { ...
private static final long serialVersionUID = 1; static Logger log = LoggingManager.getLoggerForClass(); int[] timerCounter = new int[] {0}; Object sync = new Object();
private static final long serialVersionUID = 1; static Logger log = LoggingManager.getLoggerForClass(); int[] timerCounter = new int[] {0}; transient Object sync = new Object();
public String getStaticLabel() { return super.getStaticLabel() + " HTTPCLient"; }
public String getStaticLabel() { return super.getStaticLabel() + " HTTPCLient (ALPHA)"; }
public Object getReferencedObject(Project project) throws BuildException { if (refid == null) { throw new BuildException("No reference specified"); } Object o = project.getReferences().get(refid); if (o == null) { throw new BuildException("Reference "...
public Object getReferencedObject(Project project) throws BuildException { if (refid == null) { throw new BuildException("No reference specified"); } Object o = project.getReference(refid); if (o == null) { throw new BuildException("Reference "+refid+...
public File resolveConflict(final File file) { // Try to delete the file if (!Files.delete(file)) { throw new IllegalStateException("Unable to overwrite " + file.getAbsolutePath()); } return file; } };
public File resolveConflict(final File file) { // Try to delete the file if (!Files.remove(file)) { throw new IllegalStateException("Unable to overwrite " + file.getAbsolutePath()); } return file; } };
private static final List LOCALES = Arrays.asList(new Locale[] { Locale.US, new Locale("nl"), new Locale("de") });
private static final List LOCALES = Arrays.asList(new Locale[] { Locale.US, new Locale("nl_NL"), Locale.GERMANY });
SchemaGrammar grammar) { /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * ...
SchemaGrammar grammar) { /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * ...
protected void removeFiles(File d, String[] files, String[] dirs) { if (files.length > 0) { log("Deleting " + files.length + " files from " + d.getAbsolutePath()); for (int j=0; j<files.length; j++) { File f = new File(d, files[j]); log("Deleting " + f...
protected void removeFiles(File d, String[] files, String[] dirs) { if (files.length > 0) { log("Deleting " + files.length + " files from " + d.getAbsolutePath()); for (int j=0; j<files.length; j++) { File f = new File(d, files[j]); log("Deleting " + f...
private static String getChannelURI(URI serviceURI) { return URI.create(serviceURI.getScheme() + "://" + serviceURI.getHostName() + ":" + serviceURI.getPort()).toString(); }
private static String getChannelURI(URI serviceURI) { return URI.create(serviceURI.getScheme() + "://" + serviceURI.getHost() + ":" + serviceURI.getPort()).toString(); }