buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public ShadowMunger parameterizeWith(ResolvedType declaringType,Map typeVariableMap) { Checker ret = new Checker( getPointcut().parameterizeWith(typeVariableMap), getStart(), getEnd(), this.sourceContext); ret.msg = this.msg; ret.isError = this.isError; return ret; }
public ShadowMunger parameterizeWith(ResolvedType declaringType,Map typeVariableMap) { Checker ret = new Checker( getPointcut().parameterizeWith(typeVariableMap,declaringType.getWorld()), getStart(), getEnd(), this.sourceContext); ret.msg = this.msg; ret.isError = this.isError; retu...
public ResolvedMemberImpl parameterizedWith(UnresolvedType[] typeParameters, ResolvedType newDeclaringType, boolean isParameterized) { TypeVariable[] typeVariables = getDeclaringType().resolve(newDeclaringType.getWorld()).getTypeVariables(); if (isParameterized && (typeVariables.length != typeParameters.length)) {...
public ResolvedMemberImpl parameterizedWith(UnresolvedType[] typeParameters, ResolvedType newDeclaringType, boolean isParameterized) { TypeVariable[] typeVariables = getDeclaringType().resolve(newDeclaringType.getWorld()).getTypeVariables(); if (isParameterized && (typeVariables.length != typeParameters.length)) {...
public ShadowMunger parameterizeWith(ResolvedType declaringType,Map typeVariableMap) { Pointcut pc = getPointcut().parameterizeWith(typeVariableMap); BcelAdvice ret = null; Member adviceSignature = signature; // allows for around advice where the return value is a type variable (see pr115250) if (signat...
public ShadowMunger parameterizeWith(ResolvedType declaringType,Map typeVariableMap) { Pointcut pc = getPointcut().parameterizeWith(typeVariableMap,declaringType.getWorld()); BcelAdvice ret = null; Member adviceSignature = signature; // allows for around advice where the return value is a type variable (s...
protected void removeDir(File d) { String[] list = d.list(); if (list == null) { list = new String[0]; } for (int i = 0; i < list.length; i++) { String s = list[i]; File f = new File(d, s); if (f.isDirectory()) { removeD...
protected void removeDir(File d) { String[] list = d.list(); if (list == null) { list = new String[0]; } for (int i = 0; i < list.length; i++) { String s = list[i]; File f = new File(d, s); if (f.isDirectory()) { removeD...
public void setText (String string) { checkWidget (); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); /* Use the character encoding for the default locale */ TCHAR buffer = new TCHAR (0, string, true); /* Ensure that the title appears in the task bar.*/ if ((state & FOREIGN_HANDLE) != 0) { int /*long*/ hHe...
public void setText (String string) { checkWidget (); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); /* Use the character encoding for the default locale */ TCHAR buffer = new TCHAR (0, string, true); /* Ensure that the title appears in the task bar.*/ if ((state & FOREIGN_HANDLE) != 0) { int /*long*/ hHe...
public void setDriver(String driver) { this.driver = driver; }
public void setDriver(String driver) { this.driver = driver.trim(); }
public void setRunning(boolean running, String host) { log.info("setRunning(" + running + "," + host + ")"); Iterator<JMenuItem> iter = remote_engine_start.iterator(); Iterator<JMenuItem> iter2 = remote_engine_stop.iterator(); Iterator<JMenuItem> iter3 = remote_engine_exit.iterator(...
public void setRunning(boolean running, String host) { log.info("setRunning(" + running + "," + host + ")"); Iterator<JMenuItem> iter = remote_engine_start.iterator(); Iterator<JMenuItem> iter2 = remote_engine_stop.iterator(); Iterator<JMenuItem> iter3 = remote_engine_exit.iterator(...
private Collection<Function> getCandidates (Object... params) { final FunctionDefContextImpl fdc = (FunctionDefContextImpl) createEmptyFdc (new CompositeTypesystem ()); return new PolymorphicResolver (new QualifiedName ("operatorPlus")).getBestFitCandidates (fdc.findFunctionCandidates (new Qualified...
private Collection<Function> getCandidates (Object... params) { final FunctionDefContextImpl fdc = (FunctionDefContextImpl) createEmptyFdc (new CompositeTypesystem ()); return new PolymorphicResolver (new QualifiedName ("operatorPlus")).getBestFitCandidates (fdc.findFunctionCandidates (new Qualified...
public ID[] getGroupMemberIDs() { return groupMemberIDs; }
public ID[] getGroupMemberIDs() { return (groupMemberIDs==null)?new ID[0]:groupMemberIDs; }
public ID[] getSharedObjectReceiverIDs() { return sharedObjectReceiverIDs; }
public ID[] getSharedObjectReceiverIDs() { return (sharedObjectReceiverIDs==null)?new ID[0]:sharedObjectReceiverIDs; }
private void checkIncludePatterns() { Hashtable newroots = new Hashtable(); // put in the newroots vector the include patterns without // wildcard tokens for (int icounter = 0; icounter < includes.length; icounter++) { newroots.put(SelectorUtils.rtrimWildcardTokens( ...
private void checkIncludePatterns() { Hashtable newroots = new Hashtable(); // put in the newroots vector the include patterns without // wildcard tokens for (int icounter = 0; icounter < includes.length; icounter++) { newroots.put(SelectorUtils.rtrimWildcardTokens( ...
private void signOneJar(File jarSource, File jarTarget) throws BuildException { File targetFile = jarTarget; if (targetFile == null) { targetFile = jarSource; } if (isUpToDate(jarSource, targetFile)) { return; } long lastModified...
private void signOneJar(File jarSource, File jarTarget) throws BuildException { File targetFile = jarTarget; if (targetFile == null) { targetFile = jarSource; } if (isUpToDate(jarSource, targetFile)) { return; } long lastModified...
protected boolean check(ResourceCollection rc) { boolean upToDate = true; if (isFileFileSet(rc)) { FileSet fs = (FileSet) rc; upToDate = check(fs.getDir(getProject()), getFileNames(fs)); } else if (!rc.isFilesystemOnly() && !supportsNonFileResources()) { t...
protected boolean check(ResourceCollection rc) { boolean upToDate = true; if (isFileFileSet(rc)) { FileSet fs = (FileSet) rc; upToDate = check(fs.getDir(getProject()), getFileNames(fs)); } else if (!rc.isFilesystemOnly() && !supportsNonFileResources()) { t...
public boolean eval() { if (file == null) { throw new BuildException("The file attribute must be set."); } if (file != null && !file.exists()) { log("The file \"" + file.getAbsolutePath() + "\" does not exist.", Project.MSG_VERBOSE); return...
public boolean eval() { if (file == null) { throw new BuildException("The file attribute must be set."); } if (!file.exists()) { log("The file \"" + file.getAbsolutePath() + "\" does not exist.", Project.MSG_VERBOSE); return false; ...
public void execute() throws BuildException { validateAttributes(); //TODO: use ANTLR to parse the grammar file to do this. File generatedFile = getGeneratedFile(); boolean targetIsOutOfDate = targetFile.lastModified() > generatedFile.lastModified(); boolean supe...
public void execute() throws BuildException { validateAttributes(); //TODO: use ANTLR to parse the grammar file to do this. File generatedFile = getGeneratedFile(); boolean targetIsOutOfDate = targetFile.lastModified() > generatedFile.lastModified(); boolean supe...
private void determineDependencies() throws IOException { affectedClassMap = new Hashtable(); classFileInfoMap = new Hashtable(); boolean cacheDirty = false; Hashtable dependencyMap = new Hashtable(); File cacheFile = null; boolean cacheFileExists = true; lon...
private void determineDependencies() throws IOException { affectedClassMap = new Hashtable(); classFileInfoMap = new Hashtable(); boolean cacheDirty = false; Hashtable dependencyMap = new Hashtable(); File cacheFile = null; boolean cacheFileExists = true; lon...
public synchronized boolean isFilesystemOnly() { if (isReference()) { return ((BaseResourceCollectionContainer) getCheckedRef()).isFilesystemOnly(); } dieOnCircularReference(); //first the easy way, if all children are filesystem-only, return true: boolean goEarly...
public synchronized boolean isFilesystemOnly() { if (isReference()) { return ((BaseResourceCollectionContainer) getCheckedRef()).isFilesystemOnly(); } dieOnCircularReference(); //first the easy way, if all children are filesystem-only, return true: boolean goEarly...
protected synchronized boolean contains(FileNameMapper fileNameMapper) { boolean foundit = false; for (Iterator iter = mappers.iterator(); iter.hasNext() && !foundit;) { FileNameMapper next = (FileNameMapper) (iter.next()); foundit |= (next == fileNameMapper |...
protected synchronized boolean contains(FileNameMapper fileNameMapper) { boolean foundit = false; for (Iterator iter = mappers.iterator(); iter.hasNext() && !foundit;) { FileNameMapper next = (FileNameMapper) (iter.next()); foundit = (next == fileNameMapper ||...
public void testStatelessComponentPage() throws Exception { executeTest(StatelessComponentPage.class, "StatelessComponentPage_result.html"); tester.setupRequestAndResponse(); tester .getServletRequest() .setURL( "/WicketTester$DummyWebApplication/WicketTester$DummyWebApplication?wicket:bookmarkab...
public void testStatelessComponentPage() throws Exception { executeTest(StatelessComponentPage.class, "StatelessComponentPage_result.html"); tester.setupRequestAndResponse(); tester .getServletRequest() .setURL( "/WicketTester$DummyWebApplication/WicketTester$DummyWebApplication?wicket:bookmarkab...
private final void write(String input, boolean newline) throws IOException { byte[] bytes = newline ? (input + "\r\n").getBytes() : input.getBytes(); //$NON-NLS-1$ os.write(bytes); os.flush(); } /** * This method is synonymous with {@link #write(String, boolean)} with the * exception that this method will...
private final void write(String input, boolean newline) throws IOException { byte[] bytes = newline ? (input + "\r\n").getBytes() : input.getBytes(); //$NON-NLS-1$ os.write(bytes); os.flush(); } /** * This method is synonymous with {@link #write(String, boolean)} with the * exception that this method will...
protected void onEndRequest() { onEndRequestWasCalledOnAutoAddedComponent = true; } }; label.autoAdded(); return true; } return false; } }
protected void onAfterRender() { onEndRequestWasCalledOnAutoAddedComponent = true; } }; label.autoAdded(); return true; } return false; } }
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { MarkupContainer parent = container; while ((parent != null) && (parent.isTransparent())) { // Try to find the component with the parent component. parent = parent.getParent(); if (paren...
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { MarkupContainer parent = container; while ((parent != null) && (parent.isTransparentResolver())) { // Try to find the component with the parent component. parent = parent.getParent(); i...
private boolean validating = false; DocumentBuilderImpl(DocumentBuilderFactory dbf) throws ParserConfigurationException { this.dbf = dbf; domParser = new DOMParser(); try { // Validation validating = dbf.isValidating(); String validation...
private boolean validating = false; DocumentBuilderImpl(DocumentBuilderFactory dbf) throws ParserConfigurationException { this.dbf = dbf; domParser = new DOMParser(); try { // Validation validating = dbf.isValidating(); String validation...
public void testWindowsLineSeparator2() throws IOException { reg.setPattern("end of text\r$"); // assertTrue("Windows line separator", reg.matches("end of text\r\n")); }
public void testWindowsLineSeparator2() throws IOException { reg.setPattern("end of text\r$"); assertTrue("Windows line separator", reg.matches("end of text\r\n")); }
public void execute() throws BuildException { Touch touch = (Touch) project.createTask("touch"); touch.setTarget(target); File srcF=project.resolveFile(source); File dir=project.resolveFile(dest); ZipInputStream zis = null; try { log("Expanding: ...
public void execute() throws BuildException { Touch touch = (Touch) project.createTask("touch"); touch.setOwningTarget(target); File srcF=project.resolveFile(source); File dir=project.resolveFile(dest); ZipInputStream zis = null; try { log("Expan...
public void execute() throws BuildException { Touch touch = (Touch) project.createTask("touch"); touch.setTarget(target); File srcF=project.resolveFile(source); TarInputStream tis = null; try { if (source == null) { throw new...
public void execute() throws BuildException { Touch touch = (Touch) project.createTask("touch"); touch.setOwningTarget(target); File srcF=project.resolveFile(source); TarInputStream tis = null; try { if (source == null) { thr...
public void setEditable(boolean editable) { choiceList.setEditable(false); }
public void setEditable(boolean editable) { choiceList.setEditable(false);//TODO - is this correct? }
public static XpandFacade create(XpandExecutionContextImpl execCtx) { return new XpandFacade(execCtx); } }
public static XpandFacade create(XpandExecutionContext execCtx) { return new XpandFacade(execCtx); } }
public int hashCode () { return pixmap; } void init(Device device, int width, int height) { this.device = device; if (width <= 0 | height <= 0) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } /* Create the pixmap */ this.type = SWT.BITMAP; int xDisplay = device.xDisplay; int screen = OS.XDefaultScreenOfDisplay(xD...
public int hashCode () { return pixmap; } void init(Device device, int width, int height) { this.device = device; if (width <= 0 || height <= 0) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } /* Create the pixmap */ this.type = SWT.BITMAP; int xDisplay = device.xDisplay; int screen = OS.XDefaultScreenOfDisplay(x...
public boolean getSelection () { checkWidget(); if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return false; int [] argList = {OS.XmNset, 0}; OS.XtGetValues (handle, argList, argList.length / 2); return argList [1] != OS.XmUNSET; } void hookEvents () { if ((style & SWT.SEPARATOR) != 0) return; int windowProc = disp...
public boolean getSelection () { checkWidget(); if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return false; int [] argList = {OS.XmNset, 0}; OS.XtGetValues (handle, argList, argList.length / 2); return argList [1] != OS.XmUNSET; } void hookEvents () { if ((style & SWT.SEPARATOR) != 0) return; int windowProc = disp...
public ResolvedTypeX resolve(TypeX ty, boolean allowMissing) { //System.out.println("resolve: " + ty + " world " + typeMap.keySet()); String signature = ty.getSignature(); ResolvedTypeX ret = typeMap.get(signature); if (ret != null) { ret.world = this; return ret; } // Set the world for...
public ResolvedTypeX resolve(TypeX ty, boolean allowMissing) { //System.out.println("resolve: " + ty + " world " + typeMap.keySet()); String signature = ty.getSignature(); ResolvedTypeX ret = typeMap.get(signature); if (ret != null) { ret.world = this; return ret; } // Set the world for...
public int indexOf(Object key) { int i = 0; for (K k : _del.keySet()) { if (key == k) return i; i++; } return -1; }
public int indexOf(Object key) { int i = 0; for (K k : _del.keySet()) { if (key.equals(k)) return i; i++; } return -1; }
public Object getObject(Component component) { Application application = Application.get(); return "deleteWicketCookie('pm-" + getPageMap().getName() + application.getApplicationSettings().getContextPath() + application.getApplicationKey() + "');"; } }; body.a...
public Object getObject(Component component) { Application application = Application.get(); return "deleteWicketCookie('pm-" + getPageMap().getName() + application.getApplicationSettings().getContextPath() + application.getApplicationKey() + "');"; } }; body.a...
public boolean readAndDispatch () { checkDevice (); boolean events = false; events |= runSettings (); events |= runPopups (); events |= OS.g_main_context_iteration (0, false); if (events) { runDeferredEvents (); return true; } return runAsyncMessages (false); }
public boolean readAndDispatch () { checkDevice (); boolean events = false; events |= runSettings (); events |= runPopups (); events |= OS.g_main_context_iteration (0, false); if (events) { runDeferredEvents (); return true; } return isDisposed () || runAsyncMessages (false); }
private TimeoutException createTimeoutException(long timeout) { setStatus(new Status(IStatus.ERROR, ECFPlugin.PLUGIN_ID, IStatus.ERROR, NLS.bind("Operation timeout after {0}ms", new Long(timeout)), null)); //$NON-NLS-1$ timeoutException = new TimeoutException(getStatus(), timeout); return timeoutException;
private TimeoutException createTimeoutException(long timeout) { setStatus(new Status(IStatus.ERROR, ECFPlugin.PLUGIN_ID, IStatus.ERROR, NLS.bind("Operation timeout after {0}ms", new Long(timeout)), null)); //$NON-NLS-1$ timeoutException = new TimeoutException("Timout", timeout); //$NON-NLS-1$ return timeoutExcep...
public boolean eval() throws TaskException { if( property == null ) { throw new TaskException( "No property specified for isset condition" ); } return getProject().getProperty( property ) != null; }
public boolean eval() throws TaskException { if( property == null ) { throw new TaskException( "No property specified for isset condition" ); } return getProperty( property ) != null; }
protected Resource newResource() { // Create JAR resource final JarResourceFactory factory = new JarResourceFactory(); factory.addClassClosures(classes); return factory.getResource(); } }; final String jarResourceUrl = getRequestCycle().urlFor(jarResourceReference); final String codebase...
protected Resource newResource() { // Create JAR resource final JarResourceFactory factory = new JarResourceFactory(); factory.addClassClosures(classes); return factory.getResource(); } }; final String jarResourceUrl = getRequestCycle().urlFor(jarResourceReference).toString(); final Stri...
public Document encrypt(Encryption encryption, String selection, IProgressMonitor monitor) throws Exception { Document doc = null; if (monitor == null) { monitor = new NullProgressMonitor(); } monitor.worked(1); loadSettings(encryption, selection); keyS...
public Document encrypt(Encryption encryption, String selection, IProgressMonitor monitor) throws Exception { Document doc = null; if (monitor == null) { monitor = new NullProgressMonitor(); } monitor.worked(1); loadSettings(encryption, selection); keyS...
private void dialogChanged() { if (tKeyName.getText().length() == 0) { updateStatus(Messages.enterKeyName); return; } if (tKeyPassword.getText().length() == 0) { updateStatus(Messages.enterKeyPassword); return; } if (tKeyStore.g...
private void dialogChanged() { if (tKeyName.getText().length() == 0) { updateStatus(Messages.enterKeyName); return; } if (tKeyPassword.getText().length() == 0) { updateStatus(Messages.enterKeyPassword); return; } if (tKeyStore.g...
private void dialogChanged() { if (tCommonName.getText().length() > 0) { lPreview.setText("CN=" + tCommonName.getText()); //$NON-NLS-1$ } else { lPreview.setText(""); //$NON-NLS-1$ updateStatus(Messages.enterCommonName); return; } if (t...
private void dialogChanged() { if (tCommonName.getText().length() > 0) { lPreview.setText("CN=" + tCommonName.getText()); //$NON-NLS-1$ } else { lPreview.setText(""); //$NON-NLS-1$ updateStatus(Messages.enterCommonName); return; } if (t...
private void createKeystore() throws Exception { HashMap<String, String> certificateData = new HashMap<String, String>(); certificateData.put("keystore", keystore); //$NON-NLS-1$ certificateData.put("alias", tKeyName.getText()); //$NON-NLS-1$ certificateData.put("keyalg", cKeyAlgorit...
private void createKeystore() throws Exception { HashMap<String, String> certificateData = new HashMap<String, String>(); certificateData.put("keystore", keystore); //$NON-NLS-1$ certificateData.put("alias", tKeyName.getText()); //$NON-NLS-1$ certificateData.put("keyalg", cKeyAlgorit...
private void dialogChanged() { if (tKeyStore.getText().length() == 0) { updateStatus(Messages.selectKeyFile); return; } if (tKeyStorePassword.getText().length() == 0) { updateStatus(Messages.enterKeystorePassword); return; } if ...
private void dialogChanged() { if (tKeyStore.getText().length() == 0) { updateStatus(Messages.selectKeyFile); return; } if (tKeyStorePassword.getText().length() == 0) { updateStatus(Messages.enterKeystorePassword); return; } if ...
public static void main(String[] args) { if ((null == args) || (1 > args.length) || !Util.canReadDir(new File(args[0]))) { System.err.println(SYNTAX); return; } File dir = new File(args[0]); // create a module if (Util.canReadDir(n...
public static void main(String[] args) { if ((null == args) || (1 > args.length) || !Util.canReadDir(new File(args[0]))) { System.err.println(SYNTAX); return; } File dir = new File(args[0]); // create a module if (Util.canReadDir(n...
public PostgresDictionary() { platform = "PostgreSQL"; validationSQL = "SELECT NOW()"; datePrecision = CENTI; supportsAlterTableWithDropColumn = false; supportsDeferredConstraints = true; supportsSelectStartIndex = true; supportsSelectEndIndex = true; ...
public PostgresDictionary() { platform = "PostgreSQL"; validationSQL = "SELECT NOW()"; datePrecision = CENTI; supportsAlterTableWithDropColumn = false; supportsDeferredConstraints = true; supportsSelectStartIndex = true; supportsSelectEndIndex = true; ...
protected ID createAdapterID(ISharedObjectContainer container, Class adapterType) { String singletonName = adapterType.getClass().getName(); try { return IDFactory.getDefault().createStringID(singletonName); } catch (IDCreateException e) { Trace.catching(Activator.PLUGIN_ID, SharedObjectDebugOption...
protected ID createAdapterID(ISharedObjectContainer container, Class adapterType) { String singletonName = adapterType.getName(); try { return IDFactory.getDefault().createStringID(singletonName); } catch (IDCreateException e) { Trace.catching(Activator.PLUGIN_ID, SharedObjectDebugOptions.EXCEPTION...
void onUnauthorizedInstantiation(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...
void onUnauthorizedInstantiation(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...
public static final IRequestCycleSettings.RenderStrategy REDIRECT_TO_RENDER = new IRequestCycleSettings.RenderStrategy( "CLIENT_SIDE_REDIRECT"); /** * Adds a response filter to the list. Filters are evaluated in the order they have been added. * * @param responseFilter * The {@link IResponseFi...
public static final IRequestCycleSettings.RenderStrategy REDIRECT_TO_RENDER = new IRequestCycleSettings.RenderStrategy( "CLIENT_SIDE_REDIRECT"); /** * Adds a response filter to the list. Filters are evaluated in the order they have been added. * * @param responseFilter * The {@link IResponseFi...
public static void main(String [] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new FillLayout()); StyledText styledText = new StyledText(shell, SWT.WRAP | SWT.BORDER); styledText.setText(text); styledText.setLineIndent(0, 1, 50); styledText.setLineIndent(2, 1...
public static void main(String [] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new FillLayout()); StyledText styledText = new StyledText(shell, SWT.WRAP | SWT.BORDER); styledText.setText(text); styledText.setLineIndent(0, 1, 50); styledText.setLineIndent(2, 1...
getLogger().warn( "Unrecognized publicId " + publicId + " - using EJB 1.1 compiler" ); ejbcClassName = COMPILER_EJB11; } } javaTask.setClassname( ejbcClassName ); javaTask.createArg().setLine( additionalArgs ); if( ...
getLogger().warn( "Unrecognized publicId " + publicId + " - using EJB 1.1 compiler" ); ejbcClassName = COMPILER_EJB11; } } javaTask.setClassname( ejbcClassName ); javaTask.createArg().setLine( additionalArgs ); if( ...
public WeaverStateInfo getWeaverState() { return null; } public ResolvedTypeX getSuperclass() { if (binding.isInterface()) return getResolvedTypeX().getWorld().resolve(TypeX.OBJECT); //XXX what about java.lang.Object return eclipseWorld().fromEclipse(binding.superclass()); }
public WeaverStateInfo getWeaverState() { return null; } public ResolvedTypeX getSuperclass() { if (binding.isInterface()) return getResolvedTypeX().getWorld().getCoreType(TypeX.OBJECT); //XXX what about java.lang.Object return eclipseWorld().fromEclipse(binding.superclass()); }
private ResolvedTypeX maybeGetNewParent(ResolvedTypeX targetType, TypePattern typePattern, World world) { if (typePattern == TypePattern.NO) return null; // already had an error here TypeX iType = typePattern.getExactType(); ResolvedTypeX parentType = iType.resolve(world); if (targetType.equals(world.resol...
private ResolvedTypeX maybeGetNewParent(ResolvedTypeX targetType, TypePattern typePattern, World world) { if (typePattern == TypePattern.NO) return null; // already had an error here TypeX iType = typePattern.getExactType(); ResolvedTypeX parentType = iType.resolve(world); if (targetType.equals(world.getCo...
public void resolve(IScope scope) { exception = exception.resolveBindings(scope, null, false, true); TypeX excType = exception.getExactType(); if (excType != ResolvedTypeX.MISSING) { if (!scope.getWorld().resolve(TypeX.THROWABLE).isAssignableFrom(excType)) { scope.getWorld().showMessage(...
public void resolve(IScope scope) { exception = exception.resolveBindings(scope, null, false, true); TypeX excType = exception.getExactType(); if (excType != ResolvedTypeX.MISSING) { if (!scope.getWorld().getCoreType(TypeX.THROWABLE).isAssignableFrom(excType)) { scope.getWorld().showMess...
public void setSelection (int index) { checkWidget(); if ((style & SWT.MULTI) != 0) deselectAll (); setSelection (index, false); }
public void setSelection (int index) { checkWidget(); deselectAll (); setSelection (index, false); }
public static String replaceProperties(Project project, String value, Hashtable keys ) throws BuildException { // XXX use Map instead of proj, it's too heavy // XXX need to replace this code with something better. StringBuffer sb=new StringBuffer(); int i=0; int ...
public static String replaceProperties(Project project, String value, Hashtable keys ) throws BuildException { // XXX use Map instead of proj, it's too heavy // XXX need to replace this code with something better. StringBuffer sb=new StringBuffer(); int i=0; int ...
private void drawSample(SamplingStatCalculator p_model, Graphics g) { int width = getWidth(); double height = getHeight() - 1.0; // first lets draw the grid for (int y = 0; y < 4; y++) { int q1 = (int) (height - (height * 0.25 * y)); g.setColor(Color.lightGra...
private void drawSample(SamplingStatCalculator p_model, Graphics g) { int width = getWidth(); double height = getHeight() - 1.0; // first lets draw the grid for (int y = 0; y < 4; y++) { int q1 = (int) (height - (height * 0.25 * y)); g.setColor(Color.lightGra...
private boolean initialized = false; static { List<String> paths = new LinkedList<String>(); paths.add("org.apache.jmeter.testbeans.gui");// $NON-NLS-1$ paths.addAll(Arrays.asList(PropertyEditorManager.getEditorSearchPath())); String s = JMeterUtils.getPropDefault("propertyEdito...
private boolean initialized = false; static { List<String> paths = new LinkedList<String>(); paths.add("org.apache.jmeter.testbeans.gui");// $NON-NLS-1$ paths.addAll(Arrays.asList(PropertyEditorManager.getEditorSearchPath())); String s = JMeterUtils.getPropDefault("propertyEdito...
public boolean accept(File f, String name) { return name.endsWith(DOT_JAR); } }); for (int x = 0; x < jars.length; x++) { fullList.add(jars[x]); } ...
public boolean accept(File f, String name) { return name.endsWith(DOT_JAR); } }); for (int x = 0; x < jars.length; x++) { fullList.add(jars[x]); } ...
public static String[] split(String splittee, String delims, String def) { StringTokenizer tokens = new StringTokenizer(splittee,delims,def!=null); boolean lastWasDelim=false; List<String> strList=new ArrayList<String>(); while (tokens.hasMoreTokens()) { String tok=tokens...
public static String[] split(String splittee, String delims, String def) { StringTokenizer tokens = new StringTokenizer(splittee,delims,def!=null); boolean lastWasDelim=false; List<String> strList=new ArrayList<String>(); while (tokens.hasMoreTokens()) { String tok=tokens...
public static String[] getValidMethodsAsArray(){ return METHODLIST.toArray(new String[0]); }
public static String[] getValidMethodsAsArray(){ return METHODLIST.toArray(new String[METHODLIST.size()]); }
private JPanel createLanguagePanel() { JLabel label = new JLabel(JMeterUtils.getResString("bsf_script_language")); // $NON-NLS-1$ Properties p = JMeterUtils.loadProperties("org/apache/bsf/Languages.properties"); // $NON-NLS-1$ // We have added Jexl in BSFSampler. p.put("jexl", ""); ...
private JPanel createLanguagePanel() { JLabel label = new JLabel(JMeterUtils.getResString("bsf_script_language")); // $NON-NLS-1$ Properties p = JMeterUtils.loadProperties("org/apache/bsf/Languages.properties"); // $NON-NLS-1$ // We have added Jexl in BSFSampler. p.put("jexl", ""); ...
protected final void renderComponentTag(ComponentTag tag) { if (needToRenderTag(tag)) { // Apply behavior modifiers List<? extends Behavior> behaviors = getBehaviors(); if ((behaviors != null) && !behaviors.isEmpty() && !tag.isClose() && (isIgnoreAttributeModifier() == false)) { tag = tag.muta...
protected final void renderComponentTag(ComponentTag tag) { if (needToRenderTag(tag)) { // Apply behavior modifiers List<? extends Behavior> behaviors = getBehaviors(); if ((behaviors != null) && !behaviors.isEmpty() && !tag.isClose() && (isIgnoreAttributeModifier() == false)) { tag = tag.muta...
public static boolean run(JDBCConfiguration conf, String[] args, Options opts) throws IOException, SQLException { if (opts.containsKey("help") || opts.containsKey("-help")) return false; // flags Flags flags = new Flags(); flags.action = opts.removeProper...
public static boolean run(JDBCConfiguration conf, String[] args, Options opts) throws IOException, SQLException { if (opts.containsKey("help") || opts.containsKey("-help")) return false; // flags Flags flags = new Flags(); flags.action = opts.removeProper...
public static boolean run(JDBCConfiguration conf, String[] args, Options opts) throws IOException, SQLException { if (opts.containsKey("help") || opts.containsKey("-help")) return false; Flags flags = new Flags(); flags.dropTables = opts.removeBooleanProperty ...
public static boolean run(JDBCConfiguration conf, String[] args, Options opts) throws IOException, SQLException { if (opts.containsKey("help") || opts.containsKey("-help")) return false; Flags flags = new Flags(); flags.dropTables = opts.removeBooleanProperty ...
public void moveRow(int start, int end, int to) { List<Object> subList = new ArrayList(objects.subList(start, end)); for (int x = end - 1; x >= start; x--) { objects.remove(x); } objects.addAll(to, subList); super.fireTableChanged(new TableModelEvent(this)); }...
public void moveRow(int start, int end, int to) { List<Object> subList = new ArrayList<Object>(objects.subList(start, end)); for (int x = end - 1; x >= start; x--) { objects.remove(x); } objects.addAll(to, subList); super.fireTableChanged(new TableModelEvent(this)...
protected void renderChoice(Object object, Response response) { response.write(getTextValue(object)); } }
protected void renderChoice(Object object, Response response, String criteria) { response.write(getTextValue(object)); } }
void render(Object object, Response response, String criteria); package wicket.extensions.ajax.markup.html.autocomplete; import java.io.Serializable; import wicket.Response; /** * A renderer used to generate html output for the {@link AutoCompleteBehavior}. * <p> * Helper implementations of this interface may ab...
void render(Object object, Response response, String criteria); package wicket.extensions.ajax.markup.html.autocomplete; import java.io.Serializable; import wicket.Response; /** * A renderer used to generate html output for the {@link AutoCompleteBehavior}. * <p> * Helper implementations of this interface may ab...
public void run() { outputPaste(); } }; outputPaste.setText("Paste"); outputPaste.setToolTipText("Paste"); outputCopy.setAccelerator(SWT.CTRL | 'V'); outputPaste.setImageDescriptor(PlatformUI.getWorkbench() .getSharedImages().getImageDescriptor( ISharedImages.IMG_TOOL_PASTE)); }
public void run() { outputPaste(); } }; outputPaste.setText("Paste"); outputPaste.setToolTipText("Paste"); outputPaste.setAccelerator(SWT.CTRL | 'V'); outputPaste.setImageDescriptor(PlatformUI.getWorkbench() .getSharedImages().getImageDescriptor( ISharedImages.IMG_TOOL_PASTE)); }
public Process exec( final ExecMetaData metaData ) throws IOException, ExecException { // Build the command final String[] prefix = new String[ m_script.length + 1 ]; for( int i = 0; i < m_script.length; i++ ) { prefix[ i ] = m_script[ i ]; } p...
public Process exec( final ExecMetaData metaData ) throws IOException, ExecException { // Build the command final String[] prefix = new String[ m_script.length + 1 ]; for( int i = 0; i < m_script.length; i++ ) { prefix[ i ] = m_script[ i ]; } p...
public Process exec( final ExecMetaData metaData ) throws IOException, ExecException { // Use cmd.exe to change to the specified directory before running // the command final String[] prefix = new String[ 6 ]; prefix[ 0 ] = "cmd"; prefix[ 1 ] = "/c"; prefi...
public Process exec( final ExecMetaData metaData ) throws IOException, ExecException { // Use cmd.exe to change to the specified directory before running // the command final String[] prefix = new String[ 6 ]; prefix[ 0 ] = "cmd"; prefix[ 1 ] = "/c"; prefi...
public boolean getBooleanValue() { return super.getBooleanValue(); }
public boolean getBooleanValue() { return value; }
public void testRenderHomePage() throws Exception { tester.startComponentInPage(MyFormComponentPanel.class); String doc = tester.getLastResponseAsString(); // log.error(doc); assertEquals(doc, "<wicket:panel>test</wicket:panel>"); }
public void testRenderHomePage() throws Exception { tester.startComponentInPage(MyFormComponentPanel.class); String doc = tester.getLastResponseAsString(); // log.error(doc); assertEquals("<wicket:panel>test</wicket:panel>", doc); }
protected final boolean isTextSpan(XmlTag tag) { if (!tag.isOpen()) return false; if (!"span".equalsIgnoreCase(tag.getName()) || tag.getNamespace() != null) return false; String classNames = tag.getAttributes().getString("class"); if (Strings.isEmpty(classNames)) return false; boolean ...
protected final boolean isTextSpan(XmlTag tag) { if (!tag.isOpen()) return false; if (!"span".equalsIgnoreCase(tag.getName()) || tag.getNamespace() != null) return false; String classNames = tag.getAttributes().getString("class"); if (Strings.isEmpty(classNames)) return false; boolean ...
private static final boolean reversePostProcessors = JMeterUtils.getPropDefault("jmeterthread.reversePostProcessors",false); // $NON-NLS-1$ static { if (startEarlier) { log.warn("jmeterthread.startearlier=true (see jmeter.properties)"); } else { log.info("jmeterthread.startearlier=false (see jm...
private static final boolean reversePostProcessors = JMeterUtils.getPropDefault("jmeterthread.reversePostProcessors",false); // $NON-NLS-1$ static { if (startEarlier) { log.info("jmeterthread.startearlier=true (see jmeter.properties)"); } else { log.info("jmeterthread.startearlier=false (see jm...
public BlockPseudoElementBox(LayoutContext context, VEXElement pseudoElement, BlockBox parent, int width) { this.pseudoElement = pseudoElement; this.parent = parent; Styles styles = context.getStyleSheet().getStyles(pseudoElement); this.marginTop = styles.getMarginTop().get(width); this.marginBottom = ...
public BlockPseudoElementBox(LayoutContext context, VEXElement pseudoElement, BlockBox parent, int width) { this.pseudoElement = pseudoElement; this.parent = parent; Styles styles = context.getStyleSheet().getStyles(pseudoElement); this.marginTop = styles.getMarginTop().get(width); this.marginBottom = ...
public void execute() { if (name == null) { throw new BuildException("scriptdef requires a name attribute to " + "name the script"); } if (runner.getLanguage() == null) { throw new BuildException("<scriptdef> requires a language attribute " ...
public void execute() { if (name == null) { throw new BuildException("scriptdef requires a name attribute to " + "name the script"); } if (runner.getLanguage() == null) { throw new BuildException("<scriptdef> requires a language attribute " ...
public ResolvedTypeMunger parameterizedFor(ResolvedType target) { ResolvedType genericType = target; if (target.isRawType() || target.isParameterizedType()) genericType = genericType.getGenericType(); ResolvedMember parameterizedSignature = getSignature().parameterizedWith(target.getTypeParameters(),genericType,...
public ResolvedTypeMunger parameterizedFor(ResolvedType target) { ResolvedType genericType = target; if (target.isRawType() || target.isParameterizedType()) genericType = genericType.getGenericType(); ResolvedMember parameterizedSignature = getSignature().parameterizedWith(target.getTypeParameters(),genericType,...
public void create (Composite parent, int style) { String className = "SWTWebViewDelegate"; //$NON-NLS-1$ if (OS.objc_lookUpClass(className) == 0) { Class safariClass = this.getClass(); Callback3 = new Callback(safariClass, "browserProc", 3); //$NON-NLS-1$ int proc3 = Callback3.getAddress(); if (proc3 == 0) S...
public void create (Composite parent, int style) { String className = "SWTWebViewDelegate"; //$NON-NLS-1$ if (OS.objc_lookUpClass(className) == 0) { Class safariClass = this.getClass(); Callback3 = new Callback(safariClass, "browserProc", 3); //$NON-NLS-1$ int proc3 = Callback3.getAddress(); if (proc3 == 0) S...
public void verifySettings() { int cnt = selectorCount(); if (cnt < 0 || cnt > 1) { setError("Only one selector is allowed within the " + "<select> tag"); } }
public void verifySettings() { int cnt = selectorCount(); if (cnt < 0 || cnt > 1) { setError("Only one selector is allowed within the " + "<selector> tag"); } }
public static void fullSchemaChecking(XSGrammarBucket grammarBucket, SubstitutionGroupHandler SGHandler, CMBuilder cmBuilder, XMLErrorReporter errorReporter) { // get all grammars, and put all substitution group information // in the substitution group handler ...
public static void fullSchemaChecking(XSGrammarBucket grammarBucket, SubstitutionGroupHandler SGHandler, CMBuilder cmBuilder, XMLErrorReporter errorReporter) { // get all grammars, and put all substitution group information // in the substitution group handler ...
public void testMetaDataKey() { MetaDataEntry[] md = KEY1.set(null, "1"); assertNotNull(md); assertEquals(1, md.length); md = KEY1.set(md, null); assertNull(md); md = KEY1.set(md, "1"); md = KEY2.set(md, "2"); md = KEY3.set(md, "3"); md = KEY4.set(md, "4"); assertEquals(4, md.length); md = KEY3....
public void testMetaDataKey() { MetaDataEntry<?>[] md = KEY1.set(null, "1"); assertNotNull(md); assertEquals(1, md.length); md = KEY1.set(md, null); assertNull(md); md = KEY1.set(md, "1"); md = KEY2.set(md, "2"); md = KEY3.set(md, "3"); md = KEY4.set(md, "4"); assertEquals(4, md.length); md = KE...
public SimpleTestPanel(String name) { super(name); Label ajaxLabel = new Label("linja1", new PropertyModel(this, "count")); timer = new AjaxSelfUpdatingTimerBehavior(Duration.seconds(2)); ajaxLabel.add(timer); baseSpan.add(ajaxLabel); }
public SimpleTestPanel(String name) { super(name); Label ajaxLabel = new Label("linja1", new PropertyModel<Integer>(this, "count")); timer = new AjaxSelfUpdatingTimerBehavior(Duration.seconds(2)); ajaxLabel.add(timer); baseSpan.add(ajaxLabel); }
public void testRenderHomePage_4() throws Exception { System.out.println("=== " + MarkupInheritanceExtension_4.class.getName() + " ==="); tester.startPage(MarkupInheritanceExtension_4.class); // Validate the document assertEquals(MarkupInheritanceExtension_4.class, tester.getLastRenderedPage().getClass()); ...
public void testRenderHomePage_4() throws Exception { System.out.println("=== " + MarkupInheritanceExtension_4.class.getName() + " ==="); tester.startPage(MarkupInheritanceExtension_4.class); // Validate the document assertEquals(MarkupInheritanceExtension_4.class, tester.getLastRenderedPage().getClass()); ...
public void testPrimitiveClass() throws Exception { TextField tf = new TextField("test", int.class); assertTrue(tf.isRequired()); try { tf.setRequired(false); fail("Required can't be false for a primitive class type"); } catch (WicketRuntimeException wre) { // igore should happen } }
public void testPrimitiveClass() throws Exception { TextField<Integer> tf = new TextField<Integer>("test", int.class); assertTrue(tf.isRequired()); try { tf.setRequired(false); fail("Required can't be false for a primitive class type"); } catch (WicketRuntimeException wre) { // igore should ha...
public static final String THIS_VALUE_SHOULD_THROW_EXCEPTION = "test ex";
private static final long serialVersionUID = 1L; static final String THIS_VALUE_SHOULD_THROW_EXCEPTION = "test ex";
public WicketTester() { oldThreadContext = ThreadContext.getAndClean(); application = new MockApplication(); application.setName("WicketTesterApplication"); application.set(); application.initApplication(); }
public WicketTester() { oldThreadContext = ThreadContext.detach(); application = new MockApplication(); application.setName("WicketTesterApplication"); application.set(); application.initApplication(); }
public void testRender1() { // Store current ThreadContext ThreadContext context = ThreadContext.getAndClean();
public void testRender1() { // Store current ThreadContext ThreadContext context = ThreadContext.detach();
public String open () { int /*long*/ hHeap = OS.GetProcessHeap (); /* Get the owner HWND for the dialog */ int /*long*/ hwndOwner = parent.handle; int /*long*/ hwndParent = parent.handle; /* * Feature in Windows. There is no API to set the orientation of a * file dialog. It is always inherited from the par...
public String open () { int /*long*/ hHeap = OS.GetProcessHeap (); /* Get the owner HWND for the dialog */ int /*long*/ hwndOwner = parent.handle; int /*long*/ hwndParent = parent.handle; /* * Feature in Windows. There is no API to set the orientation of a * file dialog. It is always inherited from the par...
public boolean replaceWith(CrosscuttingMembers other,boolean careAboutShadowMungers) { boolean changed = false; if (perClause == null || !perClause.equals(other.perClause)) { changed = true; perClause = other.perClause; } //XXX all of the below should be set equality rather than list equality //S...
public boolean replaceWith(CrosscuttingMembers other,boolean careAboutShadowMungers) { boolean changed = false; if (perClause == null || !perClause.equals(other.perClause)) { changed = true; perClause = other.perClause; } //XXX all of the below should be set equality rather than list equality //S...
public CompareAssertionBeanInfo() { super(CompareAssertion.class); createPropertyGroup("compareChoices", new String[] { "compareContent", "compareTime" }); //$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$ createPropertyGroup("comparison_filters", new String[]{"stringsToSkip"}); //$NON-NLS-1$ $NON-NLS-2...
public CompareAssertionBeanInfo() { super(CompareAssertion.class); createPropertyGroup("compareChoices", new String[] { "compareContent", "compareTime" }); //$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$ createPropertyGroup("comparison_filters", new String[]{"stringsToSkip"}); //$NON-NLS-1$ $NON-NLS-2...
public AssertionResult getResult(SampleResult response) { AssertionResult result = new AssertionResult(getName()); result.setFailure(false); long duration=getAllowedDuration(); if (duration > 0) { long responseTime=response.getTime(); // has the Sample lasted too ...
public AssertionResult getResult(SampleResult response) { AssertionResult result = new AssertionResult(getName()); result.setFailure(false); long duration=getAllowedDuration(); if (duration > 0) { long responseTime=response.getTime(); // has the Sample lasted too ...
public AssertionResult getResult(SampleResult response) { AssertionResult result = new AssertionResult(getName()); result.setFailure(false); long resultSize=0; if (isScopeVariable()){ String variableName = getVariableName(); String value = getThreadContext().g...
public AssertionResult getResult(SampleResult response) { AssertionResult result = new AssertionResult(getName()); result.setFailure(false); long resultSize=0; if (isScopeVariable()){ String variableName = getVariableName(); String value = getThreadContext().g...
private void initTemplate() { if (template != null) { return; } // Contains Strings and Integers List<Object> combined = new ArrayList<Object>(); String rawTemplate = getTemplate(); PatternMatcher matcher = JMeterUtils.getMatcher(); Pattern templat...
private void initTemplate() { if (template != null) { return; } // Contains Strings and Integers List<Object> combined = new ArrayList<Object>(); String rawTemplate = getTemplate(); PatternMatcher matcher = JMeterUtils.getMatcher(); Pattern templat...
public SyncTimerBeanInfo() { super(SyncTimer.class); createPropertyGroup("grouping", new String[] { "groupSize" }); PropertyDescriptor p = property("groupSize"); p.setValue(NOT_UNDEFINED, Boolean.TRUE); p.setValue(DEFAULT, new Integer(0)); }
public SyncTimerBeanInfo() { super(SyncTimer.class); createPropertyGroup("grouping", new String[] { "groupSize" }); PropertyDescriptor p = property("groupSize"); p.setValue(NOT_UNDEFINED, Boolean.TRUE); p.setValue(DEFAULT, Integer.valueOf(0)); }
public Object getObjectValue() { return new Integer(value); }
public Object getObjectValue() { return Integer.valueOf(value); }
public Object getObjectValue() { return new Long(value); }
public Object getObjectValue() { return Long.valueOf(value); }
public void run() { ClassLoader loader = Thread.currentThread().getContextClassLoader(); try { Class<?> Interpreter = loader.loadClass("bsh.Interpreter");//$NON-NLS-1$ Object instance = Interpreter.newInstance(); Class<String> string = String.class; ...
public void run() { ClassLoader loader = Thread.currentThread().getContextClassLoader(); try { Class<?> Interpreter = loader.loadClass("bsh.Interpreter");//$NON-NLS-1$ Object instance = Interpreter.newInstance(); Class<String> string = String.class; ...
public Number getMeanAsNumber() { return new Long((long) mean); }
public Number getMeanAsNumber() { return Long.valueOf((long) mean); }
public void addFile(String cookieFile) throws IOException { File file = new File(cookieFile); if (!file.isAbsolute()) { file = new File(System.getProperty("user.dir") // $NON-NLS-1$ + File.separator + cookieFile); } BufferedReader reader = null; ...
public void addFile(String cookieFile) throws IOException { File file = new File(cookieFile); if (!file.isAbsolute()) { file = new File(System.getProperty("user.dir") // $NON-NLS-1$ + File.separator + cookieFile); } BufferedReader reader = null; ...
public void run() { log.info("Starting thread"); BufferedInputStream in = null; BufferedOutputStream out = null; try { in = new BufferedInputStream(clientSocket.getInputStream()); out = new BufferedOutputStream(clientSocket.getOutputStream()); // ...
public void run() { log.info("Starting thread"); BufferedInputStream in = null; BufferedOutputStream out = null; try { in = new BufferedInputStream(clientSocket.getInputStream()); out = new BufferedOutputStream(clientSocket.getOutputStream()); // ...
public void testSearch() throws Exception { ListedHashTree tree = new ListedHashTree(); SearchByClass<Integer> searcher = new SearchByClass<Integer>(Integer.class); String one = "one"; String two = "two"; Integer o = new Integer(1); tree.ad...
public void testSearch() throws Exception { ListedHashTree tree = new ListedHashTree(); SearchByClass<Integer> searcher = new SearchByClass<Integer>(Integer.class); String one = "one"; String two = "two"; Integer o = Integer.valueOf(1); tre...