buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
static final boolean DEBUG = Device.DEBUG; /******************************************************************************* * Copyright (c) 2000, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1....
static final boolean DEBUG = Device.DEBUG; /******************************************************************************* * Copyright (c) 2000, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1....
public void widgetSelected(SelectionEvent e) { TableItem [] items = table.getItems(); for (int i = 0; i < EVENT_INFO.length; i++) { eventsFilter[i] = items[i].getChecked(); } for (int i = 0; i < customNames.length; i++) { eventsFilter[EVENT_INFO.length + i] = items[EVENT_INFO.length + i].ge...
public void widgetSelected(SelectionEvent e) { TableItem [] items = table.getItems(); for (int i = 0; i < EVENT_INFO.length; i++) { eventsFilter[i] = items[i].getChecked(); } for (int i = 0; i < customNames.length; i++) { eventsFilter[EVENT_INFO.length + i] = items[EVENT_INFO.length + i].ge...
public TextLayout (Device device) { super(device); wrapWidth = ascent = descent = -1; lineSpacing = 0; orientation = SWT.LEFT_TO_RIGHT; XFontStruct fontStruct = getFontHeigth(this.device.getSystemFont()); defaultAscent = fontStruct.ascent; defaultDescent = fontStruct.descent; styles = new StyleItem[2]; styles[...
public TextLayout (Device device) { super(device); wrapWidth = ascent = descent = -1; lineSpacing = 0; orientation = SWT.LEFT_TO_RIGHT; XFontStruct fontStruct = getFontHeigth(this.device.getSystemFont()); defaultAscent = fontStruct.ascent; defaultDescent = fontStruct.descent; styles = new StyleItem[2]; styles[...
public NewTemplateFileWizard() { super("NewTemplateFile.xpt", "xpt", "New Template File", "Creates a new xPand Template File", null); }
public NewTemplateFileWizard() { super("NewTemplateFile.xpt", "xpt", "New Template File", "Creates a new Xpand Template File", null); }
public NewXtendFileWizard() { super("NewXtendFile.ext", "ext", "New xTend File", "Creates a new xTend File", null); }
public NewXtendFileWizard() { super("NewXtendFile.ext", "ext", "New Xtend File", "Creates a new xTend File", null); }
public FinderQuery<ClassMapping,SelectExecutor,Result> get(ClassMapping mapping, FetchConfiguration fetch) { if (fetch.getReadLockLevel() != 0) return null; boolean ignore = isHinted(fetch, QueryHints.HINT_IGNORE_FINDER); boolean invalidate = isHinted(fetch, QueryHints.H...
public FinderQuery<ClassMapping,SelectExecutor,Result> get(ClassMapping mapping, FetchConfiguration fetch) { if (fetch.getReadLockLevel() != 0) return null; boolean ignore = isHinted(fetch, QueryHints.HINT_IGNORE_FINDER); boolean invalidate = isHinted(fetch, QueryHints.H...
public void showSelection () { checkWidget (); int hItem = 0; if ((style & SWT.SINGLE) != 0) { hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0); if (hItem == 0) return; int state = 0; if (OS.IsWinCE) { TVITEM tvItem = new TVITEM (); tvItem.hItem = hItem; tvItem.mask = OS.TVIF_S...
public void showSelection () { checkWidget (); int hItem = 0; if ((style & SWT.SINGLE) != 0) { hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0); if (hItem == 0) return; int state = 0; if (OS.IsWinCE) { TVITEM tvItem = new TVITEM (); tvItem.hItem = hItem; tvItem.mask = OS.TVIF_S...
public Rectangle getBounds (int index) { checkWidget(); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); RECT rect = getBounds (index, true, true, true); int width = rect.right - rect.left, height = rect.bottom - rect.top; return new Rectangle (rect.left, rect.top, width, height); } RECT get...
public Rectangle getBounds (int index) { checkWidget(); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); RECT rect = getBounds (index, true, true, true); int width = rect.right - rect.left, height = rect.bottom - rect.top; return new Rectangle (rect.left, rect.top, width, height); } RECT get...
public void setParameters(Collection parameters) throws InvalidVariableException { variables = parameters.toArray(); if (variables.length < 2) { throw new InvalidVariableException(); } }
public void setParameters(Collection parameters) throws InvalidVariableException { variables = parameters.toArray(); if (variables.length < 2) { throw new InvalidVariableException("Fewer than 2 parameters"); } }
public void a( ProceedingJoinPoint pjp, String p) throws Throwable { System.err.println("advice from ataj aspect"); pjp.proceed( new Object[] { pjp.getTarget(),"faked" } ); }
public void a( ProceedingJoinPoint pjp, String p) throws Throwable { System.err.println("advice from ataj aspect"); pjp.proceed( new Object[] { "faked" } ); }
public void a( ProceedingJoinPoint pjp, M t,String p, M t2) throws Throwable { System.err.println("advice from ataj aspect"); pjp.proceed(new Object[]{newM2,"faked",newM3}); }
public void a( ProceedingJoinPoint pjp, M t,String p, M t2) throws Throwable { System.err.println("advice from ataj aspect"); pjp.proceed(new Object[]{newM2,newM3,"faked"}); }
public HelloMozilla(final PageParameters parameters) { add(new XulLabel("hellomessage", this, "message")); add(new MessageForm("messageForm")); }
public HelloMozilla(final PageParameters parameters) { add(new XulDescription("hellomessage", this, "message")); add(new MessageForm("messageForm")); }
public enum GuiEditor { FileEditor {@Override PropertyEditor getInstance(PropertyDescriptor descriptor) { return new FileEditor(descriptor); }}, PasswordEditor {@Override PropertyEditor getInstance(PropertyDescriptor descriptor) { return new PasswordEditor(); }}, TableEditor {@Override PropertyEditor...
public enum TypeEditor { FileEditor {@Override PropertyEditor getInstance(PropertyDescriptor descriptor) { return new FileEditor(descriptor); }}, PasswordEditor {@Override PropertyEditor getInstance(PropertyDescriptor descriptor) { return new PasswordEditor(); }}, TableEditor {@Override PropertyEdito...
public Iterator iterator(final int first, final int count) { return list.listIterator(first); }
public Iterator iterator(final int first, final int count) { return list.subList(first, first + count).listIterator(); }
private boolean isReferenceField(FieldMapping fm, DBIdentifier refColName) { List cols = fm.getValueInfo().getColumns(); if (cols.size() == 0) { if (fm.getName().equals(refColName)) return true; } else { if (((Column)cols.get(0)).getIde...
private boolean isReferenceField(FieldMapping fm, DBIdentifier refColName) { List cols = fm.getValueInfo().getColumns(); if (cols.size() == 0) { if (fm.getName().equals(refColName.getName())) return true; } else { if (((Column)cols.get(...
import org.apache.wicket.PageParameters; /* * 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 Apache License...
import org.apache.wicket.PageParameters; /* * 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 Apache License...
public ReplicaSharedObjectDescription createDescriptionForContainer(ID containerID); }
public ReplicaSharedObjectDescription createDescriptionForContainer(ID containerID, ISharedObjectConfig config); }
public void doAction(ActionEvent e) { ActionRouter.getInstance().actionPerformed( new ActionEvent(e.getSource(), e.getID(), CheckDirty.CHECK_DIRTY)); GuiPackage guiPackage = GuiPackage.getInstance(); if (guiPackage.isDirty()) { if (JOptionPane ...
public void doAction(ActionEvent e) { ActionRouter.getInstance().actionPerformed( new ActionEvent(e.getSource(), e.getID(), CheckDirty.CHECK_DIRTY)); GuiPackage guiPackage = GuiPackage.getInstance(); if (guiPackage.isDirty()) { if (JOptionPane ...
public MarkupElement nextTag() throws ParseException { // Get the next tag. If null, no more tags are available final ComponentTag tag = (ComponentTag)getParent().nextTag(); if (tag == null) { return tag; } // A new handler is created for each markup file. Hence it is // sufficient to "create" the c...
public MarkupElement nextTag() throws ParseException { // Get the next tag. If null, no more tags are available final ComponentTag tag = (ComponentTag)getParent().nextTag(); if (tag == null || tag.getId() != null) { return tag; } // A new handler is created for each markup file. Hence it is // suff...
public void messageLogged( BuildEvent event ) { // Filter out messages based on priority if( event.getPriority() <= msgOutputLevel ) { StringBuffer message = new StringBuffer(); // Print out the name of the task if we're in one if( event.getTask() != ...
public void messageLogged( BuildEvent event ) { // Filter out messages based on priority if( event.getPriority() <= msgOutputLevel ) { StringBuffer message = new StringBuffer(); // Print out the name of the task if we're in one if( event.getTask() != ...
throws TaskException, IOException; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package org.apache.tools.ant.t...
throws TaskException, IOException; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package org.apache.tools.ant.t...
public void messageLogged( BuildEvent event ) { log( "--- MESSAGE LOGGED", Project.MSG_DEBUG ); StringBuffer buf = new StringBuffer(); if( event.getTask() != null ) { String name = "[" + event.getTask().getTaskName() + "]"; /** * @todo replac...
public void messageLogged( BuildEvent event ) { log( "--- MESSAGE LOGGED", Project.MSG_DEBUG ); StringBuffer buf = new StringBuffer(); if( event.getTask() != null ) { String name = "[" + event.getTask().getName() + "]"; /** * @todo replace 12...
public final CharSequence urlFor(final Component component, final IBehavior behaviour, final RequestListenerInterface listener) { int index = component.getBehaviors().indexOf(behaviour); if (index == -1) { throw new IllegalArgumentException("Behavior " + this + " was not registered with this component:...
public final CharSequence urlFor(final Component component, final IBehavior behaviour, final RequestListenerInterface listener) { int index = component.getBehaviorsRawList().indexOf(behaviour); if (index == -1) { throw new IllegalArgumentException("Behavior " + this + " was not registered with this com...
public void testReceiveFile() throws Exception { //addProxy("composent.com",3129); testReceive(HTTP_RETRIEVE); }
public void testReceiveFile() throws Exception { addProxy("composent.com",3129,"foo\\bar","password"); testReceive(HTTP_RETRIEVE); }
protected void storeField(OpenJPAStateManager sm, FieldMetaData fmd) { if (fmd.getManagement() != fmd.MANAGE_PERSISTENT) return; int index = fmd.getIndex(); // if the field is a collection and has "order by" set, don't cache // it if this store is coming from a create or...
protected void storeField(OpenJPAStateManager sm, FieldMetaData fmd) { if (fmd.getManagement() != fmd.MANAGE_PERSISTENT) return; int index = fmd.getIndex(); // if the field is a collection and has "order by" set, don't cache // it if this store is coming from a create or...
public void testUndefinedProp() throws Exception { final String undefinedProp = "undefinedProperty"; final String propRef = "${" + undefinedProp + "}"; doTestResolution( propRef, propRef, m_context ); }
public void testUndefinedProp() throws Exception { final String undefinedProp = "undefinedProperty"; final String propRef = "${" + undefinedProp + "}"; doTestResolution( propRef, propRef, m_store ); }
private int getAvailableRecursionDepth(FieldMetaData fm, Class type, boolean traverse) { // see if there's a previous limit int avail = Integer.MIN_VALUE; for (FetchConfigurationImpl f = this; f != null; f = f._parent) { if (ImplHelper.isAssignable(type, f._fromType)) { ...
private int getAvailableRecursionDepth(FieldMetaData fm, Class type, boolean traverse) { // see if there's a previous limit int avail = Integer.MIN_VALUE; for (FetchConfigurationImpl f = this; f != null; f = f._parent) { if (ImplHelper.isAssignable(f._fromType, type)) { ...
private URL scanNodes(Node node, URLCollection urls, URL baseUrl) throws HTMLParseException { if (node == null) { return baseUrl; } String name = node.getNodeName(); int type = node.getNodeType(); switch (type) { case Node.DOCUMENT_NODE: scanNodes(((Document) node).getDocumentElement(), urls, bas...
private URL scanNodes(Node node, URLCollection urls, URL baseUrl) throws HTMLParseException { if (node == null) { return baseUrl; } String name = node.getNodeName(); int type = node.getNodeType(); switch (type) { case Node.DOCUMENT_NODE: scanNodes(((Document) node).getDocumentElement(), urls, bas...
public Page getVersion(final int versionNumber) { // If we're still the original Page and that's what's desired if (versionManager == null) { if (versionNumber == 0 || versionNumber == LATEST_VERSION) { return this; } else { log.info("No version manager available to retrieve requested ver...
public Page getVersion(final int versionNumber) { // If we're still the original Page and that's what's desired if (versionManager == null) { if (versionNumber == 0 || versionNumber == LATEST_VERSION) { return this; } else { log.info("No version manager available to retrieve requested ver...
public Map getProperties() { return null; } }; ISharedFile sf = fsc.storeSharedFile(sfs); try { sf.start(); } catch (SharedFileStartException e) { e.printStackTrace(); } } */ // only add client if the connect was successful addClientForResource(newClientEntry, resource); }
public Map getProperties() { return null; } }; ISharedFile sf = fsc.store(sfs); try { sf.start(); } catch (SharedFileStartException e) { e.printStackTrace(); } } */ // only add client if the connect was successful addClientForResource(newClientEntry, resource); }
public DirectoryScanner getDirectoryScanner(Project p) { if (isReference()) { return getRef(p).getDirectoryScanner(p); } DirectoryScanner ds = null; synchronized (this) { if (directoryScanner != null && p == getProject()) { ds = directoryScanne...
public DirectoryScanner getDirectoryScanner(Project p) { if (isReference()) { return getRef(p).getDirectoryScanner(p); } DirectoryScanner ds = null; synchronized (this) { if (directoryScanner != null && p == getProject()) { ds = directoryScanne...
private static final long serialVersionUID = 3258135743263224377L; /** Cached node list length. */ int fLength = -1; /** Last requested node index. */ int fChildIndex = -1; /** Last requested node. */ ChildNode fChild; /** Owner of this cache */ ParentNode fOwner; /** Pointe...
private static final long serialVersionUID = -7927529254918631002L; /** Cached node list length. */ int fLength = -1; /** Last requested node index. */ int fChildIndex = -1; /** Last requested node. */ ChildNode fChild; /** Owner of this cache */ ParentNode fOwner; /** Point...
private ITagElement createFromTypeInfo(final TagIdentifier tagId, final TypeInfo typeInfo) { if (typeInfo instanceof ComponentTypeInfo) { return new ComponentTag(tagId.getUri(), tagId.getTagName(), (ComponentTypeInfo) typeInfo); } else ...
private ITagElement createFromTypeInfo(final TagIdentifier tagId, final TypeInfo typeInfo) { if (typeInfo instanceof ComponentTypeInfo) { return new ComponentTag(tagId.getUri(), tagId.getTagName(), (ComponentTypeInfo) typeInfo); } else ...
public Rectangle getTextBounds (int index) { checkWidget (); if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED); if (!(0 <= index && index < Math.max (1, parent.columnCount))) return new Rectangle (0, 0, 0, 0); NSTableView tableView = (NSTableView) parent.view; Image image = index == 0 ? this.image :...
public Rectangle getTextBounds (int index) { checkWidget (); if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED); if (!(0 <= index && index < Math.max (1, parent.columnCount))) return new Rectangle (0, 0, 0, 0); NSTableView tableView = (NSTableView) parent.view; Image image = index == 0 ? this.image :...
public int indexOf (ToolItem item) { checkWidget(); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT); for (int i=0; i<itemCount; i++) { if (items [i] == item) return i; } return -1; } int [] layoutHorizontal (int width, int height, boolean resize) { i...
public int indexOf (ToolItem item) { checkWidget(); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT); for (int i=0; i<itemCount; i++) { if (items [i] == item) return i; } return -1; } int [] layoutHorizontal (int width, int height, boolean resize) { i...
public int indexOf (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (item.parentItem != this) return -1; for (int i = 0; i < itemCount; i++) { if (item == items [i]) return i; } return -1; } void redraw (int col...
public int indexOf (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (item.parentItem != this) return -1; for (int i = 0; i < itemCount; i++) { if (item == items [i]) return i; } return -1; } void redraw (int col...
protected void closeConnection(Connection conn) { if (conn == null) return; try { if (type == TYPE_TRANSACTIONAL || type == TYPE_CONTIGUOUS) conn.commit(); } catch (SQLException se) { throw SQLExceptions.getStore(se); } finally { ...
protected void closeConnection(Connection conn) { if (conn == null) return; try { if (type != TYPE_TRANSACTIONAL && type != TYPE_CONTIGUOUS) conn.commit(); } catch (SQLException se) { throw SQLExceptions.getStore(se); } finally { ...
public static String resourceDescription, resource, basicSecurityProfile, document, selection, xpath, browse, keepRootElementPlain, bspCompliant, enterXPath, xpathNoElement, xpathMultipleElements, xpathAttribute, xpathPopup, encryptionType, encryptionEnveloping, encryptionDetache...
public static String resourceDescription, resource, basicSecurityProfile, document, selection, xpath, browse, keepRootElementPlain, bspCompliant, enterXPath, xpathNoElement, xpathMultipleElements, xpathAttribute, xpathPopup, encryptionType, encryptionEnveloping, encryptionDetache...
private void createPageContent(final Composite parent) { FormLayout layout = new FormLayout(); layout.marginTop = Globals.MARGIN / 2; layout.marginBottom = Globals.MARGIN / 2; layout.marginLeft = Globals.MARGIN / 2; layout.marginRight = Globals.MARGIN / 2; parent.setL...
private void createPageContent(final Composite parent) { FormLayout layout = new FormLayout(); layout.marginTop = Globals.MARGIN / 2; layout.marginBottom = Globals.MARGIN / 2; layout.marginLeft = Globals.MARGIN / 2; layout.marginRight = Globals.MARGIN / 2; parent.setL...
public Object evaluateScript(String execName) throws BuildException { checkLanguage(); ClassLoader origLoader = replaceContextLoader(); try { ReflectWrapper engine = createEngine(); if (engine == null) { throw new BuildException( "U...
public Object evaluateScript(String execName) throws BuildException { checkLanguage(); ClassLoader origLoader = replaceContextLoader(); try { ReflectWrapper engine = createEngine(); if (engine == null) { throw new BuildException( "U...
protected static boolean getBoolean(String name, boolean def) { String defaultValue = String.valueOf(def); String value = System.getProperty(name,defaultValue); return Boolean.valueOf(value).booleanValue(); } static { /* * Allow user to override default behaviour or specify their own factory */...
protected static boolean getBoolean(String name, boolean def) { String defaultValue = String.valueOf(def); String value = System.getProperty(name,defaultValue); return Boolean.valueOf(value).booleanValue(); } static { /* * Allow user to override default behaviour or specify their own factory */...
public IContainer createInstance(ContainerTypeDescription description, Object[] parameters) throws ContainerCreateException { try { RpcId ID = null; if (parameters != null && parameters[0] instanceof RpcId) ID = (RpcId) parameters[0]; else ID = (RpcId) IDFactory.getDefault().createID(RpcNamespace...
public IContainer createInstance(ContainerTypeDescription description, Object[] parameters) throws ContainerCreateException { try { RpcId ID = null; if (parameters != null && parameters[0] instanceof RpcId) ID = (RpcId) parameters[0]; else ID = (RpcId) IDFactory.getDefault().createID(RpcNamespace...
private IStatus createResultStatus(List<IStatus> statuses, String errorMessage) { List<IStatus> errorStatuses = new ArrayList<IStatus>(); for (IStatus status : statuses) if (!status.isOK()) errorStatuses.add(status); if (errorStatuses.size() > 0) return new MultiStatus(Activator.PLUGIN_ID, IStatus.E...
private IStatus createResultStatus(List<IStatus> statuses, String errorMessage) { List<IStatus> errorStatuses = new ArrayList<IStatus>(); for (IStatus status : statuses) if (!status.isOK()) errorStatuses.add(status); if (errorStatuses.size() > 0) return new MultiStatus(Activator.PLUGIN_ID, IStatus.E...
protected void removeUserFromTree(ID id) { if (id == null) return; TreeParent top = getPresenceRoot(); if (top != null) { for (Iterator e = top.children().iterator(); e.hasNext();) { TreeUser tn = (TreeUser) e.next(); User ud = (User) tn.getUser(); if (id.equals(ud.getUserID())) { top.remo...
protected void removeUserFromTree(ID id) { if (id == null) return; TreeParent top = getPresenceRoot(); if (top != null) { for (Iterator e = top.children().iterator(); e.hasNext();) { TreeUser tn = (TreeUser) e.next(); User ud = (User) tn.getUser(); if (id.equals(ud.getUserID())) { e.remove...
public void comment(XMLString text, Augmentations augs) throws XNIException { if (!fCanonical) { if (fSeenRootElement && fElementDepth == 0) { fOut.print('\n'); } fOut.print("<!--"); normalizeAndPrint(text); fOut.print("-->"); ...
public void comment(XMLString text, Augmentations augs) throws XNIException { if (!fCanonical) { if (fSeenRootElement && fElementDepth == 0) { fOut.print('\n'); } fOut.print("<!--"); fOut.print(text.toString()); fOut.print("-->"); ...
public boolean getDereferencedEmbedDependent() { return ((_flags |= FLAG_EMBED_DEREF) == 0 ? false : true); }
public boolean getDereferencedEmbedDependent() { return ((_flags & FLAG_EMBED_DEREF) == 0 ? false : true); }
public void wake () { synchronized (Device.class) { if (isDisposed ()) error (SWT.ERROR_DEVICE_DISPOSED); if (thread == Thread.currentThread ()) return; wakeThread (); } } void wakeThread () { NSObject object = new NSObject().alloc().init(); object.performSelectorOnMainThread(OS.sel_release, null, false); } ...
public void wake () { synchronized (Device.class) { if (isDisposed ()) error (SWT.ERROR_DEVICE_DISPOSED); if (thread == Thread.currentThread ()) return; wakeThread (); } } void wakeThread () { NSObject object = new NSObject().alloc().init(); object.performSelectorOnMainThread(OS.sel_release, null, false); } ...
public IRequestTarget decode(RequestParameters requestParameters) { final String parametersFragment = requestParameters.getPath().substring( getMountPath().length()); final PageParameters parameters = new PageParameters(decodeParameters(parametersFragment, requestParameters.getParameters())); String pag...
public IRequestTarget decode(RequestParameters requestParameters) { final String parametersFragment = requestParameters.getPath().substring( getMountPath().length()); final PageParameters parameters = new PageParameters(decodeParameters(parametersFragment, requestParameters.getParameters())); String pag...
public BookmarkableListenerInterfaceRequestTarget(String pageMapName, Class pageClass, PageParameters pageParameters, Component component, RequestListenerInterface listenerInterface) { this(pageMapName, pageClass, pageParameters, component.getPath(), listenerInterface .getName()); int version = compone...
public BookmarkableListenerInterfaceRequestTarget(String pageMapName, Class pageClass, PageParameters pageParameters, Component component, RequestListenerInterface listenerInterface) { this(pageMapName, pageClass, pageParameters, component.getPath(), listenerInterface .getName()); int version = compone...
public String getPluginId() { return configElement != null ? configElement.getNamespace() : pluginId; }
public String getPluginId() { return configElement != null ? configElement.getContributor().getName() : pluginId; }
public SchemaGrammar parseSchema(XMLInputSource is, XSDDescription desc, Hashtable locationPairs) { fLocationPairs = locationPairs; // first try to find it in the bucket/pool, return if one is found SchemaGrammar grammar = findGrammar(desc); if (grammar != null) ...
public SchemaGrammar parseSchema(XMLInputSource is, XSDDescription desc, Hashtable locationPairs) { fLocationPairs = locationPairs; // first try to find it in the bucket/pool, return if one is found SchemaGrammar grammar = findGrammar(desc); if (grammar != null) ...
public final String getJavascriptWidgetId() { return "YAHOO.org.apache.wicket." + getJavascriptId(); }
public final String getJavascriptWidgetId() { return "YAHOO.wicket." + getJavascriptId(); }
public int compare(Duration rhs) { BigInteger maxintAsBigInteger = BigInteger.valueOf((long) Integer.MAX_VALUE); BigInteger minintAsBigInteger = BigInteger.valueOf((long) Integer.MIN_VALUE); // check for fields that are too large in this Duration if (years != null && years.compareTo(maxin...
public int compare(Duration rhs) { BigInteger maxintAsBigInteger = BigInteger.valueOf((long) Integer.MAX_VALUE); BigInteger minintAsBigInteger = BigInteger.valueOf((long) Integer.MIN_VALUE); // check for fields that are too large in this Duration if (years != null && years.compareTo(maxin...
protected String renderId(JoinPoint jp) { String result = super.renderId(jp); return result + " - ok"; } } class Testing { static aspect Init { declare dominates : Init, Library1, AnotherAspect; before() : AnotherAspect.targetJoinPoints() { Main...
protected String renderId(JoinPoint jp) { String result = super.renderId(jp); return result + " - ok"; } } class Testing { static aspect Init { declare precedence : Init, Library1, AnotherAspect; before() : AnotherAspect.targetJoinPoints() { Mai...
public Shell [] getShells () { checkWidget(); int count = 0; Shell [] shells = display.getShells (); for (int i=0; i<shells.length; i++) { Control shell = shells [i]; do { shell = shell.getParent (); } while (shell != null && shell != this); if (shell == this) count++; } int index = 0; Shell [] result...
public Shell [] getShells () { checkWidget(); int count = 0; Shell [] shells = display.getShells (); for (int i=0; i<shells.length; i++) { Control shell = shells [i]; do { shell = shell.getParent (); } while (shell != null && shell != this); if (shell == this) count++; } int index = 0; Shell [] result...
public void controlResized(ControlEvent e) { setExampleWidgetSize (); } }); return tabFolderPage; } /** * Disposes the "Example" widgets. */ void disposeExampleWidgets () { /* store the state of the styledText if applicable */ if (styledText != null) { styleRanges = styledText.getStyleRa...
public void controlResized(ControlEvent e) { setExampleWidgetSize (); } }); return tabFolderPage; } /** * Disposes the "Example" widgets. */ void disposeExampleWidgets () { /* store the state of the styledText if applicable */ if (styledText != null) { styleRanges = styledText.getStyleRa...
public static final int VER_PLATFORM_WIN32_CE = 3; /* Get the Windows version and the flags */ static { /* * Try the UNICODE version of GetVersionEx first * and then the ANSI version. The UNICODE version * is present on all versions of Windows but is not * implemented on Win95/98/ME. * * NOTE: The ...
public static final int VER_PLATFORM_WIN32_CE = 3; /* Get the Windows version and the flags */ static { /* * Try the UNICODE version of GetVersionEx first * and then the ANSI version. The UNICODE version * is present on all versions of Windows but is not * implemented on Win95/98/ME. * * NOTE: The ...
public void processRequestCycle() throws ServletException { WebRequestCycle cycle = new WebRequestCycle(this, wicketSession, wicketRequest, wicketResponse); cycle.render(); lastRenderedPage = cycle.getPage(); }
public void processRequestCycle() throws ServletException { WebRequestCycle cycle = new WebRequestCycle(this, wicketSession, wicketRequest, wicketResponse); cycle.respond(); lastRenderedPage = cycle.getPage(); }
private int run( String[] command ) throws TaskException { Execute exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, Project.MSG_WARN ), null ); if( workingdir != null ) { exe.setWorkingDirectory(...
private int run( String[] command ) throws TaskException { Execute exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, Project.MSG_WARN ) ); if( workingdir != null ) { exe.setWorkingDirectory( worki...
public void execute() throws TaskException { Commandline toExecute = new Commandline(); toExecute.setExecutable( "rpm" ); if( topDir != null ) { toExecute.createArgument().setValue( "--define" ); toExecute.createArgument().setValue( "_topdir" + t...
public void execute() throws TaskException { Commandline toExecute = new Commandline(); toExecute.setExecutable( "rpm" ); if( topDir != null ) { toExecute.createArgument().setValue( "--define" ); toExecute.createArgument().setValue( "_topdir" + t...
protected void prepareExecutor() throws TaskException { // default directory to the project's base directory File dir = _owner.getBaseDirectory(); ExecuteStreamHandler handler = new LogStreamHandler( _owner, Project.MSG...
protected void prepareExecutor() throws TaskException { // default directory to the project's base directory File dir = _owner.getBaseDirectory(); ExecuteStreamHandler handler = new LogStreamHandler( _owner, Project.MSG...
public void populateCell(final Cell cell) { final Book book = (Book)cell.getModel(); cell.add(BookDetails.link("details", book, getLocalizedString("noBookTitle"))); cell.add(new Label("author", book)); cell.add(cell.moveUpLink("move...
public void populateCell(final Cell cell) { final Book book = (Book)cell.getModelObject(); cell.add(BookDetails.link("details", book, getLocalizedString("noBookTitle"))); cell.add(new Label("author", book)); cell.add(cell.moveUpLink...
public void setWidth (int width) { checkLayout (); if (width < -1 || width == 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if (width == getWidth()) return; freeRuns(); setLayoutControl(OS.kATSULineWidthTag, OS.Long2Fix(width), 4); }
public void setWidth (int width) { checkLayout (); if (width < -1 || width == 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if (width == getWidth()) return; freeRuns(); setLayoutControl(OS.kATSULineWidthTag, OS.Long2Fix(Math.max(0, width)), 4); }
public final CharSequence encode(IRequestTarget requestTarget) { if (!(requestTarget instanceof IBookmarkablePageRequestTarget)) { throw new IllegalArgumentException("this encoder can only be used with instances of " + IBookmarkablePageRequestTarget.class.getName()); } AppendingStringBuffer url = new ...
public final CharSequence encode(IRequestTarget requestTarget) { if (!(requestTarget instanceof IBookmarkablePageRequestTarget)) { throw new IllegalArgumentException("this encoder can only be used with instances of " + IBookmarkablePageRequestTarget.class.getName()); } AppendingStringBuffer url = new ...
public void testQS() { IRequestTargetUrlCodingStrategy ucs = new QueryStringUrlCodingStrategy("/mount/point", TestPage.class); PageParameters params = new PageParameters(); params.add("a", "1"); params.add("a", "2"); params.add("b", "1"); IRequestTarget rt = new BookmarkablePageRequestTarget(TestPage.clas...
public void testQS() { IRequestTargetUrlCodingStrategy ucs = new QueryStringUrlCodingStrategy("/mount/point", TestPage.class); PageParameters params = new PageParameters(); params.add("a", "1"); params.add("a", "2"); params.add("b", "1"); IRequestTarget rt = new BookmarkablePageRequestTarget(TestPage.clas...
private static void checkVersions() { versionsOK = true; checkVersion(BooleanPropertyConverter.class, "1.4"); checkVersion(HashTreeConverter.class, "1.2"); checkVersion(IntegerPropertyConverter.class, "1.3"); checkVersion(LongPropertyConverter.class, "1.3"); checkVersion(MultiP...
private static void checkVersions() { versionsOK = true; checkVersion(BooleanPropertyConverter.class, "1.4"); checkVersion(HashTreeConverter.class, "1.2"); checkVersion(IntegerPropertyConverter.class, "1.3"); checkVersion(LongPropertyConverter.class, "1.3"); checkVersion(MultiP...
public void iterationStart(LoopIterationEvent iterEvent); }
void iterationStart(LoopIterationEvent iterEvent); /* * 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 applies(ConfigTestElement configElement); }
boolean applies(ConfigTestElement configElement); /* * 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 Apach...
public void clearGui(); // N.B. originally called clear()
void clearGui(); /* * 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 Apache License, Version 2.0 * (the "L...
public void stopServer(); }
void stopServer(); /* * 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 Apache License, Version 2.0 * (the ...
public void process(); }
void process(); /* * 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 Apache License, Version 2.0 * (the "Li...
public void process(); }
void process(); /* * 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 Apache License, Version 2.0 * (the "Li...
public void clearData(); // N.B. originally called clear()
void clearData(); /* * 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 Apache License, Version 2.0 * (the "...
public boolean interrupt(); }
boolean interrupt(); /* * 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 Apache License, Version 2.0 * (th...
public void setDescriptor(PropertyDescriptor descriptor);
void setDescriptor(PropertyDescriptor descriptor); /* * 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 Object clone(); }
Object clone(); /* * 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 Apache License, Version 2.0 * (the "Li...
public void testIterationStart(LoopIterationEvent event); } No newline at end of file
void testIterationStart(LoopIterationEvent event); /* * 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 void threadFinished(JMeterThread thread); }
void threadFinished(JMeterThread thread); /* * 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 Apache Licens...
public long delay(); }
long delay(); /* * 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 Apache License, Version 2.0 * (the "Lice...
public void localeChanged(LocaleChangeEvent event); }
void localeChanged(LocaleChangeEvent event); /* * 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 Apache Lic...
public Object nextElement() throws NoSuchElementException { if (more) { more = false; return url; } else { throw new NoSuchElementException(); }...
public Object nextElement() throws NoSuchElementException { if (more) { more = false; return url; } else { throw new NoSuchElementException(); }...
public void setOsFamily(String osFamily) { this.osFamily = osFamily.toLowerCase(Locale.US); }
public void setOsFamily(String osFamily) { this.osFamily = osFamily.toLowerCase(Locale.ENGLISH); }
public void setRequestMethod(String method) { this.requestMethod = method == null ? DEFAULT_REQUEST_METHOD : method.toUpperCase(Locale.US); }
public void setRequestMethod(String method) { this.requestMethod = method == null ? DEFAULT_REQUEST_METHOD : method.toUpperCase(Locale.ENGLISH); }
public void addJavaRuntime() { if (JavaEnvUtils.isKaffe()) { // newer versions of Kaffe (1.1.1+) won't have this, // but this will be sorted by FileSet anyway. File kaffeShare = new File(System.getProperty("java.home") + File.separat...
public void addJavaRuntime() { if (JavaEnvUtils.isKaffe()) { // newer versions of Kaffe (1.1.1+) won't have this, // but this will be sorted by FileSet anyway. File kaffeShare = new File(System.getProperty("java.home") + File.separat...
public void addPages() { String path = file.getLocation().removeFileExtension().removeLastSegments(1).toString(); String name = file.getLocation().removeFileExtension().removeLastSegments(1).lastSegment(); pageResource = new PageResource(encryption, file, textSelection != null ? true : fals...
public void addPages() { String path = file.getLocation().removeFileExtension().removeLastSegments(1).toString(); String name = file.getLocation().removeFileExtension().removeLastSegments(1).lastSegment(); pageResource = new PageResource(encryption, file, textSelection != null ? true : fals...
protected Class propertyType(final Component component) { if (component instanceof FormComponent) { return ((FormComponent)component).getValidationType(); } return null; }
protected Class propertyType(final Component component) { if (component instanceof FormComponent) { return ((FormComponent)component).getType(); } return null; }
public void setActiveNode(IStructureViewNode node, int lineOffset) { if (node == null) return; if (!(node.getStructureNode() instanceof IProgramElement)) return; IProgramElement pNode = (IProgramElement)node.getStructureNode(); treeManager.highlightNode(pNode); if (pNode.getSourceLocation() != null) { ...
public void setActiveNode(IStructureViewNode node, int lineOffset) { if (node == null) return; // if (!(node.getStructureNode() instanceof IProgramElement)) return; IProgramElement pNode = (IProgramElement)node.getStructureNode(); treeManager.highlightNode(pNode); if (pNode.getSourceLocation() != null) ...
public static void checkerMunger(IHierarchy model, Shadow shadow, Checker checker) { if (shadow.getSourceLocation() == null || checker == null) return; String sourceHandle = ProgramElement.createHandleIdentifier( checker.getSourceLocation().getSourceFile(), checker.getSourceLocation().getLine(), checke...
public static void checkerMunger(IHierarchy model, Shadow shadow, Checker checker) { if (shadow.getSourceLocation() == null || checker.getSourceLocation() == null) return; String sourceHandle = ProgramElement.createHandleIdentifier( checker.getSourceLocation().getSourceFile(), checker.getSourceLocation()....
public int getCount(JDBCStore store) throws SQLException { Connection conn = null; PreparedStatement stmnt = null; ResultSet rs = null; try { SQLBuffer sql = toSelectCount(); conn = store.getConnection(); stmnt = prepareStatement(conn, sql,...
public int getCount(JDBCStore store) throws SQLException { Connection conn = null; PreparedStatement stmnt = null; ResultSet rs = null; try { SQLBuffer sql = toSelectCount(); conn = store.getNewConnection(); stmnt = prepareStatement(conn, s...
protected final void synchronizeData() { // no need to sync in the future needsSyncData(false); // fluff data DeferredDocumentImpl ownerDocument = (DeferredDocumentImpl) this.ownerDocument; // we don't want to generate any event for this so turn them off ...
protected final void synchronizeData() { // no need to sync in the future needsSyncData(false); // fluff data DeferredDocumentImpl ownerDocument = (DeferredDocumentImpl) this.ownerDocument; // we don't want to generate any event for this so turn them off ...
public static byte[] objectToByteArray(Object object) { try { final ByteArrayOutputStream out = new ByteArrayOutputStream(); try { new ObjectOutputStream(out).writeObject(object); } finally { out.close(); } return out.toByteArray(); } catch (IOException e) { e.printStackTr...
public static byte[] objectToByteArray(final Object object) { try { final ByteArrayOutputStream out = new ByteArrayOutputStream(); try { new ObjectOutputStream(out).writeObject(object); } finally { out.close(); } return out.toByteArray(); } catch (IOException e) { e.printS...
public void deselectAll () { checkWidget (); deselect (null, 0); } void destroyItem (TableColumn column) { int index = 0; while (index < columnCount) { if (columns [index] == column) break; index++; } for (int i=0; i<itemCount; i++) { TableItem item = items [i]; if (item != null) { if (columnCount <= ...
public void deselectAll () { checkWidget (); deselect (null, 0); } void destroyItem (TableColumn column) { int index = 0; while (index < columnCount) { if (columns [index] == column) break; index++; } for (int i=0; i<itemCount; i++) { TableItem item = items [i]; if (item != null) { if (columnCount <= ...
public void dragEnter(DropTargetEvent event) { String ops = null; if ((event.operations & DND.DROP_COPY) != 0) ops += "Copy;"; if ((event.operations & DND.DROP_MOVE) != 0) ops += "Move;"; if ((event.operations & DND.DROP_LINK) != 0) ops += "Link;"; System.out.println("Allowed Operations are "+ops); ...
public void dragEnter(DropTargetEvent event) { String ops = ""; if ((event.operations & DND.DROP_COPY) != 0) ops += "Copy;"; if ((event.operations & DND.DROP_MOVE) != 0) ops += "Move;"; if ((event.operations & DND.DROP_LINK) != 0) ops += "Link;"; System.out.println("Allowed Operations are "+ops); ...
private void retrieveServices() { IPresenceService[] services = Activator.getDefault() .getPresenceServices(); for (int i = 0; i < services.length; i++) { IContainer container = (IContainer) services[i] .getAdapter(IContainer.class); if (container != null) { addContainer(container); } } }
private void retrieveServices() { IPresenceService[] services = Activator.getDefault() .getPresenceServices(); for (int i = 0; i < services.length; i++) { IContainer container = (IContainer) services[i] .getAdapter(IContainer.class); if (container != null && container.getConnectedID() != null) { ...
private void startGui(String testFile) { PluginManager.install(this, true); JMeterTreeModel treeModel = new JMeterTreeModel(); JMeterTreeListener treeLis = new JMeterTreeListener(treeModel); treeLis.setActionHandler(ActionRouter.getInstance()); // NOTUSED: GuiPackage guiPack...
private void startGui(String testFile) { PluginManager.install(this, true); JMeterTreeModel treeModel = new JMeterTreeModel(); JMeterTreeListener treeLis = new JMeterTreeListener(treeModel); treeLis.setActionHandler(ActionRouter.getInstance()); // NOTUSED: GuiPackage guiPack...
public BufferedResponse() { this.stringBuffer = new StringBuffer(); }
public BufferedResponse() { this.stringBuffer = new StringBuffer(2500); }
protected void onSubmit() { // use Page "class" setResponsePage(SimplePage.class, new PageParameters("test=test")); } }; add(form); }
protected void onSubmit() { // use Page "class" setResponsePage(SimplePage.class, new PageParameters().set("test", "test")); } }; add(form); }
public BookmarkableHomePageLinksPage() { Class<? extends Page> homePage = Application.get().getHomePage(); add(new BookmarkablePageLink<Void>("defaulthompage", homePage)); add(new BookmarkablePageLink<Void>("defaulthompagewithparams", homePage, new PageParameters("param1=1,param2=test"))); add(new Bookmark...
public BookmarkableHomePageLinksPage() { Class<? extends Page> homePage = Application.get().getHomePage(); add(new BookmarkablePageLink<Void>("defaulthompage", homePage)); add(new BookmarkablePageLink<Void>("defaulthompagewithparams", homePage, new PageParameters().set("param1",1).set("param2", "test"))); ...
public void testDefault() { tester.startPage(A.class, new PageParameters("file=umlaut-\u00E4-\u00F6-\u00FC")); tester.assertRenderedPage(B.class); String url2 = ((B)tester.getLastRenderedPage()).getInterceptContinuationURL(); assertTrue(url2.contains("umlaut-%C3%A4-%C3%B6-%C3%BC")); tester.clickLink("link...
public void testDefault() { tester.startPage(A.class, new PageParameters().set("file", "umlaut-\u00E4-\u00F6-\u00FC")); tester.assertRenderedPage(B.class); String url2 = ((B)tester.getLastRenderedPage()).getInterceptContinuationURL(); assertTrue(url2.contains("umlaut-%C3%A4-%C3%B6-%C3%BC")); tester.clickL...
public MockPageParameterPage(PageParameters pageParameters) { add(new BookmarkablePageLink<Void>("link", MockPageParameterPage.class, new PageParameters("id=1"))); add(new Label("label", pageParameters.get("id").toString())); }
public MockPageParameterPage(PageParameters pageParameters) { add(new BookmarkablePageLink<Void>("link", MockPageParameterPage.class, new PageParameters().set("id", 1))); add(new Label("label", pageParameters.get("id").toString())); }