rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
indexes[count++] = pos + facetCount + 1; | indexes[count++] = pos + facetCount + 2; | private void indexedTriangles(GeometryData data) throws InvalidArraySizeException { generateIndexedCoordinates(data); if((data.geometryComponents & GeometryData.NORMAL_DATA) != 0) generateNormals(data); if((data.geometryComponents & GeometryData.TEXTURE_2D_DATA) != 0) generateIndexedTexture2D(data); else if((data.geometryComponents & GeometryData.TEXTURE_3D_DATA) != 0) generateTexture3D(data); // now let's do the index list int index_size = data.vertexCount * 6; if(data.indexes == null) data.indexes = new int[index_size]; else if(data.indexes.length < index_size) throw new InvalidArraySizeException("Coordinates", data.indexes.length, index_size); int[] indexes = data.indexes; data.indexesCount = index_size; int count = 0; int half = facetCount / 4; int i, k; int last_facet = facetCount - 1; // always stop one short of the end int pos; int k_facet; // Wind the top half separately from the bottom for(k = 0; k < half; k++) { k_facet = k * facetCount; for(i = 0; i < last_facet; i++) { pos = i + k_facet; // first triangle indexes[count++] = pos + facetCount; indexes[count++] = pos; indexes[count++] = pos + 1; // second triangle indexes[count++] = pos + 1; indexes[count++] = pos + facetCount + 1; indexes[count++] = pos + facetCount; } // now the last remaing quad that uses coords 0 & 1 pos = i + k_facet; indexes[count++] = pos + facetCount; indexes[count++] = pos; indexes[count++] = k_facet; indexes[count++] = k_facet; indexes[count++] = k_facet + facetCount; indexes[count++] = pos + facetCount; } if(!useHalf) { // Bottom half is wound in the opposite order. for(k = half + 1; k <= half * 2; k++) { k_facet = k * facetCount; for(i = 0; i < last_facet; i++) { pos = i + k_facet; indexes[count++] = pos; indexes[count++] = pos + facetCount; indexes[count++] = pos + facetCount + 1; indexes[count++] = pos + facetCount + 1; indexes[count++] = pos + 1; indexes[count++] = pos; } // now the last remaing quad that uses coords 0 & 1 pos = i + k_facet; indexes[count++] = pos; indexes[count++] = pos + facetCount; indexes[count++] = k_facet + facetCount; indexes[count++] = k_facet + facetCount; indexes[count++] = k_facet; indexes[count++] = pos; } } } | 46075 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46075/810889e7aefdf5161f615d3e31a4cfc83d406afa/SphereGenerator.java/clean/src/java/org/j3d/geom/SphereGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
8808,
6251,
12356,
12,
9823,
751,
501,
13,
3639,
1216,
1962,
1076,
1225,
503,
565,
288,
3639,
2103,
15034,
13431,
12,
892,
1769,
3639,
309,
12443,
892,
18,
14330,
7171,
473,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
8808,
6251,
12356,
12,
9823,
751,
501,
13,
3639,
1216,
1962,
1076,
1225,
503,
565,
288,
3639,
2103,
15034,
13431,
12,
892,
1769,
3639,
309,
12443,
892,
18,
14330,
7171,
473,
83... |
if ( StringUtils.isEmpty( this.doclet ) ) | if ( StringUtils.isEmpty( doclet ) ) | protected void executeReport( Locale locale ) throws MavenReportException { try { int actualYear = Calendar.getInstance().get( Calendar.YEAR ); String year = String.valueOf( actualYear ); Model model = getProject().getModel(); if ( model.getInceptionYear() != null ) { if ( StringUtils.isNumeric( model.getInceptionYear() ) ) { if ( Integer.valueOf( model.getInceptionYear() ).intValue() != actualYear ) { year = model.getInceptionYear() + "-" + String.valueOf( actualYear ); } } else { getLog().warn( "The inception year is not a valid year." ); } } StringBuffer classpath = new StringBuffer(); for ( Iterator i = getProject().getCompileClasspathElements().iterator(); i.hasNext(); ) { classpath.append( (String) i.next() ); if ( i.hasNext() ) { classpath.append( PATH_SEPARATOR ); } } StringBuffer sourcePath = new StringBuffer(); String[] fileList = new String[1]; for ( Iterator i = getProject().getCompileSourceRoots().iterator(); i.hasNext(); ) { String sourceDirectory = (String) i.next(); fileList = FileUtils.getFilesFromExtension( sourceDirectory, new String[] { "java" } ); sourcePath.append( sourceDirectory ); } File javadocDirectory = new File( getProject().getBuild().getDirectory() + "/javadoc" ); if ( fileList != null && fileList.length != 0 ) { StringBuffer files = new StringBuffer(); for ( int i = 0; i < fileList.length; i++ ) { files.append( fileList[i] ); files.append( "\n" ); } javadocDirectory.mkdirs(); FileUtils.fileWrite( new File( javadocDirectory, "files" ).getAbsolutePath(), files.toString() ); } else { return; } // Copy default style sheet copyDefaultStylesheet( javadocDirectory ); this.cmd.setWorkingDirectory( javadocDirectory.getAbsolutePath() ); this.cmd.setExecutable( getJavadocPath() ); // General javadoc arguments addArgIf( this.breakiterator, "-breakiterator", 1.4f ); if ( !StringUtils.isEmpty( this.doclet ) ) { addArgIfNotEmpty( "-doclet", this.doclet ); addArgIfNotEmpty( "-docletPath", this.docletPath ); } addArgIfNotEmpty( "-encoding", this.encoding ); addArgIfNotEmpty( "-extdirs", this.extdirs ); addArgIfNotEmpty( "-exclude", this.excludePackageNames, 1.4f ); addArgIfNotEmpty( "-locale", this.locale ); if ( !StringUtils.isEmpty( this.maxmemory ) ) { // Allow '128' or '128m' if ( NumberUtils.isDigits( this.maxmemory ) ) { addArgIf( true, "-J-Xmx" + this.maxmemory + "m" ); } else { if ( ( NumberUtils.isDigits( this.maxmemory.substring( 0, this.maxmemory.length() - 1 ) ) ) && ( this.maxmemory.toLowerCase().endsWith( "m" ) ) ) { addArgIf( true, "-J-Xmx" + this.maxmemory ); } else { getLog().error( "The maxmemory '" + this.maxmemory + "' is not a valid number. Ignore this option." ); } } } if ( !StringUtils.isEmpty( this.minmemory ) ) { // Allow '128' or '128m' if ( NumberUtils.isDigits( this.minmemory ) ) { addArgIf( true, "-J-Xms" + this.minmemory + "m" ); } else { if ( ( NumberUtils.isDigits( this.minmemory.substring( 0, this.minmemory.length() - 1 ) ) ) && ( this.minmemory.toLowerCase().endsWith( "m" ) ) ) { addArgIf( true, "-J-Xms" + this.minmemory ); } else { getLog().error( "The minmemory '" + this.minmemory + "' is not a valid number. Ignore this option." ); } } } if ( this.old && SystemUtils.isJavaVersionAtLeast( 1.4f ) ) { getLog().warn( "Javadoc 1.4 doesn't support the -1.1 switch anymore. Ignore this option." ); } else { addArgIf( this.old, "-1.1" ); } addArgIfNotEmpty( "-overview", this.overview ); addArgIf( this.package_, "-package" ); addArgIf( this.private_, "-private" ); addArgIf( this.protected_, "-protected" ); addArgIf( this.public_, "-public" ); addArgIf( this.quiet, "-quiet", 1.4f ); addArgIfNotEmpty( "-source", this.source, 1.4f ); addArgIf( this.verbose, "-verbose" ); addArgIfNotEmpty( "-additionalparam", this.additionalparam ); addArgIfNotEmpty( "-sourcePath", sourcePath.toString() ); addArgIfNotEmpty( "-classpath", classpath.toString() ); // javadoc arguments for default doclet if ( StringUtils.isEmpty( this.doclet ) ) { // Specify default values if ( this.bottom.equals( DEFAULT_BOTTOM ) ) { this.bottom = "Copyright © " + year + " "; if ( ( model.getOrganization() != null ) && ( !StringUtils.isEmpty( model.getOrganization().getName() ) ) ) { this.bottom += model.getOrganization().getName(); } else { this.bottom += DEFAULT_ORGANIZATION_NAME; } this.bottom += ". All Rights Reserved."; } if ( this.destDir.equals( DEFAULT_DESTDIR ) ) { File outputDir = new File( getReportOutputDirectory().getAbsolutePath() + "/apidocs" ); outputDir.mkdirs(); this.destDir = outputDir.getAbsolutePath(); } if ( StringUtils.isEmpty( this.stylesheetfile ) ) { this.stylesheetfile = javadocDirectory + File.separator + DEFAULT_CSS_NAME; } if ( this.windowtitle.equals( DEFAULT_WINDOW_TITLE ) ) { this.windowtitle = ( model.getName() == null ? model.getArtifactId() : model.getName() ) + " " + model.getVersion() + " API"; } if ( this.doctitle.equals( DEFAULT_DOCTITLE ) ) { this.doctitle = this.windowtitle; } // End Specify default values addArgIf( this.author, "-author" ); addArgIfNotEmpty( "-bottom", this.bottom ); addArgIf( this.breakiterator, "-breakiterator", 1.4f ); addArgIfNotEmpty( "-charset", this.charset ); addArgIfNotEmpty( "-d", this.destDir ); addArgIf( this.docfilessubdirs, "-docfilessubdirs", 1.4f ); addArgIfNotEmpty( "-docencoding", this.docencoding ); addArgIfNotEmpty( "-doctitle", this.doctitle ); addArgIfNotEmpty( "-excludePackageNames", this.excludePackageNames ); addArgIfNotEmpty( "-excludedocfilessubdir", this.excludedocfilessubdir, 1.4f ); addArgIfNotEmpty( "-footer", this.footer ); addArgIfNotEmpty( "-group", this.group, true ); addArgIfNotEmpty( "-header", this.header ); addArgIfNotEmpty( "-helpfile", this.helpfile ); addArgIfNotEmpty( "-link", this.link, true ); addArgIfNotEmpty( "-linkoffline", this.linkoffline, true ); addArgIf( this.linksource, "-linksource", 1.4f ); addArgIf( this.nodeprecated, "-nodeprecated" ); addArgIf( this.nodeprecatedlist, "-nodeprecatedlist" ); addArgIf( this.nocomment, "-nocomment", 1.4f ); addArgIf( this.nohelp, "-nohelp" ); addArgIf( this.noindex, "-noindex" ); addArgIf( this.nonavbar, "-nonavbar" ); addArgIfNotEmpty( "-noqualifier", this.noqualifier, 1.4f ); addArgIf( this.nosince, "-nosince" ); addArgIf( this.notree, "-notree" ); addArgIf( this.serialwarn, "-serialwarn" ); addArgIf( this.splitindex, "-splitindex" ); addArgIfNotEmpty( "-stylesheetfile", this.stylesheetfile ); addArgIfNotEmpty( "-tag", this.tag, 1.4f, true ); addArgIfNotEmpty( "-taglet", this.taglet, 1.4f ); addArgIfNotEmpty( "-tagletpath", this.tagletpath, 1.4f ); addArgIf( this.use, "-use" ); addArgIf( this.version, "-version" ); addArgIfNotEmpty( "-windowtitle", this.windowtitle ); } cmd.createArgument().setValue( "@files" ); getLog().info( Commandline.toString( cmd.getCommandline() ) ); final int exitCode = CommandLineUtils .executeCommandLine( cmd, new DefaultConsumer(), new DefaultConsumer() ); if ( exitCode != 0 ) { throw new MavenReportException( "Exit code: " + exitCode ); } } catch ( Exception e ) { getLog().debug( e ); throw new MavenReportException( "An error has occurred in javadoc report generation.", e ); } } | 1315 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1315/7f9ca7632659d1b09416026c87ce3e635b6c7495/JavadocReport.java/clean/maven-plugins/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1836,
4820,
12,
6458,
2573,
262,
3639,
1216,
17176,
4820,
503,
565,
288,
3639,
775,
3639,
288,
5411,
509,
3214,
5593,
273,
5542,
18,
588,
1442,
7675,
588,
12,
5542,
18,
15137,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1836,
4820,
12,
6458,
2573,
262,
3639,
1216,
17176,
4820,
503,
565,
288,
3639,
775,
3639,
288,
5411,
509,
3214,
5593,
273,
5542,
18,
588,
1442,
7675,
588,
12,
5542,
18,
15137,
... |
try { this.wasAcr = false; getNextUnicodeChar(); return CharOperation.isWhitespace(this.currentCharacter); } catch (IndexOutOfBoundsException e){ this.currentPosition--; throw new InvalidInputException(INVALID_UNICODE_ESCAPE); } | this.wasAcr = false; getNextUnicodeChar(); return CharOperation.isWhitespace(this.currentCharacter); | public final boolean jumpOverUnicodeWhiteSpace() throws InvalidInputException { //BOOLEAN //handle the case of unicode. Jump over the next whiteSpace //making startPosition pointing on the next available char //On false, the currentCharacter is filled up with a potential //correct char try { this.wasAcr = false; getNextUnicodeChar(); return CharOperation.isWhitespace(this.currentCharacter); } catch (IndexOutOfBoundsException e){ this.currentPosition--; throw new InvalidInputException(INVALID_UNICODE_ESCAPE); }} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/e57c1379bf2ab200d310135306edb2776411f753/Scanner.java/buggy/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
727,
1250,
11833,
4851,
16532,
23108,
1435,
1216,
31989,
288,
202,
759,
17900,
202,
759,
4110,
326,
648,
434,
5252,
18,
804,
2801,
1879,
326,
1024,
9578,
3819,
202,
759,
19718,
23549,
1702... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
727,
1250,
11833,
4851,
16532,
23108,
1435,
1216,
31989,
288,
202,
759,
17900,
202,
759,
4110,
326,
648,
434,
5252,
18,
804,
2801,
1879,
326,
1024,
9578,
3819,
202,
759,
19718,
23549,
1702... |
* Load image from either a URL, or as a plain file. */ try { URL url = new URL(filename); image = ImageIO.read(url); } catch (MalformedURLException e) | * Load image. */ if (url != null) { try { image = ImageIO.read(url); } catch (IOException e) { throw new MapyrusException(MapyrusMessages.get(MapyrusMessages.CANNOT_OPEN_URL) + ": " + url + Constants.LINE_SEPARATOR + e.getMessage()); } } else | public void drawGeoImage(String filename, String extras) throws IOException, MapyrusException { BufferedImage image; Rectangle2D.Double worldExtents = getWorldExtents(); TFWFile tfw; /* * Reading large images takes a lot of time. * Do not open it for display if it is not visible * on the page. */ tfw = (TFWFile)mTFWCache.get(filename); if (tfw != null && (!tfw.getBounds().intersects(worldExtents))) { return; } /* * Load image from either a URL, or as a plain file. */ try { URL url = new URL(filename); image = ImageIO.read(url); } catch (MalformedURLException e) { image = ImageIO.read(new File(filename)); } if (image == null) { throw new MapyrusException(MapyrusMessages.get(MapyrusMessages.INVALID_FORMAT) + ": " + filename); } if (tfw == null) { tfw = new TFWFile(filename, image); mTFWCache.put(filename, tfw); } /* * Check for a file containing a clip polygon for this image. */ GeometricPath clipPolygon = null; float brightness = 1; StringTokenizer st = new StringTokenizer(extras); while (st.hasMoreTokens()) { String token = st.nextToken(); if (token.startsWith("clipfile=")) { String clipFilename = token.substring(9); ImageClippingFile clipFile = new ImageClippingFile(clipFilename, mWorldCtm); clipPolygon = clipFile.getClippingPolygon(); } else if (token.startsWith("brightness=")) { String s = token.substring(11); try { brightness = Float.parseFloat(s); } catch (NumberFormatException e) { throw new MapyrusException(MapyrusMessages.get(MapyrusMessages.INVALID_NUMBER) + ": " + s); } } } /* * Convert world coordinate bounding box of image to millimetre * positions on the page. */ Rectangle2D bounds = tfw.getBounds(); double []cornerPts = new double[4]; /* * Save original path and clipping path. */ GeometricPath pathCopy = mPath; ArrayList clippingPathCopy; if (mClippingPaths != null) clippingPathCopy = (ArrayList)mClippingPaths.clone(); else clippingPathCopy = null; if (clipPolygon != null) { /* * Temporarily set path to clip polygon read from file * and clip to it. */ mOutputFormat.saveState(); mPath = clipPolygon; clipInside(); } setGraphicsAttributes(ATTRIBUTE_CLIP); if (worldExtents.getBounds().contains(bounds)) { cornerPts[0] = bounds.getMinX(); cornerPts[1] = bounds.getMinY(); cornerPts[2] = bounds.getMaxX(); cornerPts[3] = bounds.getMaxY(); if (mWorldCtm != null) mWorldCtm.transform(cornerPts, 0, cornerPts, 0, 2); if (brightness != 1) { ImageFilter.filter(image, brightness); } /* * Entire image is on page. Draw it all. */ mOutputFormat.drawGeoImage(image, cornerPts[0], cornerPts[1], cornerPts[2] - cornerPts[0], cornerPts[3] - cornerPts[1]); } else if (worldExtents.intersects(bounds)) { /* * Image is partially on page. Only draw the part of the * image that is visible. */ double x1factor = (worldExtents.getMinX() - bounds.getMinX()) / bounds.getWidth(); double y1factor = (worldExtents.getMinY() - bounds.getMinY()) / bounds.getHeight(); double x2factor = (worldExtents.getMaxX() - bounds.getMinX()) / bounds.getWidth(); double y2factor = (worldExtents.getMaxY() - bounds.getMinY()) / bounds.getHeight(); if (x1factor > 1) x1factor = 1; else if (x1factor < 0) x1factor = 0; if (y1factor > 1) y1factor = 1; else if (y1factor < 0) y1factor = 0; if (x2factor > 1) x2factor = 1; else if (x2factor < 0) x2factor = 0; if (y2factor > 1) y2factor = 1; else if (y2factor < 0) y2factor = 0; double wx1 = bounds.getMinX() + bounds.getWidth() * x1factor; double ix1 = image.getWidth() * x1factor; double wy1 = bounds.getMinY() + bounds.getHeight() * y1factor; double iy1 = image.getHeight() * y1factor; double wx2 = bounds.getMinX() + bounds.getWidth() * x2factor; double ix2 = image.getWidth() * x2factor; double wy2 = bounds.getMinY() + bounds.getHeight() * y2factor; double iy2 = image.getHeight() * y2factor; cornerPts[0] = wx1; cornerPts[1] = wy1; cornerPts[2] = wx2; cornerPts[3] = wy2; if (mWorldCtm != null) mWorldCtm.transform(cornerPts, 0, cornerPts, 0, 2); int iWidth = (int)Math.round(ix2 - ix1); int iHeight = (int)Math.round(iy2 - iy1); double iy = image.getHeight() - iy2; image = image.getSubimage((int)Math.round(ix1), (int)Math.round(iy), Math.max(iWidth, 1), Math.max(1, iHeight)); if (brightness != 1) { ImageFilter.filter(image, brightness); } mOutputFormat.drawGeoImage(image, cornerPts[0], cornerPts[1], cornerPts[2] - cornerPts[0], cornerPts[3] - cornerPts[1]); } /* * Remove any clipping polygon we set for the image. */ if (clipPolygon != null) { mPath = pathCopy; mClippingPaths = clippingPathCopy; if (!mOutputFormat.restoreState()) { mAttributesChanged |= ATTRIBUTE_CLIP; mAttributesPending |= ATTRIBUTE_CLIP; } } } | 2501 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2501/1bec597293d79e81fc03e146296ef7b51b2be28f/Context.java/clean/src/org/mapyrus/Context.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3724,
12447,
2040,
12,
780,
1544,
16,
514,
11875,
13,
202,
202,
15069,
1860,
16,
1635,
93,
8010,
503,
202,
95,
202,
202,
17947,
2040,
1316,
31,
202,
202,
19463,
22,
40,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3724,
12447,
2040,
12,
780,
1544,
16,
514,
11875,
13,
202,
202,
15069,
1860,
16,
1635,
93,
8010,
503,
202,
95,
202,
202,
17947,
2040,
1316,
31,
202,
202,
19463,
22,
40,
... |
if (size < Integer.MAX_VALUE) { if (code.getLineNumberTable() == null) return size; int firstLineNumber = code.getLineNumberTable().getSourceLine(tightStartPC); int lastLineNumber = code.getLineNumberTable().getSourceLine(tightEndPC); int diff = lastLineNumber - firstLineNumber + 1; if (diff >= size && diff <= size/8) return diff; | if (size == Integer.MAX_VALUE) return size; size = (size+7) / 8; LineNumberTable lineNumberTable = code.getLineNumberTable(); if (lineNumberTable == null) return size; int count = 0; for(LineNumber line : lineNumberTable.getLineNumberTable()) { if (line.getStartPC() > tightEndPC) break; if (line.getStartPC() >= tightStartPC) count++; | public int getSizeOfSurroundingTryBlock(int pc) { if (code == null) throw new IllegalStateException("Not visiting Code"); int size = Integer.MAX_VALUE; int tightStartPC = 0; int tightEndPC = Integer.MAX_VALUE; if (code.getExceptionTable() == null) return size; for (CodeException catchBlock : code.getExceptionTable()) { int startPC = catchBlock.getStartPC(); int endPC = catchBlock.getEndPC(); if (pc >= startPC && pc <= endPC) { int thisSize = endPC - startPC; if (size > thisSize) { size = thisSize; tightStartPC = startPC; tightEndPC = endPC; } } } if (size < Integer.MAX_VALUE) { if (code.getLineNumberTable() == null) return size; int firstLineNumber = code.getLineNumberTable().getSourceLine(tightStartPC); int lastLineNumber = code.getLineNumberTable().getSourceLine(tightEndPC); int diff = lastLineNumber - firstLineNumber + 1; if (diff >= size && diff <= size/8) return diff; } return size / 8; } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/f953c4b07cb82b75d914ee907bb58a37922ee8cd/PreorderVisitor.java/clean/findbugs/src/java/edu/umd/cs/findbugs/visitclass/PreorderVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
1071,
509,
9950,
951,
7719,
17376,
7833,
1768,
12,
474,
6125,
13,
288,
1082,
202,
430,
261,
710,
422,
446,
13,
604,
394,
5477,
2932,
1248,
3757,
310,
3356,
8863,
1082,
202,
474,
963,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
1071,
509,
9950,
951,
7719,
17376,
7833,
1768,
12,
474,
6125,
13,
288,
1082,
202,
430,
261,
710,
422,
446,
13,
604,
394,
5477,
2932,
1248,
3757,
310,
3356,
8863,
1082,
202,
474,
963,
2... |
if (entryCount < 1) entryCount = defaultEntries; if (entryCount > maxEntries) entryCount = maxEntries; | public List getWeblogEntries() { // Display same number of entries in feed as displayed on page int entryCount = weblog.getEntryDisplayCount(); // But don't exceed installation-wide maxEntries settings int maxEntries = RollerRuntimeConfig.getIntProperty("site.newsfeeds.maxEntries"); int defaultEntries = RollerRuntimeConfig.getIntProperty("site.newsfeeds.defaultEntries"); if (entryCount < 1) entryCount = defaultEntries; if (entryCount > maxEntries) entryCount = maxEntries; List results = new ArrayList(); try { Roller roller = RollerFactory.getRoller(); WeblogManager wmgr = roller.getWeblogManager(); List entries = wmgr.getWeblogEntries( weblog, null, null, new Date(), feedRequest.getWeblogCategoryName(), WeblogEntryData.PUBLISHED, "pubTime", feedRequest.getLocale(), 0, entryCount); for (Iterator it = entries.iterator(); it.hasNext();) { WeblogEntryData entry = (WeblogEntryData) it.next(); results.add(WeblogEntryDataWrapper.wrap(entry)); } } catch (Exception e) { log.error("ERROR: fetching weblog list", e); } return results; } | 46431 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46431/2d1bbda9565dd27ecdad4ec412414c1f1a59c1a6/FeedModel.java/buggy/src/org/apache/roller/ui/rendering/model/FeedModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
20312,
1330,
5400,
1435,
288,
7734,
368,
9311,
1967,
1300,
434,
3222,
316,
4746,
487,
10453,
603,
1363,
3639,
509,
1241,
1380,
273,
3311,
1330,
18,
588,
1622,
4236,
1380,
5621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
20312,
1330,
5400,
1435,
288,
7734,
368,
9311,
1967,
1300,
434,
3222,
316,
4746,
487,
10453,
603,
1363,
3639,
509,
1241,
1380,
273,
3311,
1330,
18,
588,
1622,
4236,
1380,
5621,
... | |
if(observer != null) observer.passDown(evt); | public void down(Event evt) { if(log.isInfoEnabled()) log.info("event is " + evt + ", group_addr=" + group_addr + ", time=" + System.currentTimeMillis() + ", hdrs are " + Util.printEvent(evt)); // handle all non-message events if(evt.getType() != Event.MSG) { handleDownEvent(evt); return; } // extract message Message msg=(Message)evt.getArg(); // Because we don't call Protocol.passDown(), we notify the observer // directly (e.g. PerfObserver). // This way, we still have performance numbers for UDP if(observer != null) observer.passDown(evt); // publish the message to the topic sendMessage(msg); } | 51463 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51463/28be62b4097e0b01b17ca403d23ca6a4aac01eca/JMS.java/clean/src/org/jgroups/protocols/JMS.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2588,
12,
1133,
6324,
13,
288,
5411,
309,
12,
1330,
18,
291,
966,
1526,
10756,
613,
18,
1376,
2932,
2575,
353,
315,
397,
6324,
397,
3104,
1041,
67,
4793,
1546,
397,
7734,
104... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2588,
12,
1133,
6324,
13,
288,
5411,
309,
12,
1330,
18,
291,
966,
1526,
10756,
613,
18,
1376,
2932,
2575,
353,
315,
397,
6324,
397,
3104,
1041,
67,
4793,
1546,
397,
7734,
104... | |
StringBuffer result = new StringBuffer(); | boolean found = false; int wsIndex = -1; | public static String removeWhiteSpaces(String s) { StringBuffer result = new StringBuffer(); int size = s.length(); for (int i = 0; i < size; i++) { char ch = s.charAt(i); if (ch > ' ') result.append(ch); } return result.toString();} | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/058e30cb9dffd83edb17372d63d42a9bece74b29/StringConverter.java/buggy/bundles/org.eclipse.ui/Eclipse JFace/org/eclipse/jface/resource/StringConverter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
760,
514,
1206,
13407,
12077,
12,
780,
272,
13,
288,
202,
780,
1892,
563,
273,
394,
6674,
5621,
202,
474,
963,
273,
272,
18,
2469,
5621,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
760,
514,
1206,
13407,
12077,
12,
780,
272,
13,
288,
202,
780,
1892,
563,
273,
394,
6674,
5621,
202,
474,
963,
273,
272,
18,
2469,
5621,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
... |
public SkipTree (String fullname) | public SkipTree (Context context, String fullname) | public SkipTree (String fullname) { super(fullname, AbstractCommand.NO_PARAMETERS); } | 3907 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3907/d0dc44d3c9cb189284ad45c5d39a8c02f024fc70/SkipTree.java/buggy/kom/java/nu/rydin/kom/frontend/text/commands/SkipTree.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6611,
2471,
261,
780,
13321,
13,
202,
95,
202,
202,
9565,
12,
21885,
16,
4115,
2189,
18,
3417,
67,
20103,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6611,
2471,
261,
780,
13321,
13,
202,
95,
202,
202,
9565,
12,
21885,
16,
4115,
2189,
18,
3417,
67,
20103,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if (argv.length != 2) { System.err.println("Usage: " + MergeResults.class.getName() + " <orig results> <new results>"); | if (argv.length != 3) { System.err.println("Usage: " + MergeResults.class.getName() + " <orig results> <new results> <output file>"); | public static void main(String[] argv) throws Exception { if (argv.length != 2) { System.err.println("Usage: " + MergeResults.class.getName() + " <orig results> <new results>"); System.exit(1); } String origResultsFile = argv[0]; String newResultsFile = argv[1]; HashMap<String, String> classToSourceFileMap = new HashMap<String, String>(); SortedBugCollection origCollection = new SortedBugCollection(); SortedBugCollection newCollection = new SortedBugCollection(); origCollection.readXML(origResultsFile, new HashMap<String,String>()); newCollection.readXML(newResultsFile, classToSourceFileMap); Iterator<BugInstance> i = origCollection.iterator(); while (i.hasNext()) { BugInstance orig = i.next(); if (newCollection.contains(orig)) { BugInstance matching = newCollection.getMatching(orig); matching.setAnnotationText(orig.getAnnotationText()); } } newCollection.writeXML(System.out, classToSourceFileMap); } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/9d97ccc0abfa7bdb9b961d83872ff3dc4556b2ee/MergeResults.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/MergeResults.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
5261,
13,
1216,
1185,
288,
202,
202,
430,
261,
19485,
18,
2469,
480,
576,
13,
288,
1082,
202,
3163,
18,
370,
18,
8222,
2932,
5357,
30,
315,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
5261,
13,
1216,
1185,
288,
202,
202,
430,
261,
19485,
18,
2469,
480,
576,
13,
288,
1082,
202,
3163,
18,
370,
18,
8222,
2932,
5357,
30,
315,
39... |
String output = AdminDoc.adminDoc( meta_id, meta_id, user, req, res ); | String output = AdminDoc.adminDoc( meta_id, user, req, res ); | public void doPost( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException { Utility.setDefaultHtmlContentType( res ); Writer out = res.getWriter(); ImcmsServices imcref = Imcms.getServices(); int meta_id = Integer.parseInt( req.getParameter( "meta_id" ) ); UserDomainObject user = Utility.getLoggedOnUser( req ); if ( !imcref.checkDocAdminRights( meta_id, user, 4 ) ) { // Checking to see if user may edit this String output = AdminDoc.adminDoc( meta_id, meta_id, user, req, res ); if ( output != null ) { out.write( output ); } return; } String[] perms = req.getParameterValues( "permissions" ); String[] perms_ex = req.getParameterValues( "permissions_ex" ); int permissions = 0; String newstr = ""; // Check if this is the permissions for new documents, or for this one. if ( req.getParameter( "new" ) != null ) { newstr = "New"; } if ( req.getParameter( "ok" ) != null ) { // User pressed ok. // Here i fetch the current users set-id and the document-permissions for this document (Whether set-id 1 is more privileged than set-id 2.) String[] current_permissions = imcref.sqlProcedure( "GetUserPermissionSet", new String[]{"" + meta_id, "" + user.getId()} ); int user_set_id = Integer.parseInt( current_permissions[0] ); int user_perm_set = Integer.parseInt( current_permissions[1] ); int currentdoc_perms = Integer.parseInt( current_permissions[2] ); // I'll make a hashmap to store the users extended permissions in. // The hashmap will map permission_ids to hashsets containing permission_data. HashMap perm_ex_data_map = new HashMap(); // Get an array containing perm_id, perm_data, perm_id, perm_data, and so on. String[] user_permission_data = imcref.sqlProcedure( "GetUserPermissionSetEx", new String[]{"" + meta_id, "" + user.getId()} ); for ( int i = 0; i < user_permission_data.length; i += 2 ) { // Check if the map contains a set for this permission_id HashSet temp_set = (HashSet)perm_ex_data_map.get( user_permission_data[i] ); if ( temp_set == null ) { // If not, add it. temp_set = new HashSet(); perm_ex_data_map.put( user_permission_data[i], temp_set ); } // put the permission_data in the set. temp_set.add( user_permission_data[i + 1] ); } int set_id = Integer.parseInt( req.getParameter( "set_id" ) ); // Delete all extended permissions for this permissionset. imcref.sqlUpdateProcedure( "Delete" + newstr + "DocPermissionSetEx", new String[]{"" + meta_id, "" + set_id} ); // Read checkboxes and OR the values into an int, which is stored in the db. for ( int i = 0; perms != null && i < perms.length; ++i ) { int perm = Integer.parseInt( perms[i] ); if ( user_set_id == 0 // If current user has full rights, || ( user_set_id == 1 // or has set-id 1 && set_id == 2 // and is changing set-id 2 && ( user_perm_set & perm ) != 0 // and the user has this permission himself && ( currentdoc_perms & 1 ) != 0// and set-id 1 is more privleged than set-id 2 for this document. (Bit 0) ) ) { permissions |= perm; } } imcref.sqlUpdateProcedure( "Set" + newstr + "DocPermissionSet", new String[]{"" + meta_id, "" + set_id, "" + permissions} ); // Read the select-lists for the new extended permissions, and store the values in the db. for ( int i = 0; perms_ex != null && i < perms_ex.length; ++i ) { // We have an array of all extended permissions, // in the form permission_value. I.e. 8_1, 524288_5, and so on. String perm_ex_str = perms_ex[i]; int us_index = perm_ex_str.indexOf( "_" ); // Get the permission... String perm_str = perm_ex_str.substring( 0, us_index ); // ...and the value for the permission. String value_str = perm_ex_str.substring( us_index + 1 ); int perm = Integer.parseInt( perm_str ); int value = Integer.parseInt( value_str ); HashSet temp_set; if ( user_set_id == 0 // If current user has full rights, || ( user_set_id == 1 // or has set-id 1 && set_id == 2 // and is changing set-id 2 // And the user has this particular extended permission. // Get the hashset for the permission_id from the map, and check if it contains the value. && ( ( temp_set = (HashSet)perm_ex_data_map.get( perm_str ) ) != null ? temp_set.contains( value_str ) : false ) && ( currentdoc_perms & 1 ) != 0// and set-id 1 is more privleged than set-id 2 for this document. (Bit 0) ) ) { imcref.sqlUpdateProcedure( "Set" + newstr + "DocPermissionSetEx", new String[]{"" + meta_id, "" + set_id, "" + perm, "" + value} ); } } } user.put( "flags", new Integer( 4 ) ); String output = AdminDoc.adminDoc( meta_id, meta_id, user, req, res ); if ( output != null ) { out.write( output ); } } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/97ede3f46bf3071ffc629509349f12863339c1ad/SavePermissions.java/clean/server/src/com/imcode/imcms/servlet/admin/SavePermissions.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
3349,
12,
9984,
1111,
16,
12446,
400,
262,
1216,
16517,
16,
1860,
288,
3639,
13134,
18,
542,
1868,
4353,
8046,
12,
400,
11272,
3639,
5497,
596,
273,
400,
18,
588,
2289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
3349,
12,
9984,
1111,
16,
12446,
400,
262,
1216,
16517,
16,
1860,
288,
3639,
13134,
18,
542,
1868,
4353,
8046,
12,
400,
11272,
3639,
5497,
596,
273,
400,
18,
588,
2289,
... |
child.setGID(children); | if(!validate) child.setGID(children); if(child.getNodeType() == Node.ELEMENT_NODE) setDocumentElement(children); | public void appendChild(NodeImpl child) throws DOMException { ++children; child.setGID(children); treeLevelOrder[0] = children; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/79512eae28b7219239f4a67965b185d1c560ab43/DocumentImpl.java/clean/src/org/exist/dom/DocumentImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
5833,
12,
907,
2828,
1151,
13,
1216,
4703,
503,
288,
202,
202,
9904,
5906,
31,
202,
202,
3624,
18,
542,
28258,
12,
5906,
1769,
202,
202,
3413,
2355,
2448,
63,
20,
65,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
5833,
12,
907,
2828,
1151,
13,
1216,
4703,
503,
288,
202,
202,
9904,
5906,
31,
202,
202,
3624,
18,
542,
28258,
12,
5906,
1769,
202,
202,
3413,
2355,
2448,
63,
20,
65,
2... |
if (getRealState() == TransactionState.TRYING) { if (statusCode / 100 == 1) { this.setState(TransactionState.PROCEEDING); } else if (200 <= statusCode && statusCode <= 699) { if (!isInviteTransaction()) { this.setState(TransactionState.COMPLETED); } else { if (statusCode / 100 == 2) { this.setState(TransactionState.TERMINATED); } else this.setState(TransactionState.COMPLETED); } if (!isReliable()) { | if (isInviteTransaction()) { | public void sendMessage(SIPMessage messageToSend) throws IOException { // Message typecast as a response SIPResponse transactionResponse; // Status code of the response being sent to the client int statusCode; // Get the status code from the response transactionResponse = (SIPResponse) messageToSend; statusCode = transactionResponse.getStatusCode(); SIPDialog dialog = this.dialog; try { // Provided we have set the banch id for this we set the BID for the // outgoing via. if (this.getOriginalRequest().getTopmostVia().getBranch() != null) transactionResponse.getTopmostVia().setBranch(this.getBranch()); else transactionResponse.getTopmostVia().removeParameter( ParameterNames.BRANCH); // Make the topmost via headers match identically for the // transaction // rsponse. if (!this.getOriginalRequest().getTopmostVia().hasPort()) transactionResponse.getTopmostVia().removePort(); } catch (ParseException ex) { ex.printStackTrace(); } // Method of the response does not match the request used to // create the transaction - transaction state does not change. if (!transactionResponse.getCSeq().getMethod().equals( getOriginalRequest().getMethod())) { sendResponse(transactionResponse); return; } // Dialog state machine state adjustment. if (this.dialog != null) { if (this.dialog.getRemoteTag() == null && transactionResponse.getTo().getTag() != null && ((SIPTransactionStack) this.getSIPStack()) .isDialogCreated(transactionResponse.getCSeq() .getMethod())) { this.dialog.setRemoteTag(transactionResponse.getTo().getTag()); ((SIPTransactionStack) this.getSIPStack()) .putDialog(this.dialog); if (statusCode / 100 == 1) this.dialog.setState(SIPDialog.EARLY_STATE); } if (((SIPTransactionStack) this.getSIPStack()) .isDialogCreated(transactionResponse.getCSeq().getMethod()) && transactionResponse.getCSeq().getMethod().equals( getOriginalRequest().getMethod())) { if (statusCode / 100 == 2) { // The state changes when the ACK is received for an invite // transaction // For other dialogs, the state changes when you send out // the response. if (!this.isInviteTransaction()) { this.dialog.setState(SIPDialog.CONFIRMED_STATE); } else { if (this.dialog.getState() == null) this.dialog.setState(SIPDialog.EARLY_STATE); } } else if (statusCode >= 300 && statusCode <= 699 && ( this.dialog.getState() == null || this.dialog.getState().equals(DialogState.EARLY))) { // The Dialog is terminated IFF this status code // is detected when the Dialog is in the EARLY state // Bug was reported by Daniel Machin Vazquez-Illa // <dmachin@dit.upm.es> this.dialog.setState(SIPDialog.TERMINATED_STATE); } } else if (transactionResponse.getCSeq().getMethod().equals( Request.BYE) && statusCode / 100 == 2 && dialog != null) { // Dialog will be terminated when the transction is terminated. if (!isReliable()) this.dialog.setState(SIPDialog.COMPLETED_STATE); else this.dialog.setState(SIPDialog.TERMINATED_STATE); } } // If the TU sends a provisional response while in the // trying state, if (getRealState() == TransactionState.TRYING) { if (statusCode / 100 == 1) { this.setState(TransactionState.PROCEEDING); } else if (200 <= statusCode && statusCode <= 699) { // Check -- bug report from christophe if (!isInviteTransaction()) { this.setState(TransactionState.COMPLETED); } else { if (statusCode / 100 == 2) { this.setState(TransactionState.TERMINATED); } else this.setState(TransactionState.COMPLETED); } if (!isReliable()) { enableRetransmissionTimer(); } enableTimeoutTimer(TIMER_J); } // If the transaction is in the proceeding state, } else if (getRealState() == TransactionState.PROCEEDING) { if (isInviteTransaction()) { // If the response is a failure message, if (statusCode / 100 == 2) { // Set up to catch returning ACKs // Antonis Karydas: Suggestion // Recall that the CANCEL's response will go // through this transaction // and this may well be it. Do NOT change the // transaction state if this // is a response for a CANCEL. // Wait, instead for the 487 from TU. if (!transactionResponse.getCSeq().getMethod().equals( Request.CANCEL)) { this.collectionTime = TIMER_J; this.setState(TransactionState.TERMINATED); if (!isReliable()) { // test for dialog existance ( Bug report // from Bill Roome ) if ( this.dialog != null) this.dialog.setRetransmissionTicks(); enableRetransmissionTimer(); } enableTimeoutTimer(TIMER_J); } } else if (300 <= statusCode && statusCode <= 699) { // Set up to catch returning ACKs this.setState(TransactionState.COMPLETED); if (!isReliable()) { enableRetransmissionTimer(); } // Changed to TIMER_H as suggested by // Antonis Karydas enableTimeoutTimer(TIMER_H); // If the response is a success message, } else if (statusCode / 100 == 2) { // Terminate the transaction this.setState(TransactionState.TERMINATED); disableRetransmissionTimer(); disableTimeoutTimer(); } // If the transaction is not an invite transaction // and this is a final response, } else if (200 <= statusCode && statusCode <= 699) { // Set up to retransmit this response, // or terminate the transaction this.setState(TransactionState.COMPLETED); if (!isReliable()) { disableRetransmissionTimer(); enableTimeoutTimer(TIMER_J); } else { this.setState(TransactionState.TERMINATED); } } // If the transaction has already completed, } else if (TransactionState.COMPLETED == this.getRealState()) { return; } try { // Send the message to the client. // Record the last message sent out. lastResponse = transactionResponse; this.sendResponse(transactionResponse); } catch (IOException e) { this.setState(TransactionState.TERMINATED); this.collectionTime = 0; throw e; } } | 3364 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3364/68c0ca844a7d5fe4a7744cbf9898184966ce0680/SIPServerTransaction.java/clean/src/gov/nist/javax/sip/stack/SIPServerTransaction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
15399,
12,
17739,
1079,
883,
28878,
13,
1216,
1860,
288,
3639,
368,
2350,
618,
4155,
487,
279,
766,
3639,
348,
2579,
1064,
2492,
1064,
31,
3639,
368,
2685,
981,
434,
326,
766,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
15399,
12,
17739,
1079,
883,
28878,
13,
1216,
1860,
288,
3639,
368,
2350,
618,
4155,
487,
279,
766,
3639,
348,
2579,
1064,
2492,
1064,
31,
3639,
368,
2685,
981,
434,
326,
766,
... |
RubyArray args = (RubyArray)state.begin(iVisited.getArgsNode()); | RubyArray args = (RubyArray)EvaluationState.eval(runtime.getCurrentContext(), iVisited.getArgsNode(), runtime.getCurrentContext().getFrameSelf()); | public Instruction visitCallNode(CallNode iVisited) { IRubyObject receiver = state.begin(iVisited.getReceiverNode()); if (iVisited.getArgsNode() == null) { // attribute set. receiver.callMethod(iVisited.getName(), new IRubyObject[] {value}, CallType.NORMAL); } else { // element set RubyArray args = (RubyArray)state.begin(iVisited.getArgsNode()); args.append(value); receiver.callMethod(iVisited.getName(), args.toJavaArray(), CallType.NORMAL); } return null; } | 45221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45221/6e15491217631472c05c6928672f9c7064a978b3/AssignmentVisitor.java/clean/src/org/jruby/evaluator/AssignmentVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
24605,
3757,
1477,
907,
12,
1477,
907,
277,
30019,
13,
288,
3639,
15908,
10340,
921,
5971,
273,
919,
18,
10086,
12,
77,
30019,
18,
588,
12952,
907,
10663,
3639,
309,
261,
77,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
24605,
3757,
1477,
907,
12,
1477,
907,
277,
30019,
13,
288,
3639,
15908,
10340,
921,
5971,
273,
919,
18,
10086,
12,
77,
30019,
18,
588,
12952,
907,
10663,
3639,
309,
261,
77,
... |
DebuggerSupport debuggerSupport = getDebugger(QName.valueOf(procId)); return debuggerSupport.getGlobalBreakpoints(); } | DebuggerSupport debuggerSupport = getDebugger(QName.valueOf(procId)); return debuggerSupport.getGlobalBreakpoints(); } | public Breakpoint[] getGlobalBreakpoints(String procId) throws ManagementException { DebuggerSupport debuggerSupport = getDebugger(QName.valueOf(procId)); return debuggerSupport.getGlobalBreakpoints(); } | 47044 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47044/40604da2488c0e0e9de3a307e5a05bd456b9a02a/BpelManagementFacadeImpl.java/clean/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelManagementFacadeImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
17030,
1153,
8526,
20591,
7634,
4139,
12,
780,
5418,
548,
13,
1216,
13303,
503,
288,
565,
28645,
6289,
19977,
6289,
273,
336,
24113,
12,
13688,
18,
1132,
951,
12,
9381,
548,
10019,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
17030,
1153,
8526,
20591,
7634,
4139,
12,
780,
5418,
548,
13,
1216,
13303,
503,
288,
565,
28645,
6289,
19977,
6289,
273,
336,
24113,
12,
13688,
18,
1132,
951,
12,
9381,
548,
10019,
... |
reweaveButton.setSelection(false); reweaveCompressButton.setSelection(false); | noReweaveButton.setSelection(false); | public void widgetSelected(SelectionEvent e) { if (e.getSource().equals(noweaveButton)) { boolean buttonSelected = noweaveButton.getSelection(); if (buttonSelected) { lazytjpButton.setSelection(false); noinlineButton.setSelection(false); reweaveButton.setSelection(false); reweaveCompressButton.setSelection(false); } lazytjpButton.setEnabled(!buttonSelected); noinlineButton.setEnabled(!buttonSelected); reweaveButton.setEnabled(!buttonSelected); reweaveCompressButton.setEnabled(!buttonSelected); } else if (e.getSource().equals(reweaveButton)) { boolean buttonSelected = reweaveButton.getSelection(); if (buttonSelected) { reweaveCompressButton.setSelection(false); } } else if (e.getSource().equals(reweaveCompressButton)) { boolean buttonSelected = reweaveCompressButton.getSelection(); if (buttonSelected) { reweaveButton.setSelection(false); } } } | 13558 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13558/6b7a0d253e4a47d2cb2f98602fe7977b13d51ef2/AJCompilerPreferencePage.java/buggy/org.eclipse.ajdt.ui/src/org/eclipse/ajdt/internal/ui/preferences/AJCompilerPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
3604,
7416,
12,
6233,
1133,
425,
13,
288,
1082,
202,
430,
261,
73,
18,
588,
1830,
7675,
14963,
12,
3338,
73,
836,
3616,
3719,
288,
9506,
202,
6494,
3568,
7416,
273,
2037... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
3604,
7416,
12,
6233,
1133,
425,
13,
288,
1082,
202,
430,
261,
73,
18,
588,
1830,
7675,
14963,
12,
3338,
73,
836,
3616,
3719,
288,
9506,
202,
6494,
3568,
7416,
273,
2037... |
scrollLine = 0; | int scrollLine = 0; | public void reset() { if(Debug.SCROLL_DEBUG) Log.log(Log.DEBUG,this,"reset()"); physicalLine = getFirstVisibleLine(); scrollLine = 0; while(physicalLine != -1) { updateScreenLineCount(physicalLine); scrollLine += getScreenLineCount(physicalLine); physicalLine = getNextVisibleLine(physicalLine); } physicalLine = buffer.getLineCount(); firstLine.ensurePhysicalLineIsVisible(); textArea.recalculateLastPhysicalLine(); textArea.updateScrollBars(); } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/61b0a19ad013ce07f91686ccd3ab5c99f7ac0918/DisplayManager.java/clean/org/gjt/sp/jedit/textarea/DisplayManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
2715,
1435,
202,
202,
95,
1082,
202,
430,
12,
2829,
18,
2312,
14555,
67,
9394,
13,
9506,
202,
1343,
18,
1330,
12,
1343,
18,
9394,
16,
2211,
10837,
6208,
1435,
8863,
1082... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
2715,
1435,
202,
202,
95,
1082,
202,
430,
12,
2829,
18,
2312,
14555,
67,
9394,
13,
9506,
202,
1343,
18,
1330,
12,
1343,
18,
9394,
16,
2211,
10837,
6208,
1435,
8863,
1082... |
asm.emitLVAL(T1, type.getTibOffset()); | asm.emitLVALAddr(T1, type.getTibOffset()); | protected final void emit_instanceof_final(VM_Type type) { asm.emitLAddrToc(T0, VM_Entrypoints.instanceOfFinalMethod.getOffset()); asm.emitMTCTR(T0); peekAddr(T0, 0); asm.emitLVAL(T1, type.getTibOffset()); asm.emitBCCTRL(); pokeInt(T0, 0); } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/3a1409586ed0fc007c4120f3a96d6f7a1ae3593c/VM_Compiler.java/buggy/rvm/src/vm/arch/powerPC/compilers/baseline/VM_Compiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
727,
918,
3626,
67,
1336,
792,
67,
6385,
12,
7397,
67,
559,
618,
13,
288,
565,
20415,
18,
18356,
48,
3178,
56,
504,
12,
56,
20,
16,
225,
8251,
67,
1622,
4139,
18,
1336,
951,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
727,
918,
3626,
67,
1336,
792,
67,
6385,
12,
7397,
67,
559,
618,
13,
288,
565,
20415,
18,
18356,
48,
3178,
56,
504,
12,
56,
20,
16,
225,
8251,
67,
1622,
4139,
18,
1336,
951,
7... |
return new String(Integer.toString(connection.this_driver.getMajorVersion())+"."+Integer.toString(connection.this_driver.getMinorVersion())); | return Integer.toString(connection.this_driver.getMajorVersion())+"."+Integer.toString(connection.this_driver.getMinorVersion()); | public String getDriverVersion() throws SQLException { return new String(Integer.toString(connection.this_driver.getMajorVersion())+"."+Integer.toString(connection.this_driver.getMinorVersion())); } | 46312 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46312/7f171b599a50d471d4791c768b538978b4a2dc95/DatabaseMetaData.java/buggy/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
15885,
1444,
1435,
1216,
6483,
225,
288,
565,
327,
2144,
18,
10492,
12,
4071,
18,
2211,
67,
7407,
18,
588,
17581,
1444,
10756,
9078,
1199,
15,
4522,
18,
10492,
12,
4071,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
15885,
1444,
1435,
1216,
6483,
225,
288,
565,
327,
2144,
18,
10492,
12,
4071,
18,
2211,
67,
7407,
18,
588,
17581,
1444,
10756,
9078,
1199,
15,
4522,
18,
10492,
12,
4071,
18,
... |
return -1; | return readFromLine(); | public int read(byte[] buffer, int offset, int length) throws IOException { if (length > 0) { int read = read(); if ((read == -1) && (this.endOfStream || this.boundaryEncountered)) { return -1; } int bytesRead = 1; buffer[offset++] = (byte) read; while ((bytesRead < length) && (((read = read())!= -1) || ((read == -1) && (!this.boundaryEncountered))) && !this.maxLengthMet) { buffer[offset++] = (byte) read; bytesRead++; } return bytesRead; } return -1; } | 2722 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2722/08e826c30dbe112730cc452501b7f91747778cd9/MultipartBoundaryInputStream.java/buggy/src/share/org/apache/struts/upload/MultipartBoundaryInputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
855,
12,
7229,
8526,
1613,
16,
509,
1384,
16,
509,
769,
13,
1216,
1860,
565,
288,
3639,
309,
261,
2469,
405,
374,
13,
3639,
288,
5411,
509,
855,
273,
855,
5621,
5411,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
855,
12,
7229,
8526,
1613,
16,
509,
1384,
16,
509,
769,
13,
1216,
1860,
565,
288,
3639,
309,
261,
2469,
405,
374,
13,
3639,
288,
5411,
509,
855,
273,
855,
5621,
5411,
309,
... |
public PyStringMap() { this(4); | public PyStringMap(int capacity) { super(__class__); prime = 0; keys = null; values = null; resize(capacity); | public PyStringMap() { this(4); } | 6527 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6527/093930fed31e41bf82bd2467703d93826eb2657f/PyStringMap.java/buggy/org/python/core/PyStringMap.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4707,
780,
863,
1435,
288,
3639,
333,
12,
24,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4707,
780,
863,
1435,
288,
3639,
333,
12,
24,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
public void put(KeyBlock block) throws IOException; | public void put(SSKBlock block, boolean ignoreAndOverwrite) throws IOException, KeyCollisionException; | public void put(KeyBlock block) throws IOException; | 45341 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45341/42311dad991102d95e5383bfc789478a839c4662/FreenetStore.java/clean/src/freenet/store/FreenetStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1378,
12,
653,
1768,
1203,
13,
1216,
1860,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1378,
12,
653,
1768,
1203,
13,
1216,
1860,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (element.hasAttribute(PRIORITY)) { task.setPriority(element.getAttribute(PRIORITY)); | if (element.hasAttribute(KEY_PRIORITY)) { task.setPriority(element.getAttribute(KEY_PRIORITY)); | protected void readTaskInfo(ITask task, TaskList tlist, Element element, ITaskContainer category, ITask parent) throws TaskExternalizationException { if (element.hasAttribute(PRIORITY)) { task.setPriority(element.getAttribute(PRIORITY)); } else { task.setPriority(DEFAULT_PRIORITY); } if (element.getAttribute(ACTIVE).compareTo(TRUE) == 0) { task.setActive(true); tlist.setActive(task, true); } else { task.setActive(false); } if (element.hasAttribute(ISSUEURL)) { task.setUrl(element.getAttribute(ISSUEURL)); } else { task.setUrl(""); } if (element.hasAttribute(NOTES)) { task.setNotes(element.getAttribute(NOTES)); } else { task.setNotes(""); } if (element.hasAttribute(ELAPSED)) { long elapsed = 0; try { long read = Long.parseLong(element.getAttribute(ELAPSED)); if (read > 0) elapsed = read; } catch (NumberFormatException e) { // ignore } task.setElapsedTime(elapsed); } else { task.setElapsedTime(0); } if (element.hasAttribute(ESTIMATED)) { String est = element.getAttribute(ESTIMATED); try { int estimate = Integer.parseInt(est); task.setEstimatedTimeHours(estimate); } catch (Exception e) { task.setEstimatedTimeHours(0); } } else { task.setEstimatedTimeHours(0); } // NOTE: do not change the order of complete and end date!! if (element.getAttribute(COMPLETE).compareTo(TRUE) == 0) { task.setCompleted(true); } else { task.setCompleted(false); } if (element.hasAttribute(END_DATE)) { task.setCompletionDate(getDateFromString(element.getAttribute(END_DATE))); // task.setEndDate(element.getAttribute(END_DATE)); } else { task.setCompletionDate(null); } if (element.hasAttribute(CREATION_DATE)) { task.setCreationDate(getDateFromString(element.getAttribute(CREATION_DATE))); // task.setCreationDate(element.getAttribute(CREATION_DATE)); } else { task.setCreationDate(Calendar.getInstance().getTime()); } if (element.hasAttribute(REMINDER_DATE)) { task.setReminderDate(getDateFromString(element.getAttribute(REMINDER_DATE))); // task.setReminderDate(element.getAttribute(REMINDER_DATE)); } else { task.setReminderDate(null); } if (element.hasAttribute(REMINDED) && element.getAttribute(REMINDED).compareTo(TRUE) == 0) { task.setReminded(true); } else { task.setReminded(false); } int i = 0; while (element.hasAttribute(LINK + i)) { task.getRelatedLinks().add(element.getAttribute(LINK + i)); i++; } int ii = 0; while (element.hasAttribute(PLAN + ii)) { task.getPlans().add(element.getAttribute(PLAN + i)); ii++; } if (category != null) { task.setCategory((TaskCategory) category); } else { task.setCategory(null); } task.setParent(parent); NodeList list = element.getChildNodes(); for (int j = 0; j < list.getLength(); j++) { Node child = list.item(j); task.addSubTask(readTask(child, tlist, null, task)); } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/e26633f74caad7b801cf9f4e2abaaaa4040a5603/DelegatingTaskExternalizer.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/DelegatingTaskExternalizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
855,
2174,
966,
12,
1285,
835,
1562,
16,
3837,
682,
268,
1098,
16,
3010,
930,
16,
467,
2174,
2170,
3150,
16,
467,
2174,
982,
13,
1082,
202,
15069,
3837,
6841,
1588,
503,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
855,
2174,
966,
12,
1285,
835,
1562,
16,
3837,
682,
268,
1098,
16,
3010,
930,
16,
467,
2174,
2170,
3150,
16,
467,
2174,
982,
13,
1082,
202,
15069,
3837,
6841,
1588,
503,... |
+")Lorg/mozilla/javascript/Function;"); | +")Lorg/mozilla/javascript/Callable;"); | private void generateFunctionAndThisObj(Node node, Node parent) { // Place on stack (function object, function this) pair int type = node.getType(); switch (node.getType()) { case Token.GETPROP: case Token.GETELEM: { Node target = node.getFirstChild(); generateExpression(target, node); Node id = target.getNext(); if (type == Token.GETPROP) { String property = id.getString(); cfw.addPush(property); cfw.addALoad(contextLocal); addScriptRuntimeInvoke( "getPropFunctionAndThis", "(Ljava/lang/Object;" +"Ljava/lang/String;" +"Lorg/mozilla/javascript/Context;" +")Lorg/mozilla/javascript/Function;"); } else { // Optimizer do not optimize this case for now if (node.getIntProp(Node.ISNUMBER_PROP, -1) != -1) throw Codegen.badTree(); generateExpression(id, node); // id cfw.addALoad(contextLocal); addScriptRuntimeInvoke( "getElemFunctionAndThis", "(Ljava/lang/Object;" +"Ljava/lang/Object;" +"Lorg/mozilla/javascript/Context;" +")Lorg/mozilla/javascript/Function;"); } break; } case Token.NAME: { String name = node.getString(); cfw.addPush(name); cfw.addALoad(contextLocal); cfw.addALoad(variableObjectLocal); addScriptRuntimeInvoke( "getNameFunctionAndThis", "(Ljava/lang/String;" +"Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +")Lorg/mozilla/javascript/Function;"); break; } default: // including GETVAR generateExpression(node, parent); cfw.addALoad(contextLocal); addScriptRuntimeInvoke( "getValueFunctionAndThis", "(Ljava/lang/Object;" +"Lorg/mozilla/javascript/Context;" +")Lorg/mozilla/javascript/Function;"); break; } // Get thisObj prepared by get(Name|Prop|Elem|Value)FunctionAndThis cfw.addALoad(contextLocal); addScriptRuntimeInvoke( "lastStoredScriptable", "(Lorg/mozilla/javascript/Context;" +")Lorg/mozilla/javascript/Scriptable;"); } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/8f901d363ed2edf31a1885784e6ea84dee079051/Codegen.java/buggy/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
2083,
1876,
2503,
2675,
12,
907,
756,
16,
2029,
982,
13,
565,
288,
3639,
368,
13022,
603,
2110,
261,
915,
733,
16,
445,
333,
13,
3082,
3639,
509,
618,
273,
756,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
2083,
1876,
2503,
2675,
12,
907,
756,
16,
2029,
982,
13,
565,
288,
3639,
368,
13022,
603,
2110,
261,
915,
733,
16,
445,
333,
13,
3082,
3639,
509,
618,
273,
756,
18,
5... |
HashSet retval = new HashSet(); | Set retval = new HashSet(); | public Set getValuesAsStringSet() { HashSet retval = new HashSet(); if (null == sourceValues) return (retval); // Convert the Set of SignetSubjectAttrValue objects into a Set of Strings for (Iterator values = sourceValues.iterator(); values.hasNext(); ) { String tmpValue = ((SignetSubjectAttrValue)values.next()).getValue(); retval.add(tmpValue); } return (retval); } | 5235 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5235/d7a677bc52ed0164a04201583b3e182a6a5982c4/SignetSubjectAttr.java/buggy/signet/src/edu/internet2/middleware/signet/subjsrc/SignetSubjectAttr.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1000,
13500,
8092,
694,
1435,
202,
95,
202,
202,
13482,
5221,
273,
394,
6847,
5621,
202,
202,
430,
261,
2011,
422,
1084,
1972,
13,
1082,
202,
2463,
261,
18341,
1769,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1000,
13500,
8092,
694,
1435,
202,
95,
202,
202,
13482,
5221,
273,
394,
6847,
5621,
202,
202,
430,
261,
2011,
422,
1084,
1972,
13,
1082,
202,
2463,
261,
18341,
1769,
202,
202,
... |
if (myElHandler.isClosingQuote(iterator, offset)){ return true; } return super.isClosingQuote(iterator, offset); | return myElHandler.isClosingQuote(iterator, offset) || ourJavaHandler.isClosingQuote(iterator, offset) || super.isClosingQuote(iterator, offset); | public boolean isClosingQuote(HighlighterIterator iterator, int offset) { if (myElHandler.isClosingQuote(iterator, offset)){ return true; } return super.isClosingQuote(iterator, offset); } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/40b883a527c3bece00826ba2426034209c32af4f/TypedHandler.java/clean/source/com/intellij/codeInsight/editorActions/TypedHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
353,
15745,
10257,
12,
8573,
23624,
3198,
2775,
16,
509,
1384,
13,
288,
1377,
309,
261,
4811,
4958,
1503,
18,
291,
15745,
10257,
12,
9838,
16,
1384,
3719,
95,
3639,
327,
638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
353,
15745,
10257,
12,
8573,
23624,
3198,
2775,
16,
509,
1384,
13,
288,
1377,
309,
261,
4811,
4958,
1503,
18,
291,
15745,
10257,
12,
9838,
16,
1384,
3719,
95,
3639,
327,
638,
... |
throw new Error("not implemented"); | return sgn < 0; } | public boolean contains(double x, double y) { double w = getWidth(); double h = getHeight(); if (w <= 0 || h <= 0) return false; // XXX Finish implementing. throw new Error("not implemented"); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/560cf787ab92cba97cf57ce7b258e72947e5efbc/Arc2D.java/clean/core/src/classpath/java/java/awt/geom/Arc2D.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
1914,
12,
9056,
619,
16,
1645,
677,
13,
225,
288,
202,
202,
9056,
341,
273,
8557,
5621,
202,
202,
9056,
366,
273,
9263,
5621,
202,
202,
430,
261,
91,
1648,
374,
747,
366,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
1914,
12,
9056,
619,
16,
1645,
677,
13,
225,
288,
202,
202,
9056,
341,
273,
8557,
5621,
202,
202,
9056,
366,
273,
9263,
5621,
202,
202,
430,
261,
91,
1648,
374,
747,
366,
... |
_sendComplete = true; | synchronized(_senderThread) { _sendComplete = true; notifyAll(); } | public boolean send() { final PacketThrottle throttle = PacketThrottle.getThrottle(_destination.getPeer(), _prb._packetSize); _receiverThread = Thread.currentThread(); _senderThread = new Thread("_senderThread for "+_uid) { public void run() { int sentSinceLastPing = 0; while (!_sendComplete) { long delay = throttle.getDelay(); long waitUntil = System.currentTimeMillis() + delay; Logger.minor(this, "Waiting for "+delay+" ms for "+_uid+" : "+throttle); try { while (waitUntil > System.currentTimeMillis()) { if(_sendComplete) return; synchronized (_senderThread) { long x = waitUntil - System.currentTimeMillis(); if(x > 0) _senderThread.wait(x); } } while (true) { synchronized(_unsent) { if(_unsent.size() != 0) break; } if(_sendComplete) return; synchronized (_senderThread) { _senderThread.wait(); } } } catch (InterruptedException e) { } int packetNo; synchronized(_unsent) { packetNo = ((Integer) _unsent.removeFirst()).intValue(); } _sentPackets.setBit(packetNo, true); try { ((PeerNode)_destination).throttledSend(DMT.createPacketTransmit(_uid, packetNo, _sentPackets, _prb.getPacket(packetNo))); // We accelerate the ping rate during the transfer to keep a closer eye on round-trip-time sentSinceLastPing++; if (sentSinceLastPing >= PING_EVERY) { sentSinceLastPing = 0; //_usm.send(BlockTransmitter.this._destination, DMT.createPing()); ((PeerNode)_destination).sendAsync(DMT.createPing(), null); } } catch (NotConnectedException e) { Logger.normal(this, "Terminating send: "+e); _sendComplete = true; } catch (AbortedException e) { Logger.normal(this, "Terminating send due to abort: "+e); _sendComplete = true; } } } }; try { _unsent = _prb.addListener(new PartiallyReceivedBlock.PacketReceivedListener() {; public void packetReceived(int packetNo) { _unsent.addLast(new Integer(packetNo)); _sentPackets.setBit(packetNo, false); synchronized(_senderThread) { _senderThread.notify(); } } public void receiveAborted(int reason, String description) { try { ((PeerNode)_destination).sendAsync(DMT.createSendAborted(_uid, reason, description), null); } catch (NotConnectedException e) { Logger.minor(this, "Receive aborted and receiver is not connected"); } } }); _senderThread.start(); while (true) { if (_prb.isAborted()) { _sendComplete = true; return false; } Message msg; try { msg = _usm.waitFor(MessageFilter.create().setTimeout(SEND_TIMEOUT).setType(DMT.missingPacketNotification).setField(DMT.UID, _uid).or(MessageFilter.create().setType(DMT.allReceived).setField(DMT.UID, _uid))); } catch (DisconnectedException e) { Logger.normal(this, "Terminating send "+_uid+" to "+_destination+" from "+_usm.getPortNumber()+" because node disconnected while waiting"); _sendComplete = true; return false; } if(_sendComplete || !_destination.isConnected()) return false; if (msg == null) { if (getNumSent() == _prb.getNumPackets()) { _sendComplete = true; Logger.error(this, "Terminating send "+_uid+" to "+_destination+" from "+_usm.getPortNumber()+" as we haven't heard from receiver in "+SEND_TIMEOUT+"ms."); return false; } } else if (msg.getSpec().equals(DMT.missingPacketNotification)) { LinkedList missing = (LinkedList) msg.getObject(DMT.MISSING); for (Iterator i = missing.iterator(); i.hasNext();) { Integer packetNo = (Integer) i.next(); if (_prb.isReceived(packetNo.intValue())) { synchronized(_unsent) { _unsent.addFirst(packetNo); } _sentPackets.setBit(packetNo.intValue(), false); synchronized(_senderThread) { _senderThread.notify(); } } } } else if (msg.getSpec().equals(DMT.allReceived)) { _sendComplete = true; return true; } else if(_sendComplete) { // Terminated abnormally return false; } } } catch (AbortedException e) { // Terminate _sendComplete = true; return false; } } | 8026 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8026/946d2e40135a81b7a71390f5c2d8c5a6a642741a/BlockTransmitter.java/clean/src/freenet/io/xfer/BlockTransmitter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1366,
1435,
288,
202,
202,
6385,
11114,
27636,
18304,
273,
11114,
27636,
18,
588,
27636,
24899,
10590,
18,
588,
6813,
9334,
389,
683,
70,
6315,
11482,
1225,
1769,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1366,
1435,
288,
202,
202,
6385,
11114,
27636,
18304,
273,
11114,
27636,
18,
588,
27636,
24899,
10590,
18,
588,
6813,
9334,
389,
683,
70,
6315,
11482,
1225,
1769,
202,
202,
... |
if(random.nextDouble() < x) | if(random.nextDouble() < x) { | public synchronized boolean shouldRejectRequest() { long now = System.currentTimeMillis(); // Round trip time double pingTime = nodePinger.averagePingTime(); if(pingTime > MAX_PING_TIME) { if(now - lastAcceptedRequest > MAX_INTERREQUEST_TIME) { lastAcceptedRequest = now; return false; } Logger.minor( this, "shouldRejectRequest() == true because >MAX_PING_TIME"); return true; } if(pingTime > SUB_MAX_PING_TIME) { double x = (pingTime - SUB_MAX_PING_TIME) / (MAX_PING_TIME - SUB_MAX_PING_TIME); if(random.nextDouble() < x) Logger.minor( this, "shouldRejectRequest() == true because >SUB_MAX_PING_TIME"); return true; } // Bandwidth limited packets double bwlimitDelayTime = this.throttledPacketSendAverage.currentValue(); if(pingTime > MAX_THROTTLE_DELAY) { if(now - lastAcceptedRequest > MAX_INTERREQUEST_TIME) { lastAcceptedRequest = now; return false; } Logger.minor( this, "shouldRejectRequest() == true because >MAX_THROTTLE_DELAY"); return true; } if(bwlimitDelayTime > SUB_MAX_THROTTLE_DELAY) { double x = (pingTime - SUB_MAX_THROTTLE_DELAY) / (MAX_THROTTLE_DELAY - SUB_MAX_THROTTLE_DELAY); if(random.nextDouble() < x) Logger.minor( this, "shouldRejectRequest() == true because >SUB_MAX_THROTTLE_DELAY"); return true; } lastAcceptedRequest = now; return false; } | 52909 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52909/0c0eb1124ee5dea8ea3eb69a18dc5d617f9bfd05/Node.java/clean/src/freenet/node/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
1250,
1410,
21705,
691,
1435,
288,
377,
202,
5748,
2037,
273,
2332,
18,
2972,
28512,
5621,
377,
202,
377,
202,
759,
11370,
20654,
813,
377,
202,
9056,
10087,
950,
273,
756,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
1250,
1410,
21705,
691,
1435,
288,
377,
202,
5748,
2037,
273,
2332,
18,
2972,
28512,
5621,
377,
202,
377,
202,
759,
11370,
20654,
813,
377,
202,
9056,
10087,
950,
273,
756,
52... |
AbstractRepositoryConnector connector = getRepositoryConnector( attachment.getRepository().getKind()); | TaskRepository repository = getRepository(attachment.getRepositoryKind(), attachment.getRepositoryUrl()); AbstractRepositoryConnector connector = getRepositoryConnector(attachment.getRepositoryKind()); if (repository == null || connector == null) { return ""; } | public String getAttachmentContents(RepositoryAttachment attachment) { StringBuffer contents = new StringBuffer(); try { AbstractRepositoryConnector connector = getRepositoryConnector( attachment.getRepository().getKind()); IAttachmentHandler handler = connector.getAttachmentHandler(); InputStream stream; stream = new ByteArrayInputStream(handler.getAttachmentData(attachment.getRepository(), "" + attachment.getId())); int c; while ((c = stream.read()) != -1) { /* TODO jpound - handle non-text */ contents.append((char) c); } stream.close(); } catch (CoreException e) { MylarStatusHandler.fail(e.getStatus().getException(), "Retrieval of attachment data failed.", false); return null; } catch (IOException e) { MylarStatusHandler.fail(e, "Retrieval of attachment data failed.", false); return null; } return contents.toString(); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/03f3816483b487f20214837cafbbbb03ffc5336e/TaskRepositoryManager.java/buggy/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
31134,
6323,
12,
3305,
6803,
6042,
13,
288,
202,
202,
780,
1892,
2939,
273,
394,
6674,
5621,
202,
202,
698,
288,
1082,
202,
7469,
3305,
7487,
8703,
273,
8261,
7487,
12,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
31134,
6323,
12,
3305,
6803,
6042,
13,
288,
202,
202,
780,
1892,
2939,
273,
394,
6674,
5621,
202,
202,
698,
288,
1082,
202,
7469,
3305,
7487,
8703,
273,
8261,
7487,
12,
6... |
public void beginTask(int totalWork) { | public void beginTask(int max) { | public void beginTask(int totalWork) { done(); this.totalWork = totalWork; this.sumWorked = 0; determinateProgressBar.setMinimum(0); determinateProgressBar.setMaximum(PROGRESS_MAX); determinateProgressBar.setSelection(0); layout.topControl = determinateProgressBar; layout(); animated = false; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/b55db1f8df03ebade4e59f55f97c8c3917057362/ProgressIndicator.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/ProgressIndicator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2376,
2174,
12,
474,
2078,
2421,
13,
288,
202,
202,
8734,
5621,
202,
202,
2211,
18,
4963,
2421,
273,
2078,
2421,
31,
202,
202,
2211,
18,
1364,
2421,
329,
273,
374,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2376,
2174,
12,
474,
2078,
2421,
13,
288,
202,
202,
8734,
5621,
202,
202,
2211,
18,
4963,
2421,
273,
2078,
2421,
31,
202,
202,
2211,
18,
1364,
2421,
329,
273,
374,
31,
... |
{ | TemplateNode getTemplate(QName mode, Node context, boolean applyImports) throws TransformerException { if (debug) { System.err.println("getTemplate: mode="+mode+" context="+context); } Set candidates = new TreeSet(); for (Iterator j = templates.iterator(); j.hasNext(); ) { Template t = (Template) j.next(); boolean isMatch = t.matches(mode, context); if (applyImports) { if (currentTemplate == null) { String msg = "current template may not be null " + "during apply-imports"; throw new TransformerException(msg); } if (!currentTemplate.imports(t)) { isMatch = false; } } //System.err.println("\t"+context+" "+t+"="+isMatch); if (isMatch) { candidates.add(t); } } //System.err.println("\tcandidates="+candidates); if (candidates.isEmpty()) { // Apply built-in template // Current template is unchanged if (debug) { System.err.println("\tbuiltInTemplate context="+context); } switch (context.getNodeType()) { case Node.ELEMENT_NODE: case Node.DOCUMENT_NODE: case Node.DOCUMENT_FRAGMENT_NODE: case Node.PROCESSING_INSTRUCTION_NODE: case Node.COMMENT_NODE: return builtInNodeTemplate; case Node.TEXT_NODE: case Node.ATTRIBUTE_NODE: return builtInTextTemplate; default: return null; } } else { Template t = (Template) candidates.iterator().next(); // Set current template currentTemplate = t; if (debug) { System.err.println("\ttemplate="+t+" context="+context); } return t.node; } } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/27e9978154ebcb2e4d9c4e05e11bf17d1b8e1ef5/Stylesheet.java/buggy/core/src/classpath/gnu/gnu/xml/transform/Stylesheet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
5035,
907,
10646,
12,
13688,
1965,
16,
2029,
819,
16,
1250,
2230,
13347,
13,
565,
1216,
21684,
377,
309,
261,
4148,
13,
2398,
2332,
18,
370,
18,
8222,
2932,
588,
2283,
30,
1965,
1546,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
5035,
907,
10646,
12,
13688,
1965,
16,
2029,
819,
16,
1250,
2230,
13347,
13,
565,
1216,
21684,
377,
309,
261,
4148,
13,
2398,
2332,
18,
370,
18,
8222,
2932,
588,
2283,
30,
1965,
1546,
1... | |
return contentType; } | return contentType; } | public String getContentType() { return contentType; } | 3508 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3508/c94b7421a32b1583fb8dd65d3de21fd43b09dc90/WebClient.java/buggy/htmlunit/src/java/com/gargoylesoftware/htmlunit/WebClient.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
514,
17470,
1435,
288,
7734,
327,
5064,
31,
5411,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
514,
17470,
1435,
288,
7734,
327,
5064,
31,
5411,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
for(int i=0; i < languages.length; i++){ | for(int i=0; i < languages.length; i++){ | public void setSecondaryLanguage(String languagecode){ String[] languages = WebLanguages.getAvailableLanguages(); if(languages != null){ for(int i=0; i < languages.length; i++){ if(languages[i].toUpperCase().equals(languagecode.toUpperCase())) secondarylanguage=i; } } } | 4109 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4109/a6b3e35369204e69f34234fc8a7a4eaeb39e846a/UserPreference.java/clean/src/java/se/anatom/ejbca/ra/raadmin/UserPreference.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
14893,
3779,
12,
780,
2653,
710,
15329,
1377,
514,
8526,
8191,
273,
2999,
12912,
18,
588,
5268,
12912,
5621,
540,
309,
12,
14045,
480,
446,
15329,
3639,
364,
12,
474,
277,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
14893,
3779,
12,
780,
2653,
710,
15329,
1377,
514,
8526,
8191,
273,
2999,
12912,
18,
588,
5268,
12912,
5621,
540,
309,
12,
14045,
480,
446,
15329,
3639,
364,
12,
474,
277,... |
private boolean shouldUnroll(UnrollInfo info, JStatement body, Hashtable currentModified) { | private boolean shouldUnroll(LoopIterInfo info, JStatement body, Hashtable currentModified) { | private boolean shouldUnroll(UnrollInfo info, JStatement body, Hashtable currentModified) { // if no unroll info or variable is modified in loop, fail if (info==null || currentModified.containsKey(info.var)) { return false; } //Unroll if in init if(inContainerInit) return true; /* // otherwise if there is an SIRInitStatement in the loop, then // definately unroll for the sake of graph expansion final boolean[] hasInit = { false }; body.accept(new SLIREmptyVisitor() { public void visitInitStatement(SIRInitStatement self, SIRStream target) { super.visitInitStatement(self, target); hasInit[0] = true; } }); if (hasInit[0]) { return true; } */ // Unroll maximally for number gathering if(KjcOptions.numbers>0) { final boolean[] hasPrint = { false }; body.accept(new SLIREmptyVisitor() { public void visitPrintStatement(SIRPrintStatement self, JExpression arg) { hasPrint[0]=true; super.visitPrintStatement(self,arg); } }); if (hasPrint[0]) { return true; } } // otherwise calculate how many times the loop will execute, // and only unroll if it is within our max unroll range int count = getNumExecutions(info); return count <= unrollLimit; } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/f44a385ed90c3fbc5ca6092ae72d2c8475ea5fee/Unroller.java/buggy/streams/src/at/dms/kjc/sir/lowering/Unroller.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
1410,
984,
2693,
12,
6452,
2360,
966,
1123,
16,
804,
3406,
1417,
16,
18559,
783,
4575,
13,
288,
3639,
368,
309,
1158,
640,
2693,
1123,
578,
2190,
353,
4358,
316,
2798,
16,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
1410,
984,
2693,
12,
6452,
2360,
966,
1123,
16,
804,
3406,
1417,
16,
18559,
783,
4575,
13,
288,
3639,
368,
309,
1158,
640,
2693,
1123,
578,
2190,
353,
4358,
316,
2798,
16,
2... |
while (true) { while (i.hasNext()) { tr = (TextRun)i.next(); if (tr.isFirstRunInChunk()) break; layouts.add(tr.getLayout()); | while (i.hasNext()) { tr = (TextRun)i.next(); if (tr.isFirstRunInChunk()) { layouts = new ArrayList(); chunkLayouts.add(layouts); | public List getTextRuns(TextNode node, AttributedCharacterIterator aci) { List textRuns = node.getTextRuns(); if (textRuns != null) { return textRuns; } AttributedCharacterIterator[] chunkACIs = getTextChunkACIs(aci); int [][] chunkCharMaps = new int[chunkACIs.length][]; // long t0, t1; // t0 = System.currentTimeMillis(); // reorder each chunk ACI for bidi text int chunkStart = aci.getBeginIndex(); for (int i = 0; i < chunkACIs.length; i++) { BidiAttributedCharacterIterator iter; iter = new BidiAttributedCharacterIterator (chunkACIs[i], fontRenderContext, chunkStart); chunkACIs [i] = iter; chunkCharMaps[i] = iter.getCharMap(); // t1 = System.currentTimeMillis(); // reorderTime += t1-t0; // t0=t1; chunkACIs [i] = createModifiedACIForFontMatching (node, chunkACIs[i]); chunkStart += (chunkACIs[i].getEndIndex()- chunkACIs[i].getBeginIndex()); // t1 = System.currentTimeMillis(); // fontMatchingTime += t1-t0; // t0 = t1; } // create text runs for each chunk and add them to the list textRuns = new ArrayList(); TextChunk chunk, prevChunk=null; int currentChunk = 0; do { // Text Chunks contain one or more TextRuns, which they // create from the ACI. chunkACIs[currentChunk].first(); chunk = getTextChunk(node, chunkACIs[currentChunk], chunkCharMaps[currentChunk], textRuns, prevChunk); // Adjust according to text-anchor property value chunkACIs[currentChunk].first(); if (chunk != null) { adjustChunkOffsets(textRuns, chunk); } prevChunk = chunk; currentChunk++; } while (chunk != null && currentChunk < chunkACIs.length); aci.first(); List rgns = (List)aci.getAttribute(FLOW_REGIONS); if (rgns != null) { Iterator i = textRuns.iterator(); List chunkLayouts = new ArrayList(); TextRun tr = (TextRun)i.next(); List layouts = new ArrayList(); chunkLayouts.add(layouts); layouts.add(tr.getLayout()); while (true) { while (i.hasNext()) { tr = (TextRun)i.next(); if (tr.isFirstRunInChunk()) break; layouts.add(tr.getLayout()); } if (!i.hasNext()) break; layouts = new ArrayList(); chunkLayouts.add(layouts); layouts.add(tr.getLayout()); } org.apache.batik.gvt.text.GlyphLayout.textWrapTextChunk (chunkACIs, chunkLayouts, rgns); } // t1 = System.currentTimeMillis(); // layoutTime += t1-t0; // System.out.println("Reorder: " + reorderTime + " FontMatching: " + fontMatchingTime + " Layout: " + layoutTime); // cache the textRuns so don't need to recalculate node.setTextRuns(textRuns); return textRuns; } | 46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/7e91d52bf0a0a956940323d667f833ec5b7f056b/StrokingTextPainter.java/clean/sources/org/apache/batik/gvt/renderer/StrokingTextPainter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
6701,
9361,
12,
17299,
756,
16,
2380,
11050,
7069,
3198,
1721,
77,
13,
288,
3639,
987,
977,
9361,
273,
756,
18,
588,
1528,
9361,
5621,
3639,
309,
261,
955,
9361,
480,
446,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
6701,
9361,
12,
17299,
756,
16,
2380,
11050,
7069,
3198,
1721,
77,
13,
288,
3639,
987,
977,
9361,
273,
756,
18,
588,
1528,
9361,
5621,
3639,
309,
261,
955,
9361,
480,
446,
13... |
return (String)u3; } | return (String) u3; } | public String getAId() { return (String)u3; } | 1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/d31a76ee29d5978a9bec41e3ac9134cee024bcab/Node.java/buggy/org/jruby/nodes/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
4506,
548,
1435,
288,
202,
202,
2463,
261,
780,
13,
89,
23,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
4506,
548,
1435,
288,
202,
202,
2463,
261,
780,
13,
89,
23,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
public ClientKeyBlock getKey(ClientKey key, boolean localOnly, RequestStarterClient client, boolean cache, boolean ignoreStore) throws LowLevelGetException { if(key instanceof ClientSSK) { ClientSSK k = (ClientSSK) key; if(k.getPubKey() != null) cacheKey(k.pubKeyHash, k.getPubKey()); } if(localOnly) return realGetKey(key, localOnly, cache, ignoreStore); else return client.getKey(key, localOnly, cache, ignoreStore); } | public DSAPublicKey getKey(byte[] hash) { ImmutableByteArrayWrapper w = new ImmutableByteArrayWrapper(hash); synchronized(cachedPubKeys) { DSAPublicKey key = (DSAPublicKey) cachedPubKeys.get(w); if(key != null) { cachedPubKeys.push(w, key); return key; } } try { DSAPublicKey key = pubKeyDatastore.fetchPubKey(hash, false); if(key != null) { cacheKey(hash, key); } return key; } catch (IOException e) { Logger.error(this, "Error accessing pubkey store: "+e, e); return null; } } | public ClientKeyBlock getKey(ClientKey key, boolean localOnly, RequestStarterClient client, boolean cache, boolean ignoreStore) throws LowLevelGetException { if(key instanceof ClientSSK) { ClientSSK k = (ClientSSK) key; if(k.getPubKey() != null) cacheKey(k.pubKeyHash, k.getPubKey()); } if(localOnly) return realGetKey(key, localOnly, cache, ignoreStore); else return client.getKey(key, localOnly, cache, ignoreStore); } | 51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/d32229c02576d531c915059f111c468591f30e84/Node.java/buggy/src/freenet/node/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2445,
653,
1768,
3579,
12,
1227,
653,
498,
16,
1250,
1191,
3386,
16,
1567,
510,
14153,
1227,
1004,
16,
1250,
1247,
16,
1250,
2305,
2257,
13,
1216,
23629,
2355,
967,
503,
288,
377,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2445,
653,
1768,
3579,
12,
1227,
653,
498,
16,
1250,
1191,
3386,
16,
1567,
510,
14153,
1227,
1004,
16,
1250,
1247,
16,
1250,
2305,
2257,
13,
1216,
23629,
2355,
967,
503,
288,
377,
... |
bar.adoptView(ref, -1, true, true, false); | bar.adoptView(ref, -1, true, true); | public void run() { IWorkbenchPage page = window.getActivePage(); if (page != null) { try { if (makeFast) { WorkbenchPage wp = (WorkbenchPage) page; IViewReference ref = wp.findViewReference(desc.getId()); if (ref == null) { IViewPart part = page.showView(desc.getId(), null, IWorkbenchPage.VIEW_CREATE); ref = (IViewReference)wp.getReference(part); } FastViewBar bar = ((WorkbenchWindow)page.getWorkbenchWindow()).getFastViewBar(); bar.adoptView(ref, -1, true, true, false); } else { page.showView(desc.getId()); } } catch (PartInitException e) { ErrorDialog.openError(window.getShell(), WorkbenchMessages.ShowView_errorTitle, e.getMessage(), e.getStatus()); } } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/14ff4c11ee4735038f89d4e70153748cdfff9446/ShowViewAction.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
3639,
467,
2421,
22144,
1964,
1363,
273,
2742,
18,
588,
3896,
1964,
5621,
3639,
309,
261,
2433,
480,
446,
13,
288,
5411,
775,
288,
7734,
309,
261,
6540,
12305,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
3639,
467,
2421,
22144,
1964,
1363,
273,
2742,
18,
588,
3896,
1964,
5621,
3639,
309,
261,
2433,
480,
446,
13,
288,
5411,
775,
288,
7734,
309,
261,
6540,
12305,... |
public final void testDuplicateAdaptables() throws CoreException { assertPopupMenus("1", new String[] {"ICommon.1"}, new StructuredSelection(new Object[] { new ObjectContributionClasses.D()}), ICommon.class, true ); assertPopupMenus("1", new String[] {"ICommon.1"}, new StructuredSelection(new Object[] { new ObjectContributionClasses.D()}), ICommon.class, true ); assertPopupMenus("2", new String[] {"ICommon.1"}, new StructuredSelection(new Object[] { new ObjectContributionClasses.D(), new ObjectContributionClasses.A() }), ICommon.class, true ); assertPopupMenus("3", new String[] {"ICommon.1"}, new StructuredSelection(new Object[] { new ObjectContributionClasses.A(), new ObjectContributionClasses.D() }), ICommon.class, true ); assertPopupMenus("4", new String[] {"ICommon.1"}, new StructuredSelection(new Object[] { new ObjectContributionClasses.Common(), new ObjectContributionClasses.D() }), ICommon.class, true ); assertPopupMenus("5", new String[] {"ICommon.1"}, new StructuredSelection(new Object[] { | public final void testDuplicateAdaptables() { assertPopupMenus("1", new String[] { "ICommon.1" }, new StructuredSelection( new Object[] { new ObjectContributionClasses.D() }), ICommon.class, true); assertPopupMenus("1", new String[] { "ICommon.1" }, new StructuredSelection( new Object[] { new ObjectContributionClasses.D() }), ICommon.class, true); assertPopupMenus("2", new String[] { "ICommon.1" }, new StructuredSelection(new Object[] { | public final void testDuplicateAdaptables() throws CoreException { assertPopupMenus("1", new String[] {"ICommon.1"}, new StructuredSelection(new Object[] { new ObjectContributionClasses.D()}), ICommon.class, true ); // repeat test on purpose to ensure no double call duplicates. assertPopupMenus("1", new String[] {"ICommon.1"}, new StructuredSelection(new Object[] { new ObjectContributionClasses.D()}), ICommon.class, true ); assertPopupMenus("2", new String[] {"ICommon.1"}, new StructuredSelection(new Object[] { new ObjectContributionClasses.D(), new ObjectContributionClasses.A() }), ICommon.class, true ); assertPopupMenus("3", new String[] {"ICommon.1"}, new StructuredSelection(new Object[] { new ObjectContributionClasses.A(), new ObjectContributionClasses.D() }), ICommon.class, true ); assertPopupMenus("4", new String[] {"ICommon.1"}, new StructuredSelection(new Object[] { new ObjectContributionClasses.Common(), new ObjectContributionClasses.D() }), ICommon.class, true ); assertPopupMenus("5", new String[] {"ICommon.1"}, new StructuredSelection(new Object[] { new ObjectContributionClasses.D(), new ObjectContributionClasses.Common() }), ICommon.class, true ); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/7946b6460d44217ceadf6c1b4e0462e195d53d80/ObjectContributionTest.java/clean/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/ObjectContributionTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
918,
1842,
11826,
13716,
1538,
1435,
1216,
30015,
288,
377,
202,
11231,
13770,
29755,
2932,
21,
3113,
377,
1082,
202,
2704,
514,
8526,
12528,
45,
6517,
18,
21,
6,
5779,
1377,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
918,
1842,
11826,
13716,
1538,
1435,
1216,
30015,
288,
377,
202,
11231,
13770,
29755,
2932,
21,
3113,
377,
1082,
202,
2704,
514,
8526,
12528,
45,
6517,
18,
21,
6,
5779,
1377,
1... |
& (NO_WORD_BREAK | MARK_FOLLOWING)) != 0) | & (ParserRule.NO_WORD_BREAK | ParserRule.MARK_FOLLOWING)) != 0) | private boolean handleSoftSpan() { if (context.parent != null) { ParserRule rule = context.parent.inRule; if(rule != null && (context.parent.inRule.action & (NO_WORD_BREAK | MARK_FOLLOWING)) != 0) { /* commented out for now... so token marker will never spit out INVALID tokens. need to sort this out before 4.1pre1. */ /* if ((context.parent.inRule.action & NO_WORD_BREAK) == NO_WORD_BREAK) { tokenHandler.handleToken(pos - lastOffset, Token.INVALID, context.rules); } else */ tokenHandler.handleToken(pos - lastOffset, rule.token,context.rules); lastOffset = pos; context = context.parent; keywords = context.rules.getKeywords(); context.inRule = null; return true; } } return false; } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/428a806e9276a43bafd4c7d65f479cc0a80827ff/TokenMarker.java/buggy/org/gjt/sp/jedit/syntax/TokenMarker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
1640,
12468,
6952,
1435,
202,
95,
202,
202,
430,
261,
2472,
18,
2938,
480,
446,
13,
202,
202,
95,
1082,
202,
2678,
2175,
1720,
273,
819,
18,
2938,
18,
267,
2175,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
1640,
12468,
6952,
1435,
202,
95,
202,
202,
430,
261,
2472,
18,
2938,
480,
446,
13,
202,
202,
95,
1082,
202,
2678,
2175,
1720,
273,
819,
18,
2938,
18,
267,
2175,
31,
... |
mockCommandline.setProcessErrorStream(System.in); | mockCommandline.setProcessErrorStream(new PipedInputStream()); | protected Commandline getCommandline() { final MockCommandline mockCommandline = new MockCommandline(); mockCommandline.setExpectedCommandline(expectedCommandline); mockCommandline.setExpectedWorkingDirectory(expectedWorkingDirectory); // could System.in and System.out create problems here? mockCommandline.setProcessErrorStream(System.in); mockCommandline.setProcessInputStream(inputStream); mockCommandline.setProcessOutputStream(System.out); return mockCommandline; } | 55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/506be238f5ee004ec5359da4d19b1491b742f258/CVSTest.java/buggy/main/test/net/sourceforge/cruisecontrol/sourcecontrols/CVSTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4750,
3498,
1369,
12856,
1369,
1435,
288,
5411,
727,
7867,
2189,
1369,
5416,
2189,
1369,
273,
394,
7867,
2189,
1369,
5621,
5411,
5416,
2189,
1369,
18,
542,
6861,
2189,
1369,
12,
3825,
2189,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4750,
3498,
1369,
12856,
1369,
1435,
288,
5411,
727,
7867,
2189,
1369,
5416,
2189,
1369,
273,
394,
7867,
2189,
1369,
5621,
5411,
5416,
2189,
1369,
18,
542,
6861,
2189,
1369,
12,
3825,
2189,... |
private void openSchemaFrame(File file) { try { JInternalFrame schemaFrame = new JInternalFrame(); schemaFrame.setTitle("Schema - " + file.getName()); Class.forName(jdbcDriverClassName); String connectString = "Provider=mondrian;" + "Jdbc=" + jdbcConnectionUrl + ";" + "Catalog=" + file.toURL().toString(); connection = DriverManager.getConnection(connectString, null, false); schemaFrame.getContentPane().add(new SchemaExplorer(file)); schemaFrame.setBounds(0, 0, 500, 480); schemaFrame.setClosable(true); schemaFrame.setIconifiable(true); schemaFrame.setMaximizable(true); schemaFrame.setResizable(true); schemaFrame.setVisible(true); desktopPane.add(schemaFrame, javax.swing.JLayeredPane.DEFAULT_LAYER); schemaFrame.show(); } catch (Exception ex) { ex.printStackTrace(); } } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/d4a93c3315c8aa9b9d64e1c03577610a1dbca61d/Workbench.java/clean/src/main/mondrian/gui/Workbench.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1696,
3078,
3219,
12,
812,
585,
13,
288,
202,
202,
698,
288,
1082,
202,
46,
3061,
3219,
1963,
3219,
273,
394,
804,
3061,
3219,
5621,
1082,
202,
4821,
3219,
18,
542,
4247... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1696,
3078,
3219,
12,
812,
585,
13,
288,
202,
202,
698,
288,
1082,
202,
46,
3061,
3219,
1963,
3219,
273,
394,
804,
3061,
3219,
5621,
1082,
202,
4821,
3219,
18,
542,
4247... | ||
transformer.setOutputProperty(INDENT_AMOUNT, String.valueOf(indentAmount)); | transformer.setOutputProperty(INDENT_AMOUNT_PROPERTY, String.valueOf(indentAmount)); | public static void applyOutputProperties(Transformer transformer, String method, String version, String publicDoctype, String systemDoctype, String encoding, boolean omitXMLDeclaration, Boolean standalone, boolean indent, int indentAmount) { if (method != null && !"".equals(method)) transformer.setOutputProperty(OutputKeys.METHOD, method); if (version != null && !"".equals(version)) transformer.setOutputProperty(OutputKeys.VERSION, version); if (publicDoctype != null && !"".equals(publicDoctype)) transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, publicDoctype); if (systemDoctype != null && !"".equals(systemDoctype)) transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, systemDoctype); if (encoding != null && !"".equals(encoding)) transformer.setOutputProperty(OutputKeys.ENCODING, encoding); transformer.setOutputProperty(OutputKeys.INDENT, indent ? "yes" : "no"); if (indent) transformer.setOutputProperty(INDENT_AMOUNT, String.valueOf(indentAmount)); transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, omitXMLDeclaration ? "yes" : "no"); if (standalone != null) transformer.setOutputProperty(OutputKeys.STANDALONE, standalone.booleanValue() ? "yes" : "no"); } | 51410 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51410/b92f591eb187fdfb7927c041736014bb2d60a5a8/TransformerUtils.java/buggy/src/java/org/orbeon/oxf/xml/TransformerUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2230,
1447,
2297,
12,
8319,
8360,
16,
4766,
2398,
514,
707,
16,
4766,
2398,
514,
1177,
16,
4766,
2398,
514,
1071,
3244,
12387,
16,
4766,
2398,
514,
2619,
3244,
12387,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2230,
1447,
2297,
12,
8319,
8360,
16,
4766,
2398,
514,
707,
16,
4766,
2398,
514,
1177,
16,
4766,
2398,
514,
1071,
3244,
12387,
16,
4766,
2398,
514,
2619,
3244,
12387,
16,
... |
protected void consumeToken(int type) { /* remember the last consumed value */ /* try to minimize the number of build values */ if (scanner.wasNonExternalizedStringLiteral) { StringLiteral[] literals = this.scanner.nonNLSStrings; for (int i = 0, max = literals.length; i < max; i++) { problemReporter().nonExternalizedStringLiteral(literals[i]); } scanner.currentLine = null; scanner.wasNonExternalizedStringLiteral = false; } //System.out.println(scanner.toStringAction(type)); switch (type) { case TokenNameIdentifier : pushIdentifier(); if (scanner.useAssertAsAnIndentifier) { long positions = identifierPositionStack[identifierPtr]; problemReporter().useAssertAsAnIdentifier((int) (positions >>> 32), (int) positions); } break; case TokenNameinterface : adjustInterfaceModifiers(); //'class' is pushing two int (positions) on the stack ==> 'interface' needs to do it too.... pushOnIntStack(scanner.startPosition); pushOnIntStack(scanner.currentPosition - 1); break; case TokenNameabstract : checkAndSetModifiers(AccAbstract); break; case TokenNamestrictfp : checkAndSetModifiers(AccStrictfp); break; case TokenNamefinal : checkAndSetModifiers(AccFinal); break; case TokenNamenative : checkAndSetModifiers(AccNative); break; case TokenNameprivate : checkAndSetModifiers(AccPrivate); break; case TokenNameprotected : checkAndSetModifiers(AccProtected); break; case TokenNamepublic : checkAndSetModifiers(AccPublic); break; case TokenNametransient : checkAndSetModifiers(AccTransient); break; case TokenNamevolatile : checkAndSetModifiers(AccVolatile); break; case TokenNamestatic : checkAndSetModifiers(AccStatic); break; case TokenNamesynchronized : pushOnIntStack(scanner.startPosition); checkAndSetModifiers(AccSynchronized); break; //============================== case TokenNamevoid : pushIdentifier(-T_void); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); break; //push a default dimension while void is not part of the primitive //declaration baseType and so takes the place of a type without getting into //regular type parsing that generates a dimension on intStack case TokenNameboolean : pushIdentifier(-T_boolean); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); break; case TokenNamebyte : pushIdentifier(-T_byte); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); break; case TokenNamechar : pushIdentifier(-T_char); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); break; case TokenNamedouble : pushIdentifier(-T_double); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); break; case TokenNamefloat : pushIdentifier(-T_float); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); break; case TokenNameint : pushIdentifier(-T_int); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); break; case TokenNamelong : pushIdentifier(-T_long); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); break; case TokenNameshort : pushIdentifier(-T_short); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); break; //============================== case TokenNameIntegerLiteral : pushOnExpressionStack( new IntLiteral( scanner.getCurrentTokenSource(), scanner.startPosition, scanner.currentPosition - 1)); break; case TokenNameLongLiteral : pushOnExpressionStack( new LongLiteral( scanner.getCurrentTokenSource(), scanner.startPosition, scanner.currentPosition - 1)); break; case TokenNameFloatingPointLiteral : pushOnExpressionStack( new FloatLiteral( scanner.getCurrentTokenSource(), scanner.startPosition, scanner.currentPosition - 1)); break; case TokenNameDoubleLiteral : pushOnExpressionStack( new DoubleLiteral( scanner.getCurrentTokenSource(), scanner.startPosition, scanner.currentPosition - 1)); break; case TokenNameCharacterLiteral : pushOnExpressionStack( new CharLiteral( scanner.getCurrentTokenSource(), scanner.startPosition, scanner.currentPosition - 1)); break; case TokenNameStringLiteral : StringLiteral stringLiteral = new StringLiteral( scanner.getCurrentTokenSourceString(), scanner.startPosition, scanner.currentPosition - 1); pushOnExpressionStack(stringLiteral); break; case TokenNamefalse : pushOnExpressionStack( new FalseLiteral(scanner.startPosition, scanner.currentPosition - 1)); break; case TokenNametrue : pushOnExpressionStack( new TrueLiteral(scanner.startPosition, scanner.currentPosition - 1)); break; case TokenNamenull : pushOnExpressionStack( new NullLiteral(scanner.startPosition, scanner.currentPosition - 1)); break; //============================ case TokenNamesuper : case TokenNamethis : endPosition = scanner.currentPosition - 1; pushOnIntStack(scanner.startPosition); break; case TokenNameassert : case TokenNameimport : case TokenNamepackage : case TokenNamethrow : case TokenNamenew : case TokenNamedo : case TokenNameif : case TokenNamefor : case TokenNameswitch : case TokenNametry : case TokenNamewhile : case TokenNamebreak : case TokenNamecontinue : case TokenNamereturn : case TokenNamecase : pushOnIntStack(scanner.startPosition); break; case TokenNameclass : pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); break; case TokenNamedefault : pushOnIntStack(scanner.startPosition); pushOnIntStack(scanner.currentPosition - 1); break; //let extra semantic action decide when to push case TokenNameRBRACKET : case TokenNamePLUS_PLUS : case TokenNameMINUS_MINUS : case TokenNamePLUS : case TokenNameMINUS : case TokenNameNOT : case TokenNameTWIDDLE : endPosition = scanner.startPosition; break; case TokenNameRBRACE: case TokenNameSEMICOLON : endStatementPosition = scanner.currentPosition - 1; endPosition = scanner.startPosition - 1; //the item is not part of the potential futur expression/statement break; // in order to handle ( expression) ////// (cast)expression///// foo(x) case TokenNameRPAREN : rParenPos = scanner.currentPosition - 1; // position of the end of right parenthesis (in case of unicode \u0029) lex00101 break; case TokenNameLPAREN : lParenPos = scanner.startPosition; break; // case TokenNameQUESTION : // case TokenNameCOMMA : // case TokenNameCOLON : // case TokenNameEQUAL : // case TokenNameLBRACKET : // case TokenNameDOT : // case TokenNameERROR : // case TokenNameEOF : // case TokenNamecase : // case TokenNamecatch : // case TokenNameelse : // case TokenNameextends : // case TokenNamefinally : // case TokenNameimplements : // case TokenNamethrows : // case TokenNameinstanceof : // case TokenNameEQUAL_EQUAL : // case TokenNameLESS_EQUAL : // case TokenNameGREATER_EQUAL : // case TokenNameNOT_EQUAL : // case TokenNameLEFT_SHIFT : // case TokenNameRIGHT_SHIFT : // case TokenNameUNSIGNED_RIGHT_SHIFT : // case TokenNamePLUS_EQUAL : // case TokenNameMINUS_EQUAL : // case TokenNameMULTIPLY_EQUAL : // case TokenNameDIVIDE_EQUAL : // case TokenNameAND_EQUAL : // case TokenNameOR_EQUAL : // case TokenNameXOR_EQUAL : // case TokenNameREMAINDER_EQUAL : // case TokenNameLEFT_SHIFT_EQUAL : // case TokenNameRIGHT_SHIFT_EQUAL : // case TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL : // case TokenNameOR_OR : // case TokenNameAND_AND : // case TokenNameREMAINDER : // case TokenNameXOR : // case TokenNameAND : // case TokenNameMULTIPLY : // case TokenNameOR : // case TokenNameDIVIDE : // case TokenNameGREATER : // case TokenNameLESS : }} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/ea8f033a781dd5f0a1e97c822e75c336e56f5f2e/Parser.java/buggy/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
6459,
21224,
1345,
12,
474,
723,
15329,
202,
20308,
28155,
451,
292,
689,
24268,
1132,
5549,
202,
20308,
698,
3599,
267,
381,
452,
546,
21998,
792,
3510,
2372,
5549,
202,
430,
12,
26842,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
6459,
21224,
1345,
12,
474,
723,
15329,
202,
20308,
28155,
451,
292,
689,
24268,
1132,
5549,
202,
20308,
698,
3599,
267,
381,
452,
546,
21998,
792,
3510,
2372,
5549,
202,
430,
12,
26842,
... | ||
{ TypeStruct struct = (TypeStruct)iter.next(); | { TypeStruct struct = (TypeStruct)iter.next(); | public Object visitProgram(Program prog) { // Nothing special here either. Just accumulate all of the // structures and streams. String result = ""; for (Iterator iter = prog.getStructs().iterator(); iter.hasNext(); ) { TypeStruct struct = (TypeStruct)iter.next(); if (struct.getName().equals("String")) continue; if (libraryFormat && struct.getName().equals("float2")) continue; if (libraryFormat && struct.getName().equals("float3")) continue; if (libraryFormat && struct.getName().equals("float4")) continue; result += indent + "class " + struct.getName() + " extends Structure implements Serializable {\n"; addIndent(); for (int i = 0; i < struct.getNumFields(); i++) { String name = struct.getField(i); Type type = struct.getType(name); result += indent + convertType(type) + " " + name + ";\n"; } unIndent(); result += indent + "}\n"; } for (Iterator iter = prog.getHelpers().iterator(); iter.hasNext(); ) { TypeHelper th = (TypeHelper)iter.next(); result += visitTypeHelper(th); } if (!libraryFormat) { result += indent + "class StreamItVectorLib {\n"; addIndent(); result += indent+"public static native float2 add2(float2 a, float2 b);\n"; result += indent+"public static native float3 add3(float3 a, float3 b);\n"; result += indent+"public static native float4 add4(float4 a, float4 b);\n"; result += indent+"public static native float2 sub2(float2 a, float2 b);\n"; result += indent+"public static native float3 sub3(float3 a, float3 b);\n"; result += indent+"public static native float4 sub4(float4 a, float4 b);\n"; result += indent+"public static native float2 mul2(float2 a, float2 b);\n"; result += indent+"public static native float3 mul3(float3 a, float3 b);\n"; result += indent+"public static native float4 mul4(float4 a, float4 b);\n"; result += indent+"public static native float2 div2(float2 a, float2 b);\n"; result += indent+"public static native float3 div3(float3 a, float3 b);\n"; result += indent+"public static native float4 div4(float4 a, float4 b);\n"; result += indent+"public static native float2 addScalar2(float2 a, float b);\n"; result += indent+"public static native float3 addScalar3(float3 a, float b);\n"; result += indent+"public static native float4 addScalar4(float4 a, float b);\n"; result += indent+"public static native float2 subScalar2(float2 a, float b);\n"; result += indent+"public static native float3 subScalar3(float3 a, float b);\n"; result += indent+"public static native float4 subScalar4(float4 a, float b);\n"; result += indent+"public static native float2 scale2(float2 a, float b);\n"; result += indent+"public static native float3 scale3(float3 a, float b);\n"; result += indent+"public static native float4 scale4(float4 a, float b);\n"; result += indent+"public static native float2 scaleInv2(float2 a, float b);\n"; result += indent+"public static native float3 scaleInv3(float3 a, float b);\n"; result += indent+"public static native float4 scaleInv4(float4 a, float b);\n"; result += indent+"public static native float sqrtDist2(float2 a, float2 b);\n"; result += indent+"public static native float sqrtDist3(float3 a, float3 b);\n"; result += indent+"public static native float sqrtDist4(float4 a, float4 b);\n"; result += indent+"public static native float dot3(float3 a, float3 b);\n"; result += indent+"public static native float3 cross3(float3 a, float3 b);\n"; result += indent+"public static native float2 max2(float2 a, float2 b);\n"; result += indent+"public static native float3 max3(float3 a, float3 b);\n"; result += indent+"public static native float2 min2(float2 a, float2 b);\n"; result += indent+"public static native float3 min3(float3 a, float3 b);\n"; result += indent+"public static native float2 neg2(float2 a);\n"; result += indent+"public static native float3 neg3(float3 a);\n"; result += indent+"public static native float4 neg4(float4 a);\n"; result += indent+"public static native float2 floor2(float2 a);\n"; result += indent+"public static native float3 floor3(float3 a);\n"; result += indent+"public static native float4 floor4(float4 a);\n"; result += indent+"public static native float2 normalize2(float2 a);\n"; result += indent+"public static native float3 normalize3(float3 a);\n"; result += indent+"public static native float4 normalize4(float4 a);\n"; result += indent+"public static native boolean greaterThan3(float3 a, float3 b);\n"; result += indent+"public static native boolean lessThan3(float3 a, float3 b);\n"; result += indent+"public static native boolean equals3(float3 a, float3 b);\n"; unIndent(); result += indent + "}\n"; } for (Iterator iter = prog.getStreams().iterator(); iter.hasNext(); ) result += (String)((StreamSpec)iter.next()).accept(this); return result; } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/cf9a6277caa1711f910259474f15cce115a8c3b9/NodesToJava.java/buggy/streams/src/streamit/frontend/tojava/NodesToJava.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
3757,
9459,
12,
9459,
11243,
13,
565,
288,
3639,
368,
13389,
4582,
2674,
3344,
18,
225,
12526,
21757,
777,
434,
326,
3639,
368,
12597,
471,
8205,
18,
3639,
514,
563,
273,
1408... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
3757,
9459,
12,
9459,
11243,
13,
565,
288,
3639,
368,
13389,
4582,
2674,
3344,
18,
225,
12526,
21757,
777,
434,
326,
3639,
368,
12597,
471,
8205,
18,
3639,
514,
563,
273,
1408... |
return validateActionValue((ActionValue)value, diagnostics, context); | return validateActionValue((ActionValue) value, diagnostics, context); | protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map context) { switch (classifierID) { case AttributePackage.ACTION_VALUE: return validateActionValue((ActionValue)value, diagnostics, context); case AttributePackage.AXIS_ORIGIN: return validateAxisOrigin((AxisOrigin)value, diagnostics, context); case AttributePackage.BOUNDS: return validateBounds((Bounds)value, diagnostics, context); case AttributePackage.COLOR_DEFINITION: return validateColorDefinition((ColorDefinition)value, diagnostics, context); case AttributePackage.DATA_POINT: return validateDataPoint((DataPoint)value, diagnostics, context); case AttributePackage.DATA_POINT_COMPONENT: return validateDataPointComponent((DataPointComponent)value, diagnostics, context); case AttributePackage.DATE_FORMAT_SPECIFIER: return validateDateFormatSpecifier((DateFormatSpecifier)value, diagnostics, context); case AttributePackage.EXTENDED_PROPERTY: return validateExtendedProperty((ExtendedProperty)value, diagnostics, context); case AttributePackage.FILL: return validateFill((Fill)value, diagnostics, context); case AttributePackage.FONT_DEFINITION: return validateFontDefinition((FontDefinition)value, diagnostics, context); case AttributePackage.FORMAT_SPECIFIER: return validateFormatSpecifier((FormatSpecifier)value, diagnostics, context); case AttributePackage.GRADIENT: return validateGradient((Gradient)value, diagnostics, context); case AttributePackage.IMAGE: return validateImage((Image)value, diagnostics, context); case AttributePackage.INSETS: return validateInsets((Insets)value, diagnostics, context); case AttributePackage.JAVA_DATE_FORMAT_SPECIFIER: return validateJavaDateFormatSpecifier((JavaDateFormatSpecifier)value, diagnostics, context); case AttributePackage.JAVA_NUMBER_FORMAT_SPECIFIER: return validateJavaNumberFormatSpecifier((JavaNumberFormatSpecifier)value, diagnostics, context); case AttributePackage.LINE_ATTRIBUTES: return validateLineAttributes((LineAttributes)value, diagnostics, context); case AttributePackage.LOCATION: return validateLocation((Location)value, diagnostics, context); case AttributePackage.MARKER: return validateMarker((Marker)value, diagnostics, context); case AttributePackage.NUMBER_FORMAT_SPECIFIER: return validateNumberFormatSpecifier((NumberFormatSpecifier)value, diagnostics, context); case AttributePackage.PALETTE: return validatePalette((Palette)value, diagnostics, context); case AttributePackage.SCRIPT_VALUE: return validateScriptValue((ScriptValue)value, diagnostics, context); case AttributePackage.SERIES_HINT: return validateSeriesHint((SeriesHint)value, diagnostics, context); case AttributePackage.SERIES_VALUE: return validateSeriesValue((SeriesValue)value, diagnostics, context); case AttributePackage.SIZE: return validateSize((Size)value, diagnostics, context); case AttributePackage.STYLE_MAP: return validateStyleMap((StyleMap)value, diagnostics, context); case AttributePackage.TEXT: return validateText((Text)value, diagnostics, context); case AttributePackage.TEXT_ALIGNMENT: return validateTextAlignment((TextAlignment)value, diagnostics, context); case AttributePackage.TOOLTIP_VALUE: return validateTooltipValue((TooltipValue)value, diagnostics, context); case AttributePackage.URL_VALUE: return validateURLValue((URLValue)value, diagnostics, context); case AttributePackage.ACTION_TYPE: return validateActionType((Object)value, diagnostics, context); case AttributePackage.ANCHOR: return validateAnchor((Object)value, diagnostics, context); case AttributePackage.AXIS_TYPE: return validateAxisType((Object)value, diagnostics, context); case AttributePackage.CHART_DIMENSION: return validateChartDimension((Object)value, diagnostics, context); case AttributePackage.CHART_TYPE: return validateChartType((Object)value, diagnostics, context); case AttributePackage.DATA_POINT_COMPONENT_TYPE: return validateDataPointComponentType((Object)value, diagnostics, context); case AttributePackage.DATE_FORMAT_DETAIL: return validateDateFormatDetail((Object)value, diagnostics, context); case AttributePackage.DATE_FORMAT_TYPE: return validateDateFormatType((Object)value, diagnostics, context); case AttributePackage.DIRECTION: return validateDirection((Object)value, diagnostics, context); case AttributePackage.HORIZONTAL_ALIGNMENT: return validateHorizontalAlignment((Object)value, diagnostics, context); case AttributePackage.INTERSECTION_TYPE: return validateIntersectionType((Object)value, diagnostics, context); case AttributePackage.LEADER_LINE_STYLE: return validateLeaderLineStyle((Object)value, diagnostics, context); case AttributePackage.LEGEND_ITEM_TYPE: return validateLegendItemType((Object)value, diagnostics, context); case AttributePackage.LINE_STYLE: return validateLineStyle((Object)value, diagnostics, context); case AttributePackage.MARKER_TYPE: return validateMarkerType((Object)value, diagnostics, context); case AttributePackage.ORIENTATION: return validateOrientation((Object)value, diagnostics, context); case AttributePackage.POSITION: return validatePosition((Object)value, diagnostics, context); case AttributePackage.RISER_TYPE: return validateRiserType((Object)value, diagnostics, context); case AttributePackage.RULE_TYPE: return validateRuleType((Object)value, diagnostics, context); case AttributePackage.SCALE_UNIT_TYPE: return validateScaleUnitType((Object)value, diagnostics, context); case AttributePackage.SORT_OPTION: return validateSortOption((Object)value, diagnostics, context); case AttributePackage.STRETCH: return validateStretch((Object)value, diagnostics, context); case AttributePackage.STYLED_COMPONENT: return validateStyledComponent((Object)value, diagnostics, context); case AttributePackage.TICK_STYLE: return validateTickStyle((Object)value, diagnostics, context); case AttributePackage.TRIGGER_CONDITION: return validateTriggerCondition((Object)value, diagnostics, context); case AttributePackage.VERTICAL_ALIGNMENT: return validateVerticalAlignment((Object)value, diagnostics, context); case AttributePackage.ACTION_TYPE_OBJECT: return validateActionTypeObject((ActionType)value, diagnostics, context); case AttributePackage.ANCHOR_OBJECT: return validateAnchorObject((Anchor)value, diagnostics, context); case AttributePackage.AXIS_TYPE_OBJECT: return validateAxisTypeObject((AxisType)value, diagnostics, context); case AttributePackage.CHART_DIMENSION_OBJECT: return validateChartDimensionObject((ChartDimension)value, diagnostics, context); case AttributePackage.CHART_TYPE_OBJECT: return validateChartTypeObject((ChartType)value, diagnostics, context); case AttributePackage.DATA_POINT_COMPONENT_TYPE_OBJECT: return validateDataPointComponentTypeObject((DataPointComponentType)value, diagnostics, context); case AttributePackage.DATE_FORMAT_DETAIL_OBJECT: return validateDateFormatDetailObject((DateFormatDetail)value, diagnostics, context); case AttributePackage.DATE_FORMAT_TYPE_OBJECT: return validateDateFormatTypeObject((DateFormatType)value, diagnostics, context); case AttributePackage.DIRECTION_OBJECT: return validateDirectionObject((Direction)value, diagnostics, context); case AttributePackage.HORIZONTAL_ALIGNMENT_OBJECT: return validateHorizontalAlignmentObject((HorizontalAlignment)value, diagnostics, context); case AttributePackage.ID: return validateID((String)value, diagnostics, context); case AttributePackage.INTERSECTION_TYPE_OBJECT: return validateIntersectionTypeObject((IntersectionType)value, diagnostics, context); case AttributePackage.LEADER_LINE_STYLE_OBJECT: return validateLeaderLineStyleObject((LeaderLineStyle)value, diagnostics, context); case AttributePackage.LEGEND_ITEM_TYPE_OBJECT: return validateLegendItemTypeObject((LegendItemType)value, diagnostics, context); case AttributePackage.LINE_STYLE_OBJECT: return validateLineStyleObject((LineStyle)value, diagnostics, context); case AttributePackage.MARKER_TYPE_OBJECT: return validateMarkerTypeObject((MarkerType)value, diagnostics, context); case AttributePackage.ORIENTATION_OBJECT: return validateOrientationObject((Orientation)value, diagnostics, context); case AttributePackage.PERCENTAGE: return validatePercentage(((Double)value).doubleValue(), diagnostics, context); case AttributePackage.PERCENTAGE_OBJECT: return validatePercentageObject((Double)value, diagnostics, context); case AttributePackage.POSITION_OBJECT: return validatePositionObject((Position)value, diagnostics, context); case AttributePackage.RGB_VALUE: return validateRGBValue(((Integer)value).intValue(), diagnostics, context); case AttributePackage.RGB_VALUE_OBJECT: return validateRGBValueObject((Integer)value, diagnostics, context); case AttributePackage.RISER_TYPE_OBJECT: return validateRiserTypeObject((RiserType)value, diagnostics, context); case AttributePackage.RULE_TYPE_OBJECT: return validateRuleTypeObject((RuleType)value, diagnostics, context); case AttributePackage.SCALE_UNIT_TYPE_OBJECT: return validateScaleUnitTypeObject((ScaleUnitType)value, diagnostics, context); case AttributePackage.SORT_OPTION_OBJECT: return validateSortOptionObject((SortOption)value, diagnostics, context); case AttributePackage.STRETCH_OBJECT: return validateStretchObject((Stretch)value, diagnostics, context); case AttributePackage.STYLED_COMPONENT_OBJECT: return validateStyledComponentObject((StyledComponent)value, diagnostics, context); case AttributePackage.TICK_STYLE_OBJECT: return validateTickStyleObject((TickStyle)value, diagnostics, context); case AttributePackage.TRIGGER_CONDITION_OBJECT: return validateTriggerConditionObject((TriggerCondition)value, diagnostics, context); case AttributePackage.VERTICAL_ALIGNMENT_OBJECT: return validateVerticalAlignmentObject((VerticalAlignment)value, diagnostics, context); default: return true; } } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/AttributeValidator.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/util/AttributeValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1250,
1954,
12,
474,
14622,
734,
16,
1033,
460,
16,
21450,
3893,
22568,
16,
1635,
819,
13,
565,
288,
3639,
1620,
261,
1106,
1251,
734,
13,
3639,
288,
5411,
648,
3601,
2261,
18,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1250,
1954,
12,
474,
14622,
734,
16,
1033,
460,
16,
21450,
3893,
22568,
16,
1635,
819,
13,
565,
288,
3639,
1620,
261,
1106,
1251,
734,
13,
3639,
288,
5411,
648,
3601,
2261,
18,
12... |
return (EAttribute)seriesGroupingEClass.getEStructuralFeatures().get(1); | return (EAttribute) seriesGroupingEClass.getEStructuralFeatures().get(1); | public EAttribute getSeriesGrouping_GroupingUnit() { return (EAttribute)seriesGroupingEClass.getEStructuralFeatures().get(1); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/DataPackageImpl.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/data/impl/DataPackageImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
512,
1499,
336,
6485,
21014,
67,
21014,
2802,
1435,
565,
288,
3639,
327,
261,
41,
1499,
13,
4166,
21014,
5720,
18,
588,
41,
14372,
8696,
7675,
588,
12,
21,
1769,
565,
289,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
512,
1499,
336,
6485,
21014,
67,
21014,
2802,
1435,
565,
288,
3639,
327,
261,
41,
1499,
13,
4166,
21014,
5720,
18,
588,
41,
14372,
8696,
7675,
588,
12,
21,
1769,
565,
289,
2,
-100... |
jjAddStates(45, 46); break; case 45: if ((0x100000001000000L & l) != 0L) jjCheckNAdd(46); | jjAddStates(52, 53); | private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 57; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 49: if (curChar == 42) jjstateSet[jjnewStateCnt++] = 54; else if (curChar == 47) { if (kind > 6) kind = 6; jjCheckNAddStates(0, 2); } break; case 0: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(3, 9); else if (curChar == 47) jjAddStates(10, 11); else if (curChar == 36) { if (kind > 71) kind = 71; jjCheckNAdd(28); } else if (curChar == 34) jjCheckNAddStates(12, 14); else if (curChar == 39) jjAddStates(15, 16); else if (curChar == 46) jjCheckNAdd(4); if ((0x3fe000000000000L & l) != 0L) { if (kind > 63) kind = 63; jjCheckNAddTwoStates(1, 2); } else if (curChar == 48) { if (kind > 63) kind = 63; jjCheckNAddStates(17, 19); } break; case 1: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 63) kind = 63; jjCheckNAddTwoStates(1, 2); break; case 3: if (curChar == 46) jjCheckNAdd(4); break; case 4: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 67) kind = 67; jjCheckNAddStates(20, 22); break; case 6: if ((0x280000000000L & l) != 0L) jjCheckNAdd(7); break; case 7: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 67) kind = 67; jjCheckNAddTwoStates(7, 8); break; case 9: if (curChar == 39) jjAddStates(15, 16); break; case 10: if ((0xffffff7fffffdbffL & l) != 0L) jjCheckNAdd(11); break; case 11: if (curChar == 39 && kind > 69) kind = 69; break; case 13: if ((0x8400000000L & l) != 0L) jjCheckNAdd(11); break; case 14: if ((0xff000000000000L & l) != 0L) jjCheckNAddTwoStates(15, 11); break; case 15: if ((0xff000000000000L & l) != 0L) jjCheckNAdd(11); break; case 16: if ((0xf000000000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 17; break; case 17: if ((0xff000000000000L & l) != 0L) jjCheckNAdd(15); break; case 18: if (curChar == 34) jjCheckNAddStates(12, 14); break; case 19: if ((0xfffffffbffffdbffL & l) != 0L) jjCheckNAddStates(12, 14); break; case 21: if ((0x8400000000L & l) != 0L) jjCheckNAddStates(12, 14); break; case 22: if (curChar == 34 && kind > 70) kind = 70; break; case 23: if ((0xff000000000000L & l) != 0L) jjCheckNAddStates(23, 26); break; case 24: if ((0xff000000000000L & l) != 0L) jjCheckNAddStates(12, 14); break; case 25: if ((0xf000000000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 26; break; case 26: if ((0xff000000000000L & l) != 0L) jjCheckNAdd(24); break; case 27: if (curChar != 36) break; if (kind > 71) kind = 71; jjCheckNAdd(28); break; case 28: if ((0x3ff00100fffc1ffL & l) == 0L) break; if (kind > 71) kind = 71; jjCheckNAdd(28); break; case 29: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(3, 9); break; case 30: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(30, 31); break; case 31: if (curChar != 46) break; if (kind > 67) kind = 67; jjCheckNAddStates(27, 29); break; case 32: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 67) kind = 67; jjCheckNAddStates(27, 29); break; case 34: if ((0x280000000000L & l) != 0L) jjCheckNAdd(35); break; case 35: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 67) kind = 67; jjCheckNAddTwoStates(35, 8); break; case 36: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(36, 37); break; case 38: if ((0x280000000000L & l) != 0L) jjCheckNAdd(39); break; case 39: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 67) kind = 67; jjCheckNAddTwoStates(39, 8); break; case 40: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 42: if ((0x280000000000L & l) != 0L) jjCheckNAdd(43); break; case 43: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(43, 8); break; case 44: if (curChar != 48) break; if (kind > 63) kind = 63; jjCheckNAddStates(17, 19); break; case 46: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 63) kind = 63; jjCheckNAddTwoStates(46, 2); break; case 47: if ((0xff000000000000L & l) == 0L) break; if (kind > 63) kind = 63; jjCheckNAddTwoStates(47, 2); break; case 48: if (curChar == 47) jjAddStates(10, 11); break; case 50: if ((0xffffffffffffdbffL & l) == 0L) break; if (kind > 6) kind = 6; jjCheckNAddStates(0, 2); break; case 51: if ((0x2400L & l) != 0L && kind > 6) kind = 6; break; case 52: if (curChar == 10 && kind > 6) kind = 6; break; case 53: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 52; break; case 54: if (curChar == 42) jjstateSet[jjnewStateCnt++] = 55; break; case 55: if ((0xffff7fffffffffffL & l) != 0L && kind > 7) kind = 7; break; case 56: if (curChar == 42) jjstateSet[jjnewStateCnt++] = 54; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 0: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 71) kind = 71; jjCheckNAdd(28); break; case 2: if ((0x100000001000L & l) != 0L && kind > 63) kind = 63; break; case 5: if ((0x2000000020L & l) != 0L) jjAddStates(33, 34); break; case 8: if ((0x5000000050L & l) != 0L && kind > 67) kind = 67; break; case 10: if ((0xffffffffefffffffL & l) != 0L) jjCheckNAdd(11); break; case 12: if (curChar == 92) jjAddStates(35, 37); break; case 13: if ((0x14404410000000L & l) != 0L) jjCheckNAdd(11); break; case 19: if ((0xffffffffefffffffL & l) != 0L) jjCheckNAddStates(12, 14); break; case 20: if (curChar == 92) jjAddStates(38, 40); break; case 21: if ((0x14404410000000L & l) != 0L) jjCheckNAddStates(12, 14); break; case 28: if ((0x87fffffe87fffffeL & l) == 0L) break; if (kind > 71) kind = 71; jjCheckNAdd(28); break; case 33: if ((0x2000000020L & l) != 0L) jjAddStates(41, 42); break; case 37: if ((0x2000000020L & l) != 0L) jjAddStates(43, 44); break; case 41: if ((0x2000000020L & l) != 0L) jjAddStates(45, 46); break; case 45: if ((0x100000001000000L & l) != 0L) jjCheckNAdd(46); break; case 46: if ((0x7e0000007eL & l) == 0L) break; if (kind > 63) kind = 63; jjCheckNAddTwoStates(46, 2); break; case 50: if (kind > 6) kind = 6; jjAddStates(0, 2); break; case 55: if (kind > 7) kind = 7; break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 0: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 71) kind = 71; jjCheckNAdd(28); break; case 10: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjstateSet[jjnewStateCnt++] = 11; break; case 19: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjAddStates(12, 14); break; case 28: if (!jjCanMove_2(hiByte, i1, i2, l1, l2)) break; if (kind > 71) kind = 71; jjCheckNAdd(28); break; case 50: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 6) kind = 6; jjAddStates(0, 2); break; case 55: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 7) kind = 7; break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 57 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/3afd4630754ba5d6642f3e8a1c9aa5162eff7e9f/JavaParserTokenManager.java/clean/pmd/src/net/sourceforge/pmd/ast/JavaParserTokenManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
727,
509,
10684,
7607,
50,
507,
67,
20,
12,
474,
787,
1119,
16,
509,
662,
1616,
15329,
282,
509,
8526,
1024,
7629,
31,
282,
509,
2542,
861,
273,
374,
31,
282,
10684,
2704,
1119,
11750,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
727,
509,
10684,
7607,
50,
507,
67,
20,
12,
474,
787,
1119,
16,
509,
662,
1616,
15329,
282,
509,
8526,
1024,
7629,
31,
282,
509,
2542,
861,
273,
374,
31,
282,
10684,
2704,
1119,
11750,... |
depth++; | public XmlSerializer startTag(String namespace, String name) throws IOException { if (namespace != null && !"".equals(namespace)) throw new RuntimeException ("NSP NYI"); //current = new State(current, prefixMap, name); checkPending(false); pending = name; return this; } | 4761 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4761/fa8417aac9e2291d481a39f1ca4bf8361bf94f6c/WbxmlSerializer.java/buggy/src/org/kxml2/wap/WbxmlSerializer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3598,
9904,
31,
225,
3598,
9904,
31,
225,
3598,
9904,
31,
225,
3598,
9904,
31,
225,
1071,
5979,
9904,
31,
225,
5714,
6306,
5979,
9904,
31,
225,
787,
1805,
12,
780,
5979,
9904,
31,
225,
1981,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3598,
9904,
31,
225,
3598,
9904,
31,
225,
3598,
9904,
31,
225,
3598,
9904,
31,
225,
1071,
5979,
9904,
31,
225,
5714,
6306,
5979,
9904,
31,
225,
787,
1805,
12,
780,
5979,
9904,
31,
225,
1981,... | |
public TA_RetCode LINEARREG_SLOPE( int startIdx, int endIdx, double inReal[], int optInTimePeriod, MInteger outBegIdx, MInteger outNbElement, double outReal[] ){ int outIdx; int today, lookbackTotal; double SumX, SumXY, SumY, SumXSqr, Divisor; int i; double tempValue1; if( startIdx < 0 ) return TA_RetCode. TA_OUT_OF_RANGE_START_INDEX; if( (endIdx < 0) || (endIdx < startIdx)) return TA_RetCode. TA_OUT_OF_RANGE_END_INDEX; if( (int)optInTimePeriod == ( Integer.MIN_VALUE ) ) optInTimePeriod = 14; else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) return TA_RetCode. TA_BAD_PARAM; lookbackTotal = LINEARREG_SLOPE_Lookback ( optInTimePeriod ); if( startIdx < lookbackTotal ) startIdx = lookbackTotal; if( startIdx > endIdx ) { outBegIdx.value = 0 ; outNbElement.value = 0 ; return TA_RetCode. TA_SUCCESS; } outIdx = 0; today = startIdx; SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; Divisor = SumX * SumX - optInTimePeriod * SumXSqr; while( today <= endIdx ) { SumXY = 0; SumY = 0; for( i = optInTimePeriod; i-- != 0; ) { SumY += tempValue1 = inReal[today - i]; SumXY += (double)i * tempValue1; } outReal[outIdx++] = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; today++; } outBegIdx.value = startIdx; outNbElement.value = outIdx; return TA_RetCode. TA_SUCCESS;} | 51465 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51465/1a230e9b7099cbd2b7e9eb1294130ca009bfedf4/Core.java/buggy/trunk/ta-lib/java/src/TA/Lib/Core.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
9833,
67,
7055,
1085,
5997,
985,
5937,
67,
55,
1502,
1423,
12,
474,
1937,
4223,
16,
474,
409,
4223,
16,
9056,
267,
6955,
63,
6487,
474,
3838,
382,
26540,
16,
49,
4522,
659,
24059,
4223... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
9833,
67,
7055,
1085,
5997,
985,
5937,
67,
55,
1502,
1423,
12,
474,
1937,
4223,
16,
474,
409,
4223,
16,
9056,
267,
6955,
63,
6487,
474,
3838,
382,
26540,
16,
49,
4522,
659,
24059,
4223... | ||
if ( c.debugDrawBoxes() || Configuration.isTrue( "xr.renderer.debug.box-outlines", true ) ) { GraphicsUtil.drawBox( c.getGraphics(), block, Color.red ); | if (c.debugDrawBoxes() || Configuration.isTrue("xr.renderer.debug.box-outlines", true)) { GraphicsUtil.drawBox(c.getGraphics(), block, Color.red); | public static void paint( Context c, Box box, boolean stylePushed, boolean restyle ) { Box block = (Box)box; restyle = restyle || box.restyle;//cascade it down box.restyle = false;//reset //set the current style CascadedStyle style = null; if ( !stylePushed && block.element != null ) { style = c.getCss().getCascadedStyle( block.element, restyle ); } if ( style != null ) { c.pushStyle( style ); } // copy the bounds to we don't mess it up Rectangle oldBounds = new Rectangle( c.getExtents() ); if ( Relative.isRelative( c ) ) { paintRelative( c, block, restyle ); } else if ( block.fixed ) { paintFixed( c, block, restyle ); } else if ( block.absolute ) { paintAbsoluteBox( c, block, restyle ); } else { paintNormal( c, block, restyle ); } //Uu.p("here it's : " + c.getListCounter()); if ( ContentUtil.isListItem( style ) ) { paintListItem( c, box ); } // move the origin down to account for the contents plus the margin, borders, and padding if ( ! box.absolute ) { oldBounds.y = oldBounds.y + block.height; c.setExtents( oldBounds ); } //reset style if ( style != null ) { c.popStyle(); } if ( c.debugDrawBoxes() || Configuration.isTrue( "xr.renderer.debug.box-outlines", true ) ) { GraphicsUtil.drawBox( c.getGraphics(), block, Color.red ); } } | 53937 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53937/8f81e5fe9f6f8593d3c596d30a3f100cb87dbf27/BoxRendering.java/clean/src/java/org/xhtmlrenderer/render/BoxRendering.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
12574,
12,
1772,
276,
16,
8549,
3919,
16,
1250,
2154,
7621,
329,
16,
1250,
3127,
1362,
262,
288,
3639,
8549,
1203,
273,
261,
3514,
13,
2147,
31,
3639,
3127,
1362,
273,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
12574,
12,
1772,
276,
16,
8549,
3919,
16,
1250,
2154,
7621,
329,
16,
1250,
3127,
1362,
262,
288,
3639,
8549,
1203,
273,
261,
3514,
13,
2147,
31,
3639,
3127,
1362,
273,
3... |
this.pid = pid; } | this.pid = pid; } | public void setPid(String pid) { this.pid = pid; } | 54717 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54717/e808a59811eaef15c4b49bab751c5ba6de7fddd1/OsgiConfig.java/clean/spring-osgi-core/src/main/java/org/springframework/osgi/context/support/OsgiConfig.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
12478,
12,
780,
4231,
13,
288,
3639,
333,
18,
6610,
273,
4231,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
12478,
12,
780,
4231,
13,
288,
3639,
333,
18,
6610,
273,
4231,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
null, "setOnfocus"); | null, "setOnfocusExpr"); | public PropertyDescriptor[] getPropertyDescriptors() { PropertyDescriptor[] result = new PropertyDescriptor[30]; try { result[0] = new PropertyDescriptor("accesskey", ELTextTag.class, null, "setAccesskey"); result[1] = new PropertyDescriptor("alt", ELTextTag.class, null, "setAlt"); result[2] = new PropertyDescriptor("altKey", ELTextTag.class, null, "setAltKey"); // This attribute has a non-standard mapping. result[3] = new PropertyDescriptor("disabled", ELTextTag.class, null, "setDisabledExpr"); // This attribute has a non-standard mapping. result[4] = new PropertyDescriptor("indexed", ELTextTag.class, null, "setIndexedExpr"); result[5] = new PropertyDescriptor("maxlength", ELTextTag.class, null, "setMaxlength"); result[6] = new PropertyDescriptor("name", ELTextTag.class, null, "setName"); result[7] = new PropertyDescriptor("onblur", ELTextTag.class, null, "setOnblur"); result[8] = new PropertyDescriptor("onchange", ELTextTag.class, null, "setOnchange"); result[9] = new PropertyDescriptor("onclick", ELTextTag.class, null, "setOnclick"); result[10] = new PropertyDescriptor("ondblclick", ELTextTag.class, null, "setOndblclick"); result[11] = new PropertyDescriptor("onfocus", ELTextTag.class, null, "setOnfocus"); result[12] = new PropertyDescriptor("onkeydown", ELTextTag.class, null, "setOnkeydown"); result[13] = new PropertyDescriptor("onkeypress", ELTextTag.class, null, "setOnkeypress"); result[14] = new PropertyDescriptor("onkeyup", ELTextTag.class, null, "setOnkeyup"); result[15] = new PropertyDescriptor("onmousedown", ELTextTag.class, null, "setOnmousedown"); result[16] = new PropertyDescriptor("onmousemove", ELTextTag.class, null, "setOnmousemove"); result[17] = new PropertyDescriptor("onmouseout", ELTextTag.class, null, "setOnmouseout"); result[18] = new PropertyDescriptor("onmouseover", ELTextTag.class, null, "setOnmouseover"); result[19] = new PropertyDescriptor("onmouseup", ELTextTag.class, null, "setOnmouseup"); result[20] = new PropertyDescriptor("property", ELTextTag.class, null, "setProperty"); result[21] = new PropertyDescriptor("readonly", ELTextTag.class, null, "setReadonlyExpr"); result[22] = new PropertyDescriptor("size", ELTextTag.class, null, "setSize"); result[23] = new PropertyDescriptor("style", ELTextTag.class, null, "setStyle"); result[24] = new PropertyDescriptor("styleClass", ELTextTag.class, null, "setStyleClass"); result[25] = new PropertyDescriptor("styleId", ELTextTag.class, null, "setStyleId"); result[26] = new PropertyDescriptor("tabindex", ELTextTag.class, null, "setTabindex"); result[27] = new PropertyDescriptor("title", ELTextTag.class, null, "setTitle"); result[28] = new PropertyDescriptor("titleKey", ELTextTag.class, null, "setTitleKey"); result[29] = new PropertyDescriptor("value", ELTextTag.class, null, "setValue"); } catch (IntrospectionException ex) { ex.printStackTrace(); } return (result); } | 54704 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54704/db064e19656421b94aaf753550935d95f44bd5f9/ELTextTagBeanInfo.java/clean/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELTextTagBeanInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
225,
26761,
8526,
3911,
12705,
1435,
565,
288,
3639,
26761,
8526,
225,
563,
282,
273,
394,
26761,
63,
5082,
15533,
3639,
775,
288,
5411,
563,
63,
20,
65,
273,
394,
26761,
2932,
3860... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
225,
26761,
8526,
3911,
12705,
1435,
565,
288,
3639,
26761,
8526,
225,
563,
282,
273,
394,
26761,
63,
5082,
15533,
3639,
775,
288,
5411,
563,
63,
20,
65,
273,
394,
26761,
2932,
3860... |
k = locate (selector); | k = locate (selector); | public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); if (k != null) { k.attach (att); } else { k = selector.register (this, ops, att); if (k != null) add (k); } } return k; } | 25337 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25337/f851ffbfdbf05aefe9acc61f2645a3318e3c201c/AbstractSelectableChannel.java/buggy/libjava/java/nio/channels/spi/AbstractSelectableChannel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
12977,
653,
1744,
261,
4320,
357,
267,
16,
509,
6727,
16,
1033,
2403,
13,
565,
1216,
25582,
2909,
503,
225,
288,
565,
309,
16051,
291,
3678,
1832,
13,
1377,
604,
394,
25582,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
12977,
653,
1744,
261,
4320,
357,
267,
16,
509,
6727,
16,
1033,
2403,
13,
565,
1216,
25582,
2909,
503,
225,
288,
565,
309,
16051,
291,
3678,
1832,
13,
1377,
604,
394,
25582,
... |
if (Scheduler.DebugThreads) System.out.println("Giving slice to " + kid); | public synchronized TimeSlice getSlice(TimeSliceConsumer consumer) { TimeSlice slice = null; if (isRoot()) slice = getLocalSlice(this); else slice = treeNode.getParentPolicy().getSlice(this); if (slice == null) return null; SubSlice piece = new SubSlice(slice, DICE_SIZE); piece.in_use = true; TreeSet kids = rankChildren(); Iterator itr = kids.iterator(); while (itr.hasNext()) { TimeSliceConsumer kid = (TimeSliceConsumer) itr.next(); if (kid == consumer) { // System.out.println("Giving slice to preferred consumer " + kid); piece.consumer = consumer; return piece; } else if (kid.offerSlice(piece)) { // System.out.println("Giving slice to " + kid); piece.consumer = kid; return null; } else { // System.out.println("Not giving slice to " + kid); } } // No one wants it return null; } | 7981 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7981/287ac9778a9837c26ba85de7aef18f872eee1911/PercentageLatencyPolicy.java/clean/core/src/org/cougaar/core/thread/PercentageLatencyPolicy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
261,
11870,
18,
2829,
13233,
13,
2332,
18,
659,
18,
8222,
2932,
43,
9288,
2788,
358,
315,
397,
17395,
1769,
309,
261,
11870,
18,
2829,
13233,
13,
2332,
18,
659,
18,
8222,
2932,
43,
9288... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
261,
11870,
18,
2829,
13233,
13,
2332,
18,
659,
18,
8222,
2932,
43,
9288,
2788,
358,
315,
397,
17395,
1769,
309,
261,
11870,
18,
2829,
13233,
13,
2332,
18,
659,
18,
8222,
2932,
43,
9288... | |
m_ds = DataSource.dataSourceForMibObject(m_mibObj, collectionName); | public CollectionAttribute(String collectionName, MibObject mibObj) { m_mibObj = mibObj; m_ds = DataSource.dataSourceForMibObject(m_mibObj, collectionName); } | 25465 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25465/c7fb1c0267a7b284c70383a68c91521d57e9172c/CollectionAttribute.java/clean/src/services/org/opennms/netmgt/collectd/CollectionAttribute.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2200,
1499,
12,
780,
17137,
16,
490,
495,
921,
312,
495,
2675,
13,
288,
3639,
312,
67,
81,
495,
2675,
273,
312,
495,
2675,
31,
6647,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2200,
1499,
12,
780,
17137,
16,
490,
495,
921,
312,
495,
2675,
13,
288,
3639,
312,
67,
81,
495,
2675,
273,
312,
495,
2675,
31,
6647,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
String strVal = (String) optRef.getAttribute(IOption.DEFAULT_VALUE); | String strVal = optRef.getAttribute(IOption.DEFAULT_VALUE); | protected static void convertOptionRef(IToolChain toolChain, ITool tool, Element optRef) throws CoreException { String optId = optRef.getAttribute(IOption.ID); if (optId == null) return; optId = getNewOptionId(toolChain, tool, optId); // Get the option from the new tool IOption newOpt = tool.getOptionById(optId); if (newOpt != null) { // Ignore options that don't have a match IConfiguration configuration = toolChain.getParent(); try { switch (newOpt.getValueType()) { case IOption.BOOLEAN: Boolean bool = new Boolean(optRef.getAttribute(IOption.DEFAULT_VALUE)); configuration.setOption(tool, newOpt, bool.booleanValue()); break; case IOption.STRING: String strVal = (String) optRef.getAttribute(IOption.DEFAULT_VALUE); configuration.setOption(tool, newOpt, strVal); break; case IOption.ENUMERATED: // This is going to be the human readable form of the enumerated value String name = (String) optRef.getAttribute(IOption.DEFAULT_VALUE); // Convert it to the ID String idValue = newOpt.getEnumeratedId(name); configuration.setOption(tool, newOpt, idValue != null ? idValue : name); break; case IOption.STRING_LIST: case IOption.INCLUDE_PATH: case IOption.PREPROCESSOR_SYMBOLS: case IOption.LIBRARIES: case IOption.OBJECTS: Vector values = new Vector(); NodeList nodes = optRef.getElementsByTagName(IOption.LIST_VALUE); for (int i = 0; i < nodes.getLength(); ++i) { Node node = nodes.item(i); if (node.getNodeType() == Node.ELEMENT_NODE) { Boolean isBuiltIn = new Boolean(((Element)node).getAttribute(IOption.LIST_ITEM_BUILTIN)); if (!isBuiltIn.booleanValue()) { values.add(((Element)node).getAttribute(IOption.LIST_ITEM_VALUE)); } } } configuration.setOption(tool, newOpt, (String[])values.toArray(new String[values.size()])); break; } } catch (BuildException e) { throw new CoreException(new Status(IStatus.ERROR, ManagedBuilderCorePlugin.getUniqueIdentifier(), -1, ConverterMessages.getFormattedString("UpdateManagedProject12.5",e.getMessage()), e)); //$NON-NLS-1$ } } } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/cab81eb6a0c1f70424d72861aec7433a58532d1f/UpdateManagedProject12.java/clean/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/UpdateManagedProject12.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
760,
918,
1765,
1895,
1957,
12,
45,
6364,
3893,
5226,
3893,
16,
467,
6364,
5226,
16,
3010,
2153,
1957,
13,
15106,
202,
15069,
30015,
288,
202,
202,
780,
2153,
548,
273,
2153,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
760,
918,
1765,
1895,
1957,
12,
45,
6364,
3893,
5226,
3893,
16,
467,
6364,
5226,
16,
3010,
2153,
1957,
13,
15106,
202,
15069,
30015,
288,
202,
202,
780,
2153,
548,
273,
2153,
... |
public Object[][] getOptions(IConfiguration configuration) { IHoldsOptions[] optionHolders = null; if (configuration != null) { IHoldsOptions optionHolder = getOptionHolder(); if (optionHolder instanceof ITool) { optionHolders = configuration.getFilteredTools(); } else if (optionHolder instanceof IToolChain) { optionHolders = new IHoldsOptions[1]; optionHolders[0] = configuration.getToolChain(); } } | public Object[][] getOptions(IConfiguration configuration, IHoldsOptions optionHolder) { IHoldsOptions[] optionHolders = new IHoldsOptions[1]; optionHolders[0] = optionHolder; | public Object[][] getOptions(IConfiguration configuration) { IHoldsOptions[] optionHolders = null; if (configuration != null) { IHoldsOptions optionHolder = getOptionHolder(); if (optionHolder instanceof ITool) { optionHolders = configuration.getFilteredTools(); } else if (optionHolder instanceof IToolChain) { // Get the toolchain of this configuration, which is // the holder equivalent for this option optionHolders = new IHoldsOptions[1]; optionHolders[0] = configuration.getToolChain(); } // TODO: if further option holders were to be added in future, // this function needs to be extended } return getOptions(optionHolders, FILTER_PROJECT); } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/09fc3cd62d343c092fec646351566e7c28b543a1/OptionCategory.java/clean/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionCategory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
63,
6362,
65,
9849,
12,
45,
1750,
1664,
13,
288,
202,
202,
45,
20586,
87,
1320,
8526,
1456,
27003,
273,
446,
31,
202,
202,
430,
261,
7025,
480,
446,
13,
288,
1082,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
63,
6362,
65,
9849,
12,
45,
1750,
1664,
13,
288,
202,
202,
45,
20586,
87,
1320,
8526,
1456,
27003,
273,
446,
31,
202,
202,
430,
261,
7025,
480,
446,
13,
288,
1082,
202... |
if (size > 0) { throw new notAuthorizedServiceDeleteException(); } Integer orderOfDeletedItem = deletedItem.getItemOrder(); if((deletedItem.getSection() != null) && (deletedItem.getSection().getAssociatedItems() != null)) deletedItem.getSection().getAssociatedItems().remove(deletedItem); | associatedItems.remove(deletedItem); | public Boolean run(Integer infoExecutionCourseCode, Integer itemCode) throws FenixServiceException { try { ISuportePersistente persistentSuport = PersistenceSupportFactory.getDefaultPersistenceSupport(); IPersistentItem persistentItem = persistentSuport.getIPersistentItem(); IItem deletedItem = (IItem) persistentItem.readByOID(Item.class, itemCode); if (deletedItem == null) { return new Boolean(true); } IFileSuport fileSuport = FileSuport.getInstance(); long size = 1; size = fileSuport.getDirectorySize(deletedItem.getSlideName()); if (size > 0) { throw new notAuthorizedServiceDeleteException(); } Integer orderOfDeletedItem = deletedItem.getItemOrder(); if((deletedItem.getSection() != null) && (deletedItem.getSection().getAssociatedItems() != null)) deletedItem.getSection().getAssociatedItems().remove(deletedItem); deletedItem.setSection(null); persistentItem.deleteByOID(Item.class, deletedItem.getIdInternal()); persistentSuport.confirmarTransaccao(); persistentSuport.iniciarTransaccao(); List itemsList = null; itemsList = persistentItem.readAllItemsBySection(deletedItem.getSection().getIdInternal(), deletedItem.getSection().getSite().getExecutionCourse().getSigla(), deletedItem.getSection().getSite().getExecutionCourse().getExecutionPeriod().getExecutionYear().getYear(), deletedItem.getSection().getSite().getExecutionCourse().getExecutionPeriod().getName()); Iterator iterItems = itemsList.iterator(); while (iterItems.hasNext()) { IItem item = (IItem) iterItems.next(); Integer itemOrder = item.getItemOrder(); if (itemOrder.intValue() > orderOfDeletedItem.intValue()) { persistentItem.simpleLockWrite(item); item.setItemOrder(new Integer(itemOrder.intValue() - 1)); } } return new Boolean(true); } catch (ExcepcaoPersistencia e) { throw new FenixServiceException(e); } } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/1d1a2d75a8873be8c85668da574f4fc6edd16f22/DeleteItem.java/clean/src/net/sourceforge/fenixedu/applicationTier/Servico/teacher/DeleteItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3411,
1086,
12,
4522,
1123,
3210,
39,
3117,
1085,
16,
2144,
761,
1085,
13,
1216,
478,
275,
697,
15133,
288,
3639,
775,
288,
5411,
467,
3088,
499,
73,
11906,
73,
9195,
3088,
499,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3411,
1086,
12,
4522,
1123,
3210,
39,
3117,
1085,
16,
2144,
761,
1085,
13,
1216,
478,
275,
697,
15133,
288,
3639,
775,
288,
5411,
467,
3088,
499,
73,
11906,
73,
9195,
3088,
499,
2... |
public TA_RetCode LINEARREG_INTERCEPT(int startIdx, int endIdx, double inReal[], int optInTimePeriod, MInteger outBegIdx, MInteger outNbElement, double outReal[]) { | public TA_RetCode LINEARREG_INTERCEPT( int startIdx, int endIdx, double inReal[], int optInTimePeriod, MInteger outBegIdx, MInteger outNbElement, double outReal[] ) { | public TA_RetCode LINEARREG_INTERCEPT(int startIdx, int endIdx, double inReal[], int optInTimePeriod, MInteger outBegIdx, MInteger outNbElement, double outReal[]) { int outIdx; int today, lookbackTotal; double SumX, SumXY, SumY, SumXSqr, Divisor; double m; int i; double tempValue1; if (startIdx < 0) return TA_RetCode.TA_OUT_OF_RANGE_START_INDEX; if ((endIdx < 0) || (endIdx < startIdx)) return TA_RetCode.TA_OUT_OF_RANGE_END_INDEX; if ((int) optInTimePeriod == (Integer.MIN_VALUE )) optInTimePeriod = 14; else if (((int) optInTimePeriod < 2) || ((int) optInTimePeriod > 100000)) return TA_RetCode.TA_BAD_PARAM; lookbackTotal = LINEARREG_INTERCEPT_Lookback(optInTimePeriod); if (startIdx < lookbackTotal) startIdx = lookbackTotal; if (startIdx > endIdx) { outBegIdx.value = 0; outNbElement.value = 0; return TA_RetCode.TA_SUCCESS; } outIdx = 0; today = startIdx; SumX = optInTimePeriod * (optInTimePeriod - 1) * 0.5; SumXSqr = optInTimePeriod * (optInTimePeriod - 1) * (2 * optInTimePeriod - 1) / 6; Divisor = SumX * SumX - optInTimePeriod * SumXSqr; while (today <= endIdx) { SumXY = 0; SumY = 0; for (i = optInTimePeriod; i-- != 0;) { SumY += tempValue1 = inReal[today - i]; SumXY += (double) i * tempValue1; } m = (optInTimePeriod * SumXY - SumX * SumY) / Divisor; outReal[outIdx++] = (SumY - m * SumX) / (double) optInTimePeriod; today++; } outBegIdx.value = startIdx; outNbElement.value = outIdx; return TA_RetCode.TA_SUCCESS; } | 7231 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7231/5df8081f2a7211016256c0f481213a987e02947a/Core.java/clean/ta-lib/java/src/TA/Lib/Core.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
399,
37,
67,
7055,
1085,
14340,
985,
5937,
67,
9125,
14514,
12,
474,
27108,
16,
509,
679,
4223,
16,
1082,
202,
9056,
316,
6955,
63,
6487,
509,
2153,
382,
26540,
16,
490,
4522,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
399,
37,
67,
7055,
1085,
14340,
985,
5937,
67,
9125,
14514,
12,
474,
27108,
16,
509,
679,
4223,
16,
1082,
202,
9056,
316,
6955,
63,
6487,
509,
2153,
382,
26540,
16,
490,
4522,... |
WebResponse response = getJSPResponse("servlet/formatedByTagOK.jsp"); | WebResponse response = getJSPResponse("servlet/FormatedByTagOK.jsp"); | public void testTag() throws Exception { WebResponse response = getJSPResponse("servlet/formatedByTagOK.jsp"); String requestID1 = response.getNewCookieValue(Consts.ATTRIBUTE_REQUEST_ID); WebResponse reportResponse = getResponseQuery(new String[] {"requestID", requestID1}); validateReport(reportResponse); } | 53077 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53077/da8b5599f1ae1c52d0edcc8ae36abaebe808c2b6/ReportsTest.java/buggy/jtidyservlet/src/test/org/w3c/tidy/servlet/ReportsTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1805,
1435,
1216,
1185,
565,
288,
377,
202,
4079,
1064,
766,
273,
225,
9285,
3118,
1064,
2932,
23231,
19,
1204,
690,
29309,
3141,
18,
24926,
8863,
3639,
514,
590,
734,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1805,
1435,
1216,
1185,
565,
288,
377,
202,
4079,
1064,
766,
273,
225,
9285,
3118,
1064,
2932,
23231,
19,
1204,
690,
29309,
3141,
18,
24926,
8863,
3639,
514,
590,
734,
21... |
if (Logger.DEBUG) Logger.logDebugMessage( "ContextHelpDialog", "handleEvent: SWT.Deactivate called. "); | if (WorkbenchHelpPlugin.DEBUG_INFOPOP) { System.out.println( "ContextHelpDialog shell deactivate listener: SWT.Deactivate called. "); } | public void handleEvent(Event e) { if (Logger.DEBUG) Logger.logDebugMessage( "ContextHelpDialog", "handleEvent: SWT.Deactivate called. "); close(); }; | 13822 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13822/4e209cec4aaac3efe7d17d7c2f1dd20ceb94e895/ContextHelpDialog.java/buggy/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1640,
1133,
12,
1133,
425,
13,
288,
9506,
202,
430,
261,
3328,
18,
9394,
13,
6862,
202,
3328,
18,
1330,
2829,
1079,
12,
25083,
202,
6,
1042,
6696,
6353,
3113,
25083,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1640,
1133,
12,
1133,
425,
13,
288,
9506,
202,
430,
261,
3328,
18,
9394,
13,
6862,
202,
3328,
18,
1330,
2829,
1079,
12,
25083,
202,
6,
1042,
6696,
6353,
3113,
25083,
202... |
"http: | "http: | public void testSpringAppContextAwareObjectSupplier() throws Exception { AxisService clientService = createSpringServiceforClient(springServiceName, new RawXMLINOutMessageReceiver(), "org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier", "springAwareService", springOperationName); ConfigurationContext configcontext = UtilServer.createClientConfigurationContext(); ServiceClient sender = new ServiceClient(configcontext, clientService); OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace omNs = factory.createOMNamespace( "http://springExample.org/example1", "example1"); OMElement method = factory.createOMElement("getValue", omNs); OMElement value = factory.createOMElement("Text", omNs); value.addChild(factory.createOMText(value, "Test String ")); method.addChild(value); Options options = new Options(); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setTo(targetEPR); options.setAction(springOperationName.getLocalPart()); sender.setOptions(options); OMElement result = sender.sendReceive(springOperationName, method); StringWriter writer = new StringWriter(); result.serialize(XMLOutputFactory.newInstance() .createXMLStreamWriter(writer)); writer.flush(); String testStr = writer.toString(); // write to report System.out.println("\ntestSpringAppContextAwareObjectSupplier result: " + testStr); assertNotSame(new Integer(testStr.indexOf("emerge thyself")), new Integer(-1)); } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/7016b5e627a0ea516e840f23c95e4412462a18be/SpringServiceTest.java/buggy/modules/integration/test/org/apache/axis2/spring/SpringServiceTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
55,
11638,
3371,
1042,
10155,
921,
13254,
1435,
1216,
1185,
288,
3639,
15509,
1179,
1004,
1179,
273,
7734,
752,
55,
11638,
1179,
1884,
1227,
12,
87,
11638,
16789,
16,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
55,
11638,
3371,
1042,
10155,
921,
13254,
1435,
1216,
1185,
288,
3639,
15509,
1179,
1004,
1179,
273,
7734,
752,
55,
11638,
1179,
1884,
1227,
12,
87,
11638,
16789,
16,
394,
... |
InternalError ie = new InternalError(); ie.initCause(e); throw ie; | InternalError ie = new InternalError(); ie.initCause(e); throw ie; | URL getURL() { try { return new URL(((JarURLLoader) loader).baseJarURL, name, loader.classloader.getURLStreamHandler("jar")); } catch (MalformedURLException e) { InternalError ie = new InternalError(); ie.initCause(e); throw ie; } } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/c7beb2e15aab929442532def7adc6eca7478246d/URLClassLoader.java/clean/java/net/URLClassLoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1976,
19341,
1435,
565,
288,
1377,
775,
3639,
288,
202,
225,
327,
394,
1976,
12443,
12,
10813,
1785,
2886,
13,
4088,
2934,
1969,
10813,
1785,
16,
508,
16,
202,
1171,
4088,
18,
1106,
6714,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1976,
19341,
1435,
565,
288,
1377,
775,
3639,
288,
202,
225,
327,
394,
1976,
12443,
12,
10813,
1785,
2886,
13,
4088,
2934,
1969,
10813,
1785,
16,
508,
16,
202,
1171,
4088,
18,
1106,
6714,... |
if (limit == 0) { | if (limit == 0 && result.size() > 0) { | private void process() { if (limit == 1) { result.add(splitee); return; } int pos = 0; int beg = 0; int hits = 0; int len = splitee.length(); RubyString rubySplitee = runtime.newString(splitee); while ((beg = pattern.search(rubySplitee, pos)) > -1) { hits++; RubyMatchData matchData = (RubyMatchData) runtime.getBackref(); int end = matchData.matchEndPosition(); // Whitespace splits are supposed to ignore leading whitespace if (beg != 0 || !isWhitespace) { addResult(substring(splitee, pos, (beg == pos && end == beg) ? 1 : beg - pos)); // Add to list any /(.)/ matched. long extraPatterns = matchData.getSize(); for (int i = 1; i < extraPatterns; i++) { addResult(((RubyString) matchData.group(i)).getValue()); } } pos = (end == beg) ? beg + 1 : end; if (hits + 1 == limit) { break; } } if (hits == 0) { addResult(splitee); } else if (pos <= len) { addResult(substring(splitee, pos, len - pos)); } if (limit == 0) { while (((String) result.get(result.size() - 1)).length() == 0) { result.remove(result.size() - 1); } } } | 46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/09d8f30f6aebff1911b6b5fb96b24e45094f8cd7/Split.java/clean/src/org/jruby/util/Split.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
1435,
288,
3639,
309,
261,
3595,
422,
404,
13,
288,
5411,
563,
18,
1289,
12,
4939,
1340,
1769,
5411,
327,
31,
3639,
289,
3639,
509,
949,
273,
374,
31,
202,
202,
474,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
1435,
288,
3639,
309,
261,
3595,
422,
404,
13,
288,
5411,
563,
18,
1289,
12,
4939,
1340,
1769,
5411,
327,
31,
3639,
289,
3639,
509,
949,
273,
374,
31,
202,
202,
474,
... |
if (lastShellSize == null) | if (lastShellSize == null) { | public void shellActivated(ShellEvent e) { if (lastShellSize == null) lastShellSize = getShell().getSize(); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/391f2606b4ea2c1fb5052d938ca90877ee7631f6/PreferenceDialog.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
5972,
28724,
12,
13220,
1133,
425,
13,
288,
9506,
202,
430,
261,
2722,
13220,
1225,
422,
446,
13,
6862,
202,
2722,
13220,
1225,
273,
7932,
1165,
7675,
588,
1225,
5621,
108... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
5972,
28724,
12,
13220,
1133,
425,
13,
288,
9506,
202,
430,
261,
2722,
13220,
1225,
422,
446,
13,
6862,
202,
2722,
13220,
1225,
273,
7932,
1165,
7675,
588,
1225,
5621,
108... |
return RubyFixnum.newFixnum(recv.getRuntime(), recv.getRuntime().random.nextInt((int) ceil)); | return recv.getRuntime().newFixnum(recv.getRuntime().random.nextInt((int) ceil)); | public static RubyNumeric rand(IRubyObject recv, IRubyObject[] args) { long ceil; if (args.length == 0) { ceil = 0; } else if (args.length == 1) { RubyInteger integerCeil = (RubyInteger) args[0].convertToType("Integer", "to_i", true); ceil = integerCeil.getLongValue(); ceil = Math.abs(ceil); if (ceil > Integer.MAX_VALUE) { throw new NotImplementedError(recv.getRuntime(), "Random values larger than Integer.MAX_VALUE not supported"); } } else { throw new ArgumentError(recv.getRuntime(), "wrong # of arguments(" + args.length + " for 1)"); } if (ceil == 0) { double result = recv.getRuntime().random.nextDouble(); return RubyFloat.newFloat(recv.getRuntime(), result); } return RubyFixnum.newFixnum(recv.getRuntime(), recv.getRuntime().random.nextInt((int) ceil)); } | 52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyKernel.java/buggy/src/org/jruby/RubyKernel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
9902,
5605,
12,
7937,
10340,
921,
10665,
16,
15908,
10340,
921,
8526,
833,
13,
288,
3639,
1525,
8416,
31,
3639,
309,
261,
1968,
18,
2469,
422,
374,
13,
288,
5411,
8416,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
9902,
5605,
12,
7937,
10340,
921,
10665,
16,
15908,
10340,
921,
8526,
833,
13,
288,
3639,
1525,
8416,
31,
3639,
309,
261,
1968,
18,
2469,
422,
374,
13,
288,
5411,
8416,
... |
CachePool.instance().register(childrenList); | public synchronized void putChildren(RolapMember member, ArrayList children) { ChildrenList childrenList = new ChildrenList(this, member, children); CachePool.SoftCacheableReference ref = new CachePool.SoftCacheableReference(childrenList); CachePool.SoftCacheableReference oldRef = (CachePool.SoftCacheableReference) mapMemberToChildren.put(member, ref); if (oldRef != null) { ChildrenList old = (ChildrenList) oldRef.getCacheableOrFail(); RolapUtil.debugOut.println("putChildren: remove " + oldRef + ", " + old); CachePool.instance().deregister(old, false); } CachePool.instance().register(childrenList); } | 4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/9a9a90bdd4c73831004961b46a23272a8decce8b/SmartMemberReader.java/buggy/src/main/mondrian/rolap/SmartMemberReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
1378,
4212,
12,
4984,
438,
4419,
3140,
16,
2407,
2325,
13,
288,
202,
202,
4212,
682,
2325,
682,
273,
394,
16992,
682,
12,
2211,
16,
3140,
16,
2325,
1769,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
1378,
4212,
12,
4984,
438,
4419,
3140,
16,
2407,
2325,
13,
288,
202,
202,
4212,
682,
2325,
682,
273,
394,
16992,
682,
12,
2211,
16,
3140,
16,
2325,
1769,
202,
202,
... | |
int selectionEnd, Color selectionForeground, Color selectionBackground) { TextLayout scaled = zoomTextLayout(layout); graphics.drawTextLayout(scaled, (int)Math.floor(x * zoom + fractionalX), (int)Math.floor(y * zoom + fractionalY), selectionStart, selectionEnd, selectionBackground, selectionForeground); scaled.dispose(); } | int selectionEnd, Color selectionForeground, Color selectionBackground) { TextLayout scaled = zoomTextLayout(layout); graphics.drawTextLayout(scaled, (int)Math.floor(x * zoom + fractionalX), (int)Math.floor(y * zoom + fractionalY), selectionStart, selectionEnd, selectionBackground, selectionForeground); scaled.dispose(); } | public void drawTextLayout(TextLayout layout, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground) { TextLayout scaled = zoomTextLayout(layout); graphics.drawTextLayout(scaled, (int)Math.floor(x * zoom + fractionalX), (int)Math.floor(y * zoom + fractionalY), selectionStart, selectionEnd, selectionBackground, selectionForeground); scaled.dispose(); } | 1758 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1758/f20e4ebd8a3904e04ab820488e31d606bbb2e6be/ScaledGraphics.java/clean/org.eclipse.gmf.runtime/plugins/org.eclipse.gmf.runtime.draw2d.ui/src/org/eclipse/gmf/runtime/draw2d/ui/internal/graphics/ScaledGraphics.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3724,
1528,
3744,
12,
1528,
3744,
3511,
16,
509,
619,
16,
509,
677,
16,
509,
4421,
1685,
16,
1082,
202,
474,
4421,
1638,
16,
5563,
4421,
23206,
16,
5563,
4421,
8199,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3724,
1528,
3744,
12,
1528,
3744,
3511,
16,
509,
619,
16,
509,
677,
16,
509,
4421,
1685,
16,
1082,
202,
474,
4421,
1638,
16,
5563,
4421,
23206,
16,
5563,
4421,
8199,
13,
... |
IWorkbenchPage page = dw.getActivePage(); if (page != null) page.openEditor(file); | if (dw != null) { IWorkbenchPage page = dw.getActivePage(); if (page != null) page.openEditor(file); } | public boolean performFinish() { IFile file = mainPage.createNewFile(); if (file == null) return false; selectAndReveal(file); // Open editor on new file. IWorkbenchWindow dw = getWorkbench().getActiveWorkbenchWindow(); try { IWorkbenchPage page = dw.getActivePage(); if (page != null) page.openEditor(file); } catch (PartInitException e) { DialogUtil.openError( dw.getShell(), ResourceMessages.getString("FileResource.errorMessage"), //$NON-NLS-1$ e.getMessage(), e); } return true;} | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/0afae2d1a1ae06b1bdf37d656ba68793da325e38/BasicNewFileResourceWizard.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/wizards/newresource/BasicNewFileResourceWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1250,
3073,
11641,
1435,
288,
202,
45,
812,
585,
273,
2774,
1964,
18,
2640,
1908,
812,
5621,
202,
430,
261,
768,
422,
446,
13,
202,
202,
2463,
629,
31,
202,
4025,
1876,
426,
24293,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1250,
3073,
11641,
1435,
288,
202,
45,
812,
585,
273,
2774,
1964,
18,
2640,
1908,
812,
5621,
202,
430,
261,
768,
422,
446,
13,
202,
202,
2463,
629,
31,
202,
4025,
1876,
426,
24293,
12,... |
setText(s); | FontMetrics fm = getToolkit().getFontMetrics(list.getFont()); int strWidth = SwingUtilities.computeStringWidth(fm, s); int cbWidth = getSize().width; if (cbWidth != 0 && strWidth > cbWidth) { char[] str = s.toCharArray(); int currWidth = 0; int i = 0; String postStr = "... "; cbWidth -= SwingUtilities.computeStringWidth(fm, postStr); while (i < str.length && currWidth < cbWidth) { ++i; currWidth = SwingUtilities.computeStringWidth(fm, new String(str, 0, i)); } setText(new String(str, 0, i) + postStr); } else setText(s); | public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String s = value.toString(); setText(s); setOpaque(true); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setEnabled(list.isEnabled()); setFont(list.getFont()); // Use focusCellHighlightBorder when renderer has focus and // noFocusBorder otherwise if (cellHasFocus) setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); else setBorder(noFocusBorder); return this; } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/fb7120a9ec0e190272c5b7001972c43826c4cb9f/BasicComboBoxRenderer.java/clean/libraries/javalib/javax/swing/plaf/basic/BasicComboBoxRenderer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5435,
10033,
4020,
6747,
1841,
12,
46,
682,
666,
16,
1033,
460,
16,
4766,
7734,
509,
770,
16,
1250,
20956,
16,
4766,
7734,
1250,
2484,
5582,
9233,
13,
225,
288,
565,
514,
272,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5435,
10033,
4020,
6747,
1841,
12,
46,
682,
666,
16,
1033,
460,
16,
4766,
7734,
509,
770,
16,
1250,
20956,
16,
4766,
7734,
1250,
2484,
5582,
9233,
13,
225,
288,
565,
514,
272,
273... |
jbPrintRep.setText("\u041f\u0435\u0447\u0430\u0442 \u0420\u0430\u043f\u043e\u0440\u0442"); | jbPrintRep.setText("\u041f\u0435\u0447\u0430\u0442 \u043e\u0442\u0447\u0435\u0442"); | private void initComponents() { jpTop = new javax.swing.JPanel(); jpMiddle = new javax.swing.JPanel(); jspData = new javax.swing.JScrollPane(); jpControls = new javax.swing.JPanel(); jlCode = new javax.swing.JLabel(); jtfCode = new javax.swing.JTextField(); jlDocName = new javax.swing.JLabel(); jtfDocName = new javax.swing.JTextField(); jbSearch = new javax.swing.JButton(); jpBottom = new javax.swing.JPanel(); jbNew = new javax.swing.JButton(); jbEdit = new javax.swing.JButton(); jbPrint = new javax.swing.JButton(); jbPrintRep = new javax.swing.JButton(); jbAll = new javax.swing.JButton(); jbDel = new javax.swing.JButton(); jbDropData = new javax.swing.JButton(); jbClose = new javax.swing.JButton(); setClosable(true); setIconifiable(true); setMaximizable(true); setResizable(true); setTitle("\u0422\u0438\u043f\u043e\u0432\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438"); jpTop.setBorder(javax.swing.BorderFactory.createEtchedBorder()); org.jdesktop.layout.GroupLayout jpTopLayout = new org.jdesktop.layout.GroupLayout(jpTop); jpTop.setLayout(jpTopLayout); jpTopLayout.setHorizontalGroup( jpTopLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(0, 841, Short.MAX_VALUE) ); jpTopLayout.setVerticalGroup( jpTopLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(0, 10, Short.MAX_VALUE) ); getContentPane().add(jpTop, java.awt.BorderLayout.NORTH); jpMiddle.setLayout(new java.awt.BorderLayout()); jpMiddle.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jspData.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jspData.getViewport().add(table); jpMiddle.add(jspData, java.awt.BorderLayout.CENTER); jpControls.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jlCode.setText("\u041a\u043e\u0434:"); jpControls.add(jlCode); jtfCode.setPreferredSize(new java.awt.Dimension(80, 20)); jpControls.add(jtfCode); jlDocName.setText("\u0418\u043c\u0435 \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442:"); jpControls.add(jlDocName); jtfDocName.setPreferredSize(new java.awt.Dimension(200, 20)); jpControls.add(jtfDocName); jbSearch.setText("\u041d\u0410\u041c\u0415\u0420\u0418"); jbSearch.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbSearchActionPerformed(evt); } }); jpControls.add(jbSearch); jpMiddle.add(jpControls, java.awt.BorderLayout.SOUTH); getContentPane().add(jpMiddle, java.awt.BorderLayout.CENTER); jpBottom.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jbNew.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Symbol Add 2.png"))); jbNew.setText("\u041d\u043e\u0432"); jbNew.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbNewActionPerformed(evt); } }); jpBottom.add(jbNew); jbEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Report Edit 2.png"))); jbEdit.setText("\u0420\u0435\u0434\u0430\u043a\u0446\u0438\u044f"); jbEdit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbEditActionPerformed(evt); } }); jpBottom.add(jbEdit); jbPrint.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Printer.png"))); jbPrint.setText("\u041f\u0435\u0447\u0430\u0442"); jbPrint.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbPrintActionPerformed(evt); } }); jpBottom.add(jbPrint); jbPrintRep.setText("\u041f\u0435\u0447\u0430\u0442 \u0420\u0430\u043f\u043e\u0440\u0442"); jbPrintRep.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbPrintRepActionPerformed(evt); } }); jpBottom.add(jbPrintRep); jbAll.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Symbol Refresh 3.png"))); jbAll.setText("\u0412\u0441\u0438\u0447\u043a\u0438 \u0437\u0430\u043f\u0438\u0441\u0438"); jbAll.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbAllActionPerformed(evt); } }); jpBottom.add(jbAll); jbDel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Symbol Delete 2.png"))); jbDel.setText("\u0418\u0437\u0442\u0440\u0438\u0432\u0430\u043d\u0435"); jbDel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbDelActionPerformed(evt); } }); jpBottom.add(jbDel); jbDropData.setText("\u0418\u0437\u0442\u0440\u0438\u0432\u0430\u043d\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0430"); jbDropData.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbDropDataActionPerformed(evt); } }); jpBottom.add(jbDropData); jbClose.setText("\u0417\u0430\u0442\u0432\u043e\u0440\u0438"); jbClose.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbCloseActionPerformed(evt); } }); jpBottom.add(jbClose); getContentPane().add(jpBottom, java.awt.BorderLayout.SOUTH); pack(); }// </editor-fold>//GEN-END:initComponents | 12667 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12667/9d8283d1d2cc369e87d6d74ec367fe2a14d7f8bf/FrmDoctype.java/buggy/src/nom/FrmDoctype.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
7171,
1435,
288,
3639,
18182,
3401,
273,
394,
6863,
18,
5328,
310,
18,
46,
5537,
5621,
3639,
18182,
21924,
273,
394,
6863,
18,
5328,
310,
18,
46,
5537,
5621,
3639,
22535,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
7171,
1435,
288,
3639,
18182,
3401,
273,
394,
6863,
18,
5328,
310,
18,
46,
5537,
5621,
3639,
18182,
21924,
273,
394,
6863,
18,
5328,
310,
18,
46,
5537,
5621,
3639,
22535,... |
private static void updateAttribute(Node node, Element elem, String name) | private static void updateAttribute(Node node, Element elem, String name, char listDelimiter) | private static void updateAttribute(Node node, Element elem, String name) { if (node != null && elem != null) { List attrs = node.getAttributes(name); StringBuffer buf = new StringBuffer(); for (Iterator it = attrs.iterator(); it.hasNext();) { Node attr = (Node) it.next(); if (attr.getValue() != null) { if (buf.length() > 0) { buf.append(getDelimiter()); } buf.append(PropertyConverter.escapeDelimiters(attr .getValue().toString(), getDelimiter())); } attr.setReference(elem); } if (buf.length() < 1) { elem.removeAttribute(name); } else { elem.setAttribute(name, buf.toString()); } } } | 56523 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56523/e1265dfef806db233ead4f3ab360352761346b2a/XMLConfiguration.java/buggy/src/java/org/apache/commons/configuration/XMLConfiguration.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
760,
918,
1089,
1499,
12,
907,
756,
16,
3010,
3659,
16,
514,
508,
16,
1149,
666,
12007,
13,
3639,
288,
5411,
309,
261,
2159,
480,
446,
597,
3659,
480,
446,
13,
5411,
288,
7734,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
760,
918,
1089,
1499,
12,
907,
756,
16,
3010,
3659,
16,
514,
508,
16,
1149,
666,
12007,
13,
3639,
288,
5411,
309,
261,
2159,
480,
446,
597,
3659,
480,
446,
13,
5411,
288,
7734,
... |
fOut.println('>'); | fOut.print('>'); | public void write(Node node) { // is there anything to do? if (node == null) { return; } short type = node.getNodeType(); switch (type) { case Node.DOCUMENT_NODE: { Document document = (Document)node; if (!fCanonical) { fOut.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); fOut.flush(); write(document.getDoctype()); } write(document.getDocumentElement()); break; } case Node.DOCUMENT_TYPE_NODE: { DocumentType doctype = (DocumentType)node; fOut.print("<!DOCTYPE "); fOut.print(doctype.getName()); String publicId = doctype.getPublicId(); String systemId = doctype.getSystemId(); if (publicId != null) { fOut.print(" PUBLIC '"); fOut.print(publicId); fOut.print("' '"); fOut.print(systemId); fOut.print('\''); } else { fOut.print(" SYSTEM '"); fOut.print(systemId); fOut.print('\''); } String internalSubset = doctype.getInternalSubset(); if (internalSubset != null) { fOut.println(" ["); fOut.print(internalSubset); fOut.print(']'); } fOut.println('>'); break; } case Node.ELEMENT_NODE: { fOut.print('<'); fOut.print(node.getNodeName()); Attr attrs[] = sortAttributes(node.getAttributes()); for (int i = 0; i < attrs.length; i++) { Attr attr = attrs[i]; fOut.print(' '); fOut.print(attr.getNodeName()); fOut.print("=\""); normalizeAndPrint(attr.getNodeValue()); fOut.print('"'); } fOut.println('>'); fOut.flush(); Node child = node.getFirstChild(); while (child != null) { write(child); child = child.getNextSibling(); } break; } case Node.ENTITY_REFERENCE_NODE: { if (fCanonical) { Node child = node.getFirstChild(); while (child != null) { write(child); child = child.getNextSibling(); } } else { fOut.print('&'); fOut.print(node.getNodeName()); fOut.print(';'); fOut.flush(); } break; } case Node.CDATA_SECTION_NODE: { if (fCanonical) { normalizeAndPrint(node.getNodeValue()); } else { fOut.print("<![CDATA["); fOut.print(node.getNodeValue()); fOut.print("]]>"); } fOut.flush(); break; } case Node.TEXT_NODE: { normalizeAndPrint(node.getNodeValue()); fOut.flush(); break; } case Node.PROCESSING_INSTRUCTION_NODE: { fOut.print("<?"); fOut.print(node.getNodeName()); String data = node.getNodeValue(); if (data != null && data.length() > 0) { fOut.print(' '); fOut.print(data); } fOut.println("?>"); fOut.flush(); break; } } if (type == Node.ELEMENT_NODE) { fOut.print("</"); fOut.print(node.getNodeName()); fOut.print('>'); fOut.flush(); } } // write(Node) | 52623 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52623/998dd90a656d2856e4d50a06b5bd43705e2f0ab5/Writer.java/clean/src/edu/sc/seis/fissuresUtil/xml/Writer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1045,
12,
907,
756,
13,
288,
3639,
368,
353,
1915,
6967,
358,
741,
35,
3639,
309,
261,
2159,
422,
446,
13,
288,
5411,
327,
31,
3639,
289,
3639,
3025,
618,
273,
756,
18,
588... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1045,
12,
907,
756,
13,
288,
3639,
368,
353,
1915,
6967,
358,
741,
35,
3639,
309,
261,
2159,
422,
446,
13,
288,
5411,
327,
31,
3639,
289,
3639,
3025,
618,
273,
756,
18,
588... |
while (elementToCheck != null) { | while (true) { | public void visitReferenceExpression(PsiReferenceExpression expression) { super.visitReferenceExpression(expression); boolean isLockedOnInstance = false; boolean isLockedOnClass = false; final PsiMethod containingMethod = PsiTreeUtil.getParentOfType(expression, PsiMethod.class); if (containingMethod != null) { if (containingMethod.hasModifierProperty(PsiModifier.SYNCHRONIZED)) { if (containingMethod.hasModifierProperty(PsiModifier.STATIC)) { isLockedOnClass = true; } else { isLockedOnInstance = true; } } } PsiElement elementToCheck = expression; while (elementToCheck != null) { final PsiSynchronizedStatement syncStatement = PsiTreeUtil.getParentOfType(elementToCheck, PsiSynchronizedStatement.class); if (syncStatement != null) { final PsiExpression lockExpression = syncStatement.getLockExpression(); if (lockExpression instanceof PsiReferenceExpression) { final PsiReferenceExpression reference = (PsiReferenceExpression) lockExpression; final PsiElement referent = reference.resolve(); if (referent instanceof PsiField) { final PsiField referentField = (PsiField) referent; if (referentField.hasModifierProperty(PsiModifier.STATIC)) { isLockedOnClass = true; } else { isLockedOnInstance = true; } } } else if (lockExpression instanceof PsiThisExpression) { isLockedOnInstance = true; } else if (lockExpression instanceof PsiClassObjectAccessExpression) { isLockedOnClass = true; } } elementToCheck = syncStatement; } if (isLockedOnInstance && !isLockedOnClass) { final PsiElement referent = expression.resolve(); if (referent instanceof PsiField) { final PsiField referredField = (PsiField) referent; if (referredField.hasModifierProperty(PsiModifier.STATIC) && !isConstant(referredField)) { registerError(expression); } } } } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/2f5f667fbf5d68204e8e4a012b5d91dd367d29b0/AccessToStaticFieldLockedOnInstanceInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/threading/AccessToStaticFieldLockedOnInstanceInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
2404,
2300,
12,
52,
7722,
2404,
2300,
2652,
13,
288,
5411,
2240,
18,
11658,
2404,
2300,
12,
8692,
1769,
5411,
1250,
31753,
1398,
1442,
273,
629,
31,
5411,
1250,
31753,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
2404,
2300,
12,
52,
7722,
2404,
2300,
2652,
13,
288,
5411,
2240,
18,
11658,
2404,
2300,
12,
8692,
1769,
5411,
1250,
31753,
1398,
1442,
273,
629,
31,
5411,
1250,
31753,
13... |
public boolean isStringPainted() { return false; } | public boolean isStringPainted() { return paintString; } | public boolean isStringPainted() { return false; // TODO } // isStringPainted() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0788b89b7368770a1157f825d60dd8c5a9df183e/JProgressBar.java/buggy/core/src/classpath/javax/javax/swing/JProgressBar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
9962,
12699,
329,
1435,
288,
202,
202,
2463,
629,
31,
368,
2660,
202,
97,
368,
9962,
12699,
329,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
9962,
12699,
329,
1435,
288,
202,
202,
2463,
629,
31,
368,
2660,
202,
97,
368,
9962,
12699,
329,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Statement appendOrderBy() | Statement appendOrderBy() | Statement appendOrderBy() { if(firstOrderBy) { text.append(" order by "); firstOrderBy = false; } else text.append(','); return this; } | 50290 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50290/2e7fb80eedd7cf9c05a48823e437d2501959d106/Statement.java/buggy/runtime/src/com/exedio/cope/Statement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
3406,
714,
15658,
1435,
202,
95,
202,
202,
430,
12,
3645,
15658,
13,
202,
202,
95,
1082,
202,
955,
18,
6923,
2932,
1353,
635,
315,
1769,
1082,
202,
3645,
15658,
273,
629,
31,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
3406,
714,
15658,
1435,
202,
95,
202,
202,
430,
12,
3645,
15658,
13,
202,
202,
95,
1082,
202,
955,
18,
6923,
2932,
1353,
635,
315,
1769,
1082,
202,
3645,
15658,
273,
629,
31,
202,
... |
} while (fEntityScanner.scanData("?>", data)); fStringBuffer.append(data); | } while (fEntityScanner.scanData("?>", fStringBuffer)); | protected void scanPIData(String target, XMLString data) throws IOException, XNIException { // check target if (target.length() == 3) { char c0 = Character.toLowerCase(target.charAt(0)); char c1 = Character.toLowerCase(target.charAt(1)); char c2 = Character.toLowerCase(target.charAt(2)); if (c0 == 'x' && c1 == 'm' && c2 == 'l') { reportFatalError("ReservedPITarget", null); } } // spaces if (!fEntityScanner.skipSpaces()) { if (fEntityScanner.skipString("?>")) { // we found the end, there is no data data.clear(); return; } else { // if there is data there should be some space reportFatalError("SpaceRequiredInPI", null); } } // data if (fEntityScanner.scanData("?>", data)) { fStringBuffer.clear(); do { fStringBuffer.append(data); int c = fEntityScanner.peekChar(); if (c != -1) { if (XMLChar.isHighSurrogate(c)) { scanSurrogates(fStringBuffer); } else if (XMLChar.isInvalid(c)) { reportFatalError("InvalidCharInPI", new Object[]{Integer.toHexString(c)}); fEntityScanner.scanChar(); } } } while (fEntityScanner.scanData("?>", data)); fStringBuffer.append(data); data.setValues(fStringBuffer); } } // scanPIData(String,XMLString) | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/8a5148bc882d9ced0c8afb378808498e928b1b56/XMLScanner.java/buggy/src/org/apache/xerces/impl/XMLScanner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4135,
16522,
396,
12,
780,
1018,
16,
3167,
780,
501,
13,
540,
1216,
1860,
16,
1139,
50,
45,
503,
288,
3639,
368,
866,
1018,
3639,
309,
261,
3299,
18,
2469,
1435,
422,
890,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4135,
16522,
396,
12,
780,
1018,
16,
3167,
780,
501,
13,
540,
1216,
1860,
16,
1139,
50,
45,
503,
288,
3639,
368,
866,
1018,
3639,
309,
261,
3299,
18,
2469,
1435,
422,
890,
... |
public FifoQueueClosedException(String why) | public FifoQueueClosedException() | public FifoQueueClosedException(String why) { super(why); } | 25465 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25465/b3612967cb053036bdb295ee74cb2e369c6ca18d/FifoQueueClosedException.java/buggy/src/core/org/opennms/core/queue/FifoQueueClosedException.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
478,
20299,
3183,
7395,
503,
12,
780,
11598,
13,
202,
95,
202,
202,
9565,
12,
3350,
93,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
478,
20299,
3183,
7395,
503,
12,
780,
11598,
13,
202,
95,
202,
202,
9565,
12,
3350,
93,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
public static Query makeQuery(PathQuery pathQuery, Map savedBags, Map pathToQueryNode) { pathQuery = (PathQuery) pathQuery.clone(); Map qNodes = pathQuery.getNodes(); List view = pathQuery.getView(); Model model = pathQuery.getModel(); Map codeToCS = new HashMap(); ConstraintSet rootcs = null; ConstraintSet andcs = new ConstraintSet(ConstraintOp.AND); if (pathQuery.getAllConstraints().size() == 1) { Constraint c = (Constraint) pathQuery.getAllConstraints().get(0); codeToCS.put(c.getCode(), andcs); } else if (pathQuery.getAllConstraints().size() > 1) { rootcs = makeConstraintSets(pathQuery.getLogic(), codeToCS); } for (Iterator i = view.iterator(); i.hasNext();) { String path = (String) i.next(); if (!qNodes.containsKey(path)) { pathQuery.addNode(path); } } Query q = new Query(); q.setConstraint(andcs); if (rootcs != null) { andcs.addConstraint(rootcs); } Map queryBits = new HashMap(); for (Iterator i = pathQuery.getNodes().values().iterator(); i.hasNext();) { PathNode node = (PathNode) i.next(); String path = node.getPath(); QueryReference qr = null; if (path.indexOf(".") == -1) { QueryClass qc = new QueryClass(getClass(node.getType(), model)); q.addFrom(qc); queryBits.put(path, qc); } else { String fieldName = node.getFieldName(); QueryClass parentQc = (QueryClass) queryBits.get(node.getPrefix()); if (node.isAttribute()) { QueryField qf = new QueryField(parentQc, fieldName); queryBits.put(path, qf); } else { if (node.isReference()) { qr = new QueryObjectReference(parentQc, fieldName); } else { qr = new QueryCollectionReference(parentQc, fieldName); } QueryClass qc = new QueryClass(getClass(node.getType(), model)); andcs.addConstraint(new ContainsConstraint(qr, ConstraintOp.CONTAINS, qc)); q.addFrom(qc); queryBits.put(path, qc); } } QueryNode qn = (QueryNode) queryBits.get(path); for (Iterator j = node.getConstraints().iterator(); j.hasNext();) { Constraint c = (Constraint) j.next(); String code = c.getCode(); ConstraintSet cs = (ConstraintSet) codeToCS.get(code); if (BagConstraint.VALID_OPS.contains(c.getOp())) { InterMineBag bag; if (c.getValue() instanceof InterMineBag) { bag = (InterMineBag) c.getValue(); } else { bag = (InterMineBag) savedBags.get(c.getValue()); } QueryField qf = new QueryField((QueryClass) qn, "id"); cs.addConstraint(new BagConstraint(qf, c.getOp(), bag.getListOfIds())); } else if (node.isAttribute()) { if (c.getOp() == ConstraintOp.IS_NOT_NULL || c.getOp() == ConstraintOp.IS_NULL) { cs.addConstraint(new SimpleConstraint((QueryEvaluable) qn, c.getOp())); } else { if (qn.getType().equals(String.class)) { QueryFunction qf = new QueryFunction((QueryField) qn, QueryFunction.LOWER); String lowerCaseValue = ((String) c.getValue()).toLowerCase(); cs.addConstraint(new SimpleConstraint(qf, c.getOp(), new QueryValue(lowerCaseValue))); } else { cs.addConstraint(new SimpleConstraint((QueryField) qn, c.getOp(), new QueryValue(c.getValue()))); } } } else if (node.isReference()) { if (c.getOp() == ConstraintOp.IS_NOT_NULL || c.getOp() == ConstraintOp.IS_NULL) { cs.addConstraint( new ContainsConstraint((QueryObjectReference) qr, c.getOp())); } } } } for (Iterator i = pathQuery.getNodes().values().iterator(); i.hasNext();) { PathNode node = (PathNode) i.next(); String path = node.getPath(); QueryNode qn = (QueryNode) queryBits.get(path); for (Iterator j = node.getConstraints().iterator(); j.hasNext();) { Constraint c = (Constraint) j.next(); ConstraintSet cs = (ConstraintSet) codeToCS.get(c.getCode()); if (node.isReference() && c.getOp() != ConstraintOp.IS_NOT_NULL && c.getOp() != ConstraintOp.IS_NULL && !BagConstraint.VALID_OPS.contains(c.getOp())) { QueryClass refQc = (QueryClass) queryBits.get(c.getValue()); cs.addConstraint(new ClassConstraint((QueryClass) qn, c.getOp(), refQc)); } } } if (andcs.getConstraints().isEmpty()) { q.setConstraint(null); } else if (andcs.getConstraints().size() == 1) { q.setConstraint((org.intermine.objectstore.query.Constraint) (andcs.getConstraints().iterator().next())); } for (Iterator i = view.iterator(); i.hasNext();) { PathNode pn = (PathNode) pathQuery.getNodes().get(i.next()); QueryNode qn = null; if (pn.isAttribute()) { qn = ((QueryNode) queryBits.get(pn.getPrefix())); } else { qn = ((QueryNode) queryBits.get(pn.getPath())); } if (!q.getSelect().contains(qn)) { q.addToSelect(qn); } } if (pathToQueryNode != null) { pathToQueryNode.putAll(queryBits); } return q; | public static Query makeQuery(PathQuery query, Map savedBags) { return makeQuery(query, savedBags, null); | public static Query makeQuery(PathQuery pathQuery, Map savedBags, Map pathToQueryNode) { pathQuery = (PathQuery) pathQuery.clone(); Map qNodes = pathQuery.getNodes(); List view = pathQuery.getView(); Model model = pathQuery.getModel(); Map codeToCS = new HashMap(); ConstraintSet rootcs = null; ConstraintSet andcs = new ConstraintSet(ConstraintOp.AND); if (pathQuery.getAllConstraints().size() == 1) { Constraint c = (Constraint) pathQuery.getAllConstraints().get(0); codeToCS.put(c.getCode(), andcs); } else if (pathQuery.getAllConstraints().size() > 1) { rootcs = makeConstraintSets(pathQuery.getLogic(), codeToCS); } //first merge the query and the view for (Iterator i = view.iterator(); i.hasNext();) { String path = (String) i.next(); if (!qNodes.containsKey(path)) { pathQuery.addNode(path); } } //create the real query Query q = new Query(); q.setConstraint(andcs); if (rootcs != null) { andcs.addConstraint(rootcs); } Map queryBits = new HashMap(); //build the FROM and WHERE clauses for (Iterator i = pathQuery.getNodes().values().iterator(); i.hasNext();) { PathNode node = (PathNode) i.next(); String path = node.getPath(); QueryReference qr = null; if (path.indexOf(".") == -1) { QueryClass qc = new QueryClass(getClass(node.getType(), model)); q.addFrom(qc); queryBits.put(path, qc); } else { String fieldName = node.getFieldName(); QueryClass parentQc = (QueryClass) queryBits.get(node.getPrefix()); if (node.isAttribute()) { QueryField qf = new QueryField(parentQc, fieldName); queryBits.put(path, qf); } else { if (node.isReference()) { qr = new QueryObjectReference(parentQc, fieldName); } else { qr = new QueryCollectionReference(parentQc, fieldName); } QueryClass qc = new QueryClass(getClass(node.getType(), model)); andcs.addConstraint(new ContainsConstraint(qr, ConstraintOp.CONTAINS, qc)); q.addFrom(qc); queryBits.put(path, qc); } } QueryNode qn = (QueryNode) queryBits.get(path); for (Iterator j = node.getConstraints().iterator(); j.hasNext();) { Constraint c = (Constraint) j.next(); String code = c.getCode(); ConstraintSet cs = (ConstraintSet) codeToCS.get(code); if (BagConstraint.VALID_OPS.contains(c.getOp())) { InterMineBag bag; if (c.getValue() instanceof InterMineBag) { bag = (InterMineBag) c.getValue(); } else { bag = (InterMineBag) savedBags.get(c.getValue()); } QueryField qf = new QueryField((QueryClass) qn, "id"); cs.addConstraint(new BagConstraint(qf, c.getOp(), bag.getListOfIds())); } else if (node.isAttribute()) { //assume, for now, that it's a SimpleConstraint if (c.getOp() == ConstraintOp.IS_NOT_NULL || c.getOp() == ConstraintOp.IS_NULL) { cs.addConstraint(new SimpleConstraint((QueryEvaluable) qn, c.getOp())); } else { if (qn.getType().equals(String.class)) { // do a case-insensitive search QueryFunction qf = new QueryFunction((QueryField) qn, QueryFunction.LOWER); String lowerCaseValue = ((String) c.getValue()).toLowerCase(); cs.addConstraint(new SimpleConstraint(qf, c.getOp(), new QueryValue(lowerCaseValue))); } else { cs.addConstraint(new SimpleConstraint((QueryField) qn, c.getOp(), new QueryValue(c.getValue()))); } } } else if (node.isReference()) { if (c.getOp() == ConstraintOp.IS_NOT_NULL || c.getOp() == ConstraintOp.IS_NULL) { cs.addConstraint( new ContainsConstraint((QueryObjectReference) qr, c.getOp())); } } } } // Now process loop constraints. The constraint parameter refers backwards and // forwards in the query so we can't process these in the above loop. for (Iterator i = pathQuery.getNodes().values().iterator(); i.hasNext();) { PathNode node = (PathNode) i.next(); String path = node.getPath(); QueryNode qn = (QueryNode) queryBits.get(path); for (Iterator j = node.getConstraints().iterator(); j.hasNext();) { Constraint c = (Constraint) j.next(); ConstraintSet cs = (ConstraintSet) codeToCS.get(c.getCode()); if (node.isReference() && c.getOp() != ConstraintOp.IS_NOT_NULL && c.getOp() != ConstraintOp.IS_NULL && !BagConstraint.VALID_OPS.contains(c.getOp())) { QueryClass refQc = (QueryClass) queryBits.get(c.getValue()); cs.addConstraint(new ClassConstraint((QueryClass) qn, c.getOp(), refQc)); } } } if (andcs.getConstraints().isEmpty()) { q.setConstraint(null); } else if (andcs.getConstraints().size() == 1) { q.setConstraint((org.intermine.objectstore.query.Constraint) (andcs.getConstraints().iterator().next())); } //build the SELECT list for (Iterator i = view.iterator(); i.hasNext();) { PathNode pn = (PathNode) pathQuery.getNodes().get(i.next()); QueryNode qn = null; if (pn.isAttribute()) { qn = ((QueryNode) queryBits.get(pn.getPrefix())); } else { qn = ((QueryNode) queryBits.get(pn.getPath())); } if (!q.getSelect().contains(qn)) { q.addToSelect(qn); } } //caller might want path to query node map (e.g. PrecomputeTask) if (pathToQueryNode != null) { pathToQueryNode.putAll(queryBits); } return q; } | 29158 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/29158/99cc228345675d8e335a953ccd8ef047da1ca7f0/MainHelper.java/buggy/intermine/web/main/src/org/intermine/web/MainHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
2770,
1221,
1138,
12,
743,
1138,
589,
1138,
16,
1635,
5198,
38,
1341,
16,
1635,
12221,
1138,
907,
13,
288,
3639,
589,
1138,
273,
261,
743,
1138,
13,
589,
1138,
18,
14056,
562... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
2770,
1221,
1138,
12,
743,
1138,
589,
1138,
16,
1635,
5198,
38,
1341,
16,
1635,
12221,
1138,
907,
13,
288,
3639,
589,
1138,
273,
261,
743,
1138,
13,
589,
1138,
18,
14056,
562... |
StartDoc.incrementSessionCounter(imcserver,user,req) ; | StartDoc.incrementSessionCounter(imcref,user,req) ; | public void doPost( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException { String host = req.getHeader("Host") ; String imcserver = Utility.getDomainPref("userserver",host) ; String start_url = Utility.getDomainPref( "start_url",host ) ; String servlet_url = Utility.getDomainPref( "servlet_url",host ) ; String admin_url = Utility.getDomainPref( "admin_url",host ) ; String access_denied_url = Utility.getDomainPref( "access_denied_url",host ) ; imcode.server.User user ; res.setContentType( "text/html" ); PrintWriter out = res.getWriter( ); String test = "" ; String type = ""; String version = "" ; String plattform = "" ; String scheme = req.getScheme( ); String serverName = req.getServerName( ); int p = req.getServerPort( ); String port = (p == 80 || p == 443) ? "" : ":" + p; // Get the user's name and password String name = req.getParameter( "name" ); String passwd = req.getParameter( "passwd" ); String value = req.getHeader( "User-Agent" ) ; // Check the name and password for validity user = allowUser( name, passwd, host ) ; // add browser info to user if( user == null ) { res.sendRedirect(access_denied_url) ; return ; } else { // Valid login. Make a note in the session object. HttpSession session = req.getSession( true ); session.setAttribute( "logon.isDone", user ); // just a marker object session.setAttribute("browser_id",value) ; // Try redirecting the client to the page he first tried to access String target = (String) session.getAttribute("login.target"); if (target != null) { session.removeAttribute("login.target") ; res.sendRedirect(target); return ; } //return; StartDoc.incrementSessionCounter(imcserver,user,req) ; user.setLoginType("verify") ; // Couldn't redirect to the target. Redirect to the site's home page. res.sendRedirect( scheme + "://" + serverName + port + servlet_url + "StartDoc" ); } } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/5809d66a25d58d7ffad1cd1d9aa41c714fbcef76/VerifyUser.java/buggy/servlets/VerifyUser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
3349,
12,
9984,
1111,
16,
12446,
400,
262,
1216,
16517,
16,
1860,
288,
202,
780,
1479,
4697,
202,
33,
1111,
18,
588,
1864,
2932,
2594,
7923,
274,
202,
780,
709,
71,
3567... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
3349,
12,
9984,
1111,
16,
12446,
400,
262,
1216,
16517,
16,
1860,
288,
202,
780,
1479,
4697,
202,
33,
1111,
18,
588,
1864,
2932,
2594,
7923,
274,
202,
780,
709,
71,
3567... |
System.out.println ("viewBox: offsets="+ xOffset+" (x="+x+") "+ yOffset+" (y="+y+") scale="+ sx+" "+ sy+" w="+w+" h="+h ); | public void renderSVGArea(SVGArea area) { // Buggy: Will align to the beginning of the last text //int x = this.currentXPosition; // Buggy: Will always left align int x = this.currentAreaContainerXPosition; // Buggy: Method getXOffset() not found in class org.apache.fop.dom.svg.SVGArea //int x = this.currentAreaContainerXPosition + area.getXOffset(); int y = this.currentYPosition; SVGSVGElement svg = area.getSVGDocument().getRootElement(); int w = (int)(svg.getWidth().getBaseVal().getValue() * 1000); int h = (int)(svg.getHeight().getBaseVal().getValue() * 1000); float sx = 1, sy = -1; int xOffset = x, yOffset = y; // translate and scale according to viewbox. if (svg.getViewBox () != null) { SVGRect view = svg.getViewBox().getBaseVal(); /* System.out.println ("viewbox=\""+ view.getX()+" "+ view.getY()+" "+ view.getWidth()+" "+ view.getHeight()+"\""); */ // TODO take aspect constraints (attribute preserveAspectRatio) // into account. // Viewbox coordinates are all relative to the viewport // (ie. the x,y,w and h values calculated above). sx = svg.getWidth().getBaseVal().getValue() / view.getWidth (); sy = svg.getHeight().getBaseVal().getValue() / view.getHeight (); // move the origin xOffset -= (int)(sx * view.getX () * 1000f); yOffset -= (int)(sy * view.getY () * 1000f); sy = -sy; } System.out.println ("viewBox: offsets="+ xOffset+" (x="+x+") "+ yOffset+" (y="+y+") scale="+ sx+" "+ sy+" w="+w+" h="+h ); /* * Clip to the svg area. * Note: To have the svg overlay (under) a text area then use * an fo:block-container */ currentStream.add("q\n"); if (w != 0 && h != 0) { currentStream.add(x / 1000f + " " + y / 1000f + " m\n"); currentStream.add((x + w) / 1000f + " " + y / 1000f + " l\n"); currentStream.add((x + w) / 1000f + " " + (y - h) / 1000f + " l\n"); currentStream.add(x / 1000f + " " + (y - h) / 1000f + " l\n"); currentStream.add("h\n"); currentStream.add("W\n"); currentStream.add("n\n"); } // transform so that the coordinates (0,0) is from the top left // and positive is down and to the right. (0,0) is where the // viewBox puts it. currentStream.add(sx + " 0 0 " + sy + " " + xOffset / 1000f + " " + yOffset / 1000f + " cm\n"); SVGRenderer svgRenderer = new SVGRenderer(area.getFontState(), pdfDoc, currentFontName, currentFontSize, currentXPosition, currentYPosition); svgRenderer.renderSVG(svg, 0, 0); currentStream.add(svgRenderer.getString()); currentStream.add("Q\n"); } | 5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/81fccb5137b48f0fef4f8331b18bca07581f9631/PDFRenderer.java/clean/src/org/apache/fop/render/pdf/PDFRenderer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1743,
26531,
5484,
12,
26531,
5484,
5091,
13,
288,
202,
759,
605,
5696,
93,
30,
9980,
5689,
358,
326,
8435,
434,
326,
1142,
977,
3639,
368,
474,
619,
273,
333,
18,
2972,
60,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1743,
26531,
5484,
12,
26531,
5484,
5091,
13,
288,
202,
759,
605,
5696,
93,
30,
9980,
5689,
358,
326,
8435,
434,
326,
1142,
977,
3639,
368,
474,
619,
273,
333,
18,
2972,
60,
... | |
continue; | continue; } | private List initLocalesList() { if ( locales == null ) { return Collections.EMPTY_LIST; } String[] localesArray = StringUtils.split( locales, "," ); List localesList = new ArrayList(); for ( int i = 0; i < localesArray.length; i++ ) { Locale locale = codeToLocale( localesArray[i] ); if ( locale != null ) { if ( !Arrays.asList( Locale.getAvailableLocales() ).contains( locale ) ) { getLog().warn( "The locale parsed defined by '" + locale + "' is not available in this Java Virtual Machine (" + System.getProperty( "java.version" ) + " from " + System.getProperty( "java.vendor" ) + ") - IGNORING" ); continue; } if ( !i18n.getBundle( "site-plugin", locale ).getLocale().getLanguage().equals( locale.getLanguage() ) ) { StringBuffer sb = new StringBuffer(); sb.append( "The locale '" ).append( locale ).append( "' (" ); sb.append( locale.getDisplayName( Locale.ENGLISH ) ); sb.append( ") is not currently support by Maven - IGNORING. " ); sb.append( "\n" ); sb.append( "Contribution are welcome and greatly appreciated! " ); sb.append( "\n" ); sb.append( "If you want to contribute a new translation, please visit " ); sb.append( "http://maven.apache.org/maven2/plugins/maven-site-plugin/i18n.html " ); sb.append( "for detailed instructions." ); getLog().warn( sb.toString() ); continue; } localesList.add( locale ); } } return localesList; } | 50542 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50542/994773a02444cd908cefbf630ce0ebf3d76050bf/SiteMojo.java/buggy/maven-plugins/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
987,
1208,
13310,
682,
1435,
565,
288,
3639,
309,
261,
6922,
422,
446,
262,
3639,
288,
5411,
327,
5737,
18,
13625,
67,
7085,
31,
3639,
289,
3639,
514,
8526,
6922,
1076,
273,
5778,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
987,
1208,
13310,
682,
1435,
565,
288,
3639,
309,
261,
6922,
422,
446,
262,
3639,
288,
5411,
327,
5737,
18,
13625,
67,
7085,
31,
3639,
289,
3639,
514,
8526,
6922,
1076,
273,
5778,
... |
ShowMessageDelegate.showMessageDialog("Somehow, no " + getSingularTabName() + " was selected. Try again.", Constants.s_APPNAME, MessageType.ERROR); | ShowMessageDelegate.showMessageDialog("Somehow, no " + getSingularTabName() + " was selected. Try again.", Constants.s_APPNAME, MessageType.ERROR); | public void valueChanged(ListSelectionEvent e) { if (!e.getValueIsAdjusting()) { //final String aString = //availableTable.getTree().getLastSelectedPathComponent().toString(); ///////////////////////// // Byngl Feb 20/2002 // fix bug with displaying incorrect info when use cursor keys to // navigate the tree // //Object temp = // availableTable.getTree().getLastSelectedPathComponent(); final int idx = getEventSelectedIndex(e); if (idx < 0) { return; } Object temp = availableTable.getTree().getPathForRow(idx).getLastPathComponent(); ///////////////////////// if (temp == null) { ShowMessageDelegate.showMessageDialog("Somehow, no " + getSingularTabName() + " was selected. Try again.", Constants.s_APPNAME, MessageType.ERROR); return; } Ability aFeat = null; if (temp instanceof PObjectNode) { temp = ((PObjectNode) temp).getItem(); if (temp instanceof Ability) { aFeat = (Ability) temp; } } if (SettingsHandler.isExpertGUI()) { setAddEnabled((aFeat != null) && (checkFeatQualify(aFeat) == FEAT_OK)); } else { setAddEnabled(aFeat != null); } if (aFeat != null) { StringBuffer bString = new StringBuffer().append("<html><b>").append(aFeat.piSubString()) .append("</b> TYPE:").append(aFeat.getTypeUsingFlag(true)); if (!aFeat.getCostString().equals("1")) { bString.append(" <b>Cost:</b>").append(aFeat.getCostString()); } if (aFeat.isMultiples()) { bString.append(" Can be taken more than once"); } if (aFeat.isStacks()) { bString.append(" Stacks"); } final String cString = aFeat.preReqHTMLStrings(pc, false); if (cString.length() > 0) { bString.append(" <b>Requirements</b>:").append(cString); } bString.append(" <b>Description</b>:").append(aFeat.piDescSubString()) .append(" <b>Source</b>:").append(aFeat.getSource()).append("</html>"); infoLabel.setText(bString.toString()); } } } | 48301 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48301/bd24710b283941edab61322190d08d005ab106d9/InfoFeats.java/clean/code/src/java/pcgen/gui/tabs/InfoFeats.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
918,
460,
5033,
12,
682,
6233,
1133,
425,
13,
9506,
202,
95,
6862,
202,
430,
16051,
73,
18,
24805,
2520,
10952,
310,
10756,
6862,
202,
95,
25083,
202,
759,
6385,
514,
279,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
918,
460,
5033,
12,
682,
6233,
1133,
425,
13,
9506,
202,
95,
6862,
202,
430,
16051,
73,
18,
24805,
2520,
10952,
310,
10756,
6862,
202,
95,
25083,
202,
759,
6385,
514,
279,
78... |
planTableViewer.setSorter(new CompletedTasksSorter(PlannedTasksSorter.REMINDER)); | planTableViewer.setSorter(new TaskSorter(PlannedTasksSorter.REMINDER)); | private void createPlanTable(Composite parent, FormToolkit toolkit) { int style = SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.HIDE_SELECTION; planTable = toolkit.createTable(parent, style ); TableLayout tlayout = new TableLayout(); planTable.setLayout(tlayout); TableWrapData wd = new TableWrapData(TableWrapData.FILL_GRAB); wd.heightHint = 300; wd.grabVertical = true; planTable.setLayoutData(wd); planTable.setLinesVisible(true); planTable.setHeaderVisible(true); planTable.setEnabled(true); TableColumn column = new TableColumn(planTable, SWT.LEFT, 0); column.setText(planColumnNames[0]); column.setWidth(30); column = new TableColumn(planTable, SWT.LEFT, 1); column.setText(planColumnNames[1]); column.setWidth(300); column.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { planTableViewer.setSorter(new CompletedTasksSorter(PlannedTasksSorter.DESCRIPTION)); } }); column = new TableColumn(planTable, SWT.LEFT, 2); column.setText(planColumnNames[2]); column.setWidth(50); column.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { planTableViewer.setSorter(new CompletedTasksSorter(PlannedTasksSorter.PRIORITY)); } }); column = new TableColumn(planTable, SWT.LEFT, 3); column.setText(planColumnNames[3]); column.setWidth(170); column.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { planTableViewer.setSorter(new CompletedTasksSorter(PlannedTasksSorter.ESTIMATE)); } }); column = new TableColumn(planTable, SWT.LEFT, 4); column.setText(planColumnNames[4]); column.setWidth(170); column.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { planTableViewer.setSorter(new CompletedTasksSorter(PlannedTasksSorter.REMINDER)); } }); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/d5a59ff561c48c2b41358d15d59d99beb2ec8ba5/MylarTaskPlannerEditorPart.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/planner/ui/MylarTaskPlannerEditorPart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
5365,
1388,
12,
9400,
982,
16,
2748,
6364,
8691,
5226,
8691,
13,
288,
202,
202,
474,
2154,
273,
348,
8588,
18,
20184,
571,
348,
8588,
18,
38,
7954,
571,
348,
8588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
5365,
1388,
12,
9400,
982,
16,
2748,
6364,
8691,
5226,
8691,
13,
288,
202,
202,
474,
2154,
273,
348,
8588,
18,
20184,
571,
348,
8588,
18,
38,
7954,
571,
348,
8588,
... |
{ if (!attributes) { attributes = true; if (namespaces) prefixStack.pushContext (); } if (namespaces) { int index; if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) { declarePrefix ("", value); if (!xmlNames) return; } else if ((index = qname.indexOf (':')) == 5 && qname.startsWith ("xmlns")) { String prefix = qname.substring (6); if (prefix.equals("")) fatal ("missing prefix in namespace declaration attribute"); if (value.length () == 0) { verror ("missing URI in namespace declaration attribute: " + qname); } else declarePrefix (prefix, value); if (!xmlNames) return; } } else { if ("xmlns".equals(qname)) { declarePrefix ("", value); if (!xmlNames) return; } else if ((index = qname.indexOf (':')) == 5 && qname.startsWith ("xmlns")) { String prefix = qname.substring (6); if (value.length () == 0) { verror ("missing URI in namespace decl attribute: " + qname); } else declarePrefix (prefix, value); if (!xmlNames) return; } | { if (!attributes) { attributes = true; if (namespaces) { prefixStack.pushContext(); } | void attribute (String qname, String value, boolean isSpecified) throws SAXException { if (!attributes) { attributes = true; if (namespaces) prefixStack.pushContext (); } // process namespace decls immediately; // then maybe forget this as an attribute if (namespaces) { int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) { declarePrefix ("", value); if (!xmlNames) return; } // NS prefix declaration? else if ((index = qname.indexOf (':')) == 5 && qname.startsWith ("xmlns")) { String prefix = qname.substring (6); if (prefix.equals("")) fatal ("missing prefix in namespace declaration attribute"); if (value.length () == 0) { verror ("missing URI in namespace declaration attribute: " + qname); } else declarePrefix (prefix, value); if (!xmlNames) return; } } else { if ("xmlns".equals(qname)) { declarePrefix ("", value); if (!xmlNames) return; } // NS prefix declaration? else if ((index = qname.indexOf (':')) == 5 && qname.startsWith ("xmlns")) { String prefix = qname.substring (6); if (value.length () == 0) { verror ("missing URI in namespace decl attribute: " + qname); } else declarePrefix (prefix, value); if (!xmlNames) return; } } } // remember this attribute ... attributeCount++; // attribute type comes from querying parser's DTD records attributesList.add(new Attribute(qname, value, isSpecified)); } | 1739 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1739/7fb7568e63c3fe14af521de4699cb37898923ca7/SAXDriver.java/buggy/libjava/gnu/xml/aelfred2/SAXDriver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1566,
261,
780,
12621,
16,
514,
460,
16,
1250,
353,
17068,
13,
565,
1216,
14366,
565,
288,
202,
430,
16051,
4350,
13,
288,
202,
565,
1677,
273,
638,
31,
202,
565,
309,
261,
16078,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1566,
261,
780,
12621,
16,
514,
460,
16,
1250,
353,
17068,
13,
565,
1216,
14366,
565,
288,
202,
430,
16051,
4350,
13,
288,
202,
565,
1677,
273,
638,
31,
202,
565,
309,
261,
16078,
... |
{ Name name = new LdapDN( "" ); Name name50 = new LdapDN(); assertEquals( name50, name ); | { Name name = new LdapDN( "" ); Name name50 = new LdapDN(); assertEquals( name50, name ); | public void testLdapNameString() throws Exception { Name name = new LdapDN( "" ); Name name50 = new LdapDN(); assertEquals( name50, name ); Name name0 = new LdapDN( "ou=Marketing,ou=East" ); Name copy = new LdapDN( "ou=Marketing,ou=East" ); Name name1 = new LdapDN( "cn=John,ou=Marketing,ou=East" ); Name name2 = new LdapDN( "cn=HomeDir,cn=John,ou=Marketing,ou=East" ); Name name3 = new LdapDN( "cn=HomeDir,cn=John,ou=Marketing,ou=West" ); Name name4 = new LdapDN( "cn=Website,cn=John,ou=Marketing,ou=West" ); Name name5 = new LdapDN( "cn=Airline,cn=John,ou=Marketing,ou=West" ); assertTrue( name0.compareTo( copy ) == 0 ); assertTrue( name0.compareTo( name1 ) < 0 ); assertTrue( name0.compareTo( name2 ) < 0 ); assertTrue( name1.compareTo( name2 ) < 0 ); assertTrue( name2.compareTo( name1 ) > 0 ); assertTrue( name2.compareTo( name0 ) > 0 ); assertTrue( name2.compareTo( name3 ) < 0 ); assertTrue( name2.compareTo( name4 ) < 0 ); assertTrue( name3.compareTo( name4 ) < 0 ); assertTrue( name3.compareTo( name5 ) > 0 ); assertTrue( name4.compareTo( name5 ) > 0 ); assertTrue( name2.compareTo( name5 ) < 0 ); } | 54578 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54578/34d16a3366af953bef4b3d5f4cf0e7c6bda29ba6/LdapDNTest.java/clean/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
18437,
461,
780,
1435,
1216,
1185,
565,
288,
3639,
1770,
508,
273,
394,
18053,
8609,
12,
1408,
11272,
3639,
1770,
508,
3361,
273,
394,
18053,
8609,
5621,
3639,
1815,
8867,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
18437,
461,
780,
1435,
1216,
1185,
565,
288,
3639,
1770,
508,
273,
394,
18053,
8609,
12,
1408,
11272,
3639,
1770,
508,
3361,
273,
394,
18053,
8609,
5621,
3639,
1815,
8867,
... |
AbstractWorkbenchWidget widget = createWidget(); | AbstractWorkbenchTrimWidget widget = createWidget(); | public void fill(ToolBar parent, int index) { AbstractWorkbenchWidget widget = createWidget(); if (widget != null) { Composite widgetContainer = new Composite(parent, SWT.NONE); widget.fill(widgetContainer); Point prefSize = widget.getPreferredSize(); ToolItem sepItem = new ToolItem(parent, SWT.SEPARATOR, index); sepItem.setControl(widgetContainer); sepItem.setWidth(prefSize.x); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/f7118bacdde0037a8b2ce9ab7a0a133d473eead0/WidgetDataContributionItem.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/WidgetDataContributionItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3636,
12,
6364,
5190,
982,
16,
509,
770,
13,
288,
202,
202,
7469,
2421,
22144,
4609,
3604,
273,
752,
4609,
5621,
202,
202,
430,
261,
6587,
480,
446,
13,
288,
1082,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3636,
12,
6364,
5190,
982,
16,
509,
770,
13,
288,
202,
202,
7469,
2421,
22144,
4609,
3604,
273,
752,
4609,
5621,
202,
202,
430,
261,
6587,
480,
446,
13,
288,
1082,
202,
... |
if (! valid1[pos]) itr.remove(); | if (!valid1[pos]) itr.remove(); | void checkCompatibility(ProxySignature other) { if (method.getReturnType() != other.method.getReturnType()) throw new IllegalArgumentException("incompatible return types: " + method + ", " + other.method); // if you can think of a more efficient way than this O(n^2) search, // implement it! int size1 = exceptions.size(); int size2 = other.exceptions.size(); boolean[] valid1 = new boolean[size1]; boolean[] valid2 = new boolean[size2]; Iterator itr = exceptions.iterator(); int pos = size1; while (--pos >= 0) { Class c1 = (Class) itr.next(); Iterator itr2 = other.exceptions.iterator(); int pos2 = size2; while (--pos2 >= 0) { Class c2 = (Class) itr2.next(); if (c2.isAssignableFrom(c1)) valid1[pos] = true; if (c1.isAssignableFrom(c2)) valid2[pos2] = true; } } pos = size1; itr = exceptions.iterator(); while (--pos >= 0) { itr.next(); if (! valid1[pos]) itr.remove(); } pos = size2; itr = other.exceptions.iterator(); while (--pos >= 0) { itr.next(); if (! valid2[pos]) itr.remove(); } exceptions.addAll(other.exceptions); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/4912e36e2c7c8022f56aa40cb456494925b6065d/Proxy.java/buggy/core/src/classpath/java/java/lang/reflect/Proxy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
866,
21633,
12,
3886,
5374,
1308,
13,
565,
288,
5411,
309,
261,
2039,
18,
588,
9102,
1435,
480,
1308,
18,
2039,
18,
588,
9102,
10756,
3639,
604,
394,
2754,
2932,
267,
10943,
327,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
866,
21633,
12,
3886,
5374,
1308,
13,
565,
288,
5411,
309,
261,
2039,
18,
588,
9102,
1435,
480,
1308,
18,
2039,
18,
588,
9102,
10756,
3639,
604,
394,
2754,
2932,
267,
10943,
327,
1... |
((PartSite) getSite()).getPane().addPropertyChangeListener( new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { if (handleZoomEvents) { if (event.getProperty() .equals(PartPane.PROP_ZOOMED)) { boolean standby = !((Boolean) event .getNewValue()).booleanValue(); setStandby(standby); | IWorkbenchPartSite site = getSite(); if (site instanceof PartSite) { ((PartSite) site).getPane().addPropertyChangeListener( new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { if (handleZoomEvents) { if (event.getProperty() .equals(PartPane.PROP_ZOOMED)) { boolean standby = !((Boolean) event .getNewValue()).booleanValue(); setStandby(standby); } | private void addPaneListener() { ((PartSite) getSite()).getPane().addPropertyChangeListener( new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { if (handleZoomEvents) { if (event.getProperty() .equals(PartPane.PROP_ZOOMED)) { boolean standby = !((Boolean) event .getNewValue()).booleanValue(); setStandby(standby); } } } }); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/84c3360a0de46f10d9977426d71a0bfb78afc489/ViewIntroAdapterPart.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewIntroAdapterPart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
527,
8485,
2223,
1435,
288,
3639,
14015,
1988,
4956,
13,
11021,
1435,
2934,
588,
8485,
7675,
1289,
1396,
15744,
12,
7734,
394,
467,
1396,
15744,
1435,
288,
10792,
1071,
918,
1272... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
527,
8485,
2223,
1435,
288,
3639,
14015,
1988,
4956,
13,
11021,
1435,
2934,
588,
8485,
7675,
1289,
1396,
15744,
12,
7734,
394,
467,
1396,
15744,
1435,
288,
10792,
1071,
918,
1272... |
public static int getInitialHeapSize() { | public static Extent getInitialHeapSize() { | public static int getInitialHeapSize() { return initialHeapSize; } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/34ec1580d926e0314b5440e335f38e302d0360ab/HeapGrowthManager.java/buggy/MMTk/src/org/mmtk/utility/heap/HeapGrowthManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
6419,
319,
24044,
15648,
1225,
1435,
288,
565,
327,
2172,
15648,
1225,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
6419,
319,
24044,
15648,
1225,
1435,
288,
565,
327,
2172,
15648,
1225,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
private void readObject(ObjectInputStream stream) throws ClassNotFoundException, IOException { } | private void readObject(ObjectInputStream stream) throws ClassNotFoundException, IOException { } | private void readObject(ObjectInputStream stream) throws ClassNotFoundException, IOException { // TODO } // readObject() | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/6e198ec274652c180c4106397e50d4105dbfc529/SwingPropertyChangeSupport.java/clean/libraries/javalib/javax/swing/event/SwingPropertyChangeSupport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
17362,
12,
921,
4348,
1407,
13,
1216,
10403,
16,
1860,
288,
202,
202,
759,
2660,
202,
97,
368,
17362,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
17362,
12,
921,
4348,
1407,
13,
1216,
10403,
16,
1860,
288,
202,
202,
759,
2660,
202,
97,
368,
17362,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
" ^^^^^\n" + | " ^\n" + | public void test0243() { this.runConformTest( new String[] { "X.java", "public class X {\n" + " public X foo() {\n" + " System.out.println(\"Did NOT add bridge method\");\n" + " return this;\n" + " }\n" + " public static void main(String[] args) throws Exception {\n" + " X x = new A();\n" + " x.foo();\n" + " System.out.print(\" + \");\n" + " I i = new A();\n" + " i.foo();\n" + " }\n" + "}\n" + "interface I {\n" + " public I foo();\n" + "}\n" + "class A extends X implements I {\n" + " public A foo() {\n" + " System.out.print(\"Added bridge method\");\n" + " return this;\n" + " }\n" + "}\n" }, "Added bridge method + Added bridge method"); this.runNegativeTest( new String[] { "X.java", "public class X {\n" + " public X foo() { return this; }\n" + " public static void main(String[] args) throws Exception {\n" + " System.out.println(\"SUCCESS\");\n" + " }\n" + "}\n", "SubTypes.java", "class A extends X {\n" + " @Override public A foo() { return this; }\n" + "}\n" + "class B extends X {\n" + " @Override public X foo() { return new X(); }\n" + " @Override public B foo() { return this; }\n" + "}\n" + "class C extends A {\n" + " @Override public X foo() { return new X(); }\n" + "}\n" }, "----------\n" + "1. ERROR in SubTypes.java (at line 5)\n" + " @Override public X foo() { return new X(); }\n" + " ^^^^^\n" + "Duplicate method foo() in type B\n" + "----------\n" + "2. ERROR in SubTypes.java (at line 6)\n" + " @Override public B foo() { return this; }\n" + " ^^^^^\n" + "Duplicate method foo() in type B\n" + "----------\n" + "3. ERROR in SubTypes.java (at line 9)\n" + " @Override public X foo() { return new X(); }\n" + " ^^^^^\n" + "The return type is incompatible with A.foo()\n" + "----------\n"); } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/30a989f2410943e7f57d79a197cf0ec585ffc59e/GenericTypeTest.java/clean/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
3103,
8942,
1435,
288,
202,
202,
2211,
18,
2681,
442,
687,
4709,
12,
1082,
202,
2704,
514,
8526,
288,
9506,
202,
6,
60,
18,
6290,
3113,
9506,
202,
6,
482,
667,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
3103,
8942,
1435,
288,
202,
202,
2211,
18,
2681,
442,
687,
4709,
12,
1082,
202,
2704,
514,
8526,
288,
9506,
202,
6,
60,
18,
6290,
3113,
9506,
202,
6,
482,
667,
11... |
this.declaration.setColumn( this.getFactIndex() ); | this.declaration.setColumn( this ); | public void adjustOffset(final int adjust) { this.offset += adjust; if ( this.declaration != null ) { this.declaration.setColumn( this.getFactIndex() ); } for ( final Iterator i = this.constraints.iterator(); i.hasNext(); ) { final Object constr = i.next(); if ( constr instanceof Declaration ) { ((Declaration) constr).setColumn( this.getFactIndex() ); } } } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/86cff4d74a04222d865bf5eeac956f1056a94dab/Column.java/buggy/drools-core/src/main/java/org/drools/rule/Column.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
5765,
2335,
12,
6385,
509,
5765,
13,
288,
3639,
333,
18,
3348,
1011,
5765,
31,
3639,
309,
261,
333,
18,
22448,
480,
446,
262,
288,
5411,
333,
18,
22448,
18,
542,
1494,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
5765,
2335,
12,
6385,
509,
5765,
13,
288,
3639,
333,
18,
3348,
1011,
5765,
31,
3639,
309,
261,
333,
18,
22448,
480,
446,
262,
288,
5411,
333,
18,
22448,
18,
542,
1494,
12,
... |
table.setFont(parent.getFont()); | protected void createTable(Composite parent) { table = new Table( parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.SINGLE | SWT.FULL_SELECTION | SWT.BORDER); table.setHeaderVisible(true); table.setLinesVisible(true); SelectionListener listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { AboutInfo info = (AboutInfo)e.item.getData(); updateInfoArea(info); updateButtons(info); } }; table.addSelectionListener(listener); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/99c838072a3ffda20ae9590f02d75160deb2d0c9/AboutFeaturesDialog.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AboutFeaturesDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
2121,
18,
542,
5711,
12,
2938,
18,
588,
5711,
10663,
225,
918,
2121,
18,
542,
5711,
12,
2938,
18,
588,
5711,
10663,
225,
19565,
12,
799,
1724,
278,
429,
18,
542,
5711,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
2121,
18,
542,
5711,
12,
2938,
18,
588,
5711,
10663,
225,
918,
2121,
18,
542,
5711,
12,
2938,
18,
588,
5711,
10663,
225,
19565,
12,
799,
1724,
278,
429,
18,
542,
5711,
12,
... | |
catch (IllegalArgumentException ie) { | catch (IndexOutOfBoundsException ie) { | public void testNegativeOffset() { char[] buffer = new char[100]; toNextTokenOfType(m_xc, TokenType.START); try { m_xc.setTextValue(buffer, -1, 98); fail("Offset < 0"); } catch (IllegalArgumentException ie) { } } | 3520 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3520/6076dd765ddd92677b95284fc292709905fc79ec/SetTextValueTest.java/buggy/v2/test/src/xmlcursor/detailed/SetTextValueTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
14959,
2335,
1435,
288,
3639,
1149,
8526,
1613,
273,
394,
1149,
63,
6625,
15533,
3639,
358,
9399,
18859,
12,
81,
67,
6511,
16,
18794,
18,
7570,
1769,
3639,
775,
288,
5411... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
14959,
2335,
1435,
288,
3639,
1149,
8526,
1613,
273,
394,
1149,
63,
6625,
15533,
3639,
358,
9399,
18859,
12,
81,
67,
6511,
16,
18794,
18,
7570,
1769,
3639,
775,
288,
5411... |
public DoubleAttribute(final Option option) | private DoubleAttribute(final boolean isfinal, final boolean optional, final boolean unique, final Double defaultConstant) | public DoubleAttribute(final Option option) { this(option.isFinal, option.optional, option.unique, null); } | 50290 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50290/993efd20de0df0fa463cf0b40ccd82835b2aea01/DoubleAttribute.java/buggy/runtime/src/com/exedio/cope/DoubleAttribute.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3698,
1499,
12,
6385,
2698,
1456,
13,
202,
95,
202,
202,
2211,
12,
3482,
18,
291,
7951,
16,
1456,
18,
10444,
16,
1456,
18,
6270,
16,
446,
1769,
202,
97,
2,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3698,
1499,
12,
6385,
2698,
1456,
13,
202,
95,
202,
202,
2211,
12,
3482,
18,
291,
7951,
16,
1456,
18,
10444,
16,
1456,
18,
6270,
16,
446,
1769,
202,
97,
2,
-100,
-100,
-100,... |
getSite().getWorkbenchWindow().getWorkbench().getHelpSystem().displayHelp(HELP_CONTEXT_PROPERTY_SHEET_PAGE); | PlatformUI.getWorkbench().getHelpSystem().displayHelp(HELP_CONTEXT_PROPERTY_SHEET_PAGE); | public void createControl(Composite parent) { // create a new viewer viewer = new PropertySheetViewer(parent); viewer.setSorter(sorter); // set the model for the viewer if (rootEntry == null) { // create a new root PropertySheetEntry root = new PropertySheetEntry(); if (provider != null) { // set the property source provider root.setPropertySourceProvider(provider); } rootEntry = root; } viewer.setRootEntry(rootEntry); viewer.addActivationListener(getCellEditorActivationListener()); // add a listener to track when the entry selection changes viewer.addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { handleEntrySelection(event.getSelection()); } }); initDragAndDrop(); makeActions(); // Create the popup menu for the page. MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$ menuMgr.add(copyAction); menuMgr.add(new Separator()); menuMgr.add(defaultsAction); Menu menu = menuMgr.createContextMenu(viewer.getControl()); viewer.getControl().setMenu(menu); // Set help on the viewer viewer.getControl().addHelpListener(new HelpListener() { /* * @see HelpListener#helpRequested(HelpEvent) */ public void helpRequested(HelpEvent e) { // Get the context for the selected item IStructuredSelection selection = (IStructuredSelection) viewer .getSelection(); if (!selection.isEmpty()) { IPropertySheetEntry entry = (IPropertySheetEntry) selection .getFirstElement(); Object helpContextId = entry.getHelpContextIds(); if (helpContextId != null) { if (helpContextId instanceof String) { getSite().getWorkbenchWindow().getWorkbench() .getHelpSystem().displayHelp( (String) helpContextId); return; } // Since 2.0 the only valid type for helpContextIds // is a String (a single id). // However for backward compatibility we have to handle // and array of contexts (Strings and/or IContexts) // or a context computer. Object[] contexts = null; if (helpContextId instanceof IContextComputer) { // get local contexts contexts = ((IContextComputer) helpContextId) .getLocalContexts(e); } else { contexts = (Object[]) helpContextId; } IWorkbenchHelpSystem help = getSite().getWorkbenchWindow().getWorkbench().getHelpSystem(); // Ignore all but the first element in the array if (contexts[0] instanceof IContext) { help.displayHelp((IContext) contexts[0]); } else { help.displayHelp((String) contexts[0]); } return; } } // No help for the selection so show page help getSite().getWorkbenchWindow().getWorkbench().getHelpSystem().displayHelp(HELP_CONTEXT_PROPERTY_SHEET_PAGE); } }); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/83cafb8668cac1622688e7ea4933591fe0fbb24c/PropertySheetPage.java/clean/bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheetPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
752,
3367,
12,
9400,
982,
13,
288,
3639,
368,
752,
279,
394,
14157,
3639,
14157,
273,
394,
4276,
8229,
18415,
12,
2938,
1769,
3639,
14157,
18,
542,
24952,
12,
2467,
387,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
752,
3367,
12,
9400,
982,
13,
288,
3639,
368,
752,
279,
394,
14157,
3639,
14157,
273,
394,
4276,
8229,
18415,
12,
2938,
1769,
3639,
14157,
18,
542,
24952,
12,
2467,
387,
1769,
... |
return R.toString(); | return R.toString(); | private static String encode(Context cx, String str, String unescapedSet) { int j, k = 0, L; char C, C2; int V; char utf8buf[] = new char[6]; StringBuffer R; R = new StringBuffer(); while (k < str.length()) { C = str.charAt(k); if (unescapedSet.indexOf(C) != -1) { R.append(C); } else { if ((C >= 0xDC00) && (C <= 0xDFFF)) { throw cx.reportRuntimeError0("msg.bad.uri"); } if ((C < 0xD800) || (C > 0xDBFF)) V = C; else { k++; if (k == str.length()) { throw cx.reportRuntimeError0("msg.bad.uri"); } C2 = str.charAt(k); if ((C2 < 0xDC00) || (C2 > 0xDFFF)) { throw cx.reportRuntimeError0("msg.bad.uri"); } V = ((C - 0xD800) << 10) + (C2 - 0xDC00) + 0x10000; } L = oneUcs4ToUtf8Char(utf8buf, V); for (j = 0; j < L; j++) { R.append('%'); if (utf8buf[j] < 16) R.append('0'); R.append(Integer.toHexString(utf8buf[j])); } } k++; } return R.toString(); } | 19042 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19042/5c6a10b4e7eedcdaa0b23264bede49775fe775d6/NativeGlobal.java/buggy/src/org/mozilla/javascript/NativeGlobal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
2017,
12,
1042,
9494,
16,
514,
609,
16,
514,
27869,
694,
13,
288,
3639,
509,
525,
16,
417,
273,
374,
16,
511,
31,
3639,
1149,
385,
16,
385,
22,
31,
3639,
509,
776,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
2017,
12,
1042,
9494,
16,
514,
609,
16,
514,
27869,
694,
13,
288,
3639,
509,
525,
16,
417,
273,
374,
16,
511,
31,
3639,
1149,
385,
16,
385,
22,
31,
3639,
509,
776,
3... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.