buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
private CRSOptions() { crsOptions = new Options(true); Option.Factory factory = new Option.Factory("CompilerRun"); // compiler options go in map eclipseOption = factory.create( "eclipse", ...
private CRSOptions() { crsOptions = new Options(true); Option.Factory factory = new Option.Factory("CompilerRun"); // compiler options go in map eclipseOption = factory.create( "eclipse", ...
public String getTitle(VexWidget vexWidget) { return Messages.getString("InsertAssistant.title"); //$NON-NLS-1$ }
public String getTitle(VexWidget vexWidget) { return Messages.getString("dialog.addElement.title"); //$NON-NLS-1$ }
public String getTitle(VexWidget vexWidget) { String message = Messages .getString("ChangeElementAction.dynamic.label"); //$NON-NLS-1$ String name = vexWidget.getCurrentElement().getName(); return MessageFormat.format(message, new Object[] { name }); }
public String getTitle(VexWidget vexWidget) { String message = Messages .getString("dialog.convertElement.dynamicTitle"); //$NON-NLS-1$ String name = vexWidget.getCurrentElement().getName(); return MessageFormat.format(message, new Object[] { name }); }
public HelloWorldApplication() { getPages().setHomePage(HelloWorld.class); getPages().putPageAlias(HelloWorld.class, "helloworld"); getPages().setHomePageRenderStrategy(ApplicationPages.BOOKMARK_REDIRECT); }
public HelloWorldApplication() { getPages().setHomePage(HelloWorld.class); getPages().putClassAlias(HelloWorld.class, "helloworld"); getPages().setHomePageRenderStrategy(ApplicationPages.BOOKMARK_REDIRECT); }
private void run(String testFile, String logFile, boolean remoteStart, String remote_hosts_string) { FileInputStream reader = null; try { File f = new File(testFile); if (!f.exists() || !f.isFile()) { println("Could not open " + testFile); return; } FileServer.getFileServer().setBasedir(f.getAb...
private void run(String testFile, String logFile, boolean remoteStart, String remote_hosts_string) { FileInputStream reader = null; try { File f = new File(testFile); if (!f.exists() || !f.isFile()) { println("Could not open " + testFile); return; } FileServer.getFileServer().setBasedir(f.getAb...
public static boolean isEmpty(final CharSequence string) { return string == null || string.length() == 0 || string.toString().trim().equals(""); }
public static boolean isEmpty(final CharSequence string) { return string == null || string.length() == 0 || string.toString().trim().length() == 0; }
private String genAnonTypeName(Element complexTypeDecl) throws Exception { String typeName; // If the anonymous type is not nested within another type, we can // simply assign the type a numbered name // if (fCurrentTypeNameStack.empty()) typeName = "#"+fAnon...
private String genAnonTypeName(Element complexTypeDecl) throws Exception { String typeName; // If the anonymous type is not nested within another type, we can // simply assign the type a numbered name // if (fCurrentTypeNameStack.empty()) typeName = "#"+fAnon...
public void setNodeValue(String value) { if (isReadOnly()) throw new DOMExceptionImpl( DOMException.NO_MODIFICATION_ALLOWED_ERR, "DOM001 Modification not allowed"); // revisit: may want to set the value in ownerDocument. // Default behavior, overridden in some subclasses ...
public void setNodeValue(String value) { if (isReadOnly()) throw new DOMExceptionImpl( DOMException.NO_MODIFICATION_ALLOWED_ERR, "DOM001 Modification not allowed"); // revisit: may want to set the value in ownerDocument. // Default behavior, overridden in some subclasses ...
public void addDropListener(DropTargetListener listener) { if (listener == null) DND.error (SWT.ERROR_NULL_ARGUMENT); DNDListener typedListener = new DNDListener (listener); addListener (DND.DragEnter, typedListener); addListener (DND.DragLeave, typedListener); addListener (DND.DragOver, typedListener); addListen...
public void addDropListener(DropTargetListener listener) { if (listener == null) DND.error (SWT.ERROR_NULL_ARGUMENT); DNDListener typedListener = new DNDListener (listener); addListener (DND.DragEnter, typedListener); addListener (DND.DragLeave, typedListener); addListener (DND.DragOver, typedListener); addListen...
protected String getFilterPathFromWebXml(final boolean isServlet, final FilterConfig filterConfig) { return new WebXmlFile().getFilterPath(isServlet, filterConfig); }
protected String getFilterPathFromWebXml(final boolean isServlet, final FilterConfig filterConfig) { return new WebXmlFile().getUniqueFilterPath(isServlet, filterConfig); }
public void component(final Component component, final IVisit<Void> visit) { component.renderHead(finalHeader); } }); response.close(); if (response.getBuffer().length() > 0) { // @TODO it is not yet working properly. JDo to fix it log.error("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
public void component(final Component component, final IVisit<Void> visit) { component.renderHead(finalHeader); } }); response.close(); if (response.getBuffer().length() > 0) { // @TODO it is not yet working properly. JDo to fix it log.error("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
public void waitToCommit() throws SharedObjectAddAbortException { if (getTransactionState() == ISharedObjectContainerTransaction.COMMITTED) return; synchronized (lock) { long end = System.currentTimeMillis() + getTimeout(); try { while (!isVotingCompleted()) { long wait = end - System.currentTime...
public void waitToCommit() throws SharedObjectAddAbortException { if (getTransactionState() == ISharedObjectContainerTransaction.COMMITTED) return; synchronized (lock) { long end = System.currentTimeMillis() + getTimeout(); try { while (!isVotingCompleted()) { long wait = end - System.currentTime...
throw new WicketRuntimeException("Unable to load class with name: " + classname, ex); /* * $Id: DefaultClassResolver.java 5771 2006-05-19 12:04:06 +0000 (Fri, 19 May * 2006) joco01 $ $Revision$ $Date: 2006-05-19 12:04:06 +0000 (Fri, 19 * May 2006) $ * * ===========================================================...
throw new WicketRuntimeException("Unable to load class with name: " + classname, ex); /* * $Id: DefaultClassResolver.java 5771 2006-05-19 12:04:06 +0000 (Fri, 19 May * 2006) joco01 $ $Revision$ $Date: 2006-05-19 12:04:06 +0000 (Fri, 19 * May 2006) $ * * ===========================================================...
public void targetStarted(BuildEvent event) { if (initialized) { Log log = getLog("org.apache.tools.ant.Target", event.getTarget().getName()); // Since task log category includes target, we don't really // need this message realLog(log, "St...
public void targetStarted(BuildEvent event) { if (initialized) { Log log = getLog("org.apache.tools.ant.Target", event.getTarget().getName()); // Since task log category includes target, we don't really // need this message realLog(log, "St...
public void executeScript(Map attributes, Map elements, ScriptDefBase instance) { runner.addBean("attributes", attributes); runner.addBean("elements", elements); runner.addBean("project", getProject()); runner.addBean("self", self); runner.executeScript("scriptdef_" + name); ...
public void executeScript(Map attributes, Map elements, ScriptDefBase instance) { runner.addBean("attributes", attributes); runner.addBean("elements", elements); runner.addBean("project", getProject()); runner.addBean("self", instance); runner.executeScript("scriptdef_" + nam...
public String toString() { StringBuffer sb = new StringBuffer(); sb.append("Link to : " + link + "; titled : " + linkText + "; begins at : " + elementBegin() + "; ends at : " + elementEnd() + ", AccessKey="); if (accessKey == null) sb.append("null\n"); else sb.append(accessKey + "\n"); if (children...
public String toString() { StringBuffer sb = new StringBuffer(); sb.append("Link to : " + link + "; titled : " + linkText + "; begins at : " + elementBegin() + "; ends at : " + elementEnd() + ", AccessKey="); if (accessKey == null) sb.append("null\n"); else sb.append(accessKey + "\n"); if (children...
protected void checkContent(String content, Object state, Vector enumeration, boolean asBase) throws InvalidDatatypeValueException { // validate against parent type if any if (fBaseValidator instanceof DecimalDatatypeValidator) { // validate content as a base type ((Decim...
protected void checkContent(String content, Object state, Vector enumeration, boolean asBase) throws InvalidDatatypeValueException { // validate against parent type if any if (fBaseValidator instanceof DecimalDatatypeValidator) { // validate content as a base type ((Decim...
public void onClick(final AjaxRequestTarget target) { AjaxFallbackOrderByBorder.this.onAjaxClick(target); } }; addToBorder(link); addToBorder(new AjaxFallbackOrderByLink.CssModifier(link, cssProvider)); link.add(getBodyContainer()); }
public void onClick(final AjaxRequestTarget target) { AjaxFallbackOrderByBorder.this.onAjaxClick(target); } }; addToBorder(link); add(new AjaxFallbackOrderByLink.CssModifier(link, cssProvider)); link.add(getBodyContainer()); }
private static String getKeyToolPath() throws IOException { if (KEYTOOL_PATH == null) { throw new IOException("keytool application cannot be found"); } return "keytool"; }
private static String getKeyToolPath() throws IOException { if (KEYTOOL_PATH == null) { throw new IOException("keytool application cannot be found"); } return KEYTOOL_PATH; }
public void visit(HasAnnotation hasAnnotation) { // in Java: // foo.class.isAnnotationPresent(annotationClass); // in bytecode: // load var onto the stack (done for us later) // invokevirtual java/lang/Object.getClass:()Ljava/lang/Class // ldc_w annotationClass ...
public void visit(HasAnnotation hasAnnotation) { // in Java: // foo.class.isAnnotationPresent(annotationClass); // in bytecode: // load var onto the stack (done for us later) // invokevirtual java/lang/Object.getClass:()Ljava/lang/Class // ldc_w annotationClass ...
private static final String DEFAULT_DELIMITER = ","; // $NON_NLS-1$ /** * Read in the properties having to do with saving from a properties file. */ static { Properties props = JMeterUtils.getJMeterProperties(); _subresults = TRUE.equalsIgnoreCase(props.getProperty(SUBRESULTS_PROP, TRUE)); ...
private static final String DEFAULT_DELIMITER = ","; // $NON_NLS-1$ /** * Read in the properties having to do with saving from a properties file. */ static { Properties props = JMeterUtils.getJMeterProperties(); _subresults = TRUE.equalsIgnoreCase(props.getProperty(SUBRESULTS_PROP, TRUE)); ...
public static ConfigurableInjector getInjector() { if (injector == null) { throw new IllegalStateException( "InjectorHolder has not been assigned an injector. " + "Use SpringInjectorHolder.setInjector() to assign an injector. " + "In most cases this should be done once inside " + "Spr...
public static ConfigurableInjector getInjector() { if (injector == null) { throw new IllegalStateException( "InjectorHolder has not been assigned an injector. " + "Use InjectorHolder.setInjector() to assign an injector. " + "In most cases this should be done once inside " + "SpringWeb...
protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl) throws IOException, XNIException { // scan decl super.scanXMLDeclOrTextDecl(scanningTextDecl, fStrings); fMarkupDepth--; // pseudo-attribute values String version = fStrings[0]; String encoding ...
protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl) throws IOException, XNIException { // scan decl super.scanXMLDeclOrTextDecl(scanningTextDecl, fStrings); fMarkupDepth--; // pseudo-attribute values String version = fStrings[0]; String encoding ...
public static final native void TextureBrush_SetTransform(int brush, int matrix); }
public static final native int TextureBrush_SetTransform(int brush, int matrix); }
public void handleEvent(IContainerEvent event) { final IContainerManager containerManager = Activator.getDefault().getContainerManager(); if (containerManager == null) return; IContainer container = containerManager.getContainer(event.getLocalContainerID()); if (container == null) return; if (e...
public void handleEvent(IContainerEvent event) { final IContainerManager containerManager = Activator.getDefault().getContainerManager(); if (containerManager == null) return; IContainer container = containerManager.getContainer(event.getLocalContainerID()); if (container == null) return; if (e...
public void messageLogged(BuildEvent event) { Element messageElement = doc.createElement(MESSAGE_TAG); String name; switch(event.getPriority()) { case Project.MSG_ERR: name = "error"; break; case Project.MSG_WARN: name = "warn"; break; case Project.MSG_IN...
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 DummyPanelPage(final TestPanelSource testPanelSource) { testPanelSource.getTestPanel(TEST_PANEL_ID); }
public DummyPanelPage(final TestPanelSource testPanelSource) { testPanelSource.getTestPanel(this, TEST_PANEL_ID); }
public void execute() throws BuildException { if (dir == null) { throw new BuildException("dir attribute is required", location); } if (dir.isFile()) { throw new BuildException("Unable to create directory as a file already exists with that name: " + dir.getAbsolutePa...
public void execute() throws BuildException { if (dir == null) { throw new BuildException("dir attribute is required", location); } if (dir.isFile()) { throw new BuildException("Unable to create directory as a file already exists with that name: " + dir.getAbsolutePa...
public void getLocalpathCommand(Commandline cmd) { if (m_LocalPath == null) { return; } else { // make sure m_LocalDir exists, create it if it doesn't File dir = project.resolveFile(m_LocalPath); if (!dir.exists()) { boolean done = dir....
public void getLocalpathCommand(Commandline cmd) { if (m_LocalPath == null) { return; } else { // make sure m_LocalDir exists, create it if it doesn't File dir = project.resolveFile(m_LocalPath); if (!dir.exists()) { boolean done = dir....
public void setFullScreen (boolean fullScreen) { checkWidget(); if (this.fullScreen == fullScreen) return; int stateFlags = fullScreen ? OS.SW_SHOWMAXIMIZED : OS.SW_RESTORE; int styleFlags = OS.GetWindowLong (handle, OS.GWL_STYLE); int mask = SWT.TITLE | SWT.CLOSE | SWT.MIN | SWT.MAX; if ((style & mask) != 0) { ...
public void setFullScreen (boolean fullScreen) { checkWidget(); if (this.fullScreen == fullScreen) return; int stateFlags = fullScreen ? OS.SW_SHOWMAXIMIZED : OS.SW_RESTORE; int styleFlags = OS.GetWindowLong (handle, OS.GWL_STYLE); int mask = SWT.TITLE | SWT.CLOSE | SWT.MIN | SWT.MAX; if ((style & mask) != 0) { ...
public ISourceModule locateSourceModule(URI uri, IScriptProject project) { IPath projectLoc = project.getProject().getLocation(); IPath path = new Path(uri.getPath()); // only resolve file system locations that are located inside the project if (projectLoc.isPrefixOf(path)) { ...
public ISourceModule locateSourceModule(URI uri, IScriptProject project) { IPath projectLoc = project.getProject().getLocation(); IPath path = new Path(uri.getPath()); // only resolve file system locations that are located inside the project if (projectLoc.isPrefixOf(path)) { ...
public DateField(String id, IModel<Date> model) { super(id, model); get("hours").setVisible(false); get("minutes").setVisible(false); get("amOrPmChoice").setVisible(false); }
public DateField(String id, IModel<Date> model) { super(id, model); get("hours").setVisible(false); get("minutes").setVisible(false); get("amOrPmChoice").setVisibilityAllowed(false); }
public void run () { browser.traverse (SWT.TRAVERSE_TAB_PREVIOUS); } }); return XPCOM.NS_OK; } /* nsIContextMenuListener */ int /*long*/ OnShowContextMenu (int /*long*/ aContextFlags, int /*long*/ aEvent, int /*long*/ aNode) { nsIDOMEvent domEvent = new nsIDOMEvent (aEvent); int /*long*/[] result = n...
public void run () { browser.traverse (SWT.TRAVERSE_TAB_PREVIOUS); } }); return XPCOM.NS_OK; } /* nsIContextMenuListener */ int /*long*/ OnShowContextMenu (int /*long*/ aContextFlags, int /*long*/ aEvent, int /*long*/ aNode) { nsIDOMEvent domEvent = new nsIDOMEvent (aEvent); int /*long*/[] result = n...
public void m() { C.foo(); Tester.event("TypePat.Inner.m"); } } static aspect InnerA { before(): call(* Inner.*(..)) { Tester.event("InnerA.before: " + thisJoinPoint.getSignature().toShortString()); } } } class C { static void foo() {...
public void m() { C.foo(); Tester.event("TypePat.Inner.m"); } } static aspect InnerA { before(): call(* Inner.*(..)) { Tester.event("InnerA.before: " + thisJoinPoint.getSignature().toShortString()); } } } class C { static void foo() {...
public void run() { } } interface I { void run(); } class U { static final String before = "before(): "; static final String after = "after(): "; static final String afterReturning = "after() returning(): "; static final String afterThrowing = "after() throwing(): "; static final String c ...
public void run() { } } interface I { void run(); } class U { static final String before = "before(): "; static final String after = "after(): "; static final String afterReturning = "after() returning(): "; static final String afterThrowing = "after() throwing(): "; static final String c ...
public VEXCoreTestSuite() { super("VEX Core Tests"); addTestSuite(CssTest.class); addTestSuite(PropertyTest.class); addTestSuite(RuleTest.class); addTestSuite(SerializationTest.class); addTestSuite(BlockElementBoxTest.class); addTestSuite(DFABuilderTest.class); addTestSuite(DocumentWriterTest.class); ...
public VEXCoreTestSuite() { super("VEX Core Tests"); addTestSuite(CssTest.class); addTestSuite(PropertyTest.class); addTestSuite(RuleTest.class); addTestSuite(SerializationTest.class); addTestSuite(BlockElementBoxTest.class); addTestSuite(DFABuilderTest.class); addTestSuite(DocumentWriterTest.class); ...
public void testRenderHomePage_7() throws Exception { // executeTest(SimplePage_7.class, "SimplePageExpectedResult_7.html"); }
public void testRenderHomePage_7() throws Exception { executeTest(SimplePage_7.class, "SimplePageExpectedResult_7.html"); }
public void invokeAction(int action) { checkWidget(); updateCaretDirection = true; switch (action) { // Navigation case ST.LINE_UP: doLineUp(false); clearSelection(true); break; case ST.LINE_DOWN: doLineDown(false); clearSelection(true); break; case ST.LINE_START: doLineStart(); clear...
public void invokeAction(int action) { checkWidget(); updateCaretDirection = true; switch (action) { // Navigation case ST.LINE_UP: doLineUp(false); clearSelection(true); break; case ST.LINE_DOWN: doLineDown(false); clearSelection(true); break; case ST.LINE_START: doLineStart(); clear...
protected void onComponentTag(final ComponentTag tag) { // Default handling for tag super.onComponentTag(tag); // Set href to link to this link's linkClicked method CharSequence url = getURL(); // append any anchor url = appendAnchor(tag, url); // If we're disabled if (!isEnabled()) { disableL...
protected void onComponentTag(final ComponentTag tag) { // Default handling for tag super.onComponentTag(tag); // Set href to link to this link's linkClicked method CharSequence url = getURL(); // append any anchor url = appendAnchor(tag, url); // If we're disabled if (!isEnabled()) { disableL...
String ROLE = AspectManager.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apac...
String ROLE = AspectManager.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apac...
String ROLE = ProjectBuilder.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apa...
String ROLE = ProjectBuilder.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apa...
String ROLE = ConverterRegistry.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org....
String ROLE = ConverterRegistry.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org....
String ROLE = MasterConverter.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.ap...
String ROLE = MasterConverter.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.ap...
String ROLE = Deployer.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.my...
String ROLE = Deployer.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.my...
String ROLE = Embeddor.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.my...
String ROLE = Embeddor.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.my...
String ROLE = ExtensionManager.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org....
String ROLE = ExtensionManager.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org....
String ROLE = Project.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.myr...
String ROLE = Project.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.myr...
String ROLE = RoleManager.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apach...
String ROLE = RoleManager.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apach...
String ROLE = TypeManager.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache...
String ROLE = TypeManager.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache...
String ROLE = Workspace.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.m...
String ROLE = Workspace.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.m...
protected Credentials getNTLMCredentials(Proxy lp) { if (hasForceNTLMProxyOption()) return HttpClientRetrieveFileTransfer.createNTLMCredentials(lp); return null; } }; // setup authentication setupAuthentication(urlString); // setup https host and port setupHostAndPort(credProvider, urlStri...
protected Credentials getNTLMCredentials(Proxy lp) { if (hasForceNTLMProxyOption()) return HttpClientRetrieveFileTransfer.createNTLMCredentials(lp); return null; } }; // setup authentication setupAuthentication(urlString); // setup https host and port setupHostAndPort(credProvider, urlStri...
protected void openStreams() throws IncomingFileTransferException { Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "openStreams"); //$NON-NLS-1$ final String urlString = getRemoteFileURL().toString(); this.doneFired = false; int code = -1; try { httpClient.getHttpCo...
protected void openStreams() throws IncomingFileTransferException { Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "openStreams"); //$NON-NLS-1$ final String urlString = getRemoteFileURL().toString(); this.doneFired = false; int code = -1; try { httpClient.getHttpCo...
public ImagesApplication() { getPages().setHomePage(Home.class); addResource("cancelButton", new DefaultButtonImageResource("Cancel")); }
public ImagesApplication() { getPages().setHomePage(Home.class); getSharedResources().add("cancelButton", new DefaultButtonImageResource("Cancel")); }
public LinkomaticApplication() { getPages().setHomePage(Home.class); addResource("cancelButton", new DefaultButtonImageResource("Cancel")); }
public LinkomaticApplication() { getPages().setHomePage(Home.class); getSharedResources().add("cancelButton", new DefaultButtonImageResource("Cancel")); }
public final Resource getResource() { return getApplication().getResource(Application.class, getId(), getLocale(), getStyle()); }
public final Resource getResource() { return getApplication().getSharedResources().get(Application.class, getId(), getLocale(), getStyle()); }
private boolean resourceReference() { final String pathInfo = getWebRequest().getPathInfo(); if (pathInfo.startsWith(resourceReferencePrefix)) { final String resourceReferenceKey = pathInfo.substring(resourceReferencePrefix.length()); final Resource resource = getApplication().getResource(resourceReferenc...
private boolean resourceReference() { final String pathInfo = getWebRequest().getPathInfo(); if (pathInfo.startsWith(resourceReferencePrefix)) { final String resourceReferenceKey = pathInfo.substring(resourceReferencePrefix.length()); final Resource resource = getApplication().getSharedResources().get(res...
public void onActivate(IBreadCrumbParticipant previous) { if (previous != null) { MarkupContainer parent = previous.getComponent().getParent(); parent.replace(this); } }
public void onActivate(IBreadCrumbParticipant previous) { if (previous != null) { MarkupContainer parent = previous.getComponent().getParent(); this.reattach(); } }
public final void setContentModel(IModel content) { this.content = content; replace(new Label(this,"content", content).setEscapeModelStrings(!allowHtml)); }
public final void setContentModel(IModel content) { this.content = content; new Label(this,"content", content).setEscapeModelStrings(!allowHtml); }
public void calculateValue(Select sel, ExpContext ctx, ExpState state, Val other, ExpState otherState) { SimpleCaseExpState cstate = (SimpleCaseExpState) state; _caseOperand.calculateValue(sel, ctx, cstate.states[0], other, otherState); for (int i = 0; i < _exp.length; i+...
public void calculateValue(Select sel, ExpContext ctx, ExpState state, Val other, ExpState otherState) { SimpleCaseExpState cstate = (SimpleCaseExpState) state; _caseOperand.calculateValue(sel, ctx, cstate.states[0], other, otherState); for (int i = 0; i < _exp.length; i+...
protected PerformanceMeter createMeter(String id) { Performance performance = Performance.getDefault(); String scenarioId = "org.eclipse.swt.test." + id; PerformanceMeter meter = performance.createPerformanceMeter(scenarioId); performance.tagAsSummary(meter, id, Dimension.CPU_TIME); return meter; }
protected PerformanceMeter createMeter(String id) { Performance performance = Performance.getDefault(); String scenarioId = "org.eclipse.swt.test." + id; PerformanceMeter meter = performance.createPerformanceMeter(scenarioId); performance.tagAsSummary(meter, id, Dimension.ELAPSED_PROCESS); return meter; }
protected void setMapKeyColumn(FieldMapping fm, MappingInfo info, Column col, int unique) { List cols = new ArrayList(); cols.add(col); info.setColumns(cols); if (unique == TRUE) info.setUnique(new org.apache.openjpa.jdbc.schema.Unique()); }
protected void setMapKeyColumn(FieldMapping fm, MappingInfo info, Column col, int unique) { List<Column> cols = new ArrayList<Column>(); cols.add(col); info.setColumns(cols); if (unique == TRUE) info.setUnique(new org.apache.openjpa.jdbc.schema.Unique()); }
public Pointcut concretize1(ResolvedTypeX searchStart, IntMap bindings) { if (concretizing) { Thread.currentThread().dumpStack(); searchStart.getWorld().getMessageHandler().handleMessage( MessageUtil.error("circular pointcut declaration involving: " + this, getSourceLocation())); return Pointcu...
public Pointcut concretize1(ResolvedTypeX searchStart, IntMap bindings) { if (concretizing) { //Thread.currentThread().dumpStack(); searchStart.getWorld().getMessageHandler().handleMessage( MessageUtil.error("circular pointcut declaration involving: " + this, getSourceLocation())); return Point...
package wicket.ajax; /** * */ package wicket.markup.html.form.ajax; /** * @author jcompagner * */ public interface IAjaxListener { }
package wicket.ajax; /** * */ package wicket.ajax; /** * @author jcompagner * */ public interface IAjaxListener { }
public void connect(ID remote, IConnectContext joinContext) throws ContainerConnectException { // first notify synchonously fireContainerEvent(new SharedObjectContainerConnectingEvent( this.getID(), remote, joinContext)); try { if (isClosing) throw new IllegalStateException("container is closing");...
public void connect(ID remote, IConnectContext joinContext) throws ContainerConnectException { // first notify synchonously fireContainerEvent(new SharedObjectContainerConnectingEvent( this.getID(), remote, joinContext)); try { if (isClosing) throw new IllegalStateException("container is closing");...
protected Collection findRemoteContainersSatisfyingRequiredIntents( String[] remoteRequiresIntents) { List results = new ArrayList(); IContainer[] containers = Activator.getDefault().getContainerManager() .getAllContainers(); if (containers == null || containers.length == 0) return null; for (int i =...
protected Collection findRemoteContainersSatisfyingRequiredIntents( String[] remoteRequiresIntents) { List results = new ArrayList(); IContainer[] containers = Activator.getDefault().getContainerManager() .getAllContainers(); if (containers == null || containers.length == 0) return results; for (int ...
public void testTreeConversion() throws Exception { HashTree tree = new ListedHashTree(); JMeterGUIComponent root = new org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui(); tree.add(root,root); tree.getTree(root).add(root,root); save.convertSubTree(tree); assertEquals(tree.getArray()[0...
public void testTreeConversion() throws Exception { HashTree tree = new ListedHashTree(); JMeterGUIComponent root = new org.apache.jmeter.config.gui.ArgumentsPanel(); tree.add(root,root); tree.getTree(root).add(root,root); save.convertSubTree(tree); assertEquals(tree.getArray()[0].getClass().getNa...
public final void println(final String string) { write(string); write(Strings.LINE_SEPARATOR); } }
public final void println(final CharSequence string) { write(string); write(Strings.LINE_SEPARATOR); } }
protected static final int SO_TIMEOUT = JMeterUtils.getPropDefault("httpclient.timeout", -1); static { if (NONPROXY_HOSTS.length() > 0){ StringTokenizer s = new StringTokenizer(NONPROXY_HOSTS,"|");// $NON-NLS-1$ while (s.hasMoreTokens()){ String t = s.nextToken()...
protected static final int SO_TIMEOUT = JMeterUtils.getPropDefault("httpclient.timeout", -1); static { if (NONPROXY_HOSTS.length() > 0){ StringTokenizer s = new StringTokenizer(NONPROXY_HOSTS,"|");// $NON-NLS-1$ while (s.hasMoreTokens()){ String t = s.nextToken()...
public Method getAdvice() { if (adviceMethod == null) { try { adviceMethod = declaringType.getDeclaredMethod(getName(),getParameterTypes()); } catch (Exception ex) { ; // nothing we can do, caller will see null } } return adviceMethod; }
public Method getAdvice() { if (adviceMethod == null) { try { adviceMethod = getDeclaringType().getDeclaredMethod(getName(),getParameterTypes()); } catch (Exception ex) { ; // nothing we can do, caller will see null } } return adviceMethod; }
public Method getMethod() { if (method == null) { try { method = declaringType.getDeclaredMethod(getName(),getParameterTypes()); } catch (NoSuchMethodException nsmEx) { ; // nothing we can do, user will see null return } } return method; }
public Method getMethod() { if (method == null) { try { method = getDeclaringType().getDeclaredMethod(getName(),getParameterTypes()); } catch (NoSuchMethodException nsmEx) { ; // nothing we can do, user will see null return } } return method; }
private String getFileString(String filename) throws IOException { Reader r = null; try { r = new FileReader(getProject().resolveFile(filename)); return FileUtils.readFully(r); } finally { try {r.close();} catch (Throwable ignore) {} ...
private String getFileString(String filename) throws IOException { Reader r = null; try { r = new FileReader(getProject().resolveFile(filename)); return FileUtils.readFully(r); } finally { FileUtils.close(r); } }
protected void logError(int code, String method, Throwable e) { Activator.getDefault().getLog().log( new Status(IStatus.ERROR, Activator.PLUGIN_ID, code, getSharedObjectAsString(method), e)); }
protected void logError(int code, String method, Throwable e) { Activator.getDefault().log( new Status(IStatus.ERROR, Activator.PLUGIN_ID, code, getSharedObjectAsString(method), e)); }
private static Logger log = LoggingManager.getLoggerFor("jorphan.collections");
private static Logger log = LoggingManager.getLoggerForClass();
private static boolean hasClassExtension(String name) { return name.toLowerCase().endsWith((".class")); } }
/* private */ static boolean hasClassExtension(String name) { return name.toLowerCase().endsWith((".class")); } }
private Markup loadMarkup(final Application application, final String key, final Resource markupResource) throws ParseException, IOException, ResourceNotFoundException { final Markup markup = application.getMarkupParser(getPage()).read(markupResource); markupCache.put(key, markup); return markup; }
private Markup loadMarkup(final Application application, final String key, final Resource markupResource) throws ParseException, IOException, ResourceNotFoundException { final Markup markup = application.getMarkupParser().read(markupResource, getPage()); markupCache.put(key, markup); return markup; }
public int open () { /* Compute the dialog title */ /* * Feature in Motif. It is not possible to set a shell * title to an empty string. The fix is to set the title * to be a single space. */ String string = title; if (string.length () == 0) string = " "; //$NON-NLS-1$ /* Use the character encoding for the ...
public int open () { /* Compute the dialog title */ /* * Feature in Motif. It is not possible to set a shell * title to an empty string. The fix is to set the title * to be a single space. */ String string = title; if (string.length () == 0) string = " "; //$NON-NLS-1$ /* Use the character encoding for the ...
public Object resolveValue( final String value ) throws TaskException { try { if( null == m_propertyResolver ) { m_propertyResolver = (PropertyResolver)getService( PropertyResolver.class ); } final Object object = ...
public Object resolveValue( final String value ) throws TaskException { try { if( null == m_propertyResolver ) { m_propertyResolver = (PropertyResolver)getService( PropertyResolver.class ); } final Object object = ...
public void testUndefinedProp() throws Exception { final String undefinedProp = "undefinedProperty"; final String propRef = "${" + undefinedProp + "}"; doTestResolution( propRef, propRef, m_store ); }
public void testUndefinedProp() throws Exception { final String undefinedProp = "undefinedProperty"; final String propRef = "${" + undefinedProp + "}"; doTestResolution( propRef, propRef, m_context ); }
public void testInsert() { Parent parent = createData(getPersistOrder(), 3); validateData(parent.getId(), 3); // verification can be challenging under multiple configuration options // see the methods as exemplars how verification can vary based on // configuration. assertLogicalOrPhysicalFore...
public void testInsert() { Parent parent = createData(getPersistOrder(), 3); validateData(parent.getId(), 3); // verification can be challenging under multiple configuration options // see the methods as exemplars how verification can vary based on // configuration. assertLogicalOrPhysicalFore...
public String getString() { return EXPECTED_RESULT; }
public String getString() { return RESULT; }
public void setSelection (int value) { checkWidget(); int [] argList = { OS.XmNminimum, 0, OS.XmNmaximum, 0, }; OS.XtGetValues (handle, argList, argList.length / 2); int minimum = argList [1]; int maximum = argList [3]; int selection = value; if (selection < minimum) selection = minimum; if (selection > m...
public void setSelection (int value) { checkWidget(); int [] argList = { OS.XmNminimum, 0, OS.XmNmaximum, 0, }; OS.XtGetValues (handle, argList, argList.length / 2); int minimum = argList [1]; int maximum = argList [3]; int selection = value; if (selection < minimum) selection = minimum; if (selection > m...
public String getAuthHeaderForURL(URL url) { Authorization auth = getAuthForURL(url); if (auth == null) return null; return "Basic " + Base64Encoder.encode(auth.getUser() + ":" + auth.getPass()); }
public String getAuthHeaderForURL(URL url) { Authorization auth = getAuthForURL(url); if (auth == null) return null; return auth.toBasicHeader(); }
private static final String RETURN_URL_PARAM = "ret"; static final Vector<BarcodeFormat> PRODUCT_FORMATS; static final Vector<BarcodeFormat> ONE_D_FORMATS; static final Vector<BarcodeFormat> QR_CODE_FORMATS; static final Vector<BarcodeFormat> ALL_FORMATS; static { PRODUCT_FORMATS = new Vector<BarcodeF...
private static final String RETURN_URL_PARAM = "ret"; static final Vector<BarcodeFormat> PRODUCT_FORMATS; static final Vector<BarcodeFormat> ONE_D_FORMATS; static final Vector<BarcodeFormat> QR_CODE_FORMATS; static final Vector<BarcodeFormat> ALL_FORMATS; static { PRODUCT_FORMATS = new Vector<BarcodeF...
public void respond(RequestCycle requestCycle) { Url currentUrl = requestCycle.getUrlRenderer().getBaseUrl(); Url targetUrl = requestCycle.mapUrlFor(getRenderPageRequestHandler()); // // the code below is little hairy but we have to handle 3 redirect policies, // 3 rendering strategies and two kind of requ...
public void respond(RequestCycle requestCycle) { Url currentUrl = requestCycle.getUrlRenderer().getBaseUrl(); Url targetUrl = requestCycle.mapUrlFor(getRenderPageRequestHandler()); // // the code below is little hairy but we have to handle 3 redirect policies, // 3 rendering strategies and two kind of requ...
protected void cloneContent(NamedNodeMapImpl srcmap) { if (srcmap.nodes != null) { nodes = new Vector(srcmap.nodes.size()); for (int i = 0; i < srcmap.nodes.size(); ++i) { NodeImpl n = (NodeImpl) srcmap.nodes.elementAt(i); NodeImpl clone = (NodeImpl) n.cl...
protected void cloneContent(NamedNodeMapImpl srcmap) { if (srcmap.nodes != null) { nodes = new Vector(srcmap.nodes.size()); for (int i = 0; i < srcmap.nodes.size(); ++i) { NodeImpl n = (NodeImpl) srcmap.nodes.elementAt(i); NodeImpl clone = (NodeImpl) n.cl...
private static void outputThrowable(Throwable cause, AppendingStringBuffer sb, boolean stopAtWicketServlet) { sb.append(cause); sb.append("\n"); StackTraceElement[] trace = cause.getStackTrace(); for (int i=0; i < trace.length; i++) { String traceString = trace[i].toString(); if(!traceString.startsWit...
private static void outputThrowable(Throwable cause, AppendingStringBuffer sb, boolean stopAtWicketServlet) { sb.append(cause); sb.append("\n"); StackTraceElement[] trace = cause.getStackTrace(); for (int i=0; i < trace.length; i++) { String traceString = trace[i].toString(); if(!(traceString.startsWi...
public void addArgument(Argument arg) { TestElementProperty newArg = new TestElementProperty(arg.getName(), arg); if (isRunningVersion()) { newArg.setTemporary(true, this); } getArguments().addItem(newArg); }
public void addArgument(Argument arg) { TestElementProperty newArg = new TestElementProperty(arg.getName(), arg); if (isRunningVersion()) { this.setTemporary(newArg); } getArguments().addItem(newArg); }
public PropertyIterator iterator() { return new PropertyIteratorImpl(value); }
public PropertyIterator iterator() { return getIterator(value); }
public PropertyIterator valueIterator() { return new PropertyIteratorImpl(value.values()); }
public PropertyIterator valueIterator() { return getIterator(value.values()); }
public void queryQualifiedId(boolean inMemory) throws Exception { EntityManager em = emf.createEntityManager(); String query = "select KEY(e) from Company c, " + " in (c.organization) e order by c.id"; Query q = em.createQuery(query); if (inMemory) setCandid...
public void queryQualifiedId(boolean inMemory) throws Exception { EntityManager em = emf.createEntityManager(); String query = "select KEY(e) from Company c, " + " in (c.organization) e order by c.id"; Query q = em.createQuery(query); if (inMemory) setCandid...
private static boolean checkSimpleDerivation(XSSimpleType derived, XSSimpleType base, short block) { // 1 They are the same type definition. if (derived == base) return true; // 2 All of the following must be true: // 2.1 restriction is not in the subset, or in the {fina...
private static boolean checkSimpleDerivation(XSSimpleType derived, XSSimpleType base, short block) { // 1 They are the same type definition. if (derived == base) return true; // 2 All of the following must be true: // 2.1 restriction is not in the subset, or in the {fina...
private void mergeAttributes(XSAttributeGroupDecl fromAttrGrp, XSAttributeGroupDecl toAttrGrp, String typeName, boolean extension, Element elem) throws ComplexTypeRecoverableError ...
private void mergeAttributes(XSAttributeGroupDecl fromAttrGrp, XSAttributeGroupDecl toAttrGrp, String typeName, boolean extension, Element elem) throws ComplexTypeRecoverableError ...
static String A_CONST="bla"; // default visibility - will be OK, TestNPE is in the same package package a; public class Consts { static String A_CONST="bla"; }
static String A_CONST="bla"; // default visibility - will be OK, TestNPE is in the same package package a; public class Consts { static String A_CONST="bla"; // default visibility - will be OK, TestNPE is in the same package }
public void clearGui() { super.clearGui(); tableModel.clearData(); clearEachIteration.setSelected(false); policy.setSelectedIndex(policies.length - 1); deleteButton.setEnabled(false); saveButton.setEnabled(false); }
public void clearGui() { super.clearGui(); tableModel.clearData(); clearEachIteration.setSelected(false); policy.setText(CookieManager.DEFAULT_POLICY); deleteButton.setEnabled(false); saveButton.setEnabled(false); }
public void execute() throws BuildException { if (baseDir == null && filesets.size() == 0) throw new BuildException("basedir attribute must be set, or at least one fileset must be given!"); Vector dss = new Vector (); if (baseDir != null) dss.addElement(getDirectoryS...
public void execute() throws BuildException { if (baseDir == null && filesets.size() == 0 && "zip".equals(archiveType)) throw new BuildException("basedir attribute must be set, or at least one fileset must be given!"); Vector dss = new Vector (); if (baseDir != null) ...
protected CharSequence getPreconditionScript() { return "return Wicket.$$(this)"; }
protected CharSequence getPreconditionScript() { return "return Wicket.$('" + getComponent().getMarkupId() + "') != null;"; }
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget (); int width = 0, height = 0; if (wHint == SWT.DEFAULT) { if (columnCount != 0) { for (int i=0; i<columnCount; i++) { width += columns [i].getWidth (); } } else { // int levelIndent = DISCLOSURE_COLUMN_LEVEL_INDENT; // ...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget (); int width = 0, height = 0; if (wHint == SWT.DEFAULT) { if (columnCount != 0) { for (int i=0; i<columnCount; i++) { width += columns [i].getWidth (); } } else { // int levelIndent = DISCLOSURE_COLUMN_LEVEL_INDENT; // ...
public void testNoStatus() throws Exception { status = of.parseString("<a></a>"); assertNotNull(status); }
public void testNoStatus() throws Exception { status = of.parseString("<a></a>"); assertNull(status); }
protected void internalInit() { super.internalInit(); InjectorHolder.setInjector(new AnnotSpringInjector(getSpringContextLocator())); add(new ComponentInjector()); }
protected void internalInit() { super.internalInit(); InjectorHolder.setInjector(new AnnotSpringInjector(getSpringContextLocator())); addComponentInstantiationListener(new ComponentInjector()); }
public String toString() { return "[" + Classes.name(getClass()) + " " + getPath() + " isVisible = " + isVisible() + ", isVersioned = " + isVersioned() + "]"; }
public String toString() { return "[" + getPath() + "." + Classes.name(getClass()) + " isVisible = " + isVisible() + ", isVersioned = " + isVersioned() + "]"; }