buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public int open () { /* Compute the MessageBox style */ int buttonBits = 0; if ((style & SWT.OK) == SWT.OK) buttonBits = OS.MB_OK; if ((style & (SWT.OK | SWT.CANCEL)) == (SWT.OK | SWT.CANCEL)) buttonBits = OS.MB_OKCANCEL; if ((style & (SWT.YES | SWT.NO)) == (SWT.YES | SWT.NO)) buttonBits = OS.MB_YESNO; if ((styl...
public int open () { /* Compute the MessageBox style */ int buttonBits = 0; if ((style & SWT.OK) == SWT.OK) buttonBits = OS.MB_OK; if ((style & (SWT.OK | SWT.CANCEL)) == (SWT.OK | SWT.CANCEL)) buttonBits = OS.MB_OKCANCEL; if ((style & (SWT.YES | SWT.NO)) == (SWT.YES | SWT.NO)) buttonBits = OS.MB_YESNO; if ((styl...
public String toString() { StringBuffer buf = new StringBuffer(); buf.append("pointcut "); buf.append(getDeclaringType().getName()); buf.append("."); buf.append(getName()); buf.append("("); for (int i=0; i < getParameterTypes().length; i++) { if (i > 0) buf.append(", "); buf.append(getParameterType...
public String toString() { StringBuffer buf = new StringBuffer(); buf.append("pointcut "); buf.append((getDeclaringType()==null?"<nullDeclaringType>":getDeclaringType().getName())); buf.append("."); buf.append(getName()); buf.append("("); for (int i=0; i < getParameterTypes().length; i++) { if (i > 0)...
protected ForeignKey getJoinForeignKey() { return getJoinForeignKey(getDefaultElementMapping(false)); } boolean requiresOrderBy() { return List.class.isAssignableFrom(field.getProxyType()); } /** * Gets the identity value of the given instance that is suitable to join to ...
public ForeignKey getJoinForeignKey() { return getJoinForeignKey(getDefaultElementMapping(false)); } boolean requiresOrderBy() { return List.class.isAssignableFrom(field.getProxyType()); } /** * Gets the identity value of the given instance that is suitable to join to the...
private static final String MODE_DISKSTORE = "DiskStore"; // $NON-NLS-1$ /** * Checks for the Jmeter property mode and returns the required class. * * @param listener * @return the appropriate class. Standard Jmeter functionality, * hold_samples until end of test or batch sampl...
private static final String MODE_DISKSTORE = "DiskStore"; // $NON-NLS-1$ /** * Checks for the Jmeter property mode and returns the required class. * * @param listener * @return the appropriate class. Standard Jmeter functionality, * hold_samples until end of test or batch sampl...
public void javaToNative(Object object, TransferData transferData) { if (!checkImage(object) || !isSupportedType(transferData)) { DND.error(DND.ERROR_INVALID_DATA); } if (OS.GTK_VERSION < OS.VERSION (2, 4, 0)) return; ImageData imgData = (ImageData)object; if (imgData == null) SWT.error(SWT.ERROR_NULL_ARGUMENT...
public void javaToNative(Object object, TransferData transferData) { if (!checkImage(object) || !isSupportedType(transferData)) { DND.error(DND.ERROR_INVALID_DATA); } if (OS.GTK_VERSION < OS.VERSION (2, 4, 0)) return; ImageData imgData = (ImageData)object; if (imgData == null) SWT.error(SWT.ERROR_NULL_ARGUMENT...
protected void encodeServiceProperties( EndpointDescription endpointDescription, IServiceProperties result) { // OSGi service properties // endpoint.id == endpointDescription.getId() String endpointId = endpointDescription.getId(); encodeString( result, org.osgi.service.remoteserviceadmin.RemoteCons...
protected void encodeServiceProperties( EndpointDescription endpointDescription, IServiceProperties result) { // OSGi service properties // endpoint.id == endpointDescription.getId() String endpointId = endpointDescription.getId(); encodeString( result, org.osgi.service.remoteserviceadmin.RemoteCons...
public IRemoteServiceContainer[] selectConsumerContainers( EndpointDescription endpointDescription) { trace("selectConsumerContainers", "endpointDescription=" + endpointDescription); //$NON-NLS-1$ // Get the endpointID ID endpointID = endpointDescription.getContainerID(); // Get the remote supported config...
public IRemoteServiceContainer[] selectConsumerContainers( EndpointDescription endpointDescription) { trace("selectConsumerContainers", "endpointDescription=" + endpointDescription); //$NON-NLS-1$ // Get the endpointID ID endpointID = endpointDescription.getContainerID(); // Get the remote supported config...
private static ClassMapping getMapping(MappingRepository repos, Class cls, boolean validate) { // this will parse all possible metadata rsrcs looking for cls, so // will detect if p-aware ClassMapping mapping = repos.getMapping(cls, null, false); if (mapping != null) ...
private static ClassMapping getMapping(MappingRepository repos, Class cls, boolean validate) { // this will parse all possible metadata rsrcs looking for cls, so // will detect if p-aware ClassMapping mapping = repos.getMapping(cls, null, false); if (mapping != null) ...
private SampleResult sample(int redirects) { log.debug("Start : sample2"); long time = System.currentTimeMillis(); SampleResult res = new SampleResult(); log.debug("#4, encoded path = " + getEncodedPath()); URL u = null; try { u = getUrl(); ...
private SampleResult sample(int redirects) { log.debug("Start : sample2"); long time = System.currentTimeMillis(); SampleResult res = new SampleResult(); log.debug("#4, encoded path = " + getEncodedPath()); URL u = null; try { u = getUrl(); ...
public String stringifyValue() { switch (type) { case PRIMITIVE_INT: ConstantInteger c = (ConstantInteger)cpool.getConstant(idx,Constants.CONSTANT_Integer); return Integer.toString(c.getBytes()); case PRIMITIVE_LONG: ConstantLong j = (ConstantLong)cpool.getConstant(idx,Const...
public String stringifyValue() { switch (type) { case PRIMITIVE_INT: ConstantInteger c = (ConstantInteger)cpool.getConstant(idx,Constants.CONSTANT_Integer); return Integer.toString(c.getBytes()); case PRIMITIVE_LONG: ConstantLong j = (ConstantLong)cpool.getConstant(idx,Const...
@ComplexAnnotation(ival=4,bval=2,cval='5',fval=3.0f,dval=33.4,zval=false,jval=56,sval=99) @ComplexAnnotation(ival=4,bval=2,cval=5,fval=3.0f,dval=33.4,zval=false,jval=56,sval=99) public class ComplexAnnotatedClass { }
@ComplexAnnotation(ival=4,bval=2,cval='5',fval=3.0f,dval=33.4,zval=false,jval=56,sval=99) @ComplexAnnotation(ival=4,bval=2,cval='5',fval=3.0f,dval=33.4,zval=false,jval=56,sval=99) public class ComplexAnnotatedClass { }
private void verifyComplexAnnotation(JavaClass clazz) { Annotation[] anns = clazz.getAnnotations(); assertTrue("Should be one annotation but found "+anns.length,anns.length==1); Annotation ann = anns[0]; assertTrue("Should be called 'ComplexAnnotation' but was called "+ann.getTypeName(), ann.getTypeName()....
private void verifyComplexAnnotation(JavaClass clazz) { Annotation[] anns = clazz.getAnnotations(); assertTrue("Should be one annotation but found "+anns.length,anns.length==1); Annotation ann = anns[0]; assertTrue("Should be called 'ComplexAnnotation' but was called "+ann.getTypeName(), ann.getTypeName()....
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); } ...
protected boolean startNamedQuery(Attributes attrs) throws SAXException { if (!isQueryMode()) return false; String name = attrs.getValue("name"); Log log = getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("parse-query", name)); QueryMet...
protected boolean startNamedQuery(Attributes attrs) throws SAXException { if (!isQueryMode()) return false; String name = attrs.getValue("name"); Log log = getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("parse-query", name)); QueryMet...
public Image getImage(Object obj) { String imageKey = ISharedImages.IMG_OBJ_ELEMENT; if (obj instanceof TreeParent) imageKey = ISharedImages.IMG_OBJ_FOLDER; return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey); } }
public Image getImage(Object obj) { String imageKey = null; if (obj instanceof TreeParent) imageKey = ISharedImages.IMG_OBJ_FOLDER; return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey); } }
public void setInsertMark (TreeItem item, boolean before) { checkWidget (); if (item == null) { OS.gtk_tree_view_unset_rows_drag_dest(handle); return; } if (item.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); if (item.parent != this) return; Rectangle rect = item.getBounds(); int /*long*/ [] path = new in...
public void setInsertMark (TreeItem item, boolean before) { checkWidget (); if (item == null) { OS.gtk_tree_view_unset_rows_drag_dest(handle); return; } if (item.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); if (item.parent != this) return; Rectangle rect = item.getBounds(); int /*long*/ [] path = new in...
public void handleEvent(Event event) { if((event.detail & SWT.SELECTED) != 0) { GC gc = event.gc; Rectangle area = tree.getClientArea(); /* * If you wish to paint the selection beyond the end of * last column, you must change the clipping region. */ int columnCount = tree.getColum...
public void handleEvent(Event event) { if((event.detail & SWT.SELECTED) != 0) { GC gc = event.gc; Rectangle area = tree.getClientArea(); /* * If you wish to paint the selection beyond the end of * last column, you must change the clipping region. */ int columnCount = tree.getColum...
private void checkContent( String content, boolean asBase ) throws InvalidDatatypeValueException { // validate against parent type if any // REVISIT: fast fix to avoid class cast exception if (this.fBaseValidator != null && !(fBaseValidator instanceof AnySimpleType)) { // val...
protected void checkContent( String content, boolean asBase ) throws InvalidDatatypeValueException { // validate against parent type if any // REVISIT: fast fix to avoid class cast exception if (this.fBaseValidator != null && !(fBaseValidator instanceof AnySimpleType)) { // v...
private void checkContentEnum( String content, ValidationContext state, boolean pattern, Vector enumeration ) throws InvalidDatatypeValueException { // for UnionDatatype we have to wait till the union baseValidators are known, thus // if the content is valid "against" ListDatatype, but pattern ...
protected void checkContentEnum( String content, ValidationContext state, boolean pattern, Vector enumeration ) throws InvalidDatatypeValueException { // for UnionDatatype we have to wait till the union baseValidators are known, thus // if the content is valid "against" ListDatatype, but patter...
public void test_setFontLorg_eclipse_swt_graphics_Font() { final int COUNT = 800000; Font font1 = control.getFont(); FontData[] data = font1.getFontData(); data[0].height += 2; Font font2 = new Font(control.getDisplay(), data); Font[] fonts = new Font[COUNT]; for (int i = 0; i < COUNT; i += 4) { fonts[i] = f...
public void test_setFontLorg_eclipse_swt_graphics_Font() { final int COUNT = 800000; Font font1 = control.getFont(); FontData[] data = font1.getFontData(); data[0].setHeight(data[0].getHeight() + 2); Font font2 = new Font(control.getDisplay(), data); Font[] fonts = new Font[COUNT]; for (int i = 0; i < COUNT; i...
public void start() throws Exception { IContainer client = ContainerFactory.getDefault().createContainer( CLIENT_TYPE); // Get adapter for accessing remote services IRemoteServiceContainerAdapter adapter = (IRemoteServiceContainerAdapter) client .getAdapter(IRemoteServiceContainerAdapter.class); rsCon...
public void start() throws Exception { IContainer client = ContainerFactory.getDefault().createContainer( CLIENT_TYPE); // Get adapter for accessing remote services IRemoteServiceContainerAdapter adapter = (IRemoteServiceContainerAdapter) client .getAdapter(IRemoteServiceContainerAdapter.class); rsCon...
public void onRendered(Component component) { super.onRendered(component); // Append the span and img icon right after the rendering of the // component. Not as pretty as working with a panel etc, but works // for behaviors and is more efficient Response response = component.getResponse(); response.write(...
public void onRendered(Component component) { super.onRendered(component); // Append the span and img icon right after the rendering of the // component. Not as pretty as working with a panel etc, but works // for behaviors and is more efficient Response response = component.getResponse(); response.write(...
protected void setValidationMode(String mode) { setValidationMode(Enum.valueOf(ValidationMode.class, mode)); }
protected void setValidationMode(String mode) { setValidationMode(Enum.valueOf(ValidationMode.class, mode.toUpperCase())); }
private final StructureTreeModel NO_STRUCTURE_MODEL = new StructureTreeModel(new SwingTreeViewNode(AspectJModel.NO_STRUCTURE, new AbstractIcon(null), new ArrayList()));
private final StructureTreeModel NO_STRUCTURE_MODEL = new StructureTreeModel(new SwingTreeViewNode(IHierarchy.NO_STRUCTURE, new AbstractIcon(null), new ArrayList()));
public String toString() { if (kind == IStructureViewNode.Kind.RELATIONSHIP) { return relationshipName; } else { return programElement.getName(); } }
public String toString() { if (kind == IStructureViewNode.Kind.RELATIONSHIP) { return relationshipName; } else { return programElement.toLabelString(); } }
public void testSimpleStructure() throws IOException, CoreException { AjBuildManager manager = new AjBuildManager(messageWriter); BuildArgParser parser = new BuildArgParser(); String javaClassPath = System.getProperty("java.class.path"); AjBuildConfig buildConfig = parser.genBuildConfig(new String...
public void testSimpleStructure() throws IOException, CoreException { AjBuildManager manager = new AjBuildManager(messageWriter); BuildArgParser parser = new BuildArgParser(); String javaClassPath = System.getProperty("java.class.path"); AjBuildConfig buildConfig = parser.genBuildConfig(new String...
public boolean match(Shadow shadow, World world) { if (super.match(shadow, world)) { IMessage message = new Message( msg, shadow.toString(), isError ? IMessage.ERROR : IMessage.WARNING, shadow.getSourceLocation()); world.getMessageHandler().handleMessage(message); AsmAdapter.checkerMunge...
public boolean match(Shadow shadow, World world) { if (super.match(shadow, world)) { IMessage message = new Message( msg, shadow.toString(), isError ? IMessage.ERROR : IMessage.WARNING, shadow.getSourceLocation()); world.getMessageHandler().handleMessage(message); AsmAdviceRelationshipPr...
private void implementMungers() { World world = getIWorld(); for (Iterator iter = mungers.iterator(); iter.hasNext();) { ShadowMunger munger = (ShadowMunger) iter.next(); munger.implementOn(this); if (world.getModel() != null) { //System.err.println("munger: " + munger + " on " + this); AsmAdapter...
private void implementMungers() { World world = getIWorld(); for (Iterator iter = mungers.iterator(); iter.hasNext();) { ShadowMunger munger = (ShadowMunger) iter.next(); munger.implementOn(this); if (world.getModel() != null) { //System.err.println("munger: " + munger + " on " + this); AsmAdviceR...
public static void traceLog(String msg) { if (trace) System.out.println("oAW-XSD[" + Thread.currentThread().getName() + "]: " + msg);
public static void traceLog(String msg) { if (trace) System.out.println("XSD adapter [" + Thread.currentThread().getName() + "]: " + msg);
private static final String VERSION = "2.3.3"; static final String COPYRIGHT = "Copyright (c) 1998-2008 The Apache Software Foundation";
private static final String VERSION = "2.3.3"; static final String COPYRIGHT = "Copyright (c) 1998-2009 The Apache Software Foundation";
public List getMethodsWithoutIterator(boolean includeITDs, boolean allowMissing) { List methods = new ArrayList(); Set knowninterfaces = new HashSet(); addAndRecurse(knowninterfaces,methods,this,includeITDs,allowMissing); return methods; } private void addAndRecurse(Set ...
public List getMethodsWithoutIterator(boolean includeITDs, boolean allowMissing) { List methods = new ArrayList(); Set knowninterfaces = new HashSet(); addAndRecurse(knowninterfaces,methods,this,includeITDs,allowMissing); return methods; } private void addAndRecurse(Set ...
public HorizontalPanel(int hgap, float verticalAlign) { super(new BorderLayout()); add(subPanel, BorderLayout.WEST); this.hgap = hgap; this.verticalAlign = verticalAlign; }
public HorizontalPanel(int hgap, float verticalAlign) { super(new BorderLayout()); add(subPanel, BorderLayout.CENTER); this.hgap = hgap; this.verticalAlign = verticalAlign; }
private void execute( final String[] args ) throws Exception { setupDefaultParameters(); if( !parseCommandLineOptions( args ) ) { return; } //handle logging... final String logLevel = m_parameters.getParameter( "log.level", null ); se...
private void execute( final String[] args ) throws Exception { setupDefaultParameters(); if( !parseCommandLineOptions( args ) ) { return; } //handle logging... final String logLevel = m_parameters.getParameter( "log.level", null ); se...
protected void appendDefaultButtonField(final MarkupStream markupStream, final ComponentTag openTag) { String nameAndId = getHiddenFieldId(); AppendingStringBuffer buffer = new AppendingStringBuffer(); // get the value, first seeing whether the value attribute is set // by a model String value = defaultB...
protected void appendDefaultButtonField(final MarkupStream markupStream, final ComponentTag openTag) { String nameAndId = getHiddenFieldId(); AppendingStringBuffer buffer = new AppendingStringBuffer(); // get the value, first seeing whether the value attribute is set // by a model String value = defaultB...
public final synchronized Page getPage(final String pageMapName, final String path, final int versionNumber) { if (log.isDebugEnabled()) { log.debug("Getting page [path = " + path + ", versionNumber = " + versionNumber + "]"); } // Get page map by name, creating the default page map automatically Pag...
public final synchronized Page getPage(final String pageMapName, final String path, final int versionNumber) { if (log.isDebugEnabled()) { log.debug("Getting page [path = " + path + ", versionNumber = " + versionNumber + "]"); } // Get page map by name, creating the default page map automatically Pag...
private StringBuffer setComponentPathForTag(final StringBuffer tagPath, final ComponentTag tag, final int tagIndex) { // Only if the tag has wicket:id="xx" and open or open-close if ((tag.isOpen() || tag.isOpenClose()) && tag.getAttributes().containsKey(wicketId)) { int size = tagPath.length(); if (siz...
private StringBuffer setComponentPathForTag(final StringBuffer tagPath, final ComponentTag tag, final int tagIndex) { // Only if the tag has wicket:id="xx" and open or open-close if ((tag.isOpen() || tag.isOpenClose()) && tag.getAttributes().containsKey(wicketId)) { int size = tagPath.length(); if (siz...
private final void replicate(final Page page) { // Create PageState for page final PageState pageState = newPageState(page); pageState.addedToSession = true; pageState.pageMapName = page.getPageMap().getName(); // Set HttpSession attribute for new PageState setAttribute(page.getId(), pageState); }
private final void replicate(final Page page) { // Create PageState for page final PageState pageState = newPageState(page); //pageState.addedToSession = true; pageState.pageMapName = page.getPageMap().getName(); // Set HttpSession attribute for new PageState setAttribute(page.getId(), pageState); }
* protected void onSubmit() { * System.out.println(&quot;Link2 was clicked, value1 is: &quot; * + mod.getValue1()); * }; * }); * * &lt;form wicket:id=&quot;linkForm&quot; &gt; * &lt;input wicket:id=&quot;value1&quot; ty...
* protected void onSubmit() { * System.out.println(&quot;Link2 was clicked, value1 is: &quot; * + mod.getValue1()); * }; * }); * * &lt;form wicket:id=&quot;linkForm&quot; &gt; * &lt;input wicket:id=&quot;value1&quot; ty...
private void addRelatedType(XSTypeDefinition type, Vector componentList, String namespace, Hashtable dependencies) { if (!type.getAnonymous()) { if (!type.getNamespace().equals(SchemaSymbols.URI_SCHEMAFORSCHEMA)) { //REVISIT - do we use == instead if (!componentList.contains(type...
private void addRelatedType(XSTypeDefinition type, Vector componentList, String namespace, Hashtable dependencies) { if (!type.getAnonymous()) { if (!SchemaSymbols.URI_SCHEMAFORSCHEMA.equals(type.getNamespace())) { //REVISIT - do we use == instead if (!componentList.contains(type...
package org.apache.aut.bzip2; /* * 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.txt file. */ package org.apache.tools.bzip2;...
package org.apache.aut.bzip2; /* * 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.txt file. */ package org.apache.aut.bzip2; ...
package org.apache.aut.tar; /* * 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.txt file. */ package org.apache.tools.tar; /*...
package org.apache.aut.tar; /* * 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.txt file. */ package org.apache.aut.tar; /** ...
package org.apache.aut.zip; /* * 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.txt file. */ package org.apache.tools.zip; /*...
package org.apache.aut.zip; /* * 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.txt file. */ package org.apache.aut.zip; /** ...
package org.apache.aut.zip; /* * 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.txt file. */ package org.apache.tools.zip; im...
package org.apache.aut.zip; /* * 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.txt file. */ package org.apache.aut.zip; impo...
private void updateImportListWith(SchemaGrammar newGrammar) { SchemaGrammar[] schemaGrammars = fGrammarBucket.getGrammars(); for (int i = 0; i < schemaGrammars.length; ++i) { SchemaGrammar sg = schemaGrammars[i]; if (sg != newGrammar) { Vector importedGrammars...
private void updateImportListWith(SchemaGrammar newGrammar) { SchemaGrammar[] schemaGrammars = fGrammarBucket.getGrammars(); for (int i = 0; i < schemaGrammars.length; ++i) { SchemaGrammar sg = schemaGrammars[i]; if (sg != newGrammar) { Vector importedGrammars...
public IConverter getConverter(Class<?> type); }
public <C> IConverter<C> getConverter(Class<C> type); }
public void testInterfaceAdded() throws ClassNotFoundException { String msg = null; try { Class.forName(WASManagedRuntime.CLASS); fail("expected an exception to be thrown"); } catch (NoClassDefFoundError e) { msg = e.getMessage(); } Strin...
public void testInterfaceAdded() throws ClassNotFoundException { String msg = null; try { Class.forName(WASManagedRuntime.CLASS); fail("expected an exception to be thrown"); } catch (NoClassDefFoundError e) { msg = e.getMessage(); } Strin...
public IFileID getDirectory(); }
public IFileID getFileID(); }
public void widgetSelected (SelectionEvent event) { packColumns (); setExampleWidgetSize (); } }); } /** * Creates the "Style" group. */ void createStyleGroup () { super.createStyleGroup (); /* Create the extra widgets */ checkButton = new Button (styleGroup, SWT.CHECK); checkButton....
public void widgetSelected (SelectionEvent event) { packColumns (); setExampleWidgetSize (); } }); } /** * Creates the "Style" group. */ void createStyleGroup () { super.createStyleGroup (); /* Create the extra widgets */ checkButton = new Button (styleGroup, SWT.CHECK); checkButton....
public void widgetSelected (SelectionEvent event) { packColumns (tree1); packColumns (tree2); setExampleWidgetSize (); } }); } /** * Creates the "Style" group. */ void createStyleGroup() { super.createStyleGroup(); /* Create the extra widgets */ checkButton = new Button (styleGroup...
public void widgetSelected (SelectionEvent event) { packColumns (tree1); packColumns (tree2); setExampleWidgetSize (); } }); } /** * Creates the "Style" group. */ void createStyleGroup() { super.createStyleGroup(); /* Create the extra widgets */ checkButton = new Button (styleGroup...
public int /*long*/ runModal() { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_runModal); }
public int /*long*/ runModal() { return OS.objc_msgSend(this.id, OS.sel_runModal); }
public int /*long*/ runModalForWindow(NSWindow theWindow) { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_runModalForWindow_, theWindow != null ? theWindow.id : 0); }
public int /*long*/ runModalForWindow(NSWindow theWindow) { return OS.objc_msgSend(this.id, OS.sel_runModalForWindow_, theWindow != null ? theWindow.id : 0); }
public int /*long*/ count() { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_count); }
public int /*long*/ count() { return OS.objc_msgSend(this.id, OS.sel_count); }
public int /*long*/ state() { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_state); }
public int /*long*/ state() { return OS.objc_msgSend(this.id, OS.sel_state); }
public int /*long*/ numberOfComponents() { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_numberOfComponents); }
public int /*long*/ numberOfComponents() { return OS.objc_msgSend(this.id, OS.sel_numberOfComponents); }
public int /*long*/ action() { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_action); }
public int /*long*/ action() { return OS.objc_msgSend(this.id, OS.sel_action); }
public int /*long*/ code() { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_code); }
public int /*long*/ code() { return OS.objc_msgSend(this.id, OS.sel_code); }
public int /*long*/ imageInterpolation() { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_imageInterpolation); }
public int /*long*/ imageInterpolation() { return OS.objc_msgSend(this.id, OS.sel_imageInterpolation); }
public int /*long*/ numberOfItems() { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_numberOfItems); }
public int /*long*/ numberOfItems() { return OS.objc_msgSend(this.id, OS.sel_numberOfItems); }
public int /*long*/ alignment() { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_alignment); }
public int /*long*/ alignment() { return OS.objc_msgSend(this.id, OS.sel_alignment); }
public int /*long*/ hitPart() { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_hitPart); }
public int /*long*/ hitPart() { return OS.objc_msgSend(this.id, OS.sel_hitPart); }
public int /*long*/ length() { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_length); }
public int /*long*/ length() { return OS.objc_msgSend(this.id, OS.sel_length); }
public int /*long*/ resizingMask() { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_resizingMask); }
public int /*long*/ resizingMask() { return OS.objc_msgSend(this.id, OS.sel_resizingMask); }
public int /*long*/ columnAtPoint(NSPoint point) { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_columnAtPoint_, point); }
public int /*long*/ columnAtPoint(NSPoint point) { return OS.objc_msgSend(this.id, OS.sel_columnAtPoint_, point); }
public String getCacheKey(final MarkupContainer container, final Class<?> clazz) { final String classname = clazz.getName(); final Locale locale = container.getLocale(); // TODO until now getStyle() == style + variation final String style = container.getStyle(); final String markupType = container.getMarkup...
public String getCacheKey(final MarkupContainer container, final Class<?> clazz) { final String classname = clazz.getName(); final Locale locale = container.getLocale(); // TODO until now getStyle() == style + variation final String style = container.getStyle() + "_" + container.getVariation(); final String...
public void respond(RequestCycle requestCycle) { Application application = requestCycle.getApplication(); SharedResources sharedResources = application.getSharedResources(); final String resourceKey = getRequestParameters().getResourceKey(); Resource resource = sharedResources.get(resourceKey); // try to l...
public void respond(RequestCycle requestCycle) { Application application = requestCycle.getApplication(); SharedResources sharedResources = application.getSharedResources(); final String resourceKey = getRequestParameters().getResourceKey(); Resource resource = sharedResources.get(resourceKey); // try to l...
public PackageResourceStream(Class<?> scope, String path) { String absolutePath = Packages.absolutePath(scope, path); resourceStream = Application.get().getResourceSettings().getResourceStreamLocator().locate( scope, absolutePath, null, null, null); if (resourceStream == null) { throw new WicketRuntime...
public PackageResourceStream(Class<?> scope, String path) { String absolutePath = Packages.absolutePath(scope, path); resourceStream = Application.get().getResourceSettings().getResourceStreamLocator().locate( scope, absolutePath, null, null, null, null); if (resourceStream == null) { throw new WicketR...
public void testLoaderUnknownResources() { WicketTester tester = new WicketTester(); WebApplication app = tester.getApplication(); IStringResourceLoader loader = new ClassStringResourceLoader(app.getClass()); Assert.assertNull("Unknown resource should return null", loader.loadStringResource( component.getC...
public void testLoaderUnknownResources() { WicketTester tester = new WicketTester(); WebApplication app = tester.getApplication(); IStringResourceLoader loader = new ClassStringResourceLoader(app.getClass()); Assert.assertNull("Unknown resource should return null", loader.loadStringResource( component.getC...
public void onClick() { Files.remove(file); info("Deleted " + file); } }); } } /** * Form for uploads. */ private class FileUploadForm extends Form {
public void onClick() { Files.remove(file); info("Deleted " + file); } }); } } /** * Form for uploads. */ private class FileUploadForm extends Form<Void> {
public int getOffsetAtLocation(Point point) { checkWidget(); if (point == null) { SWT.error(SWT.ERROR_NULL_ARGUMENT); } int[] trailing = new int[1]; int offset = getOffsetAtPoint(point.x, point.y, trailing); if (offset == -1) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } int lineIndex = content.getLineAtOffset...
public int getOffsetAtLocation(Point point) { checkWidget(); if (point == null) { SWT.error(SWT.ERROR_NULL_ARGUMENT); } int[] trailing = new int[1]; int offset = getOffsetAtPoint(point.x, point.y, trailing); if (offset == -1) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } int lineIndex = content.getLineAtOffset...
public void widgetSelected(SelectionEvent e) { shell.dispose(); } }); } void disposeClient() { if (clientSite != null) clientSite.dispose(); clientSite = null; } /** * Prompt the user for a file and try to open it with some known ActiveX controls. */ void fileOpen() { Shell shell = oleFr...
public void widgetSelected(SelectionEvent e) { shell.dispose(); } }); } void disposeClient() { if (clientSite != null) clientSite.dispose(); clientSite = null; } /** * Prompt the user for a file and try to open it with some known ActiveX controls. */ void fileOpen() { Shell shell = oleFr...
public synchronized final Iterator iterator() { if (isReference()) { return ((BaseResourceCollectionWrapper) getCheckedRef()).iterator(); } dieOnCircularReference(); return cacheCollection().iterator(); }
public synchronized final Iterator iterator() { if (isReference()) { return ((BaseResourceCollectionWrapper) getCheckedRef()).iterator(); } dieOnCircularReference(); return new FailFast(this, cacheCollection().iterator()); }
public final boolean getRenderBodyOnly() { return getFlag(FLAG_RENDER_BODY_ONLY) && !getFlag(FLAG_OUTPUT_MARKUP_ID); }
public final boolean getRenderBodyOnly() { return getFlag(FLAG_RENDER_BODY_ONLY); }
protected void insert(OpenJPAStateManager sm, ClassMapping mapping, RowManager rowMgr, JDBCStore store, Collection customs) throws SQLException { Boolean custom = mapping.isCustomInsert(sm, store); if (!Boolean.FALSE.equals(custom)) mapping.customInsert(sm, store); ...
protected void insert(OpenJPAStateManager sm, ClassMapping mapping, RowManager rowMgr, JDBCStore store, Collection customs) throws SQLException { Boolean custom = mapping.isCustomInsert(sm, store); if (!Boolean.FALSE.equals(custom)) mapping.customInsert(sm, store); ...
public ServicePropertiesAdapter(final List aList) { Assert.isNotNull(aList); serviceProperties = new ServiceProperties(); for (final Iterator itr = aList.iterator(); itr.hasNext();) { final String[] str = StringUtils.split((String) itr.next(), "="); //$NON-NLS-1$ if (str.length != 2) { Trace.trace(Acti...
public ServicePropertiesAdapter(final List aList) { Assert.isNotNull(aList); serviceProperties = new ServiceProperties(); for (final Iterator itr = aList.iterator(); itr.hasNext();) { final String[] str = StringUtils.split((String) itr.next(), "="); //$NON-NLS-1$ if (str.length != 2) { Trace.trace(Acti...
public XSSimpleType createTypeUnion(String name, String targetNamespace, short finalSet, XSSimpleType[] memberTypes, XSObjectList annotations) { int typeNum = memberTypes.length; XSSimpleTypeDecl[] mtypes = new XSSimpleT...
public XSSimpleType createTypeUnion(String name, String targetNamespace, short finalSet, XSSimpleType[] memberTypes, XSObjectList annotations) { int typeNum = memberTypes.length; XSSimpleTypeDecl[] mtypes = new XSSimpleT...
public XSSimpleType createTypeUnion(String name, String targetNamespace, short finalSet, XSSimpleType[] memberTypes, XSObjectList annotations) { int typeNum = memberTypes.length; XSSimpleTypeDecl[] mtypes = new XSSimpleT...
public XSSimpleType createTypeUnion(String name, String targetNamespace, short finalSet, XSSimpleType[] memberTypes, XSObjectList annotations) { int typeNum = memberTypes.length; XSSimpleTypeDecl[] mtypes = new XSSimpleT...
protected void checkWidget () { Display display = this.display; if (display == null) error (SWT.ERROR_WIDGET_DISPOSED); if (display.thread != Thread.currentThread () && !display.isEmbedded) error (SWT.ERROR_THREAD_INVALID_ACCESS); if ((state & DISPOSED) != 0) error (SWT.ERROR_WIDGET_DISPOSED); }
protected void checkWidget () { Display display = this.display; if (display == null) error (SWT.ERROR_WIDGET_DISPOSED); if (display.thread != Thread.currentThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS); if ((state & DISPOSED) != 0) error (SWT.ERROR_WIDGET_DISPOSED); }
protected void appendDefaultButtonField(final MarkupStream markupStream, final ComponentTag openTag) { String nameAndId = getHiddenFieldId(); AppendingStringBuffer buffer = new AppendingStringBuffer(); // get the value, first seeing whether the value attribute is set // by a model String value = defaultB...
protected void appendDefaultButtonField(final MarkupStream markupStream, final ComponentTag openTag) { String nameAndId = getHiddenFieldId(); AppendingStringBuffer buffer = new AppendingStringBuffer(); // get the value, first seeing whether the value attribute is set // by a model String value = defaultB...
public static short getLevel(String str) { str = str.toUpperCase().trim(); short val = TRACE_STR.equals(str) ? Log.TRACE : INFO_STR.equals(str) ? Log.INFO : WARN_STR.equals(str) ? Log.WARN : ERROR_STR.equals(str) ? Log.ERROR : F...
public static short getLevel(String str) { str = str.toUpperCase(Locale.ENGLISH).trim(); short val = TRACE_STR.equals(str) ? Log.TRACE : INFO_STR.equals(str) ? Log.INFO : WARN_STR.equals(str) ? Log.WARN : ERROR_STR.equals(str) ? Log.ERROR : ...
private void setInverseRelation(OpenJPAStateManager owner, ClassMapping mapping, Result res) { FieldMapping[] fms = mapping.getFieldMappings(); // At this point, the owner is fully initialized. // Check if the owner has eagerly loaded ToMany relations. for (int i = 0; i < fm...
private void setInverseRelation(OpenJPAStateManager owner, ClassMapping mapping, Result res) { FieldMapping[] fms = mapping.getFieldMappings(); // At this point, the owner is fully initialized. // Check if the owner has eagerly loaded ToMany relations. for (int i = 0; i < fm...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget(); Rectangle trim = super.computeTrim (x, y, width, height); Rect rect = new Rect (); OS.GetWindowStructureWidths (shellHandle, rect); trim.x -= rect.left; trim.y -= rect.top; trim.width += rect.left + rect.right; trim.height += re...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget(); Rectangle trim = super.computeTrim (x, y, width, height); Rect rect = new Rect (); OS.GetWindowStructureWidths (shellHandle, rect); trim.x -= rect.left; trim.y -= rect.top; trim.width += rect.left + rect.right; trim.height += re...
static public void initializeClass(Class theClass) { // ***HACK*** We try to create an instance to force the VM to run the // class' static initializer. We don't care if the instance can't // be created - we are just interested in the side effect. try { theClass.newInsta...
static public void initializeClass(Class theClass) { // ***HACK*** We try to create an instance to force the VM to run the // class' static initializer. We don't care if the instance can't // be created - we are just interested in the side effect. try { theClass.newInsta...
protected void createEnhancedXMLReport() throws TaskException { // we need a classpath element if( classPath == null ) { throw new TaskException( "Need a 'classpath' element." ); } // and a valid one... S...
protected void createEnhancedXMLReport() throws TaskException { // we need a classpath element if( classPath == null ) { throw new TaskException( "Need a 'classpath' element." ); } // and a valid one... S...
public RuntimeConfigurable getWrapper() { return wrapper; }
public RuntimeConfigurable getWrapper() { return super.getWrapper(); }
public Url mapHandler(IRequestHandler requestHandler) { // TODO see if we can refactor this to remove dependency on instanceof checks below and // eliminate the need for IRequestHandlerDelegate if (requestHandler instanceof IRequestHandlerDelegate) { requestHandler = ((IRequestHandlerDelegate)requestHandle...
public Url mapHandler(IRequestHandler requestHandler) { // TODO see if we can refactor this to remove dependency on instanceof checks below and // eliminate the need for IRequestHandlerDelegate while (requestHandler instanceof IRequestHandlerDelegate) { requestHandler = ((IRequestHandlerDelegate)requestHan...
private void showAlert(Alert alert) { Display display = Display.getDisplay(this); display.setCurrent(alert, canvas); } void barcodeAction(ParsedResult result) { ParsedResultType type = result.getType(); if (type.equals(ParsedResultType.URI)) { String uri = ((URIParsedResult) result).getURI(...
private void showAlert(Alert alert) { Display display = Display.getDisplay(this); display.setCurrent(alert, canvas); } void barcodeAction(ParsedResult result) { ParsedResultType type = result.getType(); if (type.equals(ParsedResultType.URI)) { String uri = ((URIParsedResult) result).getURI(...
protected Object convertValue(String value) throws ConversionException { if(getConvertEmptyInputStringToNull() && Strings.isEmpty(value)) { return null; } return value; }
protected Object convertValue(String value) throws ConversionException { if(getConvertEmptyInputStringToNull() && Strings.isEmpty(value)) { return null; } return super.convertValue(value); }
public static void main(String[] args) { // Create a document. DocumentImpl document = new DocumentImpl(); document.setEncoding("utf-8"); // Create an element with a default namespace declaration. Element outerNode = document.createElement("outer"); ...
public static void main(String[] args) { // Create a document. DocumentImpl document = new DocumentImpl(); document.setXmlEncoding("utf-8"); // Create an element with a default namespace declaration. Element outerNode = document.createElement("outer"); ...
public String getInput() { String[] input = getInputAsArray(); if (input == null || input.length == 0) { return null; } else { return input[0]; }
public String getInput() { String[] input = getInputAsArray(); if (input == null || input.length == 0) { return null; } else { return input[0].trim(); }
protected void onEvent(AjaxRequestTarget target) { getForm().onFormSubmitted(); if (!getForm().hasError()) { onSubmit(target); } else { onError(target); } }
protected void onEvent(AjaxRequestTarget target) { getForm().onFormSubmitted(); if (!getForm().hasError()) { onSubmit(target); } if (getForm().hasError()) { onError(target); } }
protected void init() { getExceptionSettings().setThrowExceptionOnMissingResource(false); }
protected void init() { getResourceSettings().setThrowExceptionOnMissingResource(false); }
protected void init() { getExceptionSettings().setThrowExceptionOnMissingResource(false); // Chinese buttons Font font = new Font("SimSun", Font.BOLD, 16); DefaultButtonImageResource imgSave = new DefaultButtonImageResource("\u4FDD\u5B58"); imgSave.setFont(font); DefaultButtonImageResource imgReset = new...
protected void init() { getResourceSettings().setThrowExceptionOnMissingResource(false); // Chinese buttons Font font = new Font("SimSun", Font.BOLD, 16); DefaultButtonImageResource imgSave = new DefaultButtonImageResource("\u4FDD\u5B58"); imgSave.setFont(font); DefaultButtonImageResource imgReset = new ...
protected void init() { super.init(); // disable debugging mode, because it slows down the tree getAjaxSettings().setAjaxDebugModeEnabled(false); }
protected void init() { super.init(); // disable debugging mode, because it slows down the tree getDebugSettings().setAjaxDebugModeEnabled(false); }
public Browser (Composite parent, int style) { super (checkParent (parent), checkStyle (style)); String platform = SWT.getPlatform (); Display display = parent.getDisplay (); if ("gtk".equals (platform)) display.setData (NO_INPUT_METHOD, null); //$NON-NLS-1$ String className = null; if ((style & SWT.MOZILLA) != 0...
public Browser (Composite parent, int style) { super (checkParent (parent), style = checkStyle (style)); String platform = SWT.getPlatform (); Display display = parent.getDisplay (); if ("gtk".equals (platform)) display.setData (NO_INPUT_METHOD, null); //$NON-NLS-1$ String className = null; if ((style & SWT.MOZIL...
public void setResizable (boolean resizable) { checkWidget (); this.resizable = resizable; } void setSortDirection (int direction) { if (OS.COMCTL32_MAJOR >= 6) { int hwndHeader = parent.hwndHeader; if (hwndHeader != 0) { int index = parent.indexOf (this); if (index == -1) return; HDITEM hdItem = new H...
public void setResizable (boolean resizable) { checkWidget (); this.resizable = resizable; } void setSortDirection (int direction) { if (OS.COMCTL32_MAJOR >= 6) { int hwndHeader = parent.hwndHeader; if (hwndHeader != 0) { int index = parent.indexOf (this); if (index == -1) return; HDITEM hdItem = new H...
public void setImage (int index, Image image) { checkWidget(); if (image != null && image.isDisposed ()) { error(SWT.ERROR_INVALID_ARGUMENT); } if (index == 0) { if (image != null && image.type == SWT.ICON) { if (image.equals (this.image)) return; } super.setImage (image); } int count = Math.max (1, pa...
public void setImage (int index, Image image) { checkWidget(); if (image != null && image.isDisposed ()) { error(SWT.ERROR_INVALID_ARGUMENT); } if (index == 0) { if (image != null && image.type == SWT.ICON) { if (image.equals (this.image)) return; } super.setImage (image); } int count = Math.max (1, pa...
public static void main (String [] args) { Display display = new Display (); Shell shell = new Shell (display); FillLayout layout = new FillLayout(); layout.marginHeight = 10; layout.marginWidth = 10; shell.setLayout(layout); Table table = new Table (shell, SWT.BORDER | SWT.MULTI | SWT.NO_SCROLL); for...
public static void main (String [] args) { Display display = new Display (); Shell shell = new Shell (display); FillLayout layout = new FillLayout(); layout.marginHeight = 10; layout.marginWidth = 10; shell.setLayout(layout); Table table = new Table (shell, SWT.BORDER | SWT.NO_SCROLL); for (int i=0; i...
public void setJavac( Javac attributes ) { this.m_attributes = attributes; src = attributes.getSrcdir(); m_destDir = attributes.getDestdir(); m_encoding = attributes.getEncoding(); m_debug = attributes.getDebug(); m_optimize = attributes.getOptimize(); m_d...
public void setJavac( Javac attributes ) { m_attributes = attributes; src = attributes.getSrcdir(); m_destDir = attributes.getDestdir(); m_encoding = attributes.getEncoding(); m_debug = attributes.getDebug(); m_optimize = attributes.getOptimize(); m_deprec...
public ExpState initialize(Select sel, ExpContext ctx, Map contains) { Val val1 = getValue1(); if (contains != null && val1 instanceof PCPath) { PCPath sql = (PCPath) val1; String path = sql.getPath(); // update the count for this path Integer count =...
public ExpState initialize(Select sel, ExpContext ctx, Map contains) { Val val1 = getValue1(); if (contains != null && val1 instanceof PCPath) { PCPath sql = (PCPath) val1; String path = sql.getPCPathString(); // update the count for this path Integer...
public Class getType() { if (_exps != null) { if (_exps.projections.length == 0) return _candidate.getDescribedType(); if (_exps.projections.length == 1) return _exps.projections[0].getType(); } return _type; }
public Class getType() { if (_exps != null && _type == null) { if (_exps.projections.length == 0) return _candidate.getDescribedType(); if (_exps.projections.length == 1) return _exps.projections[0].getType(); } return _type; }