buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void configure(int errorAction) { stopTestBox.setSelected(errorAction == OnErrorTestElement.ON_ERROR_STOPTEST); stopThrdBox.setSelected(errorAction == OnErrorTestElement.ON_ERROR_STOPTHREAD); //continueBox.setSelected(etc);// no need to set the remaining Radio Button }
public void configure(int errorAction) { stopTestBox.setSelected(errorAction == OnErrorTestElement.ON_ERROR_STOPTEST); stopThrdBox.setSelected(errorAction == OnErrorTestElement.ON_ERROR_STOPTHREAD); continueBox.setSelected(errorAction == OnErrorTestElement.ON_ERROR_CONTINUE); }
public void testLongLine() throws IOException, ManifestException { Project p = getProject(); p.setUserProperty("test.longline", LONG_LINE); p.setUserProperty("test.long68name" , LONG_68_NAME); p.setUserProperty("test.long70name" , LONG_70_NAME); p.setUserProperty("test.notlon...
public void testLongLine() throws IOException, ManifestException { Project p = getProject(); p.setUserProperty("test.longline", LONG_LINE); p.setUserProperty("test.long68name" , LONG_68_NAME); p.setUserProperty("test.long70name" , LONG_70_NAME); p.setUserProperty("test.notlon...
public void create (Composite parent, int style) { String className = "SWTWebViewDelegate"; //$NON-NLS-1$ if (OS.objc_lookUpClass(className) == 0) { Class safariClass = this.getClass(); Callback3 = new Callback(safariClass, "browserProc", 3); //$NON-NLS-1$ int /*long*/ proc3 = Callback3.getAddress(); if (proc...
public void create (Composite parent, int style) { String className = "SWTWebViewDelegate"; //$NON-NLS-1$ if (OS.objc_lookUpClass(className) == 0) { Class safariClass = this.getClass(); Callback3 = new Callback(safariClass, "browserProc", 3); //$NON-NLS-1$ int /*long*/ proc3 = Callback3.getAddress(); if (proc...
public SampleResult sample(Entry entry) { Arguments args = getArguments(); args.addArgument(TestElement.NAME, getName()); // Allow Sampler access // to test element name context = new JavaSamplerContext(args); if (javaClient == ...
public SampleResult sample(Entry entry) { Arguments args = getArguments(); args.addArgument(TestElement.NAME, getName()); // Allow Sampler access // to test element name context = new JavaSamplerContext(args); if (javaClient == ...
protected void traverseLocal(XSParticleDecl particle, Element elmDecl, XSDocumentInfo schemaDoc, SchemaGrammar grammar, int allContextFlags) { // General Attribute Checking Object[] attrValues = fAttrChecke...
protected void traverseLocal(XSParticleDecl particle, Element elmDecl, XSDocumentInfo schemaDoc, SchemaGrammar grammar, int allContextFlags) { // General Attribute Checking Object[] attrValues = fAttrChecke...
"Unicode", "UnicodeBig", "UnicodeLittle", "GB2312", "UTF8", "UTF-16", /* * Copyright 1999-2002,2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * ...
"Unicode", "UnicodeBig", "UnicodeLittle", "GB2312", "UTF8", "UTF-16", /* * Copyright 1999-2002,2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * ...
public SavePropertyDialog(Frame owner, String title, boolean modal, SampleSaveConfiguration s) // throws HeadlessException { super(owner, title, modal); saveConfig = s; log.info("SampleSaveConfiguration = " + saveConfig);// $NON-NLS-1$ dialogInit(); }
public SavePropertyDialog(Frame owner, String title, boolean modal, SampleSaveConfiguration s) // throws HeadlessException { super(owner, title, modal); saveConfig = s; log.debug("SampleSaveConfiguration = " + saveConfig);// $NON-NLS-1$ dialogInit(); }
protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData date) { return factory.newXMLGregorianCalendar(date.unNormYear, date.unNormMonth, date.unNormDay, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, Dat...
protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData date) { return datatypeFactory.newXMLGregorianCalendar(date.unNormYear, date.unNormMonth, date.unNormDay, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFIN...
protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData date) { return factory.newXMLGregorianCalendar(BigInteger.valueOf(date.unNormYear), date.unNormMonth, date.unNormDay, date.unNormHour, date.unNormMinute, (int)date.unNormSecond, date.unNormSecond != 0 ? get...
protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData date) { return datatypeFactory.newXMLGregorianCalendar(BigInteger.valueOf(date.unNormYear), date.unNormMonth, date.unNormDay, date.unNormHour, date.unNormMinute, (int)date.unNormSecond, date.unNormSecond != ...
protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData date) { return factory.newXMLGregorianCalendar(DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, date.unNormDay, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, Dat...
protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData date) { return datatypeFactory.newXMLGregorianCalendar(DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, date.unNormDay, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, ...
protected Duration getDuration(DateTimeData date) { int sign = 1; if (date.day<0 || date.hour<0 || date.minute<0 || date.second<0) { sign = -1; } return factory.newDuration(sign == 1, null, null, date.day != DatatypeConstants.FIELD_UNDEFINED?BigInteger.va...
protected Duration getDuration(DateTimeData date) { int sign = 1; if (date.day<0 || date.hour<0 || date.minute<0 || date.second<0) { sign = -1; } return datatypeFactory.newDuration(sign == 1, null, null, date.day != DatatypeConstants.FIELD_UNDEFINED?BigInt...
protected Duration getDuration(DateTimeData date) { int sign = 1; if ( date.year<0 || date.month<0 || date.day<0 || date.hour<0 || date.minute<0 || date.second<0) { sign = -1; } return factory.newDuration(sign == 1, date.year != DatatypeCo...
protected Duration getDuration(DateTimeData date) { int sign = 1; if ( date.year<0 || date.month<0 || date.day<0 || date.hour<0 || date.minute<0 || date.second<0) { sign = -1; } return datatypeFactory.newDuration(sign == 1, date.year != Dat...
protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData date) { return factory.newXMLGregorianCalendar(DatatypeConstants.FIELD_UNDEFINED, date.unNormMonth, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, D...
protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData date) { return datatypeFactory.newXMLGregorianCalendar(DatatypeConstants.FIELD_UNDEFINED, date.unNormMonth, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, ...
protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData date) { return factory.newXMLGregorianCalendar(DatatypeConstants.FIELD_UNDEFINED, date.unNormMonth, date.unNormDay, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FI...
protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData date) { return datatypeFactory.newXMLGregorianCalendar(DatatypeConstants.FIELD_UNDEFINED, date.unNormMonth, date.unNormDay, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConst...
protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData date) { return factory.newXMLGregorianCalendar(null, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, date.unNormHour, date.unNormMinute, (int)date.unNormSecond, date.unNormSecond != 0 ...
protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData date) { return datatypeFactory.newXMLGregorianCalendar(null, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, date.unNormHour, date.unNormMinute, (int)date.unNormSecond, date.unNormSecon...
protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData date) { return factory.newXMLGregorianCalendar(date.unNormYear, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, Da...
protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData date) { return datatypeFactory.newXMLGregorianCalendar(date.unNormYear, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, ...
protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData date) { return factory.newXMLGregorianCalendar(date.unNormYear, date.unNormMonth, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.F...
protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData date) { return datatypeFactory.newXMLGregorianCalendar(date.unNormYear, date.unNormMonth, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeCons...
protected Duration getDuration(DateTimeData date) { int sign = 1; if ( date.year<0 || date.month<0) { sign = -1; } return factory.newDuration(sign == 1, date.year != DatatypeConstants.FIELD_UNDEFINED?BigInteger.valueOf(sign*date.year):null, ...
protected Duration getDuration(DateTimeData date) { int sign = 1; if ( date.year<0 || date.month<0) { sign = -1; } return datatypeFactory.newDuration(sign == 1, date.year != DatatypeConstants.FIELD_UNDEFINED?BigInteger.valueOf(sign*date.year):null, ...
public Rectangle getBounds (int index) { checkWidget(); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); int itemIndex = parent.indexOf (this); if (itemIndex == -1) return new Rectangle (0, 0, 0, 0); RECT rect = getBounds (itemIndex, index, true, true, true); int width = rect.right - rect.le...
public Rectangle getBounds (int index) { checkWidget(); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); int itemIndex = parent.indexOf (this); if (itemIndex == -1) return new Rectangle (0, 0, 0, 0); RECT rect = getBounds (itemIndex, index, true, true, true); int width = rect.right - rect.le...
private FaceletTag createFaceletTag(final String uri, final TagDefn tagDefn) { final String tagName = tagDefn.getName(); final TagIdentifier tagId = TagIdentifierFactory.createJSPTagWrapper( uri, tagName); final IAttributeAdvisor advisor = new MetadataAttributeAdvisor(ta...
private FaceletTag createFaceletTag(final String uri, final TagDefn tagDefn) { final String tagName = tagDefn.getName(); final TagIdentifier tagId = TagIdentifierFactory.createJSPTagWrapper( uri, tagName); final IAttributeAdvisor advisor = new MetadataAttributeAdvisor(ta...
private void performAction(final ActionEvent e) { try { GuiPackage.getInstance().updateCurrentNode(); Set commandObjects = (Set) commands.get(e.getActionCommand()); Iterator iter = commandObjects.iterator(); while (iter.hasNext()) { try { Command c = (Command) iter.next(); preActionPerforme...
private void performAction(final ActionEvent e) { try { GuiPackage.getInstance().updateCurrentGui(); Set commandObjects = (Set) commands.get(e.getActionCommand()); Iterator iter = commandObjects.iterator(); while (iter.hasNext()) { try { Command c = (Command) iter.next(); preActionPerformed...
public File getFile() { return file; }
public Object getAdapter(Class adapter) { return null; } File getFile() { return file; }
public void copy () { checkWidget (); short [] selection = new short [2]; if (OS.GetControlData (textHandle, (short)OS.kControlEntireControl, OS.kControlEditTextSelectionTag, 4, selection, null) != OS.noErr) return; if (selection [0] == selection [1]) return; int [] actualSize = new int [1]; int [] ptr = new int ...
public void copy () { checkWidget (); short [] selection = new short [2]; if (OS.GetControlData (textHandle, (short)OS.kControlEntireControl, OS.kControlEditTextSelectionTag, 4, selection, null) != OS.noErr) return; if (selection [0] == selection [1]) return; int [] actualSize = new int [1]; int [] ptr = new int ...
public FileEditor() { // Create a button to trigger the file chooser: JButton button = new JButton("Browse..."); button.addActionListener(this); // Get a WrapperEditor to provide the field or combo -- we'll delegate // most methods to it: editor = new WrapperEditor(this, new SimpleFileEditor(), new ComboS...
public FileEditor() { // Create a button to trigger the file chooser: JButton button = new JButton("Browse..."); button.addActionListener(this); // Get a WrapperEditor to provide the field or combo -- we'll delegate // most methods to it: editor = new WrapperEditor(this, new SimpleFileEditor(), new ComboS...
package wicket.authorization.strategies.role.annotations; /* * $Id$ $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obt...
package wicket.authorization.strategies.role.annotations; /* * $Id$ $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obt...
package wicket.authorization.strategies.role.annotations; /* * $Id$ $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obt...
package wicket.authorization.strategies.role.annotations; /* * $Id$ $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obt...
public void onFormComponent(final FormComponent<?> formComponent) { // Component must implement persister interface and // persistence for that component must be enabled. // Else ignore the persisted value. It'll be deleted // once the user submits the Form containing that FormComponent. // No...
public void onFormComponent(final FormComponent<?> formComponent) { // Component must implement persister interface and // persistence for that component must be enabled. // Else ignore the persisted value. It'll be deleted // once the user submits the Form containing that FormComponent. // No...
protected Reader createReader(InputStream inputStream, String encoding) throws IOException { // normalize encoding name if (encoding == null) { encoding = "UTF-8"; } // try to use an optimized reader String ENCODING = encoding.toUpperCase(); if (...
protected Reader createReader(InputStream inputStream, String encoding) throws IOException { // normalize encoding name if (encoding == null) { encoding = "UTF-8"; } // try to use an optimized reader String ENCODING = encoding.toUpperCase(); if (...
public boolean evaluate( final TaskContext context ) throws TaskException { if( m_classname == null ) { throw new TaskException( "Classname not specified." ); } // Build the classloader to use to check resources final ClassLoader classLoader = buildCl...
public boolean evaluate( final TaskContext context ) throws TaskException { if( m_classname == null ) { throw new TaskException( "Classname not specified." ); } // Build the classloader to use to check resources final ClassLoader classLoader = buildCl...
public boolean evaluate( final TaskContext context ) throws TaskException { if( m_resource == null ) { throw new TaskException( "Resource was not specified." ); } // Check whether the resource is available final ClassLoader classLoader = buildClassLoa...
public boolean evaluate( final TaskContext context ) throws TaskException { if( m_resource == null ) { throw new TaskException( "Resource was not specified." ); } // Check whether the resource is available final ClassLoader classLoader = buildClassLoa...
private void initValidator() throws TaskException { try { // load the parser class // with JAXP, we would use a SAXParser factory Class readerClass = null; if( m_classpath != null ) { final URL[] urls = PathUtil....
private void initValidator() throws TaskException { try { // load the parser class // with JAXP, we would use a SAXParser factory Class readerClass = null; if( m_classpath != null ) { final URL[] urls = PathUtil....
protected IServiceInfo createServiceInfoForDiscovery(EndpointDescription endpointDescription) { return serviceInfoFactory.createServiceInfoForDiscovery(discoveryAdvertiser, endpointDescription); }
protected IServiceInfo createServiceInfoForDiscovery(EndpointDescription endpointDescription) { return serviceInfoFactory.createServiceInfo(discoveryAdvertiser, endpointDescription); }
private void traverseComplexContent(Element complexContentElement, boolean mixedOnType, XSDocumentInfo schemaDoc, SchemaGrammar grammar) throws ComplexTypeRecoverableError { Object[] complexContentAttrValues = fAttrChecker.checkAttributes(complexContentElement, ...
private void traverseComplexContent(Element complexContentElement, boolean mixedOnType, XSDocumentInfo schemaDoc, SchemaGrammar grammar) throws ComplexTypeRecoverableError { Object[] complexContentAttrValues = fAttrChecker.checkAttributes(complexContentElement, ...
public void setUp() { // Disable tests for any DB that has supportsSelectForUpdate==false, like HSQLDictionary OpenJPAEntityManagerFactorySPI tempEMF = emf; if (tempEMF == null) { tempEMF = createEMF(); } assertNotNull(tempEMF); DBDictionary dict = ((JDBCC...
public void setUp() { // Disable tests for any DB that has supportsSelectForUpdate==false, like HSQLDictionary OpenJPAEntityManagerFactorySPI tempEMF = emf; if (tempEMF == null) { tempEMF = createEMF(); } assertNotNull(tempEMF); DBDictionary dict = ((JDBCC...
List getAttributeNames(Request request); /* * $Id: ISessionStore.java 3777 2006-01-14 14:49:01 -0800 (Sat, 14 Jan 2006) * jonathanlocke $ $Revision: 3777 $ $Date: 2006-01-14 14:49:01 -0800 (Sat, 14 * Jan 2006) $ * * ============================================================================== * Licensed under ...
List getAttributeNames(Request request); /* * $Id: ISessionStore.java 3777 2006-01-14 14:49:01 -0800 (Sat, 14 Jan 2006) * jonathanlocke $ $Revision: 3777 $ $Date: 2006-01-14 14:49:01 -0800 (Sat, 14 * Jan 2006) $ * * ============================================================================== * Licensed under ...
public synchronized ICrypt newCrypt() { if(crypt == null) { Class cryptClass = getSettings().getCryptClass(); try { crypt = (ICrypt)cryptClass.newInstance(); log.info("using encryption/decryption object " + crypt); crypt.setKey(getSettings().getEncryptionKey()); return crypt; } catc...
public synchronized ICrypt newCrypt() { if(crypt == null) { Class cryptClass = getSettings().getCryptClass(); try { crypt = (ICrypt)cryptClass.newInstance(); log.info("using encryption/decryption object " + crypt); crypt.setKey(getSettings().getEncryptionKey()); return crypt; } catc...
public void sampleOccurred(SampleEvent e) { SampleResult result = e.getResult(); if (!isErrorLogging() || !result.isSuccessful()) { sendToVisualizer(result); if ( out != null) {// no point otherwise SampleSaveConfiguration config = getSaveConfig(); result.setSaveConfig(config); try { if (co...
public void sampleOccurred(SampleEvent e) { SampleResult result = e.getResult(); if (!isErrorLogging() || !result.isSuccessful()) { sendToVisualizer(result); if ( out != null) {// no point otherwise SampleSaveConfiguration config = getSaveConfig(); result.setSaveConfig(config); try { if (co...
public void testSendFormData_Urlencoded() throws IOException { String titleValue = "mytitle"; String descriptionValue = "mydescription"; setupFormData(sampler, titleValue, descriptionValue); // Test sending data with default encoding String contentEncoding = ""; samp...
public void testSendFormData_Urlencoded() throws IOException { String titleValue = "mytitle"; String descriptionValue = "mydescription"; setupFormData(sampler, titleValue, descriptionValue); // Test sending data with default encoding String contentEncoding = ""; samp...
private static int checkStyle (int style) { style |= SWT.NO_FOCUS; return (style | SWT.NO_REDRAW_RESIZE) & ~(SWT.V_SCROLL | SWT.H_SCROLL); }
public void handleEvent(Event event) { switch (event.type) { case SWT.Dispose: onDispose(event); break; case SWT.MouseDown: onMouseDown(event); break; case SWT.MouseExit: onMouseExit(); break; case SWT.MouseMove: onMouseMove(event); break; case SWT.Mouse...
public void messageLogged(BuildEvent event) { Element messageElement = doc.createElement(MESSAGE_TAG); String name = "debug"; switch(event.getPriority()) { case Project.MSG_ERR: name = "error"; break; case Project.MSG_WARN: name = "warn"; break; case Proj...
public void messageLogged(BuildEvent event) { Element messageElement = doc.createElement(MESSAGE_TAG); String name = "debug"; switch(event.getPriority()) { case Project.MSG_ERR: name = "error"; break; case Project.MSG_WARN: name = "warn"; break; case Proj...
public boolean execute() throws BuildException { getRmic().log("Using WebLogic rmic", Project.MSG_VERBOSE); Commandline cmd = setupRmicCommand(new String[] {"-noexit"}); try { // Create an instance of the rmic Class c = Class.forName("weblogic.rmic"); Met...
public boolean execute() throws BuildException { getRmic().log("Using WebLogic rmic", Project.MSG_VERBOSE); Commandline cmd = setupRmicCommand(new String[] {"-noexit"}); try { // Create an instance of the rmic Class c = Class.forName("weblogic.rmic"); Met...
public void run() { try { if (LineChatView.isDisposed()) showView(); LineChatView.setViewName("Collaborations: "+localUser.getNickname()); localGUI = LineChatView.createClientView( EclipseCollabSharedObject.this, pn, init, getLocalFullDownloadPath()); show(true); } catc...
public void run() { try { if (LineChatView.isDisposed()) showView(); LineChatView.setViewName("Collaboration: "+localUser.getNickname()); localGUI = LineChatView.createClientView( EclipseCollabSharedObject.this, pn, init, getLocalFullDownloadPath()); show(true); } catch...
protected void makeUnique(DefaultMutableTreeNode node) { Object userObject = node.getUserObject(); if(!(userObject instanceof Serializable)) { throw new IllegalArgumentException( "user objects of tree nodes must be serializable"); } else if(userObject instanceof IdWrappedU...
protected void makeUnique(DefaultMutableTreeNode node) { Object userObject = node.getUserObject(); if(!(userObject instanceof Serializable)) { throw new IllegalArgumentException( "user objects of tree nodes must be serializable"); } else if(userObject instanceof IdWrappedU...
public void setTopIndex (int index) { checkWidget (); NSTableView widget = (NSTableView) view; int row = Math.max(0, Math.min(index, itemCount)); NSPoint pt = new NSPoint(); pt.x = scrollView.contentView().bounds().x; pt.y = (widget.rowHeight () + widget.intercellSpacing().height) * row; view.scrollPoint(pt); }
public void setTopIndex (int index) { checkWidget (); NSTableView widget = (NSTableView) view; int row = Math.max(0, Math.min(index, itemCount)); NSPoint pt = new NSPoint(); pt.x = scrollView.contentView().bounds().x; pt.y = widget.frameOfCellAtColumn(0, row).y; view.scrollPoint(pt); }
public void setTopItem (TreeItem item) { checkWidget(); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); checkItems (); showItem (item, false); NSOutlineView widget = (NSOutlineView) view; int /*long*/ row = widget.rowForItem (item.handle); if (row =...
public void setTopItem (TreeItem item) { checkWidget(); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); checkItems (); showItem (item, false); NSOutlineView widget = (NSOutlineView) view; int /*long*/ row = widget.rowForItem (item.handle); if (row =...
public final RequestCycle getRequestCycle() { return getSession().getRequestCycle(); }
public final RequestCycle getRequestCycle() { return RequestCycle.get(); }
private final boolean mayTrackChangesFor(final Component component) { // Auto components do not participate in versioning since they are // added during the rendering phase (which is normally illegal). if (component.isAuto() && (!component.isVersioned())) { return false; } else { // the component ...
private final boolean mayTrackChangesFor(final Component component) { // Auto components do not participate in versioning since they are // added during the rendering phase (which is normally illegal). if (component.isAuto() || (!component.isVersioned())) { return false; } else { // the component ...
public void setUp() { super.setUp(DROP_TABLES, Person.class, Address.class); }
public void setUp() { super.setUp(Person.class, Address.class, CLEAR_TABLES); }
public void add(ResourceCollection c) { rc = (rc == null) ? new Resources() : rc; rc.add(c); }
public void add(ResourceCollection c) { rc = rc == null ? new Resources() : rc; rc.add(c); }
public void doAction(ActionEvent ev) { try { String className = ev.getActionCommand().substring(4).replace('/', '.'); UIManager.setLookAndFeel(className); SwingUtilities.updateComponentTreeUI(GuiPackage.getInstance().getMainFrame()); } catch (javax.swing.Unsupport...
public void doAction(ActionEvent ev) { try { String className = ev.getActionCommand().substring(ActionNames.LAF_PREFIX.length()).replace('/', '.'); UIManager.setLookAndFeel(className); SwingUtilities.updateComponentTreeUI(GuiPackage.getInstance().getMainFrame()); ...
public void registerType( final String role, final String shorthandName, final ComponentFactory factory ) throws Exception
public void registerType( final String role, final String shorthandName, final TypeFactory factory ) throws Exception
void registerType( String role, String shorthandName, TypeFactory factory ) /* * 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...
void registerType( String role, String shorthandName, TypeFactory factory ) /* * 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...
public Object getObject(Component component) { String url = getPage().urlFor(resourceReference.getPath()); return url; }; }; add(new AttributeModifier("src", true, srcReplacement)); } }
public Object getObject(Component component) { String url = getPage().urlFor(resourceReference); return url; }; }; add(new AttributeModifier("src", true, srcReplacement)); } }
protected Resource newResource() { // Create JAR resource final JarResourceFactory factory = new JarResourceFactory(); factory.addClassClosures(classes); return factory.getResource(); } }; String servletPath = ((ServletWebRequest)getRequest()).getServletPath(); tag.put("codebase", servle...
protected Resource newResource() { // Create JAR resource final JarResourceFactory factory = new JarResourceFactory(); factory.addClassClosures(classes); return factory.getResource(); } }; String servletPath = ((ServletWebRequest)getRequest()).getServletPath(); tag.put("codebase", servle...
public <Y> Selection<Y> select(Class<Y> result, Selection<?>... selections) { throw new AbstractMethodError(); }
public <Y> Selection<Y> select(Class<Y> result, Selection<?>... selections) { return new SelectionImpl(result).setSelections(selections); }
protected ValueMap getParameters() { if (parameters == null) { setParameters(RequestCycle.get().getRequest().getParameterMap()); } return (ValueMap)parameters.get(); }
protected ValueMap getParameters() { if (parameters.get() == null) { setParameters(RequestCycle.get().getRequest().getParameterMap()); } return (ValueMap)parameters.get(); }
protected void appendOptionHtml(final AppendingStringBuffer buffer, final T choice, int index, final String selected) { Object displayValue = getChoiceRenderer().getDisplayValue(choice); Class<?> objectClass = displayValue == null ? null : displayValue.getClass(); // Get label for choice String label = ""; ...
protected void appendOptionHtml(final AppendingStringBuffer buffer, final T choice, int index, final String selected) { Object displayValue = getChoiceRenderer().getDisplayValue(choice); Class<?> objectClass = displayValue == null ? null : displayValue.getClass(); // Get label for choice String label = ""; ...
public void pack () { checkWidget (); int index = parent.indexOf (this); if (index == -1) return; int columnWidth = 0; int hwnd = parent.handle; int hDC = OS.GetDC (hwnd); int oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0); if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont); int cp =...
public void pack () { checkWidget (); int index = parent.indexOf (this); if (index == -1) return; int columnWidth = 0; int hwnd = parent.handle; int hDC = OS.GetDC (hwnd); int oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0); if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont); int cp =...
public void setLastModifiedTime(Time time) { if (time != null) { // If time is set also set cache headers. httpServletResponse.setDateHeader("Expires", System.currentTimeMillis() + (3600 * 1000)); httpServletResponse.setHeader("Cache-Control", "max-age=" + 3600); httpServletResponse.setDateHeader("Las...
public void setLastModifiedTime(Time time) { if (time != null && time.getMilliseconds() != -1) { // If time is set also set cache headers. httpServletResponse.setDateHeader("Expires", System.currentTimeMillis() + (3600 * 1000)); httpServletResponse.setHeader("Cache-Control", "max-age=" + 3600); httpSe...
public String getClientId() { return getPropertyAsString(CLIENT_ID); }
public String getClientId() { return getPropertyAsString(CLIENT_ID, CLIENT_ID_DEFAULT); }
private void buildFunctionCompletions(MethodDeclaration[] decls, String prefix) { if (decls == null) { return; } for (int i = 0; i < decls.length; i++) { MethodDeclaration decl = decls[i]; String name = decl.getName(); if (prefix != null) { ...
private void buildFunctionCompletions(MethodDeclaration[] decls, String prefix) { if (decls == null) { return; } for (int i = 0; i < decls.length; i++) { MethodDeclaration decl = decls[i]; String name = decl.getName(); if (prefix != null) { ...
protected void init() { super.init(); getRequestCycleSettings().setGatherExtendedBrowserInfo(true); mountBookmarkablePage("howdy", HelloBrowser.class); }
protected void init() { super.init(); getRequestCycleSettings().setGatherExtendedBrowserInfo(true); mountPage("howdy", HelloBrowser.class); }
protected void init() { super.init(); mountBookmarkablePage("/home", Home.class); getSharedResources().add("cancelButton", new DefaultButtonImageResource("Cancel")); // log host name and server time in the browser's status bar getRequestCycleSettings().addResponseFilter(new ServerHostNameAndTimeFilter());...
protected void init() { super.init(); mountPage("/home", Home.class); getSharedResources().add("cancelButton", new DefaultButtonImageResource("Cancel")); // log host name and server time in the browser's status bar getRequestCycleSettings().addResponseFilter(new ServerHostNameAndTimeFilter()); }
public void testWithMountedLoginPage() { tester.getApplication().mountBookmarkablePage("/login", LoginPage.class); tester.startPage(ProtectedPage.class); tester.assertRenderedPage(LoginPage.class); }
public void testWithMountedLoginPage() { tester.getApplication().mountPage("/login", LoginPage.class); tester.startPage(ProtectedPage.class); tester.assertRenderedPage(LoginPage.class); }
public void testUmlautsInRequestUri() { application.mountBookmarkablePage("Aparameter", A.class); testDefault(); }
public void testUmlautsInRequestUri() { application.mountPage("Aparameter", A.class); testDefault(); }
public Set getActionNames(); }
public Set<String> getActionNames(); }
protected Collection normalizeList(Collection coll) { Iterator iter = coll.iterator(); Collection newColl = null; while (iter.hasNext()) { Object item = iter.next(); if (newColl == null) { try { newColl = (Collection) coll.getClass(...
protected Collection normalizeList(Collection coll) { Iterator iter = coll.iterator(); Collection newColl = null; while (iter.hasNext()) { Object item = iter.next(); if (newColl == null) { try { newColl = coll.getClass().newInstance...
+ ": public ".length(), declaration.indexOf(" {")); } // parse methods and constants declarations starting at the current index // out: // .String body - contains the corresponding java content // .n - set to the end of the interface body declaration ( line with the enclosing "};" ) // .nMethods - set to ...
+ ": public ".length(), declaration.indexOf(" {")); } // parse methods and constants declarations starting at the current index // out: // .String body - contains the corresponding java content // .n - set to the end of the interface body declaration ( line with the enclosing "};" ) // .nMethods - set to ...
public static void main(String[] args) throws Exception { List<String> gets = Arrays.asList(new String[] { "/app1/wicket/bookmarkable/org.apache.wicket.threadtest.apps.app1.Home" }); SimpleGetCommand getCmd = new SimpleGetCommand(gets, 5); // getCmd.setPrintResponse(true); Tester tester = new Tester(getCmd...
public static void main(String[] args) throws Exception { List<String> gets = Arrays.asList("/app1/wicket/bookmarkable/org.apache.wicket.threadtest.apps.app1.Home"); SimpleGetCommand getCmd = new SimpleGetCommand(gets, 5); // getCmd.setPrintResponse(true); Tester tester = new Tester(getCmd, 100, false); ...
public static void main(String[] args) throws Exception { List<String> gets = Arrays.asList(new String[] { "/app2/wicket/bookmarkable/org.apache.wicket.threadtest.apps.app2.Home" }); SimpleGetCommand getCmd = new SimpleGetCommand(gets, 5); // getCmd.setPrintResponse(true); // AS OF OCTOBER 9 2006, THIS TY...
public static void main(String[] args) throws Exception { List<String> gets = Arrays.asList("/app2/wicket/bookmarkable/org.apache.wicket.threadtest.apps.app2.Home"); SimpleGetCommand getCmd = new SimpleGetCommand(gets, 5); // getCmd.setPrintResponse(true); // AS OF OCTOBER 9 2006, THIS TYPICALLY RESULTS I...
public SimpleGetCommand(String url, int iterations) { super(Arrays.asList(new String[] { url }), iterations); }
public SimpleGetCommand(String url, int iterations) { super(Arrays.asList(url), iterations); }
public Tester(Command command, int numberOfThreads, boolean multipleSessions) { this(Arrays.asList(new Command[] { command }), numberOfThreads, multipleSessions); }
public Tester(Command command, int numberOfThreads, boolean multipleSessions) { this(Arrays.asList(command), numberOfThreads, multipleSessions); }
public void test_1() throws Exception { WicketTester tester = new WicketTester(); tester.startPage(GuestBook.class); tester.assertContains("Wicket Examples - guestbook"); // check if the list of comments is empty tester.assertListView("comments", new ArrayList<Comment>()); tester.assertComponent("commen...
public void test_1() throws Exception { WicketTester tester = new WicketTester(); tester.startPage(GuestBook.class); tester.assertContains("Wicket Examples - guestbook"); // check if the list of comments is empty tester.assertListView("comments", new ArrayList<Comment>()); tester.assertComponent("commen...
public final BreadCrumbPanel create(String componentId, IBreadCrumbModel breadCrumbModel) { Constructor<? extends BreadCrumbPanel> ctor = getConstructor(); try { return ctor.newInstance(new Object[] { componentId, breadCrumbModel }); } catch (Exception e) { throw new RuntimeException(e); } }
public final BreadCrumbPanel create(String componentId, IBreadCrumbModel breadCrumbModel) { Constructor<? extends BreadCrumbPanel> ctor = getConstructor(); try { return ctor.newInstance(componentId, breadCrumbModel); } catch (Exception e) { throw new RuntimeException(e); } }
public java.util.Properties loadJavaProperties(final InputStream in) throws IOException { if (load == null) { return null; } java.util.Properties properties = new java.util.Properties(); Reader reader = new InputStreamReader(in, encoding); try { load.invoke(properties, new Object[] { reader }); ...
public java.util.Properties loadJavaProperties(final InputStream in) throws IOException { if (load == null) { return null; } java.util.Properties properties = new java.util.Properties(); Reader reader = new InputStreamReader(in, encoding); try { load.invoke(properties, reader); } catch (Ille...
public CheckGroupTestPage2() { super(Arrays.asList(new String[] { "check1" })); }
public CheckGroupTestPage2() { super(Arrays.asList("check1")); }
public CheckGroupTestPage3() { super(Arrays.asList(new String[] { "check2" })); }
public CheckGroupTestPage3() { super(Arrays.asList("check2")); }
public CheckGroupTestPage4() { super(Arrays.asList(new String[] { "check1", "check2" })); }
public CheckGroupTestPage4() { super(Arrays.asList("check1", "check2")); }
public void testRenderMyPage() { // start and render the test page tester.startPage(HomePage.class); // assert rendered page class tester.assertRenderedPage(HomePage.class); FormTester formTester = tester.newFormTester("bookingForm"); formTester.submit(); tester.assertErrorMessages(new String[] { "Na...
public void testRenderMyPage() { // start and render the test page tester.startPage(HomePage.class); // assert rendered page class tester.assertRenderedPage(HomePage.class); FormTester formTester = tester.newFormTester("bookingForm"); formTester.submit(); tester.assertErrorMessages("Name is required"...
public WicketPortletSession getSession(final WicketPortletRequest request) { ISessionStore sessionStore = getSessionStore(); Session session = sessionStore.lookup(request); if (session == null) { // Create session using session factory session = getSessionFactory().newSession(); // Set the client L...
public WicketPortletSession getSession(final WicketPortletRequest request) { ISessionStore sessionStore = getSessionStore(); Session session = sessionStore.lookup(request); if (session == null) { // Create session using session factory session = getSessionFactory().newSession(request); // Set the c...
protected ValueMap getParameters() { if (parameters.get() == null) { return new ValueMap(RequestCycle.get() .getRequest() .getRequestParameters() .getParameters()); } return (ValueMap)parameters.get(); }
protected ValueMap getParameters() { if (parameters.get() == null) { return new ValueMap(RequestCycle.get() .getRequest() .getObsoleteRequestParameters() .getParameters()); } return (ValueMap)parameters.get(); }
import org.apache.wicket.Request; /* * 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, Versi...
import org.apache.wicket.Request; /* * 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, Versi...
IRequestTarget targetForRequest(ObsoleteRequestParameters requestParameters); /* * 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...
IRequestTarget targetForRequest(ObsoleteRequestParameters requestParameters); /* * 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...
public void actionPerformed(ActionEvent e) { StringBuffer functionCall = new StringBuffer("${"); functionCall.append(functionList.getText()); Arguments args = (Arguments) parameterPanel.createTestElement(); if (args.getArguments().size() > 0) { functionCall.ap...
public void actionPerformed(ActionEvent e) { StringBuffer functionCall = new StringBuffer("${"); functionCall.append(functionList.getText()); Arguments args = (Arguments) parameterPanel.createTestElement(); if (args.getArguments().size() > 0) { functionCall.ap...
private static List getClasspathMatches(String[] strPathsOrJars) { ArrayList listPaths = null; StringTokenizer stPaths = null; String strPath = null; int i; listPaths = new ArrayList(); log.debug("Classpath = " + System.getProperty("java.class.path")); stP...
private static List getClasspathMatches(String[] strPathsOrJars) { ArrayList listPaths = null; StringTokenizer stPaths = null; String strPath = null; int i; listPaths = new ArrayList(); log.debug("Classpath = " + System.getProperty("java.class.path")); stP...
public void configure(TestElement el) { setName(el.getPropertyAsString(TestElement.NAME)); argsPanel.configure( (TestElement) el .getProperty(HTTPSamplerBase.ARGUMENTS) .getObjectValue()); domain.setText(el.getPropertyAsString(HTTPSamplerBase.D...
public void configure(TestElement el) { setName(el.getPropertyAsString(TestElement.NAME)); argsPanel.configure( (TestElement) el .getProperty(HTTPSamplerBase.ARGUMENTS) .getObjectValue()); domain.setText(el.getPropertyAsString(HTTPSamplerBase.D...
public String[] split(String splittee, String splitChar, String def) { if (splittee == null || splitChar == null) return new String[0]; StringTokenizer tokens; String temp; int spot; while ((spot = splittee.indexOf(splitChar + splitChar)) != -1) sp...
public String[] split(String splittee, String splitChar, String def) { if (splittee == null || splitChar == null) return new String[0]; StringTokenizer tokens; String temp; int spot; while ((spot = splittee.indexOf(splitChar + splitChar)) != -1) sp...
public void configureFromWSDL() { if (HELPER.getBinding() != null) { this.urlField.setText(HELPER.getBinding()); } else { StringBuffer buf = new StringBuffer(); buf.append("http://" + HELPER.getURL().getHost()); if (HELPER.g...
public void configureFromWSDL() { if (HELPER.getBinding() != null) { this.urlField.setText(HELPER.getBinding()); } else { StringBuffer buf = new StringBuffer(); buf.append("http://" + HELPER.getURL().getHost()); if (HELPER.g...
public void sendPostData(URLConnection connection, HTTPSampler sampler) throws IOException { // If filename was specified then send the post using multipart syntax String filename = sampler.getFilename(); if ((filename != null) && (filename.trim().length() > 0)) { ...
public void sendPostData(URLConnection connection, HTTPSampler sampler) throws IOException { // If filename was specified then send the post using multipart syntax String filename = sampler.getFilename(); if ((filename != null) && (filename.trim().length() > 0)) { ...
public String cleanURL(String entry) { String url = entry; // if the string contains atleast one double // quote and checkMethod is true, go ahead // and tokenize the string. if (entry.indexOf("\"") > -1 && checkMethod(entry)) { StringTokenizer tokens ...
public String cleanURL(String entry) { String url = entry; // if the string contains atleast one double // quote and checkMethod is true, go ahead // and tokenize the string. if (entry.indexOf("\"") > -1 && checkMethod(entry)) { StringTokenizer tokens ...
public final IConverter getConverter(Class type) { if (converterSupplier == null) { // Let the factory create a new converter converterSupplier = getApplication().getApplicationSettings() .getConverterSupplierFactory().newConverterSupplier(); } return converterSupplier.getConverter(type); }
public final IConverter getConverter(Class type) { if (converterSupplier == null) { // Let the factory create a new converter converterSupplier = getApplication().getApplicationSettings() .getConverterLocatorFactory().newConverterLocator(); } return converterSupplier.getConverter(type); }
IConverterLocator newConverterLocator(); /* * $Id: ICoverterLocatorFactory.java 5775 2006-05-19 18:00:21 +0000 (Fri, 19 May * 2006) joco01 $ $Revision$ $Date: 2006-05-19 18:00:21 +0000 (Fri, 19 * May 2006) $ * * ============================================================================== * Licensed under the ...
IConverterLocator newConverterLocator(); /* * $Id: ICoverterLocatorFactory.java 5775 2006-05-19 18:00:21 +0000 (Fri, 19 May * 2006) joco01 $ $Revision$ $Date: 2006-05-19 18:00:21 +0000 (Fri, 19 * May 2006) $ * * ============================================================================== * Licensed under the ...
public static void invokeSetter(final Object object, final String name, final String value, final Locale locale) { // Note: tag attributes are maintained in a LowerCaseKeyValueMap, thus // 'name' will be all lowercase. // Note: because the attributes are all lowercase, there is slight // possibility of er...
public static void invokeSetter(final Object object, final String name, final String value, final Locale locale) { // Note: tag attributes are maintained in a LowerCaseKeyValueMap, thus // 'name' will be all lowercase. // Note: because the attributes are all lowercase, there is slight // possibility of er...
public Rectangle getBounds () { checkWidget (); int [] x = new int [1], y = new int [1]; OS.gtk_window_get_position (shellHandle, x, y); int width = OS.GTK_WIDGET_WIDTH (vboxHandle); int height = OS.GTK_WIDGET_HEIGHT (vboxHandle); int border = 0; if ((style & (SWT.NO_TRIM | SWT.BORDER | SWT.SHELL_TRIM)) == 0) { ...
public Rectangle getBounds () { checkWidget (); int [] x = new int [1], y = new int [1]; OS.gtk_window_get_position (shellHandle, x, y); int width = OS.GTK_WIDGET_WIDTH (vboxHandle); int height = OS.GTK_WIDGET_HEIGHT (vboxHandle); int border = 0; if ((style & (SWT.NO_TRIM | SWT.BORDER | SWT.SHELL_TRIM)) == 0) { ...
protected IRequestTarget resolveExternalResource(RequestCycle requestCycle) { // Get the relative URL we need for loading the resource from // the servlet context // NOTE: we NEED to put the '/' in front as otherwise some versions // of application servers (e.g. Jetty 5.1.x) will fail for requests // like '...
protected IRequestTarget resolveExternalResource(RequestCycle requestCycle) { // Get the relative URL we need for loading the resource from // the servlet context // NOTE: we NEED to put the '/' in front as otherwise some versions // of application servers (e.g. Jetty 5.1.x) will fail for requests // like '...
protected void configure(final RequestCycle requestCycle, final Response response, final IResourceStream resourceStream) { // Configure response with content type of resource, if available String responseType = resourceStream.getContentType(); if (responseType != null) { response.setContentType(responseType ...
protected void configure(final RequestCycle requestCycle, final Response response, final IResourceStream resourceStream) { // Configure response with content type of resource, if available String responseType = resourceStream.getContentType(); if (responseType != null) { response.setContentType(responseType ...
public final void onSubmit() { // Get session info SignInSession session = (SignInSession)getSession(); // Sign the user in if (session.authenticate(properties.getString("username"), properties .getString("password"))) { if (!continueToOriginalDestination()) { setResponsePage(new H...
public final void onSubmit() { // Get session info SignInSession session = (SignInSession)getSession(); // Sign the user in if (session.authenticate(properties.getString("username"), properties .getString("password"))) { if (!continueToOriginalDestination()) { setResponsePage(getAp...
public void generateCopyright() { generateMetaData("swt_copyright"); }
public void generateCopyright() { outputln(fixDelimiter(getMetaData().getCopyright())); }
public static String[] getAllFlags() { return new String[]{"no_gen", "cpp"}; }
public static String[] getAllFlags() { return new String[]{FLAG_NO_GEN, FLAG_CPP}; }
public static String[] getAllFlags() { return new String[]{"no_gen", "no_wince"}; }
public static String[] getAllFlags() { return new String[]{FLAG_NO_GEN, FLAG_NO_WINCE}; }