rem stringlengths 1 53.3k | add stringlengths 0 80.5k | context stringlengths 6 326k | meta stringlengths 141 403 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
sb.append(hours).append("h"); | sb.append(hours).append('h'); | public static String formatTime(long timeInterval, int maxTerms, boolean withSecondFractions) { StringBuffer sb = new StringBuffer(64); long l = timeInterval; int termCount = 0; // int weeks = (int)(l / ((long)7*24*60*60*1000)); if (weeks > 0) { sb.append(weeks).append("w"); termCount++; l = l - ((long)weeks * ((long)7*24*60*60*1000)); } // int days = (int)(l / ((long)24*60*60*1000)); if (days > 0) { sb.append(days).append("d"); termCount++; l = l - ((long)days * ((long)24*60*60*1000)); } if(termCount >= maxTerms) { return sb.toString(); } // int hours = (int)(l / ((long)60*60*1000)); if (hours > 0) { sb.append(hours).append("h"); termCount++; l = l - ((long)hours * ((long)60*60*1000)); } if(termCount >= maxTerms) { return sb.toString(); } // int minutes = (int)(l / ((long)60*1000)); if (minutes > 0) { sb.append(minutes).append("m"); termCount++; l = l - ((long)minutes * ((long)60*1000)); } if(termCount >= maxTerms) { return sb.toString(); } if(withSecondFractions && ((maxTerms - termCount) >= 2)) { if (l > 0) { double fractionalSeconds = ((double) l) / ((double) 1000.0); DecimalFormat fix3 = new DecimalFormat("0.000"); sb.append(fix3.format(fractionalSeconds)).append("s"); termCount++; l = l - ((long)fractionalSeconds * (long)1000); } } else { int seconds = (int)(l / (long)1000); if (seconds > 0) { sb.append(seconds).append("s"); termCount++; l = l - ((long)seconds * (long)1000); } } // return sb.toString(); } | 51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/62fd59041864b4ed1f43adc676de6bfb5ea977f3/TimeUtil.java/buggy/src/freenet/support/TimeUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
740,
950,
12,
5748,
813,
4006,
16,
509,
943,
11673,
16,
1250,
598,
8211,
13724,
87,
13,
288,
202,
202,
780,
1892,
2393,
273,
394,
6674,
12,
1105,
1769,
202,
202,
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,
225,
202,
482,
760,
514,
740,
950,
12,
5748,
813,
4006,
16,
509,
943,
11673,
16,
1250,
598,
8211,
13724,
87,
13,
288,
202,
202,
780,
1892,
2393,
273,
394,
6674,
12,
1105,
1769,
202,
202,
5... |
protected SearchScope createTextSearchScope(int degreeOfSeparation){ List<IMylarContextNode> landmarks = MylarPlugin.getContextManager().getActiveLandmarks(); switch(degreeOfSeparation){ case 1: // create a search scope for the projects of landmarks List<IResource> l = new ArrayList<IResource>(); for (IMylarContextNode landmark : landmarks) { if (landmark.getContentType().equals(PdeStructureBridge.CONTENT_TYPE) || landmark.getContentType().equals(AntStructureBridge.CONTENT_TYPE)) { String handle = landmark.getElementHandle(); IResource element = null; int first = handle.indexOf(";"); String filename = handle; if(first != -1) filename = handle.substring(0, first); try{ // change the file into a document IPath path = new Path(filename); element = ((Workspace)ResourcesPlugin.getWorkspace()).newResource(path, IResource.FILE); }catch(Exception e){ MylarPlugin.log(e, "scope creation failed"); } l.add(element); } } IResource[] res = new IResource[l.size()]; res = l.toArray(res); SearchScope doiScope = SearchScope.newSearchScope("landmark pde and ant xml files", res); // doiScope.addFileNamePattern("*.xml"); return l.isEmpty()?null:doiScope; case 2: // create a search scope for the projects of landmarks List<IProject> proj = new ArrayList<IProject>(); for (IMylarContextNode landmark : landmarks) { IMylarStructureBridge sbridge = MylarPlugin.getDefault().getStructureBridge(landmark.getContentType()); if(sbridge != null){ Object o = sbridge.getObjectForHandle(landmark.getElementHandle()); IProject project = sbridge.getProjectForObject(o); if(project != null){ proj.add(project); } } } res = new IProject[proj.size()]; res = proj.toArray(res); SearchScope projScope = SearchScope.newSearchScope("Projects of landmarks", res); addFilenamePatterns(projScope); return proj.isEmpty()?null:projScope; case 3: // create a search scope for the workspace SearchScope workspaceScope = SearchScope.newWorkspaceScope(); // add the xml extension to the search scope addFilenamePatterns(workspaceScope); return workspaceScope; case 4: // create a search scope for the workspace SearchScope workspaceScope2 = SearchScope.newWorkspaceScope(); // add the xml extension to the search scope addFilenamePatterns(workspaceScope2); return workspaceScope2; default: return null; } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/4f15e90a39d412daf34b484a2a14c91818197a16/XmlReferencesProvider.java/buggy/org.eclipse.mylyn.resources.ui/src/org/eclipse/mylyn/xml/XmlReferencesProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
2979,
1541,
83,
705,
602,
1528,
2979,
3876,
12,
474,
21361,
951,
5097,
4302,
15329,
682,
32,
3445,
93,
7901,
1042,
907,
34,
15733,
17439,
33,
12062,
7901,
3773,
18,
29120,
1318,
7675,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2979,
1541,
83,
705,
602,
1528,
2979,
3876,
12,
474,
21361,
951,
5097,
4302,
15329,
682,
32,
3445,
93,
7901,
1042,
907,
34,
15733,
17439,
33,
12062,
7901,
3773,
18,
29120,
1318,
7675,
58... | ||
ZipFileObject parent; | ZipFileObject parent = null; | public ZipFileSystem( final DefaultFileName rootName, final FileObject parentLayer ) throws FileSystemException { super( rootName, parentLayer ); // Make a local copy of the file final File file = parentLayer.replicateFile( FileConstants.SELECT_SELF ); this.file = file; // Open the Zip file if ( !file.exists() ) { // Don't need to do anything zipFile = null; return; } try { zipFile = new ZipFile( this.file ); } catch ( IOException ioe ) { final String message = REZ.getString( "open-zip-file.error", this.file ); throw new FileSystemException( message, ioe ); } // Build the index Enumeration entries = zipFile.entries(); while ( entries.hasMoreElements() ) { ZipEntry entry = (ZipEntry)entries.nextElement(); FileName name = rootName.resolveName( entry.getName() ); // Create the file ZipFileObject fileObj; if ( entry.isDirectory() ) { if ( getFile( name ) != null ) { // Already created implicitly continue; } fileObj = new ZipFileObject( name, true, this ); } else { fileObj = new ZipFileObject( name, entry, zipFile, this ); } putFile( fileObj ); // Make sure all ancestors exist // TODO - create these on demand ZipFileObject parent; for ( FileName parentName = name.getParent(); parentName != null; fileObj = parent, parentName = parentName.getParent() ) { // Locate the parent parent = (ZipFileObject)getFile( parentName ); if ( parent == null ) { parent = new ZipFileObject( parentName, true, this ); putFile( parent ); } // Attach child to parent parent.attachChild( fileObj.getName() ); } } } | 50122 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50122/dbe103a9007df1d7e13db06cc5e18dcb5aac8851/ZipFileSystem.java/buggy/src/java/org/apache/commons/vfs/provider/zip/ZipFileSystem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8603,
11785,
12,
727,
2989,
4771,
1365,
461,
16,
12900,
727,
1387,
921,
982,
4576,
262,
3639,
1216,
10931,
503,
565,
288,
3639,
2240,
12,
1365,
461,
16,
982,
4576,
11272,
3639,
368,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8603,
11785,
12,
727,
2989,
4771,
1365,
461,
16,
12900,
727,
1387,
921,
982,
4576,
262,
3639,
1216,
10931,
503,
565,
288,
3639,
2240,
12,
1365,
461,
16,
982,
4576,
11272,
3639,
368,... |
logger.debug("probe found, named " + pd.getName()); | public void end(String namespace, String name) throws Exception { ProbeDesc pd = (ProbeDesc) digester.peek(); ProbeFactory.addDesc(pd); logger.debug("probe found, named " + pd.getName()); } | 31637 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31637/0d053a81c7d43158dc7a1a4cc141af689c2ac600/DescFactory.java/buggy/src/jrds/DescFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
679,
12,
780,
1981,
16,
514,
508,
13,
1216,
1185,
288,
9506,
202,
21042,
4217,
4863,
273,
261,
21042,
4217,
13,
23821,
18,
347,
3839,
5621,
9506,
202,
21042,
1733,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
679,
12,
780,
1981,
16,
514,
508,
13,
1216,
1185,
288,
9506,
202,
21042,
4217,
4863,
273,
261,
21042,
4217,
13,
23821,
18,
347,
3839,
5621,
9506,
202,
21042,
1733,
18,
1... | |
if (node.isFilter()) | if (node.isFilter()) { | public void visitNode(FlatNode node) { if (node.isFilter()) RenameAll.renameFilterContents((SIRFilter)node.contents); } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/0b681c11586be2aa488c64530b717abece6fcc20/GenerateCCode.java/clean/streams/src/at/dms/kjc/rstream/GenerateCCode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
3757,
907,
12,
16384,
907,
756,
13,
3196,
202,
95,
1082,
565,
309,
261,
2159,
18,
291,
1586,
10756,
1082,
202,
16019,
1595,
18,
18539,
1586,
6323,
12443,
2320,
54,
1586,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
3757,
907,
12,
16384,
907,
756,
13,
3196,
202,
95,
1082,
565,
309,
261,
2159,
18,
291,
1586,
10756,
1082,
202,
16019,
1595,
18,
18539,
1586,
6323,
12443,
2320,
54,
1586,
... |
} | public void reset() { // reset this instance for future re-use count = 0L; for (int i = 0; i < blockSize;) { buffer[i++] = 0; } resetContext(); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/2b9abb5a0b9bbcfe80809713d541a098ef473321/BaseHash.java/buggy/core/src/classpath/gnu/gnu/java/security/hash/BaseHash.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2715,
1435,
225,
288,
368,
2715,
333,
791,
364,
3563,
283,
17,
1202,
565,
1056,
273,
374,
48,
31,
565,
364,
261,
474,
277,
273,
374,
31,
277,
411,
13766,
30943,
1377,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2715,
1435,
225,
288,
368,
2715,
333,
791,
364,
3563,
283,
17,
1202,
565,
1056,
273,
374,
48,
31,
565,
364,
261,
474,
277,
273,
374,
31,
277,
411,
13766,
30943,
1377,
288,
... | |
setSpacing(PageLayout.parsePageValue(spacingStr)); | setSpacing(spacingStr); /* use <spacing> element instead .... spacingStr = attrs.getValue("spacingWidth"); if (spacingStr!=null) spacing.width = PageLayout.parsePageValue(spacingStr); spacingStr = attrs.getValue("spacingHeight"); if (spacingStr!=null) spacing.height = PageLayout.parsePageValue(spacingStr); */ | public void setXmlAttributes(Attributes attrs) { String marginStr = attrs.getValue("margin"); if (marginStr!=null) setMargin(PageLayout.parsePageValue(marginStr)); String spacingStr = attrs.getValue("spacing"); if (spacingStr!=null) setSpacing(PageLayout.parsePageValue(spacingStr)); } | 47266 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47266/48e36b51d5ad604b9d04612ea22e0d257235cce9/AreaLayout.java/buggy/src/net/jimmc/mimprint/AreaLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
4432,
2498,
12,
2498,
3422,
13,
288,
3639,
514,
7333,
1585,
273,
3422,
18,
24805,
2932,
10107,
8863,
3639,
309,
261,
10107,
1585,
5,
33,
2011,
13,
5411,
444,
9524,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
4432,
2498,
12,
2498,
3422,
13,
288,
3639,
514,
7333,
1585,
273,
3422,
18,
24805,
2932,
10107,
8863,
3639,
309,
261,
10107,
1585,
5,
33,
2011,
13,
5411,
444,
9524,
12,
1... |
public final Set getModifierKeys() { return Collections.unmodifiableSet(modifierKeys); } | public final int getModifierKeys() { return modifierKeys; } | public final Set getModifierKeys() { return Collections.unmodifiableSet(modifierKeys); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/092230ba080f34842abb8d636b3b6894254f8cc5/KeyStroke.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/KeyStroke.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
1000,
336,
9829,
2396,
1435,
288,
3639,
327,
5737,
18,
318,
13388,
694,
12,
20597,
2396,
1769,
565,
289,
2,
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,
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,
727,
1000,
336,
9829,
2396,
1435,
288,
3639,
327,
5737,
18,
318,
13388,
694,
12,
20597,
2396,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
( ( DecimalFormat ) format ).applyPattern( formatStr ); | ( ( DecimalFormat ) format ).applyPattern( formatString ); | protected String formatValue(Object valueToFormat) throws JspException { Format format = null; Object value = valueToFormat; Locale locale = RequestUtils.retrieveUserLocale( pageContext, this.localeKey ); boolean formatStrFromResources = false; // Return String object as is. if ( value instanceof java.lang.String ) { return (String)value; } else { // Try to retrieve format string from resources by the key from formatKey. if( ( formatStr==null ) && ( formatKey!=null ) ) { formatStr = retrieveFormatString( this.formatKey ); if( formatStr!=null ) formatStrFromResources = true; } // Prepare format object for numeric values. if ( value instanceof Number ) { if( formatStr==null ) { if( ( value instanceof Byte ) || ( value instanceof Short ) || ( value instanceof Integer ) || ( value instanceof Long ) || ( value instanceof BigInteger ) ) formatStr = retrieveFormatString( INT_FORMAT_KEY ); else if( ( value instanceof Float ) || ( value instanceof Double ) || ( value instanceof BigDecimal ) ) formatStr = retrieveFormatString( FLOAT_FORMAT_KEY ); if( formatStr!=null ) formatStrFromResources = true; } if( formatStr!=null ) { try { format = NumberFormat.getNumberInstance( locale ); if( formatStrFromResources ) ( ( DecimalFormat ) format ).applyLocalizedPattern( formatStr ); else ( ( DecimalFormat ) format ).applyPattern( formatStr ); } catch( IllegalArgumentException _e ) { JspException e = new JspException(messages.getMessage("write.format", formatStr)); RequestUtils.saveException(pageContext, e); throw e; } } } else if ( value instanceof java.util.Date ) { if( formatStr==null ) { if ( value instanceof java.sql.Timestamp ) { formatStr = retrieveFormatString( SQL_TIMESTAMP_FORMAT_KEY ); } else if ( value instanceof java.sql.Date ) { formatStr = retrieveFormatString( SQL_DATE_FORMAT_KEY ); } else if ( value instanceof java.sql.Time ) { formatStr = retrieveFormatString( SQL_TIME_FORMAT_KEY ); } else if ( value instanceof java.util.Date ) { formatStr = retrieveFormatString( DATE_FORMAT_KEY ); } if( formatStr!=null ) formatStrFromResources = true; } if( formatStr!=null ) { if( formatStrFromResources ) { format = new SimpleDateFormat( formatStr, locale ); } else { format = new SimpleDateFormat( formatStr ); } } } } if( format!=null ) return format.format( value ); else return value.toString(); } | 2722 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2722/3e8a3390ee316c95946a40052deb5ca74ebd250b/WriteTag.java/clean/src/share/org/apache/struts/taglib/bean/WriteTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
740,
620,
12,
921,
30605,
1630,
13,
1216,
27485,
288,
3639,
4077,
740,
273,
446,
31,
3639,
1033,
460,
273,
30605,
1630,
31,
3639,
6458,
2573,
273,
1567,
1989,
18,
17466,
1299,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
740,
620,
12,
921,
30605,
1630,
13,
1216,
27485,
288,
3639,
4077,
740,
273,
446,
31,
3639,
1033,
460,
273,
30605,
1630,
31,
3639,
6458,
2573,
273,
1567,
1989,
18,
17466,
1299,
... |
_log.debug("received " + messageId + " with " + payload.getValid()); | _log.debug("received " + messageId + " with " + (payload != null ? payload.getValid()+"" : "no payload")); | public boolean messageReceived(long messageId, ByteArray payload) { synchronized (_dataLock) { if (_log.shouldLog(Log.DEBUG)) _log.debug("received " + messageId + " with " + payload.getValid()); if (messageId <= _highestReadyBlockId) { if (_log.shouldLog(Log.DEBUG)) _log.debug("ignoring dup message " + messageId); _dataLock.notifyAll(); return false; // already received } if (messageId > _highestBlockId) _highestBlockId = messageId; if (_highestReadyBlockId + 1 == messageId) { if (!_locallyClosed && payload.getValid() > 0) { if (_log.shouldLog(Log.DEBUG)) _log.debug("accepting bytes as ready: " + payload.getValid()); _readyDataBlocks.add(payload); } _highestReadyBlockId = messageId; long cur = _highestReadyBlockId + 1; // now pull in any previously pending blocks while (_notYetReadyBlocks.containsKey(new Long(cur))) { ByteArray ba = (ByteArray)_notYetReadyBlocks.remove(new Long(cur)); if ( (ba != null) && (ba.getData() != null) && (ba.getValid() > 0) ) { _readyDataBlocks.add(ba); } if (_log.shouldLog(Log.DEBUG)) _log.debug("making ready the block " + cur); cur++; _highestReadyBlockId++; } _dataLock.notifyAll(); } else { if (_log.shouldLog(Log.DEBUG)) _log.debug("message is out of order: " + messageId); if (_locallyClosed) // dont need the payload, just the msgId in order _notYetReadyBlocks.put(new Long(messageId), new ByteArray(null)); else _notYetReadyBlocks.put(new Long(messageId), payload); _dataLock.notifyAll(); } } return true; } | 27437 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27437/6a19501214b3f1c26f1f015332a7e4a13106599f/MessageInputStream.java/clean/apps/streaming/java/src/net/i2p/client/streaming/MessageInputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
883,
8872,
12,
5748,
19090,
16,
7964,
2385,
13,
288,
3639,
3852,
261,
67,
892,
2531,
13,
288,
5411,
309,
261,
67,
1330,
18,
13139,
1343,
12,
1343,
18,
9394,
3719,
7734,
389,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
883,
8872,
12,
5748,
19090,
16,
7964,
2385,
13,
288,
3639,
3852,
261,
67,
892,
2531,
13,
288,
5411,
309,
261,
67,
1330,
18,
13139,
1343,
12,
1343,
18,
9394,
3719,
7734,
389,... |
public org.quickfix.field.TransactTime getTransactTime() throws FieldNotFound { org.quickfix.field.TransactTime value = new org.quickfix.field.TransactTime(); | public quickfix.field.TransactTime getTransactTime() throws FieldNotFound { quickfix.field.TransactTime value = new quickfix.field.TransactTime(); | public org.quickfix.field.TransactTime getTransactTime() throws FieldNotFound { org.quickfix.field.TransactTime value = new org.quickfix.field.TransactTime(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/Advertisement.java/buggy/src/java/src/quickfix/fix42/Advertisement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
1429,
621,
950,
336,
1429,
621,
950,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
1429,
621,
950,
460,
273,
394,
2358,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2358,
18,
19525,
904,
18,
1518,
18,
1429,
621,
950,
336,
1429,
621,
950,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
1429,
621,
950,
460,
273,
394,
2358,... |
boolean unprotectedAddFile(UTF8 name, Block blocks[]) { synchronized (rootDir) { if (blocks != null) { for (int i = 0; i < blocks.length; i++) { activeBlocks.add(blocks[i]); } } return (rootDir.addNode(name.toString(), blocks) != null); } | boolean unprotectedAddFile(UTF8 path, INode newNode) { synchronized (rootDir) { int nrBlocks = (newNode.blocks == null) ? 0 : newNode.blocks.length; for (int i = 0; i < nrBlocks; i++) activeBlocks.put(newNode.blocks[i], newNode); return (rootDir.addNode(path.toString(), newNode) != null); } | boolean unprotectedAddFile(UTF8 name, Block blocks[]) { synchronized (rootDir) { if (blocks != null) { // Add file->block mapping for (int i = 0; i < blocks.length; i++) { activeBlocks.add(blocks[i]); } } return (rootDir.addNode(name.toString(), blocks) != null); } } | 49248 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49248/ba0ca973d8fbf49c1b7c2d29e7763226576364e8/FSDirectory.java/buggy/src/java/org/apache/hadoop/dfs/FSDirectory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1250,
640,
1117,
986,
812,
12,
5159,
28,
508,
16,
3914,
4398,
63,
5717,
288,
3639,
3852,
261,
3085,
1621,
13,
288,
5411,
309,
261,
7996,
480,
446,
13,
288,
7734,
368,
1436,
585,
2122,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
640,
1117,
986,
812,
12,
5159,
28,
508,
16,
3914,
4398,
63,
5717,
288,
3639,
3852,
261,
3085,
1621,
13,
288,
5411,
309,
261,
7996,
480,
446,
13,
288,
7734,
368,
1436,
585,
2122,
... |
if (DEBUG) | if (DEBUG) { | public IStatus handleDrop(CommonDropAdapter aDropAdapter, DropTargetEvent aDropTargetEvent, Object aTarget) { if (DEBUG) System.out .println("ResourceDropAdapterAssistant.handleDrop (begin)"); //$NON-NLS-1$ // alwaysOverwrite = false; if (aDropAdapter.getCurrentTarget() == null || aDropTargetEvent.data == null) { return Status.CANCEL_STATUS; } IStatus status = null; IResource[] resources = null; TransferData currentTransfer = aDropAdapter.getCurrentTransfer(); if (LocalSelectionTransfer.getTransfer().isSupportedType( currentTransfer)) { resources = getSelectedResources(); } else if (ResourceTransfer.getInstance().isSupportedType( currentTransfer)) { resources = (IResource[]) aDropTargetEvent.data; } if (FileTransfer.getInstance().isSupportedType(currentTransfer)) { status = performFileDrop(aDropAdapter, aDropTargetEvent.data); } else if (resources != null && resources.length > 0) { if (aDropAdapter.getCurrentOperation() == DND.DROP_COPY) { if (DEBUG) System.out .println("ResourceDropAdapterAssistant.handleDrop executing COPY."); //$NON-NLS-1$ status = performResourceCopy(aDropAdapter, getShell(), resources); } else { if (DEBUG) System.out .println("ResourceDropAdapterAssistant.handleDrop executing MOVE."); //$NON-NLS-1$ status = performResourceMove(aDropAdapter, resources); } } openError(status); IContainer target = getActualTarget((IResource) aDropAdapter .getCurrentTarget()); if (target != null && target.isAccessible()) try { target.refreshLocal(IResource.DEPTH_ONE, null); } catch (CoreException e) { } return status; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/3a23c3b9bac4db696a0452560047155775a707b7/ResourceDropAdapterAssistant.java/clean/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
1482,
1640,
7544,
12,
6517,
7544,
4216,
279,
7544,
4216,
16,
1082,
202,
7544,
2326,
1133,
279,
7544,
2326,
1133,
16,
1033,
279,
2326,
13,
288,
202,
202,
430,
261,
9394,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
467,
1482,
1640,
7544,
12,
6517,
7544,
4216,
279,
7544,
4216,
16,
1082,
202,
7544,
2326,
1133,
279,
7544,
2326,
1133,
16,
1033,
279,
2326,
13,
288,
202,
202,
430,
261,
9394,
1... |
} catch(Exception e) { _callback.error(e); | } catch(Throwable t) { _callback.error(t); | public void run() { try { loadSettingsBlocking(notifyOnClearFinal); } catch(Exception e) { _callback.error(e); } } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/e4b24ef58cc77022f26819a07ebcb80a084e285e/FileManager.java/buggy/components/gnutella-core/src/main/java/com/limegroup/gnutella/FileManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
918,
1086,
1435,
288,
6862,
202,
698,
288,
25083,
202,
945,
2628,
8728,
12,
12336,
1398,
9094,
7951,
1769,
6862,
202,
97,
1044,
12,
503,
425,
13,
288,
25083,
202,
67,
3394,
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
918,
1086,
1435,
288,
6862,
202,
698,
288,
25083,
202,
945,
2628,
8728,
12,
12336,
1398,
9094,
7951,
1769,
6862,
202,
97,
1044,
12,
503,
425,
13,
288,
25083,
202,
67,
3394,
18,
1... |
public void widgetSelected(SelectionEvent e) { if (!bEnableEvents) { return; } if (e.getSource().equals(cmbDataType)) { if (cmbDataType.getText().equals("Number")) { slStandardDetails.topControl = cmpStandardNumberDetails; slAdvancedDetails.topControl = cmpAdvancedNumberDetails; updateUIState(); } else { slStandardDetails.topControl = cmpStandardDateDetails; slAdvancedDetails.topControl = cmpAdvancedDateDetails; updateUIState(); } cmpStandardDetails.layout(); cmpAdvancedDetails.layout(); } else if (e.getSource() instanceof Button) { updateUIState(); } } | public void widgetSelected( SelectionEvent e ) { if ( !bEnableEvents ) { return; } if ( e.getSource( ).equals( cmbDataType ) ) { if ( cmbDataType.getText( ).equals( "Number" ) ) { slStandardDetails.topControl = cmpStandardNumberDetails; slAdvancedDetails.topControl = cmpAdvancedNumberDetails; updateUIState( ); } else { slStandardDetails.topControl = cmpStandardDateDetails; slAdvancedDetails.topControl = cmpAdvancedDateDetails; updateUIState( ); } cmpStandardDetails.layout( ); cmpAdvancedDetails.layout( ); } else if ( e.getSource( ) instanceof Button ) { updateUIState( ); } } | public void widgetSelected(SelectionEvent e) { if (!bEnableEvents) { return; } if (e.getSource().equals(cmbDataType)) { if (cmbDataType.getText().equals("Number")) //$NON-NLS-1$ { slStandardDetails.topControl = cmpStandardNumberDetails; slAdvancedDetails.topControl = cmpAdvancedNumberDetails; updateUIState(); } else { slStandardDetails.topControl = cmpStandardDateDetails; slAdvancedDetails.topControl = cmpAdvancedDateDetails; updateUIState(); } cmpStandardDetails.layout(); cmpAdvancedDetails.layout(); } else if (e.getSource() instanceof Button) { updateUIState(); } } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/c2635683b569bc35b628d25cbf49853caae225fa/FormatSpecifierComposite.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/FormatSpecifierComposite.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3604,
7416,
12,
6233,
1133,
425,
13,
565,
288,
3639,
309,
16051,
70,
8317,
3783,
13,
3639,
288,
5411,
327,
31,
3639,
289,
3639,
309,
261,
73,
18,
588,
1830,
7675,
14963,
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,
3604,
7416,
12,
6233,
1133,
425,
13,
565,
288,
3639,
309,
16051,
70,
8317,
3783,
13,
3639,
288,
5411,
327,
31,
3639,
289,
3639,
309,
261,
73,
18,
588,
1830,
7675,
14963,
12,
... |
this.getPids().getAPids().remove(audioPid); for (int i=0; i<this.getPids().getAPids().size(); i++) { BOPid pid = (BOPid)this.getPids().getAPids().get(i); execString = execString+",0x"+pid.getNumber(); | if (execString.indexOf("$aPid")>-1) { execString = SerFormatter.replace(execString, "$aPid", "0x"+audioPid.getNumber()); this.getPids().getAPids().remove(audioPid); for (int i=0; i<this.getPids().getAPids().size(); i++) { BOPid pid = (BOPid)this.getPids().getAPids().get(i); execString = execString+",0x"+pid.getNumber(); } | private String getPlaybackRequestString(BOPlaybackOption option, BOPid audioPid){ String execString = option.getPlaybackOption(); String vPid = "0x" + this.getPids().getVPid().getNumber(); String ip = ControlMain.getBoxIpOfActiveBox(); String pmt = "0x"+this.getPids().getPmtPid().getNumber(); execString = SerFormatter.replace(execString, "$pmt", pmt); execString = SerFormatter.replace(execString, "$ip", ip); execString = SerFormatter.replace(execString, "$vPid", vPid); execString = SerFormatter.replace(execString, "$aPid", "0x"+audioPid.getNumber()); this.getPids().getAPids().remove(audioPid); for (int i=0; i<this.getPids().getAPids().size(); i++) { BOPid pid = (BOPid)this.getPids().getAPids().get(i); execString = execString+",0x"+pid.getNumber(); } return execString; } | 13062 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13062/6231871adb7866e3e06044f37d6da4d4ef786617/ControlProgramTab.java/buggy/jtg/control/ControlProgramTab.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
1689,
5544,
823,
691,
780,
12,
5315,
30569,
1895,
1456,
16,
605,
3665,
350,
7447,
12478,
15329,
202,
202,
780,
1196,
780,
273,
1456,
18,
588,
30569,
1895,
5621,
3639,
514,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
1689,
5544,
823,
691,
780,
12,
5315,
30569,
1895,
1456,
16,
605,
3665,
350,
7447,
12478,
15329,
202,
202,
780,
1196,
780,
273,
1456,
18,
588,
30569,
1895,
5621,
3639,
514,... |
public String[] getCommandLine() throws Exception; | String[] getCommandLine() throws Exception; | public String[] getCommandLine() throws Exception; | 7982 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7982/c9813fecc3f4dbe103f9099ceda72b9362dc08b1/NodeServesClient.java/buggy/server/src/org/cougaar/tools/server/NodeServesClient.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
8526,
12856,
1670,
1435,
1216,
1185,
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,
0,
0,
... | [
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,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
8526,
12856,
1670,
1435,
1216,
1185,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
System.out.println("ARON: Checking dir: " + dir_name); | private void initRepository() { mRepos = new ConfigDefinitionRepository(); // Get a list of the definition files to load List def_file_list = new ArrayList(); List def_path = getDefinitionPath(); for (Iterator itr = def_path.iterator(); itr.hasNext(); ) { // Check if this part of the path is a valid directory we can read String dir_name = (String)itr.next(); System.out.println("ARON: Checking dir: " + dir_name); File dir = new File(dir_name); if (dir.exists() && dir.isDirectory() && dir.canRead()) { // Get a list of all the config definition files in the directory File[] def_files = dir.listFiles(new FilenameFilter() { public boolean accept(File dir, String file) { System.out.println("ARON: Filter " + file); // Only accept files with a .jdef extension if (file.endsWith(".jdef")) { System.out.println("ARON: Found " + file); File def_file = new File(dir, file); if (def_file.canRead()) { return true; } } return false; } }); // Add the files to the list of files to load for (int i=0; i<def_files.length; ++i) { def_file_list.add(def_files[i]); } } } // Load in the definitions for each file and place them in the repository for (Iterator itr = def_file_list.iterator(); itr.hasNext(); ) { try { // Attempt to load in the definitions in the file File def_file = (File)itr.next(); System.out.println("Attempting to read jdef file: " + def_file.getName()); ConfigDefinitionReader reader = new ConfigDefinitionReader(def_file); List defs = reader.readDefinition(); System.out.println("Successfully read jdef file: " + def_file.getName()); for (Iterator def_itr = defs.iterator(); def_itr.hasNext(); ) { ConfigDefinition def = (ConfigDefinition)def_itr.next(); System.out.println("Loading Definition: " + def.getName()); mRepos.add(def); } } catch (ParseException pe) { pe.printStackTrace(); } catch (IOException ioe) { ioe.printStackTrace(); } } } | 7933 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7933/9376e2ffac359e0a509f6194e7bcb0d4e5e64221/ConfigBrokerImpl.java/buggy/modules/jackal/config/org/vrjuggler/jccl/config/ConfigBrokerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
918,
1208,
3305,
1435,
282,
288,
1377,
312,
28453,
273,
394,
1903,
1852,
3305,
5621,
1377,
368,
968,
279,
666,
434,
326,
2379,
1390,
358,
1262,
1377,
987,
1652,
67,
768,
67,
1098,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
565,
3238,
918,
1208,
3305,
1435,
282,
288,
1377,
312,
28453,
273,
394,
1903,
1852,
3305,
5621,
1377,
368,
968,
279,
666,
434,
326,
2379,
1390,
358,
1262,
1377,
987,
1652,
67,
768,
67,
1098,
... | |
catch ( IOException e) { } catch (URISyntaxException e) { } | private void getDriverHomeDir() { assert driverHomeDir == null; try { OdaDriverConfiguration driverConfig = ConfigManager.getInstance().getDriverConfig( DRIVER_NAME ); if ( driverConfig != null ) { URL url = driverConfig.getDriverLocation(); URI uri = new URI(url.toString()); driverHomeDir = new File( uri.getPath(), DRIVER_DIRECTORY ); } } catch ( OdaException e) { // TODO: log exception } catch ( IOException e) { // TODO: log exception } catch (URISyntaxException e) { // TODO log exception } if ( driverHomeDir == null ) { //if cannot find driver directory in plugin path, try to find it in // current path driverHomeDir = new File(DRIVER_DIRECTORY); } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/556bf9482d3b241b882054d5cafaeb1c380421e9/JDBCDriverManager.java/buggy/data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/JDBCDriverManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1152,
918,
15885,
8684,
1621,
1435,
21114,
202,
95,
1082,
202,
11231,
3419,
8684,
1621,
422,
446,
31,
1082,
202,
698,
1875,
202,
95,
9506,
202,
51,
2414,
4668,
1750,
3419,
809,
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,
3196,
202,
1152,
918,
15885,
8684,
1621,
1435,
21114,
202,
95,
1082,
202,
11231,
3419,
8684,
1621,
422,
446,
31,
1082,
202,
698,
1875,
202,
95,
9506,
202,
51,
2414,
4668,
1750,
3419,
809,
273,... | |
System.out.println("Running XML Test '" + tr.getTest().getName() + "' in Parallel"); runTest(tr); } catch(Exception ex) { ex.printStackTrace(); | Utils.log("[SuiteWorker]", 4, "Running XML Test '" + m_testRunner.getTest().getName() + "' in Parallel"); runTest(m_testRunner); } catch(Exception ex) { ex.printStackTrace(); | public void run() { try { System.out.println("Running XML Test '" + tr.getTest().getName() + "' in Parallel"); runTest(tr); } catch(Exception ex) { ex.printStackTrace(); } } | 46166 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46166/1942e422ba883fe38f1ee641e6b0e4ac97bab5f6/SuiteRunner.java/buggy/src/main/org/testng/SuiteRunner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1086,
1435,
288,
5411,
775,
288,
7734,
2332,
18,
659,
18,
8222,
2932,
7051,
3167,
7766,
2119,
397,
7682,
433,
18,
588,
4709,
7675,
17994,
1435,
397,
2491,
316,
20203,
8863,
773... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
1435,
288,
5411,
775,
288,
7734,
2332,
18,
659,
18,
8222,
2932,
7051,
3167,
7766,
2119,
397,
7682,
433,
18,
588,
4709,
7675,
17994,
1435,
397,
2491,
316,
20203,
8863,
773... |
if (n instanceof ChainBox) checkExit((ChainBox) n,e); | if (n instanceof ChainBox) { if (!checkEventInNodeInterior(n,e)) super.mouseExited(e); } | public void mouseExited(PInputEvent e) { PNode n = e.getPickedNode(); if (n instanceof ChainBox) checkExit((ChainBox) n,e); else super.mouseExited(e); e.setHandled(true); } | 55464 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55464/6a77f59baeb1319a898414f2998d48c334a1c678/ChainPaletteEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainPaletteEventHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
7644,
6767,
329,
12,
52,
1210,
1133,
425,
13,
288,
202,
202,
52,
907,
290,
273,
425,
18,
588,
17968,
329,
907,
5621,
202,
202,
430,
261,
82,
1276,
7824,
3514,
13,
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,
225,
202,
482,
918,
7644,
6767,
329,
12,
52,
1210,
1133,
425,
13,
288,
202,
202,
52,
907,
290,
273,
425,
18,
588,
17968,
329,
907,
5621,
202,
202,
430,
261,
82,
1276,
7824,
3514,
13,
1082,... |
public DefaultPropertyConfigurer( Class type, Method createMethod, Method addMethod ) | public DefaultPropertyConfigurer( final int propIndex, final Class type, final Method createMethod, final Method addMethod, final int maxCount ) | public DefaultPropertyConfigurer( Class type, Method createMethod, Method addMethod ) { if ( type.isPrimitive() ) { type = getComplexTypeFor(type); } m_type = type; m_createMethod = createMethod; m_addMethod = addMethod; } | 17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/6ef2f5cbd5939352124cb195c31b0a01ad610893/DefaultPropertyConfigurer.java/buggy/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultPropertyConfigurer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2989,
1396,
809,
11278,
12,
1659,
618,
16,
4766,
1377,
2985,
752,
1305,
16,
4766,
1377,
2985,
18223,
262,
565,
288,
3639,
309,
261,
618,
18,
291,
9840,
1435,
262,
3639,
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,
2989,
1396,
809,
11278,
12,
1659,
618,
16,
4766,
1377,
2985,
752,
1305,
16,
4766,
1377,
2985,
18223,
262,
565,
288,
3639,
309,
261,
618,
18,
291,
9840,
1435,
262,
3639,
288,
5411,
... |
private static void loglog4testng(String pmessage) { if (debug) { out.println("[log4testng] [debug] " + pmessage); } | private static void loglog4testng(String pmessage) { if(debug) { out.println("[log4testng] [debug] " + pmessage); } | private static void loglog4testng(String pmessage) { if (debug) { out.println("[log4testng] [debug] " + pmessage); } } | 47060 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47060/96769faec3ab62f18300a49b416f1c5e2f108496/Logger.java/clean/src/main/org/testng/log4testng/Logger.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
613,
1330,
24,
3813,
3368,
12,
780,
293,
2150,
13,
225,
288,
1377,
309,
261,
4148,
13,
1377,
288,
1850,
596,
18,
8222,
2932,
63,
1330,
24,
3813,
3368,
65,
306,
4148,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
613,
1330,
24,
3813,
3368,
12,
780,
293,
2150,
13,
225,
288,
1377,
309,
261,
4148,
13,
1377,
288,
1850,
596,
18,
8222,
2932,
63,
1330,
24,
3813,
3368,
65,
306,
4148,
6... |
try { | } try { | private void validateDTDattribute(QName element, int attValue, XMLAttributeDecl attributeDecl) throws Exception{ AttributeValidator av = null; switch (attributeDecl.type) { case XMLAttributeDecl.TYPE_ENTITY: { boolean isAlistAttribute = attributeDecl.list;//Caveat - Save this information because invalidStandaloneAttDef String unTrimValue = fStringPool.toString(attValue); String value = unTrimValue.trim(); //System.out.println("value = " + value ); //changes fTempAttDef if (fValidationEnabled) { if (value != unTrimValue) { if (invalidStandaloneAttDef(element, attributeDecl.name)) { reportRecoverableXMLError(XMLMessages.MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE, XMLMessages.VC_STANDALONE_DOCUMENT_DECLARATION, fStringPool.toString(attributeDecl.name.rawname), unTrimValue, value); } } } try { if ( isAlistAttribute ) { fValENTITIES.validate( value, null ); } else { fValENTITY.validate( value, null ); } } catch ( InvalidDatatypeValueException ex ) { if ( ex.getMajorCode() != 1 && ex.getMinorCode() != -1 ) { reportRecoverableXMLError(ex.getMajorCode(), ex.getMinorCode(), fStringPool.toString( attributeDecl.name.rawname), value ); } else { System.err.println("Error: " + ex.getLocalizedMessage() );//Should not happen } } /*if (attributeDecl.list) { av = fAttValidatorENTITIES; } else { av = fAttValidatorENTITY; }*/ } break; case XMLAttributeDecl.TYPE_ENUMERATION: av = fAttValidatorENUMERATION; break; case XMLAttributeDecl.TYPE_ID: { String unTrimValue = fStringPool.toString(attValue); String value = unTrimValue.trim(); if (fValidationEnabled) { if (value != unTrimValue) { if (invalidStandaloneAttDef(element, attributeDecl.name)) { reportRecoverableXMLError(XMLMessages.MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE, XMLMessages.VC_STANDALONE_DOCUMENT_DECLARATION, fStringPool.toString(attributeDecl.name.rawname), unTrimValue, value); } } } try { //this.fIdDefs = (Hashtable) fValID.validate( value, null ); //System.out.println("this.fIdDefs = " + this.fIdDefs ); this.fStoreIDRef.setDatatypeObject( fValID.validate( value, null ) ); fValIDRef.validate( value, this.fStoreIDRef ); //just in case we called id after IDREF } catch ( InvalidDatatypeValueException ex ) { reportRecoverableXMLError(ex.getMajorCode(), ex.getMinorCode(), fStringPool.toString( attributeDecl.name.rawname), value ); } } break; case XMLAttributeDecl.TYPE_IDREF: { String unTrimValue = fStringPool.toString(attValue); String value = unTrimValue.trim(); boolean isAlistAttribute = attributeDecl.list;//Caveat - Save this information because invalidStandaloneAttDef //changes fTempAttDef if (fValidationEnabled) { if (value != unTrimValue) { if (invalidStandaloneAttDef(element, attributeDecl.name)) { reportRecoverableXMLError(XMLMessages.MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE, XMLMessages.VC_STANDALONE_DOCUMENT_DECLARATION, fStringPool.toString(attributeDecl.name.rawname), unTrimValue, value); } } } try { if ( isAlistAttribute ) { fValIDRefs.validate( value, this.fStoreIDRef ); } else { fValIDRef.validate( value, this.fStoreIDRef ); } } catch ( InvalidDatatypeValueException ex ) { if ( ex.getMajorCode() != 1 && ex.getMinorCode() != -1 ) { reportRecoverableXMLError(ex.getMajorCode(), ex.getMinorCode(), fStringPool.toString( attributeDecl.name.rawname), value ); } else { System.err.println("Error: " + ex.getLocalizedMessage() );//Should not happen } } } break; case XMLAttributeDecl.TYPE_NOTATION: { /* WIP String unTrimValue = fStringPool.toString(attValue); String value = unTrimValue.trim(); if (fValidationEnabled) { if (value != unTrimValue) { if (invalidStandaloneAttDef(element, attributeDecl.name)) { reportRecoverableXMLError(XMLMessages.MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE, XMLMessages.VC_STANDALONE_DOCUMENT_DECLARATION, fStringPool.toString(attributeDecl.name.rawname), unTrimValue, value); } } } try { //this.fIdDefs = (Hashtable) fValID.validate( value, null ); //System.out.println("this.fIdDefs = " + this.fIdDefs ); this.fStoreIDRef.setDatatypeObject( fValID.validate( value, null ) ); } catch ( InvalidDatatypeValueException ex ) { reportRecoverableXMLError(ex.getMajorCode(), ex.getMinorCode(), fStringPool.toString( attributeDecl.name.rawname), value ); } } */ av = fAttValidatorNOTATION; } break; case XMLAttributeDecl.TYPE_NMTOKEN: { String unTrimValue = fStringPool.toString(attValue); String value = unTrimValue.trim(); boolean isAlistAttribute = attributeDecl.list;//Caveat - Save this information because invalidStandaloneAttDef //changes fTempAttDef if (fValidationEnabled) { if (value != unTrimValue) { if (invalidStandaloneAttDef(element, attributeDecl.name)) { reportRecoverableXMLError(XMLMessages.MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE, XMLMessages.VC_STANDALONE_DOCUMENT_DECLARATION, fStringPool.toString(attributeDecl.name.rawname), unTrimValue, value); } } } try { if ( isAlistAttribute ) { fValNMTOKENS.validate( value, null ); } else { fValNMTOKEN.validate( value, null ); } } catch ( InvalidDatatypeValueException ex ) { reportRecoverableXMLError(XMLMessages.MSG_NMTOKEN_INVALID, XMLMessages.VC_NAME_TOKEN, fStringPool.toString(attributeDecl.name.rawname), value);//TODO NMTOKENS messge } } break; } if ( av != null ) av.normalize(element, attributeDecl.name, attValue, attributeDecl.type, attributeDecl.enumeration); } | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/b36768aae85d6d13bc8c8289ca78efb212c8fb8f/XMLValidator.java/buggy/src/org/apache/xerces/validators/common/XMLValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1954,
25728,
4589,
12,
13688,
930,
16,
509,
2403,
620,
16,
4766,
4202,
3167,
1499,
3456,
1566,
3456,
13,
1216,
1185,
95,
3639,
3601,
5126,
1712,
273,
446,
31,
3639,
1620,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1954,
25728,
4589,
12,
13688,
930,
16,
509,
2403,
620,
16,
4766,
4202,
3167,
1499,
3456,
1566,
3456,
13,
1216,
1185,
95,
3639,
3601,
5126,
1712,
273,
446,
31,
3639,
1620,
261,
... |
public Object doInHibernate( Session session ) throws HibernateException { ExpressionExperiment toDeletePers = ( ExpressionExperiment ) session.merge( toDelete ); Set<BioAssayDimension> dims = new HashSet<BioAssayDimension>(); Collection<DesignElementDataVector> designElementDataVectors = toDeletePers .getDesignElementDataVectors(); int count = 0; AuditTrail at; // reused a couple times to delete the audit trails for ( DesignElementDataVector dv : designElementDataVectors ) { BioAssayDimension dim = dv.getBioAssayDimension(); dims.add( dim ); session.delete( dv ); if ( ++count % 1000 == 0 ) { log.info( count + " design Element data vectors deleted" ); } } for ( BioAssayDimension dim : dims ) { session.delete( dim ); } // Delete BioMaterials for ( BioAssay ba : toDeletePers.getBioAssays() ) { // fixme this needs to be here for lazy loading issues. Even though the AD isn't getting removed. // Not happy about this at all. but what to do? ba.getArrayDesignUsed().getCompositeSequences().size(); for ( BioMaterial bm : ba.getSamplesUsed() ) { session.delete( bm ); } // delete references to files on disk for ( LocalFile lf : ba.getDerivedDataFiles() ) { for ( LocalFile sf : lf.getSourceFiles() ) session.delete( sf ); session.delete( lf ); } // Delete raw data files if ( ba.getRawDataFile() != null ) session.delete( ba.getRawDataFile() ); // remove the bioassay audit trail at = ba.getAuditTrail(); if ( at != null ) { for ( AuditEvent event : at.getEvents() ) session.delete( event ); session.delete( at ); } log.info( "Removed BioAssay " + ba.getName() + " and its assciations." ); } // Remove audit information for ee from the db. We might want to keep this but...... at = toDeletePers.getAuditTrail(); if ( at != null ) { for ( AuditEvent event : at.getEvents() ) session.delete( event ); session.delete( at ); } session.delete( toDeletePers ); session.flush(); session.clear(); return null; } | 4335 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4335/7afbf9af91060a013bf8035debf4e0fc0e53005f/ExpressionExperimentDaoImpl.java/buggy/gemma-mda/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperimentDaoImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1033,
741,
382,
44,
24360,
12,
3877,
1339,
262,
1216,
670,
24360,
503,
288,
7734,
5371,
22338,
358,
2613,
14781,
273,
261,
5371,
22338,
262,
1339,
18,
2702,
12,
358,
2613,
11272,
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,
2398,
1071,
1033,
741,
382,
44,
24360,
12,
3877,
1339,
262,
1216,
670,
24360,
503,
288,
7734,
5371,
22338,
358,
2613,
14781,
273,
261,
5371,
22338,
262,
1339,
18,
2702,
12,
358,
2613,
11272,
7... | ||
Category cat = new Category(label); | TaskCategory cat = new TaskCategory(label); | public void run() { String label = getLabelNameFromUser("Category"); if(label == null) return; Category cat = new Category(label); MylarTasksPlugin.getTaskListManager().getTaskList().addCategory(cat); viewer.refresh(); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/273d665c03a440d803466633f77834fcb5484dc6/TaskListView.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1086,
1435,
288,
5411,
514,
1433,
273,
11237,
461,
1265,
1299,
2932,
4457,
8863,
5411,
309,
12,
1925,
422,
446,
13,
327,
31,
5411,
3837,
4457,
6573,
273,
394,
3837,
4457,
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,
540,
1071,
918,
1086,
1435,
288,
5411,
514,
1433,
273,
11237,
461,
1265,
1299,
2932,
4457,
8863,
5411,
309,
12,
1925,
422,
446,
13,
327,
31,
5411,
3837,
4457,
6573,
273,
394,
3837,
4457,
12,
... |
public org.quickfix.field.UnderlyingCFICode getUnderlyingCFICode() throws FieldNotFound { org.quickfix.field.UnderlyingCFICode value = new org.quickfix.field.UnderlyingCFICode(); | public quickfix.field.UnderlyingCFICode getUnderlyingCFICode() throws FieldNotFound { quickfix.field.UnderlyingCFICode value = new quickfix.field.UnderlyingCFICode(); | public org.quickfix.field.UnderlyingCFICode getUnderlyingCFICode() throws FieldNotFound { org.quickfix.field.UnderlyingCFICode value = new org.quickfix.field.UnderlyingCFICode(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/MassQuote.java/clean/src/java/src/quickfix/fix44/MassQuote.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
39,
1653,
1085,
10833,
765,
6291,
39,
1653,
1085,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
39,
1653,
1085,
10833,
765,
6291,
39,
1653,
1085,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,... |
return "LOCALROOT"; | return AntStringUtils.replace(root, WOPropertiesHandler.LOCAL_ROOT, "LOCALROOT"); | public String getRootPrefix() throws BuildException { if (isWORoot()) { return "WOROOT"; } else if (isHomeRoot()) { return "HOMEROOT"; } else if (isLocalRoot()) { return "LOCALROOT"; } else if (isAbsoluteRoot()) { return getRoot(); } else { throw new BuildException("Unrecognized or indefined root: " + root); } } | 46678 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46678/1dd59c24b0c6f468a4d83c050331cad4e6672d51/FrameworkSet.java/clean/src/java/org/objectstyle/woproject/ant/FrameworkSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
7656,
2244,
1435,
1216,
18463,
288,
202,
202,
430,
261,
291,
5613,
1632,
10756,
288,
1082,
202,
2463,
315,
5613,
51,
1974,
14432,
202,
202,
97,
469,
309,
261,
291,
8684,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7656,
2244,
1435,
1216,
18463,
288,
202,
202,
430,
261,
291,
5613,
1632,
10756,
288,
1082,
202,
2463,
315,
5613,
51,
1974,
14432,
202,
202,
97,
469,
309,
261,
291,
8684,
... |
if (stringStart >= 0 || stringSoFar != null) { hadCFSinceStringStart = true; | if (offset != 0) { char tmp = buffer[offset]; buffer[offset] = buffer[offset - 1]; buffer[offset - 1] = tmp; | private void skipFormatChar() { if (checkSelf && !formatChar(buffer[offset])) Context.codeBug(); if (stringStart >= 0 || stringSoFar != null) { hadCFSinceStringStart = true; } else { // swap prev character with format one so possible call to // startString can assume that previous non-format char is at // offset - 1. Note it causes getLine to return not exactly the // source LineBuffer read, but it is used only in error reporting // and should not be a problem. if (offset != 0) { char tmp = buffer[offset]; buffer[offset] = buffer[offset - 1]; buffer[offset - 1] = tmp; } else if (otherEnd != 0) { char tmp = buffer[offset]; buffer[offset] = otherBuffer[otherEnd - 1]; otherBuffer[otherEnd - 1] = tmp; } } ++offset; } | 12564 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12564/7a4f64b04bdcf411e9d60e0c1ffdfcdaee61117d/LineBuffer.java/clean/src/org/mozilla/javascript/LineBuffer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2488,
1630,
2156,
1435,
288,
3639,
309,
261,
1893,
10084,
597,
401,
2139,
2156,
12,
4106,
63,
3348,
22643,
1772,
18,
710,
19865,
5621,
3639,
309,
261,
1080,
1685,
1545,
374,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2488,
1630,
2156,
1435,
288,
3639,
309,
261,
1893,
10084,
597,
401,
2139,
2156,
12,
4106,
63,
3348,
22643,
1772,
18,
710,
19865,
5621,
3639,
309,
261,
1080,
1685,
1545,
374,
74... |
if(lproj != null && lproj.getFileExtension().equals("lproj")) { | if(lproj != null && "lprog".equals(lproj.getFileExtension())) { | public Object[] getElements(Object parent) { IWOLipsResource wolipsResource = null; // MS: If we add the dependency it is a circular dependency, so that // sucks ... We'll just do it Reflection-Style. if (parent != null && parent.getClass().getName().equals("org.objectstyle.wolips.components.input.ComponentEditorFileEditorInput")) { try { parent = parent.getClass().getMethod("getFile", null).invoke(parent, null); } catch (Exception e) { e.printStackTrace(); } // System.out.println("ViewContentProvider.getElements: " + // parent); } else if (parent != null && parent.getClass().getName().startsWith("org.eclipse.wst")) { // MS: Total hack ... HTML editor returns its element as a // TextImpl. I'm not how to get back to the IResource from // that. It just so happens that there's always a previous // selection that is something we CAN use parent = lastParent; // try { // Object structuredDocRegion = // parent.getClass().getMethod("getFirstStructuredDocumentRegion", // null).invoke(parent, null); // Object structuredDoc = // structuredDocRegion.getClass().getMethod("getParentDocument", // null).invoke(structuredDocRegion, null); // System.out.println("ViewContentProvider.getElements: " + // structuredDoc); // } // catch (Exception e) { // e.printStackTrace(); // } } if (parent instanceof IFileEditorInput) { IFileEditorInput input = (IFileEditorInput) parent; try { // HACK AK: we should use sth more generic here if ("java".equals(input.getFile().getFileExtension())) { parent = JavaCore.createCompilationUnitFrom(input.getFile()); } } catch (Exception ex) { UIPlugin.getDefault().log(ex); } } if (parent instanceof IMember) { parent = ((IMember) parent).getCompilationUnit(); } if (parent instanceof IResource) { wolipsResource = WOLipsCore.getWOLipsModel().getWOLipsResource((IResource) parent); // getViewer().setInput(wolipsResource); } else if (parent instanceof ICompilationUnit) { wolipsResource = WOLipsCore.getWOLipsModel().getWOLipsCompilationUnit((ICompilationUnit) parent); } List result = new LinkedList(); if (wolipsResource != null) { try { List list = (wolipsResource).getRelatedResources(); result.addAll(list); } catch (Exception e) { UIPlugin.getDefault().log(e); } } else if(parent != null && parent instanceof IResource) { try { final IResource resource = (IResource)parent; final List list = new ArrayList(); IContainer lproj = resource.getParent(); if(lproj != null && lproj.getFileExtension().equals("lproj")) { IContainer p = lproj.getParent(); p.accept(new IResourceProxyVisitor() { public boolean visit(IResourceProxy proxy) throws CoreException { if(proxy.getName().endsWith(".lproj")) { IContainer f = (IContainer) proxy.requestResource(); IResource m = f.findMember(resource.getName()); if(m != null) { list.add(m); } } return true; } }, IContainer.DEPTH_ONE); result.addAll(list); } } catch (Exception e) { UIPlugin.getDefault().log(e); } } lastParent = parent; Object[] resultList = result.toArray(); // labelProvider needs the element list to check for duplicate // filenames labelProvider.setResultList(resultList); return resultList; } | 2575 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2575/2fef6cda40b47b8200c52e73c5a2d295a223e42f/RelatedView.java/clean/wolips/core/plugins/org.objectstyle.wolips.ui/java/org/objectstyle/wolips/ui/view/RelatedView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1033,
8526,
8886,
12,
921,
982,
13,
288,
1082,
202,
45,
59,
1741,
7146,
1420,
341,
355,
7146,
1420,
273,
446,
31,
1082,
202,
759,
9238,
30,
971,
732,
527,
326,
4904,
518,
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,
3196,
202,
482,
1033,
8526,
8886,
12,
921,
982,
13,
288,
1082,
202,
45,
59,
1741,
7146,
1420,
341,
355,
7146,
1420,
273,
446,
31,
1082,
202,
759,
9238,
30,
971,
732,
527,
326,
4904,
518,
3... |
gl.glBindTexture(GL.GL_TEXTURE_2D, light_image); gl.glEnable(GL.GL_TEXTURE_2D); | light_image.bind(); light_image.enable(); | private void render_scene_from_camera_view(GL gl, GLAutoDrawable drawable, CameraParameters params) { // place light gl.glPushMatrix(); gl.glLoadIdentity(); applyTransform(gl, cameraInverseTransform); applyTransform(gl, spotlightTransform); gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, light_pos, 0); gl.glPopMatrix(); // spot image gl.glActiveTexture(GL.GL_TEXTURE1); gl.glPushMatrix(); applyTransform(gl, cameraInverseTransform); eye_linear_texgen(gl); texgen(gl, true); gl.glPopMatrix(); gl.glMatrixMode(GL.GL_TEXTURE); gl.glLoadIdentity(); gl.glTranslatef(.5f, .5f, .5f); gl.glScalef(.5f, .5f, .5f); glu.gluPerspective(lightshaper_fovy, 1, lightshaper_zNear, lightshaper_zFar); applyTransform(gl, spotlightInverseTransform); gl.glMatrixMode(GL.GL_MODELVIEW); gl.glBindTexture(GL.GL_TEXTURE_2D, light_image); gl.glEnable(GL.GL_TEXTURE_2D); gl.glTexEnvi(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_MODULATE); gl.glActiveTexture(GL.GL_TEXTURE0); gl.glMatrixMode(GL.GL_PROJECTION); gl.glLoadIdentity(); gl.glViewport(viewportX, viewportY, drawable.getWidth(), drawable.getHeight()); applyTransform(gl, cameraPerspective); gl.glMatrixMode(GL.GL_MODELVIEW); render_scene(gl, cameraTransform, drawable, params); gl.glActiveTexture(GL.GL_TEXTURE1); gl.glDisable(GL.GL_TEXTURE_2D); gl.glActiveTexture(GL.GL_TEXTURE0); render_manipulators(gl, cameraTransform, drawable, params); render_light_frustum(gl); } | 49209 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49209/2e32df6eb0181d50f002e0dfe055572b60088428/HWShadowmapsSimple.java/clean/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1743,
67,
23694,
67,
2080,
67,
26426,
67,
1945,
12,
11261,
5118,
16,
611,
2534,
3003,
16149,
19021,
16,
30355,
2402,
859,
13,
288,
565,
368,
3166,
9052,
565,
5118,
18,
7043,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3238,
918,
1743,
67,
23694,
67,
2080,
67,
26426,
67,
1945,
12,
11261,
5118,
16,
611,
2534,
3003,
16149,
19021,
16,
30355,
2402,
859,
13,
288,
565,
368,
3166,
9052,
565,
5118,
18,
7043,
... |
c = c.add(eqModCost.multiply(new BigDecimal(Integer.toString(getBaseQty() * iCount)))); | if (aEqMod.isType("BaseMaterial")) { eqModCost = eqModCost.multiply(new BigDecimal(getBaseQty())); } c = c.add(eqModCost); | public BigDecimal getCost(final PlayerCharacter aPC) { BigDecimal c = BigDecimalHelper.ZERO; // // Do pre-sizing cost increment. // eg. in the case of adamantine armor, want to add // the cost of the metal before the armor gets resized. // for (Iterator e = eqModifierList.iterator(); e.hasNext();) { final EquipmentModifier aEqMod = (EquipmentModifier) e.next(); int iCount = aEqMod.getAssociatedCount(); if (iCount < 1) { iCount = 1; } final BigDecimal eqModCost = new BigDecimal(getVariableValue(aEqMod.getPreCost(), "", true, aPC).toString()); c = c.add(eqModCost.multiply(new BigDecimal(Integer.toString(getBaseQty() * iCount)))); c = c.add(aEqMod.addItemCosts(aPC, "ITEMCOST", getBaseQty() * iCount, this)); } for (Iterator e = altEqModifierList.iterator(); e.hasNext();) { final EquipmentModifier aEqMod = (EquipmentModifier) e.next(); int iCount = aEqMod.getAssociatedCount(); if (iCount < 1) { iCount = 1; } final BigDecimal eqModCost = new BigDecimal(getVariableValue(aEqMod.getPreCost(), "", false, aPC).toString()); c = c.add(eqModCost.multiply(new BigDecimal(Integer.toString(getBaseQty() * iCount)))); c = c.add(aEqMod.addItemCosts(aPC, "ITEMCOST", iCount, this)); } // // c has cost of the item's modifications at the item's original size // double mult = 1.0; final SizeAdjustment newSA = SettingsHandler.getGame().getSizeAdjustmentNamed(getSize()); final SizeAdjustment currSA = SettingsHandler.getGame().getSizeAdjustmentNamed(getBaseSize()); if ((newSA != null) && (currSA != null)) { mult = newSA.getBonusTo(aPC, "ITEMCOST", typeList(), 1.0) / currSA.getBonusTo(aPC, "ITEMCOST", typeList(), 1.0); } c = c.multiply(new BigDecimal(mult)); BigDecimal itemCost = cost.add(c); final List modifierCosts = new ArrayList(); BigDecimal nonDoubleCost = BigDecimalHelper.ZERO; c = BigDecimalHelper.ZERO; int iPlus = 0; int altPlus = 0; calculatingCost = true; weightAlreadyUsed = false; for (Iterator e = eqModifierList.iterator(); e.hasNext();) { final EquipmentModifier aEqMod = (EquipmentModifier) e.next(); int iCount = aEqMod.getAssociatedCount(); if (iCount < 1) { iCount = 1; } BigDecimal eqModCost; String costFormula = aEqMod.getCost(); if ((aEqMod.getAssociatedCount() > 0) && !costFormula.equals(aEqMod.getCost(0))) { eqModCost = BigDecimalHelper.ZERO; for (int idx = 0; idx < aEqMod.getAssociatedCount(); ++idx) { costFormula = aEqMod.getCost(idx); final BigDecimal thisModCost = new BigDecimal(getVariableValue(costFormula, "", true, aPC).toString()); eqModCost = eqModCost.add(thisModCost); if (!aEqMod.getCostDouble()) { nonDoubleCost = nonDoubleCost.add(thisModCost); } else { modifierCosts.add(thisModCost); } } iCount = 1; } else { eqModCost = new BigDecimal(getVariableValue(costFormula, "", true, aPC).toString()); if (!aEqMod.getCostDouble()) { nonDoubleCost = nonDoubleCost.add(eqModCost); } else { modifierCosts.add(eqModCost); } } c = c.add(eqModCost.multiply(new BigDecimal(Integer.toString(getBaseQty() * iCount)))); iPlus += (aEqMod.getPlus() * iCount); } // // Get costs from lowest to highest // if (modifierCosts.size() > 1) { Collections.sort(modifierCosts); } for (Iterator e = altEqModifierList.iterator(); e.hasNext();) { final EquipmentModifier aEqMod = (EquipmentModifier) e.next(); int iCount = aEqMod.getAssociatedCount(); if (iCount < 1) { iCount = 1; } final String costFormula = aEqMod.getCost(); final BigDecimal eqModCost = new BigDecimal(getVariableValue(costFormula, "", false, aPC).toString()); c = c.add(eqModCost.multiply(new BigDecimal(Integer.toString(getBaseQty() * iCount)))); altPlus += (aEqMod.getPlus() * iCount); } calculatingCost = false; c = c.add(getCostFromPluses(iPlus, altPlus)); // // Items with values less than 1 gp have their prices rounded up to 1 gp per item // eg. 20 Arrows cost 1 gp, or 5 cp each. 1 MW Arrow costs 7 gp. // // Masterwork and Magical ammo is made in batches of 50, so the MW cost per item // should be 6 gp. This would give a cost of 6.05 gp per arrow, 6.1 gp per bolt and 6.01 gp // per bullet. // if (c.compareTo(BigDecimalHelper.ZERO) != 0) { // // Convert to double and use math.ceil as ROUND_CEILING doesn't appear to work // on BigDecimal.divide final int baseQ = getBaseQty(); itemCost = new BigDecimal(Math.ceil(itemCost.doubleValue() / baseQ) * baseQ); } if (!isAmmunition() && !isArmor() && !isShield() && !isWeapon()) { // // If item doesn't occupy a fixed location, then double the cost of the modifications // DMG p.243 // if (!isMagicLimitedType()) { // // TODO: Multiple similar abilities. 100% of costliest, 75% of next, and 50% of rest // if (!ignoresCostDouble()) { c = c.subtract(nonDoubleCost).multiply(new BigDecimal("2")); c = c.add(nonDoubleCost); //c = c.multiply(new BigDecimal("2")); } } else { // // Add in the cost of 2nd, 3rd, etc. modifiers again (gives times 2) // for (int i = modifierCosts.size() - 2; i >= 0; --i) { c = c.add((BigDecimal) modifierCosts.get(i)); } } } return c.add(itemCost).add(costMod); } | 48301 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48301/2d3c416a1505b82dc3f5b94cb51a0b485beac511/Equipment.java/clean/code/src/java/pcgen/core/Equipment.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8150,
1927,
669,
12,
6385,
19185,
7069,
279,
3513,
13,
202,
95,
202,
202,
29436,
276,
273,
8150,
2276,
18,
24968,
31,
202,
202,
759,
202,
202,
759,
2256,
675,
17,
87,
6894,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8150,
1927,
669,
12,
6385,
19185,
7069,
279,
3513,
13,
202,
95,
202,
202,
29436,
276,
273,
8150,
2276,
18,
24968,
31,
202,
202,
759,
202,
202,
759,
2256,
675,
17,
87,
6894,
... |
TextMessage m2 = (TextMessage)cons.receive(3000); | TextMessage m2 = (TextMessage)cons.receive(1000); | public void test2PCReceiveCommit() throws Exception { if (ServerManagement.isRemote()) return; XAConnection conn = null; Connection conn2 = null; try { conn2 = cf.createConnection(); conn2.start(); Session sessProducer = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer prod = sessProducer.createProducer(queue); Message m = sessProducer.createTextMessage("XATest2"); prod.send(m); conn = cf.createXAConnection(); conn.start(); tm.begin(); XASession sess = conn.createXASession(); XAResource res = sess.getXAResource(); //We also create and enroll another xa resource so the tx mgr uses //2pc protocol XAResource res2 = new DummyXAResource(); Transaction tx = tm.getTransaction(); tx.enlistResource(res); tx.enlistResource(res2); MessageConsumer cons = sess.createConsumer(queue); TextMessage m2 = (TextMessage)cons.receive(3000); assertNotNull(m2); assertEquals("XATest2", m2.getText()); tx.commit(); //New tx tm.begin(); tx = tm.getTransaction(); tx.enlistResource(res); tx.enlistResource(res2); Message m3 = cons.receive(3000); assertNull(m3); tm.commit(); } finally { if (conn != null) { conn.close(); } if (conn2 != null) { conn2.close(); } } } | 3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/90e4b161b21b8aef910dbc6f515ceceadf11bf49/XATest.java/buggy/tests/src/org/jboss/test/messaging/jms/XATest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1842,
22,
3513,
11323,
5580,
1435,
1216,
1185,
282,
288,
1377,
309,
261,
2081,
10998,
18,
291,
5169,
10756,
327,
31,
5411,
12410,
1952,
1487,
273,
446,
31,
1377,
4050,
1487,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
565,
1071,
918,
1842,
22,
3513,
11323,
5580,
1435,
1216,
1185,
282,
288,
1377,
309,
261,
2081,
10998,
18,
291,
5169,
10756,
327,
31,
5411,
12410,
1952,
1487,
273,
446,
31,
1377,
4050,
1487,
22... |
case 20: | case 20: /* reduce AAvalueqvalorsid1ValOrSid */ | public Start parse() throws ParserException, LexerException, IOException { push(0, null); List ign = null; while(true) { while(index(lexer.peek()) == -1) { if(ign == null) { ign = new TypedLinkedList(NodeCast.instance); } ign.add(lexer.next()); } if(ign != null) { ignoredTokens.setIn(lexer.peek(), ign); ign = null; } last_pos = lexer.peek().getPos(); last_line = lexer.peek().getLine(); last_token = lexer.peek(); int index = index(lexer.peek()); action[0] = actionTable[state()][0][1]; action[1] = actionTable[state()][0][2]; int low = 1; int high = actionTable[state()].length - 1; while(low <= high) { int middle = (low + high) / 2; if(index < actionTable[state()][middle][0]) { high = middle - 1; } else if(index > actionTable[state()][middle][0]) { low = middle + 1; } else { action[0] = actionTable[state()][middle][1]; action[1] = actionTable[state()][middle][2]; break; } } switch(action[0]) { case SHIFT: { ArrayList list = new ArrayList(); list.add(lexer.next()); push(action[1], list); last_shift = action[1]; } break; case REDUCE: switch(action[1]) { case 0: { ArrayList list = new0(); push(goTo(0), list); } break; case 1: { ArrayList list = new1(); push(goTo(0), list); } break; case 2: { ArrayList list = new2(); push(goTo(0), list); } break; case 3: { ArrayList list = new3(); push(goTo(0), list); } break; case 4: { ArrayList list = new4(); push(goTo(1), list); } break; case 5: { ArrayList list = new5(); push(goTo(1), list); } break; case 6: { ArrayList list = new6(); push(goTo(1), list); } break; case 7: { ArrayList list = new7(); push(goTo(1), list); } break; case 8: { ArrayList list = new8(); push(goTo(1), list); } break; case 9: { ArrayList list = new9(); push(goTo(1), list); } break; case 10: { ArrayList list = new10(); push(goTo(1), list); } break; case 11: { ArrayList list = new11(); push(goTo(1), list); } break; case 12: { ArrayList list = new12(); push(goTo(2), list); } break; case 13: { ArrayList list = new13(); push(goTo(2), list); } break; case 14: { ArrayList list = new14(); push(goTo(2), list); } break; case 15: { ArrayList list = new15(); push(goTo(2), list); } break; case 16: { ArrayList list = new16(); push(goTo(3), list); } break; case 17: { ArrayList list = new17(); push(goTo(4), list); } break; case 18: { ArrayList list = new18(); push(goTo(4), list); } break; case 19: { ArrayList list = new19(); push(goTo(5), list); } break; case 20: { ArrayList list = new20(); push(goTo(5), list); } break; case 21: { ArrayList list = new21(); push(goTo(5), list); } break; case 22: { ArrayList list = new22(); push(goTo(5), list); } break; case 23: { ArrayList list = new23(); push(goTo(5), list); } break; case 24: { ArrayList list = new24(); push(goTo(5), list); } break; case 25: { ArrayList list = new25(); push(goTo(6), list); } break; case 26: { ArrayList list = new26(); push(goTo(7), list); } break; case 27: { ArrayList list = new27(); push(goTo(7), list); } break; case 28: { ArrayList list = new28(); push(goTo(8), list); } break; case 29: { ArrayList list = new29(); push(goTo(8), list); } break; case 30: { ArrayList list = new30(); push(goTo(9), list); } break; case 31: { ArrayList list = new31(); push(goTo(9), list); } break; case 32: { ArrayList list = new32(); push(goTo(10), list); } break; case 33: { ArrayList list = new33(); push(goTo(10), list); } break; } break; case ACCEPT: { EOF node2 = (EOF) lexer.next(); PBibtex node1 = (PBibtex) ((ArrayList)pop()).get(0); Start node = new Start(node1, node2); return node; } case ERROR: throw new ParserException(last_token, "[" + last_line + "," + last_pos + "] " + errorMessages[errors[action[1]]]); } } } | 50059 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50059/a343b73e05abe516d42c4d6672f63a8325be4a98/Parser.java/buggy/sub/source/net/sourceforge/texlipse/bibparser/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3603,
1109,
1435,
1216,
27990,
16,
14234,
503,
16,
1860,
565,
288,
3639,
1817,
12,
20,
16,
446,
1769,
3639,
987,
9750,
273,
446,
31,
3639,
1323,
12,
3767,
13,
3639,
288,
5411,
132... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3603,
1109,
1435,
1216,
27990,
16,
14234,
503,
16,
1860,
565,
288,
3639,
1817,
12,
20,
16,
446,
1769,
3639,
987,
9750,
273,
446,
31,
3639,
1323,
12,
3767,
13,
3639,
288,
5411,
132... |
ErrorDialog dlg = new ErrorDialog( Messages.getString( "WizardBase.error.ErrorsEncountered" ), | ErrorDialog dlg = new ErrorDialog( shellParent, Messages.getString( "WizardBase.error.ErrorsEncountered" ), | public void displayError( String[] sErrors, String[] sFixes, String[] sTaskIDs, IWizardContext currentContext, Object[] hints ) { if ( sErrors != null && sErrors.length > 0 ) { this.errorHints = hints; ErrorDialog dlg = new ErrorDialog( Messages.getString( "WizardBase.error.ErrorsEncountered" ), //$NON-NLS-1$ Messages.getString( "WizardBase.error.FollowingErrorEncountered" ), //$NON-NLS-1$ sErrors, sFixes/* , currentContext, errorHints */); if ( dlg.getOption( ) == ErrorDialog.OPTION_ACCEPT ) { // TODO: FIX THE PROBLEM } else { // TODO: PROCEED WITHOUT FIXING THE PROBLEM } } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/f4298611861d413e6f895c73f8dde535a9a1d9d2/WizardBase.java/clean/core/org.eclipse.birt.core.ui/src/org/eclipse/birt/core/ui/frameworks/taskwizard/WizardBase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2562,
668,
12,
514,
8526,
272,
4229,
16,
514,
8526,
272,
8585,
281,
16,
1082,
202,
780,
8526,
272,
2174,
5103,
16,
467,
27130,
1042,
31184,
16,
1033,
8526,
13442,
262,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2562,
668,
12,
514,
8526,
272,
4229,
16,
514,
8526,
272,
8585,
281,
16,
1082,
202,
780,
8526,
272,
2174,
5103,
16,
467,
27130,
1042,
31184,
16,
1033,
8526,
13442,
262,
20... |
String token = ""; | String token = Util.EMPTY_STRING; | public static String[] tokenize(String commandLine) { int count = 0; String[] arguments = new String[10]; StringTokenizer tokenizer = new StringTokenizer(commandLine, " \"", true); //$NON-NLS-1$ String token = ""; //$NON-NLS-1$ boolean insideQuotes = false; boolean startNewToken = true; // take care to quotes on the command line // 'xxx "aaa bbb";ccc yyy' ---> {"xxx", "aaa bbb;ccc", "yyy" } // 'xxx "aaa bbb;ccc" yyy' ---> {"xxx", "aaa bbb;ccc", "yyy" } // 'xxx "aaa bbb";"ccc" yyy' ---> {"xxx", "aaa bbb;ccc", "yyy" } // 'xxx/"aaa bbb";"ccc" yyy' ---> {"xxx/aaa bbb;ccc", "yyy" } while (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken(); if (token.equals(" ")) { //$NON-NLS-1$ if (insideQuotes) { arguments[count - 1] += token; startNewToken = false; } else { startNewToken = true; } } else if (token.equals("\"")) { //$NON-NLS-1$ if (!insideQuotes && startNewToken) { if (count == arguments.length) System.arraycopy(arguments, 0, (arguments = new String[count * 2]), 0, count); arguments[count++] = ""; //$NON-NLS-1$ } insideQuotes = !insideQuotes; startNewToken = false; } else { if (insideQuotes) { arguments[count - 1] += token; } else { if (token.length() > 0 && !startNewToken) { arguments[count - 1] += token; } else { if (count == arguments.length) System.arraycopy(arguments, 0, (arguments = new String[count * 2]), 0, count); String trimmedToken = token.trim(); if (trimmedToken.length() != 0) { arguments[count++] = trimmedToken; } } } startNewToken = false; } } System.arraycopy(arguments, 0, arguments = new String[count], 0, count); return arguments; } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/473e73e956d6ff2c0ecfedc365eaef22bfab27ea/Main.java/clean/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
8526,
13672,
12,
780,
20894,
13,
288,
1082,
202,
474,
1056,
273,
374,
31,
202,
202,
780,
8526,
1775,
273,
394,
514,
63,
2163,
15533,
202,
202,
780,
10524,
10123,
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,
225,
202,
482,
760,
514,
8526,
13672,
12,
780,
20894,
13,
288,
1082,
202,
474,
1056,
273,
374,
31,
202,
202,
780,
8526,
1775,
273,
394,
514,
63,
2163,
15533,
202,
202,
780,
10524,
10123,
273... |
message = messageString; | message = messageString == null ? "" : messageString; | private void setMessage(String messageString) { message = messageString; if (messageLabel == null || messageLabel.isDisposed()) return; messageLabel.setText(message);} | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/a5be2dc9b1f487b3b2f754d2a87a2ce0afbc5955/ProgressMonitorDialog.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/ProgressMonitorDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
15227,
12,
780,
883,
780,
13,
288,
202,
2150,
273,
883,
780,
31,
202,
430,
261,
2150,
2224,
422,
446,
747,
883,
2224,
18,
291,
1669,
7423,
10756,
202,
202,
2463,
31,
202,
2150,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
15227,
12,
780,
883,
780,
13,
288,
202,
2150,
273,
883,
780,
31,
202,
430,
261,
2150,
2224,
422,
446,
747,
883,
2224,
18,
291,
1669,
7423,
10756,
202,
202,
2463,
31,
202,
2150,
... |
il.append(InstructionConstants.DUP); | private Method createProxyMethod(final ConstantPoolGen cp, final ClassGen cg, final String originalMethodName, final MethodGen originalMethod, final InstructionFactory factory, final int methodId, final int methodSequence, final int accessFlags, final String uuid, final String controllerClassName) { final InstructionList il = new InstructionList(); final Type[] parameterTypes = Type.getArgumentTypes(originalMethod.getSignature()); final String[] parameterNames = originalMethod.getArgumentNames(); final Type returnType = Type.getReturnType(originalMethod.getSignature()); final String joinPoint = getJoinPointName(originalMethod.getMethod(), methodSequence); final MethodGen method = new MethodGen( accessFlags, returnType, parameterTypes, parameterNames, originalMethodName, cg.getClassName(), il, cp ); String[] exceptions = originalMethod.getExceptions(); for (int i = 0; i < exceptions.length; i++) { method.addException(exceptions[i]); } int idxParam = 0; int idxStack = 0; int indexJoinPoint = parameterTypes.length * 2 + 1; BranchInstruction biIfNotNull = null; InstructionHandle ihIfNotNull = null; // Object joinPoint = ___jp.get(); il.append(factory.createFieldAccess( cg.getClassName(), joinPoint, new ObjectType(TransformationUtil.THREAD_LOCAL_CLASS), Constants.GETSTATIC )); il.append(factory.createInvoke( TransformationUtil.THREAD_LOCAL_CLASS, "get", Type.OBJECT, Type.NO_ARGS, Constants.INVOKEVIRTUAL )); il.append(factory.createStore(Type.OBJECT, indexJoinPoint)); // if (joinPoint == null) { il.append(factory.createLoad(Type.OBJECT, indexJoinPoint)); biIfNotNull = factory.createBranchInstruction(Constants.IFNONNULL, null); il.append(biIfNotNull); // joinPoint = new StaticMethodJoinPoint(uuid, this, 10); il.append(factory.createNew(TransformationUtil.STATIC_METHOD_JOIN_POINT_CLASS)); // loads the parameters (uuid, the class, the method id) il.append(InstructionConstants.DUP); il.append(new PUSH(cp, uuid)); il.append(factory.createFieldAccess( cg.getClassName(), TransformationUtil.STATIC_CLASS_FIELD, new ObjectType("java.lang.Class"), Constants.GETSTATIC )); il.append(new PUSH(cp, methodId)); il.append(new PUSH(cp, controllerClassName)); // invokes the constructor il.append(factory.createInvoke( TransformationUtil.STATIC_METHOD_JOIN_POINT_CLASS, "<init>", Type.VOID, new Type[]{Type.STRING, new ObjectType("java.lang.Class"), Type.INT, Type.STRING}, Constants.INVOKESPECIAL )); il.append(factory.createStore(Type.OBJECT, indexJoinPoint)); // ___jp.set(joinPoint); il.append(factory.createFieldAccess( cg.getClassName(), joinPoint.toString(), new ObjectType(TransformationUtil.THREAD_LOCAL_CLASS), Constants.GETSTATIC )); il.append(factory.createLoad(Type.OBJECT, indexJoinPoint)); il.append(factory.createInvoke( TransformationUtil.THREAD_LOCAL_CLASS, "set", Type.VOID, new Type[]{Type.OBJECT}, Constants.INVOKEVIRTUAL )); ihIfNotNull = il.append(factory.createLoad(Type.OBJECT, indexJoinPoint)); il.append(factory.createCheckCast( TransformationUtil.STATIC_METHOD_JOIN_POINT_TYPE)); indexJoinPoint += 2; il.append(factory.createStore(Type.OBJECT, indexJoinPoint)); biIfNotNull.setTarget(ihIfNotNull); // if we have parameters, wrap them up if (parameterTypes.length != 0) { // create and allocate the parameters array il.append(new PUSH(cp, parameterTypes.length)); il.append(factory.createNewArray(Type.OBJECT, (short)1)); // put it on the stack il.append(InstructionConstants.DUP); il.append(new PUSH(cp, idxStack)); idxStack++; // add all the parameters, wrap the primitive types in their // object counterparts for (int count = 0; count < parameterTypes.length; count++) { String wrapperClass = null; BasicType type = null; boolean hasLongOrDouble = false; if (parameterTypes[count] instanceof ObjectType || parameterTypes[count] instanceof ArrayType) { // we have an object or an array il.append(factory.createLoad(Type.OBJECT, idxParam)); il.append(InstructionConstants.AASTORE); idxParam++; } else if (parameterTypes[count] instanceof BasicType) { // we have a primitive type hasLongOrDouble = false; if ((parameterTypes[count]).equals(Type.LONG)) { wrapperClass = "java.lang.Long"; type = Type.LONG; hasLongOrDouble = true; } else if ((parameterTypes[count]).equals(Type.INT)) { wrapperClass = "java.lang.Integer"; type = Type.INT; } else if ((parameterTypes[count]).equals(Type.SHORT)) { wrapperClass = "java.lang.Short"; type = Type.SHORT; } else if ((parameterTypes[count]).equals(Type.DOUBLE)) { wrapperClass = "java.lang.Double"; type = Type.DOUBLE; hasLongOrDouble = true; } else if ((parameterTypes[count]).equals(Type.FLOAT)) { wrapperClass = "java.lang.Float"; type = Type.FLOAT; } else if ((parameterTypes[count]).equals(Type.CHAR)) { wrapperClass = "java.lang.Character"; type = Type.CHAR; } else if ((parameterTypes[count]).equals(Type.BYTE)) { wrapperClass = "java.lang.Byte"; type = Type.BYTE; } else if ((parameterTypes[count]).equals(Type.BOOLEAN)) { wrapperClass = "java.lang.Boolean"; type = Type.BOOLEAN; } else { throw new RuntimeException("unknown parameter type: " + parameterTypes[count]); } il.append(factory.createNew(wrapperClass)); il.append(InstructionConstants.DUP); il.append(factory.createLoad(type, idxParam)); il.append(factory.createInvoke( wrapperClass, "<init>", Type.VOID, new Type[]{type}, Constants.INVOKESPECIAL )); il.append(InstructionConstants.AASTORE); idxParam++; } // end handle basic or object type if (count != parameterTypes.length - 1) { // if we don't have the last parameter, // create the parameter on the stack il.append(InstructionConstants.DUP); il.append(new PUSH(cp, idxStack)); idxStack++; // long's and double's needs two registers to fit if (hasLongOrDouble) { idxParam++; } } } // create the object array il.append(factory.createStore(Type.OBJECT, idxParam)); // if threadsafe grab the newly retrieved local join point field from the stack il.append(factory.createLoad(Type.OBJECT, indexJoinPoint)); // invoke joinPoint.setParameter(..) il.append(factory.createLoad(Type.OBJECT, idxParam)); il.append(factory.createInvoke( TransformationUtil.STATIC_METHOD_JOIN_POINT_CLASS, "setParameters", Type.VOID, new Type[]{new ArrayType(Type.OBJECT, 1)}, Constants.INVOKEVIRTUAL )); idxParam++; } // end - if parameters.length != 0 // if threadsafe grab the newly retrieved local join point field from the stack il.append(factory.createLoad(Type.OBJECT, indexJoinPoint)); il.append(factory.createInvoke( TransformationUtil.STATIC_METHOD_JOIN_POINT_CLASS, "proceed", Type.OBJECT, Type.NO_ARGS, Constants.INVOKEVIRTUAL )); if (!returnType.equals(Type.VOID)) { // create the result from the invocation il.append(factory.createStore(Type.OBJECT, idxParam)); il.append(factory.createLoad(Type.OBJECT, idxParam)); // cast the result and return it, if the return type is a // primitive type, retrieve it from the wrapped object first if (returnType instanceof BasicType) { if (returnType.equals(Type.LONG)) { il.append(factory.createCheckCast( new ObjectType("java.lang.Long") )); il.append(factory.createInvoke( "java.lang.Long", "longValue", Type.LONG, Type.NO_ARGS, Constants.INVOKEVIRTUAL )); } else if (returnType.equals(Type.INT)) { il.append(factory.createCheckCast( new ObjectType("java.lang.Integer") )); il.append(factory.createInvoke( "java.lang.Integer", "intValue", Type.INT, Type.NO_ARGS, Constants.INVOKEVIRTUAL )); } else if (returnType.equals(Type.SHORT)) { il.append(factory.createCheckCast( new ObjectType("java.lang.Short") )); il.append(factory.createInvoke( "java.lang.Short", "shortValue", Type.SHORT, Type.NO_ARGS, Constants.INVOKEVIRTUAL )); } else if (returnType.equals(Type.DOUBLE)) { il.append(factory.createCheckCast( new ObjectType("java.lang.Double") )); il.append(factory.createInvoke( "java.lang.Double", "doubleValue", Type.DOUBLE, Type.NO_ARGS, Constants.INVOKEVIRTUAL )); } else if (returnType.equals(Type.FLOAT)) { il.append(factory.createCheckCast( new ObjectType("java.lang.Float") )); il.append(factory.createInvoke( "java.lang.Float", "floatValue", Type.FLOAT, Type.NO_ARGS, Constants.INVOKEVIRTUAL )); } else if (returnType.equals(Type.CHAR)) { il.append(factory.createCheckCast( new ObjectType("java.lang.Character") )); il.append(factory.createInvoke( "java.lang.Character", "charValue", Type.CHAR, Type.NO_ARGS, Constants.INVOKEVIRTUAL )); } else if (returnType.equals(Type.BYTE)) { il.append(factory.createCheckCast( new ObjectType("java.lang.Byte") )); il.append(factory.createInvoke( "java.lang.Byte", "byteValue", Type.BYTE, Type.NO_ARGS, Constants.INVOKEVIRTUAL )); } else if (returnType.equals(Type.BOOLEAN)) { il.append(factory.createCheckCast( new ObjectType("java.lang.Boolean") )); il.append(factory.createInvoke( "java.lang.Boolean", "booleanValue", Type.BOOLEAN, Type.NO_ARGS, Constants.INVOKEVIRTUAL )); } else if (returnType.equals(Type.VOID)) { ;// skip } else { throw new RuntimeException("unknown return type: " + returnType); } } else { // cast the result to the right type il.append(factory.createCast(Type.OBJECT, returnType)); } } il.append(factory.createReturn(returnType)); method.setMaxStack(); method.setMaxLocals(); return method.getMethod(); } | 7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/0f38685465e9ec04c2eb3ed5b097b7340f71886a/AdviseStaticMethodTransformer.java/clean/aspectwerkz/src/main/org/codehaus/aspectwerkz/transform/AdviseStaticMethodTransformer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
2985,
752,
3886,
1305,
12,
6385,
10551,
2864,
7642,
3283,
16,
19694,
727,
1659,
7642,
14947,
16,
19694,
727,
514,
2282,
11666,
16,
19694,
727,
2985,
7642,
2282,
1305,
16,
19694,
727,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2985,
752,
3886,
1305,
12,
6385,
10551,
2864,
7642,
3283,
16,
19694,
727,
1659,
7642,
14947,
16,
19694,
727,
514,
2282,
11666,
16,
19694,
727,
2985,
7642,
2282,
1305,
16,
19694,
727,
... | |
} | } | private void checkMethodsCallSuperclassMethod(Iterator heirarchyClasses) { while(heirarchyClasses.hasNext()) { Class descendant= (Class) heirarchyClasses.next(); if(!ASTNode.class.equals(descendant)) TestHierarchicalASTVisitor.checkMethodCallsSuperclassMethod(descendant, isLeaf(descendant)); } } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/15c31ecfbe948eeec0bcd3d51a25196c48b1616f/HierarchicalASTVisitorTest.java/clean/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/HierarchicalASTVisitorTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
866,
4712,
1477,
28471,
1305,
12,
3198,
3904,
481,
991,
93,
4818,
13,
288,
202,
202,
17523,
12,
580,
481,
991,
93,
4818,
18,
5332,
2134,
10756,
288,
1082,
202,
797,
1746... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
866,
4712,
1477,
28471,
1305,
12,
3198,
3904,
481,
991,
93,
4818,
13,
288,
202,
202,
17523,
12,
580,
481,
991,
93,
4818,
18,
5332,
2134,
10756,
288,
1082,
202,
797,
1746... |
log.debug("updateSnmpInfo: SNMP interface index " + ifIndex + " not in database, creating new interface object."); } dbSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); | log.debug("updateSnmpInfo: SNMP interface index " + ifIndex + " not in database, creating new interface " + "object."); } dbSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); | private void updateSnmpInfo(Connection dbc, DbNodeEntry node, DbIpInterfaceEntry dbIpIfEntry, IfSnmpCollector snmpc) throws SQLException { Category log = ThreadCategory.getInstance(getClass()); InetAddress ifaddr = dbIpIfEntry.getIfAddress(); /* * If SNMP info is available update the snmpInterface table entry with * anything that has changed. */ int ifIndex = dbIpIfEntry.getIfIndex(); if (snmpc != null && !snmpc.failed() && ifIndex != -1) { if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: updating snmp interface for nodeId/ifIndex=" + +node.getNodeId() + "/" + ifIndex); } // Create and load SNMP Interface entry from the database boolean newSnmpIfTableEntry = false; DbSnmpInterfaceEntry dbSnmpIfEntry = DbSnmpInterfaceEntry.get(dbc, node.getNodeId(), ifIndex); if (dbSnmpIfEntry == null) { /* * SNMP Interface not found with this nodeId, create new * interface */ if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: SNMP interface index " + ifIndex + " not in database, creating new interface object."); } dbSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); newSnmpIfTableEntry = true; } /* * Create SNMP interface entry representing latest information * retrieved for the interface via the collector */ DbSnmpInterfaceEntry currSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); // Find the ifTable entry for this interface IfTable ift = snmpc.getIfTable(); Iterator ifiter = ift.getEntries().iterator(); IfTableEntry ifte = null; while (ifiter.hasNext()) { ifte = (IfTableEntry) ifiter.next(); // index Integer sint = ifte.getIfIndex(); if (sint != null) { if (ifIndex == sint.intValue()) { break; } else { ifte = null; } } } // Make sure we have a valid IfTableEntry object if (ifte == null && ifIndex == CapsdConfigFactory.LAME_SNMP_HOST_IFINDEX) { currSnmpIfEntry.setIfAddress(snmpc.getCollectorTargetAddress()); if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: interface " + snmpc.getCollectorTargetAddress().getHostAddress() + " appears to be a lame SNMP host. Setting ipaddr only."); } } else if (ifte != null) { /* * IP address and netmask * * WARNING: IfSnmpCollector.getIfAddressAndMask() ONLY returns * the FIRST IP address and mask for a given interface as * specified in the ipAddrTable. */ InetAddress[] aaddrs = snmpc.getIfAddressAndMask(ifIndex); // Address array should NEVER be null but just in case.. if (aaddrs == null) { log.warn("updateSnmpInfo: unable to retrieve address and netmask for nodeId/ifIndex: " + node.getNodeId() + "/" + ifIndex); aaddrs = new InetAddress[2]; // Set interface address to current interface aaddrs[0] = ifaddr; // Set netmask to NULL aaddrs[1] = null; } // IP address currSnmpIfEntry.setIfAddress(aaddrs[0]); // netmask if (aaddrs[1] != null) { if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: interface " + aaddrs[0].getHostAddress() + " has netmask: " + aaddrs[1].getHostAddress()); } currSnmpIfEntry.setNetmask(aaddrs[1]); } // type Integer sint = ifte.getIfType(); currSnmpIfEntry.setType(sint.intValue()); // description String str = ifte.getIfDescr(); if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: " + ifaddr + " has ifDescription: " + str); } if (str != null && str.length() > 0) { currSnmpIfEntry.setDescription(str); } String physAddr = ifte.getPhysAddr(); if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: " + ifaddr + " has phys address: -" + physAddr + "-"); } if (physAddr != null && physAddr.length() == 12) { currSnmpIfEntry.setPhysicalAddress(physAddr); } // speed Long uint = ifte.getIfSpeed(); //set the default speed to 10MB if not retrievable. currSnmpIfEntry.setSpeed((uint == null ? 10000000L : uint.longValue())); // admin status sint = ifte.getIfAdminStatus(); currSnmpIfEntry.setAdminStatus(sint.intValue()); // oper status sint = ifte.getIfOperStatus(); currSnmpIfEntry.setOperationalStatus(sint.intValue()); // name (from interface extensions table) String ifName = snmpc.getIfName(ifIndex); if (ifName != null && ifName.length() > 0) { currSnmpIfEntry.setName(ifName); } // alias (from interface extensions table) String ifAlias = snmpc.getIfAlias(ifIndex); if (ifAlias != null) { currSnmpIfEntry.setAlias(ifAlias); } else { currSnmpIfEntry.setAlias(""); } } // end if valid ifTable entry // Update any fields which have changed // dbSnmpIfEntry.updateIfIndex(currSnmpIfEntry.getIfIndex()); dbSnmpIfEntry.updateIfAddress(currSnmpIfEntry.getIfAddress()); dbSnmpIfEntry.updateNetmask(currSnmpIfEntry.getNetmask()); dbSnmpIfEntry.updatePhysicalAddress(currSnmpIfEntry.getPhysicalAddress()); dbSnmpIfEntry.updateDescription(currSnmpIfEntry.getDescription()); dbSnmpIfEntry.updateName(currSnmpIfEntry.getName()); dbSnmpIfEntry.updateType(currSnmpIfEntry.getType()); dbSnmpIfEntry.updateSpeed(currSnmpIfEntry.getSpeed()); dbSnmpIfEntry.updateAdminStatus(currSnmpIfEntry.getAdminStatus()); dbSnmpIfEntry.updateOperationalStatus(currSnmpIfEntry.getOperationalStatus()); dbSnmpIfEntry.updateAlias(currSnmpIfEntry.getAlias()); /* * If this is a new interface or if any of the following * key fields have changed set the m_snmpIfTableChangedFlag * variable to TRUE. This will potentially trigger an event * which will cause the poller to reinitialize the primary * SNMP interface for the node. */ // dbSnmpIfEntry.hasIfIndexChanged() || if (!m_snmpIfTableChangedFlag && newSnmpIfTableEntry || dbSnmpIfEntry.hasIfAddressChanged() || dbSnmpIfEntry.hasTypeChanged() || dbSnmpIfEntry.hasNameChanged() || dbSnmpIfEntry.hasDescriptionChanged() || dbSnmpIfEntry.hasPhysicalAddressChanged() || dbSnmpIfEntry.hasAliasChanged()) { m_snmpIfTableChangedFlag = true; } // Update the database dbSnmpIfEntry.store(dbc); // end if complete snmp info available } else if (snmpc != null && snmpc.hasIpAddrTable() && ifIndex != -1) { if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: updating snmp interface for nodeId/ifIndex/ipAddr=" + +node.getNodeId() + "/" + ifIndex + "/" + ifaddr + " based on ipAddrTable only - No ifTable available"); } // Create and load SNMP Interface entry from the database boolean newSnmpIfTableEntry = false; DbSnmpInterfaceEntry dbSnmpIfEntry = DbSnmpInterfaceEntry.get(dbc, node.getNodeId(), ifIndex); if (dbSnmpIfEntry == null) { /* * SNMP Interface not found with this nodeId, create new * interface */ if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: SNMP interface index " + ifIndex + " not in database, creating new interface object."); } dbSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); newSnmpIfTableEntry = true; } /* * Create SNMP interface entry representing latest information * retrieved for the interface via the collector */ DbSnmpInterfaceEntry currSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); // IP address currSnmpIfEntry.setIfAddress(ifaddr); // Update any fields which have changed dbSnmpIfEntry.updateIfAddress(currSnmpIfEntry.getIfAddress()); // Update the database dbSnmpIfEntry.store(dbc); // end if partial snmp info available } else if (snmpc != null) { // allow for lame snmp hosts with no ipAddrTable ifIndex = CapsdConfigFactory.LAME_SNMP_HOST_IFINDEX; if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: updating snmp interface for nodeId/ipAddr=" + +node.getNodeId() + "/" + ifaddr + " based on ip address only - No ipAddrTable available"); } // Create and load SNMP Interface entry from the database boolean newSnmpIfTableEntry = false; DbSnmpInterfaceEntry dbSnmpIfEntry = DbSnmpInterfaceEntry.get(dbc, node.getNodeId(), ifIndex); if (dbSnmpIfEntry == null) { /* * SNMP Interface not found with this nodeId, create new * interface */ if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: SNMP interface index " + ifIndex + " not in database, creating new interface object."); } dbSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); newSnmpIfTableEntry = true; } /* * Create SNMP interface entry representing latest information * retrieved for the interface via the collector */ DbSnmpInterfaceEntry currSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); // IP address currSnmpIfEntry.setIfAddress(ifaddr); // Update any fields which have changed dbSnmpIfEntry.updateIfAddress(currSnmpIfEntry.getIfAddress()); // Update the database dbSnmpIfEntry.store(dbc); } } | 48885 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48885/8a6576d66e6ad3849723ebfbdc7af8419591da4a/RescanProcessor.java/clean/opennms-services/src/main/java/org/opennms/netmgt/capsd/RescanProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
10461,
1291,
966,
12,
1952,
9881,
16,
8408,
907,
1622,
756,
16,
8408,
5273,
1358,
1622,
1319,
5273,
2047,
1622,
16,
971,
10461,
1291,
7134,
15366,
71,
13,
1216,
6483,
288... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
10461,
1291,
966,
12,
1952,
9881,
16,
8408,
907,
1622,
756,
16,
8408,
5273,
1358,
1622,
1319,
5273,
2047,
1622,
16,
971,
10461,
1291,
7134,
15366,
71,
13,
1216,
6483,
288... |
public void checkClassify(ClassifierLearner learner, Dataset trainData, Dataset testData, double[] referenceStats) | public void checkClassify(edu.cmu.minorthird.text.learn.SpanFeatureExtractor fe, ClassifierLearner learner, double[] referenceStats) | public void checkClassify(ClassifierLearner learner, Dataset trainData, Dataset testData, double[] referenceStats) { Evaluation v = Tester.evaluate(learner, trainData, testData); double[] stats = v.summaryStatistics(); checkStats(stats, referenceStats); } | 51753 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51753/4ec4001c2723d865707971ecfbe7d28d2032c21e/ClassifyTest.java/buggy/test/edu/cmu/minorthird/text/learn/ClassifyTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
866,
797,
1164,
12,
28049,
18,
7670,
89,
18,
1154,
7825,
6909,
18,
955,
18,
21346,
18,
6952,
4595,
10958,
1656,
16,
1659,
1251,
1682,
24834,
884,
24834,
16,
1645,
8526,
2114,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
866,
797,
1164,
12,
28049,
18,
7670,
89,
18,
1154,
7825,
6909,
18,
955,
18,
21346,
18,
6952,
4595,
10958,
1656,
16,
1659,
1251,
1682,
24834,
884,
24834,
16,
1645,
8526,
2114,
... |
if (this == other) { return true; } if (!(other instanceof GroupInfo)) { return false; } return delimeterField == ((GroupInfo) other).delimeterField && dataDictionary.equals(((GroupInfo) other).dataDictionary); } | if (this == other) { return true; } if (!(other instanceof GroupInfo)) { return false; } return delimeterField == ((GroupInfo) other).delimeterField && dataDictionary .equals(((GroupInfo) other).dataDictionary); } | public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof GroupInfo)) { return false; } return delimeterField == ((GroupInfo) other).delimeterField && dataDictionary.equals(((GroupInfo) other).dataDictionary); } | 6257 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6257/47d1964ddafa7f6ee47d33846c3320c71d9e789f/DataDictionary.java/clean/src/quickfix/DataDictionary.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
1250,
1606,
12,
921,
1308,
13,
288,
5411,
309,
261,
2211,
422,
1308,
13,
288,
7734,
327,
638,
31,
5411,
289,
5411,
309,
16051,
12,
3011,
1276,
3756,
966,
3719,
288,
7734,
327,
629... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
1606,
12,
921,
1308,
13,
288,
5411,
309,
261,
2211,
422,
1308,
13,
288,
7734,
327,
638,
31,
5411,
289,
5411,
309,
16051,
12,
3011,
1276,
3756,
966,
3719,
288,
7734,
327,
629... |
case java.math.BigDecimal.ROUND_HALF_DOWN: | case BigDecimal.ROUND_HALF_DOWN: | private static double round(double number, double roundingInc, double roundingIncReciprocal, int mode, boolean isNegative) { double div = roundingIncReciprocal == 0.0 ? number / roundingInc : number * roundingIncReciprocal; // do the absolute cases first switch (mode) { case java.math.BigDecimal.ROUND_CEILING: div = (isNegative ? Math.floor(div + epsilon) : Math.ceil(div - epsilon)); break; case java.math.BigDecimal.ROUND_FLOOR: div = (isNegative ? Math.ceil(div - epsilon) : Math.floor(div + epsilon)); break; case java.math.BigDecimal.ROUND_DOWN: div = (Math.floor(div + epsilon)); break; case java.math.BigDecimal.ROUND_UP: div = (Math.ceil(div - epsilon)); break; case java.math.BigDecimal.ROUND_UNNECESSARY: if (div != Math.floor(div)) { throw new ArithmeticException("Rounding necessary"); } return number; default: // Handle complex cases, where the choice depends on the closer value. // We figure out the distances to the two possible values, ceiling and floor. // We then go for the diff that is smaller. // Only if they are equal does the mode matter. double ceil = Math.ceil(div); double ceildiff = ceil - div; // (ceil * roundingInc) - number; double floor = Math.floor(div); double floordiff = div - floor; // number - (floor * roundingInc); // Note that the diff values were those mapped back to the "normal" space // by using the roundingInc. I don't have access to the original author of the code // but suspect that that was to produce better result in edge cases because of machine // precision, rather than simply using the difference between, say, ceil and div. // However, it didn't work in all cases. Am trying instead using an epsilon value. switch (mode) { case java.math.BigDecimal.ROUND_HALF_EVEN: // We should be able to just return Math.rint(a), but this // doesn't work in some VMs. // if one is smaller than the other, take the corresponding side if (floordiff + epsilon < ceildiff) { div = floor; } else if (ceildiff + epsilon < floordiff) { div = ceil; } else { // they are equal, so we want to round to whichever is even double testFloor = floor / 2; div = (testFloor == Math.floor(testFloor)) ? floor : ceil; } break; case java.math.BigDecimal.ROUND_HALF_DOWN: div = ((floordiff <= ceildiff + epsilon) ? floor : ceil); break; case java.math.BigDecimal.ROUND_HALF_UP: div = ((ceildiff <= floordiff + epsilon) ? ceil : floor); break; default: throw new IllegalArgumentException("Invalid rounding mode: " + mode); } } number = roundingIncReciprocal == 0.0 ? div * roundingInc : div / roundingIncReciprocal; return number; } | 5620 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5620/98070774c993f025d0e40b95a6dcb896d98929f6/DecimalFormat.java/clean/icu4j/src/com/ibm/icu/text/DecimalFormat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1645,
3643,
12,
9056,
1300,
16,
1645,
13885,
14559,
16,
1377,
202,
202,
9056,
13885,
14559,
426,
3449,
30101,
16,
509,
1965,
16,
1250,
29886,
13,
288,
377,
202,
377,
202,
9056,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1645,
3643,
12,
9056,
1300,
16,
1645,
13885,
14559,
16,
1377,
202,
202,
9056,
13885,
14559,
426,
3449,
30101,
16,
509,
1965,
16,
1250,
29886,
13,
288,
377,
202,
377,
202,
9056,... |
return combine(yyTable1(), yyTable2()); } | return combine(yyTable1(), yyTable2()); } | public static final short[] yyTable() { return combine(yyTable1(), yyTable2()); } | 45221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45221/d31a76ee29d5978a9bec41e3ac9134cee024bcab/YyTables.java/buggy/org/jruby/parser/YyTables.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
727,
3025,
8526,
9016,
1388,
1435,
288,
3639,
327,
8661,
12,
6795,
1388,
21,
9334,
9016,
1388,
22,
10663,
565,
289,
2,
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,
377,
1071,
760,
727,
3025,
8526,
9016,
1388,
1435,
288,
3639,
327,
8661,
12,
6795,
1388,
21,
9334,
9016,
1388,
22,
10663,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
: ScriptRuntime.toObject(cx, scope, lhs); | : ScriptRuntime.toObject(cx, state.scope, lhs); | private static int do_getElem(Object[] stack, double[] sDbl, int stackTop, Context cx, Scriptable scope) { Object lhs = stack[stackTop - 1]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop - 1]); Object result; Object id = stack[stackTop]; if (id != DBL_MRK) { result = ScriptRuntime.getObjectElem(lhs, id, cx, scope); } else { double val = sDbl[stackTop]; if (lhs == null || lhs == Undefined.instance) { throw ScriptRuntime.undefReadError( lhs, ScriptRuntime.toString(val)); } Scriptable obj = (lhs instanceof Scriptable) ? (Scriptable)lhs : ScriptRuntime.toObject(cx, scope, lhs); int index = (int)val; if (index == val) { result = ScriptRuntime.getObjectIndex(obj, index, cx); } else { String s = ScriptRuntime.toString(val); result = ScriptRuntime.getObjectProp(obj, s, cx); } } --stackTop; stack[stackTop] = result; return stackTop; } | 19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/0103da48e6e58ebf7674bbea96418aac1f2b34e0/Interpreter.java/buggy/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
509,
741,
67,
588,
7498,
12,
921,
8526,
2110,
16,
1645,
8526,
272,
40,
3083,
16,
509,
2110,
3401,
16,
21394,
1772,
9494,
16,
22780,
2146,
13,
565,
288,
3639,
1033,
8499,
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,
377,
3238,
760,
509,
741,
67,
588,
7498,
12,
921,
8526,
2110,
16,
1645,
8526,
272,
40,
3083,
16,
509,
2110,
3401,
16,
21394,
1772,
9494,
16,
22780,
2146,
13,
565,
288,
3639,
1033,
8499,
273,... |
sessionFactoryBean.setConfigClass(ds.getConfigurationClass()); | sessionFactoryBean.addProperty("configClass",ds.getConfigurationClass()); | public void refreshSessionFactory(GrailsApplication app, GrailsWebApplicationContext context) { HotSwappableTargetSource ts = (HotSwappableTargetSource)context.getBean(SESSION_FACTORY_BEAN+"TargetSource"); ConfigurableLocalSessionFactoryBean sessionFactoryBean = new ConfigurableLocalSessionFactoryBean(); sessionFactoryBean.setGrailsApplication(app); sessionFactoryBean.setClassLoader(app.getClassLoader()); GrailsDataSource ds = app.getGrailsDataSource(); if(ds != null && ds.getConfigurationClass() != null) { sessionFactoryBean.setConfigClass(ds.getConfigurationClass()); } sessionFactoryBean.setDataSource((DataSource)context.getBean(DATA_SOURCE_BEAN)); URL hibernateConfig = application.getClassLoader().getResource("hibernate.cfg.xml"); if(hibernateConfig != null) { sessionFactoryBean .setConfigLocation(new ClassPathResource("hibernate.cfg.xml")); } Properties hibProps = (Properties)context.getBean(HIBERNATE_PROPERTIES_BEAN); sessionFactoryBean.setHibernateProperties(hibProps); try { sessionFactoryBean.afterPropertiesSet(); } catch (HibernateException e) { throw new GrailsConfigurationException("Hibernate exception refreshing session factory: " + e.getMessage(),e); } catch (IllegalArgumentException e) { throw new GrailsConfigurationException("Illegal argument refreshing session factory: " + e.getMessage(),e); } catch (IOException e) { throw new GrailsConfigurationException("I/O exception refreshing session factory: " + e.getMessage(),e); } ts.swap(sessionFactoryBean.getObject()); } | 28089 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28089/272088b0c44998a1f06c7fa576e635c279321692/GrailsRuntimeConfigurator.java/clean/src/commons/org/codehaus/groovy/grails/commons/spring/GrailsRuntimeConfigurator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4460,
2157,
1733,
12,
14571,
14573,
3208,
595,
16,
10812,
14573,
4079,
28278,
819,
13,
288,
202,
202,
25270,
6050,
2910,
429,
2326,
1830,
3742,
273,
261,
25270,
6050,
2910,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4460,
2157,
1733,
12,
14571,
14573,
3208,
595,
16,
10812,
14573,
4079,
28278,
819,
13,
288,
202,
202,
25270,
6050,
2910,
429,
2326,
1830,
3742,
273,
261,
25270,
6050,
2910,
... |
_log.error("Local routerInfo was invalid? "+ iae.getMessage(), iae); | _log.error("wtf, locally published leaseSet is not valid?", iae); return; | public void publish(RouterInfo localRouterInfo) { if (!_initialized) return; Hash h = localRouterInfo.getIdentity().getHash(); try { store(h, localRouterInfo); synchronized (_explicitSendKeys) { _explicitSendKeys.add(h); } writeMyInfo(localRouterInfo); } catch (IllegalArgumentException iae) { _log.error("Local routerInfo was invalid? "+ iae.getMessage(), iae); } } | 3808 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3808/62ed6c6a58f9adaa081ae5a6cb591d18c6ad4f85/KademliaNetworkDatabaseFacade.java/buggy/router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3808,
12,
8259,
966,
1191,
8259,
966,
13,
288,
3639,
309,
16051,
67,
13227,
13,
327,
31,
3639,
2474,
366,
273,
1191,
8259,
966,
18,
588,
4334,
7675,
588,
2310,
5621,
3639,
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,
377,
1071,
918,
3808,
12,
8259,
966,
1191,
8259,
966,
13,
288,
3639,
309,
16051,
67,
13227,
13,
327,
31,
3639,
2474,
366,
273,
1191,
8259,
966,
18,
588,
4334,
7675,
588,
2310,
5621,
3639,
77... |
this.line = line; } | this.line = line; } | public void setLine(int line) { this.line = line; } | 47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/d31a76ee29d5978a9bec41e3ac9134cee024bcab/Node.java/clean/org/jruby/nodes/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
26482,
12,
474,
980,
13,
288,
202,
202,
2211,
18,
1369,
273,
980,
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... | [
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
26482,
12,
474,
980,
13,
288,
202,
202,
2211,
18,
1369,
273,
980,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
{ if ( DesignChoiceConstants.ACTION_LINK_TYPE_HYPERLINK.equals( handle.getLinkType( ) ) ) return IAction.ACTION_HYPERLINK; if ( DesignChoiceConstants.ACTION_LINK_TYPE_BOOKMARK_LINK.equals( handle.getLinkType( ) ) ) return IAction.ACTION_BOOKMARK; if ( DesignChoiceConstants.ACTION_LINK_TYPE_DRILL_THROUGH.equals( handle.getLinkType( ) ) ) return IAction.ACTION_DRILLTHROUGH; return 0; } | { if ( DesignChoiceConstants.ACTION_LINK_TYPE_HYPERLINK.equals( handle.getLinkType( ) ) ) return IAction.ACTION_HYPERLINK; if ( DesignChoiceConstants.ACTION_LINK_TYPE_BOOKMARK_LINK.equals( handle.getLinkType( ) ) ) return IAction.ACTION_BOOKMARK; if ( DesignChoiceConstants.ACTION_LINK_TYPE_DRILL_THROUGH.equals( handle.getLinkType( ) ) ) return IAction.ACTION_DRILLTHROUGH; return 0; } | public int getType( ) { if ( DesignChoiceConstants.ACTION_LINK_TYPE_HYPERLINK.equals( handle.getLinkType( ) ) ) return IAction.ACTION_HYPERLINK; if ( DesignChoiceConstants.ACTION_LINK_TYPE_BOOKMARK_LINK.equals( handle.getLinkType( ) ) ) return IAction.ACTION_BOOKMARK; if ( DesignChoiceConstants.ACTION_LINK_TYPE_DRILL_THROUGH.equals( handle.getLinkType( ) ) ) return IAction.ACTION_DRILLTHROUGH; return 0; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/252f8ae4f2ea666eb53d3c7d3fc5c754435161c9/BIRTActionRenderer.java/buggy/chart/org.eclipse.birt.chart.reportitem/src/org/eclipse/birt/chart/reportitem/BIRTActionRenderer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
202,
482,
509,
3130,
12,
262,
6862,
202,
95,
25083,
202,
430,
261,
29703,
10538,
2918,
18,
12249,
67,
10554,
67,
2399,
67,
44,
61,
3194,
10554,
18,
14963,
12,
1640,
18,
588,
2098,
559,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4405,
202,
482,
509,
3130,
12,
262,
6862,
202,
95,
25083,
202,
430,
261,
29703,
10538,
2918,
18,
12249,
67,
10554,
67,
2399,
67,
44,
61,
3194,
10554,
18,
14963,
12,
1640,
18,
588,
2098,
559,... |
object = workDequeue.pop(); | object = workDeque.pop(); | private final void collectWhite(VM_Address object) throws VM_PragmaInline { if (VM_Interface.VerifyAssertions) VM_Interface._assert(workDequeue.pop().isZero()); while (!object.isZero()) { if (RCBaseHeader.isWhite(object) && !RCBaseHeader.isBuffered(object)) { RCBaseHeader.makeBlack(object); ScanObject.enumeratePointers(object, collectEnum); freeBuffer.push(object); } object = workDequeue.pop(); } } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/a2d31fa1bc95145b8e2016e9bdeeb119aa707383/TrialDeletion.java/clean/MMTk/src/org/mmtk/utility/TrialDeletion.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
727,
918,
3274,
13407,
12,
7397,
67,
1887,
733,
13,
565,
1216,
8251,
67,
2050,
9454,
10870,
288,
565,
309,
261,
7397,
67,
1358,
18,
8097,
8213,
1115,
13,
1377,
8251,
67,
1358,
631... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3238,
727,
918,
3274,
13407,
12,
7397,
67,
1887,
733,
13,
565,
1216,
8251,
67,
2050,
9454,
10870,
288,
565,
309,
261,
7397,
67,
1358,
18,
8097,
8213,
1115,
13,
1377,
8251,
67,
1358,
631... |
public SQLStatement getSQLStatements(TransMeta transMeta, StepMeta stepMeta, Row prev) { SQLStatement retval = new SQLStatement(stepMeta.getName(), database, null); // default: nothing to do! int i; if (database!=null) { if (prev!=null && prev.size()>0) { if (tablename!=null && tablename.length()>0) { Database db = new Database(database); try { boolean doHash = false; String cr_table = null; db.connect(); // OK, what do we put in the new table?? Row fields = new Row(); // First, the new technical key... Value vkeyfield = new Value(technicalKeyField, Value.VALUE_TYPE_INTEGER); vkeyfield.setLength(10,0); // Then the hashcode (optional) Value vhashfield = null; if (useHash && hashField != null && hashField.length()>0) { vhashfield = new Value(hashField, Value.VALUE_TYPE_INTEGER); vhashfield.setLength(15,0); doHash = true; } if ( ! db.checkTableExists(tablename) ) { // Add technical key field. fields.addValue(vkeyfield); int cnt = prev.size(); for (i=0;i<cnt;i++) { String error_field=""; //$NON-NLS-1$ Value v = prev.getValue(i); String name = v.getName(); if ( name.equals(vkeyfield.getName()) || (doHash == true && name.equals(vhashfield.getName())) ) { error_field+=name; } if (error_field.length()>0) { retval.setError(Messages.getString("CombinationLookupMeta.ReturnValue.NameCollision", error_field)); //$NON-NLS-1$ } fields.addValue(v); } if ( doHash == true ) { fields.addValue(vhashfield); } } else { // Table already exists // Get the fields that are in the table now: Row tabFields = db.getTableFields(tablename); // Don't forget to quote these as well... database.quoteReservedWords(tabFields); if (tabFields.searchValue( vkeyfield.getName() ) == null ) { // Add technical key field if it didn't exist yet fields.addValue(vkeyfield); } // Add the already existing fields int cnt = tabFields.size(); for ( i=0;i<cnt;i++ ) { Value v = tabFields.getValue(i); fields.addValue(v); } // Find the missing fields in the real table cnt = prev.size(); for ( i=0;i<cnt;i++ ) { Value v = prev.getValue(i); if ( tabFields.searchValue( v.getName() )==null ) { fields.addValue(v); // nope --> add } } if (doHash == true && tabFields.searchValue( vhashfield.getName() ) == null ) { // Add hash field fields.addValue(vhashfield); } } cr_table = db.getDDL(tablename, fields, (CREATION_METHOD_SEQUENCE.equals(getTechKeyCreation()) && sequenceFrom!=null && sequenceFrom.length()==0)?technicalKeyField:null, CREATION_METHOD_AUTOINC.equals(getTechKeyCreation()), null, true); // // OK, now let's build the index // // What fields do we put int the index? // Only the hashcode or all fields? String cr_index = ""; //$NON-NLS-1$ String cr_uniq_index = ""; //$NON-NLS-1$ String idx_fields[] = null; if (useHash) { if (hashField!=null && hashField.length()>0) { idx_fields = new String[] { hashField }; } else { retval.setError(Messages.getString("CombinationLookupMeta.ReturnValue.NotHashFieldSpecified")); //$NON-NLS-1$ } } else // index on all key fields... { if (keyLookup!=null && keyLookup.length>0) { int nrfields = keyLookup.length; if (nrfields>32 && database.getDatabaseType()==DatabaseMeta.TYPE_DATABASE_ORACLE) { nrfields=32; // Oracle indexes are limited to 32 fields... } idx_fields = new String[nrfields]; for (i=0;i<nrfields;i++) idx_fields[i] = keyLookup[i]; } else { retval.setError(Messages.getString("CombinationLookupMeta.ReturnValue.NotFieldsSpecified")); //$NON-NLS-1$ } } // OK, now get the create index statement... if ( technicalKeyField != null ) { String techKeyArr[] = new String [] { technicalKeyField }; if (!db.checkIndexExists(tablename, techKeyArr)) { String indexname = "idx_"+tablename+"_pk"; //$NON-NLS-1$ //$NON-NLS-2$ cr_uniq_index = db.getCreateIndexStatement(tablename, indexname, techKeyArr, true, true, false, true); cr_uniq_index+=Const.CR; } } // OK, now get the create lookup index statement... if (idx_fields!=null && idx_fields.length>0 && !db.checkIndexExists(tablename, idx_fields) ) { String indexname = "idx_"+tablename+"_lookup"; //$NON-NLS-1$ //$NON-NLS-2$ cr_index = db.getCreateIndexStatement(tablename, indexname, idx_fields, false, false, false, true); cr_index+=Const.CR; } // // Don't forget the sequence (optional) // String cr_seq=""; //$NON-NLS-1$ if ((database.getDatabaseType()==DatabaseMeta.TYPE_DATABASE_ORACLE) && CREATION_METHOD_SEQUENCE.equals(getTechKeyCreation()) && sequenceFrom!=null && sequenceFrom.length()>0 ) { if (!db.checkSequenceExists(sequenceFrom)) { cr_seq+=db.getCreateSequenceStatement(sequenceFrom, 1L, 1L, -1L, true); cr_seq+=Const.CR; } } retval.setSQL(cr_table+cr_uniq_index+cr_index+cr_seq); } catch(KettleException e) { retval.setError(Messages.getString("CombinationLookupMeta.ReturnValue.ErrorOccurred")+Const.CR+e.getMessage()); //$NON-NLS-1$ } } else { retval.setError(Messages.getString("CombinationLookupMeta.ReturnValue.NotTableDefined")); //$NON-NLS-1$ } } else { retval.setError(Messages.getString("CombinationLookupMeta.ReturnValue.NotReceivingField")); //$NON-NLS-1$ } } else { retval.setError(Messages.getString("CombinationLookupMeta.ReturnValue.NotConnectionDefined")); //$NON-NLS-1$ } return retval; } | 58146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58146/31758b7a61625816b29ede0a1b4f554f1d8134fd/CombinationLookupMeta.java/buggy/kettle/src/be/ibridge/kettle/trans/step/combinationlookup/CombinationLookupMeta.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3063,
3406,
21708,
14663,
12,
1429,
2781,
906,
2781,
16,
8693,
2781,
2235,
2781,
16,
6556,
2807,
13,
202,
95,
202,
202,
3997,
3406,
5221,
273,
394,
3063,
3406,
12,
4119,
2781,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3063,
3406,
21708,
14663,
12,
1429,
2781,
906,
2781,
16,
8693,
2781,
2235,
2781,
16,
6556,
2807,
13,
202,
95,
202,
202,
3997,
3406,
5221,
273,
394,
3063,
3406,
12,
4119,
2781,
... | ||
profileHandler = new ProfileHandler(profileManager); | profileHandler = new ProfileHandler(profileManager, idUpgrader); | public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException { if (qName.equals("userprofile")) { profileHandler = new ProfileHandler(profileManager); } if (profileHandler != null) { profileHandler.startElement(uri, localName, qName, attrs); } } | 7196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7196/fa66ecbbf2829e4f5c09fc9d0f2bbdab1d26cb2c/ProfileManagerBinding.java/buggy/intermine/webtasks/main/src/org/intermine/web/ProfileManagerBinding.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
13591,
12,
780,
2003,
16,
514,
11927,
16,
514,
22914,
16,
9055,
3422,
13,
3639,
1216,
14366,
288,
3639,
309,
261,
85,
461,
18,
14963,
2932,
1355,
5040,
6,
3719,
288,
5411,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13591,
12,
780,
2003,
16,
514,
11927,
16,
514,
22914,
16,
9055,
3422,
13,
3639,
1216,
14366,
288,
3639,
309,
261,
85,
461,
18,
14963,
2932,
1355,
5040,
6,
3719,
288,
5411,
30... |
expectedValue = SVNPathUtil.append( (String) rootEntry.get(propName), SVNEncodingUtil.uriEncode(name)); } else if (SVNProperty.UUID.equals(propName) || SVNProperty.REVISION.equals(propName)) { | expectedValue = SVNPathUtil.append((String) rootEntry.get(propName), SVNEncodingUtil.uriEncode(name)); } else if (SVNProperty.UUID.equals(propName) || SVNProperty.REVISION.equals(propName)) { expectedValue = rootEntry.get(propName); } else if (SVNProperty.REPOS.equals(propName)) { | public void save(boolean close) throws SVNException { if (myData == null) { return; } Writer os = null; File tmpFile = new File(myFile.getParentFile(), "tmp/entries"); Map rootEntry = (Map) myData.get(""); try { os = new OutputStreamWriter(SVNFileUtil.openFileForWriting(tmpFile), "UTF-8"); os.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"); os.write("<wc-entries\n"); os.write(" xmlns=\"svn:\">\n"); for (Iterator entries = myData.keySet().iterator(); entries .hasNext();) { String name = (String) entries.next(); Map entry = (Map) myData.get(name); os.write("<entry"); for (Iterator names = entry.keySet().iterator(); names .hasNext();) { String propName = (String) names.next(); String propValue = (String) entry.get(propName); if (propValue == null) { continue; } if (BOOLEAN_PROPERTIES.contains(propName) && !Boolean.TRUE.toString().equals(propValue)) { continue; } if (!"".equals(name)) { Object expectedValue; if (SVNProperty.KIND_DIR.equals(entry .get(SVNProperty.KIND))) { if (SVNProperty.UUID.equals(propName) || SVNProperty.REVISION.equals(propName) || SVNProperty.URL.equals(propName)) { continue; } } else { if (SVNProperty.URL.equals(propName)) { expectedValue = SVNPathUtil.append( (String) rootEntry.get(propName), SVNEncodingUtil.uriEncode(name)); } else if (SVNProperty.UUID.equals(propName) || SVNProperty.REVISION.equals(propName)) { expectedValue = rootEntry.get(propName); } else { expectedValue = null; } if (propValue.equals(expectedValue)) { continue; } } } propName = propName.substring(SVNProperty.SVN_ENTRY_PREFIX .length()); propValue = SVNEncodingUtil.xmlEncodeAttr(propValue); os.write("\n "); os.write(propName); os.write("=\""); os.write(propValue); os.write("\""); } os.write("/>\n"); } os.write("</wc-entries>\n"); } catch (IOException e) { tmpFile.delete(); SVNErrorManager.error("svn: Cannot save entries file '" + myFile + "'"); } finally { SVNFileUtil.closeFile(os); } SVNFileUtil.rename(tmpFile, myFile); SVNFileUtil.setReadonly(myFile, true); if (close) { close(); } } | 5695 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5695/5acd96c2fcc708cffe9a8eaf01d072d50c6d6457/SVNEntries.java/buggy/javasvn/src/org/tmatesoft/svn/core/internal/wc/SVNEntries.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1923,
12,
6494,
1746,
13,
1216,
29537,
50,
503,
288,
3639,
309,
261,
4811,
751,
422,
446,
13,
288,
5411,
327,
31,
3639,
289,
3639,
5497,
1140,
273,
446,
31,
3639,
1387,
18504... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1923,
12,
6494,
1746,
13,
1216,
29537,
50,
503,
288,
3639,
309,
261,
4811,
751,
422,
446,
13,
288,
5411,
327,
31,
3639,
289,
3639,
5497,
1140,
273,
446,
31,
3639,
1387,
18504... |
{ case 1001: { | { case 1001: { | protected void ProcessSoarToolJavaCommand(SoarToolJavaCommand command) { switch (command.GetCommandID()) { // Edit Production command case 1001: // BUGBUG: JDK complains that STI_kEditProduction needs to be a constant // Seems defined as 'final' which I thought was a Java constant. //case command.STI_kEditProduction: { // Edit the production EditProductionByName(command.GetStringParam()); break; } } } | 47007 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47007/b614d4abef68545f39b6afc1e8521d6ccc484b8e/MainFrame.java/clean/OldSoar/trunk/visualsoar/Source/edu/umich/visualsoar/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
4389,
10225,
297,
6364,
5852,
2189,
12,
10225,
297,
6364,
5852,
2189,
1296,
13,
202,
95,
202,
202,
9610,
261,
3076,
18,
967,
2189,
734,
10756,
202,
202,
95,
202,
202,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4389,
10225,
297,
6364,
5852,
2189,
12,
10225,
297,
6364,
5852,
2189,
1296,
13,
202,
95,
202,
202,
9610,
261,
3076,
18,
967,
2189,
734,
10756,
202,
202,
95,
202,
202,
75... |
public org.quickfix.field.UnderlyingIssueDate getUnderlyingIssueDate() throws FieldNotFound { org.quickfix.field.UnderlyingIssueDate value = new org.quickfix.field.UnderlyingIssueDate(); | public quickfix.field.UnderlyingIssueDate getUnderlyingIssueDate() throws FieldNotFound { quickfix.field.UnderlyingIssueDate value = new quickfix.field.UnderlyingIssueDate(); | public org.quickfix.field.UnderlyingIssueDate getUnderlyingIssueDate() throws FieldNotFound { org.quickfix.field.UnderlyingIssueDate value = new org.quickfix.field.UnderlyingIssueDate(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/DerivativeSecurityList.java/buggy/src/java/src/quickfix/fix44/DerivativeSecurityList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
12956,
1626,
10833,
765,
6291,
12956,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
12956,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
12956,
1626,
10833,
765,
6291,
12956,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
12956,
... |
public NullEventProcess (Element config){ | public NullEventProcess (){ | public NullEventProcess (Element config){ } | 45996 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45996/84ddb4c75502d29217007650966db8a44aa275a6/NullEventProcess.java/buggy/src/edu/sc/seis/sod/subsetter/eventArm/NullEventProcess.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4112,
1133,
2227,
261,
1046,
642,
15329,
202,
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,
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,
4112,
1133,
2227,
261,
1046,
642,
15329,
202,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
" 28 getfield BX.ax Ljava/lang/Object; [44]\n" + " 31 invokevirtual java/io/PrintStream.print(Ljava/lang/Object;)V [50]\n" + " 34 getstatic java/lang/System.out Ljava/io/PrintStream; [36]\n" + | " 28 getfield BX.ax : java.lang.Object [44]\n" + " 31 invokevirtual java.io.PrintStream.print(java.lang.Object) : void [50]\n" + " 34 getstatic java.lang.System.out : java.io.PrintStream [36]\n" + | public void test502() { this.runConformTest( new String[] { "X.java", "public class X <T extends AX> {\n" + " T t;\n" + " X(T t){\n" + " this.t = t;\n" + " }\n" + " public static void main(String[] args) {\n" + " X<? extends BX> x = new X<BX<String>>(new BX<String>());\n" + " System.out.print(x.self().t.ax);\n" + " System.out.print(x.self().t.bx);\n" + " }\n" + " X<T> self() {\n" + " return this;\n" + " }\n" + "}\n" + "\n" + "class AX<P> {\n" + " P ax;\n" + "}\n" + "\n" + "class BX<Q> extends AX<Q> {\n" + " Q bx;\n" + "}\n", }, "nullnull"); String expectedOutput = " // Method descriptor #25 ([Ljava/lang/String;)V\n" + " // Stack: 4, Locals: 2\n" + " public static void main(String[] args);\n" + " 0 new X [2]\n" + " 3 dup\n" + " 4 new BX [27]\n" + " 7 dup\n" + " 8 invokespecial BX.<init>()V [28]\n" + " 11 invokespecial X.<init>(LAX;)V [30]\n" + " 14 astore_1 [x]\n" + " 15 getstatic java/lang/System.out Ljava/io/PrintStream; [36]\n" + " 18 aload_1 [x]\n" + " 19 invokevirtual X.self()LX; [40]\n" + " 22 getfield X.t LAX; [17]\n" + " 25 checkcast BX [27]\n" + " 28 getfield BX.ax Ljava/lang/Object; [44]\n" + " 31 invokevirtual java/io/PrintStream.print(Ljava/lang/Object;)V [50]\n" + " 34 getstatic java/lang/System.out Ljava/io/PrintStream; [36]\n" + " 37 aload_1 [x]\n" + " 38 invokevirtual X.self()LX; [40]\n" + " 41 getfield X.t LAX; [17]\n" + " 44 checkcast BX [27]\n" + " 47 getfield BX.bx Ljava/lang/Object; [53]\n" + " 50 invokevirtual java/io/PrintStream.print(Ljava/lang/Object;)V [50]\n" + " 53 return\n" + " Line numbers:\n" + " [pc: 0, line: 7]\n" + " [pc: 15, line: 8]\n" + " [pc: 34, line: 9]\n" + " [pc: 53, line: 10]\n" + " Local variable table:\n" + " [pc: 0, pc: 54] local: args index: 0 type: [Ljava/lang/String;\n" + " [pc: 15, pc: 54] local: x index: 1 type: LX;\n" + " Local variable type table:\n" + " [pc: 15, pc: 54] local: x index: 1 type: LX<+LBX;>;\n"; try { File f = new File(OUTPUT_DIR + File.separator + "X.class"); byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(f); ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler(); String result = disassembler.disassemble(classFileBytes, "\n", ClassFileBytesDisassembler.DETAILED); int index = result.indexOf(expectedOutput); if (index == -1 || expectedOutput.length() == 0) { System.out.println(Util.displayString(result, 3)); } if (index == -1) { assertEquals("Wrong contents", expectedOutput, result); } } catch (org.eclipse.jdt.core.util.ClassFormatException e) { assertTrue(false); } catch (IOException e) { assertTrue(false); } } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/e9ca95978aca2a442bfecfb8ac281f372092486a/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,
25,
3103,
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,
1139... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
25,
3103,
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,
1139... |
LinkedList list = (LinkedList) serviceListeners.get(type); | List list = (List) serviceListeners.get(type); | public void removeServiceListener(String type, ServiceListener listener) { type = type.toLowerCase(); LinkedList list = (LinkedList) serviceListeners.get(type); if (list != null) { list.remove(listener); if (list.size() == 0) { serviceListeners.remove(type); } } } | 51459 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51459/0163ae0c157c3a896ab369894d8c4302792969c3/JmDNS.java/buggy/jmdns/src/javax/jmdns/JmDNS.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1206,
1179,
2223,
12,
780,
618,
16,
1956,
2223,
2991,
13,
288,
3639,
618,
273,
618,
18,
869,
5630,
5621,
3639,
987,
666,
273,
261,
682,
13,
1156,
5583,
18,
588,
12,
723,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1206,
1179,
2223,
12,
780,
618,
16,
1956,
2223,
2991,
13,
288,
3639,
618,
273,
618,
18,
869,
5630,
5621,
3639,
987,
666,
273,
261,
682,
13,
1156,
5583,
18,
588,
12,
723,
17... |
node.addRequestSender(key, htl, this); | public void run() { if((key instanceof NodeSSK) && (pubKey == null)) { pubKey = ((NodeSSK)key).getPubKey(); if(pubKey == null) pubKey = node.getKey(((NodeSSK)key).getPubKeyHash()); } short origHTL = htl; node.addRequestSender(key, htl, this); HashSet nodesRoutedTo = new HashSet(); HashSet nodesNotIgnored = new HashSet(); try { while(true) { Logger.minor(this, "htl="+htl); if(htl == 0) { // RNF // Would be DNF if arrived with no HTL // But here we've already routed it and that's been rejected. finish(ROUTE_NOT_FOUND, null); return; } // Route it PeerNode next; double nextValue; next = node.peers.closerPeer(source, nodesRoutedTo, nodesNotIgnored, target, true); if(next != null) nextValue = next.getLocation().getValue(); else nextValue = -1.0; if(next == null) { // Backtrack finish(ROUTE_NOT_FOUND, null); return; } Logger.minor(this, "Routing request to "+next); nodesRoutedTo.add(next); if(PeerManager.distance(target, nextValue) > PeerManager.distance(target, nearestLoc)) { htl = node.decrementHTL(source, htl); Logger.minor(this, "Backtracking: target="+target+" next="+nextValue+" closest="+nearestLoc+" so htl="+htl); } Message req = createDataRequest(); next.send(req, this); Message msg = null; while(true) { /** * What are we waiting for? * FNPAccepted - continue * FNPRejectedLoop - go to another node * FNPRejectedOverload - fail (propagates back to source, * then reduces source transmit rate) */ MessageFilter mfAccepted = MessageFilter.create().setSource(next).setField(DMT.UID, uid).setTimeout(ACCEPTED_TIMEOUT).setType(DMT.FNPAccepted); MessageFilter mfRejectedLoop = MessageFilter.create().setSource(next).setField(DMT.UID, uid).setTimeout(ACCEPTED_TIMEOUT).setType(DMT.FNPRejectedLoop); MessageFilter mfRejectedOverload = MessageFilter.create().setSource(next).setField(DMT.UID, uid).setTimeout(ACCEPTED_TIMEOUT).setType(DMT.FNPRejectedOverload); // mfRejectedOverload must be the last thing in the or // So its or pointer remains null // Otherwise we need to recreate it below MessageFilter mf = mfAccepted.or(mfRejectedLoop.or(mfRejectedOverload)); try { msg = node.usm.waitFor(mf, this); Logger.minor(this, "first part got "+msg); } catch (DisconnectedException e) { Logger.normal(this, "Disconnected from "+next+" while waiting for Accepted on "+uid); break; } if(msg == null) { Logger.minor(this, "Timeout waiting for Accepted"); // Timeout waiting for Accepted next.localRejectedOverload("AcceptedTimeout"); forwardRejectedOverload(); // Try next node break; } if(msg.getSpec() == DMT.FNPRejectedLoop) { Logger.minor(this, "Rejected loop"); next.successNotOverload(); // Find another node to route to break; } if(msg.getSpec() == DMT.FNPRejectedOverload) { Logger.minor(this, "Rejected: overload"); // Non-fatal - probably still have time left forwardRejectedOverload(); if (msg.getBoolean(DMT.IS_LOCAL)) { Logger.minor(this, "Is local"); next.localRejectedOverload("ForwardRejectedOverload"); Logger.minor(this, "Local RejectedOverload, moving on to next peer"); // Give up on this one, try another break; } continue; } if(msg.getSpec() != DMT.FNPAccepted) { Logger.error(this, "Unrecognized message: "+msg); continue; } break; } if((msg == null) || (msg.getSpec() != DMT.FNPAccepted)) { // Try another node continue; } Logger.minor(this, "Got Accepted"); // Otherwise, must be Accepted // So wait... while(true) { MessageFilter mfDNF = MessageFilter.create().setSource(next).setField(DMT.UID, uid).setTimeout(FETCH_TIMEOUT).setType(DMT.FNPDataNotFound); MessageFilter mfDF = makeDataFoundFilter(next); MessageFilter mfRouteNotFound = MessageFilter.create().setSource(next).setField(DMT.UID, uid).setTimeout(FETCH_TIMEOUT).setType(DMT.FNPRouteNotFound); MessageFilter mfRejectedOverload = MessageFilter.create().setSource(next).setField(DMT.UID, uid).setTimeout(FETCH_TIMEOUT).setType(DMT.FNPRejectedOverload); MessageFilter mfPubKey = MessageFilter.create().setSource(next).setField(DMT.UID, uid).setTimeout(FETCH_TIMEOUT).setType(DMT.FNPSSKPubKey); MessageFilter mfRealDFCHK = MessageFilter.create().setSource(next).setField(DMT.UID, uid).setTimeout(FETCH_TIMEOUT).setType(DMT.FNPCHKDataFound); MessageFilter mfRealDFSSK = MessageFilter.create().setSource(next).setField(DMT.UID, uid).setTimeout(FETCH_TIMEOUT).setType(DMT.FNPSSKDataFound); MessageFilter mf = mfDNF.or(mfRouteNotFound.or(mfRejectedOverload.or(mfDF.or(mfPubKey.or(mfRealDFCHK.or(mfRealDFSSK)))))); try { msg = node.usm.waitFor(mf, this); } catch (DisconnectedException e) { Logger.normal(this, "Disconnected from "+next+" while waiting for data on "+uid); break; } Logger.minor(this, "second part got "+msg); if(msg == null) { // Fatal timeout next.localRejectedOverload("FatalTimeout"); forwardRejectedOverload(); finish(TIMED_OUT, next); return; } if(msg.getSpec() == DMT.FNPDataNotFound) { next.successNotOverload(); finish(DATA_NOT_FOUND, next); return; } if(msg.getSpec() == DMT.FNPRouteNotFound) { // Backtrack within available hops short newHtl = msg.getShort(DMT.HTL); if(newHtl < htl) htl = newHtl; next.successNotOverload(); break; } if(msg.getSpec() == DMT.FNPRejectedOverload) { // Non-fatal - probably still have time left forwardRejectedOverload(); if (msg.getBoolean(DMT.IS_LOCAL)) { next.localRejectedOverload("ForwardRejectedOverload2"); Logger.minor(this, "Local RejectedOverload, moving on to next peer"); // Give up on this one, try another break; } continue; // Wait for any further response } if(msg.getSpec() == DMT.FNPCHKDataFound) { if(!(key instanceof NodeCHK)) { Logger.error(this, "Got "+msg+" but expected a different key type from "+next); break; } // Found data next.successNotOverload(); // First get headers headers = ((ShortBuffer)msg.getObject(DMT.BLOCK_HEADERS)).getData(); // FIXME: Validate headers node.addTransferringSender((NodeCHK)key, this); try { prb = new PartiallyReceivedBlock(Node.PACKETS_IN_BLOCK, Node.PACKET_SIZE); synchronized(this) { notifyAll(); } BlockReceiver br = new BlockReceiver(node.usm, next, uid, prb, this); try { Logger.minor(this, "Receiving data"); byte[] data = br.receive(); Logger.minor(this, "Received data"); // Received data try { verifyAndCommit(data); } catch (KeyVerifyException e1) { Logger.normal(this, "Got data but verify failed: "+e1, e1); finish(VERIFY_FAILURE, next); return; } finish(SUCCESS, next); return; } catch (RetrievalException e) { Logger.normal(this, "Transfer failed: "+e, e); finish(TRANSFER_FAILED, next); return; } } finally { node.removeTransferringSender((NodeCHK)key, this); } } if(msg.getSpec() == DMT.FNPSSKPubKey) { Logger.minor(this, "Got pubkey on "+uid); if(!(key instanceof NodeSSK)) { Logger.error(this, "Got "+msg+" but expected a different key type from "+next); break; } byte[] pubkeyAsBytes = ((ShortBuffer)msg.getObject(DMT.PUBKEY_AS_BYTES)).getData(); try { if(pubKey == null) pubKey = new DSAPublicKey(pubkeyAsBytes); ((NodeSSK)key).setPubKey(pubKey); } catch (SSKVerifyException e) { pubKey = null; Logger.error(this, "Invalid pubkey from "+source+" on "+uid+" ("+e.getMessage()+")", e); break; // try next node } catch (IOException e) { Logger.error(this, "Invalid pubkey from "+source+" on "+uid+" ("+e+")"); break; // try next node } if(sskData != null) { finishSSK(next); return; } continue; } if(msg.getSpec() == DMT.FNPSSKDataFound) { Logger.minor(this, "Got data on "+uid); if(!(key instanceof NodeSSK)) { Logger.error(this, "Got "+msg+" but expected a different key type from "+next); break; } headers = ((ShortBuffer)msg.getObject(DMT.BLOCK_HEADERS)).getData(); sskData = ((ShortBuffer)msg.getObject(DMT.DATA)).getData(); if(pubKey != null) { finishSSK(next); return; } continue; } Logger.error(this, "Unexpected message: "+msg); } } } catch (Throwable t) { Logger.error(this, "Caught "+t, t); finish(INTERNAL_ERROR, null); } finally { Logger.minor(this, "Leaving RequestSender.run() for "+uid); node.completed(uid); node.removeRequestSender(key, origHTL, this); } } | 52909 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52909/9ea509d6b77109eb95d09ad3d429f5c67c98b90b/RequestSender.java/buggy/src/freenet/node/RequestSender.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
3639,
309,
12443,
856,
1276,
2029,
1260,
47,
13,
597,
261,
10174,
653,
422,
446,
3719,
288,
540,
202,
10174,
653,
273,
14015,
907,
1260,
47,
13,
856,
2934,
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,
1071,
918,
1086,
1435,
288,
3639,
309,
12443,
856,
1276,
2029,
1260,
47,
13,
597,
261,
10174,
653,
422,
446,
3719,
288,
540,
202,
10174,
653,
273,
14015,
907,
1260,
47,
13,
856,
2934,
5... | |
output.dumpObject(RubyBignum.newBignum(runtime, value)); | output.dumpObject(RubyBignum.newBignum(getRuntime(), value)); | public void marshalTo(MarshalStream output) throws java.io.IOException { if (value <= MAX_MARSHAL_FIXNUM) { output.write('i'); output.dumpInt((int) value); } else { output.dumpObject(RubyBignum.newBignum(runtime, value)); } } | 46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyFixnum.java/clean/src/org/jruby/RubyFixnum.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
10893,
774,
12,
8105,
1228,
876,
13,
1216,
2252,
18,
1594,
18,
14106,
288,
3639,
309,
261,
1132,
1648,
4552,
67,
19772,
2664,
1013,
67,
4563,
6069,
13,
288,
5411,
876,
18,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10893,
774,
12,
8105,
1228,
876,
13,
1216,
2252,
18,
1594,
18,
14106,
288,
3639,
309,
261,
1132,
1648,
4552,
67,
19772,
2664,
1013,
67,
4563,
6069,
13,
288,
5411,
876,
18,
26... |
BodyPeriodTotal = 0; BodyTrailingIdx = startIdx - (this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].avgPeriod); ShadowPeriodTotal = 0; ShadowTrailingIdx = startIdx - (this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].avgPeriod); | public TA_RetCode CDLLONGLINE(int startIdx, int endIdx, double inOpen[], double inHigh[], double inLow[], double inClose[], MInteger outBegIdx, MInteger outNbElement, int outInteger[]) { double BodyPeriodTotal, ShadowPeriodTotal; int i, outIdx, BodyTrailingIdx, ShadowTrailingIdx, lookbackTotal; 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; lookbackTotal = CDLLONGLINE_Lookback(); if (startIdx < lookbackTotal) startIdx = lookbackTotal; if (startIdx > endIdx) { outBegIdx.value = 0; outNbElement.value = 0; return TA_RetCode.TA_SUCCESS; } BodyPeriodTotal = 0; BodyTrailingIdx = startIdx - (this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].avgPeriod); ShadowPeriodTotal = 0; ShadowTrailingIdx = startIdx - (this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].avgPeriod); i = BodyTrailingIdx; while (i < startIdx) { BodyPeriodTotal += ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i] - inOpen[i])) : ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i] - inLow[i]) : ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) + ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) : 0))); i++; } i = ShadowTrailingIdx; while (i < startIdx) { ShadowPeriodTotal += ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i] - inOpen[i])) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i] - inLow[i]) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) + ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) : 0))); i++; } outIdx = 0; do { if ((Math.abs(inClose[i] - inOpen[i])) > ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].factor) * ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].avgPeriod) != 0.0 ? BodyPeriodTotal / (this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].avgPeriod) : ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i] - inOpen[i])) : ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i] - inLow[i]) : ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) + ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) : 0)))) / ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? 2.0 : 1.0)) && (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) < ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].factor) * ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].avgPeriod) != 0.0 ? ShadowPeriodTotal / (this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].avgPeriod) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i] - inOpen[i])) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i] - inLow[i]) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) + ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) : 0)))) / ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? 2.0 : 1.0)) && ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) < ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].factor) * ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].avgPeriod) != 0.0 ? ShadowPeriodTotal / (this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].avgPeriod) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i] - inOpen[i])) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i] - inLow[i]) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) + ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) : 0)))) / ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? 2.0 : 1.0))) outInteger[outIdx++] = (inClose[i] >= inOpen[i] ? 1 : -1) * 100; else outInteger[outIdx++] = 0; BodyPeriodTotal += ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i] - inOpen[i])) : ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i] - inLow[i]) : ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) + ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) : 0))) - ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[BodyTrailingIdx] - inOpen[BodyTrailingIdx])) : ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[BodyTrailingIdx] - inLow[BodyTrailingIdx]) : ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[BodyTrailingIdx] - (inClose[BodyTrailingIdx] >= inOpen[BodyTrailingIdx] ? inClose[BodyTrailingIdx] : inOpen[BodyTrailingIdx])) + ((inClose[BodyTrailingIdx] >= inOpen[BodyTrailingIdx] ? inOpen[BodyTrailingIdx] : inClose[BodyTrailingIdx]) - inLow[BodyTrailingIdx]) : 0))); ShadowPeriodTotal += ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i] - inOpen[i])) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i] - inLow[i]) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) + ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) : 0))) - ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[ShadowTrailingIdx] - inOpen[ShadowTrailingIdx])) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[ShadowTrailingIdx] - inLow[ShadowTrailingIdx]) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[ShadowTrailingIdx] - (inClose[ShadowTrailingIdx] >= inOpen[ShadowTrailingIdx] ? inClose[ShadowTrailingIdx] : inOpen[ShadowTrailingIdx])) + ((inClose[ShadowTrailingIdx] >= inOpen[ShadowTrailingIdx] ? inOpen[ShadowTrailingIdx] : inClose[ShadowTrailingIdx]) - inLow[ShadowTrailingIdx]) : 0))); i++; BodyTrailingIdx++; ShadowTrailingIdx++; } while (i <= endIdx); outNbElement.value = outIdx; outBegIdx.value = startIdx; return TA_RetCode.TA_SUCCESS; } | 2365 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2365/8c26ea7a2c59f9148f3db0db7ab39ed48689e601/Core.java/buggy/ta-lib/java/src/TA/Lib/Core.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
399,
37,
67,
7055,
1085,
21508,
4503,
7390,
5997,
12,
474,
27108,
16,
509,
679,
4223,
16,
1645,
316,
3678,
63,
6487,
1082,
202,
9056,
316,
8573,
63,
6487,
1645,
316,
10520,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21508,
4503,
7390,
5997,
12,
474,
27108,
16,
509,
679,
4223,
16,
1645,
316,
3678,
63,
6487,
1082,
202,
9056,
316,
8573,
63,
6487,
1645,
316,
10520,
63... | |
case 129: case 130: | case 135: case 136: | public final Expression expr(AST _t, PathExpr path ) throws RecognitionException, PermissionDeniedException,EXistException,XPathException { Expression step; org.exist.xquery.parser.XQueryAST expr_AST_in = (_t == ASTNULL) ? null : (org.exist.xquery.parser.XQueryAST)_t; org.exist.xquery.parser.XQueryAST castAST = null; org.exist.xquery.parser.XQueryAST t = null; org.exist.xquery.parser.XQueryAST someVarName = null; org.exist.xquery.parser.XQueryAST everyVarName = null; org.exist.xquery.parser.XQueryAST varName = null; org.exist.xquery.parser.XQueryAST posVar = null; org.exist.xquery.parser.XQueryAST letVarName = null; step= null; if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_cast: { AST __t286 = _t; castAST = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_cast); _t = _t.getFirstChild(); PathExpr expr= new PathExpr(context); int cardinality= Cardinality.EXACTLY_ONE; step=expr(_t,expr); _t = _retTree; t = (org.exist.xquery.parser.XQueryAST)_t; match(_t,ATOMIC_TYPE); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case QUESTION: { org.exist.xquery.parser.XQueryAST tmp3_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,QUESTION); _t = _t.getNextSibling(); cardinality= Cardinality.ZERO_OR_ONE; break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } QName qn= QName.parse(context, t.getText()); int code= Type.getType(qn); CastExpression castExpr= new CastExpression(context, expr, code, cardinality); castExpr.setASTNode(castAST); path.add(castExpr); step = castExpr; _t = __t286; _t = _t.getNextSibling(); break; } case COMMA: { AST __t288 = _t; org.exist.xquery.parser.XQueryAST tmp4_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,COMMA); _t = _t.getFirstChild(); PathExpr left= new PathExpr(context); PathExpr right= new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; SequenceConstructor sc= new SequenceConstructor(context); sc.addExpression(left); sc.addExpression(right); path.add(sc); step = sc; _t = __t288; _t = _t.getNextSibling(); break; } case LITERAL_if: { AST __t289 = _t; org.exist.xquery.parser.XQueryAST tmp5_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_if); _t = _t.getFirstChild(); PathExpr testExpr= new PathExpr(context); PathExpr thenExpr= new PathExpr(context); PathExpr elseExpr= new PathExpr(context); step=expr(_t,testExpr); _t = _retTree; step=expr(_t,thenExpr); _t = _retTree; step=expr(_t,elseExpr); _t = _retTree; ConditionalExpression cond= new ConditionalExpression(context, testExpr, thenExpr, elseExpr); path.add(cond); step = cond; _t = __t289; _t = _t.getNextSibling(); break; } case LITERAL_some: { AST __t290 = _t; org.exist.xquery.parser.XQueryAST tmp6_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_some); _t = _t.getFirstChild(); List clauses= new ArrayList(); PathExpr satisfiesExpr = new PathExpr(context); { _loop295: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==VARIABLE_BINDING)) { AST __t292 = _t; someVarName = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,VARIABLE_BINDING); _t = _t.getFirstChild(); ForLetClause clause= new ForLetClause(); PathExpr inputSequence = new PathExpr(context); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_as: { AST __t294 = _t; org.exist.xquery.parser.XQueryAST tmp7_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_as); _t = _t.getFirstChild(); sequenceType(_t,clause.sequenceType); _t = _retTree; _t = __t294; _t = _t.getNextSibling(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case NCNAME: case EQ: case STRING_LITERAL: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 124: case 125: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 129: case 130: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } step=expr(_t,inputSequence); _t = _retTree; clause.varName= someVarName.getText(); clause.inputSequence= inputSequence; clauses.add(clause); _t = __t292; _t = _t.getNextSibling(); } else { break _loop295; } } while (true); } step=expr(_t,satisfiesExpr); _t = _retTree; Expression action = satisfiesExpr; for (int i= clauses.size() - 1; i >= 0; i--) { ForLetClause clause= (ForLetClause) clauses.get(i); BindingExpression expr = new QuantifiedExpression(context, QuantifiedExpression.SOME); expr.setVariable(clause.varName); expr.setSequenceType(clause.sequenceType); expr.setInputSequence(clause.inputSequence); expr.setReturnExpression(action); satisfiesExpr= null; action= expr; } path.add(action); step = action; _t = __t290; _t = _t.getNextSibling(); break; } case LITERAL_every: { AST __t296 = _t; org.exist.xquery.parser.XQueryAST tmp8_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_every); _t = _t.getFirstChild(); List clauses= new ArrayList(); PathExpr satisfiesExpr = new PathExpr(context); { _loop301: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==VARIABLE_BINDING)) { AST __t298 = _t; everyVarName = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,VARIABLE_BINDING); _t = _t.getFirstChild(); ForLetClause clause= new ForLetClause(); PathExpr inputSequence = new PathExpr(context); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_as: { AST __t300 = _t; org.exist.xquery.parser.XQueryAST tmp9_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_as); _t = _t.getFirstChild(); sequenceType(_t,clause.sequenceType); _t = _retTree; _t = __t300; _t = _t.getNextSibling(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case NCNAME: case EQ: case STRING_LITERAL: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 124: case 125: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 129: case 130: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } step=expr(_t,inputSequence); _t = _retTree; clause.varName= everyVarName.getText(); clause.inputSequence= inputSequence; clauses.add(clause); _t = __t298; _t = _t.getNextSibling(); } else { break _loop301; } } while (true); } step=expr(_t,satisfiesExpr); _t = _retTree; Expression action = satisfiesExpr; for (int i= clauses.size() - 1; i >= 0; i--) { ForLetClause clause= (ForLetClause) clauses.get(i); BindingExpression expr = new QuantifiedExpression(context, QuantifiedExpression.EVERY); expr.setVariable(clause.varName); expr.setSequenceType(clause.sequenceType); expr.setInputSequence(clause.inputSequence); expr.setReturnExpression(action); satisfiesExpr= null; action= expr; } path.add(action); step = action; _t = __t296; _t = _t.getNextSibling(); break; } case LITERAL_return: { AST __t302 = _t; org.exist.xquery.parser.XQueryAST tmp10_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_return); _t = _t.getFirstChild(); List clauses= new ArrayList(); Expression action= new PathExpr(context); PathExpr whereExpr= null; List orderBy= null; { int _cnt317=0; _loop317: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_for: { AST __t304 = _t; org.exist.xquery.parser.XQueryAST tmp11_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_for); _t = _t.getFirstChild(); { int _cnt310=0; _loop310: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==VARIABLE_BINDING)) { AST __t306 = _t; varName = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,VARIABLE_BINDING); _t = _t.getFirstChild(); ForLetClause clause= new ForLetClause(); PathExpr inputSequence= new PathExpr(context); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_as: { AST __t308 = _t; org.exist.xquery.parser.XQueryAST tmp12_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_as); _t = _t.getFirstChild(); clause.sequenceType= new SequenceType(); sequenceType(_t,clause.sequenceType); _t = _retTree; _t = __t308; _t = _t.getNextSibling(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case POSITIONAL_VAR: case BEFORE: case AFTER: case NCNAME: case EQ: case STRING_LITERAL: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 124: case 125: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 129: case 130: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case POSITIONAL_VAR: { posVar = (org.exist.xquery.parser.XQueryAST)_t; match(_t,POSITIONAL_VAR); _t = _t.getNextSibling(); clause.posVar= posVar.getText(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case NCNAME: case EQ: case STRING_LITERAL: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 124: case 125: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 129: case 130: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } step=expr(_t,inputSequence); _t = _retTree; clause.varName= varName.getText(); clause.inputSequence= inputSequence; clauses.add(clause); _t = __t306; _t = _t.getNextSibling(); } else { if ( _cnt310>=1 ) { break _loop310; } else {throw new NoViableAltException(_t);} } _cnt310++; } while (true); } _t = __t304; _t = _t.getNextSibling(); break; } case LITERAL_let: { AST __t311 = _t; org.exist.xquery.parser.XQueryAST tmp13_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_let); _t = _t.getFirstChild(); { int _cnt316=0; _loop316: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==VARIABLE_BINDING)) { AST __t313 = _t; letVarName = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,VARIABLE_BINDING); _t = _t.getFirstChild(); ForLetClause clause= new ForLetClause(); clause.isForClause= false; PathExpr inputSequence= new PathExpr(context); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_as: { AST __t315 = _t; org.exist.xquery.parser.XQueryAST tmp14_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_as); _t = _t.getFirstChild(); clause.sequenceType= new SequenceType(); sequenceType(_t,clause.sequenceType); _t = _retTree; _t = __t315; _t = _t.getNextSibling(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case NCNAME: case EQ: case STRING_LITERAL: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 124: case 125: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 129: case 130: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } step=expr(_t,inputSequence); _t = _retTree; clause.varName= letVarName.getText(); clause.inputSequence= inputSequence; clauses.add(clause); _t = __t313; _t = _t.getNextSibling(); } else { if ( _cnt316>=1 ) { break _loop316; } else {throw new NoViableAltException(_t);} } _cnt316++; } while (true); } _t = __t311; _t = _t.getNextSibling(); break; } default: { if ( _cnt317>=1 ) { break _loop317; } else {throw new NoViableAltException(_t);} } } _cnt317++; } while (true); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_where: { org.exist.xquery.parser.XQueryAST tmp15_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_where); _t = _t.getNextSibling(); whereExpr= new PathExpr(context); step=expr(_t,whereExpr); _t = _retTree; break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case ORDER_BY: case BEFORE: case AFTER: case NCNAME: case EQ: case STRING_LITERAL: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 124: case 125: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 129: case 130: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ORDER_BY: { AST __t320 = _t; org.exist.xquery.parser.XQueryAST tmp16_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,ORDER_BY); _t = _t.getFirstChild(); orderBy= new ArrayList(3); { int _cnt326=0; _loop326: do { if (_t==null) _t=ASTNULL; if ((_tokenSet_0.member(_t.getType()))) { PathExpr orderSpecExpr= new PathExpr(context); step=expr(_t,orderSpecExpr); _t = _retTree; OrderSpec orderSpec= new OrderSpec(orderSpecExpr); int modifiers= 0; orderBy.add(orderSpec); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_ascending: case LITERAL_descending: { { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_ascending: { org.exist.xquery.parser.XQueryAST tmp17_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_ascending); _t = _t.getNextSibling(); break; } case LITERAL_descending: { org.exist.xquery.parser.XQueryAST tmp18_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_descending); _t = _t.getNextSibling(); modifiers= OrderSpec.DESCENDING_ORDER; orderSpec.setModifiers(modifiers); break; } default: { throw new NoViableAltException(_t); } } } break; } case 3: case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case NCNAME: case EQ: case STRING_LITERAL: case LCURLY: case COMMA: case LITERAL_empty: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 124: case 125: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 129: case 130: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_empty: { org.exist.xquery.parser.XQueryAST tmp19_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_empty); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_greatest: { org.exist.xquery.parser.XQueryAST tmp20_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_greatest); _t = _t.getNextSibling(); break; } case LITERAL_least: { org.exist.xquery.parser.XQueryAST tmp21_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_least); _t = _t.getNextSibling(); modifiers |= OrderSpec.EMPTY_LEAST; orderSpec.setModifiers(modifiers); break; } default: { throw new NoViableAltException(_t); } } } break; } case 3: case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case NCNAME: case EQ: case STRING_LITERAL: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 124: case 125: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 129: case 130: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } } else { if ( _cnt326>=1 ) { break _loop326; } else {throw new NoViableAltException(_t);} } _cnt326++; } while (true); } _t = __t320; _t = _t.getNextSibling(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case NCNAME: case EQ: case STRING_LITERAL: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 124: case 125: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 129: case 130: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } step=expr(_t,(PathExpr) action); _t = _retTree; for (int i= clauses.size() - 1; i >= 0; i--) { ForLetClause clause= (ForLetClause) clauses.get(i); BindingExpression expr; if (clause.isForClause) expr= new ForExpr(context); else expr= new LetExpr(context); expr.setVariable(clause.varName); expr.setSequenceType(clause.sequenceType); expr.setInputSequence(clause.inputSequence); expr.setReturnExpression(action); if (clause.isForClause) ((ForExpr) expr).setPositionalVariable(clause.posVar); if (whereExpr != null) { expr.setWhereExpression(whereExpr); whereExpr= null; } action= expr; } if (orderBy != null) { OrderSpec orderSpecs[]= new OrderSpec[orderBy.size()]; int k= 0; for (Iterator j= orderBy.iterator(); j.hasNext(); k++) { OrderSpec orderSpec= (OrderSpec) j.next(); orderSpecs[k]= orderSpec; } ((BindingExpression)action).setOrderSpecs(orderSpecs); } path.add(action); step = action; _t = __t302; _t = _t.getNextSibling(); break; } case LITERAL_or: { AST __t327 = _t; org.exist.xquery.parser.XQueryAST tmp22_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_or); _t = _t.getFirstChild(); PathExpr left= new PathExpr(context); PathExpr right= new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; _t = __t327; _t = _t.getNextSibling(); OpOr or= new OpOr(context); or.addPath(left); or.addPath(right); path.addPath(or); step = or; break; } case LITERAL_and: { AST __t328 = _t; org.exist.xquery.parser.XQueryAST tmp23_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_and); _t = _t.getFirstChild(); PathExpr left= new PathExpr(context); PathExpr right= new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; _t = __t328; _t = _t.getNextSibling(); OpAnd and= new OpAnd(context); and.addPath(left); and.addPath(right); path.addPath(and); step = and; break; } case UNION: { AST __t329 = _t; org.exist.xquery.parser.XQueryAST tmp24_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,UNION); _t = _t.getFirstChild(); PathExpr left= new PathExpr(context); PathExpr right= new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; _t = __t329; _t = _t.getNextSibling(); Union union= new Union(context, left, right); path.add(union); step = union; break; } case LITERAL_intersect: { AST __t330 = _t; org.exist.xquery.parser.XQueryAST tmp25_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_intersect); _t = _t.getFirstChild(); PathExpr left = new PathExpr(context); PathExpr right = new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; _t = __t330; _t = _t.getNextSibling(); Intersection intersect = new Intersection(context, left, right); path.add(intersect); step = intersect; break; } case LITERAL_except: { AST __t331 = _t; org.exist.xquery.parser.XQueryAST tmp26_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_except); _t = _t.getFirstChild(); PathExpr left = new PathExpr(context); PathExpr right = new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; _t = __t331; _t = _t.getNextSibling(); Except intersect = new Except(context, left, right); path.add(intersect); step = intersect; break; } case ABSOLUTE_SLASH: { AST __t332 = _t; org.exist.xquery.parser.XQueryAST tmp27_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,ABSOLUTE_SLASH); _t = _t.getFirstChild(); RootNode root= new RootNode(context); path.add(root); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case NCNAME: case EQ: case STRING_LITERAL: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 124: case 125: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 129: case 130: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case LITERAL_preceding: { step=expr(_t,path); _t = _retTree; break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t332; _t = _t.getNextSibling(); break; } case ABSOLUTE_DSLASH: { AST __t334 = _t; org.exist.xquery.parser.XQueryAST tmp28_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,ABSOLUTE_DSLASH); _t = _t.getFirstChild(); RootNode root= new RootNode(context); path.add(root); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case NCNAME: case EQ: case STRING_LITERAL: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 124: case 125: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 129: case 130: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case LITERAL_preceding: { step=expr(_t,path); _t = _retTree; if (step instanceof LocationStep) { LocationStep s= (LocationStep) step; if (s.getAxis() == Constants.ATTRIBUTE_AXIS) // combines descendant-or-self::node()/attribute:* s.setAxis(Constants.DESCENDANT_ATTRIBUTE_AXIS); else s.setAxis(Constants.DESCENDANT_SELF_AXIS); } else step.setPrimaryAxis(Constants.DESCENDANT_SELF_AXIS); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t334; _t = _t.getNextSibling(); break; } case LITERAL_to: { AST __t336 = _t; org.exist.xquery.parser.XQueryAST tmp29_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_to); _t = _t.getFirstChild(); PathExpr start= new PathExpr(context); PathExpr end= new PathExpr(context); List args= new ArrayList(2); args.add(start); args.add(end); step=expr(_t,start); _t = _retTree; step=expr(_t,end); _t = _retTree; RangeExpression range= new RangeExpression(context); range.setArguments(args); path.addPath(range); step = range; _t = __t336; _t = _t.getNextSibling(); break; } case EQ: case LT: case GT: case NEQ: case GTEQ: case LTEQ: { step=generalComp(_t,path); _t = _retTree; break; } case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: { step=valueComp(_t,path); _t = _retTree; break; } case BEFORE: case AFTER: case LITERAL_is: case LITERAL_isnot: { step=nodeComp(_t,path); _t = _retTree; break; } case ANDEQ: case OREQ: { step=fulltextComp(_t,path); _t = _retTree; break; } case PARENTHESIZED: case FUNCTION: case VARIABLE_REF: case ELEMENT: case TEXT: case STRING_LITERAL: case LCURLY: case XML_COMMENT: case XML_PI: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: { step=primaryExpr(_t,path); _t = _retTree; break; } case QNAME: case WILDCARD: case PREFIX_WILDCARD: case NCNAME: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case SELF: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 124: case 125: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 129: case 130: case LITERAL_preceding: { step=pathExpr(_t,path); _t = _retTree; break; } case UNARY_MINUS: case UNARY_PLUS: case STAR: case PLUS: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: { step=numericExpr(_t,path); _t = _retTree; break; } default: { throw new NoViableAltException(_t); } } _retTree = _t; return step; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/ddc6ab496ae303f007a96cb80352f3352974cbcf/XQueryTreeParser.java/clean/src/org/exist/xquery/parser/XQueryTreeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
5371,
225,
3065,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
16,
14124,
503,
288,
202,
202,
2300,
2235,
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,
225,
202,
482,
727,
5371,
225,
3065,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
16,
14124,
503,
288,
202,
202,
2300,
2235,
3... |
public static synchronized WebAppContext instance(ServletContext servletContext) { | public static WebAppContext instance() { | public static synchronized WebAppContext instance(ServletContext servletContext) { if (instance == null) instance = new WebAppContext(servletContext); return instance; } | 52783 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52783/5beed956a1a93d586f69d0d3aa2308faa56f70ad/WebAppContext.java/buggy/src/java/org/orbeon/oxf/webapp/WebAppContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
22162,
1042,
791,
1435,
288,
3639,
309,
261,
1336,
422,
446,
13,
5411,
791,
273,
394,
22162,
1042,
12,
23231,
1042,
1769,
3639,
327,
791,
31,
565,
289,
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,
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,
760,
22162,
1042,
791,
1435,
288,
3639,
309,
261,
1336,
422,
446,
13,
5411,
791,
273,
394,
22162,
1042,
12,
23231,
1042,
1769,
3639,
327,
791,
31,
565,
289,
2,
-100,
-100,
-100,
-... |
String property; | public Object convertValue(Map context, Object o, Member member, String s, Object value, Class aClass) { if (value == null) { return null; } Class clazz = null; try { OgnlContext ognlContext = (OgnlContext) context; Evaluation eval = ognlContext.getCurrentEvaluation(); String property; if (eval == null) { eval = ognlContext.getLastEvaluation(); clazz = eval.getResult().getClass(); property = (String) eval.getLastChild().getResult(); } else { clazz = eval.getLastChild().getSource().getClass(); property = (String) eval.getFirstChild().getResult(); } if (!noMapping.contains(clazz)) { Map mapping = (Map) mappings.get(clazz); if (mapping == null) { mapping = new HashMap(); mappings.put(clazz, mapping); String className = clazz.getName(); String resource = className.replace('.', '/') + "-conversion.properties"; InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(resource); Properties props = new Properties(); props.load(is); mapping.putAll(props); for (Iterator iterator = mapping.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); entry.setValue(createTypeConverter((String) entry.getValue())); } } TypeConverter converter = (TypeConverter) mapping.get(property); if (converter != null) { return converter.convertValue(context, o, member, s, value, aClass); } } } catch (Throwable t) { if (clazz != null) { noMapping.add(clazz); } } if (defaultMappings.containsKey(aClass.getName())) { try { TypeConverter tc = (TypeConverter) defaultMappings.get(aClass.getName()); return tc.convertValue(context, o, member, s, value, aClass); } catch (Exception e) { e.printStackTrace(); } } return super.convertValue(context, o, member, s, value, aClass); } | 16468 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/16468/a864a10e0ae74db12a683fe9ded33b591590ad5b/XWorkConverter.java/buggy/src/java/com/opensymphony/xwork/util/XWorkConverter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1765,
620,
12,
863,
819,
16,
1033,
320,
16,
8596,
3140,
16,
514,
272,
16,
1033,
460,
16,
1659,
20148,
13,
288,
3639,
309,
261,
1132,
422,
446,
13,
288,
5411,
327,
446,
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,
377,
1071,
1033,
1765,
620,
12,
863,
819,
16,
1033,
320,
16,
8596,
3140,
16,
514,
272,
16,
1033,
460,
16,
1659,
20148,
13,
288,
3639,
309,
261,
1132,
422,
446,
13,
288,
5411,
327,
446,
31,... | |
Member member = getMemberArg(evaluator, args, 0, true); return member.getUniqueName(); | Level level = getLevelArg(evaluator, args, 0, true); return level.getUniqueName(); | public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.getUniqueName(); } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/c9e00c64943ce43962e024696d2be989490b4a44/BuiltinFunTable.java/clean/src/main/mondrian/olap/fun/BuiltinFunTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1033,
5956,
12,
15876,
18256,
16,
7784,
8526,
833,
13,
288,
7734,
8596,
3140,
273,
18925,
4117,
12,
14168,
639,
16,
833,
16,
374,
16,
638,
1769,
7734,
327,
3140,
18,
588,
6303,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1033,
5956,
12,
15876,
18256,
16,
7784,
8526,
833,
13,
288,
7734,
8596,
3140,
273,
18925,
4117,
12,
14168,
639,
16,
833,
16,
374,
16,
638,
1769,
7734,
327,
3140,
18,
588,
6303,
4... |
public Event searchNCBI( RequestContext context ) throws Exception { String pubMedId = ( String ) context.getSourceEvent().getParameter( "pubMedId" ); if ( pubMedId == null ) return error(); // first see if we already have it in the system. BibliographicReference bibRefFound = bibliographicReferenceService.findByExternalId( pubMedId ); if ( bibRefFound != null ) { context.getRequestScope().setAttribute( "existsInSystem", Boolean.TRUE ); context.getFlowScope().setAttribute( "bibliographicReference", bibRefFound ); context.getRequestScope().setAttribute( "bibliographicReference", bibRefFound ); addMessage( context, "bibliographicReference.alreadyInSystem", new Object[] { pubMedId } ); } else { context.getRequestScope().setAttribute( "existsInSystem", Boolean.FALSE ); BibliographicReference bibRef = this.pubMedXmlFetcher.retrieveByHTTP( Integer.parseInt( pubMedId ) ); context.getRequestScope().setAttribute( "pubMedId", pubMedId ); context.getFlowScope().setAttribute( "pubMedId", pubMedId ); context.getRequestScope().setAttribute( "bibliographicReference", bibRef ); context.getFlowScope().setAttribute( "bibliographicReference", bibRef ); } return success(); } | 4335 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4335/12b117373cdda82111d7643b903a5737e0c4ac46/PubMedExecuteQueryAction.java/buggy/src/web/edu/columbia/gemma/web/flow/bibref/PubMedExecuteQueryAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2587,
1623,
50,
8876,
45,
12,
20479,
819,
262,
1216,
1185,
288,
3639,
514,
5634,
13265,
548,
273,
261,
514,
262,
819,
18,
588,
1830,
1133,
7675,
588,
1662,
12,
315,
10174,
13265,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2587,
1623,
50,
8876,
45,
12,
20479,
819,
262,
1216,
1185,
288,
3639,
514,
5634,
13265,
548,
273,
261,
514,
262,
819,
18,
588,
1830,
1133,
7675,
588,
1662,
12,
315,
10174,
13265,
... | ||
{ if (null != m_nodeSet) { int current = this.getCurrentNode(); next = m_nodeSet.nextNode(); } else next = DTM.NULL; } return next; | return DTM.NULL; | public int getNextNode() { int next; if (DTM.NULL != m_peek) { next = m_peek; m_peek = DTM.NULL; } else { if (null != m_nodeSet) { int current = this.getCurrentNode(); next = m_nodeSet.nextNode(); } else next = DTM.NULL; } // int current = setCurrentIfNotNull(next); // System.out.println("Returning: "+this); return next; } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/ba13bea236d621791ffcf3449822f5eee1d7a764/FilterExprWalker.java/buggy/src/org/apache/xpath/axes/FilterExprWalker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
6927,
907,
1435,
225,
288,
565,
509,
1024,
31,
565,
309,
261,
9081,
49,
18,
8560,
480,
312,
67,
347,
3839,
13,
565,
288,
1377,
1024,
273,
312,
67,
347,
3839,
31,
1377,
312,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
6927,
907,
1435,
225,
288,
565,
509,
1024,
31,
565,
309,
261,
9081,
49,
18,
8560,
480,
312,
67,
347,
3839,
13,
565,
288,
1377,
1024,
273,
312,
67,
347,
3839,
31,
1377,
312,... |
myResult = createNonLFSpace(1, true); | myResult = createNonLFSpace(1, true, null); | public void visitIfStatement(PsiIfStatement statement) { if (myRole2 == ChildRole.ELSE_KEYWORD) { if (myChild1.getElementType() != ElementType.BLOCK_STATEMENT) { myResult = Formatter.getInstance().createSpaceProperty(0, 0, 1, mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_CODE); } else { if (mySettings.ELSE_ON_NEW_LINE) { myResult = Formatter.getInstance().createSpaceProperty(0, 0, 1, mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_CODE); } else { myResult = createNonLFSpace(1, false); } } } else if (myRole1 == ChildRole.ELSE_KEYWORD) { if (myChild2.getElementType() == ElementType.IF_STATEMENT) { if (mySettings.SPECIAL_ELSE_IF_TREATMENT) { myResult = createNonLFSpace(1, true); } else { myResult = Formatter.getInstance().createSpaceProperty(0, 0, 1, mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_CODE); } } else { if (myChild2.getElementType() == ElementType.BLOCK_STATEMENT) { myResult = getSpaceBeforeLBrace(mySettings.SPACE_BEFORE_ELSE_LBRACE, mySettings.BRACE_STYLE); } else { createSpaceInCode(mySettings.SPACE_BEFORE_ELSE_LBRACE); } } } else if (myChild2.getElementType() == ElementType.BLOCK_STATEMENT) { boolean space = myRole2 == ChildRole.ELSE_BRANCH ? mySettings.SPACE_BEFORE_ELSE_LBRACE: mySettings.SPACE_BEFORE_IF_LBRACE; myResult = getSpaceBeforeLBrace(space, mySettings.BRACE_STYLE); } else if (myRole2 == ChildRole.LPARENTH) { createSpaceInCode(mySettings.SPACE_BEFORE_IF_PARENTHESES); } else if (myRole1 == ChildRole.LPARENTH) { createSpaceInCode(mySettings.SPACE_WITHIN_IF_PARENTHESES); } else if (myRole2 == ChildRole.RPARENTH) { createSpaceInCode(mySettings.SPACE_WITHIN_IF_PARENTHESES); } else if (myRole2 == ChildRole.THEN_BRANCH) { createSpaceInCode(true); } } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/789412ab36db73e21c69cd7d197557454be0fd15/JavaSpacePropertyProcessor.java/clean/source/com/intellij/psi/formatter/java/JavaSpacePropertyProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3757,
2047,
3406,
12,
52,
7722,
2047,
3406,
3021,
13,
288,
565,
309,
261,
4811,
2996,
22,
422,
7451,
2996,
18,
2247,
1090,
67,
28813,
13,
288,
1377,
309,
261,
4811,
1763,
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,
282,
1071,
918,
3757,
2047,
3406,
12,
52,
7722,
2047,
3406,
3021,
13,
288,
565,
309,
261,
4811,
2996,
22,
422,
7451,
2996,
18,
2247,
1090,
67,
28813,
13,
288,
1377,
309,
261,
4811,
1763,
21,... |
((Combo)radioOptions[i]).select(0); ((Combo)radioOptions[i]).addSelectionListener(new RadioButtonListener()); } else if(o.isInput()){ | ((Combo) radioOptions[i]).select(0); ((Combo) radioOptions[i]).addSelectionListener(new RadioButtonListener()); } else if (o.isInput()) { | protected void addRadioButtons(Composite buttonComposite) { int i = 0; Button selected = null; radios = new Button[bug.getOperations().size()]; radioOptions = new Control[bug.getOperations().size()]; for (Iterator<Operation> it = bug.getOperations().iterator(); it.hasNext(); ) { Operation o = it.next(); radios[i] = new Button(buttonComposite, SWT.RADIO); radios[i].setFont(TEXT_FONT); GridData radioData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); if (!o.hasOptions() && !o.isInput()) radioData.horizontalSpan = 4; else radioData.horizontalSpan = 3; radioData.heightHint = 20; String opName = o.getOperationName(); opName = opName.replaceAll("</.*>", ""); opName = opName.replaceAll("<.*>", ""); radios[i].setText(opName); radios[i].setLayoutData(radioData); radios[i].setBackground(background); radios[i].addSelectionListener(new RadioButtonListener()); radios[i].addListener(SWT.FocusIn, new GenericListener()); if (o.hasOptions()) { radioData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); radioData.horizontalSpan = 1; radioData.heightHint = 20; radioData.widthHint = AbstractBugEditor.WRAP_LENGTH; radioOptions[i] = new Combo( buttonComposite, SWT.NO_BACKGROUND | SWT.MULTI | SWT.V_SCROLL | SWT.READ_ONLY); radioOptions[i].setFont(TEXT_FONT); radioOptions[i].setLayoutData(radioData); radioOptions[i].setBackground(background); Object [] a = o.getOptionNames().toArray(); Arrays.sort(a); for (int j = 0; j < a.length; j++) { ((Combo)radioOptions[i]).add((String) a[j]); } ((Combo)radioOptions[i]).select(0); ((Combo)radioOptions[i]).addSelectionListener(new RadioButtonListener()); } else if(o.isInput()){ radioData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); radioData.horizontalSpan = 1; radioData.widthHint = 120; radioOptions[i] = new Text( buttonComposite, SWT.BORDER | SWT.SINGLE); radioOptions[i].setFont(TEXT_FONT); radioOptions[i].setLayoutData(radioData); radioOptions[i].setBackground(background); ((Text)radioOptions[i]).setText(o.getInputValue()); ((Text)radioOptions[i]).addModifyListener(new RadioButtonListener()); } if (i == 0 || o.isChecked()) { if(selected != null) selected.setSelection(false); selected = radios[i]; radios[i].setSelection(true); if(o.hasOptions() && o.getOptionSelection() != null){ int j = 0; for(String s: ((Combo)radioOptions[i]).getItems()){ if(s.compareTo(o.getOptionSelection()) == 0){ ((Combo)radioOptions[i]).select(j); } j++; } } bug.setSelectedOperation(o); } i++; } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/175b3471b8f3ebe4611aa1721b1c96ed45badae8/ExistingBugEditor.java/clean/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/editor/ExistingBugEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
527,
19984,
14388,
12,
9400,
3568,
9400,
13,
288,
202,
202,
474,
277,
273,
374,
31,
202,
202,
3616,
3170,
273,
446,
31,
202,
202,
22799,
538,
273,
394,
12569,
63,
925,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
19984,
14388,
12,
9400,
3568,
9400,
13,
288,
202,
202,
474,
277,
273,
374,
31,
202,
202,
3616,
3170,
273,
446,
31,
202,
202,
22799,
538,
273,
394,
12569,
63,
925,
... |
public void setExportPackage( String exportPackage ) | public void setExportPackage(String exportPackage) | public void setExportPackage( String exportPackage ) { this.exportPackage = exportPackage; } | 45948 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45948/c763a84a11498e205c5e5e28f32c0954fcffc2e9/OsgiManifest.java/buggy/tools/maven2/maven-osgi-plugin/src/main/java/org/apache/felix/tools/maven/plugin/OsgiManifest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
6144,
2261,
12,
780,
3359,
2261,
13,
565,
288,
3639,
333,
18,
6530,
2261,
273,
3359,
2261,
31,
565,
289,
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,
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,
377,
1071,
918,
444,
6144,
2261,
12,
780,
3359,
2261,
13,
565,
288,
3639,
333,
18,
6530,
2261,
273,
3359,
2261,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
((IFile) resource).setCharset(encoding, monitor); | ((IFile) resource).setCharset(finalEncoding, monitor); | protected IStatus run(IProgressMonitor monitor) { try { if (resource instanceof IContainer) ((IContainer) resource).setDefaultCharset(encoding, monitor); else ((IFile) resource).setCharset(encoding, monitor); return Status.OK_STATUS; } catch (CoreException e) {//If there is an error return the default WorkbenchPlugin.log(IDEWorkbenchMessages.getString("ResourceEncodingFieldEditor.ErrorStoringMessage"), e.getStatus()); //$NON-NLS-1$ return e.getStatus(); } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/293347d0cfa5214b398a6ef52efacc4bfb2b5b72/ResourceEncodingFieldEditor.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ResourceEncodingFieldEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
1117,
467,
1482,
1086,
12,
45,
5491,
7187,
6438,
13,
288,
9506,
202,
698,
288,
6862,
202,
430,
261,
3146,
1276,
467,
2170,
13,
25083,
202,
12443,
45,
2170,
13,
1058,
2934,
542,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
1117,
467,
1482,
1086,
12,
45,
5491,
7187,
6438,
13,
288,
9506,
202,
698,
288,
6862,
202,
430,
261,
3146,
1276,
467,
2170,
13,
25083,
202,
12443,
45,
2170,
13,
1058,
2934,
542,
18... |
_helpFrame.setVisible(true); | _quickStartFrame.setVisible(true); | public void actionPerformed(ActionEvent ae) { // Create frame if we haven't yet if (_helpFrame == null) { _helpFrame = new HelpFrame(); } _helpFrame.setVisible(true); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/db91dcc7aa4674cfe5508cd82ff717a758a32bca/MainFrame.java/clean/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
12,
1803,
1133,
14221,
13,
288,
1377,
368,
1788,
2623,
309,
732,
15032,
1404,
4671,
1377,
309,
261,
67,
5201,
3219,
422,
446,
13,
288,
3639,
389,
5201,
3219,
273,
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,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
12,
1803,
1133,
14221,
13,
288,
1377,
368,
1788,
2623,
309,
732,
15032,
1404,
4671,
1377,
309,
261,
67,
5201,
3219,
422,
446,
13,
288,
3639,
389,
5201,
3219,
273,
394,
... |
SingleResultQuerier querier = new SingleResultQuerier(this, "select alarmid from alarms where reductionKey = ?"); | SingleResultQuerier querier = new SingleResultQuerier(this, "select alarmid from alarms where reductionKey = ?;"); | public Integer getAlarmId(String reductionKey) { SingleResultQuerier querier = new SingleResultQuerier(this, "select alarmid from alarms where reductionKey = ?"); querier.execute(reductionKey); return (Integer)querier.getResult(); } | 11849 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11849/7fc2867031a646336a69eb6ad11ecd8b103f983e/MockDatabase.java/buggy/src/services/org/opennms/netmgt/mock/MockDatabase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2144,
336,
16779,
548,
12,
780,
20176,
653,
13,
288,
3639,
10326,
1253,
928,
264,
2453,
21287,
2453,
273,
394,
10326,
1253,
928,
264,
2453,
12,
2211,
16,
315,
4025,
13721,
350,
628,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2144,
336,
16779,
548,
12,
780,
20176,
653,
13,
288,
3639,
10326,
1253,
928,
264,
2453,
21287,
2453,
273,
394,
10326,
1253,
928,
264,
2453,
12,
2211,
16,
315,
4025,
13721,
350,
628,... |
if (node != null) return node; | if (node != null) { return node; } | public LayoutTreeNode findSash(LayoutPartSash sash) { if (this.getSash() == sash) return this; LayoutTreeNode node = children[0].findSash(sash); if (node != null) return node; node = children[1].findSash(sash); if (node != null) return node; return null; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/LayoutTreeNode.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LayoutTreeNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
9995,
12513,
1104,
55,
961,
12,
3744,
1988,
55,
961,
272,
961,
13,
288,
3639,
309,
261,
2211,
18,
588,
55,
961,
1435,
422,
272,
961,
13,
5411,
327,
333,
31,
3639,
9995,
12513,
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,
377,
1071,
9995,
12513,
1104,
55,
961,
12,
3744,
1988,
55,
961,
272,
961,
13,
288,
3639,
309,
261,
2211,
18,
588,
55,
961,
1435,
422,
272,
961,
13,
5411,
327,
333,
31,
3639,
9995,
12513,
7... |
if (segType != iter.SEG_MOVETO) { | if (segType != ExtendedPathIterator.SEG_MOVETO) { | protected ProxyGraphicsNode buildEndMarkerProxy() { ExtendedPathIterator iter = getExtShape().getExtendedPathIterator(); int nPoints = 0; // Get first point, in case the last segment on the // path is a close if (iter.isDone()) { return null; } double coords[] = new double[7]; double moveTo[] = new double[2]; int segType = 0; segType = iter.currentSegment(coords); if (segType != iter.SEG_MOVETO) { return null; } nPoints++; moveTo[0] = coords[0]; moveTo[1] = coords[1]; iter.next(); // Now, get the last two points on the path double[] lastButOne = new double[7]; double[] last = {coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6] }; double[] tmp = null; int lastSegType = segType; int lastButOneSegType = 0; while (!iter.isDone()) { tmp = lastButOne; lastButOne = last; last = tmp; lastButOneSegType = lastSegType; lastSegType = iter.currentSegment(last); if (lastSegType == PathIterator.SEG_MOVETO) { moveTo[0] = last[0]; moveTo[1] = last[1]; } else if (lastSegType == PathIterator.SEG_CLOSE) { lastSegType = PathIterator.SEG_LINETO; last[0] = moveTo[0]; last[1] = moveTo[1]; } iter.next(); nPoints++; } if (nPoints < 2) { return null; } // Turn the last segment into a position Point2D markerPosition = getSegmentTerminatingPoint(last, lastSegType); // If the marker's orient property is NaN, // the slope needs to be computed double rotation = endMarker.getOrient(); if (Double.isNaN(rotation)) { rotation = computeRotation(lastButOne, lastButOneSegType, last, lastSegType, null, 0); } // Now, compute the marker's proxy transform AffineTransform markerTxf = computeMarkerTransform(endMarker, markerPosition, rotation); ProxyGraphicsNode gn = new ProxyGraphicsNode(); gn.setSource(endMarker.getMarkerNode()); gn.setTransform(markerTxf); return gn; } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/37794489f7dedd0c74c1b7ae67e92cf8d877b256/MarkerShapePainter.java/buggy/sources/org/apache/batik/gvt/MarkerShapePainter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
7659,
17558,
907,
1361,
1638,
7078,
3886,
1435,
288,
3639,
14094,
743,
3198,
1400,
273,
336,
2482,
8500,
7675,
588,
11456,
743,
3198,
5621,
3639,
509,
290,
5636,
273,
374,
31,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7659,
17558,
907,
1361,
1638,
7078,
3886,
1435,
288,
3639,
14094,
743,
3198,
1400,
273,
336,
2482,
8500,
7675,
588,
11456,
743,
3198,
5621,
3639,
509,
290,
5636,
273,
374,
31,
3639,
... |
return packedData; } | return packedData; } | static byte[] discardNonBase64(byte[] data) { byte groomedData[] = new byte[data.length]; int bytesCopied = 0; for (int i = 0; i < data.length; i++) { if( isBase64(data[i]) ) { groomedData[bytesCopied++] = data[i]; } } byte packedData[] = new byte[bytesCopied]; System.arraycopy(groomedData, 0, packedData, 0, bytesCopied); return packedData; } | 7890 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7890/7748f47dcab2b77d0aeceef6af87b13851c3e7f3/Base64.java/buggy/src/java/org/apache/commons/codec/binary/Base64.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
3845,
1160,
8526,
10388,
3989,
2171,
1105,
12,
7229,
8526,
501,
13,
288,
202,
202,
7229,
314,
13924,
329,
751,
8526,
273,
394,
1160,
63,
892,
18,
2469,
15533,
202,
202,
474,
1731,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3845,
1160,
8526,
10388,
3989,
2171,
1105,
12,
7229,
8526,
501,
13,
288,
202,
202,
7229,
314,
13924,
329,
751,
8526,
273,
394,
1160,
63,
892,
18,
2469,
15533,
202,
202,
474,
1731,
... |
if(prb != null) return false; | if((!prbWasNonNull) && prb != null) { prbWasNonNull = true; return false; } | public synchronized boolean waitUntilStatusChange() { while(true) { if((!hadROLastTimeWaited) && hasForwardedRejectedOverload) { hadROLastTimeWaited = true; return true; } if(prb != null) return false; if(status != NOT_FINISHED) return false; try { wait(10000); } catch (InterruptedException e) { // Ignore } } } | 45341 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45341/a4bbebc6a92685d6297858e2d3ff36c80939b966/RequestSender.java/clean/src/freenet/node/RequestSender.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
1250,
2529,
9716,
1482,
3043,
1435,
288,
3639,
1323,
12,
3767,
13,
288,
540,
202,
430,
12443,
5,
76,
361,
1457,
3024,
950,
5480,
329,
13,
597,
711,
22915,
19902,
4851,
945,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2529,
9716,
1482,
3043,
1435,
288,
3639,
1323,
12,
3767,
13,
288,
540,
202,
430,
12443,
5,
76,
361,
1457,
3024,
950,
5480,
329,
13,
597,
711,
22915,
19902,
4851,
945,
... |
private static int processAnnotation(Annotation annot, Position pos, int invocationLocation, int bestOffset, boolean goToClosest, ArrayList resultingAnnotations) { | private static int processAnnotation(Annotation annot, Position pos, int invocationLocation, int bestOffset) { | private static int processAnnotation(Annotation annot, Position pos, int invocationLocation, int bestOffset, boolean goToClosest, ArrayList resultingAnnotations) { int posBegin= pos.offset; int posEnd= posBegin + pos.length; if (isInside(invocationLocation, posBegin, posEnd)) { // covers invocation location? if (bestOffset != invocationLocation) { resultingAnnotations.clear(); bestOffset= invocationLocation; } resultingAnnotations.add(annot); // don't do the 'hasCorrections' test } else if (goToClosest && bestOffset != invocationLocation) { int newClosestPosition= computeBestOffset(posBegin, invocationLocation, bestOffset); if (newClosestPosition != -1) { if (newClosestPosition != bestOffset) { // new best if (JavaCorrectionProcessor.hasCorrections(annot)) { // only jump to it if there are proposals resultingAnnotations.clear(); bestOffset= newClosestPosition; resultingAnnotations.add(annot); } } else { // as good as previous, don't do the 'hasCorrections' test resultingAnnotations.add(annot); } } } return bestOffset; } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/ecf7039c3942c8b09b2321672c82bc5d1314ec58/JavaCorrectionAssistant.java/clean/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionAssistant.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
509,
1207,
3257,
12,
3257,
6545,
16,
11010,
949,
16,
509,
9495,
2735,
16,
509,
3796,
2335,
16,
1250,
1960,
774,
4082,
7781,
16,
2407,
8156,
5655,
13,
288,
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,
225,
202,
1152,
760,
509,
1207,
3257,
12,
3257,
6545,
16,
11010,
949,
16,
509,
9495,
2735,
16,
509,
3796,
2335,
16,
1250,
1960,
774,
4082,
7781,
16,
2407,
8156,
5655,
13,
288,
202,
202,
474,... |
private void writeBody( FileWriter writer, String id, MojoDescriptor mojoDescriptor ) | private void writeBody( FileWriter writer, MojoDescriptor mojoDescriptor ) | private void writeBody( FileWriter writer, String id, MojoDescriptor mojoDescriptor ) { XMLWriter w = new PrettyPrintXMLWriter( writer ); w.startElement( "document" ); // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- w.startElement( "properties" ); w.startElement( "title" ); // TODO: need a friendly name for a plugin w.writeText( mojoDescriptor.getPluginDescriptor().getArtifactId() + " - " + mojoDescriptor.getFullGoalName() ); w.endElement(); w.endElement(); // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- w.startElement( "section" ); w.addAttribute( "name", mojoDescriptor.getFullGoalName() ); w.startElement( "p" ); if ( mojoDescriptor.getDescription() != null ) { w.writeMarkup( mojoDescriptor.getDescription() ); } else { w.writeText( "No description." ); } w.endElement(); w.startElement( "p" ); w.writeText( "Parameters for the goal: " ); w.endElement(); writeGoalParameterTable( mojoDescriptor, w ); w.endElement(); w.endElement(); } | 47160 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47160/0ff8c16056a68a10f88e003b4cdfbcbcdec8d9e3/PluginXdocGenerator.java/buggy/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1045,
2250,
12,
24639,
2633,
16,
15931,
3187,
312,
10007,
3187,
262,
565,
288,
3639,
3167,
2289,
341,
273,
394,
22328,
5108,
4201,
2289,
12,
2633,
11272,
3639,
341,
18,
1937,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1045,
2250,
12,
24639,
2633,
16,
15931,
3187,
312,
10007,
3187,
262,
565,
288,
3639,
3167,
2289,
341,
273,
394,
22328,
5108,
4201,
2289,
12,
2633,
11272,
3639,
341,
18,
1937,
1... |
public void setTcpNoDelay(boolean on) throws SocketException { if (impl == null) throw new SocketException("Not connected"); | public void setTcpNoDelay(boolean on) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); | public void setTcpNoDelay(boolean on) throws SocketException { if (impl == null) throw new SocketException("Not connected"); impl.setOption(SocketOptions.TCP_NODELAY, new Boolean(on)); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/426834aeca94b6762986d5f7b6cd54b12b69b2b8/Socket.java/buggy/core/src/classpath/java/java/net/Socket.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
27591,
2279,
6763,
12,
6494,
603,
13,
1216,
8758,
503,
288,
202,
202,
430,
261,
11299,
422,
446,
13,
1082,
202,
12849,
394,
8758,
503,
2932,
1248,
5840,
8863,
202,
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,
225,
202,
482,
918,
444,
27591,
2279,
6763,
12,
6494,
603,
13,
1216,
8758,
503,
288,
202,
202,
430,
261,
11299,
422,
446,
13,
1082,
202,
12849,
394,
8758,
503,
2932,
1248,
5840,
8863,
202,
2... |
public org.quickfix.field.EncodedHeadlineLen getEncodedHeadlineLen() throws FieldNotFound { org.quickfix.field.EncodedHeadlineLen value = new org.quickfix.field.EncodedHeadlineLen(); | public quickfix.field.EncodedHeadlineLen getEncodedHeadlineLen() throws FieldNotFound { quickfix.field.EncodedHeadlineLen value = new quickfix.field.EncodedHeadlineLen(); | public org.quickfix.field.EncodedHeadlineLen getEncodedHeadlineLen() throws FieldNotFound { org.quickfix.field.EncodedHeadlineLen value = new org.quickfix.field.EncodedHeadlineLen(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/News.java/buggy/src/java/src/quickfix/fix42/News.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
1414,
1369,
2891,
28799,
1414,
1369,
2891,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
1414,
1369,
2891,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
1414,
1369,
2891,
28799,
1414,
1369,
2891,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
1414,
1369,
2891,
... |
} | protected void load(InputStream in, char[] password) throws IOException { if (in.read() != USAGE) { throw new MalformedKeyringException("incompatible keyring usage"); } if (in.read() != PasswordAuthenticatedEntry.TYPE) { throw new MalformedKeyringException( "expecting password-authenticated entry tag"); } keyring = PasswordAuthenticatedEntry.decode(new DataInputStream(in), password); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/abad947539d38da7392ff914207d1bb7d5538320/GnuPrivateKeyring.java/clean/core/src/classpath/gnu/gnu/javax/crypto/keyring/GnuPrivateKeyring.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1262,
12,
4348,
316,
16,
1149,
8526,
2201,
13,
1216,
1860,
225,
288,
565,
309,
261,
267,
18,
896,
1435,
480,
11836,
2833,
13,
1377,
288,
3639,
604,
394,
13311,
653,
8022,
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,
282,
4750,
918,
1262,
12,
4348,
316,
16,
1149,
8526,
2201,
13,
1216,
1860,
225,
288,
565,
309,
261,
267,
18,
896,
1435,
480,
11836,
2833,
13,
1377,
288,
3639,
604,
394,
13311,
653,
8022,
503... | |
throw new PSQLException("postgresql.res.badbyte", s); | throw new PSQLException("postgresql.res.badbyte", PSQLState.NUMERIC_VALUE_OUT_OF_RANGE, s); | public byte getByte(int columnIndex) throws SQLException { String s = getString(columnIndex); if (s != null) { try { switch(fields[columnIndex-1].getSQLType()) { case Types.NUMERIC: case Types.REAL: case Types.DOUBLE: case Types.FLOAT: case Types.DECIMAL: s = (s.indexOf(".")==-1) ? s : s.substring(0,s.indexOf(".")); break; case Types.CHAR: s = s.trim(); break; } return Byte.parseByte(s); } catch (NumberFormatException e) { throw new PSQLException("postgresql.res.badbyte", s); } } return 0; // SQL NULL } | 47293 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47293/509a9cd3f922c38c19d35e81bb1427d663ba4aba/AbstractJdbc1ResultSet.java/buggy/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1160,
20999,
12,
474,
14882,
13,
1216,
6483,
202,
95,
202,
202,
780,
272,
273,
4997,
12,
2827,
1016,
1769,
202,
202,
430,
261,
87,
480,
446,
13,
202,
202,
95,
1082,
202,
698... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1160,
20999,
12,
474,
14882,
13,
1216,
6483,
202,
95,
202,
202,
780,
272,
273,
4997,
12,
2827,
1016,
1769,
202,
202,
430,
261,
87,
480,
446,
13,
202,
202,
95,
1082,
202,
698... |
Class[] args = | String[] args = | private Method buildConstructor(Class clazz, Element constructorElement) throws ClassNotFoundException { Class[] args = this.getArgumentClasses( constructorElement.getFirstChild().getChildNodes()); Constructor m = new Constructor(clazz, args); log.debug("Constructor builded: " + m); return m; } | 10293 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10293/a5e434e769b7467432c6134c2cdd36630e3ee5ae/XMLMethodInspector.java/clean/src/java/net/java/dev/jminimizer/util/XMLMethodInspector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
2985,
1361,
6293,
12,
797,
4003,
16,
3010,
3885,
1046,
13,
202,
202,
15069,
10403,
288,
202,
202,
797,
8526,
833,
273,
1082,
202,
2211,
18,
588,
1379,
4818,
12,
9506,
202,
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,
1152,
2985,
1361,
6293,
12,
797,
4003,
16,
3010,
3885,
1046,
13,
202,
202,
15069,
10403,
288,
202,
202,
797,
8526,
833,
273,
1082,
202,
2211,
18,
588,
1379,
4818,
12,
9506,
202,
12... |
else if ("ARROW DOWN".equals(t)) | else if ("ARROW DOWN".equals(t) || "ARROW_DOWN".equals(t)) | private static int parseShortcut(String text) { int accelerator= 0; int pos= text.indexOf('\t'); if (pos >= 0) { text= text.substring(pos+1); /* * This parsing code is wrong because it works only for the english version of eclipse */ StringTokenizer st= new StringTokenizer(text, "+"); while (st.hasMoreTokens()) { String t= st.nextToken().toUpperCase(); if ("SHIFT".equals(t)) accelerator |= SWT.SHIFT; else if ("CTRL".equals(t)) accelerator |= SWT.CONTROL; else if ("ALT".equals(t)) accelerator |= SWT.ALT; else if ("F1".equals(t)) accelerator |= SWT.F1; else if ("F2".equals(t)) accelerator |= SWT.F2; else if ("F3".equals(t)) accelerator |= SWT.F3; else if ("F4".equals(t)) accelerator |= SWT.F4; else if ("F5".equals(t)) accelerator |= SWT.F5; else if ("F6".equals(t)) accelerator |= SWT.F6; else if ("F7".equals(t)) accelerator |= SWT.F7; else if ("F8".equals(t)) accelerator |= SWT.F8; else if ("F9".equals(t)) accelerator |= SWT.F9; else if ("F10".equals(t)) accelerator |= SWT.F10; else if ("F11".equals(t)) accelerator |= SWT.F11; else if ("F12".equals(t)) accelerator |= SWT.F12; else if ("DELETE".equals(t)) accelerator |= SWT.DEL; else if ("ENTER".equals(t)) accelerator |= SWT.CR; else if ("ARROW UP".equals(t)) accelerator |= SWT.ARROW_UP; else if ("ARROW DOWN".equals(t)) accelerator |= SWT.ARROW_DOWN; else if ("ARROW LEFT".equals(t)) accelerator |= SWT.ARROW_LEFT; else if ("ARROW RIGHT".equals(t)) accelerator |= SWT.ARROW_RIGHT; else if ("SPACE".equals(t)) accelerator |= ' '; else if ("TAB".equals(t)) accelerator |= '\t'; else { if (t.length() > 1) System.out.println("unknown: <" + t + ">"); else { accelerator |= t.charAt(0); break; // must be last } } } } return accelerator;} | 12413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12413/12a6ba901b90450a65ac4d6d4e521d9b24054cb9/MenuItem.java/clean/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MenuItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
760,
509,
1109,
15576,
12,
780,
977,
13,
288,
202,
474,
15153,
7385,
33,
374,
31,
202,
202,
474,
949,
33,
977,
18,
31806,
2668,
64,
88,
8284,
202,
430,
261,
917,
1545,
374,
13,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
509,
1109,
15576,
12,
780,
977,
13,
288,
202,
474,
15153,
7385,
33,
374,
31,
202,
202,
474,
949,
33,
977,
18,
31806,
2668,
64,
88,
8284,
202,
430,
261,
917,
1545,
374,
13,
288,
... |
public ASTEQNode(Parser p, int id) | public ASTEQNode(int id) | public ASTEQNode(Parser p, int id) { super(p, id); } | 54229 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54229/7ab27ed84f24e262ba0c6f6beea3b797f7ffa8c4/ASTEQNode.java/buggy/src/java/org/apache/commons/jexl/parser/ASTEQNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
9183,
27247,
907,
12,
474,
612,
13,
565,
288,
3639,
2240,
12,
84,
16,
612,
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,
... | [
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
9183,
27247,
907,
12,
474,
612,
13,
565,
288,
3639,
2240,
12,
84,
16,
612,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
temp.start(); | public void start() throws UMOException { if (!initialised.get()) { initialise(); } if (!started.get()) { fireNotification(new ModelNotification(this, ModelNotification.MODEL_STARTING)); for (Iterator i = components.values().iterator(); i.hasNext();) { UMOComponent temp = (UMOComponent) i.next(); if(temp.getDescriptor().getInitialState().equals(ImmutableMuleDescriptor.INITIAL_STATE_STARTED)) { registerListeners(temp); temp.start(); logger.info("Component " + temp + " has been started successfully"); } else if(temp.getDescriptor().getInitialState().equals(ImmutableMuleDescriptor.INITIAL_STATE_PAUSED)) { registerListeners(temp); temp.start(); temp.pause(); logger.info("Component " + temp + " has an initial state of 'paused'"); } else { logger.info("Component " + temp + " has an initial state of 'stopped'"); } } started.set(true); fireNotification(new ModelNotification(this, ModelNotification.MODEL_STARTED)); } else { logger.debug("Model already started"); } } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/246a6be6f4fd4f5b908dcf62e8d161e15274c78f/AbstractModel.java/clean/mule/src/java/org/mule/impl/model/AbstractModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
787,
1435,
1216,
587,
5980,
503,
565,
288,
3639,
309,
16051,
6769,
5918,
18,
588,
10756,
288,
5411,
21301,
5621,
3639,
289,
3639,
309,
16051,
14561,
18,
588,
10756,
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,
787,
1435,
1216,
587,
5980,
503,
565,
288,
3639,
309,
16051,
6769,
5918,
18,
588,
10756,
288,
5411,
21301,
5621,
3639,
289,
3639,
309,
16051,
14561,
18,
588,
10756,
288,
5411,
... | |
metadataManagerView.setVisible(true); | detailView.setVisible(true); | public void run() { metadataManagerView.setVisible(true); } | 57211 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57211/abc9578bcfdca31e80420b2aaa8f8aba4dd53fa6/AppCoreCtrl.java/buggy/trunk/src/net/sf/plantlore/client/AppCoreCtrl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4766,
2398,
1071,
918,
1086,
1435,
288,
4766,
7734,
7664,
1767,
18,
542,
6207,
12,
3767,
1769,
4766,
5411,
289,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4766,
2398,
1071,
918,
1086,
1435,
288,
4766,
7734,
7664,
1767,
18,
542,
6207,
12,
3767,
1769,
4766,
5411,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (gs >= nMTF) | if (gs >= nMTF) { | private void sendMTFValues() throws IOException { char len[][] = new char[N_GROUPS][MAX_ALPHA_SIZE]; int v, t, i, j, gs, ge, totc, bt, bc, iter; int nSelectors = 0, alphaSize, minLen, maxLen, selCtr; int nGroups, nBytes; alphaSize = nInUse + 2; for (t = 0; t < N_GROUPS; t++) for (v = 0; v < alphaSize; v++) len[t][v] = (char)GREATER_ICOST; /* Decide how many coding tables to use */ if (nMTF <= 0) panic(); if (nMTF < 200) nGroups = 2; else if (nMTF < 600) nGroups = 3; else if (nMTF < 1200) nGroups = 4; else if (nMTF < 2400) nGroups = 5; else nGroups = 6; /* Generate an initial set of coding tables */ { int nPart, remF, tFreq, aFreq; nPart = nGroups; remF = nMTF; gs = 0; while (nPart > 0) { tFreq = remF / nPart; ge = gs-1; aFreq = 0; while (aFreq < tFreq && ge < alphaSize-1) { ge++; aFreq += mtfFreq[ge]; } if (ge > gs && nPart != nGroups && nPart != 1 && ((nGroups-nPart) % 2 == 1)) { aFreq -= mtfFreq[ge]; ge--; } for (v = 0; v < alphaSize; v++) if (v >= gs && v <= ge) len[nPart-1][v] = (char)LESSER_ICOST; else len[nPart-1][v] = (char)GREATER_ICOST; nPart--; gs = ge+1; remF -= aFreq; } } int rfreq[][] = new int[N_GROUPS][MAX_ALPHA_SIZE]; int fave[] = new int[N_GROUPS]; short cost[] = new short[N_GROUPS]; /* Iterate up to N_ITERS times to improve the tables. */ for (iter = 0; iter < N_ITERS; iter++) { for (t = 0; t < nGroups; t++) fave[t] = 0; for (t = 0; t < nGroups; t++) for (v = 0; v < alphaSize; v++) rfreq[t][v] = 0; nSelectors = 0; totc = 0; gs = 0; while (true) { /* Set group start & end marks. */ if (gs >= nMTF) break; ge = gs + G_SIZE - 1; if (ge >= nMTF) ge = nMTF-1; /* Calculate the cost of this group as coded by each of the coding tables. */ for (t = 0; t < nGroups; t++) cost[t] = 0; if (nGroups == 6) { short cost0, cost1, cost2, cost3, cost4, cost5; cost0 = cost1 = cost2 = cost3 = cost4 = cost5 = 0; for (i = gs; i <= ge; i++) { short icv = szptr[i]; cost0 += len[0][icv]; cost1 += len[1][icv]; cost2 += len[2][icv]; cost3 += len[3][icv]; cost4 += len[4][icv]; cost5 += len[5][icv]; } cost[0] = cost0; cost[1] = cost1; cost[2] = cost2; cost[3] = cost3; cost[4] = cost4; cost[5] = cost5; } else { for (i = gs; i <= ge; i++) { short icv = szptr[i]; for (t = 0; t < nGroups; t++) cost[t] += len[t][icv]; } } /* Find the coding table which is best for this group, and record its identity in the selector table. */ bc = 999999999; bt = -1; for (t = 0; t < nGroups; t++) if (cost[t] < bc) { bc = cost[t]; bt = t; }; totc += bc; fave[bt]++; selector[nSelectors] = (char)bt; nSelectors++; /* Increment the symbol frequencies for the selected table. */ for (i = gs; i <= ge; i++) rfreq[bt][szptr[i]]++; gs = ge+1; } /* Recompute the tables based on the accumulated frequencies. */ for (t = 0; t < nGroups; t++) hbMakeCodeLengths(len[t], rfreq[t], alphaSize, 20); } rfreq = null; fave = null; cost = null; if (!(nGroups < 8)) panic(); if (!(nSelectors < 32768 && nSelectors <= (2 + (900000 / G_SIZE)))) panic(); /* Compute MTF values for the selectors. */ { char pos[] = new char[N_GROUPS]; char ll_i, tmp2, tmp; for (i = 0; i < nGroups; i++) pos[i] = (char)i; for (i = 0; i < nSelectors; i++) { ll_i = selector[i]; j = 0; tmp = pos[j]; while ( ll_i != tmp ) { j++; tmp2 = tmp; tmp = pos[j]; pos[j] = tmp2; } pos[0] = tmp; selectorMtf[i] = (char)j; } } int code[][] = new int[N_GROUPS][MAX_ALPHA_SIZE]; /* Assign actual codes for the tables. */ for (t = 0; t < nGroups; t++) { minLen = 32; maxLen = 0; for (i = 0; i < alphaSize; i++) { if (len[t][i] > maxLen) maxLen = len[t][i]; if (len[t][i] < minLen) minLen = len[t][i]; } if (maxLen > 20) panic(); if (minLen < 1) panic(); hbAssignCodes(code[t], len[t], minLen, maxLen, alphaSize); } /* Transmit the mapping table. */ { boolean inUse16[] = new boolean[16]; for (i = 0; i < 16; i++) { inUse16[i] = false; for (j = 0; j < 16; j++) if (inUse[i * 16 + j]) inUse16[i] = true; } nBytes = bytesOut; for (i = 0; i < 16; i++) if (inUse16[i]) bsW(1,1); else bsW(1,0); for (i = 0; i < 16; i++) if (inUse16[i]) for (j = 0; j < 16; j++) if (inUse[i * 16 + j]) bsW(1,1); else bsW(1,0); } /* Now the selectors. */ nBytes = bytesOut; bsW ( 3, nGroups ); bsW ( 15, nSelectors ); for (i = 0; i < nSelectors; i++) { for (j = 0; j < selectorMtf[i]; j++) bsW(1,1); bsW(1,0); } /* Now the coding tables. */ nBytes = bytesOut; for (t = 0; t < nGroups; t++) { int curr = len[t][0]; bsW(5, curr); for (i = 0; i < alphaSize; i++) { while (curr < len[t][i]) { bsW(2,2); curr++; /* 10 */ } while (curr > len[t][i]) { bsW(2,3); curr--; /* 11 */ } bsW ( 1, 0 ); } } /* And finally, the block data proper */ nBytes = bytesOut; selCtr = 0; gs = 0; while (true) { if (gs >= nMTF) break; ge = gs + G_SIZE - 1; if (ge >= nMTF) ge = nMTF-1; for (i = gs; i <= ge; i++) { bsW(len [selector[selCtr]] [szptr[i]], code [selector[selCtr]] [szptr[i]] ); } gs = ge+1; selCtr++; } if (!(selCtr == nSelectors)) panic(); } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/7a4e9ca2278d5e22a3492abb964312150d0286b9/CBZip2OutputStream.java/clean/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1366,
6152,
42,
1972,
1435,
1216,
1860,
288,
3639,
1149,
562,
63,
6362,
65,
273,
394,
1149,
63,
50,
67,
28977,
6362,
6694,
67,
26313,
67,
4574,
15533,
3639,
509,
331,
16,
268... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1366,
6152,
42,
1972,
1435,
1216,
1860,
288,
3639,
1149,
562,
63,
6362,
65,
273,
394,
1149,
63,
50,
67,
28977,
6362,
6694,
67,
26313,
67,
4574,
15533,
3639,
509,
331,
16,
268... |
{ | { | public void logic() { Log4J.startMethod(logger, "logic"); if(aiProfiles.containsKey("heal")) { String[] healing=aiProfiles.get("heal").split(","); int amount=Integer.parseInt(healing[0]); int frequency=Integer.parseInt(healing[1]); if(rp.getTurn()%frequency==0 && getHP()!=getBaseHP()) { if(getHP()+amount<getBaseHP()) { setHP(getHP()+amount); } else { setHP(getBaseHP()); } } } if (getNearestPlayer(30) == null) // if there is no player near and none will see us... { // sleep so we don't waste cpu resources stopAttack(); stop(); if (Debug.CREATURES_DEBUG_SERVER) put("debug","sleep"); aiState = AiState.SLEEP; world.modify(this); return; } // this will keep track of the logic so the client can display it StringBuilder debug = new StringBuilder(100); // are we attacked and we don't attack ourself? if(isAttacked() && target == null) { // Yep, we're attacked clearPath(); // hit the attacker, but prefer players target = getNearestPlayer(8); if (target == null) { target = this.getAttackSource(0); } if (Debug.CREATURES_DEBUG_SERVER) debug.append("attacked;").append(target.getID().getObjectID()).append('|'); logger.debug("Creature("+get("type")+") has been attacked by "+target.get("type")); } else if(target==null || (!target.get("zoneid").equals(get("zoneid")) && world.has(target.getID())) || !world.has(target.getID())) { // no target or current target left the zone (or is dead) if(isAttacking()) { // stop the attack... if (Debug.CREATURES_DEBUG_SERVER) debug.append("cancelattack|"); target=null; clearPath(); stopAttack(); waitRounds = 0; } // ...and find another target target = getNearestPlayer(8); if(target!=null) { logger.debug("Creature("+get("type")+") gets a new target."); if (Debug.CREATURES_DEBUG_SERVER) debug.append("newtarget;").append(target.getID().getObjectID()).append('|'); } } // now we check our current target if (target == null) { // No target, so patrol along if (aiState != AiState.PATROL || !hasPath()) { // Create a patrolpath logger.debug("Creating Path for this entity"); List<Path.Node> nodes = new LinkedList<Path.Node>(); int size = patrolPath.size(); long time = System.nanoTime(); for(int i=0; i<size;i++) { Path.Node actual=patrolPath.get(i); Path.Node next=patrolPath.get((i+1)%size); nodes.addAll(Path.searchPath(this,actual.x+getx(),actual.y+gety(),new Rectangle2D.Double(next.x+getx(),next.y+gety(),1.0,1.0))); } long time2 = System.nanoTime()-time; setPath(nodes,true); if (Debug.CREATURES_DEBUG_SERVER) debug.append("generatepatrolpath;").append(time2).append("|"); } logger.debug("Following path"); if(hasPath()) Path.followPath(this,getSpeed()); aiState = AiState.PATROL; if (Debug.CREATURES_DEBUG_SERVER) debug.append("patrol;").append(pathToString()).append('|'); } else if(distance(target)>18*18) { // target out of reach logger.debug("Attacker is too far. Creature stops attack"); target=null; clearPath(); stopAttack(); stop(); if (Debug.CREATURES_DEBUG_SERVER) debug.append("outofreachstopped|"); } else if(!nextto(target,0.25) && !target.stopped()) { // target not near but in reach and is moving logger.debug("Moving to target. Searching new path"); clearPath(); setMovement(target,0,0, 20.0); moveto(getSpeed()); waitRounds = 0; // clear waitrounds aiState = AiState.APPROACHING_MOVING_TARGET; // update ai state if (Debug.CREATURES_DEBUG_SERVER) { List path = getPath(); if (path != null) { debug.append("targetmoved;").append(pathToString()).append("|"); } } } else if(nextto(target,0.25)) { if (Debug.CREATURES_DEBUG_SERVER) debug.append("attacking|"); // target is near logger.debug("Next to target. Creature stops and attacks"); stop(); attack(target); faceto(target); aiState = AiState.ATTACKING; } else { // target in reach and not moving logger.debug("Moving to target. Creature attacks"); if (Debug.CREATURES_DEBUG_SERVER) debug.append("movetotarget"); // our current Path is blocked...mostly by the target or another attacker if(collided()) { if (Debug.CREATURES_DEBUG_SERVER) debug.append(";blocked"); // invalidate the path and stop clearPath(); stop(); // wait some rounds so the path can be cleared by other creatures // (either they move away or die) waitRounds = WAIT_ROUNDS_BECAUSE_TARGET_IS_BLOCKED; } aiState = AiState.APPROACHING_STOPPED_TARGET; attack(target); faceto(target); // be sure to let the blocking creatures pass before trying to find a // new path if (waitRounds > 0) { if (Debug.CREATURES_DEBUG_SERVER) debug.append(";waiting"); waitRounds--; // HACK: remove collision flag (we're not moving after all) collides(false); clearPath(); } else { // Are we still patrol'ing? if (isPathLoop() || aiState == AiState.PATROL) { // yep, so clear the patrol path clearPath(); } setMovement(target,0,0, 20.0); moveto(getSpeed()); if (Debug.CREATURES_DEBUG_SERVER) debug.append(";newpath"); if (getPath() == null || getPath().size() == 0) // If creature is blocked choose a new target { if (Debug.CREATURES_DEBUG_SERVER) debug.append(";blocked"); logger.debug("Blocked. Choosing a new target."); target=null; clearPath(); stopAttack(); stop(); waitRounds = WAIT_ROUNDS_BECAUSE_TARGET_IS_BLOCKED; } else { if (Debug.CREATURES_DEBUG_SERVER) debug.append(';').append(getPath()); } } if (Debug.CREATURES_DEBUG_SERVER) debug.append(";dummy|"); } if(!stopped()) { StendhalRPAction.move(this); } if(rp.getTurn()%5==attackTurn && isAttacking()) { StendhalRPAction.attack(this,getAttackTarget()); if( getAttackTarget()!=null && nextto(getAttackTarget(),0.25)) { if(aiProfiles.containsKey("poisonous")) { int roll=Rand.roll1D100(); String[] poison=aiProfiles.get("poisonous").split(","); int prob= Integer.parseInt(poison[0]); String poisonType=poison[1]; if(roll<=prob) { ConsumableItem item=(ConsumableItem)world.getRuleManager().getEntityManager().getItem(poisonType); if(item==null) { logger.error("Creature unable to poisoning with "+poisonType); } else { RPEntity entity=getAttackTarget(); if(entity instanceof Player) { Player player=(Player)entity; if(!player.isPoisoned() && player.poison(item)) { rp.addGameEvent(getName(),"poison",player.getName()); player.setPrivateText("You have been poisoned by a "+getName()); rp.removePlayerText(player); } } } } } } } if(Rand.roll1D100()==1 && noises.size()>0) { // Random sound noises. int pos=Rand.rand(noises.size()); say(noises.get(pos)); } if (Debug.CREATURES_DEBUG_SERVER) put("debug",debug.toString()); world.modify(this); Log4J.finishMethod(logger, "logic"); } | 4438 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4438/2fde1e280a947dddab3f2a402a2927ea6b087d81/Creature.java/buggy/src/games/stendhal/server/entity/creature/Creature.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
4058,
1435,
377,
288,
377,
1827,
24,
46,
18,
1937,
1305,
12,
4901,
16,
315,
28339,
8863,
565,
309,
12,
10658,
12450,
18,
12298,
653,
2932,
580,
287,
6,
3719,
4202,
288,
4202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
4058,
1435,
377,
288,
377,
1827,
24,
46,
18,
1937,
1305,
12,
4901,
16,
315,
28339,
8863,
565,
309,
12,
10658,
12450,
18,
12298,
653,
2932,
580,
287,
6,
3719,
4202,
288,
4202,... |
String type = field.getType(); String ownerName = (field.getOwner().equals(classNode.getName())) | Type type = field.getType(); String ownerName = (field.getOwner().equals(classNode.getType())) | public void loadInstanceField(FieldExpression fldExp) { FieldNode field = fldExp.getField(); boolean holder = field.isHolder() && !isInClosureConstructor(); String type = field.getType(); String ownerName = (field.getOwner().equals(classNode.getName())) ? internalClassName : org.objectweb.asm.Type.getInternalName(loadClass(field.getOwner())); cv.visitVarInsn(ALOAD, 0); cv.visitFieldInsn(GETFIELD, ownerName, fldExp.getFieldName(), BytecodeHelper.getTypeDescription(type)); if (holder) { cv.visitMethodInsn(INVOKEVIRTUAL, "groovy/lang/Reference", "get", "()Ljava/lang/Object;"); } else { if (BytecodeHelper.isPrimitiveType(type)) { helper.box(type); } else { } } } | 6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/0e621fdecf3e8ab9db2fe9eea10bae5d2dc4b695/AsmClassGenerator.java/buggy/src/main/org/codehaus/groovy/classgen/AsmClassGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1262,
1442,
974,
12,
974,
2300,
9880,
2966,
13,
288,
377,
202,
974,
907,
652,
273,
9880,
2966,
18,
588,
974,
5621,
3639,
1250,
10438,
273,
652,
18,
291,
6064,
1435,
597,
401,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1262,
1442,
974,
12,
974,
2300,
9880,
2966,
13,
288,
377,
202,
974,
907,
652,
273,
9880,
2966,
18,
588,
974,
5621,
3639,
1250,
10438,
273,
652,
18,
291,
6064,
1435,
597,
401,... |
c.popBFC(); | public static Box layout(Context c, Content content) { Box outerBox;//the outer box may be block or inline block boolean set_bfc = false; if (content instanceof TableContent) { outerBox = new BlockBox(); // install a block formatting context for the body, // ie. if it's null. // set up the outtermost bfc if (c.getBlockFormattingContext() == null) { outerBox.setParent(c.getCtx().getRootBox()); BlockFormattingContext bfc = new BlockFormattingContext(outerBox, c); c.pushBFC(bfc); set_bfc = true; bfc.setWidth((int) c.getExtents().getWidth()); } } else { XRLog.layout(Level.WARNING, "Unsupported table type " + content.getClass().getName()); return null; } // copy the extents Rectangle oe = c.getExtents(); c.setExtents(new Rectangle(oe)); outerBox.x = c.getExtents().x; outerBox.y = c.getExtents().y; //HACK: for now outerBox.width = c.getExtents().width; outerBox.height = c.getExtents().height; TableBox tableBox = new TableBox(); tableBox.element = content.getElement(); //OK, first set up the current style. All depends on this... CascadedStyle pushed = content.getStyle(); if (pushed != null) { c.pushStyle(pushed); } else { c.pushStyle(CascadedStyle.emptyCascadedStyle); } VerticalMarginCollapser.collapseVerticalMargins(c, tableBox, content, (float) oe.getWidth()); TableContent tableContent = (TableContent) content; if (tableContent.isTopMarginCollapsed()) { tableBox.setMarginTopOverride(0f); } if (tableContent.isBottomMarginCollapsed()) { tableBox.setMarginBottomOverride(0f); } Border border = c.getCurrentStyle().getBorderWidth(c.getCtx()); //note: percentages here refer to width of containing block Border margin = tableBox.getMarginWidth(c, (float) oe.getWidth()); Border padding = c.getCurrentStyle().getPaddingWidth((float) oe.getWidth(), (float) oe.getWidth(), c.getCtx()); int tx = margin.left + border.left + padding.left; int ty = margin.top + border.top + padding.top; tableBox.tx = tx; tableBox.ty = ty; c.translate(tx, ty); c.shrinkExtents(tx + margin.right + border.right + padding.right, ty + margin.bottom + border.bottom + padding.bottom); IdentValue borderStyle = c.getCurrentStyle().getIdent(CSSName.BORDER_COLLAPSE); int borderSpacingHorizontal = (int) c.getCurrentStyle().getFloatPropertyProportionalWidth(CSSName.FS_BORDER_SPACING_HORIZONTAL, 0, c.getCtx()); int borderSpacingVertical = (int) c.getCurrentStyle().getFloatPropertyProportionalWidth(CSSName.FS_BORDER_SPACING_VERTICAL, 0, c.getCtx()); layoutChildren(c, tableBox, content, false, borderSpacingHorizontal, borderSpacingVertical); c.unshrinkExtents(); c.translate(-tx, -ty); //OK, now we basically have the maximum cell widths, is that a smart order? //TODO: percentages? if (c.getCurrentStyle().isIdent(CSSName.WIDTH, IdentValue.AUTO)) { //we're normally fine, unless the maximum width is greater than the extents fixWidths(tableBox, borderSpacingHorizontal); } else {//if the algorithm is fixed, we need to do something else from the start int givenWidth = (int) c.getCurrentStyle().getFloatPropertyProportionalWidth(CSSName.WIDTH, c.getExtents().width, c.getCtx()); //also fine, if the total calculated is less than the extents and the width if (tableBox.width < givenWidth) { tableBox.width = givenWidth; fixWidths(tableBox, borderSpacingHorizontal); } else { c.getExtents().width = 1; c.translate(tx, ty); int[] preferredColumns = tableBox.columns; tableBox.columns = null; tableBox.removeAllChildren(); tableBox.width = 0; tableBox.height = 0; layoutChildren(c, tableBox, content, false, borderSpacingHorizontal, borderSpacingVertical); c.translate(-tx, -ty); //here the table is layed out with minimum column widths if (tableBox.width < givenWidth) { //do it right tableBox.width = givenWidth; tableBox.removeAllChildren(); fixWidths(tableBox, borderSpacingHorizontal, preferredColumns); c.translate(tx, ty); tableBox.width = 0; tableBox.height = 0; layoutChildren(c, tableBox, content, true, borderSpacingHorizontal, borderSpacingVertical); c.translate(-tx, -ty); } } } //now the width is settled, fix vertical alignment for (Iterator i = tableBox.getChildIterator(); i.hasNext();) { Object o = i.next(); if (o instanceof RowBox) { fixVerticalAlign(c, (RowBox) o); } } // calculate the total outer width tableBox.width = margin.left + border.left + padding.left + tableBox.width + padding.right + border.right + margin.right; tableBox.height = margin.top + border.top + padding.top + tableBox.height + padding.bottom + border.bottom + margin.bottom; c.popStyle(); //restore the extents c.setExtents(oe); // remove the outtermost bfc if (set_bfc) { c.getBlockFormattingContext().doFinalAdjustments(); //no! clear it in BasicPanel instead! c.popBFC(); } return tableBox;//HACK: } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/ea25c36d8670e0a2297b9a25e4765c46f98952c5/TableBoxing.java/buggy/src/java/org/xhtmlrenderer/table/TableBoxing.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
276,
18,
5120,
38,
4488,
5621,
276,
18,
5120,
38,
4488,
5621,
276,
18,
5120,
38,
4488,
5621,
276,
18,
5120,
38,
4488,
5621,
1071,
71,
18,
5120,
38,
4488,
5621,
760,
71,
18,
5120,
38,
4488,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
276,
18,
5120,
38,
4488,
5621,
276,
18,
5120,
38,
4488,
5621,
276,
18,
5120,
38,
4488,
5621,
276,
18,
5120,
38,
4488,
5621,
1071,
71,
18,
5120,
38,
4488,
5621,
760,
71,
18,
5120,
38,
4488,... | |
return RubyFixnum.newFixnum(getRuntime(), getLength()); | return getRuntime().newFixnum(getLength()); | public RubyFixnum length() { return RubyFixnum.newFixnum(getRuntime(), getLength()); } | 45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/870e1da9b41bfdbae259e1fc5f18fc8b76686998/JavaArray.java/buggy/src/org/jruby/javasupport/JavaArray.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
8585,
2107,
769,
1435,
288,
3639,
327,
18814,
7675,
2704,
8585,
2107,
12,
588,
1782,
10663,
565,
289,
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,
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,
19817,
8585,
2107,
769,
1435,
288,
3639,
327,
18814,
7675,
2704,
8585,
2107,
12,
588,
1782,
10663,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
System.err.println(message + " - " + ze.getMessage()); | private static void saveItem(ZipFile zipFile, String rootDirName, ZipEntry entry) throws ZipException, IOException { InputStream is = null; BufferedInputStream inStream = null; FileOutputStream outStream = null; BufferedOutputStream bufferedOutStream = null; try { File file = new File(rootDirName, entry.getName()); if (entry.isDirectory()) { file.mkdirs(); } else { is = zipFile.getInputStream(entry); inStream = new BufferedInputStream(is); File dir = new File(file.getParent()); dir.mkdirs(); outStream = new FileOutputStream(file); bufferedOutStream = new BufferedOutputStream(outStream); int c; while ((c = inStream.read()) != -1) { bufferedOutStream.write((byte) c); } } } catch (ZipException ze) { String message = "Zip error unzipping entry: " + entry.getName(); LOG.error(message, ze); System.err.println(message + " - " + ze.getMessage()); throw new RuntimeException(message, ze); } catch (IOException ioe) { String message = "I/O error unzipping entry: " + entry.getName(); LOG.error(message, ioe); System.err.println(message + " - " + ioe.getMessage()); throw new RuntimeException(message, ioe); } finally { if (bufferedOutStream != null) { bufferedOutStream.close(); } if (inStream != null) { inStream.close(); } } } | 55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/2c85e0021203d96ece16c5bbfb40ebb70caeeb07/ZipUtil.java/clean/contrib/distributed/src/net/sourceforge/cruisecontrol/distributed/util/ZipUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
1923,
1180,
12,
29394,
19450,
16,
514,
15393,
461,
16,
23652,
1241,
13,
1216,
8603,
503,
16,
1860,
288,
3639,
5037,
353,
273,
446,
31,
3639,
24742,
28987,
273,
446,
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,
377,
3238,
760,
918,
1923,
1180,
12,
29394,
19450,
16,
514,
15393,
461,
16,
23652,
1241,
13,
1216,
8603,
503,
16,
1860,
288,
3639,
5037,
353,
273,
446,
31,
3639,
24742,
28987,
273,
446,
31,
... | |
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { //log("start doPost"); // Lets validate the session and get the session if (super.checkSession(req,res) == false) { log("checkSession == false"); return ; } HttpSession session = req.getSession(false); // Lets get the standard parameters and validate them Properties params = super.getSessionParameters(req) ; if (super.checkParameters(req, res, params) == false) { log("getSessionParameters==false"); return ; } // Lets get the new chat parameters Properties chatParams = super.getNewChatParameters(req) ; if (super.checkParameters(req, res, chatParams) == false) { log("checkParameters==false"); //return ; } // Lets get an user object imcode.server.User user = super.getUserObj(req,res) ; if(user == null) return ; if ( !isUserAuthorized( req, res, user ) ) { log("isUserAuthorized==false"); return ; } // Lets get serverinformation String host = req.getHeader("Host") ; String imcServer = Utility.getDomainPref("userserver",host) ; String chatPoolServer = Utility.getDomainPref("chat_server",host) ; RmiConf rmi = new RmiConf(user) ; String action = req.getParameter("action"); if(action == null) { action = "" ; String header = "ChatCreator servlet. " ; ChatError err = new ChatError(req,res,header,3) ; log(header + err.getErrorMsg()) ; return ; } // ********* If a NEW CHAT is created ******** if(action.equalsIgnoreCase("ADD_CHAT")) { //log("action = ADD_CHAT") ; //*************** Get all New Chatparameters ******************** //get the msgTypes Vector msgTypesV ; if( (Vector)session.getValue("msgTypesV")==null ){ String[][] msgTypes = rmi.execProcedureMulti(chatPoolServer, "C_GetTheMsgTypesBase"); msgTypesV = super.convert2Vector(msgTypes); session.putValue("msgTypesV",msgTypesV); } msgTypesV = (Vector)session.getValue("msgTypesV"); //get the authorization types Vector autTypeV ; if( (Vector)session.getValue("autTypesV")==null ){ String[][] autTypes = rmi.execProcedureMulti(chatPoolServer, "C_GetAuthorizationTypes"); autTypeV = super.convert2Vector(autTypes); session.putValue("autTypesV",autTypeV); } autTypeV = (Vector)session.getValue("autTypesV"); //lets get the selected autotypes String[] selAuto = (req.getParameterValues("authorized")==null) ? new String[0] : (req.getParameterValues("authorized")); Vector selAutoV = super.convert2Vector(selAuto); //get existing rooms Vector roomsV = ( (Vector)session.getValue("roomList")==null ) ? new Vector() : (Vector)session.getValue("roomList"); //get existing new msgTypes Vector newMsgTypeV = ( (Vector)session.getValue("newMsgTypes")==null ) ? new Vector() : (Vector)session.getValue("newMsgTypes"); //****************If newRoom or newMsgTypebutton is pressed:************************ if ( req.getParameter("addRoom") != null || req.getParameter("addMsgType") != null) { //log("addRoom or addMsgType" ); VariableManager vm = new VariableManager() ; Html htm = new Html(); //get new parameters if ( req.getParameter("chatRoom")==null ){ chatParams.setProperty("chatRoom",""); }else{ chatParams.setProperty("chatRoom",req.getParameter("chatRoom").trim()); } if ( req.getParameter("msgType")==null ){ chatParams.setProperty("msgType"," ") ; }else{ chatParams.setProperty("msgType",req.getParameter("msgType").trim()); } String theRoom = chatParams.getProperty("chatRoom"); String theType = chatParams.getProperty("msgType"); //get all chatparameters Enumeration chatEnum = chatParams.propertyNames(); while (chatEnum.hasMoreElements()) { String paramName = (String)chatEnum.nextElement(); //Add new Room if ( req.getParameter("addRoom") != null && paramName.equals("chatRoom") ) { //add new room to roomlist theRoom = chatParams.getProperty(paramName) ; //log("Rum: " + theRoom ); roomsV.add(" "); roomsV.add( theRoom ); //add room to session session.putValue("roomList",roomsV); } //Add new MsgType else if ( req.getParameter("addMsgType") != null && paramName.equals("msgType") ) { //add new msgType to msgTypelist theType = chatParams.getProperty(paramName); //log("MsgTyp: " + theType); msgTypesV.add(" "); msgTypesV.add(theType); newMsgTypeV.add( theType ); //add type to session session.putValue("newMsgTypes",newMsgTypeV); session.putValue("msgTypesV",msgTypesV); } }//end while //ok lets set up the page String updateTime = chatParams.getProperty("updateTime"); //log("Updatetime: 1 " + updateTime); vm.addProperty("SERVLET_URL", MetaInfo.getServletPath(req)) ; vm.addProperty("chatRoom",chatParams.getProperty("chatRoom")); vm.addProperty("roomList", htm.createHtmlCode("ID_OPTION",theRoom, roomsV) ) ; vm.addProperty("msgType"," "); vm.addProperty("msgTypes", htm.createHtmlCode("ID_OPTION",theType, msgTypesV) ) ; vm.addProperty("authorized", htm.createHtmlCode("ID_OPTION",selAutoV, autTypeV) ) ; vm.addProperty("chatName",chatParams.getProperty("chatName") ); vm.addProperty("updateTime",chatParams.getProperty("updateTime") ); Vector buttonValues = new Vector();buttonValues.add("1");buttonValues.add("2");buttonValues.add("3"); vm.addProperty("reload", htm.createRadioButton("reload",buttonValues,chatParams.getProperty("reload") ) ); vm.addProperty("inOut", htm.createRadioButton("inOut",buttonValues,chatParams.getProperty("inOut") ) ); vm.addProperty("private", htm.createRadioButton("private",buttonValues,chatParams.getProperty("privat") ) ); vm.addProperty("public", htm.createRadioButton("public",buttonValues,chatParams.getProperty("publik") ) ); vm.addProperty("dateTime", htm.createRadioButton("dateTime",buttonValues,chatParams.getProperty("dateTime") ) ); vm.addProperty("font", htm.createRadioButton("font",buttonValues,chatParams.getProperty("font") ) ); sendHtml(req,res,vm, HTML_TEMPLATE) ; //log("end addRoom or addMsgType"); return ; }//end adding new msgTypes or rooms //get the new metaId String metaId = params.getProperty("META_ID") ; //log("metaid: "+ metaId); //check that its really a new metaId String foundMetaId = rmi.execSqlProcedureStr(chatPoolServer, "C_MetaIdExists " + metaId) ; if( !foundMetaId.equals("1") ) { action = "" ; String header = "ChatCreator servlet. " ; ChatError err = new ChatError(req,res,header,90) ; log(header + err.getErrorMsg()); return ; } //******************* save to db ********************************** // Lets add a new Chat to DB String chatName = chatParams.getProperty("chatName"); //log("chatName: " + chatName); String permission = chatParams.getProperty("permission"); //log("permission: "+permission); String sqlQ = "C_AddNewChat " + metaId + ",'" + chatName + "'," + permission; //log("C_AddNewChat sql:" + sqlQ ) ; rmi.execSqlUpdateProcedure(chatPoolServer, sqlQ) ; //lets save the rooms and assosiate them with this chat for (int i=0;i<roomsV.size();i+=2) { String newRsql = "C_AddNewChatRoom " +metaId + ", '" + roomsV.get(i+1)+"'"; //log("C_AddNewChatRoom sql:" + newRsql ) ; rmi.execSqlUpdateProcedure(chatPoolServer, newRsql) ; } //lets connect the standard msgTypes with the chat String[] tempTypes = rmi.execSqlProcedure(chatPoolServer, "C_GetBaseMsgTypes"); for(int i=0;i<tempTypes.length;i++) { String tempTypeId = rmi.execSqlProcedureStr(chatPoolServer, "C_GetMsgTypeId " + "'"+ tempTypes[i] +"'"); rmi.execSqlUpdateProcedure(chatPoolServer,"C_AddNewChatMsg " + tempTypeId + " , " + metaId ) ; } // Lets add the new msgTypes to the db /ugly but it works for (int i=0;i<newMsgTypeV.size();i++) { //save newMsgTypes to db //Lets get the highest msgId //String msgTypeId = rmi.execSqlProcedureStr(chatPoolServer, "C_GetMaxMsgTypeId"); String newMsql = "C_AddMessageType " + " '" + metaId + "', " + newMsgTypeV.get(i); //log("AddNewMsgType sql:" + newMsql ) ; rmi.execSqlUpdateProcedure(chatPoolServer,newMsql); } // Vector valuesV = new Vector(); String valuesS = "C_AddChatParams "; valuesS = valuesS + metaId +"," + chatParams.getProperty("updateTime")+"," + chatParams.getProperty("reload")+"," + chatParams.getProperty("inOut")+"," + chatParams.getProperty("privat")+"," + chatParams.getProperty("publik")+"," + chatParams.getProperty("dateTime")+"," + chatParams.getProperty("font") ; //log("valuesS: " + valuesS ); rmi.execSqlUpdateProcedure(chatPoolServer,valuesS); //ok lets add the authorization types //if there isnt any lets give everybody access //log("selAutoV.size()= "+selAutoV.size()); if (selAutoV.size() == 0) { selAutoV.addElement(new String("1")); } for(int i=0; i<selAutoV.size(); i++) { String newAutoSql = "C_ChatAutoTypes " + " '" + selAutoV.elementAt(i) + "', " + metaId; //System.out.println("ChatAutoTypes sql:" + newAutoSql ) ; rmi.execSqlUpdateProcedure(chatPoolServer,newAutoSql); } //put the parameters needed to create a chat in the session session.putValue("chatId",metaId); //session.putValue("roomList",roomsV); //session.putValue("msgTypes",msgTypesV); //session.putValue("chatParams",chatParams); Enumeration e = chatParams.propertyNames(); while (e.hasMoreElements()) { String temp = (String)e.nextElement(); //log( "testParams: " + temp + " Value: " + chatParams.getProperty( temp) ); } //ok lets create the chat object and its rooms String[] types = rmi.execSqlProcedure(chatPoolServer, "C_GetChatAutoTypes '"+ metaId + "' "); Chat theChat = new Chat( Integer.parseInt(metaId), msgTypesV, chatParams, types ); //lets get the rooms data from db String[][] roomIdNr = rmi.execProcedureMulti(chatPoolServer, "C_GetRooms " + metaId) ; //log("C_GetRooms " + metaId); for(int i=0; i<roomIdNr.length;i++) { //log("#########"+roomIdNr[i][0]); theChat.createNewChatGroup(Integer.parseInt(roomIdNr[i][0]), roomIdNr[i][1]); } ServletContext myContext = getServletContext(); myContext.setAttribute("theChat"+metaId, theChat); // Ok, we're done creating the chat. Lets tell imCMS system to show this child. rmi.activateChild(imcServer, metaId) ; // Ok, we're done adding the chat, Lets log in to it! String loginPage = MetaInfo.getServletPath(req) + "ChatLogin?login_type=login" ; res.sendRedirect(loginPage) ; //log("end ADD_CHAT"); return ; } /**************************************************************************************************** * admin chat ****************************************************************************************************/ if (action.equalsIgnoreCase("admin_chat")) { //log("*** start admin_chat ***"); VariableManager vm = new VariableManager() ; Html htm = new Html(); //this method handle the stuff we can do in the template admin page if (req.getParameter("admin_templates_meta") != null) { //log("admin_templates_meta"); if(req.getParameter("add_templates")!= null) { //log("add_templates"); //lets add a new template set if we got some thing to add String newLibName = req.getParameter("template_lib_name"); newLibName = super.verifySqlText(newLibName) ; if (newLibName==null) { String header = "ChatCreator servlet. " ; String msg = params.toString() ; ChatError err = new ChatError(req,res,header, 80) ; //obs kolla om rtt nr return ; } // Lets check if we already have a templateset with that name String sql = "C_FindTemplateLib " + newLibName ; String libNameExists = rmi.execSqlProcedureStr(chatPoolServer, sql) ; if( !libNameExists.equalsIgnoreCase("-1") ) { String header = "ChatCreator servlet. " ; ChatError err = new ChatError(req,res,header, 84) ;//obs kolla om rtt nr return ; } //********* String sqlQ = "C_AddTemplateLib '" + newLibName + "'" ; rmi.execSqlUpdateProcedure(chatPoolServer, sqlQ) ; // Lets copy the original folders to the new foldernames String metaId = super.getMetaId(req) ; FileManager fileObj = new FileManager() ; File templateSrc = new File(MetaInfo.getExternalTemplateFolder(imcServer, metaId), "original") ; File imageSrc = new File(rmi.getExternalImageHomeFolder(host,imcServer, metaId), "original") ; File templateTarget = new File(MetaInfo.getExternalTemplateFolder(imcServer, metaId), newLibName) ; File imageTarget = new File(rmi.getExternalImageHomeFolder(host,imcServer, metaId), newLibName) ; fileObj.copyDirectory(templateSrc, templateTarget) ; fileObj.copyDirectory(imageSrc, imageTarget) ; }//done add new template lib if (req.getParameter("change_templatelib")!=null) {//ok lets handle the change set case //log("change_templatelib"); // Lets get the new library name and validate it String newLibName = req.getParameter("new_templateset_name") ; //log("newLibName: "+newLibName); if (newLibName == null) { String header = "ChatCreator servlet. " ; String msg = params.toString() ; ChatError err = new ChatError(req,res,header, 80) ;//obs kolla om rtt nr return ; } // Lets find the selected template in the database and get its id // if not found, -1 will be returned String sqlQ = "C_GetTemplateIdFromName '" + newLibName + "'" ;//GetTemplateIdFromName String templateId = rmi.execSqlProcedureStr(chatPoolServer, sqlQ) ; if(templateId.equalsIgnoreCase("-1")) { String header = "ChatCreator servlet. " ; String msg = params.toString() ; ChatError err = new ChatError(req,res,header,81) ; return ; } // Ok, lets update the chat with this new templateset. //but first lets delete the old one. String delString = "C_deleteChatTemplateset "+ params.getProperty("META_ID") ; rmi.execSqlUpdateProcedure(chatPoolServer, delString) ; String updateSql = "C_SetNewTemplateLib " + params.getProperty("META_ID") ;//SetTemplateLib updateSql += ", '" + newLibName + "'" ; rmi.execSqlUpdateProcedure(chatPoolServer, updateSql) ; } if (req.getParameter("UPLOAD_CHAT")!=null) {//ok lets handle the upload of templates and images //lets load the page to handle this String folderName = req.getParameter("TEMPLATE_NAME"); String uploadType = req.getParameter("UPLOAD_TYPE"); String metaId = params.getProperty("META_ID"); //log(folderName +" "+uploadType+" "+metaId); if(folderName == null || uploadType == null || metaId == null) return; vm.addProperty("META_ID", metaId ) ; vm.addProperty("UPLOAD_TYPE", uploadType); vm.addProperty("FOLDER_NAME", folderName); sendHtml(req,res,vm, ADMIN_TEMPLATES_TEMPLATE_2) ; return; } } //check if template adminpage is wanted if (req.getParameter("adminTemplates")!=null) { //log("jippikaayeeee"); //ok we need to create the admin templates page, and to be //able to do that, we need the name and number of the current template set //but we also need a select list of all template set there is... //so what keeping us from doing it...coffe-break maby... //back from the coffe-break, now lets rock! //lets get the meta_id String metaId = params.getProperty("META_ID") ; //log("metaid: "+ metaId); //ok now lets get the template set name String templateSetName = rmi.execSqlProcedureStr(chatPoolServer, "C_GetTemplateLib '"+ metaId + "' "); if (templateSetName == null) { templateSetName=""; } //ok lets get all the template set there is String[] templateLibs = rmi.execSqlProcedure(chatPoolServer, "C_GetAllTemplateLibs"); //lets check if we got something //log(""+templateLibs.length); Vector vect = new Vector(); if (templateLibs != null) { vect = super.convert2Vector(templateLibs); } vm.addProperty("TEMPLATE_LIST",htm.createHtmlCode("ID_OPTION",templateSetName, vect) ); vm.addProperty("CURRENT_TEMPLATE_SET", templateSetName ) ; sendHtml(req,res,vm, ADMIN_TEMPLATES_TEMPLATE) ; return; } //FIX ugly //lets get the chatMember //check which chat we have String chatName = req.getParameter("chatName"); if(chatName==null)chatName =""; //log("ChatName: " + chatName); vm.addProperty("chatName", chatName ) ; String metaId = (String)session.getValue("Chat.meta_id"); //log("MetaId: " + metaId); ChatMember myMember = (ChatMember) session.getValue("theChatMember"); if (myMember == null) { log("chatMembern was null so return"); return; } Chat myChat = myMember.getMyParent(); if (myChat == null) { log("theChat was null so return"); return; }//FIX end //************** add new room ************************* //get chatrooms Enumeration groupE = myChat.getAllChatGroups(); Vector groupsV = new Vector(); while (groupE.hasMoreElements()) { ChatGroup temp = (ChatGroup)groupE.nextElement(); groupsV.add( temp.getGroupName() ); groupsV.add( temp.getGroupName() ); //log("grupp: " + temp ); } Vector addGroups = (Vector)session.getValue("NewRooms") == null ? new Vector() : (Vector)session.getValue("NewRooms") ;//sessionen Vector delGroups = (Vector)session.getValue("DelRooms") == null ? new Vector() : (Vector)session.getValue("DelRooms") ;//sessionen if ( req.getParameter("addRoom") != null ) { //log("*** start addRoom ***"); //lets get the room to add String newRoom = req.getParameter("chatRoom"); addGroups.add(newRoom); addGroups.add(newRoom); session.putValue("NewRooms",addGroups); //log("*** end addRoom ***"); } //********* delete room ***************** if ( req.getParameter("removeRoom") != null ) { //log("*** start removeRoom ***"); //vilket rum ska tas bort String delRoom = req.getParameter("roomList"); //log("roomList: " + delRoom); //deleta rummet i listan delGroups.add(delRoom); delGroups.add(delRoom); session.putValue("DelRooms",delGroups); //log("*** end removeRoom ***"); } //lgg ihop rummen for(int i=0;i<addGroups.size();i++) { groupsV.add(addGroups.get(i)); } for(int i=0;i<delGroups.size();i++) { groupsV.remove(delGroups.get(i)); } //************ add new msgTypes ******************** Vector theTypes = myChat.getMsgTypes(); Vector msgTypeV = new Vector(); for(int i = 0; i<theTypes.size();i+=2) { msgTypeV.add(theTypes.get(i+1)); msgTypeV.add(theTypes.get(i+1)); } //hmta redan tillagda typer Vector addTypes = (Vector)session.getValue("NewTypes") == null ? new Vector() : (Vector)session.getValue("NewTypes") ; Vector delTypes = (Vector)session.getValue("DelTypes") == null ? new Vector() : (Vector)session.getValue("DelTypes") ; Vector autTypeV = (Vector) session.getValue("Chat_autTypeV"); String[] selAuto = (req.getParameterValues("authorized")==null) ? new String[0] : (req.getParameterValues("authorized")); Vector selAutoV = super.convert2Vector(selAuto); //add new msgType if ( req.getParameter("addMsgType") != null ) { String newMsgType = req.getParameter("msgType"); //lgg till ny typ addTypes.add(newMsgType); addTypes.add(newMsgType); session.putValue("NewTypes",addTypes); } //*************** delete msgType ********** if ( req.getParameter("removeMsgType") != null ) { //vilket rum ska tas bort String delType = req.getParameter("msgTypes"); //deleta typen i listan delTypes.add(delType); delTypes.add(delType); session.putValue("DelTypes",delTypes); } //lgg ihop msgTyperna for(int i=0;i<addTypes.size();i++) { msgTypeV.add(addTypes.get(i)); } for(int i=0;i<delTypes.size();i++) { msgTypeV.remove(delTypes.get(i)); } //rita om sidan med rtt vrden vm.addProperty("chatRoom", "" ); vm.addProperty("msgType", "" ); vm.addProperty("roomList", htm.createHtmlCode("ID_OPTION","", groupsV) ) ; vm.addProperty("msgTypes", htm.createHtmlCode("ID_OPTION","", msgTypeV) ) ; //get parameters Properties chatP = super.getNewChatParameters(req); File templatePath = new File(super.getExternalTemplateFolder (req),ADMIN_TEMPLATES_BUTTON); Vector tempV = new Vector(); ParseServlet parser = new ParseServlet(templatePath, tempV,tempV) ; String templateButton = parser.getHtmlDoc() ; vm.addProperty("templates", templateButton); vm.addProperty("authorized", htm.createHtmlCode("ID_OPTION",selAutoV, autTypeV) ) ; vm.addProperty("chatName",chatName ); vm.addProperty("",""); vm.addProperty("updateTime",chatP.getProperty("updateTime") ); Vector buttonValues = new Vector();buttonValues.add("1");buttonValues.add("2");buttonValues.add("3"); vm.addProperty("reload", htm.createRadioButton("reload",buttonValues,chatP.getProperty("reload") ) ); vm.addProperty("inOut", htm.createRadioButton("inOut",buttonValues,chatP.getProperty("inOut") ) ); vm.addProperty("private", htm.createRadioButton("private",buttonValues,chatP.getProperty("privat") ) ); vm.addProperty("public", htm.createRadioButton("public",buttonValues,chatP.getProperty("publik") ) ); vm.addProperty("dateTime", htm.createRadioButton("dateTime",buttonValues,chatP.getProperty("dateTime") ) ); vm.addProperty("font", htm.createRadioButton("font",buttonValues,chatP.getProperty("font") ) ); sendHtml(req,res,vm, ADMIN_TEMPLATE) ; //################################################################### if (req.getParameter("okChat") != null ) { //log("*** start okChat ***"); //spara vrden till databas //ta bort alla rum tillhrande den hr chatten //String delete = "C_DeleteConnections " + metaId; //rmi.execSqlUpdateProcedure(chatPoolServer , delete ); //lets get all current connected rooms Vector currGroupsV = (Vector)session.getValue("chat_V_room"); Vector currMsgTypesV = (Vector)session.getValue("chat_V_msgTypes"); if (currGroupsV == null) { //fixa s att de hmtas frn db #### OBS #### } if (currMsgTypesV == null) { //fixa s att de hmtas frn db #### OBS #### //eller frn chatten direct kanske r smartare } //now we have to see if we need to do anything to the db //lets start whit the Groups for(int i=0;i<groupsV.size();i+=2) { boolean found=false; String name = (String) groupsV.get(i+1); for(int e=0;e< currGroupsV.size();e+=2) { String name2 = (String) currGroupsV.get(e+1); if (name.equals(name2)) { found = true; break; } } if ( !found )//then there is a new one lets save it to db { rmi.execSqlUpdateProcedure(chatPoolServer, "C_AddNewChatRoom '"+metaId+"','"+name+"'"); } } session.removeValue("NewRooms"); //lets see if there is any to delete Vector dellV = (Vector) session.getValue("DelRooms"); session.removeValue("DelRooms"); if (dellV != null)//ok we have some to delete { for(int i=0; i<dellV.size();i+=2) { boolean found = false; String name = (String) dellV.get(i+1); //log("name1= "+name); for(int e=0;e<currGroupsV.size();e+=2) { String name2 = (String)currGroupsV.get(e+1); //log("name2 = "+name2); if (name.equals(name2))//ok lets leave this one { found = true; break; } } if (found)//lets delete this on { String roomId = rmi.execSqlProcedureStr(chatPoolServer, "C_GetTheRoomId '"+metaId+"','"+name+"'"); rmi.execSqlUpdateProcedure(chatPoolServer, "C_DeleteChatRoom '"+metaId+"','"+roomId+"'"); } } } //now lets se how it is whith the messageTypes for(int i=0;i<msgTypeV.size();i+=2) { boolean found=false; String name = (String) msgTypeV.get(i+1); for(int e=0;e< currMsgTypesV.size();e+=2) { String name2 = (String) currMsgTypesV.get(e+1); if (name.equals(name2)) { found = true; break; } } if ( !found )//then there is a new one lets save it to db { //log("add new msgtype stringen C_AddMessageType '"+metaId+"','"+name+"'"); rmi.execSqlUpdateProcedure(chatPoolServer, "C_AddMessageType '"+metaId+"','"+name+"'"); } } session.removeValue("NewTypes"); //lets see if there is any to delete Vector dellMsgV = (Vector) session.getValue("DelTypes"); session.removeValue("DelTypes"); if (dellMsgV != null)//ok we have some to delete { for(int i=0; i<dellMsgV.size();i+=2) { boolean found = false; String name = (String) dellMsgV.get(i+1); //log("name1= "+name); for(int e=0;e<currMsgTypesV.size();e+=2) { String name2 = (String)currMsgTypesV.get(e+1); //log("name2 = "+name2); if (name.equals(name2))//ok lets leave this one { found = true; break; } } if (found)//lets delete this on { String msgId = rmi.execSqlProcedureStr(chatPoolServer, "C_GetMessageId "+name); rmi.execSqlUpdateProcedure(chatPoolServer, "C_DeleteMessage '"+metaId+"','"+msgId+"'"); } } } //uppdatera databasen med chatP StringBuffer update = new StringBuffer("C_UpdateChatParams '" + metaId); update.append("','"+ chatP.getProperty("updateTime")); update.append("','"+ chatP.getProperty("reload")); update.append("','"+ chatP.getProperty("inOut")); update.append("','"+ chatP.getProperty("privat")); update.append("','"+ chatP.getProperty("publik")); update.append("','"+ chatP.getProperty("dateTime")); update.append("','"+ chatP.getProperty("font")+"'"); //log(update.toString()); rmi.execSqlUpdateProcedure(chatPoolServer, update.toString() ); //lets get rid off old authorizations if there is any String delAutho = "C_DeleteAuthorizations " + metaId; rmi.execSqlUpdateProcedure(chatPoolServer , delAutho ); //ok lets save the new ones to db String[] newAutho = (req.getParameterValues("authorized")==null) ? new String[0] : (req.getParameterValues("authorized")); selAutoV = super.convert2Vector(newAutho); if (selAutoV.size() == 0) { selAutoV.addElement(new String("1")); } for(int i=0; i<selAutoV.size(); i++) { String newAutoSql = "C_ChatAutoTypes " + " '" + selAutoV.elementAt(i) + "', " + metaId; //log("C_ChatAutoTypes sql:" + newAutoSql ) ; rmi.execSqlUpdateProcedure(chatPoolServer,newAutoSql); } //ok lets set up the chat whith the new settings String[] types = rmi.execSqlProcedure(chatPoolServer, "C_GetChatAutoTypes '"+ metaId + "' "); myChat.setAuthorizations(types); //Chat theChat = new Chat( Integer.parseInt(metaId), msgTypesV, chatParams, types ); //lets get the rooms data from db String[][] roomIdNr = rmi.execProcedureMulti(chatPoolServer, "C_GetRooms " + metaId) ; //ok lets see if there is any rooms we have to get rid of Enumeration enum = myChat.getAllChatGroups(); while (enum.hasMoreElements()) { ChatGroup temp = (ChatGroup) enum.nextElement(); boolean found=false; int x=0; while (!found && x<roomIdNr.length) { if (temp.getGroupId() == Integer.parseInt(roomIdNr[x][0])) { temp.setChatGroupName(roomIdNr[x][1]);//just incase found = true; } x++; } if (!found) {//lets remove it myChat.removeChatGroup(temp.getGroupId()); temp = null;//ugly if there is any members in it they will have a null pointer i think } } //ok lets add new groups if there is any lets get the existing groups enum = myChat.getAllChatGroups(); for(int i=0; i<roomIdNr.length;i++)//ugly but it works { boolean found=false; while (enum.hasMoreElements() && !found) { ChatGroup temp = (ChatGroup) enum.nextElement(); if (temp.getGroupId() == Integer.parseInt(roomIdNr[i][0])) { found = true; } } if (!found) { myChat.createNewChatGroup(Integer.parseInt(roomIdNr[i][0]), roomIdNr[i][1]); } } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/430d9ed54a9461e77ea6e2de9ce4a477357217e2/ChatCreator.java/buggy/servlets/chat/ChatCreator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6459,
2896,
3349,
12,
2940,
18572,
3658,
16,
2940,
4745,
607,
500,
550,
281,
13,
202,
15069,
4745,
503,
16,
14106,
202,
95,
202,
202,
759,
1330,
2932,
1937,
2896,
3349,
8863,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6459,
2896,
3349,
12,
2940,
18572,
3658,
16,
2940,
4745,
607,
500,
550,
281,
13,
202,
15069,
4745,
503,
16,
14106,
202,
95,
202,
202,
759,
1330,
2932,
1937,
2896,
3349,
8863,
... | ||
Set<String> s = disabledSubsystemsHolder.get( ); | Set<String> s = data.get().disabledSubsystems; | public static boolean isDisabled(String id) { Set<String> s = disabledSubsystemsHolder.get( ); if ( s == null || id == null || ! s.contains(id)) return false; return true; } | 13273 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13273/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/CurrentDetails.java/clean/components/server/src/ome/security/CurrentDetails.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
24517,
12,
780,
612,
13,
565,
288,
377,
202,
694,
32,
780,
34,
272,
273,
501,
18,
588,
7675,
9278,
28150,
87,
31,
377,
202,
430,
261,
272,
422,
446,
747,
612,
422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
24517,
12,
780,
612,
13,
565,
288,
377,
202,
694,
32,
780,
34,
272,
273,
501,
18,
588,
7675,
9278,
28150,
87,
31,
377,
202,
430,
261,
272,
422,
446,
747,
612,
422,
... |
else { Navigatable navigatable = getNavigateableForNode(node); | else if (node.isLeaf()) { Navigatable navigatable = getNavigatableForNode(node); | private void initTree() { myTree.setRootVisible(false); myTree.setShowsRootHandles(true); SmartExpander.installOn(myTree); TreeUtil.installActions(myTree); EditSourceOnDoubleClickHandler.install(myTree); myTree.addKeyListener( new KeyAdapter() { public void keyPressed(KeyEvent e) { if (KeyEvent.VK_ENTER == e.getKeyCode()) { TreePath leadSelectionPath = myTree.getLeadSelectionPath(); if (leadSelectionPath == null) return; DefaultMutableTreeNode node = ((DefaultMutableTreeNode)leadSelectionPath.getLastPathComponent()); if (node instanceof UsageNode) { Usage usage = ((UsageNode)node).getUsage(); usage.navigate(false); usage.highlightInEditor(); } else { Navigatable navigatable = getNavigateableForNode(node); if (navigatable != null && navigatable.canNavigate()) { navigatable.navigate(false); } } } } } ); PopupHandler.installPopupHandler(myTree, IdeActions.GROUP_USAGE_VIEW_POPUP, ActionPlaces.USAGE_VIEW_POPUP); //TODO: install speed search. Not in openapi though. It makes sense to create a common TreeEnchancer service. } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/23d5551e916258324b5e77db585fac09b338a54f/UsageViewImpl.java/buggy/UsageView/src/com/intellij/usages/impl/UsageViewImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1208,
2471,
1435,
288,
565,
3399,
2471,
18,
542,
2375,
6207,
12,
5743,
1769,
565,
3399,
2471,
18,
542,
24548,
2375,
8788,
12,
3767,
1769,
565,
19656,
12271,
264,
18,
5425,
1398... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3238,
918,
1208,
2471,
1435,
288,
565,
3399,
2471,
18,
542,
2375,
6207,
12,
5743,
1769,
565,
3399,
2471,
18,
542,
24548,
2375,
8788,
12,
3767,
1769,
565,
19656,
12271,
264,
18,
5425,
1398... |
public org.quickfix.field.OrigClOrdID getOrigClOrdID() throws FieldNotFound { org.quickfix.field.OrigClOrdID value = new org.quickfix.field.OrigClOrdID(); | public quickfix.field.OrigClOrdID getOrigClOrdID() throws FieldNotFound { quickfix.field.OrigClOrdID value = new quickfix.field.OrigClOrdID(); | public org.quickfix.field.OrigClOrdID getOrigClOrdID() throws FieldNotFound { org.quickfix.field.OrigClOrdID value = new org.quickfix.field.OrigClOrdID(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/ExecutionReport.java/buggy/src/java/src/quickfix/fix41/ExecutionReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
4741,
2009,
15383,
734,
336,
4741,
2009,
15383,
734,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
4741,
2009,
15383,
734... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2358,
18,
19525,
904,
18,
1518,
18,
4741,
2009,
15383,
734,
336,
4741,
2009,
15383,
734,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
4741,
2009,
15383,
734... |
nmExecArray[0] = nmPath.trim(); nmExecArray[nmExecArray.length-1] = libraryFile.getAbsolutePath(); System.arraycopy(splittedNmArgs, 0, nmExecArray, 1, splittedNmArgs.length); | nmExecArray[0] = nmPath.trim(); nmExecArray[nmExecArray.length-1] = libraryFile.getAbsolutePath(); System.arraycopy(splittedNmArgs, 0, nmExecArray, 1, splittedNmArgs.length); } else { nmExecArray = new String[2]; nmExecArray[0] = nmPath.trim(); nmExecArray[1] = libraryFile.getAbsolutePath(); } | private static Vector<String> loadNmData(File libraryFile) { Vector<String> nmData = new Vector<String>(); try { String nmPath = GUI.getExternalToolsSetting("PATH_NM"); String nmArgs = GUI.getExternalToolsSetting("NM_ARGS"); if (nmPath == null || nmPath.equals("")) return null; String[] splittedNmArgs = nmArgs.split(" "); String[] nmExecArray = new String[1 + splittedNmArgs.length + 1]; nmExecArray[0] = nmPath.trim(); nmExecArray[nmExecArray.length-1] = libraryFile.getAbsolutePath(); System.arraycopy(splittedNmArgs, 0, nmExecArray, 1, splittedNmArgs.length); String line; Process p = Runtime.getRuntime().exec(nmExecArray); BufferedReader input = new BufferedReader (new InputStreamReader(p.getInputStream())); p.getErrorStream().close(); // Ignore error stream while ((line = input.readLine()) != null) { nmData.add(line); } input.close(); } catch (Exception err) { err.printStackTrace(); return null; } if (nmData == null || nmData.size() == 0) return null; return nmData; } | 43319 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/43319/3d551593adaf545379bc271a3a45d3faa4832e96/ContikiMoteType.java/buggy/tools/cooja/java/se/sics/cooja/contikimote/ContikiMoteType.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
5589,
32,
780,
34,
1262,
25246,
751,
12,
812,
5313,
812,
13,
288,
565,
5589,
32,
780,
34,
8442,
751,
273,
394,
5589,
32,
780,
34,
5621,
565,
775,
288,
1377,
514,
8442,
743,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3238,
760,
5589,
32,
780,
34,
1262,
25246,
751,
12,
812,
5313,
812,
13,
288,
565,
5589,
32,
780,
34,
8442,
751,
273,
394,
5589,
32,
780,
34,
5621,
565,
775,
288,
1377,
514,
8442,
743,... |
setLocation(x, y); | if (this.x == x && this.y == y) return; invalidate (); this.x = x; this.y = y; if (peer != null) peer.setBounds (x, y, width, height); | public void move(int x, int y) { setLocation(x, y); } | 45163 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45163/3fe1c14284ce32b79d0e66441aec6a45a77ff684/Component.java/buggy/libjava/java/awt/Component.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3635,
12,
474,
619,
16,
509,
677,
13,
225,
288,
565,
309,
261,
2211,
18,
92,
422,
619,
597,
333,
18,
93,
422,
677,
13,
327,
31,
11587,
261,
1769,
333,
18,
92,
273,
619,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
3635,
12,
474,
619,
16,
509,
677,
13,
225,
288,
565,
309,
261,
2211,
18,
92,
422,
619,
597,
333,
18,
93,
422,
677,
13,
327,
31,
11587,
261,
1769,
333,
18,
92,
273,
619,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.