buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
private static final String[] ALIASES = new String[] { "-hideStreams", "-hideCompilerStreams" + OPTION_DELIM + "-hideRunStreams", "-jim", "!eclipse" + OPTION_DELIM + "-logMinFail" + OPTION_DELIM + "-hideStreams", "-loud"...
private static final String[] ALIASES = new String[] { "-hideStreams", "-hideCompilerStreams" + OPTION_DELIM + "-hideRunStreams", "-jim", "!eclipse" + OPTION_DELIM + "-logMinFail" + OPTION_DELIM + "-hideStreams", "-loud"...
public abstract class AbstractRestartResponseException extends AbortException /* * $Id: AbstractRestartResponseException.java,v 1.3 2006/02/06 08:37:58 * jonathanlocke Exp $ $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, V...
public abstract class AbstractRestartResponseException extends AbortException /* * $Id: AbstractRestartResponseException.java,v 1.3 2006/02/06 08:37:58 * jonathanlocke Exp $ $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, V...
public WicketExampleApplication() { // WARNING: DO NOT do this on a real world application unless // you really want your app's passwords all passed around and // stored in unencrypted browser cookies (BAD IDEA!)!!! // The NoCrypt class is being used here because not everyone // has the java security class...
public WicketExampleApplication() { // WARNING: DO NOT do this on a real world application unless // you really want your app's passwords all passed around and // stored in unencrypted browser cookies (BAD IDEA!)!!! // The NoCrypt class is being used here because not everyone // has the java security class...
public RepeaterApplication() { getRequiredPageSettings().setHomePage(Index.class); getSettings().setResourcePollFrequency(Duration.ONE_SECOND); }
public RepeaterApplication() { getRequiredPageSettings().setHomePage(Index.class); getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND); }
public UploadApplication() { getRequiredPageSettings().setHomePage(UploadPage.class); getSettings().setThrowExceptionOnMissingResource(false); }
public UploadApplication() { getRequiredPageSettings().setHomePage(UploadPage.class); getExceptionSettings().setThrowExceptionOnMissingResource(false); }
public TestElement createTestElement() { HTTPSamplerBase sampler = HTTPSamplerFactory.newInstance(HTTPSamplerFactory.HTTP_SAMPLER_JAVA); modifyTestElement(sampler); return sampler; }
public TestElement createTestElement() { HTTPSamplerBase sampler = HTTPSamplerFactory.newInstance();// create default sampler modifyTestElement(sampler); return sampler; }
public synchronized void takeOffTheAir() { if (listener != null) { if (Trace.ON && debug != null) { debug.msg("Taking " + getName() + " on the air."); } try { listener.close(); } catch (IOException e) { if (Trace...
public synchronized void takeOffTheAir() { if (listener != null) { if (Trace.ON && debug != null) { debug.msg("Taking " + getName() + " off the air."); } try { listener.close(); } catch (IOException e) { if (Trac...
public boolean isSelected(Resource r) { // throw BuildException on error validate(); if (r.isDirectory()) { return true; } String userstr = contains; if (!casesensitive) { userstr = contains.toLowerCase(); } if (ignorewhitesp...
public boolean isSelected(Resource r) { // throw BuildException on error validate(); if (r.isDirectory() || contains.length() == 0) { return true; } String userstr = contains; if (!casesensitive) { userstr = contains.toLowerCase(); }...
public void testPagedTable() throws Exception { MockWebApplication application = new MockWebApplication(null); application.setHomePage(PagedTablePage.class); application.setupRequestAndResponse(); application.processRequestCycle(); PagedTablePage page = (PagedTablePage)application.getLastRenderedPage(); S...
public void testPagedTable() throws Exception { MockWebApplication application = new MockWebApplication(null); application.setHomePage(PagedTablePage.class); application.setupRequestAndResponse(); application.processRequestCycle(); PagedTablePage page = (PagedTablePage)application.getLastRenderedPage(); S...
public void selectAll () { checkWidget (); if ((style & SWT.SINGLE) != 0) return; NSTableView widget = (NSTableView)view; ignoreSelect = true; widget.selectAll(null); ignoreSelect = false; } void sendDoubleSelection() { postEvent (SWT.DefaultSelection); } boolean sendKeyEvent (NSEvent nsEvent, int type) { bo...
public void selectAll () { checkWidget (); if ((style & SWT.SINGLE) != 0) return; NSTableView widget = (NSTableView)view; ignoreSelect = true; widget.selectAll(null); ignoreSelect = false; } void sendDoubleSelection() { postEvent (SWT.DefaultSelection); } boolean sendKeyEvent (NSEvent nsEvent, int type) { bo...
public void setExpanded (boolean expanded) { checkWidget (); this.expanded = expanded; parent.showItem (parent.indexOf (this)); }
public void setExpanded (boolean expanded) { checkWidget (); this.expanded = expanded; parent.showItem (this); }
public synchronized void setParameters(Collection<CompoundVariable> parameters) throws InvalidVariableException { checkParameterCount(parameters, 1, 2); values = parameters.toArray(); try { bshInterpreter = new BeanShellInterpreter(JMeterUtils.getProperty(INIT_FILE), log); ...
public synchronized void setParameters(Collection<CompoundVariable> parameters) throws InvalidVariableException { checkParameterCount(parameters, 1, 2); values = parameters.toArray(); try { bshInterpreter = new BeanShellInterpreter(JMeterUtils.getProperty(INIT_FILE), log); ...
public void rollback() { try { super.rollback(); } finally { _inserts = null; _updates = null; _deletes = null; } } /** * Evict all members of the given classes. */ private void evictTypes(Collection<Class<?>> classes) { ...
public void rollback() { try { super.rollback(); } finally { _inserts = null; _updates = null; _deletes = null; } } /** * Evict all members of the given classes. */ private void evictTypes(Collection<Class<?>> classes) { ...
public ParserForXMLSchema(Locale locale) { //this.setLocale(locale); }
public ParserForXMLSchema(Locale locale) { super(locale); }
public final HTMLDocument createHTMLDocument( String title ) throws DOMException { HTMLDocument doc; if ( title == null ) throw new NullPointerException( "Argument 'title' is null." ); doc = new HTMLDocumentImpl(); doc.setTitle( title ); return doc; }
public final HTMLDocument createHTMLDocument( String title ) throws DOMException { HTMLDocument doc; if ( title == null ) throw new NullPointerException( "HTM014 Argument 'title' is null." ); doc = new HTMLDocumentImpl(); doc.setTitle( title ); return doc; }
public void setValue(String value) { if (readOnly) { throw new DOMExceptionImpl( DOMException.NO_MODIFICATION_ALLOWED_ERR, "NO_MODIFICATION_ALLOWED_ERR"); } LCount lc=null; String oldvalue=""; if(MUTATIONEVENTS) { // MUTATION PREP...
public void setValue(String value) { if (readOnly) { throw new DOMExceptionImpl( DOMException.NO_MODIFICATION_ALLOWED_ERR, "DOM001 Modification not allowed"); } LCount lc=null; String oldvalue=""; if(MUTATIONEVENTS) { // MUTATION ...
public void setNodeValue(String x) throws DOMException { throw new DOMExceptionImpl(DOMException.NO_MODIFICATION_ALLOWED_ERR, "NO_MODIFICATION_ALLOWED_ERR"); }
public void setNodeValue(String x) throws DOMException { throw new DOMExceptionImpl(DOMException.NO_MODIFICATION_ALLOWED_ERR, "DOM001 Modification not allowed"); }
public void setNodeValue(String value) throws DOMException { throw new DOMExceptionImpl( DOMException.NO_MODIFICATION_ALLOWED_ERR, "NO_MODIFICATION_ALLOWED_ERR"); }
public void setNodeValue(String value) throws DOMException { throw new DOMExceptionImpl( DOMException.NO_MODIFICATION_ALLOWED_ERR, "DOM001 Modification not allowed"); }
public void setNodeValue(String value) throws DOMException { throw new DOMExceptionImpl(DOMException.NO_MODIFICATION_ALLOWED_ERR, "NO_MODIFICATION_ALLOWED_ERR"); }
public void setNodeValue(String value) throws DOMException { throw new DOMExceptionImpl(DOMException.NO_MODIFICATION_ALLOWED_ERR, "DOM001 Modification not allowed"); }
public void setRedraw (boolean value) { checkWidget(); redraw = value; super.setRedraw (value); if (!value) { if (items.length - itemsCount > 3) { TableItem[] newItems = new TableItem [itemsCount]; System.arraycopy (items, 0, newItems, 0, itemsCount); items = newItems; } } }
public void setRedraw (boolean value) { checkWidget(); redraw = value; super.setRedraw (value); if (value) { if (items.length - itemsCount > 3) { TableItem[] newItems = new TableItem [itemsCount]; System.arraycopy (items, 0, newItems, 0, itemsCount); items = newItems; } } }
public FontData[] getFontData() { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); LOGFONT logFont = OS.IsUnicode ? (LOGFONT)new LOGFONTW() : new LOGFONTA(); OS.GetObject(handle, LOGFONT.sizeof, logFont); return new FontData[] {FontData.win32_new(logFont, device.computePoints(logFont))}; }
public FontData[] getFontData() { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); LOGFONT logFont = OS.IsUnicode ? (LOGFONT)new LOGFONTW() : new LOGFONTA(); OS.GetObject(handle, LOGFONT.sizeof, logFont); return new FontData[] {FontData.win32_new(logFont, device.computePoints(logFont, handle))}; }
protected void setUp() throws Exception { server = new Server(); SelectChannelConnector connector = new SelectChannelConnector(); connector.setPort(8098); server.setConnectors(new Connector[] { connector }); WebAppContext web = new WebAppContext(); web.setContextPath("/org.apache.wicket-examples"); St...
protected void setUp() throws Exception { server = new Server(); SelectChannelConnector connector = new SelectChannelConnector(); connector.setPort(8098); server.setConnectors(new Connector[] { connector }); WebAppContext web = new WebAppContext(); web.setContextPath("/wicket-examples"); String basedi...
public static void initializeClass(Class theClass) { // ***HACK*** We ask the VM to create an instance // by voluntarily providing illegal arguments to force // the VM to run the class' static initializer, while // at the same time not running a valid constructor. final Cons...
public static void initializeClass(Class theClass) { // ***HACK*** We ask the VM to create an instance // by voluntarily providing illegal arguments to force // the VM to run the class' static initializer, while // at the same time not running a valid constructor. final Cons...
public void onDetach(final RequestCycle cycle) { destroy(); } }); } sessionInvalidated = true; }
public void onDetach(final RequestCycle cycle) { detach(); } }); } sessionInvalidated = true; }
public void run() { while (true) { try { handleAccept(accept()); } catch (Exception e) { if (Trace.ON && debug != null) { debug.dumpStack(e, "Exception in accept"); ...
public void run() { while (true) { try { handleAccept(accept()); } catch (Exception e) { if (Trace.ON && debug != null) { debug.dumpStack(e, "Exception in accept"); ...
public void execute() throws BuildException { if (sourcePath == null && destDir == null ) { String msg = "sourcePath and destDir attributes must be set!"; throw new BuildException(msg); }
public void execute() throws BuildException { if (sourcePath == null || destDir == null ) { String msg = "sourcePath and destDir attributes must be set!"; throw new BuildException(msg); }
protected void onComponentTag(final ComponentTag tag) { checkComponentTag(tag, "select"); // Should a roundtrip be made (have onSelectionChanged called) when the // selection changed? if (wantOnSelectionChangedNotifications()) { // url that points to this components IOnChangeListener method final Cha...
protected void onComponentTag(final ComponentTag tag) { checkComponentTag(tag, "select"); // Should a roundtrip be made (have onSelectionChanged called) when the // selection changed? if (wantOnSelectionChangedNotifications()) { // url that points to this components IOnChangeListener method final Cha...
public Rectangle getTextBounds (int columnIndex) { checkWidget (); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); TableColumn[] columns = parent.columns; int columnCount = columns.length; int validColumnCount = Math.max (1, columnCount); if (!(0 <= columnIndex && columnIndex < validColumnC...
public Rectangle getTextBounds (int columnIndex) { checkWidget (); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); TableColumn[] columns = parent.columns; int columnCount = columns.length; int validColumnCount = Math.max (1, columnCount); if (!(0 <= columnIndex && columnIndex < validColumnC...
public int indexOf (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (item.parentItem != this) return -1; return item.getIndex (); } /* * Returns true if the receiver is currently available (though not necessary in t...
public int indexOf (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (item.parentItem != this) return -1; return item.getIndex (); } /* * Returns true if the receiver is currently available (though not necessary in t...
protected Link newPagingNavigationLink(String id, IPageable pageable, int pageIndex) { return new AjaxPagingNavigationLink(id, pageable, pageIndex); } }
protected Link<?> newPagingNavigationLink(String id, IPageable pageable, int pageIndex) { return new AjaxPagingNavigationLink(id, pageable, pageIndex); } }
private static final String PATTERN_THREAD_PREFIX = "%{time:yyyy/MM/dd HH:mm:ss} %5.5{priority} " //$NON_NLS-1$ + "%12{thread} %{category}: %{message} %{throwable}"; //$NON_NLS-1$
private static final String PATTERN_THREAD_PREFIX = "%{time:yyyy/MM/dd HH:mm:ss} %5.5{priority} " //$NON_NLS-1$ + "%20{thread} %{category}: %{message} %{throwable}"; //$NON_NLS-1$
private UnknownElement getReplacement() { if (replacement == null) { replacement = new UnknownElement(taskType); replacement.setProject(getProject()); replacement.setTaskType(taskType); replacement.setTaskName(taskName); replacement.setLocation(loc...
private UnknownElement getReplacement() { if (replacement == null) { replacement = new UnknownElement(taskType); replacement.setProject(getProject()); replacement.setTaskType(taskType); replacement.setTaskName(taskName); replacement.setLocation(get...
public void execute() throws BuildException { if (getProject() == null) { throw new IllegalStateException("project has not been set"); } if (name != null) { if (untypedValue == null && ref == null) { throw new BuildException("You must specify value, l...
public void execute() throws BuildException { if (getProject() == null) { throw new IllegalStateException("project has not been set"); } if (name != null) { if (untypedValue == null && ref == null) { throw new BuildException("You must specify value, l...
public static String[] translateCommandline(String to_process) { if (to_process == null || to_process.length() == 0) { return new String[0]; } // parse with a simple finite state machine final int normal = 0; final int inQuote = 1; final int inDo...
public static String[] translateCommandline(String to_process) { if (to_process == null || to_process.length() == 0) { return new String[0]; } // parse with a simple finite state machine final int normal = 0; final int inQuote = 1; final int inDo...
protected void setUp() throws Exception { super.setUp(); p = new PointcutParser(); asCons = A.class.getConstructor(new Class[]{String.class}); bsCons = B.class.getConstructor(new Class[0]); bsStringCons = B.class.getConstructor(new Class[]{String.class}); a = A.class.getMethod("a",new Class[0]); aa = A.c...
protected void setUp() throws Exception { super.setUp(); p = PointcutParser.getPointcutParserSupportingAllPrimitivesAndUsingSpecifiedClassloaderForResolution(this.getClass().getClassLoader()); asCons = A.class.getConstructor(new Class[]{String.class}); bsCons = B.class.getConstructor(new Class[0]); bsStringC...
protected void setUp() throws Exception { super.setUp(); PointcutParser pp = new PointcutParser(); tpm = pp.parseTypePattern("java.util.Map+"); }
protected void setUp() throws Exception { super.setUp(); PointcutParser pp = PointcutParser.getPointcutParserSupportingAllPrimitivesAndUsingSpecifiedClassloaderForResolution(this.getClass().getClassLoader()); tpm = pp.parseTypePattern("java.util.Map+"); }
protected void setUp() throws Exception { super.setUp(); parser = new PointcutParser(); a = A.class.getMethod("a"); b = B.class.getMethod("b"); c = B.class.getMethod("c",new Class[] {A.class,B.class}); }
protected void setUp() throws Exception { super.setUp(); parser = PointcutParser.getPointcutParserSupportingAllPrimitivesAndUsingSpecifiedClassloaderForResolution(this.getClass().getClassLoader()); a = A.class.getMethod("a"); b = B.class.getMethod("b"); c = B.class.getMethod("c",new Class[] {A.class,B.class}...
public void setUp() throws Exception { setUp(CLEAR_TABLES, Order.class, Item.class, Shop.class, Producer.class, Person.class, Foo.class, Bar.class, "openjpa.DynamicEnhancerAgent", "false"); populate(); }
public void setUp() throws Exception { setUp(CLEAR_TABLES, Order.class, Item.class, Shop.class, Producer.class, Person.class, Foo.class, Bar.class, "openjpa.DynamicEnhancementAgent", "false"); populate(); }
protected boolean rollback() { EntityTransaction tx = em.getTransaction(); if (!tx.isActive()) return false; tx.commit(); return true; }
protected boolean rollback() { EntityTransaction tx = em.getTransaction(); if (!tx.isActive()) return false; tx.rollback(); return true; }
public AjTypeDeclaration(AST ast) { super(ast); } /* (omit javadoc for this method) * Method declared on ASTNode. */ final boolean internalGetSetBooleanProperty(SimplePropertyDescriptor property, boolean get, boolean value) { if (property == ASPECT_PROPERTY) { if (get) { return isAspect(); } els...
public AjTypeDeclaration(AST ast) { super(ast); } /* (omit javadoc for this method) * Method declared on ASTNode. */ boolean internalGetSetBooleanProperty(SimplePropertyDescriptor property, boolean get, boolean value) { if (property == ASPECT_PROPERTY) { if (get) { return isAspect(); } else { ...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public final boolean authenticate(final String username, final String password) { if (user == null) { // Trivial password "db" if ("jonathan".equalsIgnoreCase(username) && "password".equalsIgnoreCase(password)) { user = username; } } return user != null; }
public final boolean authenticate(final String username, final String password) { if (user == null) { // Trivial password "db" if ("wicket".equalsIgnoreCase(username) && "wicket".equalsIgnoreCase(password)) { user = username; } } return user != null; }
public UploadPage(final PageParameters parameters) { tempDir = new File(System.getProperty("java.io.tmpdir"), "wicketuploadtest"); if(!tempDir.isDirectory()) { tempDir.mkdir(); } add(new UploadForm("upload", null, tempDir)); add(new Label("dir", tempDi...
public UploadPage(final PageParameters parameters) { tempDir = new File(System.getProperty("java.io.tmpdir"), "WicketUploadTest"); if(!tempDir.isDirectory()) { tempDir.mkdir(); } add(new UploadForm("upload", null, tempDir)); add(new Label("dir", tempDi...
public void executeMain() throws BuildException { if (baseDir == null && filesets.size() == 0 && groupfilesets.size() == 0 && "zip".equals(archiveType)) { throw new BuildException("basedir attribute must be set, " + "or at least " ...
public void executeMain() throws BuildException { if (baseDir == null && filesets.size() == 0 && groupfilesets.size() == 0 && "zip".equals(archiveType)) { throw new BuildException("basedir attribute must be set, " + "or at least " ...
public Object locateProxyTarget() { final GuiceInjectorHolder holder = Application.get().getMetaData( GuiceInjectorHolder.INJECTOR_KEY); final Type type; try { Class< ? > clazz = Class.forName(data[0]); if (argIndex < 0) { final Field field = clazz.getDeclaredField(data[1]); type = fiel...
public Object locateProxyTarget() { final GuiceInjectorHolder holder = Application.get().getMetaData( GuiceInjectorHolder.INJECTOR_KEY); final Type type; try { Class< ? > clazz = Class.forName(data[0]); if (argIndex < 0) { final Field field = clazz.getDeclaredField(data[1]); type = fiel...
public void testIterationStart(LoopIterationEvent event) { if (getClearEachIteration()) { clearCookies(); setProperty(initialCookies); } }
public void testIterationStart(LoopIterationEvent event) { if (getClearEachIteration()) { clearCookies(); setProperty((CollectionProperty)initialCookies.clone()); } }
protected final void update() { throw new UnsupportedOperationException(); } /** * @param page * The page to add to dirty objects list */ void dirtyPage(final Page page) { List dirtyObjects = getDirtyObjectsList(); if (!dirtyObjects.contains(page)) { dirtyObjects.add(page); } } ...
protected final void update() { throw new UnsupportedOperationException(); } /** * @param page * The page to add to dirty objects list */ void dirtyPage(final Page page) { List dirtyObjects = getDirtyObjectsList(); if (!dirtyObjects.contains(page)) { dirtyObjects.add(page); } } ...
private List<ICompletionProposal> computeCompletionProposals(JavaContentAssistInvocationContext context) { CompletionContext completionContext = context.getCoreContext(); int tokenStart = completionContext.getTokenStart(); ICompilationUnit source = context.getCompilationUnit(); try { IJava...
private List<ICompletionProposal> computeCompletionProposals(JavaContentAssistInvocationContext context) { CompletionContext completionContext = context.getCoreContext(); int tokenStart = completionContext.getTokenStart(); ICompilationUnit source = context.getCompilationUnit(); try { IJava...
public void updateView(IJavaElement javaElement, ITextSelection textSelection) { IJavaProject javaProject = javaElement.getJavaProject(); if (!checkClasspath(javaProject)) { annotationTreeViewer.setInput(null); pageBook.showPage(setupClasspathComposite); return; ...
public void updateView(IJavaElement javaElement, ITextSelection textSelection) { IJavaProject javaProject = javaElement.getJavaProject(); if (!checkClasspath(javaProject)) { annotationTreeViewer.setInput(null); pageBook.showPage(setupClasspathComposite); return; ...
public boolean isDisposed () { return device == null; } /* * Itemize the receiver text */ StyleItem[] itemize () { segmentsText = getSegmentsText(); int length = segmentsText.length(); SCRIPT_CONTROL scriptControl = new SCRIPT_CONTROL(); SCRIPT_STATE scriptState = new SCRIPT_STATE(); final int MAX_ITEM = leng...
public boolean isDisposed () { return device == null; } /* * Itemize the receiver text */ StyleItem[] itemize () { segmentsText = getSegmentsText(); int length = segmentsText.length(); SCRIPT_CONTROL scriptControl = new SCRIPT_CONTROL(); SCRIPT_STATE scriptState = new SCRIPT_STATE(); final int MAX_ITEM = leng...
private boolean endOfLoop(boolean loopEnd) { String cnd = getCondition(); log.debug("Condition string:" + cnd+"."); boolean res; // If blank, only check previous sample when at end of loop if ((loopEnd && cnd.length() == 0) || "LAST".equalsIgnoreCase(cnd)) {// $NON-NLS-1$ ...
private boolean endOfLoop(boolean loopEnd) { String cnd = getCondition().trim(); log.debug("Condition string:" + cnd+"."); boolean res; // If blank, only check previous sample when at end of loop if ((loopEnd && cnd.length() == 0) || "LAST".equalsIgnoreCase(cnd)) {// $NON-NLS...
public AssertionResult getResult(SampleResult response) { try { return SMIMEAssertion.getResult(this, response, getName()); } catch (NoClassDefFoundError e) { AssertionResult assertionResult = new AssertionResult(getName()); assertionResult.setError(true); ...
public AssertionResult getResult(SampleResult response) { try { return SMIMEAssertion.getResult(this, response, getName()); } catch (NoClassDefFoundError e) { AssertionResult assertionResult = new AssertionResult(getName()); assertionResult.setError(true); ...
public void localeChanged(LocaleChangeEvent event) { setTitle(JMeterUtils.getResString("function_helper_title")); this.getContentPane().removeAll(); // so we can add them again in init init(); }
public void localeChanged(LocaleChangeEvent event) { setTitle(JMeterUtils.getResString("function_helper_title")); //$NON-NLS-1$ this.getContentPane().removeAll(); // so we can add them again in init init(); }
public static final String ERROR_NO_RMIC_ON_CLASSPATH = "Cannot use SUN rmic, as it is not " + "available. A common solution is to " + "set the environment variable " + "JAVA_HOME or CLASSPATH...
public static final String ERROR_NO_RMIC_ON_CLASSPATH = "Cannot use SUN rmic, as it is not " + "available. A common solution is to " + "set the environment variable " + "JAVA_HOME"; /** Er...
public boolean hasAnyRole(final Roles roles) { return AuthenticatedWebSession.get().getUser().getRoles().hasAnyRole(roles); }
public boolean hasAnyRole(final Roles roles) { return AuthenticatedWebSession.get().getRoles().hasAnyRole(roles); }
public void drawImage(Image image, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (srcWidth == 0 || srcHeight == 0 || destWidth == 0 || destHeight == 0) return; if (srcX < 0 || srcY < 0 || srcWidth < 0...
public void drawImage(Image image, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (srcWidth == 0 || srcHeight == 0 || destWidth == 0 || destHeight == 0) return; if (srcX < 0 || srcY < 0 || srcWidth < 0...
private JPanel getParameterMaskPanel() { HorizontalPanel panel = new HorizontalPanel(10, HorizontalPanel.TOP_ALIGNMENT); panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("html_parameter_mask"))); //$NON-NLS-1$ _fie...
private JPanel getParameterMaskPanel() { HorizontalPanel panel = new HorizontalPanel(10, Component.TOP_ALIGNMENT); panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("html_parameter_mask"))); //$NON-NLS-1$ _fieldName...
public void test_ContructorIsNotIncludedInWebMethods() throws JavaModelException { target.startSynchronizing(); final ICompilationUnit wsCU = testPrj1.getJavaProject().findType(ws1.getImplementation()).getCompilationUnit(); testUtil.setContents(wsCU, "@javax.jws.WebService()public class WS1{public WS1(){};pu...
public void test_ContructorIsNotIncludedInWebMethods() throws CoreException { target.startSynchronizing(); final ICompilationUnit wsCU = testPrj1.getJavaProject().findType(ws1.getImplementation()).getCompilationUnit(); testUtil.setContents(wsCU, "@javax.jws.WebService()public class WS1{public WS1(){};public ...
public void addExpandListener (ExpandListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Expand, typedListener); addListener (SWT.Collapse, typedListener); } protected void checkSubclass () { if (...
public void addExpandListener (ExpandListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Expand, typedListener); addListener (SWT.Collapse, typedListener); } protected void checkSubclass () { if (...
public void setEnabled (boolean enabled) { checkWidget(); OS.UIElement_IsEnabled (topHandle (), enabled); }
public void setEnabled (boolean enabled) { checkWidget(); OS.UIElement_IsEnabled (handle, enabled); }
public interface ITestPanelSource extends IClusterable /* * 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 ...
public interface ITestPanelSource extends IClusterable /* * 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 ...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget(); int width = DEFAULT_WIDTH; int height = DEFAULT_HEIGHT; if (wHint != SWT.DEFAULT) width = wHint; if (hHint != SWT.DEFAULT) height = hHint; int border = getBorderWidth (); width += border * 2; height += border * 2; return new Poin...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget(); int width = DEFAULT_WIDTH; int height = DEFAULT_HEIGHT; if (wHint != SWT.DEFAULT) width = wHint; if (hHint != SWT.DEFAULT) height = hHint; int border = getBorderWidth (); width += border * 2; height += border * 2; return new Poin...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public final void respond(final IRequestCycle requestCycle) { // do not increment page id during ajax processing boolean frozen = page.setFreezePageId(true); try { RequestCycle rc = (RequestCycle)requestCycle; Url oldBaseURL = rc.getUrlRenderer().getBaseUrl(); WebRequest request = (WebRequest)reques...
public final void respond(final IRequestCycle requestCycle) { // do not increment page id during ajax processing boolean frozen = page.setFreezePageId(true); try { RequestCycle rc = (RequestCycle)requestCycle; Url oldBaseURL = rc.getUrlRenderer().getBaseUrl(); WebRequest request = (WebRequest)reques...
protected void setHeaders(WebResponse response) { RequestUtils.disableCaching(response); }
protected void setHeaders(WebResponse response) { response.disableCaching(); }
private void sendRedirect(String url, boolean cacheable) { redirect = true; url = getAbsoluteURL(url); url = httpServletResponse.encodeRedirectURL(url); try { // proxies eventually cache '302 temporary redirect' responses: // for most wicket use cases this is fatal since redirects are // usually h...
private void sendRedirect(String url, boolean cacheable) { redirect = true; url = getAbsoluteURL(url); url = httpServletResponse.encodeRedirectURL(url); try { // proxies eventually cache '302 temporary redirect' responses: // for most wicket use cases this is fatal since redirects are // usually h...
public void respond(IRequestCycle requestCycle) { WebResponse response = (WebResponse)requestCycle.getResponse(); final String encoding = Application.get() .getRequestCycleSettings() .getResponseRequestEncoding(); // Set content type based on markup type for page response.setContentType("text/xml; char...
public void respond(IRequestCycle requestCycle) { WebResponse response = (WebResponse)requestCycle.getResponse(); final String encoding = Application.get() .getRequestCycleSettings() .getResponseRequestEncoding(); // Set content type based on markup type for page response.setContentType("text/xml; char...
public static String stripJSessionId(CharSequence url) { if (url == null) { return null; } StringBuffer path = new StringBuffer(url.toString()); int ixSemiColon = path.indexOf(";"); // strip off any jsession id if (ixSemiColon != -1) { int ixEnd = path.indexOf("?"); if (ixEnd < ixSemiColon) ...
public static String stripJSessionId(CharSequence url) { if (url == null) { return null; } StringBuffer path = new StringBuffer(url.toString()); int ixSemiColon = path.indexOf(";"); // strip off any jsession id if (ixSemiColon != -1) { int ixEnd = path.indexOf("?"); if (ixEnd <= ixSemiColon)...
public void processElement(String elementName) throws SAXParseException { if (project == null) { project = new Project(getElementSource(), getLocation()); setModelElement(project); project.setDefaultTarget(getAttribute(DEFAULT_ATTR)); pro...
public void processElement(String elementName) throws SAXParseException { if (project == null) { project = new Project(getElementSource(), getLocation()); setModelElement(project); project.setDefaultTarget(getAttribute(DEFAULT_ATTR)); pro...
public void processElement(String elementName) throws SAXParseException { target = new Target(getLocation(), getAttribute(NAME_ATTR)); setModelElement(target); target.setDescription(getAttribute(DESC_ATTR)); target.addAspectAttributes(getAspectAttributes()); String ...
public void processElement(String elementName) throws SAXParseException { target = new Target(getLocation(), getAttribute(NAME_ATTR)); setModelElement(target); target.setDescription(getAttribute(DESC_ATTR)); addNamespaceAttributes(); String depends = getAttribute(DE...
public Path createPath() throws BuildException { if (isReference) { throw noChildrenAllowed(); } Path p = new Path(project); elements.add(p); checked = false; return p; }
public Path createPath() throws BuildException { if (isReference) { throw noChildrenAllowed(); } Path p = new Path(project); elements.addElement(p); checked = false; return p; }
protected void finishPage(final IProgressMonitor monitor) throws InterruptedException, CoreException { mainPage.saveDialogSettings(); URIClientConnectAction client = null; String groupName = mainPage.getJoinGroupText(); String nickName = mainPage.getNicknameText(); ...
protected void finishPage(final IProgressMonitor monitor) throws InterruptedException, CoreException { mainPage.saveDialogSettings(); URIClientConnectAction client = null; String groupName = mainPage.getJoinGroupText(); String nickName = mainPage.getNicknameText(); ...
public ISharedObject createSharedObject(SharedObjectDescription desc, String[] argTypes, Object[] args) throws SharedObjectInstantiationException { trace("createSharedObject(" + desc + "," + Trace.convertStringAToString(argTypes) + "," + Trace.convertObjectAToString(args) + ")"); if (desc == null) ...
public ISharedObject createSharedObject(SharedObjectDescription desc, String[] argTypes, Object[] args) throws SharedObjectInstantiationException { trace("createSharedObject(" + desc + "," + Trace.convertStringAToString(argTypes) + "," + Trace.convertObjectAToString(args) + ")"); if (desc == null) ...
public String[] restrict(String[] files, File srcDir, File destDir, FileNameMapper mapper) { // record destdir for later use in getResource this.destDir = destDir; Vector v = new Vector(); for (int i = 0; i < files.length; i++) { File src = fi...
public String[] restrict(String[] files, File srcDir, File destDir, FileNameMapper mapper) { // record destdir for later use in getResource this.destDir = destDir; Vector v = new Vector(); for (int i = 0; i < files.length; i++) { File src = fi...
private void processComment(final String line) { final String lineSeparator = System.getProperty("line.separator"); if (line.startsWith("======")) { //We have ended changelog for that particular file //so we can save it final int end = m_comment.length() - lineSep...
private void processComment(final String line) { final String lineSeparator = System.getProperty("line.separator"); if (line.startsWith("======")) { //We have ended changelog for that particular file //so we can save it final int end = m_comment.length() - lineSep...
public ConstantThroughputTimerBeanInfo() { super(ConstantThroughputTimer.class); createPropertyGroup("delay", //$NON-NLS-1$ new String[] { "throughput", //$NON-NLS-1$ "calcMode" }); //$NON-NLS-1$ PropertyDescriptor p = property("throughput"); //$NON-NLS-1$ ...
public ConstantThroughputTimerBeanInfo() { super(ConstantThroughputTimer.class); createPropertyGroup("delay", //$NON-NLS-1$ new String[] { "throughput", //$NON-NLS-1$ "calcMode" }); //$NON-NLS-1$ PropertyDescriptor p = property("throughput"); //$NON-NLS-1$ ...
runAjdoc("private","1.4",files); File htmlFile = new File(getAbsolutePathOutdir() + "/foo/AdvisesRelationshipCoverage.html"); if (htmlFile == null || !htmlFile.exists()) { fail("couldn't find " + htmlFile.getAbsolutePath() + " - were there compilation errors?"); } String[] strings =...
runAjdoc("private","1.4",files); File htmlFile = new File(getAbsolutePathOutdir() + "/foo/AdvisesRelationshipCoverage.html"); if (htmlFile == null || !htmlFile.exists()) { fail("couldn't find " + htmlFile.getAbsolutePath() + " - were there compilation errors?"); } String[] strings =...
public void testDeclareAnnotationAppearsInStructureModel_pr132130() { //AsmManager.setReporting("c:/debug.txt",true,true,true,true); runTest("declare annotation appears in structure model when in same file"); IHierarchy top = AsmManager.getDefault().getHierarchy(); // get the IProgramElements corres...
public void testDeclareAnnotationAppearsInStructureModel_pr132130() { //AsmManager.setReporting("c:/debug.txt",true,true,true,true); runTest("declare annotation appears in structure model when in same file"); IHierarchy top = AsmManager.getDefault().getHierarchy(); // get the IProgramElements corres...
protected final void renderComponentTag(ComponentTag tag) { final ApplicationSettings settings = getApplication().getSettings(); if (!(tag instanceof WicketTag) || !settings.getStripWicketTags()) { // Apply attribute modifiers if (attributeModifiers != null && tag.getType() != XmlTag.CLOSE) { tag =...
protected final void renderComponentTag(ComponentTag tag) { final ApplicationSettings settings = getApplication().getSettings(); if (!(tag instanceof WicketTag) || !settings.getStripWicketTags()) { // Apply attribute modifiers if (attributeModifiers != null && tag.getType() != XmlTag.CLOSE) { tag =...
protected boolean handleSharedObjectCreateResponseEvent(ISharedObjectCreateResponseEvent createResponseEvent) { trace("handleSharedObjectCreateResponseEvent("+createResponseEvent+")"); return true; }
protected boolean handleSharedObjectCreateResponseEvent(ISharedObjectCreateResponseEvent createResponseEvent) { trace("handleSharedObjectCreateResponseEvent("+createResponseEvent+")"); return false; }
public IPageVersionManager newVersionManager(Page page) { final IPageSettings settings = page.getSession().getApplication().getPageSettings(); return new UndoPageVersionManager(page, settings.getMaxPageVersions()); }
public IPageVersionManager newVersionManager(Page page) { final IPageSettings settings = page.getSession().getApplication().getPageSettings(); return new UndoPageVersionManager(page, 20); }
public int /*long*/ method7(int /*long*/[] args) {return get_targets((int)/*64*/args[0], args[1], args[2]);} }; } refCount++; return refCount; } int Release() { refCount--; if (refCount == 0) { if (objIAccessibleRelation != null) objIAccessibleRelation.dispose(); objIAccessibleRelation = ...
public int /*long*/ method7(int /*long*/[] args) {return get_targets((int)/*64*/args[0], args[1], args[2]);} }; } refCount++; return refCount; } int Release() { refCount--; if (refCount == 0) { if (objIAccessibleRelation != null) objIAccessibleRelation.dispose(); objIAccessibleRelation = ...
private static ReflectionBasedReferenceTypeDelegate create15Delegate(ReferenceType forReferenceType, Class forClass, ClassLoader usingClassLoader, World inWorld) { try { Class delegateClass = Class.forName("org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate",false,usingClassLoader);//Reflection...
private static ReflectionBasedReferenceTypeDelegate create15Delegate(ReferenceType forReferenceType, Class forClass, ClassLoader usingClassLoader, World inWorld) { try { Class delegateClass = Class.forName("org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate");//,false,usingClassLoader);//Reflec...
public Control (Composite parent, int style) { super (parent, style); this.parent = parent; createWidget (0); } int /*long*/ defaultFont () { return display.getSystemFont ().handle; } void deregister () { super.deregister (); if (fixedHandle != 0) display.removeWidget (fixedHandle); int /*long*/ imHandle = imH...
public Control (Composite parent, int style) { super (parent, style); this.parent = parent; createWidget (0); } int /*long*/ defaultFont () { return display.getSystemFont ().handle; } void deregister () { super.deregister (); if (fixedHandle != 0) display.removeWidget (fixedHandle); int /*long*/ imHandle = imH...
private void processFile(String file) throws BuildException { File srcFile = new File(srcDir, file); File destD = destDir == null ? srcDir : destDir; File tmpFile = null; BufferedWriter outWriter; OneLiner.BufferLine line; // read the contents of the file One...
private void processFile(String file) throws BuildException { File srcFile = new File(srcDir, file); File destD = destDir == null ? srcDir : destDir; File tmpFile = null; BufferedWriter outWriter; OneLiner.BufferLine line; // read the contents of the file One...
protected String transform(final String output) { return output; } }
protected CharSequence transform(final String output) { return output; } }
public void testInitWithNonExistingDir () { File dir1 = new File(tempDir, getName()); assertFalse(dir1.exists()); try { prResolver.setSrcPathes(dir1.getAbsolutePath()); fail("IllegalArgumentException expected."); } catch (IllegalArgumentException e) { ; // OK } }
public void testInitWithNonExistingDir () { File dir1 = new File(tempDir, getName()); assertFalse(dir1.exists()); try { prResolver.setSrcPathes(dir1.getAbsolutePath()); fail("IllegalArgumentException expected."); } catch (IllegalArgumentException e) { // OK } }
public String getString(final String key, final Component component, final IModel model, final String defaultValue) throws MissingResourceException { final IResourceSettings resourceSettings = Application.get().getResourceSettings(); boolean addedToPage = (null != component.findParent(Page.class)); if (!add...
public String getString(final String key, final Component component, final IModel model, final String defaultValue) throws MissingResourceException { final IResourceSettings resourceSettings = Application.get().getResourceSettings(); boolean addedToPage = (component != null && null != component.findParent(Pag...
public void redirect(final String url) { if (httpServletResponse != null) { try { if (httpServletResponse.isCommitted()) { log.error("Unable to redirect. HTTP Response has already been committed."); } if (log.isDebugEnabled()) { log.debug("Redirecting to " + url); } h...
public void redirect(final String url) { if (httpServletResponse != null) { try { if (httpServletResponse.isCommitted()) { log.error("Unable to redirect to: " + url + ", HTTP Response has already been committed."); } if (log.isDebugEnabled()) { log.debug("Redirecting to " + ur...
public boolean open () { checkWidget (); cancelled = false; tracking = true; window = (NSWindow)new NSWindow().alloc(); NSArray screens = NSScreen.screens(); float /*double*/ minX = Float.MAX_VALUE, maxX = Float.MIN_VALUE; float /*double*/ minY = Float.MAX_VALUE, maxY = Float.MIN_VALUE; int count = (int)/*64*/...
public boolean open () { checkWidget (); cancelled = false; tracking = true; window = (NSWindow)new NSWindow().alloc(); NSArray screens = NSScreen.screens(); float /*double*/ minX = Float.MAX_VALUE, maxX = Float.MIN_VALUE; float /*double*/ minY = Float.MAX_VALUE, maxY = Float.MIN_VALUE; int count = (int)/*64*/...
public ASModel parseASInputSource(DOMInputSource is) throws DOMASException, Exception { // need to wrap the DOMInputSource with an XMLInputSource XMLInputSource xis = this.dom2xmlInputSource(is); try { return parseASInputSource(xis); ...
public ASModel parseASInputSource(DOMInputSource is) throws DOMASException, Exception { // need to wrap the DOMInputSource with an XMLInputSource XMLInputSource xis = this.dom2xmlInputSource(is); try { return parseASInputSource(xis); ...
public void paint(GC gc, int width, int height) { if (!example.checkAdvancedGraphics()) return; Device device = gc.getDevice(); String fontFace = (String)fontNames.get(fontFaceCb.getSelectionIndex()); int points = fontPointSpinner.getSelection(); int style = styleValues[fontStyleCb.getSelectionIndex()]; Font ...
public void paint(GC gc, int width, int height) { if (!example.checkAdvancedGraphics()) return; Device device = gc.getDevice(); String fontFace = (String)fontNames.get(fontFaceCb.getSelectionIndex()); int points = fontPointSpinner.getSelection(); int style = styleValues[fontStyleCb.getSelectionIndex()]; Font ...
public Rectangle getBounds() { checkWidget(); Rectangle result = new Rectangle (0, 0, 0, 0); if (nsItem.respondsToSelector (OS.sel_accessibilityAttributeValue_1)) { int posValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_1, OS.NSAccessibilityPositionAttribute ()); int sizeValue = OS.objc_ms...
public Rectangle getBounds() { checkWidget(); Rectangle result = new Rectangle (0, 0, 0, 0); if (nsItem.respondsToSelector (OS.sel_accessibilityAttributeValue_1)) { int posValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_1, OS.NSAccessibilityPositionAttribute ()); int sizeValue = OS.objc_ms...
public RGB open() { NSColorPanel panel = NSColorPanel.sharedColorPanel(); if (rgb != null) { NSColor color = NSColor.colorWithDeviceRed(rgb.red / 255f, rgb.green / 255f, rgb.blue / 255f, 1); panel.setColor(color); } SWTPanelDelegate delegate = (SWTPanelDelegate)new SWTPanelDelegate().alloc().init(); int jniRe...
public RGB open() { NSColorPanel panel = NSColorPanel.sharedColorPanel(); if (rgb != null) { NSColor color = NSColor.colorWithDeviceRed(rgb.red / 255f, rgb.green / 255f, rgb.blue / 255f, 1); panel.setColor(color); } SWTPanelDelegate delegate = (SWTPanelDelegate)new SWTPanelDelegate().alloc().init(); int jniRe...
public void askThreadsToStop() { if (engine == null) { // Will be null if StopTest thread has started engine.stopTest(false); } }
public void askThreadsToStop() { if (engine != null) { // Will be null if StopTest thread has started engine.stopTest(false); } }
public static void main(String[] args) { new C(); new C("9"); //A.printLog(); A.checkLog(); } } class C extends SuperC { static final int i; final int x; int y = 42; static { i = 23; } C(String s) { this(Integer.valueOf(s).intValue()); A...
public static void main(String[] args) { new C(); new C("9"); //A.printLog(); A.checkLog(); } } class C extends SuperC { static final int i; final int x; int y = 42; static { i = 23; } C(String s) { this(Integer.valueOf(s).intValue()); A...
public static void main(String[] args){ new testclass1(); Tester.check(0 < Filteraspect.i, "0 < Filteraspect.i: " + Filteraspect.i); } } class testclass1 {} class testclass2 {} aspect Filteraspect { static int i; // all these variants fail //pointcut goCut(): c...
public static void main(String[] args){ new testclass1(); Tester.check(0 < Filteraspect.i, "0 < Filteraspect.i: " + Filteraspect.i); } } class testclass1 {} class testclass2 {} aspect Filteraspect { static int i; // all these variants fail //pointcut goCut(): c...
public void onAfterRender(Component component); }
public void onAfterRender(Component< ? > component); }
public void onBeforeRender(Component component); }
public void onBeforeRender(Component< ? > component); }
boolean authorizeAction(Component< ? > component); /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apac...
boolean authorizeAction(Component< ? > component); /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apac...