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 |
|---|---|---|---|---|---|---|
return -1; | return 0; | public int getPort() { if (! isConnected()) return -1; try { return getImpl().getPort(); } catch (SocketException e) { // This cannot happen as we are connected. } return -1; } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/605a3c552300ed58426ba508550965fd91bc6420/Socket.java/clean/libraries/javalib/java/net/Socket.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
11036,
1435,
225,
288,
565,
309,
16051,
20854,
10756,
1377,
327,
374,
31,
565,
775,
1377,
288,
202,
2463,
336,
2828,
7675,
588,
2617,
5621,
1377,
289,
565,
1044,
261,
4534,
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,
1071,
509,
11036,
1435,
225,
288,
565,
309,
16051,
20854,
10756,
1377,
327,
374,
31,
565,
775,
1377,
288,
202,
2463,
336,
2828,
7675,
588,
2617,
5621,
1377,
289,
565,
1044,
261,
4534,
503... |
else { if (arguments instanceof Object[]) { if (((Object[])arguments).length <= 1) return call(arguments); else if (((Object[])arguments)[0] instanceof Object[]) return callViaReflection((Object[]) ((Object[])arguments)[0]); else return callViaReflection((Object[]) arguments); } else return call(arguments); } | return callSpecial(arguments); | public Object invokeMethod(String method, Object arguments) { if ("doCall".equals(method) || "call".equals(method)) { if (arguments == null) { return call(arguments); } else { if (arguments instanceof Object[]) { if (((Object[])arguments).length <= 1) return call(arguments); else if (((Object[])arguments)[0] instanceof Object[]) return callViaReflection((Object[]) ((Object[])arguments)[0]); else return callViaReflection((Object[]) arguments); } else return call(arguments); } } else if ("curry".equals(method)) { return curry((Object[]) arguments); } else { try { return getMetaClass().invokeMethod(this, method, arguments); } catch (MissingMethodException e) { if (owner != this) { try { // lets try invoke method on the owner return InvokerHelper.invokeMethod(this.owner, method, arguments); } catch (InvokerInvocationException iie) { throw iie; } catch (GroovyRuntimeException e1) { if (this.delegate != null && this.delegate != this && this.delegate != this.owner) { // lets try invoke method on the delegate try { return InvokerHelper.invokeMethod(this.delegate, method, arguments); } catch (MissingMethodException mme) { throw new InvokerInvocationException(mme); } catch (GroovyRuntimeException gre) { throw new InvokerInvocationException(gre.getCause()); } } } } throw e; } } } | 6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/9bd4282d7b52d6da3319e844fcbf1007968ec8b9/Closure.java/clean/src/main/groovy/lang/Closure.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
27632,
12,
780,
707,
16,
1033,
1775,
13,
288,
3639,
309,
7566,
2896,
1477,
9654,
14963,
12,
2039,
13,
747,
315,
1991,
9654,
14963,
12,
2039,
3719,
288,
5411,
309,
261,
7099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
27632,
12,
780,
707,
16,
1033,
1775,
13,
288,
3639,
309,
7566,
2896,
1477,
9654,
14963,
12,
2039,
13,
747,
315,
1991,
9654,
14963,
12,
2039,
3719,
288,
5411,
309,
261,
7099,
... |
psc.getServerPluginSupport().getClusterIDAsString()); | psc.getServerPlugInSupport().getClusterIDAsString()); | private static UITaskItinerary generateGSSTaskItinerary(Task task, PlanServiceContext psc) { Expansion expansion = (Expansion) task.getPlanElement(); if (expansion == null) return null; Workflow wf = expansion.getWorkflow(); if (wf == null) return null; UITaskItinerary itin = new UITaskItinerary(); setDefaultInformation( itin, psc.getServerPluginSupport().getClusterIDAsString()); setTaskInformation(itin, task); // Grab the three legs of the mission, CONUS_GROUND, SEA/AIR, THEATER_GROUND Task conus_ground_leg = null; Task sea_air_leg = null; Task theater_ground_leg = null; for (Enumeration subtasks = wf.getTasks(); subtasks.hasMoreElements();) { Task subtask = (Task)subtasks.nextElement(); if (conus_ground_leg == null) conus_ground_leg = subtask; else if (sea_air_leg == null) sea_air_leg = subtask; else if (theater_ground_leg == null) theater_ground_leg = subtask; } if ((conus_ground_leg == null) || (sea_air_leg == null) || (theater_ground_leg == null)) return null; // And fill them in as schedule elements for the itinerary object Vector schedElems = itin.getScheduleElements(); schedElems.addElement(createUITaskItineraryElement(conus_ground_leg)); schedElems.addElement(createUITaskItineraryElement(sea_air_leg)); schedElems.addElement(createUITaskItineraryElement(theater_ground_leg)); itin.setScheduleElements(schedElems); return itin; } | 7171 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7171/0f7316d3a448f540461f10d7d52450a728ce0966/PSP_Itinerary.java/buggy/glm/src/org/cougaar/domain/mlm/ui/psp/transportation/PSP_Itinerary.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
587,
1285,
835,
7193,
28924,
2103,
16113,
882,
835,
7193,
28924,
12,
2174,
1562,
16,
4766,
10792,
12540,
1179,
1042,
293,
1017,
13,
282,
288,
377,
7784,
12162,
17965,
273,
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,
282,
3238,
760,
587,
1285,
835,
7193,
28924,
2103,
16113,
882,
835,
7193,
28924,
12,
2174,
1562,
16,
4766,
10792,
12540,
1179,
1042,
293,
1017,
13,
282,
288,
377,
7784,
12162,
17965,
273,
261,
... |
this.socket = socket; this.context = context; try { ois = new ObjectInputStream(new BufferedInputStream(socket .getInputStream())); } catch (Exception e) { logger.error("Could not open ObjectInputStream to " + socket, e); } } | this.socket = socket; this.context = context; try { ois = new ObjectInputStream(new BufferedInputStream(socket .getInputStream())); } catch (Exception e) { logger.error("Could not open ObjectInputStream to " + socket, e); } } | public SocketNode(Socket socket, LoggerContext context) { this.socket = socket; this.context = context; try { ois = new ObjectInputStream(new BufferedInputStream(socket .getInputStream())); } catch (Exception e) { logger.error("Could not open ObjectInputStream to " + socket, e); } } | 47402 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47402/e220856dd8a2ab701296029034c8ddf6d8b81757/SocketNode.java/buggy/logback-classic/src/main/java/ch/qos/logback/classic/net/SocketNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8758,
907,
12,
4534,
2987,
16,
4242,
1042,
819,
13,
288,
202,
202,
2211,
18,
7814,
273,
2987,
31,
202,
202,
2211,
18,
2472,
273,
819,
31,
202,
202,
698,
288,
1082,
202,
1960... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8758,
907,
12,
4534,
2987,
16,
4242,
1042,
819,
13,
288,
202,
202,
2211,
18,
7814,
273,
2987,
31,
202,
202,
2211,
18,
2472,
273,
819,
31,
202,
202,
698,
288,
1082,
202,
1960... |
dir.mkdirs(); File f = new File(dir, fileName); PrintWriter out = new PrintWriter(new FileWriter(f)); out.println("unused"); out.close(); f.deleteOnExit(); dir.deleteOnExit(); | File f = createFile(dir, fileName); | protected void setupThresholdConfig(String dirName, String fileName, String ipAddress, String serviceName, String groupName) throws IOException, UnknownHostException, FileNotFoundException, MarshalException, ValidationException { File dir = new File(dirName); dir.mkdirs(); File f = new File(dir, fileName); PrintWriter out = new PrintWriter(new FileWriter(f)); out.println("unused"); out.close(); f.deleteOnExit(); dir.deleteOnExit(); m_fileName = f.getAbsolutePath(); m_step = 300000; m_iface = new IPv4NetworkInterface(InetAddress.getByName(ipAddress)); m_serviceParameters = new HashMap(); m_serviceParameters.put("svcName", serviceName); m_parameters = new HashMap(); m_parameters.put("thresholding-group", groupName); m_ipAddress = ipAddress; m_serviceName = serviceName; Resource config = new ClassPathResource("/test-thresholds.xml"); Reader r = new InputStreamReader(config.getInputStream()); ThresholdingConfigFactory.setInstance(new ThresholdingConfigFactory(r)); r.close(); ThresholdingConfigFactory.getInstance().getGroup(groupName).setRrdRepository(dir.getParentFile().getAbsolutePath()); } | 25465 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25465/7a86f2834f8ee12135b42094cac6abd75242882c/ThresholderTestCase.java/clean/opennms-services/src/test/java/org/opennms/netmgt/threshd/ThresholderTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
3875,
7614,
809,
12,
780,
20878,
16,
514,
3968,
16,
514,
17138,
16,
514,
6773,
16,
514,
11619,
13,
1216,
1860,
16,
30592,
16,
13707,
16,
5884,
503,
16,
15614,
288,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
3875,
7614,
809,
12,
780,
20878,
16,
514,
3968,
16,
514,
17138,
16,
514,
6773,
16,
514,
11619,
13,
1216,
1860,
16,
30592,
16,
13707,
16,
5884,
503,
16,
15614,
288,
202,
... |
out.println(line); | public boolean compute() throws IOException { String[] basenames = FileUtils.listBasenames(phonelabelDir, ".lab"); System.out.println("Computing unit labels for "+basenames.length+" files"); for (int i=0; i<basenames.length; i++) { BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(new File(phonelabelDir, basenames[i]+".lab")), "UTF-8")); PrintWriter out = new PrintWriter(new File(unitlabelDir, basenames[i]+".unitlab"), "UTF-8"); // Merge adjacent pauses into one: In a sequence of pauses, // only remember the last one. String pauseLine = null; String line; while ((line = in.readLine())!= null) { // Verify if this is a pause unit String unit = getUnit(line); if (pauseSymbol.equals(unit)) { pauseLine = line; // remember only the latest pause line } else { // a non-pause symbol if (pauseLine != null) { out.println(pauseLine); pauseLine = null; } out.println(line); } } if (pauseLine != null) { out.println(pauseLine); } out.flush(); out.close(); System.out.println(" "+basenames[i]); } System.out.println("Finished computing unit labels"); return true; } | 49846 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49846/863a435e1e81a31023f567a49dc521436d84df27/UnitLabelComputer.java/buggy/java/de/dfki/lt/mary/unitselection/voiceimport_reorganized/UnitLabelComputer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
3671,
1435,
1216,
1860,
565,
288,
3639,
514,
8526,
2580,
6809,
273,
13779,
18,
1098,
11494,
6809,
12,
844,
265,
292,
873,
1621,
16,
3552,
7411,
8863,
3639,
2332,
18,
659,
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,
377,
1071,
1250,
3671,
1435,
1216,
1860,
565,
288,
3639,
514,
8526,
2580,
6809,
273,
13779,
18,
1098,
11494,
6809,
12,
844,
265,
292,
873,
1621,
16,
3552,
7411,
8863,
3639,
2332,
18,
659,
18,
... | |
if (parameters != null && parameters.length > 0) { | if (hasParameters) { | private void resultDetail(IResultMap tests, final String style) { if (tests.getAllResults().size() > 0) { int row = 0; for (ITestNGMethod method : getMethodSet(tests)) { row += 1; m_methodIndex += 1; String cname = method.getTestClass().getName(); m_out.println("<a id=\"m" + m_methodIndex + "\"></a><h2>" + cname + ":" + method.getMethodName() + "</h2>"); int rq = 0; Set<ITestResult> resultSet = tests.getResults(method); for (ITestResult ans : resultSet) { rq += 1; Object[] parameters = ans.getParameters(); if (parameters != null && parameters.length > 0) { if (rq == 1) { tableStart("param"); m_out.print("<tr>"); for (int x = 1; x <= parameters.length; x++) { m_out .print("<th style=\"padding-left:1em;padding-right:1em\">Parameter #" + x + "</th>"); } m_out.println("</tr>"); } m_out.print("<tr" + (rq % 2 == 0 ? " class=\"stripe\"" : "") + ">"); for (Object p : parameters) { m_out .println("<td style=\"padding-left:.5em;padding-right:2em\">" + (p != null ? p.toString() : "null") + "</td>"); } m_out.println("</tr>"); } List<String> msgs = Reporter.getOutput(ans); // Note(cbeust) // There are three tests against parameters here, they should probably // be factored into one if (msgs.size() > 0) { String indent = " style=\"padding-left:3em\""; if (parameters != null && parameters.length > 0) { m_out.println("<tr" + (rq % 2 == 0 ? " class=\"stripe\"" : "") + "><td" + indent + " colspan=\"" + parameters.length + "\">"); } else { m_out.println("<div" + indent + ">"); } for (String line : msgs) { m_out.println(line + "<br/>"); } Throwable exception=ans.getThrowable(); if(exception!=null) { boolean wantsMinimalOutput = ans.getStatus()==ITestResult.SUCCESS; m_out.println("<h3>" +(wantsMinimalOutput?"Expected Exception":"Failure") +"</h3>"); generateExceptionReport(exception, wantsMinimalOutput); } if (parameters != null && parameters.length > 0) { m_out.println("</td></tr>"); } else { m_out.println("</div>"); } } if (parameters != null && parameters.length > 0) { if (rq == resultSet.size()) { m_out.println("</table>"); } } } m_out.println("<p class=\"totop\"><a href=\"#summary\">back to summary</a></p>"); } } } | 50994 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50994/b140a42f65cc1326841579fb78a93a14a336227b/EmailableReporter.java/buggy/src/main/org/testng/reporters/EmailableReporter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
563,
6109,
12,
45,
1253,
863,
7434,
16,
727,
514,
2154,
13,
288,
565,
309,
261,
16341,
18,
588,
1595,
3447,
7675,
1467,
1435,
405,
374,
13,
288,
1377,
509,
1027,
273,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
563,
6109,
12,
45,
1253,
863,
7434,
16,
727,
514,
2154,
13,
288,
565,
309,
261,
16341,
18,
588,
1595,
3447,
7675,
1467,
1435,
405,
374,
13,
288,
1377,
509,
1027,
273,
374,
... |
public long highSeqnoAt(Address sender) { long ret=-1; int index; if(sender == null) return ret; index=getIndex(sender); if(index == -1) return ret; else | public long highSeqnoAt(int index) { if(index < size()) | public long highSeqnoAt(Address sender) { long ret=-1; int index; if(sender == null) return ret; index=getIndex(sender); if(index == -1) return ret; else return high_seqnos[index]; } | 3550 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3550/19f9ca4c15ddc8648286e3520e685e3a80fa71e3/Digest.java/buggy/src/org/jgroups/protocols/pbcast/Digest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1525,
3551,
6926,
2135,
861,
12,
1887,
5793,
13,
288,
3639,
1525,
325,
29711,
21,
31,
3639,
509,
770,
31,
3639,
309,
12,
15330,
422,
446,
13,
327,
325,
31,
3639,
770,
33,
588,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1525,
3551,
6926,
2135,
861,
12,
1887,
5793,
13,
288,
3639,
1525,
325,
29711,
21,
31,
3639,
509,
770,
31,
3639,
309,
12,
15330,
422,
446,
13,
327,
325,
31,
3639,
770,
33,
588,
1... |
ThreadResources.setLocale( TEST_LOCALE ); | ThreadResources.setLocale( TEST_LOCALE ); | public void testSetValue( ) throws Exception { StyleElement myStyle = design.findStyle( "My Style" ); //$NON-NLS-1$ assertNotNull( myStyle ); fontHandle = myStyle.getHandle( design ).getFontProperty( ); ThreadResources.setLocale( new ULocale( "am", "ET" ) ); //$NON-NLS-1$ //$NON-NLS-2$ fontHandle.setValue( DesignChoiceConstants.FONT_FAMILY_SANS_SERIF ); // tests with the font entry at a given position, should be null. StyleElement style1 = design.findStyle( "Style1" ); //$NON-NLS-1$ assertNotNull( style1 ); fontHandle = style1.getHandle( design ).getFontProperty( ); // tests sets/gets CSS constant names. fontHandle.setValue( DesignChoiceConstants.FONT_FAMILY_SANS_SERIF ); assertEquals( DesignChoiceConstants.FONT_FAMILY_SANS_SERIF, fontHandle .getStringValue( ) ); ThreadResources.setLocale( TEST_LOCALE ); //$NON-NLS-1$ // tests sets/gets user string names. fontHandle.setValue( "\u8fde\u4f53" ); //$NON-NLS-1$ assertEquals( DesignChoiceConstants.FONT_FAMILY_CURSIVE, fontHandle .getStringValue( ) ); Style style2 = (Style) design.findStyle( "Style2" ); //$NON-NLS-1$ assertNotNull( style2 ); fontHandle = style2.getHandle( design ).getFontProperty( ); // tests with the font entry at a given position. fontHandle.setValue( "cursive, sans-serif, hello" ); //$NON-NLS-1$ // tests with the font weight. StyleHandle style2Handle = style2.handle( design ); assertNotNull( style2Handle ); style2Handle.setFontWeight( DesignChoiceConstants.FONT_WEIGHT_100 ); assertEquals( DesignChoiceConstants.FONT_WEIGHT_100, style2Handle .getFontWeight( ) ); // write a font family and weight property to a structure like // highlight. Iterator highlightHandles = style2.handle( design ) .highlightRulesIterator( ); assertNotNull( highlightHandles ); HighlightRuleHandle highlightHandle = (HighlightRuleHandle) highlightHandles .next( ); assertNotNull( highlightHandle ); fontHandle = highlightHandle.getFontFamilyHandle( ); fontHandle.setValue( DesignChoiceConstants.FONT_FAMILY_FANTASY ); highlightHandle.setFontWeight( DesignChoiceConstants.FONT_WEIGHT_900 ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/de4e32d64d24337e8801521456bb895f21408aa9/FontHandleTest.java/clean/model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/api/FontHandleTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
694,
620,
12,
262,
1216,
1185,
202,
95,
202,
202,
2885,
1046,
3399,
2885,
273,
8281,
18,
4720,
2885,
12,
315,
12062,
9767,
6,
11272,
4329,
3993,
17,
5106,
17,
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,
225,
202,
482,
918,
1842,
694,
620,
12,
262,
1216,
1185,
202,
95,
202,
202,
2885,
1046,
3399,
2885,
273,
8281,
18,
4720,
2885,
12,
315,
12062,
9767,
6,
11272,
4329,
3993,
17,
5106,
17,
21,
... |
log("Timeout sending message after " + retries + " tries"); | logger.error("Timeout sending message after " + retries + " tries"); | public synchronized boolean sendMessage(byte[] msg, int timeout) throws IOException, PortInUseException { long startTime = System.currentTimeMillis(), curTime; int retries = 0; // the dongle always first sends the number of bytes and then echos the complete message // TODO: listening for the number of bytes doesn't work. Just ignore it for now, but FIXME byte[] expectedMsgAck = new byte[msg.length/*+1*/]; //expectedMsgAck[0] = (byte) msg.length; System.arraycopy(msg, 0, expectedMsgAck, 0/*1*/, msg.length); log("Sending message to dongle and waiting for ack"); do { // get the dongle to communicate and remember the ID it reported back (switches implicitly to interactive mode) myRelateId = getDongleAttention(timeout); if (myRelateId == -1) log("Warning: could not get dongle's attention, skipping sending of message for this retry"); else sendToDongle(msg); curTime = System.currentTimeMillis(); retries++; } while (curTime - startTime < timeout && // if there is some acknowledge expected, try to read it from the dongle // the timeout here is just a heuristic receiveFromDongle(expectedMsgAck.length, expectedMsgAck, timeout) == null); if (curTime - startTime < timeout) log("Sent message successfully after " + retries + " tries"); else log("Timeout sending message after " + retries + " tries"); return curTime - startTime < timeout; } | 14316 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14316/6282e6faabb09150b53af9b09b1ea304a66deb6e/SerialConnector.java/buggy/src/java/RelateAuthentication/src/uk/ac/lancs/relate/SerialConnector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
1250,
15399,
12,
7229,
8526,
1234,
16,
509,
2021,
13,
1216,
1860,
16,
6008,
15435,
503,
288,
202,
202,
5748,
8657,
273,
2332,
18,
2972,
28512,
9334,
662,
950,
31,
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,
3852,
1250,
15399,
12,
7229,
8526,
1234,
16,
509,
2021,
13,
1216,
1860,
16,
6008,
15435,
503,
288,
202,
202,
5748,
8657,
273,
2332,
18,
2972,
28512,
9334,
662,
950,
31,
202,
2... |
_t = __t2053; | _t = __t2057; | public final void systemdialoggetdirstate(AST _t) throws RecognitionException { AST systemdialoggetdirstate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t2051 = _t; AST tmp1271_AST_in = (AST)_t; match(_t,SYSTEMDIALOG); _t = _t.getFirstChild(); AST tmp1272_AST_in = (AST)_t; match(_t,GETDIR); _t = _t.getNextSibling(); field(_t); _t = _retTree; { _loop2055: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case INITIALDIR: { AST __t2053 = _t; AST tmp1273_AST_in = (AST)_t; match(_t,INITIALDIR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2053; _t = _t.getNextSibling(); break; } case RETURNTOSTARTDIR: { AST tmp1274_AST_in = (AST)_t; match(_t,RETURNTOSTARTDIR); _t = _t.getNextSibling(); break; } case TITLE: { AST __t2054 = _t; AST tmp1275_AST_in = (AST)_t; match(_t,TITLE); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2054; _t = _t.getNextSibling(); break; } default: { break _loop2055; } } } while (true); } state_end(_t); _t = _retTree; _t = __t2051; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/JPTreeParser.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparserbase/JPTreeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
2619,
12730,
588,
72,
920,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2619,
12730,
588,
72,
920,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
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,
225,
202,
482,
727,
918,
2619,
12730,
588,
72,
920,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2619,
12730,
588,
72,
920,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
... |
if (lnr != null) lnr.close(); if (freader != null) freader.close(); | if (reader != null) reader.close(); | public static HashSet getWordSet(File wordfile) throws IOException { HashSet result = new HashSet(); FileReader freader = null; LineNumberReader lnr = null; try { freader = new FileReader(wordfile); lnr = new LineNumberReader(freader); String word = null; while ((word = lnr.readLine()) != null) { result.add(word.trim()); } } finally { if (lnr != null) lnr.close(); if (freader != null) freader.close(); } return result; } | 1514 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1514/94d7f6e9f549bad045bf6c81758f9f1601020109/WordlistLoader.java/buggy/src/java/org/apache/lucene/analysis/WordlistLoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
6847,
336,
3944,
694,
12,
812,
2076,
768,
13,
1216,
1860,
288,
565,
6847,
563,
273,
394,
6847,
5621,
565,
23010,
284,
10530,
273,
446,
31,
565,
5377,
1854,
2514,
7211,
86,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
6847,
336,
3944,
694,
12,
812,
2076,
768,
13,
1216,
1860,
288,
565,
6847,
563,
273,
394,
6847,
5621,
565,
23010,
284,
10530,
273,
446,
31,
565,
5377,
1854,
2514,
7211,
86,
27... |
profilesRoot = reader.read( fileReader ); | StringReader sReader = new StringReader( rawInput ); profilesRoot = reader.read( sReader ); | public ProfilesRoot buildProfiles( File basedir ) throws IOException, XmlPullParserException { File profilesXml = new File( basedir, PROFILES_XML_FILE ); ProfilesRoot profilesRoot = null; if ( profilesXml.exists() ) { ProfilesXpp3Reader reader = new ProfilesXpp3Reader(); FileReader fileReader = null; try { fileReader = new FileReader( profilesXml ); profilesRoot = reader.read( fileReader ); } finally { IOUtil.close( fileReader ); } } return profilesRoot; } | 47160 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47160/a321da38d649d5cce704785bb34d6a684286265c/DefaultMavenProfilesBuilder.java/buggy/maven-profile/src/main/java/org/apache/maven/profiles/DefaultMavenProfilesBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1186,
2354,
2375,
1361,
12450,
12,
1387,
15573,
262,
3639,
1216,
1860,
16,
5714,
9629,
25746,
565,
288,
3639,
1387,
11788,
4432,
273,
394,
1387,
12,
15573,
16,
4629,
12669,
67,
4201,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1186,
2354,
2375,
1361,
12450,
12,
1387,
15573,
262,
3639,
1216,
1860,
16,
5714,
9629,
25746,
565,
288,
3639,
1387,
11788,
4432,
273,
394,
1387,
12,
15573,
16,
4629,
12669,
67,
4201,
... |
public Link(String local_addr, int local_port, String remote_addr, int remote_port, Receiver r) { this(local_addr, local_port, remote_addr, remote_port); setReceiver(r); | public Link(String local_addr, int local_port, String remote_addr, int remote_port) { this.local_addr=local_addr; this.local_port=local_port; this.remote_addr=remote_addr; this.remote_port=remote_port; hb=new Heartbeat(timeout, hb_interval); | public Link(String local_addr, int local_port, String remote_addr, int remote_port, Receiver r) { this(local_addr, local_port, remote_addr, remote_port); setReceiver(r); } | 50160 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50160/13de68466e3cf7fde6ee0bde0cee09a33e837e89/Link.java/buggy/src/org/jgroups/blocks/Link.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4048,
12,
780,
1191,
67,
4793,
16,
509,
1191,
67,
655,
16,
514,
2632,
67,
4793,
16,
509,
2632,
67,
655,
16,
31020,
436,
13,
288,
202,
2211,
12,
3729,
67,
4793,
16,
1191,
67,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4048,
12,
780,
1191,
67,
4793,
16,
509,
1191,
67,
655,
16,
514,
2632,
67,
4793,
16,
509,
2632,
67,
655,
16,
31020,
436,
13,
288,
202,
2211,
12,
3729,
67,
4793,
16,
1191,
67,
6... |
m_entries.add(selRow, entry); | entries.add(selRow, entry); | public void insertRow() { // new row cannot be inserted if(!canBeInserted()) { return; } // save the changed data if any stopCellEditing(); // get the selected row int selRow = m_table.getSelectedRow(); if(selRow == -1) { selRow = m_entries.size() - 1; } if(selRow == -1) { selRow = 0; } // get row data and add Entry entry = new Entry(); m_entries.add(selRow, entry); // notify listeners fireTableChanged( new TableModelEvent(this, selRow, selRow, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT) ); m_table.setRowSelectionInterval(selRow, selRow); } | 48500 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48500/f8bdbb2dab0d67be139dd05d6110e466306c8868/IPRestrictorTable.java/buggy/src/java/org/apache/ftpserver/gui/IPRestrictorTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2243,
1999,
1435,
288,
7734,
368,
394,
1027,
2780,
506,
9564,
3639,
309,
12,
5,
4169,
1919,
27329,
10756,
288,
5411,
327,
31,
3639,
289,
7734,
368,
1923,
326,
3550,
501,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2243,
1999,
1435,
288,
7734,
368,
394,
1027,
2780,
506,
9564,
3639,
309,
12,
5,
4169,
1919,
27329,
10756,
288,
5411,
327,
31,
3639,
289,
7734,
368,
1923,
326,
3550,
501,
309,
... |
builder, oContext, | context, | public ISelectDataComponent getSeriesDataComponent( int seriesType, SeriesDefinition seriesDefn, IUIServiceProvider builder, Object oContext, String sTitle ) { if ( seriesType == ISelectDataCustomizeUI.ORTHOGONAL_SERIES ) { return new BaseDataDefinitionComponent( seriesDefn, ChartUIUtil.getDataQuery( seriesDefn, 0 ), builder, oContext, sTitle ); } else if ( seriesType == ISelectDataCustomizeUI.GROUPING_SERIES ) { BaseDataDefinitionComponent ddc = new BaseDataDefinitionComponent( seriesDefn, seriesDefn.getQuery( ), builder, oContext, sTitle ); ddc.setFormatSpecifierEnabled( false ); return ddc; } return new DefaultSelectDataComponent( ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/c60a4815037b62e9358af2625eb6236e7c979d0f/ScatterSeriesUIProvider.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/series/ScatterSeriesUIProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
3391,
751,
1841,
336,
6485,
751,
1841,
12,
509,
4166,
559,
16,
1082,
202,
6485,
1852,
4166,
3262,
82,
16,
467,
5370,
16300,
2089,
16,
1082,
202,
921,
320,
1042,
16,
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,
482,
467,
3391,
751,
1841,
336,
6485,
751,
1841,
12,
509,
4166,
559,
16,
1082,
202,
6485,
1852,
4166,
3262,
82,
16,
467,
5370,
16300,
2089,
16,
1082,
202,
921,
320,
1042,
16,
514,
... |
stack[stackTop] = DBL_MRK; | stack[stackTop] = UniqueTag.DOUBLE_MARK; | private static void do_add(Object[] stack, double[] sDbl, int stackTop, Context cx) { Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; double d; boolean leftRightOrder; if (rhs == DBL_MRK) { d = sDbl[stackTop + 1]; if (lhs == DBL_MRK) { sDbl[stackTop] += d; return; } leftRightOrder = true; // fallthrough to object + number code } else if (lhs == DBL_MRK) { d = sDbl[stackTop]; lhs = rhs; leftRightOrder = false; // fallthrough to object + number code } else { if (lhs instanceof Scriptable || rhs instanceof Scriptable) { stack[stackTop] = ScriptRuntime.add(lhs, rhs, cx); } else if (lhs instanceof String) { String lstr = (String)lhs; String rstr = ScriptRuntime.toString(rhs); stack[stackTop] = lstr.concat(rstr); } else if (rhs instanceof String) { String lstr = ScriptRuntime.toString(lhs); String rstr = (String)rhs; stack[stackTop] = lstr.concat(rstr); } else { double lDbl = (lhs instanceof Number) ? ((Number)lhs).doubleValue() : ScriptRuntime.toNumber(lhs); double rDbl = (rhs instanceof Number) ? ((Number)rhs).doubleValue() : ScriptRuntime.toNumber(rhs); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl + rDbl; } return; } // handle object(lhs) + number(d) code if (lhs instanceof Scriptable) { rhs = ScriptRuntime.wrapNumber(d); if (!leftRightOrder) { Object tmp = lhs; lhs = rhs; rhs = tmp; } stack[stackTop] = ScriptRuntime.add(lhs, rhs, cx); } else if (lhs instanceof String) { String lstr = (String)lhs; String rstr = ScriptRuntime.toString(d); if (leftRightOrder) { stack[stackTop] = lstr.concat(rstr); } else { stack[stackTop] = rstr.concat(lstr); } } else { double lDbl = (lhs instanceof Number) ? ((Number)lhs).doubleValue() : ScriptRuntime.toNumber(lhs); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl + d; } } | 13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/bef182034b96d54a2938fe141217e83b8644cf25/Interpreter.java/buggy/js/rhino/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
741,
67,
1289,
12,
921,
8526,
2110,
16,
1645,
8526,
272,
40,
3083,
16,
509,
2110,
3401,
16,
17311,
1772,
9494,
13,
565,
288,
3639,
1033,
7711,
273,
2110,
63,
3772,
3401,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
67,
1289,
12,
921,
8526,
2110,
16,
1645,
8526,
272,
40,
3083,
16,
509,
2110,
3401,
16,
17311,
1772,
9494,
13,
565,
288,
3639,
1033,
7711,
273,
2110,
63,
3772,
3401,... |
{ | public static IMessageDigest getInstance(String name) { if (name == null) { return null; } name = name.trim(); IMessageDigest result = null; if (name.equalsIgnoreCase(Registry.WHIRLPOOL_HASH)) { result = new Whirlpool(); } else if (name.equalsIgnoreCase(Registry.RIPEMD128_HASH) || name.equalsIgnoreCase(Registry.RIPEMD_128_HASH)) { result = new RipeMD128(); } else if (name.equalsIgnoreCase(Registry.RIPEMD160_HASH) || name.equalsIgnoreCase(Registry.RIPEMD_160_HASH)) { result = new RipeMD160(); } else if (name.equalsIgnoreCase(Registry.SHA160_HASH) || name.equalsIgnoreCase(Registry.SHA_1_HASH) || name.equalsIgnoreCase(Registry.SHA1_HASH) || name.equalsIgnoreCase(Registry.SHA_HASH)) { result = new Sha160(); } else if (name.equalsIgnoreCase(Registry.SHA256_HASH)) { result = new Sha256(); } else if (name.equalsIgnoreCase(Registry.SHA384_HASH)) { result = new Sha384(); } else if (name.equalsIgnoreCase(Registry.SHA512_HASH)) { result = new Sha512(); } else if (name.equalsIgnoreCase(Registry.TIGER_HASH)) { result = new Tiger(); } else if (name.equalsIgnoreCase(Registry.HAVAL_HASH)) { result = new Haval(); } else if (name.equalsIgnoreCase(Registry.MD5_HASH)) { result = new MD5(); } else if (name.equalsIgnoreCase(Registry.MD4_HASH)) { result = new MD4(); } else if (name.equalsIgnoreCase(Registry.MD2_HASH)) { result = new MD2(); } else if (name.equalsIgnoreCase(Registry.HAVAL_HASH)) { result = new Haval(); } if (result != null && !result.selfTest()) { throw new InternalError(result.name()); } return result; } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/2b9abb5a0b9bbcfe80809713d541a098ef473321/HashFactory.java/clean/core/src/classpath/gnu/gnu/java/security/hash/HashFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
467,
1079,
9568,
3694,
12,
780,
508,
13,
377,
309,
261,
529,
422,
446,
13,
2398,
327,
446,
31,
1377,
289,
565,
508,
273,
508,
18,
5290,
5621,
565,
467,
1079,
9568,
563,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
467,
1079,
9568,
3694,
12,
780,
508,
13,
377,
309,
261,
529,
422,
446,
13,
2398,
327,
446,
31,
1377,
289,
565,
508,
273,
508,
18,
5290,
5621,
565,
467,
1079,
9568,
563,
273... | |
public boolean processBody(ByteBuffer source, ByteBuffer sink) { if(m_state == ScanningState.DONE) { return true; } //Special case. If the body is blank, then //the CRLF which terminated the headers //may also start the body termination. //For this case, we look for ".CRLF" if(m_state == ScanningState.INIT_BODY) { //Not enough bytes to determine //if this is the end if(source.remaining() < 3) { return false; } //Check for no body case, knowing what we //last saw was the CRLF terminating the headers if( (source.get(source.position()) == DOT) && (source.get(source.position()+1) == CR) && (source.get(source.position()+2) == LF)) { m_isEmptyMessage = true; source.position(source.position()+3); m_state = ScanningState.DONE; return true; } m_state = ScanningState.LOOKING_FOR_BODY_END; } //Scan for lines we need to escape int index = findPattern(source, CRLF_DOT_DOT, 0, CRLF_DOT_DOT.length); while(index >= 0 && source.hasRemaining()) { //Copy before the ".." (if there is any) if(source.position() < index) { ByteBuffer dup = source.duplicate(); dup.position(source.position()); dup.limit(index); sink.put(dup); } //Write "CRLF." sink.put(CRLF_DOT); //Position just after the "CRLF.." source.position(index + CRLF_DOT_DOT.length); index = findPattern(source, CRLF_DOT_DOT, 0, CRLF_DOT_DOT.length); } //No more CRLF..s. Look for end of message if(source.hasRemaining()) {//BEGIN More Bytes after dot escape scanning //Look for "CRLF.CRLF" index = findPattern(source, CRLF_DOT_CRLF, 0, CRLF_DOT_CRLF.length); if(index != -1) { //Copy bytes without CRLF.CRLF to sink if(source.position() < index) { ByteBuffer dup = source.duplicate(); dup.position(source.position()); dup.limit(index); sink.put(dup); } //Position source just after CRLF.CRLF source.position(index + CRLF_DOT_CRLF.length); m_state = ScanningState.DONE; return true; } else {//BEGIN Copy remaining Bytes //Amount *not* to copy //to sink and reserve for next //read //Check for out four end patterns //"CR", "CRLF", "CRLF.", "CRLF.CR" //There should not be any "CRLF.." //If they are found, cause them to *stay* in the buffer int holdBackMsgEnd = searchForStart(source, CRLF_DOT_CRLF); //Copy remaining bytes, holding back //what may be the start of source.limit(source.limit() - holdBackMsgEnd); sink.put(source); source.limit(source.limit() + holdBackMsgEnd); }//ENDOF Copy remaining Bytes }//ENDOF More Bytes after dot escape scanning return false; } | 49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/71606d3b16e34573111bcdf3a0b7e495eafd0971/MessageBoundaryScanner.java/buggy/tran/mail/main/com/metavize/tran/mail/papi/MessageBoundaryScanner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1071,
1250,
1207,
2250,
12,
12242,
1084,
16,
225,
7400,
9049,
13,
288,
225,
309,
12,
81,
67,
2019,
422,
2850,
10903,
1119,
18,
26875,
13,
288,
282,
327,
638,
31,
225,
289,
225,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1071,
1250,
1207,
2250,
12,
12242,
1084,
16,
225,
7400,
9049,
13,
288,
225,
309,
12,
81,
67,
2019,
422,
2850,
10903,
1119,
18,
26875,
13,
288,
282,
327,
638,
31,
225,
289,
225,
368,
1... | ||
EMPTY_STRING, null, null); | EMPTY_STRING, null, (ITokenDuple)la); | protected IASTExpression exclusiveOrExpression(IASTScope scope, CompletionKind kind, KeywordSetKey key) throws BacktrackException, EndOfFileException { IToken la = LA(1); int startingOffset = la.getOffset(); int line = la.getLineNumber(); char [] fn = la.getFilename(); IASTExpression firstExpression = andExpression(scope, kind, key); while (LT(1) == IToken.tXOR) { consume(); IASTExpression secondExpression = andExpression(scope, kind, key); int endOffset = ( lastToken != null ) ? lastToken.getEndOffset() : 0; try { firstExpression = astFactory.createExpression(scope, IASTExpression.Kind.EXCLUSIVEOREXPRESSION, firstExpression, secondExpression, null, null, null, EMPTY_STRING, null, null); } catch (ASTSemanticException e) { throwBacktrack(e.getProblem()); } catch (Exception e) { logException("exclusiveORExpression::createExpression()", e); //$NON-NLS-1$ throwBacktrack(startingOffset, endOffset, line, fn); } } return firstExpression; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/0ad6f1bcb025a884d75816294d8f31d01f12da79/Parser.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
467,
9053,
2300,
12060,
23695,
12,
45,
9053,
3876,
2146,
16,
1082,
202,
11238,
5677,
3846,
16,
18317,
30267,
498,
13,
1216,
4297,
4101,
503,
16,
1082,
202,
23358,
812,
503,
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,
225,
202,
1117,
467,
9053,
2300,
12060,
23695,
12,
45,
9053,
3876,
2146,
16,
1082,
202,
11238,
5677,
3846,
16,
18317,
30267,
498,
13,
1216,
4297,
4101,
503,
16,
1082,
202,
23358,
812,
503,
288... |
HashSet orgColumnNameSet = new HashSet( ); HashSet uniqueColumnNameSet = new HashSet( ); for ( int n = 0; n < resultSetList.size( ); n++ ) { orgColumnNameSet.add( ( (ResultSetColumn) resultSetList.get( n ) ).getColumnName( ) ); } | public static IResultMetaData retrieveResultMetaData( DataSetHandle dataSetHandle ) throws BirtException { List resultSetList = null; if ( dataSetHandle instanceof OdaDataSetHandle ) { resultSetList = (List) dataSetHandle.getProperty( OdaDataSetHandle.RESULT_SET_PROP ); if ( dataSetHandle.getPropertyHandle( DataSetHandle.RESULT_SET_HINTS_PROP ) != null ) dataSetHandle.getPropertyHandle( DataSetHandle.RESULT_SET_HINTS_PROP ) .clearValue( ); } else { return null; } List computedList = (List) dataSetHandle.getProperty( OdaDataSetHandle.COMPUTED_COLUMNS_PROP ); List columnMeta = new ArrayList( ); ResultSetColumnDefinition columnDef; int index = 0; // populate result set columns if ( resultSetList != null ) { ResultSetColumn resultSetColumn; HashSet orgColumnNameSet = new HashSet( ); HashSet uniqueColumnNameSet = new HashSet( ); for ( int n = 0; n < resultSetList.size( ); n++ ) { orgColumnNameSet.add( ( (ResultSetColumn) resultSetList.get( n ) ).getColumnName( ) ); } for ( int i = 0; i < resultSetList.size( ); i++ ) { resultSetColumn = (ResultSetColumn) resultSetList.get( i ); String uniqueName = getUniqueName( orgColumnNameSet, uniqueColumnNameSet, resultSetColumn.getColumnName( ), i ); columnDef = new ResultSetColumnDefinition( uniqueName ); uniqueColumnNameSet.add( uniqueName ); columnDef.setDataTypeName( resultSetColumn.getDataType( ) ); columnDef.setDataType( ModelAdapter.adaptModelDataType( resultSetColumn.getDataType( ) ) ); columnDef.setColumnPosition( resultSetColumn.getPosition( ) .intValue( ) ); if ( !uniqueName.equals( resultSetColumn.getColumnName( ) ) ) { updateModelColumn( dataSetHandle, columnDef ); } ColumnHintHandle columnHint = findColumnHint( dataSetHandle, uniqueName ); if ( columnHint != null ) { columnDef.setAlias( columnHint.getAlias( ) ); columnDef.setLableName( columnHint.getDisplayName( ) ); } columnDef.setComputedColumn( false ); columnMeta.add( columnDef ); index++; } // populate computed columns if ( computedList != null ) { ComputedColumn computedColumn; Iterator computedColumnIterator = computedList.iterator( ); while ( computedColumnIterator.hasNext( ) ) { computedColumn = (ComputedColumn) computedColumnIterator.next( ); columnDef = new ResultSetColumnDefinition( computedColumn.getName( ) ); columnDef.setDataTypeName( computedColumn.getDataType( ) ); columnDef.setDataType( ModelAdapter.adaptModelDataType( computedColumn.getDataType( ) ) ); if ( findColumnHint( dataSetHandle, computedColumn.getName( ) ) != null ) { ColumnHintHandle columnHint = findColumnHint( dataSetHandle, computedColumn.getName( ) ); columnDef.setAlias( columnHint.getAlias( ) ); columnDef.setLableName( columnHint.getDisplayName( ) ); } columnDef.setComputedColumn( true ); columnMeta.add( columnDef ); index++; } } return new ResultMetaData2( columnMeta ); } return null; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/7e595f5cbade7050afa3c51dd7b360020fa746f4/MetaDataPopulator.java/clean/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/MetaDataPopulator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
467,
1253,
6998,
4614,
1253,
6998,
12,
1082,
202,
13676,
3259,
14837,
3259,
262,
1216,
605,
2714,
503,
202,
95,
202,
202,
682,
12168,
682,
273,
446,
31,
202,
202,
430,
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,
225,
202,
482,
760,
467,
1253,
6998,
4614,
1253,
6998,
12,
1082,
202,
13676,
3259,
14837,
3259,
262,
1216,
605,
2714,
503,
202,
95,
202,
202,
682,
12168,
682,
273,
446,
31,
202,
202,
430,
26... | |
batch.close(c); synchronized (this) { os.releaseConnection(c); conn = null; | try { batch.close(c); } catch (Exception e) { StringWriter message = new StringWriter(); PrintWriter pw = new PrintWriter(message); e.printStackTrace(pw); pw.flush(); LOG.error("Exception caught when closing Batch while closing ObjectStoreWriter - " + message); | public void close() { LOG.info("Close called on ObjectStoreWriterInterMineImpl with sequence = " + sequence); try { Connection c = getConnection(); if (isInTransactionWithConnection(c)) { abortTransactionWithConnection(c); LOG.error("ObjectStoreWriterInterMineImpl closed in unfinished transaction" + " - transaction aborted"); } batch.close(c); synchronized (this) { os.releaseConnection(c); conn = null; } } catch (Exception e) { } } | 7196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7196/a2ce5aa1be1804e4e8262cc2e884de9406185783/ObjectStoreWriterInterMineImpl.java/clean/intermine/src/java/org/intermine/objectstore/intermine/ObjectStoreWriterInterMineImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1746,
1435,
288,
3639,
2018,
18,
1376,
2932,
4605,
2566,
603,
1033,
2257,
2289,
2465,
49,
558,
2828,
598,
3102,
273,
315,
397,
3102,
1769,
3639,
775,
288,
5411,
4050,
276,
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,
1071,
918,
1746,
1435,
288,
3639,
2018,
18,
1376,
2932,
4605,
2566,
603,
1033,
2257,
2289,
2465,
49,
558,
2828,
598,
3102,
273,
315,
397,
3102,
1769,
3639,
775,
288,
5411,
4050,
276,
273,... |
if(count == 0) | boolean seenNonWhiteSpace = false; loop: for(int i = 0; i < count; i++) { switch(seg.array[offset + i]) { case ' ': whitespace++; break; case '\t': whitespace += (tabSize - whitespace % tabSize); break; default: seenNonWhiteSpace = true; break loop; } } if(!seenNonWhiteSpace) | public int getFoldLevel(Buffer buffer, int lineIndex, Segment seg) { int tabSize = buffer.getTabSize(); buffer.getLineText(lineIndex,seg); int offset = seg.offset; int count = seg.count; int whitespace = 0; if(count == 0) { // empty line. inherit previous line's fold level if(lineIndex != 0) whitespace = buffer.getFoldLevel(lineIndex - 1); else whitespace = 0; } else {loop: for(int i = 0; i < count; i++) { switch(seg.array[offset + i]) { case ' ': whitespace++; break; case '\t': whitespace += (tabSize - whitespace % tabSize); break; default: break loop; } } } return whitespace; } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/d85571f407be9c34f26ae00523500ae8e3664652/IndentFoldHandler.java/clean/org/gjt/sp/jedit/buffer/IndentFoldHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
2812,
1673,
2355,
12,
1892,
1613,
16,
509,
980,
1016,
16,
10807,
2291,
13,
202,
95,
202,
202,
474,
3246,
1225,
273,
1613,
18,
588,
5661,
1225,
5621,
202,
202,
4106,
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,
225,
202,
482,
509,
2812,
1673,
2355,
12,
1892,
1613,
16,
509,
980,
1016,
16,
10807,
2291,
13,
202,
95,
202,
202,
474,
3246,
1225,
273,
1613,
18,
588,
5661,
1225,
5621,
202,
202,
4106,
18,
... |
JStatement cloneIncr=(JStatement)ObjectDeepCloner.deepCopy(makeIncr(info,info.incrVal)); | JStatement cloneIncr=(JStatement)ObjectDeepCloner.deepCopy (LoopIterInfo.makeIncrAssignment(info,info.getIncrVal())); | private JBlock doPartialUnroll(final UnrollInfo info, JForStatement self) { int numExec=getNumExecutions(info); //int numLoops=numExec/KjcOptions.unroll; int remain=numExec%unrollLimit; JStatement[] newBody=new JStatement[unrollLimit]; //if(newBody.length>=2) { //newBody[0]=self.getBody(); //newBody[1]=self.getIncrement(); //} if(unrollLimit>=1) { JStatement cloneBody=(JStatement)ObjectDeepCloner.deepCopy(self.getBody()); newBody[0]=cloneBody; } { final JLocalVariable inductVar=info.var; final int incrVal=info.incrVal; for(int i=1;i<unrollLimit;i++) { JStatement cloneBody=(JStatement)ObjectDeepCloner.deepCopy(self.getBody()); //JStatement cloneIncr=(JStatement)ObjectDeepCloner.deepCopy(makeIncr(info,info.incrVal)); final int incremented=i; cloneBody.accept(new SLIRReplacingVisitor() { public Object visitLocalVariableExpression(JLocalVariableExpression self2, String ident) { if(inductVar.equals(self2.getVariable())) { return makeIncreased(info,incremented*incrVal); } else return self2; } }); newBody[i]=cloneBody; } } JBlock body=new JBlock(null,newBody,null); JStatement[] newStatements=new JStatement[2*remain+2]; newStatements[0]=self.getInit(); int result=info.initVal; for(int i=1;i<2*remain+1;i++) { JStatement cloneBody=(JStatement)ObjectDeepCloner.deepCopy(self.getBody()); JStatement cloneIncr=(JStatement)ObjectDeepCloner.deepCopy(makeIncr(info,info.incrVal)); newStatements[i]=cloneBody; i++; newStatements[i]=cloneIncr; result=incrementCounter(result,info); } JForStatement newFor = new JForStatement(null, new JExpressionStatement(null, new JAssignmentExpression(null, new JLocalVariableExpression(null, info.var), new JIntLiteral(result)), null), self.getCondition(), makeIncr(info, unrollLimit * info.incrVal), body, new JavaStyleComment[] { new JavaStyleComment("Unroller", true, false, false)}); newFor.setUnrolled(true); newStatements[newStatements.length-1]=newFor; // mark that we've unrolled this.hasUnrolled = true; return new JBlock(null, newStatements, null); } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/5e7f0c119edfedf3dcbae30c898a602e2de1a587/Unroller.java/clean/streams/src/at/dms/kjc/sir/lowering/Unroller.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
804,
1768,
741,
9447,
984,
2693,
12,
6385,
1351,
2693,
966,
1123,
16,
804,
1290,
3406,
365,
13,
288,
3639,
509,
818,
1905,
33,
588,
2578,
15875,
12,
1376,
1769,
3639,
368,
474,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
804,
1768,
741,
9447,
984,
2693,
12,
6385,
1351,
2693,
966,
1123,
16,
804,
1290,
3406,
365,
13,
288,
3639,
509,
818,
1905,
33,
588,
2578,
15875,
12,
1376,
1769,
3639,
368,
474,
81... |
public void rule_attributes(RuleDescr rule) throws RecognitionException { AttributeDescr a = null; try { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:391:25: ( ( 'attributes' )? ( ':' )? opt_eol ( ( ',' )? a= rule_attribute opt_eol )* ) // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:391:25: ( 'attributes' )? ( ':' )? opt_eol ( ( ',' )? a= rule_attribute opt_eol )* { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:391:25: ( 'attributes' )? int alt25=2; int LA25_0 = input.LA(1); if ( LA25_0==32 ) { alt25=1; } else if ( LA25_0==EOL||LA25_0==15||LA25_0==22||LA25_0==27||(LA25_0>=29 && LA25_0<=31)||(LA25_0>=33 && LA25_0<=38) ) { alt25=2; } else { NoViableAltException nvae = new NoViableAltException("391:25: ( \'attributes\' )?", 25, 0, input); throw nvae; } switch (alt25) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:391:25: 'attributes' { match(input,32,FOLLOW_32_in_rule_attributes742); } break; } // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:391:39: ( ':' )? int alt26=2; int LA26_0 = input.LA(1); if ( LA26_0==30 ) { alt26=1; } else if ( LA26_0==EOL||LA26_0==15||LA26_0==22||LA26_0==27||LA26_0==29||LA26_0==31||(LA26_0>=33 && LA26_0<=38) ) { alt26=2; } else { NoViableAltException nvae = new NoViableAltException("391:39: ( \':\' )?", 26, 0, input); throw nvae; } switch (alt26) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:391:39: ':' { match(input,30,FOLLOW_30_in_rule_attributes745); } break; } following.push(FOLLOW_opt_eol_in_rule_attributes748); opt_eol(); following.pop(); // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:392:25: ( ( ',' )? a= rule_attribute opt_eol )* loop28: do { int alt28=2; int LA28_0 = input.LA(1); if ( LA28_0==22||(LA28_0>=33 && LA28_0<=38) ) { alt28=1; } switch (alt28) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:392:33: ( ',' )? a= rule_attribute opt_eol { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:392:33: ( ',' )? int alt27=2; int LA27_0 = input.LA(1); if ( LA27_0==22 ) { alt27=1; } else if ( (LA27_0>=33 && LA27_0<=38) ) { alt27=2; } else { NoViableAltException nvae = new NoViableAltException("392:33: ( \',\' )?", 27, 0, input); throw nvae; } switch (alt27) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:392:33: ',' { match(input,22,FOLLOW_22_in_rule_attributes755); } break; } following.push(FOLLOW_rule_attribute_in_rule_attributes760); a=rule_attribute(); following.pop(); following.push(FOLLOW_opt_eol_in_rule_attributes762); opt_eol(); following.pop(); rule.addAttribute( a ); } break; default : break loop28; } } while (true); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/bf3305a89ef5e916acbab744c38aaaec83bf67ff/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1720,
67,
4350,
12,
2175,
16198,
1720,
13,
1216,
9539,
288,
6647,
3601,
16198,
279,
273,
446,
31,
3639,
775,
288,
5411,
368,
385,
5581,
15298,
64,
10649,
8464,
17,
7482,
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,
1720,
67,
4350,
12,
2175,
16198,
1720,
13,
1216,
9539,
288,
6647,
3601,
16198,
279,
273,
446,
31,
3639,
775,
288,
5411,
368,
385,
5581,
15298,
64,
10649,
8464,
17,
7482,
17,
... | ||
newMainJar = new File(mainJar.getParent(), "freenet.jar"); | newMainJar = new File(mainJar.getParent(), "freenet.jar.new"); | UpdateDeployContext() throws UpdaterParserException { Properties p = WrapperManager.getProperties(); for(int propNo=1;true;propNo++) { String prop = p.getProperty("wrapper.java.classpath."+propNo); if(prop == null) break; File f = new File(prop); boolean isAbsolute = f.isAbsolute(); String name = f.getName().toLowerCase(); if(extJar == null) { if(name.equals("freenet-ext.jar.new")) { extJar = f; newExtJar = new File(extJar.getParent(), "freenet-ext.jar"); extJarAbsolute = isAbsolute; extClasspathNo = propNo; continue; } else if(name.equals("freenet-ext.jar")) { extJar = f; newExtJar = new File(extJar.getParent(), "freenet-ext.jar.new"); extClasspathNo = propNo; continue; } } if(mainJar == null) { // Try to match it if(!(name.startsWith("freenet") && (name.endsWith(".jar")))) { mainJar = f; newMainJar = new File(mainJar.getParent(), "freenet.jar"); mainJarAbsolute = isAbsolute; mainClasspathNo = propNo; continue; } else if(!(name.startsWith("freenet") && (name.endsWith(".jar.new")))) { mainJar = f; newMainJar = new File(mainJar.getParent(), "freenet.jar.new"); mainJarAbsolute = isAbsolute; mainClasspathNo = propNo; continue; } } } if(mainJar == null && extJar == null) throw new UpdaterParserException("Could not find freenet jars in wrapper.conf"); if(mainJar == null) throw new UpdaterParserException("Could not find freenet.jar in wrapper.conf (did find freenet-ext.jar: "+extJar+')'); if(extJar == null) throw new UpdaterParserException("Could not find freenet-ext.jar in wrapper.conf (did find freenet.jar: "+mainJar+')'); } | 56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/03c43894fec32d7f3d93f3b446167de71fd0a98c/UpdateDeployContext.java/clean/src/freenet/node/updater/UpdateDeployContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1891,
10015,
1042,
1435,
1216,
27254,
2045,
25746,
288,
202,
202,
2297,
293,
273,
18735,
1318,
18,
588,
2297,
5621,
9506,
202,
1884,
12,
474,
2270,
2279,
33,
21,
31,
3767,
31,
5986,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1891,
10015,
1042,
1435,
1216,
27254,
2045,
25746,
288,
202,
202,
2297,
293,
273,
18735,
1318,
18,
588,
2297,
5621,
9506,
202,
1884,
12,
474,
2270,
2279,
33,
21,
31,
3767,
31,
5986,
... |
File viewFile = XWorkConfigRetriever.getViewFile(namespace, actionName, resultName); if (viewFile != null && viewFile.exists()) { | File viewFile = XWorkConfigRetriever.getViewFile(namespace, actionName, resultName); if (viewFile != null) { | public static View getView(String namespace, String actionName, String resultName) { String viewId = namespace + "/" + actionName + "/" + resultName; View view = (View) viewCache.get(viewId); if (view == null) { File viewFile = XWorkConfigRetriever.getViewFile(namespace, actionName, resultName); if (viewFile != null && viewFile.exists()) { view = new XworkView(viewFile); viewCache.put(viewId, view); } } return view; } | 15560 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15560/7671d4aebbd308381f64074aac56641aee4ccb65/XWorkConfigRetriever.java/clean/src/webflow/com/opensymphony/webwork/webFlow/XWorkConfigRetriever.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
4441,
8893,
12,
780,
1981,
16,
514,
15451,
16,
514,
563,
461,
13,
288,
3639,
514,
1476,
548,
273,
1981,
397,
4016,
397,
15451,
397,
4016,
397,
563,
461,
31,
3639,
4441,
1476,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4441,
8893,
12,
780,
1981,
16,
514,
15451,
16,
514,
563,
461,
13,
288,
3639,
514,
1476,
548,
273,
1981,
397,
4016,
397,
15451,
397,
4016,
397,
563,
461,
31,
3639,
4441,
1476,... |
build.setStandardOutput( "stdout" ); build.setStandardError( "stderr" ); MailMessage mailMessage = sendNotificationAndGetMessage( project, build ); | MailMessage mailMessage = sendNotificationAndGetMessage( project, build, "lots out build output" ); | public void testSuccessfulBuild() throws Exception { ContinuumProject project = makeProject(); ContinuumBuild build = makeBuild( ContinuumProjectState.OK ); build.setStandardOutput( "stdout" ); build.setStandardError( "stderr" ); MailMessage mailMessage = sendNotificationAndGetMessage( project, build ); dumpContent( mailMessage ); } | 48499 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48499/3e8ef7817f4f729904c4598e6922e9262fccdd86/MailContinuumNotifierTest.java/buggy/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
14277,
3116,
1435,
3639,
1216,
1185,
565,
288,
3639,
1816,
6860,
379,
4109,
1984,
273,
1221,
4109,
5621,
3639,
1816,
6860,
379,
3116,
1361,
273,
1221,
3116,
12,
1816,
6860,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
14277,
3116,
1435,
3639,
1216,
1185,
565,
288,
3639,
1816,
6860,
379,
4109,
1984,
273,
1221,
4109,
5621,
3639,
1816,
6860,
379,
3116,
1361,
273,
1221,
3116,
12,
1816,
6860,... |
return (String) getLookAndFeelDefaults().get(key); | return (String) get(key); | public static String getString(Object key) { return (String) getLookAndFeelDefaults().get(key); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/badba23052f905d992da7c32124c28f4339931fc/UIManager.java/buggy/core/src/classpath/javax/javax/swing/UIManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
514,
4997,
12,
921,
498,
13,
225,
288,
565,
327,
261,
780,
13,
336,
12,
856,
1769,
225,
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,
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,
282,
1071,
760,
514,
4997,
12,
921,
498,
13,
225,
288,
565,
327,
261,
780,
13,
336,
12,
856,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (evt == WindowEvent.WINDOW_CLOSING || evt == WindowEvent.WINDOW_CLOSED) { | if (evt == WindowEvent.WINDOW_CLOSING || evt == WindowEvent.WINDOW_CLOSED) { | public void processWindowEvent(WindowEvent w) { int evt = w.getID(); if (evt == WindowEvent.WINDOW_CLOSING || evt == WindowEvent.WINDOW_CLOSED) { // save window size and position saveWindowLayout(); } super.processWindowEvent(w); } | 8797 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8797/4a0a73e7bee21ce9a2da1ef7fb0355eee90c400f/TagValidationFrame.java/clean/src/org/omegat/gui/TagValidationFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1207,
3829,
1133,
12,
3829,
1133,
341,
13,
565,
288,
3639,
509,
6324,
273,
341,
18,
588,
734,
5621,
3639,
309,
261,
73,
11734,
422,
6076,
1133,
18,
23407,
67,
22693,
23708,
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,
918,
1207,
3829,
1133,
12,
3829,
1133,
341,
13,
565,
288,
3639,
509,
6324,
273,
341,
18,
588,
734,
5621,
3639,
309,
261,
73,
11734,
422,
6076,
1133,
18,
23407,
67,
22693,
23708,
7... |
" WHERE " + IN_THIS_MAILBOX_AND + target + " AND type NOT IN " + FOLDER_TYPES); | " WHERE " + IN_THIS_MAILBOX_AND + target + " AND type NOT IN " + FOLDER_TYPES); | public static void deleteContents(MailItem item) throws ServiceException { String target; if (item instanceof VirtualConversation) target = "id = ?"; else if (item instanceof Conversation) target = "parent_id = ?"; else if (item instanceof SearchFolder) return; else if (item instanceof Folder) target = "folder_id = ?"; else return; Mailbox mbox = item.getMailbox(); Connection conn = mbox.getOperationConnection(); PreparedStatement stmt = null; try { stmt = conn.prepareStatement("DELETE FROM " + getMailItemTableName(item) + " WHERE " + IN_THIS_MAILBOX_AND + target + " AND type NOT IN " + FOLDER_TYPES); int pos = 1; if (!DebugConfig.disableMailboxGroup) stmt.setInt(pos++, mbox.getId()); stmt.setInt(pos++, item instanceof VirtualConversation ? ((VirtualConversation) item).getMessageId() : item.getId()); stmt.executeUpdate(); } catch (SQLException e) { throw ServiceException.FAILURE("deleting contents for " + MailItem.getNameForType(item) + " " + item.getId(), e); } finally { DbPool.closeStatement(stmt); } } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/31a637ca1acd3adfa618b6e80ec991e5b2c35e45/DbMailItem.java/buggy/ZimbraServer/src/java/com/zimbra/cs/db/DbMailItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1430,
6323,
12,
6759,
1180,
761,
13,
1216,
16489,
288,
3639,
514,
1018,
31,
3639,
309,
261,
1726,
1276,
7269,
15717,
13,
225,
1018,
273,
315,
350,
273,
692,
14432,
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,
1071,
760,
918,
1430,
6323,
12,
6759,
1180,
761,
13,
1216,
16489,
288,
3639,
514,
1018,
31,
3639,
309,
261,
1726,
1276,
7269,
15717,
13,
225,
1018,
273,
315,
350,
273,
692,
14432,
3639,
... |
int alt50=2; int LA50_0 = input.LA(1); if ( (LA50_0>=40 && LA50_0<=47) ) { alt50=1; } else if ( LA50_0==EOL||LA50_0==15||(LA50_0>=22 && LA50_0<=23) ) { alt50=2; | int alt51=2; int LA51_0 = input.LA(1); if ( (LA51_0>=40 && LA51_0<=47) ) { alt51=1; } else if ( LA51_0==EOL||LA51_0==15||(LA51_0>=22 && LA51_0<=23) ) { alt51=2; | public void constraint(List constraints) throws RecognitionException { Token fb=null; Token f=null; Token op=null; Token bvc=null; String lc = null; String rvc = null; PatternDescr d = null; try { // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:652:17: ( opt_eol (fb= ID opt_eol ':' opt_eol )? f= ID opt_eol (op= ('=='|'>'|'>='|'<'|'<='|'!='|'contains'|'matches') opt_eol (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) )? opt_eol ) // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:652:17: opt_eol (fb= ID opt_eol ':' opt_eol )? f= ID opt_eol (op= ('=='|'>'|'>='|'<'|'<='|'!='|'contains'|'matches') opt_eol (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) )? opt_eol { following.push(FOLLOW_opt_eol_in_constraint1636); opt_eol(); following.pop(); // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:653:17: (fb= ID opt_eol ':' opt_eol )? int alt48=2; alt48 = dfa48.predict(input); switch (alt48) { case 1 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:653:19: fb= ID opt_eol ':' opt_eol { fb=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_constraint1644); following.push(FOLLOW_opt_eol_in_constraint1646); opt_eol(); following.pop(); match(input,30,FOLLOW_30_in_constraint1648); following.push(FOLLOW_opt_eol_in_constraint1650); opt_eol(); following.pop(); } break; } f=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_constraint1660); if ( fb != null ) { //System.err.println( "fb: " + fb.getText() ); //System.err.println( " f: " + f.getText() ); d = new FieldBindingDescr( f.getText(), fb.getText() ); //System.err.println( "fbd: " + d ); d.setLocation( f.getLine(), f.getCharPositionInLine() ); constraints.add( d ); } following.push(FOLLOW_opt_eol_in_constraint1670); opt_eol(); following.pop(); // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:666:33: (op= ('=='|'>'|'>='|'<'|'<='|'!='|'contains'|'matches') opt_eol (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) )? int alt50=2; int LA50_0 = input.LA(1); if ( (LA50_0>=40 && LA50_0<=47) ) { alt50=1; } else if ( LA50_0==EOL||LA50_0==15||(LA50_0>=22 && LA50_0<=23) ) { alt50=2; } else { NoViableAltException nvae = new NoViableAltException("666:33: (op= (\'==\'|\'>\'|\'>=\'|\'<\'|\'<=\'|\'!=\'|\'contains\'|\'matches\') opt_eol (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) )?", 50, 0, input); throw nvae; } switch (alt50) { case 1 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:666:41: op= ('=='|'>'|'>='|'<'|'<='|'!='|'contains'|'matches') opt_eol (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) { op=(Token)input.LT(1); if ( (input.LA(1)>=40 && input.LA(1)<=47) ) { input.consume(); errorRecovery=false; } else { MismatchedSetException mse = new MismatchedSetException(null,input); recoverFromMismatchedSet(input,mse,FOLLOW_set_in_constraint1678); throw mse; } following.push(FOLLOW_opt_eol_in_constraint1750); opt_eol(); following.pop(); // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:676:41: (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) int alt49=4; switch ( input.LA(1) ) { case ID: int LA49_1 = input.LA(2); if ( LA49_1==49 ) { alt49=2; } else if ( LA49_1==EOL||LA49_1==15||(LA49_1>=22 && LA49_1<=23) ) { alt49=1; } else { NoViableAltException nvae = new NoViableAltException("676:41: (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint )", 49, 1, input); throw nvae; } break; case INT: case BOOL: case STRING: case FLOAT: case 48: alt49=3; break; case 21: alt49=4; break; default: NoViableAltException nvae = new NoViableAltException("676:41: (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint )", 49, 0, input); throw nvae; } switch (alt49) { case 1 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:676:49: bvc= ID { bvc=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_constraint1768); d = new BoundVariableDescr( f.getText(), op.getText(), bvc.getText() ); d.setLocation( f.getLine(), f.getCharPositionInLine() ); constraints.add( d ); } break; case 2 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:683:49: lc= enum_constraint { following.push(FOLLOW_enum_constraint_in_constraint1793); lc=enum_constraint(); following.pop(); d = new LiteralDescr( f.getText(), op.getText(), lc, true ); d.setLocation( f.getLine(), f.getCharPositionInLine() ); constraints.add( d ); } break; case 3 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:690:49: lc= literal_constraint { following.push(FOLLOW_literal_constraint_in_constraint1825); lc=literal_constraint(); following.pop(); d = new LiteralDescr( f.getText(), op.getText(), lc ); d.setLocation( f.getLine(), f.getCharPositionInLine() ); constraints.add( d ); } break; case 4 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:696:49: rvc= retval_constraint { following.push(FOLLOW_retval_constraint_in_constraint1845); rvc=retval_constraint(); following.pop(); d = new ReturnValueDescr( f.getText(), op.getText(), rvc ); d.setLocation( f.getLine(), f.getCharPositionInLine() ); constraints.add( d ); } break; } } break; } following.push(FOLLOW_opt_eol_in_constraint1878); opt_eol(); following.pop(); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/2c627236020a6a6e3e349b38b1010bfe64567df7/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4954,
12,
682,
6237,
13,
1216,
9539,
288,
6647,
3155,
12754,
33,
2011,
31,
3639,
3155,
284,
33,
2011,
31,
3639,
3155,
1061,
33,
2011,
31,
3639,
3155,
324,
4227,
33,
2011,
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,
918,
4954,
12,
682,
6237,
13,
1216,
9539,
288,
6647,
3155,
12754,
33,
2011,
31,
3639,
3155,
284,
33,
2011,
31,
3639,
3155,
1061,
33,
2011,
31,
3639,
3155,
324,
4227,
33,
2011,
31,... |
if (event.getItemId().equals(getId())) { setStatus(Status.REMOVED); } else { throw new IllegalArgumentException("EventId " + event.getItemId() + " does not match id of this property state."); } | setStatus(Status.REMOVED); | synchronized void refresh(Event event, ChangeLog changeLog) { checkIsWorkspaceState(); switch (event.getType()) { case Event.PROPERTY_REMOVED: if (event.getItemId().equals(getId())) { setStatus(Status.REMOVED); } else { // ILLEGAL throw new IllegalArgumentException("EventId " + event.getItemId() + " does not match id of this property state."); } break; case Event.PROPERTY_CHANGED: if (event.getItemId().equals(getId())) { setStatus(Status.MODIFIED); } else { // ILLEGAL throw new IllegalArgumentException("EventId " + event.getItemId() + " does not match id of this property state."); } break; case Event.PROPERTY_ADDED: case Event.NODE_ADDED: case Event.NODE_REMOVED: default: throw new IllegalArgumentException("Event type " + event.getType() + " cannot be applied to a PropertyState"); } } | 48761 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48761/9ae8bbb5c63832a2db95f20a916c3c350f4f0681/PropertyState.java/clean/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3852,
918,
4460,
12,
1133,
871,
16,
7576,
1343,
2549,
1343,
13,
288,
3639,
866,
2520,
8241,
1119,
5621,
3639,
1620,
261,
2575,
18,
588,
559,
10756,
288,
5411,
648,
2587,
18,
9900,
67,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3852,
918,
4460,
12,
1133,
871,
16,
7576,
1343,
2549,
1343,
13,
288,
3639,
866,
2520,
8241,
1119,
5621,
3639,
1620,
261,
2575,
18,
588,
559,
10756,
288,
5411,
648,
2587,
18,
9900,
67,
1... |
if (TreeUtil.skipElementsBack(child, WHITE_SPACE_OR_COMMENT_BIT_SET) == null) { return ChildRole.PRECEDING_COMMENT; } else { return ChildRole.NONE; } | return ChildRole.NONE; | public int getChildRole(ASTNode child) { LOG.assertTrue(child.getTreeParent() == this); IElementType i = child.getElementType(); if (i == C_STYLE_COMMENT || i == END_OF_LINE_COMMENT) { { if (TreeUtil.skipElementsBack(child, WHITE_SPACE_OR_COMMENT_BIT_SET) == null) { return ChildRole.PRECEDING_COMMENT; } else { return ChildRole.NONE; } } } else if (i == MODIFIER_LIST) { return ChildRole.MODIFIER_LIST; } else if (i == CODE_BLOCK) { return ChildRole.METHOD_BODY; } else { return ChildRole.NONE; } } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/984ae8c4e331e8880490078c1eb957c430b9337a/ClassInitializerElement.java/buggy/source/com/intellij/psi/impl/source/tree/java/ClassInitializerElement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
8154,
2996,
12,
9053,
907,
1151,
13,
288,
565,
2018,
18,
11231,
5510,
12,
3624,
18,
588,
2471,
3054,
1435,
422,
333,
1769,
565,
467,
17481,
277,
273,
1151,
18,
588,
17481,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8154,
2996,
12,
9053,
907,
1151,
13,
288,
565,
2018,
18,
11231,
5510,
12,
3624,
18,
588,
2471,
3054,
1435,
422,
333,
1769,
565,
467,
17481,
277,
273,
1151,
18,
588,
17481,
56... |
public String toString() { return String.valueOf(xs); } | public String toString() { return String.valueOf(value); } | public String toString() { return String.valueOf(xs); } | 55146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55146/16669f0c1edfc2716f2a396c87b3f031fd64255a/RunTime.java/buggy/sources/scala/runtime/RunTime.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
288,
327,
514,
18,
1132,
951,
12,
13713,
1769,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
288,
327,
514,
18,
1132,
951,
12,
13713,
1769,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
TextNode getTextNode(); | public TextNode getTextNode(); | TextNode getTextNode(); | 46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/4bb56f8e41e63eb3acf4e1aab39b090e7091ae58/Mark.java/buggy/sources/org/apache/batik/gvt/text/Mark.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3867,
907,
6701,
907,
5621,
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,
0,
0,
0,
0,
0,
0,
... | [
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3867,
907,
6701,
907,
5621,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
TableTreeItem item = tableTree.getItem( pt ); | TreeItem item = tableTree.getItem( pt ); | public void mouseDown( MouseEvent event ) { // only activate if there is a cell editor Point pt = new Point( event.x, event.y ); TableTreeItem item = tableTree.getItem( pt ); if ( item != null ) { handleSelect( item ); } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/97ec512e11440a7aef4cabaf9a1d56dca5de4b0b/ReportPropertySheetPage.java/clean/UI/org.eclipse.birt.report.designer.ui.editors/src/org/eclipse/birt/report/designer/internal/ui/views/property/ReportPropertySheetPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
7644,
4164,
12,
17013,
1133,
871,
262,
1082,
202,
95,
9506,
202,
759,
1338,
10235,
309,
1915,
353,
279,
2484,
4858,
9506,
202,
2148,
5818,
273,
394,
4686,
12,
871,
18,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7644,
4164,
12,
17013,
1133,
871,
262,
1082,
202,
95,
9506,
202,
759,
1338,
10235,
309,
1915,
353,
279,
2484,
4858,
9506,
202,
2148,
5818,
273,
394,
4686,
12,
871,
18,
9... |
IWorkbenchWindow[] windows= fWorkbench.getWorkbenchWindows(); | IWorkbenchWindow[] windows= PlatformUI.getWorkbench().getWorkbenchWindows(); | void install() { // Create and register activation listener fActivationListener= new ActivationListener(); /* * XXX: Don't in-line this field unless the following bug has been fixed: * https://bugs.eclipse.org/bugs/show_bug.cgi?id=55246 */ fWorkbench= PlatformUI.getWorkbench(); fWorkbench.addWindowListener(fActivationListener); // Ensure existing windows get connected IWorkbenchWindow[] windows= fWorkbench.getWorkbenchWindows(); for (int i= 0, length= windows.length; i < length; i++) windows[i].getPartService().addPartListener(fActivationListener); } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/302e999bdd58cbcd7a279283204cd3078bc3fd82/ASTProvider.java/buggy/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ASTProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
3799,
1435,
288,
202,
202,
759,
1788,
471,
1744,
10027,
2991,
202,
202,
74,
14857,
2223,
33,
394,
26015,
2223,
5621,
9506,
202,
20308,
1082,
380,
11329,
30,
7615,
1404,
316,
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,
225,
202,
6459,
3799,
1435,
288,
202,
202,
759,
1788,
471,
1744,
10027,
2991,
202,
202,
74,
14857,
2223,
33,
394,
26015,
2223,
5621,
9506,
202,
20308,
1082,
380,
11329,
30,
7615,
1404,
316,
17... |
mNext = pNext; | nextPage = next; | public void setNext(Integer pNext) { mNext = pNext; } | 10316 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10316/1f015620e66bc5b3e00897f80df0461ae3b81609/Pagination.java/buggy/displaytag/src/main/java/org/displaytag/pagination/Pagination.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
27674,
12,
4522,
293,
2134,
13,
565,
288,
3639,
7580,
273,
1024,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
27674,
12,
4522,
293,
2134,
13,
565,
288,
3639,
7580,
273,
1024,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
.getActiveBindingsFor(command.getId()); | .getActiveBindingsFor(parameterizedCommand); | public final List getKeySequenceBindings() { final List legacyBindings = new ArrayList(); final TriggerSequence[] activeBindings = bindingManager .getActiveBindingsFor(command.getId()); final int activeBindingsCount = activeBindings.length; for (int i = 0; i < activeBindingsCount; i++) { final TriggerSequence triggerSequence = activeBindings[i]; if (triggerSequence instanceof org.eclipse.jface.bindings.keys.KeySequence) { legacyBindings .add(new KeySequenceBinding( KeySequence .getInstance((org.eclipse.jface.bindings.keys.KeySequence) triggerSequence), 0)); } } return legacyBindings; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/e61bf96d546738a5dfebc5feb8c2bcbe110e4371/CommandWrapper.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandWrapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
987,
3579,
4021,
10497,
1435,
288,
202,
202,
6385,
987,
8866,
10497,
273,
394,
2407,
5621,
202,
202,
6385,
11321,
4021,
8526,
2695,
10497,
273,
5085,
1318,
9506,
202,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
987,
3579,
4021,
10497,
1435,
288,
202,
202,
6385,
987,
8866,
10497,
273,
394,
2407,
5621,
202,
202,
6385,
11321,
4021,
8526,
2695,
10497,
273,
5085,
1318,
9506,
202,
18,
5... |
if (jj_3R_49()) { jj_scanpos = xsp; if (jj_3R_50()) { jj_scanpos = xsp; | final private boolean jj_3_1() { Token xsp; xsp = jj_scanpos; if (jj_3R_49()) { jj_scanpos = xsp; if (jj_3R_50()) { jj_scanpos = xsp; if (jj_3R_51()) { jj_scanpos = xsp; if (jj_3R_52()) { jj_scanpos = xsp; if (jj_3R_53()) { jj_scanpos = xsp; if (jj_3R_54()) { jj_scanpos = xsp; if (jj_3R_55()) { jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; if (jj_3R_57()) { jj_scanpos = xsp; if (jj_3R_58()) { jj_scanpos = xsp; if (jj_3R_59()) { jj_scanpos = xsp; if (jj_3R_60()) return true; } } } } } } } } } } } return false; } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/3afd4630754ba5d6642f3e8a1c9aa5162eff7e9f/JavaParser.java/buggy/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
67,
21,
1435,
288,
565,
3155,
619,
1752,
31,
565,
619,
1752,
273,
10684,
67,
9871,
917,
31,
565,
309,
261,
78,
78,
67,
23,
54,
67,
7616,
10756,
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,
282,
727,
3238,
1250,
10684,
67,
23,
67,
21,
1435,
288,
565,
3155,
619,
1752,
31,
565,
619,
1752,
273,
10684,
67,
9871,
917,
31,
565,
309,
261,
78,
78,
67,
23,
54,
67,
7616,
10756,
288,
... | |
if (horizontalSpacingESet) result.append(horizontalSpacing); else result.append("<unset>"); | if (horizontalSpacingESet) result.append(horizontalSpacing); else result.append("<unset>"); | public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (horizontalSpacing: "); if (horizontalSpacingESet) result.append(horizontalSpacing); else result.append("<unset>"); result.append(", verticalSpacing: "); if (verticalSpacingESet) result.append(verticalSpacing); else result.append("<unset>"); result.append(", orientation: "); if (orientationESet) result.append(orientation); else result.append("<unset>"); result.append(", direction: "); if (directionESet) result.append(direction); else result.append("<unset>"); result.append(", position: "); if (positionESet) result.append(position); else result.append("<unset>"); result.append(", itemType: "); if (itemTypeESet) result.append(itemType); else result.append("<unset>"); result.append(')'); return result.toString(); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/LegendImpl.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/layout/impl/LegendImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
565,
288,
3639,
309,
261,
73,
2520,
3886,
10756,
327,
2240,
18,
10492,
5621,
3639,
6674,
563,
273,
394,
6674,
12,
9565,
18,
10492,
10663,
3639,
563,
18,
6923,
2932,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
1762,
1435,
565,
288,
3639,
309,
261,
73,
2520,
3886,
10756,
327,
2240,
18,
10492,
5621,
3639,
6674,
563,
273,
394,
6674,
12,
9565,
18,
10492,
10663,
3639,
563,
18,
6923,
2932,... |
int blue = (c1.getBlue() + c2.getBlue()) / 2; | int blue = (c1.getBlue() + c2.getBlue()) / 2; | public static Color mixColor(Color c1, Color c2) { int red = (c1.getRed() + c2.getRed()) / 2; int green = (c1.getGreen() + c2.getGreen()) / 2; int blue = (c1.getBlue() + c2.getBlue()) / 2; return new Color(red, green, blue); } | 57341 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57341/d2255fbe86a662c3d5768854411509915a7f3e00/PrintColor.java/buggy/freehep-graphics2d/src/main/java/org/freehep/graphics2d/PrintColor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
5563,
6843,
2957,
12,
2957,
276,
21,
16,
5563,
276,
22,
13,
288,
3639,
509,
1755,
282,
273,
261,
71,
21,
18,
588,
3715,
1435,
397,
276,
22,
18,
588,
3715,
10756,
342,
576,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5563,
6843,
2957,
12,
2957,
276,
21,
16,
5563,
276,
22,
13,
288,
3639,
509,
1755,
282,
273,
261,
71,
21,
18,
588,
3715,
1435,
397,
276,
22,
18,
588,
3715,
10756,
342,
576,
... |
if( found != null ){ data.foundItems.add( found ); } | public IParameterizedSymbol unqualifiedFunctionLookup( String name, List parameters ) throws ParserSymbolTableException{ //figure out the set of associated scopes first, so we can remove those that are searched //during the normal lookup to avoid doing them twice HashSet associated = new HashSet(); //collect associated namespaces & classes. int size = ( parameters == null ) ? 0 : parameters.size(); Iterator iter = ( parameters == null ) ? null : parameters.iterator(); TypeInfo param = null; ISymbol paramType = null; for( int i = size; i > 0; i-- ){ param = (TypeInfo) iter.next(); paramType = ParserSymbolTable.getFlatTypeInfo( param ).getTypeSymbol(); if( paramType == null ){ continue; } ParserSymbolTable.getAssociatedScopes( paramType, associated ); //if T is a pointer to a data member of class X, its associated namespaces and classes //are those associated with the member type together with those associated with X if( param.hasPtrOperators() && param.getPtrOperators().size() == 1 ){ TypeInfo.PtrOp op = (TypeInfo.PtrOp)param.getPtrOperators().iterator().next(); if( op.getType() == TypeInfo.PtrOp.t_pointer && paramType.getContainingSymbol().isType( TypeInfo.t_class, TypeInfo.t_union ) ) { ParserSymbolTable.getAssociatedScopes( paramType.getContainingSymbol(), associated ); } } } LookupData data = new LookupData( name, TypeInfo.t_function, getTemplateInstance() ); //if parameters == null, thats no parameters, but we need to distinguish that from //no parameter information at all, so make an empty list. data.parameters = ( parameters == null ) ? new LinkedList() : parameters; data.associated = associated; ParserSymbolTable.lookup( data, this ); ISymbol found = ParserSymbolTable.resolveAmbiguities( data ); //if we haven't found anything, or what we found is not a class member, consider the //associated scopes if( found == null || found.getContainingSymbol().getType() != TypeInfo.t_class ){ if( found != null ){ data.foundItems.add( found ); } IContainerSymbol associatedScope; //dump the hash to an array and iterate over the array because we //could be removing items from the collection as we go and we don't //want to get ConcurrentModificationExceptions Object [] scopes = associated.toArray(); size = associated.size(); for( int i = 0; i < size; i++ ){ associatedScope = (IContainerSymbol) scopes[ i ]; if( associated.contains( associatedScope ) ){ data.qualified = true; data.ignoreUsingDirectives = true; ParserSymbolTable.lookup( data, associatedScope ); } } found = ParserSymbolTable.resolveAmbiguities( data ); } if( found instanceof IParameterizedSymbol ) return (IParameterizedSymbol) found; else return null; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/0adb9b9d209fba2f5fd1d7ec2a8bc9f934d9fcf5/ContainerSymbol.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/pst/ContainerSymbol.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
15696,
5335,
640,
19724,
2083,
6609,
12,
514,
508,
16,
987,
1472,
262,
1216,
6783,
5335,
1388,
503,
95,
202,
202,
759,
19675,
596,
326,
444,
434,
3627,
8124,
1122,
16,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15696,
5335,
640,
19724,
2083,
6609,
12,
514,
508,
16,
987,
1472,
262,
1216,
6783,
5335,
1388,
503,
95,
202,
202,
759,
19675,
596,
326,
444,
434,
3627,
8124,
1122,
16,
14... | |
int _cnt2105=0; _loop2105: | int _cnt2111=0; _loop2111: | public final void osdeletestate(AST _t) throws RecognitionException { AST osdeletestate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t2102 = _t; AST tmp2064_AST_in = (AST)_t; match(_t,OSDELETE); _t = _t.getFirstChild(); { int _cnt2105=0; _loop2105: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==VALUE)) { valueexpression(_t); _t = _retTree; } else if ((_tokenSet_35.member(_t.getType()))) { { AST tmp2065_AST_in = (AST)_t; match(_t,_tokenSet_35); _t = _t.getNextSibling(); } } else { if ( _cnt2105>=1 ) { break _loop2105; } else {throw new NoViableAltException(_t);} } _cnt2105++; } while (true); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case RECURSIVE: { AST tmp2066_AST_in = (AST)_t; match(_t,RECURSIVE); _t = _t.getNextSibling(); break; } case EOF: case PERIOD: { break; } default: { throw new NoViableAltException(_t); } } } state_end(_t); _t = _retTree; _t = __t2102; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser01.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1140,
19003,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
1140,
19003,
395,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
1140,
19003,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
1140,
19003,
395,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
69... |
public void schedule() { | public void schedule() throws InserterException { | public void schedule() { if(finished) return; parent.scheduler.register(this); } | 50653 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50653/21208e342489c2a0c49f6715dd86892930851371/SingleBlockInserter.java/buggy/src/freenet/client/async/SingleBlockInserter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4788,
1435,
288,
202,
202,
430,
12,
13527,
13,
327,
31,
202,
202,
2938,
18,
19972,
18,
4861,
12,
2211,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4788,
1435,
288,
202,
202,
430,
12,
13527,
13,
327,
31,
202,
202,
2938,
18,
19972,
18,
4861,
12,
2211,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return 0; } | return 0; } | public int AVGPRICE_Lookback() { return 0; } | 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,
509,
432,
9266,
7698,
1441,
67,
9794,
823,
1435,
288,
202,
202,
2463,
374,
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,... | [
1,
1,
1,
1,
1,
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,
509,
432,
9266,
7698,
1441,
67,
9794,
823,
1435,
288,
202,
202,
2463,
374,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
while (rs.next()) { Timestamp eventDate = rs.getTimestamp(1); long countA = rs.getLong(3) - rs.getLong(2); long countB = rs.getLong(2); long eventStart = (eventDate.getTime() / MINUTE_INTERVAL) * MINUTE_INTERVAL; long realStart = eventStart < startMinuteInMillis ? (long) 0 : eventStart - startMinuteInMillis; int startInterval = (int)(realStart / MINUTE_INTERVAL)/MINUTES_PER_BUCKET; | Timestamp eventDate; long countA; long countB; long eventStart; long realStart; int startInterval; int bucket; | protected JFreeChart doChart(Connection con) throws JRScriptletException, SQLException { final int seriesA = 0; // datasetA (primary, first) final int seriesB = 1; // datasetB //final int seriesC = 2; // datasetC TimeSeries datasetA = new TimeSeries(seriesATitle, Minute.class); TimeSeries datasetB = new TimeSeries(seriesBTitle, Minute.class); //TimeSeries datasetC = new TimeSeries(seriesCTitle, Minute.class); final int BUCKETS = 1440 / MINUTES_PER_BUCKET; // TRUNCATE TIME TO MINUTES, COMPUTE NUMBER OF QUERIES long startMinuteInMillis = (startDate.getTime() / MINUTE_INTERVAL) * MINUTE_INTERVAL; long endMinuteInMillis = (endDate.getTime() / MINUTE_INTERVAL) * MINUTE_INTERVAL; long periodMillis = endMinuteInMillis - startMinuteInMillis; int periodMinutes = (int)(periodMillis / MINUTE_INTERVAL); int queries = periodMinutes/(BUCKETS*MINUTES_PER_BUCKET) + (periodMinutes%(BUCKETS*MINUTES_PER_BUCKET)>0?1:0); int periodBuckets = periodMinutes/(MINUTES_PER_BUCKET) + (periodMinutes%(MINUTES_PER_BUCKET)>0?1:0); System.out.println("====== START ======"); System.out.println("start: " + (new Timestamp(startMinuteInMillis)).toString() ); System.out.println("end: " + (new Timestamp(endMinuteInMillis)).toString() ); System.out.println("mins: " + periodMinutes); System.out.println("days: " + queries); System.out.println("==================="); // ALLOCATE COUNTS int size; if( periodMinutes >= BUCKETS*MINUTES_PER_BUCKET ) size = BUCKETS; else size = periodMinutes/(BUCKETS*MINUTES_PER_BUCKET) + (periodMinutes%(BUCKETS*MINUTES_PER_BUCKET)>0?1:0); double countsA[] = new double[ size ]; double countsB[] = new double[ size ]; //double countsC[] = new double[ size ]; // SETUP TIMESTAMPS Timestamp startTimestamp, endTimestamp; startTimestamp = new Timestamp(startMinuteInMillis); endTimestamp = new Timestamp(endMinuteInMillis); totalQueryTime = System.currentTimeMillis(); String sql = "SELECT date_trunc('minute', time_stamp) as time_stamp," + " count(case blocked when true then 1 else null end), count(*)" + " FROM tr_protofilter_evt WHERE" + " time_stamp <= ? AND time_stamp >= ?" + " GROUP BY time_stamp" + " ORDER BY time_stamp"; int sidx = 1; PreparedStatement stmt = con.prepareStatement(sql); stmt.setTimestamp(sidx++, endTimestamp); stmt.setTimestamp(sidx++, startTimestamp); ResultSet rs = stmt.executeQuery(); totalQueryTime = System.currentTimeMillis() - totalQueryTime; totalProcessTime = System.currentTimeMillis(); // PROCESS EACH ROW while (rs.next()) { // GET RESULTS Timestamp eventDate = rs.getTimestamp(1); long countA = rs.getLong(3) - rs.getLong(2); long countB = rs.getLong(2); //long countC = rs.getLong(3); // ALLOCATE COUNT TO EACH MINUTE WE WERE ALIVE EQUALLY long eventStart = (eventDate.getTime() / MINUTE_INTERVAL) * MINUTE_INTERVAL; long realStart = eventStart < startMinuteInMillis ? (long) 0 : eventStart - startMinuteInMillis; int startInterval = (int)(realStart / MINUTE_INTERVAL)/MINUTES_PER_BUCKET; // COMPUTE COUNTS IN INTERVALS countsA[startInterval%BUCKETS] += countA; countsB[startInterval%BUCKETS] += countB; //countsC[startInterval%BUCKETS] += countC; } try { stmt.close(); } catch (SQLException x) { } // POST PROCESS: PRODUCE UNITS OF KBytes/sec., AVERAGED PER DAY, FROM BYTES PER BUCKET double averageACount; double averageBCount; //double averageCCount; for(int i = 0; i < size; i++) { // MOVING AVERAGE averageACount = 0; averageBCount = 0; //averageCCount = 0; int newIndex = 0; int denom = 0; for(int j=0; j<MOVING_AVERAGE_MINUTES; j++){ newIndex = i-j; if( newIndex >= 0 ) denom++; else continue; averageACount += countsA[newIndex] / (double)queries; averageBCount += countsB[newIndex] / (double)queries; //averageCCount += countsC[newIndex] / (double)queries; } averageACount /= denom; averageBCount /= denom; //averageCCount /= denom; java.util.Date date = new java.util.Date(startMinuteInMillis + i * MINUTE_INTERVAL * MINUTES_PER_BUCKET ); datasetA.addOrUpdate(new Minute(date), averageACount); datasetB.addOrUpdate(new Minute(date), averageBCount); //datasetC.addOrUpdate(new Minute(date), averageCCount); } totalProcessTime = System.currentTimeMillis() - totalProcessTime; System.out.println("====== RESULTS ======"); System.out.println("TOTAL query time: " + totalQueryTime/1000 + "s" + " (" + ((float)totalQueryTime/(float)(totalQueryTime+totalProcessTime)) + ")"); System.out.println("TOTAL process time: " + totalProcessTime/1000 + "s" + " (" + ((float)totalProcessTime/(float)(totalQueryTime+totalProcessTime)) + ")"); System.out.println("====================="); TimeSeriesCollection tsc = new TimeSeriesCollection(); tsc.addSeries(datasetA); tsc.addSeries(datasetB); //tsc.addSeries(datasetC); JFreeChart jfChart = ChartFactory.createTimeSeriesChart(chartTitle, timeAxisLabel, valueAxisLabel, tsc, true, true, false); XYPlot xyPlot = (XYPlot) jfChart.getPlot(); XYItemRenderer xyIRenderer = xyPlot.getRenderer(); xyIRenderer.setSeriesStroke(seriesA, new BasicStroke(1.3f)); xyIRenderer.setSeriesPaint(seriesA, Color.green); xyIRenderer.setSeriesStroke(seriesB, new BasicStroke(1.3f)); xyIRenderer.setSeriesPaint(seriesB, Color.red); //xyIRenderer.setSeriesStroke(seriesC, new BasicStroke(1.3f)); //xyIRenderer.setSeriesPaint(seriesC, Color.blue); return jfChart; } | 49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/ad2338c4283e959effa8ec881f68d13a60ceeb7a/SummaryGraph.java/clean/tran/protofilter/main/com/metavize/tran/protofilter/reports/SummaryGraph.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
804,
9194,
7984,
741,
7984,
12,
1952,
356,
13,
1216,
27974,
3651,
1810,
503,
16,
6483,
565,
288,
3639,
727,
509,
4166,
37,
273,
374,
31,
368,
3709,
37,
261,
8258,
16,
1122,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
804,
9194,
7984,
741,
7984,
12,
1952,
356,
13,
1216,
27974,
3651,
1810,
503,
16,
6483,
565,
288,
3639,
727,
509,
4166,
37,
273,
374,
31,
368,
3709,
37,
261,
8258,
16,
1122,
13,
... |
suite.addTest(ParserTest.suite()); | try { Class testClass = ClassLoader.getSystemClassLoader().loadClass("org.openscience.cdk.test.iupac.ParserTest"); suite.addTest(new TestSuite(testClass)); } catch (Exception exception) {} | public static Test suite( ) { TestSuite suite= new TestSuite("All CDK Tests"); // Package Test Suites suite.addTest(CoreClassesTests.suite()); suite.addTest(IOTests.suite()); suite.addTest(ToolsTests.suite()); // Individual Tests suite.addTest(ChemFileTest.suite()); suite.addTest(MorganNumberToolsTest.suite()); suite.addTest(RebondToolTest.suite()); suite.addTest(PathLengthTest.suite()); suite.addTest(IsomorphismTesterTest.suite()); //from cdk.test.ringsearch suite.addTest(AllRingsFinderTest.suite()); suite.addTest(RingSearchTest.suite()); // cdk.test.fingerprint suite.addTest(FingerprinterTest.suite()); // from cdk.test.layout.* suite.addTest(StructureDiagramGeneratorTest.suite()); suite.addTest(HydrogenPlacerTest.suite()); suite.addTest(OverlapResolverTest.suite()); suite.addTest(TemplateHandlerTest.suite()); // from cdk.test.smiles suite.addTest(SmilesGeneratorTest.suite()); suite.addTest(SmilesParserTest.suite()); // from cdk.test.geometry suite.addTest(GeometryToolsTest.suite()); suite.addTest(CrystalGeometryToolsTest.suite()); // from cdk.test.isomorphism suite.addTest(UniversalIsomorphismTesterTest.suite()); // from cdk.test.aromaticity suite.addTest(HueckelAromaticityDetectorTest.suite()); suite.addTest(HOSECodeTest.suite()); suite.addTest(BremserPredictorTest.suite()); // from cdk.test.structgen suite.addTest(RandomStructureGeneratorTest.suite()); // from cdk.test.iupac suite.addTest(ParserTest.suite()); return suite; } | 45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/acf3e2a96cd1ba23dd4d8637f9772ed5f11fad20/CDKTests.java/buggy/src/org/openscience/cdk/test/CDKTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
7766,
11371,
12,
262,
565,
288,
3639,
7766,
13587,
11371,
33,
394,
7766,
13587,
2932,
1595,
15257,
7766,
87,
8863,
7734,
368,
7508,
7766,
348,
89,
2997,
3639,
11371,
18,
1289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7766,
11371,
12,
262,
565,
288,
3639,
7766,
13587,
11371,
33,
394,
7766,
13587,
2932,
1595,
15257,
7766,
87,
8863,
7734,
368,
7508,
7766,
348,
89,
2997,
3639,
11371,
18,
1289,
... |
if (!(enc == null || encodings.contains(enc))) | if (!(enc == null || encodings.contains(enc))) | public static List getIDEEncodings() { List encodings = getIDEEncodingsPreference(); encodings.addAll(WorkbenchEncoding.getDefinedEncodings()); String enc = getResourceEncoding(); if (!(enc == null || encodings.contains(enc))) encodings.add(enc); Collections.sort(encodings); return encodings; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/4891f4c54ceeb1930de3a4273df47d343d58c273/IDEEncoding.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDEEncoding.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
987,
336,
10385,
25100,
899,
1435,
288,
202,
202,
682,
24118,
273,
225,
336,
10385,
25100,
899,
9624,
5621,
1082,
202,
1331,
369,
899,
18,
1289,
1595,
12,
2421,
22144,
4705... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
336,
10385,
25100,
899,
1435,
288,
202,
202,
682,
24118,
273,
225,
336,
10385,
25100,
899,
9624,
5621,
1082,
202,
1331,
369,
899,
18,
1289,
1595,
12,
2421,
22144,
4705... |
i = contained.getBindingNames().iterator(); while (i.hasNext()) { name = (String)i.next(); | i = contained.getBindingNames().iterator(); while (i.hasNext()) { name = (String)i.next(); | private void bind(IComponent container, IComponent component, ComponentSpecification spec, ContainedComponent contained, Map propertyBindings) throws PageLoaderException { Iterator i; String name; BindingSpecification bspec; IBinding binding; String bindingValue; BindingType type; boolean checkForFormal; ParameterSpecification parameterSpec; checkForFormal = !spec.getAllowInformalParameters(); i = contained.getBindingNames().iterator(); while (i.hasNext()) { name = (String)i.next(); // If not allowing informal parameters, check that each binding matches // a formal parameter. if (checkForFormal) { if (spec.getParameter(name) == null) throw new PageLoaderException( "Component " + component.getExtendedId() + " allows only formal parameters, binding " + name + " is not allowed.", this, component, null); } bspec = contained.getBinding(name); // The type determines how to interpret the value: // As a simple static String // As a nested property name (relative to the component) // As the name of a binding inherited from the containing component. type = bspec.getType(); bindingValue = bspec.getValue(); binding = convert(type, bindingValue, container, propertyBindings); if (binding != null) component.setBinding(name, binding); } // Now, check that all required parameters are bound. i = spec.getParameterNames().iterator(); while (i.hasNext()) { name = (String)i.next(); parameterSpec = spec.getParameter(name); if (parameterSpec.isRequired() && component.getBinding(name) == null) throw new PageLoaderException( "Required parameter " + name + " of component " + component.getExtendedId() + " is not bound.", this, component, null); } } | 4433 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4433/c51d8d4dd8d476478f92119536b3819c3e9980a1/PageLoader.java/buggy/framework/src/com/primix/tapestry/pageload/PageLoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1993,
12,
45,
1841,
1478,
16,
467,
1841,
1794,
16,
5435,
8615,
857,
16,
540,
1816,
8707,
1841,
7542,
16,
1635,
1272,
10497,
13,
565,
1216,
3460,
2886,
503,
565,
288,
3639,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1993,
12,
45,
1841,
1478,
16,
467,
1841,
1794,
16,
5435,
8615,
857,
16,
540,
1816,
8707,
1841,
7542,
16,
1635,
1272,
10497,
13,
565,
1216,
3460,
2886,
503,
565,
288,
3639,
44... |
String expectedExonSequence5 = "cagggcgtgcatggtcgcccaggcgaggtcggcgtggctggcttcctcgctgcggctggc" + "ctcataggtggcgctgcgtccgctgctggtcatggtcttgcggatagccataaacgagct" + "ggtgatgtcggtggcgctgacgtcgtattccagacagccacggcggataacgtcttttgc" + "cttgagcaccattgcggttttcatttccggcgtgtaaag"; | public void checkExonSequences() throws Exception { osw.flushObjectById(); ObjectStore os = osw.getObjectStore(); String expectedExonSequence0 = "tatgactgtaacgttaatagcaaagtgagtgttaataatgataaaatagcagcaaaatct" + "cttttccgagtaagacgttttccagtc"; Exon resExon0 = (Exon) os.getObjectById(storedExons[0].getId()); assertEquals(expectedExonSequence0, resExon0.getSequence().getResidues()); String expectedExonSequence4 = "caagtagtaagaaagacggatataaaaaaatagcctacagcaccccggattcccatgttg" + "tctccaaccatagtactaacgaggccctcagacgcttaactgcagtgatcggacgggaac" + "tggtgttttcgcctaggtatggccgtagacat"; Exon resExon4 = (Exon) os.getObjectById(storedExons[4].getId()); assertEquals(expectedExonSequence4, resExon4.getSequence().getResidues()); String expectedExonSequence1 = "caaaaatcttctagtttttttttagaaaggatacaccaagta"; Exon resExon1 = (Exon) os.getObjectById(storedExons[1].getId()); assertEquals(expectedExonSequence1, resExon1.getSequence().getResidues()); String expectedExonSequence2 = "gacgattgtttactttacacgccggaaatgaaaaccgcaatggtgctcaaggcaaaagac" + "gttatccgccgtggctgtctggaatacgacgtcagcgccaccgacatcaccagctcgttt" + "atggctatccgcaagaccatgaccagcagcggacgcagcgccacctatgaggccagccgc" + "agcgaggaagccagccacgccgacctcgcctgggcgaccatgcacgccctgttaaatgag" + "ccactcaccgccggtatcagcaccccgctgacatccaccattctggagttttac"; Exon resExon2 = (Exon) os.getObjectById(storedExons[2].getId()); assertEquals(expectedExonSequence2, resExon2.getSequence().getResidues()); String expectedExonSequence5 = "cagggcgtgcatggtcgcccaggcgaggtcggcgtggctggcttcctcgctgcggctggc" + "ctcataggtggcgctgcgtccgctgctggtcatggtcttgcggatagccataaacgagct" + "ggtgatgtcggtggcgctgacgtcgtattccagacagccacggcggataacgtcttttgc" + "cttgagcaccattgcggttttcatttccggcgtgtaaag"; Exon resExon5 = (Exon) os.getObjectById(storedExons[5].getId()); assertEquals(expectedExonSequence5, resExon5.getSequence().getResidues()); String expectedExonSequence3 = "accgccagcggcccgaaaatggaggcattcacctttggtgagccggtgccggtactcgac" + "cgccgtgacattctggattacgtcgagtgcatcagtaacggcagatggtatgagccaccg" + "gtcagctttaccggtctggcaaaaagcctgcgggctgccgtgcatcacagctcgccgatt" + "tacgtcaaacgcaatattctggcctcgacatttatcccgcatccatggctttcccagcag" + "gatttcagccgctttgtgctggattttctggtgttcggtaatgcgtttctggaaaagcgt" + "tacagcaccaccggtaaggtcatcagactggaaacctcaccggcaaaatatacccgccgt" + "ggcgtggaagaggatgtttactggtgggtgccgtccttcaacgagccgacagccttcgcg" + "cccggctccgtgtttcacctgctggagccggatattaatcaggagctgtacggcctgccg" + "gaatatctcagcgcccttaactctgcctggc"; Exon resExon3 = (Exon) os.getObjectById(storedExons[3].getId()); assertEquals(expectedExonSequence3, resExon3.getSequence().getResidues()); String expectedExonSequence6 = "aaggggatgcggtgcgcgtccagcaggtcagcggcgctggcttttttgatattaaaaaaa" + "tcgtccttcgtcgccacttcactgagggggataattttaatgccgtcggctttcccctgt" + "ggggca"; Exon resExon6 = (Exon) os.getObjectById(storedExons[6].getId()); assertEquals(expectedExonSequence6, resExon6.getSequence().getResidues()); String expectedExonSequence7 = "cggggaaagcactgcgcgctgacggtggtgctgattgtattttttcagcgtctcagcgcg" + "tcgtgacggcacttagtctgcccgttgaggcgttgtgtgtctgcggggtgttttgtgcgg" + "tggtgagcgtg"; Exon resExon7 = (Exon) os.getObjectById(storedExons[7].getId()); assertEquals(expectedExonSequence7, resExon7.getSequence().getResidues()); RepeatRegion resRepeatRegion0 = (RepeatRegion) os.getObjectById(storedRepeatRegions[0].getId()); assertEquals("gctatttttttatatccgtctttcttactacttgcc", resRepeatRegion0.getSequence().getResidues()); RepeatRegion resRepeatRegion1 = (RepeatRegion) os.getObjectById(storedRepeatRegions[1].getId()); assertEquals("atttttgttactgtacttgaaaatacctattataatctgtggctacaa", resRepeatRegion1.getSequence().getResidues()); RepeatRegion resRepeatRegion2 = (RepeatRegion) os.getObjectById(storedRepeatRegions[2].getId()); assertEquals("gccagaccggtaaagctgaccggtggctcataccatctgccgtta", resRepeatRegion2.getSequence().getResidues()); RepeatRegion resRepeatRegion3 = (RepeatRegion) os.getObjectById(storedRepeatRegions[3].getId()); assertEquals("tggcgacgaaggacgatttttttaatatcaaaaaagccagcgccg", resRepeatRegion3.getSequence().getResidues()); } | 29158 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/29158/cc67e167d61396f7d90ae94b352e7d3c6ca07a00/TransferSequencesTest.java/clean/flymine/model/genomic/src/test/org/flymine/postprocess/TransferSequencesTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
866,
424,
265,
21710,
1435,
1216,
1185,
288,
3639,
1140,
91,
18,
11330,
921,
5132,
5621,
3639,
1033,
2257,
1140,
273,
1140,
91,
18,
588,
921,
2257,
5621,
3639,
514,
2665,
424,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
866,
424,
265,
21710,
1435,
1216,
1185,
288,
3639,
1140,
91,
18,
11330,
921,
5132,
5621,
3639,
1033,
2257,
1140,
273,
1140,
91,
18,
588,
921,
2257,
5621,
3639,
514,
2665,
424,
... | |
result.add(createMethodCallExpressiobBlock(child,arrangeChildWrap(child, defaultWrap))); | result.add(createMethodCallExpressiobBlock(child, arrangeChildWrap(child, defaultWrap), arrangeChildAlignment(child, defaultAlignment))); | protected ASTNode processChild(final ArrayList<Block> result, ASTNode child, Alignment defaultAlignment, final Wrap defaultWrap, final Indent childIndent) { if (child.getElementType() == ElementType.METHOD_CALL_EXPRESSION) { result.add(createMethodCallExpressiobBlock(child,arrangeChildWrap(child, defaultWrap))); } else if (child.getElementType() == ElementType.ARRAY_INITIALIZER_EXPRESSION) { result.addAll(new CodeBlockBlock(child, null, null, null, mySettings).buildChildren()); } else if (child.getElementType() == ElementType.LPARENTH && myNode.getElementType() == ElementType.EXPRESSION_LIST){ final Wrap wrap = Formatter.getInstance().createWrap(getWrapType(mySettings.CALL_PARAMETERS_WRAP), false); child = processParenBlock(result, child, WrappingStrategy.createDoNotWrapCommaStrategy(wrap), mySettings.ALIGN_MULTILINE_PARAMETERS_IN_CALLS); } else if (child.getElementType() == ElementType.LPARENTH && myNode.getElementType() == ElementType.PARAMETER_LIST){ final Wrap wrap = Formatter.getInstance().createWrap(getWrapType(mySettings.METHOD_PARAMETERS_WRAP), false); child = processParenBlock(result, child, WrappingStrategy.createDoNotWrapCommaStrategy(wrap), mySettings.ALIGN_MULTILINE_PARAMETERS); } else if (child.getElementType() == ElementType.LPARENTH && myNode.getElementType() == ElementType.ANNOTATION_PARAMETER_LIST){ final Wrap wrap = Formatter.getInstance().createWrap(getWrapType(mySettings.CALL_PARAMETERS_WRAP), false); child = processParenBlock(result, child, WrappingStrategy.createDoNotWrapCommaStrategy(wrap), mySettings.ALIGN_MULTILINE_PARAMETERS_IN_CALLS); } else if (child.getElementType() == ElementType.LPARENTH && myNode.getElementType() == ElementType.PARENTH_EXPRESSION){ child = processParenBlock(result, child, WrappingStrategy.DO_NOT_WRAP, mySettings.ALIGN_MULTILINE_PARENTHESIZED_EXPRESSION); } else if (child.getElementType() == ElementType.ENUM_CONSTANT && myNode instanceof ClassElement) { child = processEnumBlock(result, child, ((ClassElement)myNode).findEnumConstantListDelimiterPlace()); } else { final Block block = createJavaBlock(child, mySettings, childIndent, arrangeChildWrap(child, defaultWrap), arrangeChildAlignment(child, defaultAlignment)); if (child.getElementType() == ElementType.MODIFIER_LIST && containsAnnotations(child)) { myAnnotationWrap = Formatter.getInstance().createWrap(getWrapType(getAnnotationWrapType()), true); } if (block instanceof AbstractJavaBlock) { final AbstractJavaBlock javaBlock = ((AbstractJavaBlock)block); if (myNode.getElementType() == ElementType.METHOD_CALL_EXPRESSION && child.getElementType() == ElementType.REFERENCE_EXPRESSION) { javaBlock.setReservedWrap(getReservedWrap()); } else if (myNode.getElementType() == ElementType.REFERENCE_EXPRESSION && child.getElementType() == ElementType.METHOD_CALL_EXPRESSION) { javaBlock.setReservedWrap(getReservedWrap()); } else if (myNode.getElementType() == ElementType.BINARY_EXPRESSION) { javaBlock.setReservedWrap(defaultWrap); } else if (child.getElementType() == ElementType.MODIFIER_LIST) { javaBlock.setReservedWrap(myAnnotationWrap); if (!lastChildIsAnnotation(child)) { myAnnotationWrap = null; } } } result.add(block); } return child; } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/207014b752f80bd8abc14540f41b5cfccca4d19e/AbstractJavaBlock.java/clean/source/com/intellij/psi/formatter/java/AbstractJavaBlock.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
9183,
907,
1207,
1763,
12,
6385,
2407,
32,
1768,
34,
563,
16,
4766,
9183,
907,
1151,
16,
4766,
17804,
805,
11535,
16,
4766,
727,
4266,
805,
2964,
16,
4766,
727,
28653,
1151,
7790,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9183,
907,
1207,
1763,
12,
6385,
2407,
32,
1768,
34,
563,
16,
4766,
9183,
907,
1151,
16,
4766,
17804,
805,
11535,
16,
4766,
727,
4266,
805,
2964,
16,
4766,
727,
28653,
1151,
7790,
... |
if (DEBUG) System.out.println(id + ": Removing " + used[i]); | if (DEBUG) System.out.println("Removing " + used[i]); | public static void main(String[] args) { if (DEBUG) FormatReader.debug = true; Vector files = new Vector(); if (args == null || args.length == 0) { System.out.println( "Please specify root folder to search for data files."); System.exit(1); } System.out.print("Building file list..."); if (DEBUG) System.out.println(); getFiles(args[0], files); System.out.println(files.size() + " found."); while (files.size() > 0) { String id = (String) files.get(0); String pattern = FilePattern.findPattern(new File(id)); System.out.println("Testing " + pattern); TestResult result = new TestResult(); TestSuite suite = suite(id); suite.run(result); int total = result.runCount(); int failed = result.failureCount(); float failPercent = (float) (100 * ((double) failed / (double) total)); System.out.println(id + " - " + failed + " failures in " + total + " tests (" + failPercent + "% failed)"); // remove files part of the just-tested dataset from the list ReaderTest test = (ReaderTest) suite.testAt(0); String[] used = test.getUsedFiles(); for (int i=0; i<used.length; i++) { if (DEBUG) System.out.println(id + ": Removing " + used[i]); files.removeElement(used[i]); } } } | 55415 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55415/75ac97ecc6e2dd0070888da5125ea467f5757197/ReaderTest.java/buggy/loci/formats/test/ReaderTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
565,
309,
261,
9394,
13,
4077,
2514,
18,
4148,
273,
638,
31,
565,
5589,
1390,
273,
394,
5589,
5621,
1377,
309,
261,
1968,
422,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
565,
309,
261,
9394,
13,
4077,
2514,
18,
4148,
273,
638,
31,
565,
5589,
1390,
273,
394,
5589,
5621,
1377,
309,
261,
1968,
422,
446,
... |
int[] newStack = new int[stack.length << 1]; System.arraycopy(stack, 0, newStack, 0, stack.length); stack = newStack; } | int[] newStack = new int[stack.length << 1]; System.arraycopy(stack, 0, newStack, 0, stack.length); stack = newStack; } | private void grow() { int[] newStack = new int[stack.length << 1]; System.arraycopy(stack, 0, newStack, 0, stack.length); stack = newStack; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/c4c31b724fe73e8f69d2d4f9fcd98d3ff359a2d3/GNUCPPSourceParser.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1152,
918,
13334,
1435,
288,
1082,
202,
474,
8526,
394,
2624,
273,
394,
509,
63,
3772,
18,
2469,
2296,
404,
15533,
1082,
202,
3163,
18,
1126,
3530,
12,
3772,
16,
374,
16,
394,
262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3196,
202,
1152,
918,
13334,
1435,
288,
1082,
202,
474,
8526,
394,
2624,
273,
394,
509,
63,
3772,
18,
2469,
2296,
404,
15533,
1082,
202,
3163,
18,
1126,
3530,
12,
3772,
16,
374,
16,
394,
262... |
itemStateMgr.addVirtualItemStateProvider( new VirtualNodeTypeStateProvider(ntReg, NODETYPES_NODE_UUID, SYSTEM_ROOT_NODE_UUID) ); | itemStateMgr.addVirtualItemStateProvider(virtNTMgr.getVirtualItemStateProvider()); | synchronized SharedItemStateManager getItemStateProvider() throws RepositoryException { if (itemStateMgr == null) { // create item state manager try { itemStateMgr = new SharedItemStateManager(getPersistenceManager(config.getPersistenceManagerConfig()), rootNodeUUID, ntReg); try { itemStateMgr.addVirtualItemStateProvider(vMgr.getVirtualItemStateProvider(itemStateMgr)); itemStateMgr.addVirtualItemStateProvider( new VirtualNodeTypeStateProvider(ntReg, NODETYPES_NODE_UUID, SYSTEM_ROOT_NODE_UUID) ); } catch (Exception e) { log.error("Unable to add vmgr: " + e.toString(), e); } } catch (ItemStateException ise) { String msg = "failed to instantiate persistent item state manager"; log.debug(msg); throw new RepositoryException(msg, ise); } } return itemStateMgr; } | 49304 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49304/e3e93ca2204de21324b4a0f38d6ffd8d44ea9d70/RepositoryImpl.java/clean/src/java/org/apache/jackrabbit/core/RepositoryImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3852,
10314,
1180,
1119,
1318,
8143,
1119,
2249,
1435,
7734,
1216,
13367,
288,
5411,
309,
261,
1726,
1119,
9455,
422,
446,
13,
288,
7734,
368,
752,
761,
919,
3301,
7734,
775,
288,
10792,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3852,
10314,
1180,
1119,
1318,
8143,
1119,
2249,
1435,
7734,
1216,
13367,
288,
5411,
309,
261,
1726,
1119,
9455,
422,
446,
13,
288,
7734,
368,
752,
761,
919,
3301,
7734,
775,
288,
10792,
... |
public Box createBox(Context c, Node node) { BlockBox block = new BlockBox(); block.node = node; return block; } | 52947 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52947/07ab625b03cad242caa27ac48e830592130b24a1/BoxLayout.java/buggy/src/java/org/joshy/html/BoxLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
3514,
2640,
3514,
12,
1042,
71,
16,
50,
369,
20680,
15329,
1768,
3514,
2629,
33,
2704,
1768,
3514,
5621,
2629,
18,
2159,
33,
2159,
31,
2463,
2629,
31,
97,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
3514,
2640,
3514,
12,
1042,
71,
16,
50,
369,
20680,
15329,
1768,
3514,
2629,
33,
2704,
1768,
3514,
5621,
2629,
18,
2159,
33,
2159,
31,
2463,
2629,
31,
97,
2,
-100,
-100,
-100,
-100,
-1... | ||
reportErrorMessage(msg, ex.sourceName(), ex.lineNumber(), ex.lineSource(), ex.columnNumber(), false); | er.error(msg, ex.sourceName(), ex.lineNumber(), ex.lineSource(), ex.columnNumber()); | public void reportException(RhinoException ex) { if (ex instanceof WrappedException) { WrappedException we = (WrappedException)ex; we.printStackTrace(err); } else { String msg = getExceptionMessage(ex); reportErrorMessage(msg, ex.sourceName(), ex.lineNumber(), ex.lineSource(), ex.columnNumber(), false); } } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/b16bf0fa43a29881dfe8132bcad7227d97b161ae/ToolErrorReporter.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/ToolErrorReporter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2605,
503,
12,
54,
76,
15020,
503,
431,
13,
565,
288,
3639,
309,
261,
338,
1276,
24506,
503,
13,
288,
5411,
24506,
503,
732,
273,
261,
17665,
503,
13,
338,
31,
5411,
732,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2605,
503,
12,
54,
76,
15020,
503,
431,
13,
565,
288,
3639,
309,
261,
338,
1276,
24506,
503,
13,
288,
5411,
24506,
503,
732,
273,
261,
17665,
503,
13,
338,
31,
5411,
732,
1... |
ArrayDesign arrayDesign = (ArrayDesign)this.eeService.getArrayDesignsUsed(ee).iterator().next(); TechnologyType techType = arrayDesign.getTechnologyType(); if(techType.equals(TechnologyTypeEnum.TWOCOLOR)|| techType.equals(TechnologyType.DUALMODE) ){ /***Apply for two color missing value filtered*/ if ( minPresentFractionIsSet ) { /* | ArrayDesign arrayDesign = ( ArrayDesign ) this.eeService.getArrayDesignsUsed( ee ).iterator().next(); TechnologyType techType = arrayDesign.getTechnologyType(); if ( techType.equals( TechnologyTypeEnum.TWOCOLOR ) || techType.equals( TechnologyType.DUALMODE ) ) { /** *Apply for two color missing value filtered */ if ( minPresentFractionIsSet ) { /* * log.info( "Filtering out genes that are missing too many values" ); RowMissingFilter x = new * RowMissingFilter(); x.setMinPresentFraction( minPresentFraction ); */ r = ( DoubleMatrixNamed ) missingValueFilter( dataMatrix, eeDoubleMatrix, ee ); } } if ( techType.equals( TechnologyTypeEnum.ONECOLOR ) ) { if ( minPresentFractionIsSet ) { | private DoubleMatrixNamed filter(DoubleMatrixNamed dataMatrix, ExpressionDataDoubleMatrix eeDoubleMatrix, ExpressionExperiment ee) { /********Check the array design technology to choose the filter****/ DoubleMatrixNamed r = dataMatrix; if(r == null) return r; log.info( "Data set has " + r.rows() + " rows and " + r.columns() + " columns." ); ArrayDesign arrayDesign = (ArrayDesign)this.eeService.getArrayDesignsUsed(ee).iterator().next(); TechnologyType techType = arrayDesign.getTechnologyType(); if(techType.equals(TechnologyTypeEnum.TWOCOLOR)|| techType.equals(TechnologyType.DUALMODE) ){ /***Apply for two color missing value filtered*/ if ( minPresentFractionIsSet ) { /* log.info( "Filtering out genes that are missing too many values" ); RowMissingFilter x = new RowMissingFilter(); x.setMinPresentFraction( minPresentFraction ); */ r = ( DoubleMatrixNamed ) missingValueFilter( dataMatrix,eeDoubleMatrix, ee); } } if(techType.equals(TechnologyTypeEnum.ONECOLOR)){ if ( minPresentFractionIsSet ) { log.info( "Filtering out genes that are missing too many values" ); RowMissingFilter x = new RowMissingFilter(); x.setMinPresentFraction( minPresentFraction ); r = (DoubleMatrixNamed)x.filter(r); } if ( lowExpressionCutIsSet ) { // todo: make sure this works with ratiometric data. Make sure we don't do this // as well as affy filtering. log.info( "Filtering out genes with low expression for " + ee.getShortName() ); RowLevelFilter x = new RowLevelFilter(); x.setLowCut( this.lowExpressionCut ); x.setHighCut(this.highExpressionCut); x.setRemoveAllNegative( true ); // todo: fix x.setUseAsFraction( true ); r = ( DoubleMatrixNamed ) x.filter( r ); } if(arrayDesign.getName().toUpperCase().contains("AFFYMETRIX")){ log.info( "Filtering by Affymetrix probe name for " + ee.getShortName()); Filter x = new AffymetrixProbeNameFilter(new int[] { 2 } ); r = ( DoubleMatrixNamed ) x.filter( r ); } } return r; } | 4335 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4335/b9b9d62fe790e9f0c01d4b980689e928b022c035/LinkAnalysisCli.java/buggy/gemma-core/src/main/java/ubic/gemma/apps/LinkAnalysisCli.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
25495,
7604,
1034,
12,
5265,
4635,
7604,
501,
4635,
16,
5371,
751,
5265,
4635,
14657,
5265,
4635,
16,
5371,
22338,
14657,
13,
288,
377,
202,
19,
1644,
1564,
326,
526,
8281,
17734,
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,
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,
25495,
7604,
1034,
12,
5265,
4635,
7604,
501,
4635,
16,
5371,
751,
5265,
4635,
14657,
5265,
4635,
16,
5371,
22338,
14657,
13,
288,
377,
202,
19,
1644,
1564,
326,
526,
8281,
17734,
4... |
typesToSearch.addAll(selectedTypes); | typesToSearch.addAll(selectedTypes); | private List findMarkers(IResource[] resources, int depth, int limit, IProgressMonitor mon, boolean ignoreExceptions) throws CoreException { if (resources == null) { return Collections.EMPTY_LIST; } List resultList = new ArrayList(resources.length * 2); // Optimization: if a type appears in the selectedTypes list along with all of its // subtypes, then combine these in a single search. // List of types that haven't been replaced by one of their supertypes HashSet typesToSearch = new HashSet(selectedTypes.size()); // List of types that appeared in selectedTypes along with all of their subtypes HashSet includeAllSubtypes = new HashSet(selectedTypes.size()); typesToSearch.addAll(selectedTypes); Iterator iter = selectedTypes.iterator(); while (iter.hasNext()) { MarkerType type = (MarkerType) iter.next(); Collection subtypes = Arrays.asList(type.getAllSubTypes()); if (selectedTypes.containsAll(subtypes)) { typesToSearch.removeAll(subtypes); includeAllSubtypes.add(type); } } mon .beginTask( Messages.getString("MarkerFilter.searching"), typesToSearch.size() * resources.length); //$NON-NLS-1$ // Use this hash set to determine if there are any resources in the // list that appear along with their parent. HashSet resourcesToSearch = new HashSet(); // Insert all the resources into the hashset for (int idx = 0; idx < resources.length; idx++) { IResource next = resources[idx]; if (!next.exists()) { continue; } if (resourcesToSearch.contains(next)) { mon.worked(typesToSearch.size()); } else { resourcesToSearch.add(next); } } // Iterate through all the selected resources for (int resourceIdx = 0; resourceIdx < resources.length; resourceIdx++) { iter = typesToSearch.iterator(); IResource resource = resources[resourceIdx]; // Skip resources that don't exist if (!resource.isAccessible()) { continue; } if (depth == IResource.DEPTH_INFINITE) { // Determine if any parent of this resource is also in our filter IResource parent = resource.getParent(); boolean found = false; while (parent != null) { if (resourcesToSearch.contains(parent)) { found = true; } parent = parent.getParent(); } // If a parent of this resource is also in the filter, we can skip it // because we'll pick up its markers when we search the parent. if (found) { continue; } } // Iterate through all the marker types while (iter.hasNext()) { MarkerType markerType = (MarkerType) iter.next(); // Only search for subtypes of the marker if we found all of its // subtypes in the filter criteria. IMarker[] markers = resource.findMarkers(markerType.getId(), includeAllSubtypes.contains(markerType), depth); mon.worked(1); for (int idx = 0; idx < markers.length; idx++) { ConcreteMarker marker; try { marker = MarkerList.createMarker(markers[idx]); } catch (CoreException e) { if (ignoreExceptions) { continue; } else { throw e; } } if (limit != -1 && resultList.size() >= limit) { return resultList; } if (selectMarker(marker)) { resultList.add(marker); } } } } mon.done(); return resultList; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/1ceb585b9b16047c6c580984b0c9962c41a22ba6/MarkerFilter.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
987,
1104,
21644,
12,
45,
1420,
8526,
2703,
16,
509,
3598,
16,
509,
1800,
16,
5411,
467,
5491,
7187,
6921,
16,
1250,
2305,
11416,
13,
5411,
1216,
30015,
288,
3639,
309,
261,
4683,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
987,
1104,
21644,
12,
45,
1420,
8526,
2703,
16,
509,
3598,
16,
509,
1800,
16,
5411,
467,
5491,
7187,
6921,
16,
1250,
2305,
11416,
13,
5411,
1216,
30015,
288,
3639,
309,
261,
4683,
... |
xmlObj = null; | xmlObj = firstXmlObject; | public Reference xmlPrimaryReference(Object nameObject, Scriptable scope) { if (!(nameObject instanceof XMLName)) throw new IllegalArgumentException(); XMLName xmlName = (XMLName)nameObject; XMLObjectImpl xmlObj; for (;;) { // XML object can only present on scope chain as a wrapper // of XMLWithScope if (scope instanceof XMLWithScope) { xmlObj = (XMLObjectImpl)scope.getPrototype(); if (xmlObj.hasXMLProperty(xmlName)) { break; } } scope = scope.getParentScope(); if (scope == null) { xmlObj = null; break; } } // xmlName == null corresponds to undefined return new XMLReference(xmlObj, xmlName); } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/1f3b183f246d54ee92c6be71ea3974912eca5058/XMLLibImpl.java/buggy/js/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLLibImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6268,
2025,
6793,
2404,
12,
921,
508,
921,
16,
22780,
2146,
13,
565,
288,
3639,
309,
16051,
12,
529,
921,
1276,
3167,
461,
3719,
5411,
604,
394,
2754,
5621,
3639,
3167,
461,
2025,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6268,
2025,
6793,
2404,
12,
921,
508,
921,
16,
22780,
2146,
13,
565,
288,
3639,
309,
16051,
12,
529,
921,
1276,
3167,
461,
3719,
5411,
604,
394,
2754,
5621,
3639,
3167,
461,
2025,
... |
try { Iterator i = matchers.iterator(); while (i.hasNext()) { ((InvocationMatcher)i.next()).verify(); } } catch (AssertionFailedError error) { AssertionFailedError newError = new AssertionFailedError(error.getMessage() + ": " + toString()); newError.fillInStackTrace(); throw newError; } } | try { Iterator i = matchers.iterator(); while (i.hasNext()) { ((InvocationMatcher)i.next()).verify(); } } catch (AssertionFailedError error) { AssertionFailedError newError = new AssertionFailedError(error.getMessage() + ": " + toString()); newError.fillInStackTrace(); throw newError; } } | public void verify() { try { Iterator i = matchers.iterator(); while (i.hasNext()) { ((InvocationMatcher)i.next()).verify(); } } catch (AssertionFailedError error) { AssertionFailedError newError = new AssertionFailedError(error.getMessage() + ": " + toString()); newError.fillInStackTrace(); throw newError; } } | 57371 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57371/c26c57f3ac4851e6bc9c5df8515ac73f4045eebf/InvocationMocker.java/buggy/jmock/core/src/org/jmock/core/InvocationMocker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3929,
1435,
288,
202,
202,
698,
288,
1082,
202,
3198,
277,
273,
17609,
18,
9838,
5621,
1082,
202,
17523,
261,
77,
18,
5332,
2134,
10756,
288,
9506,
202,
12443,
9267,
6286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3929,
1435,
288,
202,
202,
698,
288,
1082,
202,
3198,
277,
273,
17609,
18,
9838,
5621,
1082,
202,
17523,
261,
77,
18,
5332,
2134,
10756,
288,
9506,
202,
12443,
9267,
6286,
... |
if (dp > bp && da[dp-1] == '\\') return null; | if (dp > bp && da[dp-1] == '\\') return null; | static SubString interpretDollar(RegExpImpl res, char[] da, int dp, int bp, int[] skip) { Context cx = Context.getCurrentContext(); char[] ca; int cp; char dc; int num, tmp; /* Allow a real backslash (literal "\\") to escape "$1" etc. */ if (da[dp] != '$') throw new RuntimeException(); if ((cx.getLanguageVersion() != Context.VERSION_DEFAULT) && (cx.getLanguageVersion() <= Context.VERSION_1_4)) if (dp > bp && da[dp-1] == '\\') return null; /* Interpret all Perl match-induced dollar variables. */ dc = da[dp+1]; if (NativeRegExp.isDigit(dc)) { if ((cx.getLanguageVersion() != Context.VERSION_DEFAULT) && (cx.getLanguageVersion() <= Context.VERSION_1_4)) { if (dc == '0') return null; /* Check for overflow to avoid gobbling arbitrary decimal digits. */ num = 0; ca = da; cp = dp; while (++cp < ca.length && NativeRegExp.isDigit(dc = ca[cp])) { tmp = 10 * num + NativeRegExp.unDigit(dc); if (tmp < num) break; num = tmp; } } else { /* ECMA 3, 1-9 or 01-99 */ num = NativeRegExp.unDigit(dc); cp = dp + 2; if ((dp + 2) < da.length) { dc = da[dp + 2]; if (NativeRegExp.isDigit(dc)) { num = 10 * num + NativeRegExp.unDigit(dc); cp++; } } if (num == 0) return null; /* $0 or $00 is not valid */ } /* Adjust num from 1 $n-origin to 0 array-index-origin. */ num--; skip[0] = cp - dp; return res.getParenSubString(num); } skip[0] = 2; switch (dc) { case '$': return dollarStr; case '&': return res.lastMatch; case '+': return res.lastParen; case '`': if (cx.getLanguageVersion() == Context.VERSION_1_2) { /* * JS1.2 imitated the Perl4 bug where left context at each step * in an iterative use of a global regexp started from last match, * not from the start of the target string. But Perl4 does start * $` at the beginning of the target string when it is used in a * substitution, so we emulate that special case here. */ res.leftContext.index = 0; res.leftContext.length = res.lastMatch.index; } return res.leftContext; case '\'': return res.rightContext; } return null; } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/8b34980fb3adc3beae5bcea5913d426dc2e366c8/RegExpImpl.java/buggy/js/rhino/src/org/mozilla/javascript/regexp/RegExpImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
2592,
780,
10634,
40,
25442,
12,
13673,
2828,
400,
16,
1149,
8526,
5248,
16,
509,
9986,
16,
19694,
509,
9107,
16,
509,
8526,
2488,
13,
565,
288,
3639,
1772,
9494,
273,
1772,
18,
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,
377,
760,
2592,
780,
10634,
40,
25442,
12,
13673,
2828,
400,
16,
1149,
8526,
5248,
16,
509,
9986,
16,
19694,
509,
9107,
16,
509,
8526,
2488,
13,
565,
288,
3639,
1772,
9494,
273,
1772,
18,
58... |
super.setActive(value); if (coolBarMgr != null) coolBarMgr.setVisible(value); } | super.setActive(value); if (coolBarMgr != null) coolBarMgr.setVisible(value); } | protected void setActive(boolean value) { super.setActive(value); if (coolBarMgr != null) coolBarMgr.setVisible(value); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/f1c8b0aa355c00a6c82a289c808984de6778bfca/SubActionBars2.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/SubActionBars2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
20669,
12,
6494,
460,
13,
288,
3639,
2240,
18,
542,
3896,
12,
1132,
1769,
3639,
309,
261,
71,
1371,
5190,
9455,
480,
446,
13,
5411,
27367,
5190,
9455,
18,
542,
6207,
12,
1132... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
377,
4750,
918,
20669,
12,
6494,
460,
13,
288,
3639,
2240,
18,
542,
3896,
12,
1132,
1769,
3639,
309,
261,
71,
1371,
5190,
9455,
480,
446,
13,
5411,
27367,
5190,
9455,
18,
542,
6207,
12,
1132... |
for (int i = 0; i < areas.length; i++) { IMemento area = areas[i]; int id = Integer.parseInt(area.getID()); defaultLayout.updateAreaTrim(id, trimOrder[i], false); } trimMgr.updateLocations(knownIds); | private IStatus restoreTrimState(IMemento memento) { if (memento == null) { return Status.OK_STATUS; } // first pass sets up ordering for all trim areas IMemento[] areas = memento .getChildren(IWorkbenchConstants.TAG_TRIM_AREA); // We need to remember all the trim that was repositioned // here so we can re-site -newly contributed- trim after // we're done List knownIds = new ArrayList(); List[] trimOrder = new List[areas.length]; for (int i = 0; i < areas.length; i++) { trimOrder[i] = new ArrayList(); IMemento area = areas[i]; IMemento[] items = area .getChildren(IWorkbenchConstants.TAG_TRIM_ITEM); for (int j = 0; j < items.length; j++) { IMemento item = items[j]; knownIds.add(item.getID()); IWindowTrim t = defaultLayout.getTrim(item.getID()); if (t != null) { trimOrder[i].add(t); } } } // second pass applies all of the window trim for (int i = 0; i < areas.length; i++) { IMemento area = areas[i]; int id = Integer.parseInt(area.getID()); defaultLayout.updateAreaTrim(id, trimOrder[i], false); } // get the trim manager to re-locate any -newly contributed- // trim widgets trimMgr.updateLocations(knownIds); return Status.OK_STATUS; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/ba4a25a8c0549bd006e0c2ff15fab4cd6be6ffda/WorkbenchWindow.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
467,
1482,
5217,
14795,
1119,
12,
3445,
820,
83,
312,
820,
83,
13,
288,
202,
202,
430,
261,
81,
820,
83,
422,
446,
13,
288,
1082,
202,
2463,
2685,
18,
3141,
67,
8608,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
467,
1482,
5217,
14795,
1119,
12,
3445,
820,
83,
312,
820,
83,
13,
288,
202,
202,
430,
261,
81,
820,
83,
422,
446,
13,
288,
1082,
202,
2463,
2685,
18,
3141,
67,
8608,
31,
... | |
this.toggleButton = null; | public Card(String imageFile) { this.imageFile = imageFile; this.toggleButton = null; this.isMatched = false; } | 7874 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7874/5fbb1024ee61efd06c3896e14858efe0fd66db55/Card.java/buggy/demo/jsapi/cardmatch/Card.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
14338,
12,
780,
31146,
13,
288,
3639,
333,
18,
2730,
812,
273,
31146,
31,
9079,
333,
18,
291,
15400,
273,
629,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
14338,
12,
780,
31146,
13,
288,
3639,
333,
18,
2730,
812,
273,
31146,
31,
9079,
333,
18,
291,
15400,
273,
629,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
System.err.print("; avg. time "); TimeRenderer.printTime(execTime / commandCount, System.err); System.err.println("; " + (1000 * commandCount / execTime) + " per second"); | if (commandCount != 0) { System.err.print("; avg. time "); TimeRenderer.printTime(execTime / commandCount, System.err); } if (execTime != 0 && commandCount > 0) { System.err.print("; " + (1000 * commandCount / execTime) + " per second"); } System.err.println(); | public int execute(SQLSession session, String command) { StringTokenizer st = new StringTokenizer(command); st.nextElement(); // remove load. int argc = st.countTokens(); if (argc != 1) { return SYNTAX_ERROR; } long startTime = System.currentTimeMillis(); int commandCount = 0; HenPlus henplus = HenPlus.getInstance(); try { henplus.pushBuffer(); File f = new File((String) st.nextElement()); System.err.println(f.getName()); BufferedReader reader = new BufferedReader(new FileReader(f)); String line; while ((line = reader.readLine()) != null) { if (henplus.addLine(line) == HenPlus.LINE_EXECUTED) { ++commandCount; } } } catch (Exception e) { System.err.println(e.getMessage()); return EXEC_FAILED; } finally { henplus.popBuffer(); // no open state .. } long execTime = System.currentTimeMillis() - startTime; System.err.print(commandCount + " commands in "); TimeRenderer.printTime(execTime, System.err); System.err.print("; avg. time "); TimeRenderer.printTime(execTime / commandCount, System.err); System.err.println("; " + (1000 * commandCount / execTime) + " per second"); return SUCCESS; } | 49725 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49725/a55bc81542cebbe661a27339222ddcd430d202d7/LoadCommand.java/buggy/src/henplus/commands/LoadCommand.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
1836,
12,
3997,
2157,
1339,
16,
514,
1296,
13,
288,
202,
780,
10524,
384,
273,
394,
16370,
12,
3076,
1769,
202,
334,
18,
4285,
1046,
5621,
368,
1206,
1262,
18,
202,
474,
1501... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
1836,
12,
3997,
2157,
1339,
16,
514,
1296,
13,
288,
202,
780,
10524,
384,
273,
394,
16370,
12,
3076,
1769,
202,
334,
18,
4285,
1046,
5621,
368,
1206,
1262,
18,
202,
474,
1501... |
if(newSize100k == 0) { | if (newSize100k == 0) { | private void setDecompressStructureSizes(int newSize100k) { if (! (0 <= newSize100k && newSize100k <= 9 && 0 <= blockSize100k && blockSize100k <= 9)) { // throw new IOException("Invalid block size"); } blockSize100k = newSize100k; if(newSize100k == 0) { return; } int n = baseBlockSize * newSize100k; ll8 = new char[n]; tt = new int[n]; } | 17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/0dab862ee09d706c3f373fc18bedbf17caf427b9/CBZip2InputStream.java/clean/src/main/org/apache/tools/bzip2/CBZip2InputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
444,
17731,
1028,
6999,
11923,
12,
474,
21402,
6625,
79,
13,
288,
3639,
309,
16051,
261,
20,
1648,
21402,
6625,
79,
597,
21402,
6625,
79,
1648,
2468,
597,
374,
1648,
13766,
662... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
17731,
1028,
6999,
11923,
12,
474,
21402,
6625,
79,
13,
288,
3639,
309,
16051,
261,
20,
1648,
21402,
6625,
79,
597,
21402,
6625,
79,
1648,
2468,
597,
374,
1648,
13766,
662... |
super (limit >> 2, limit >> 2, position >> 2, mark >> 2); | super (capacity, capacity, 0, -1); | public IntViewBufferImpl (ByteBuffer bb, int offset, int capacity, int limit, int position, int mark, boolean readOnly, ByteOrder endian) { super (limit >> 2, limit >> 2, position >> 2, mark >> 2); this.bb = bb; this.offset = offset; this.readOnly = readOnly; this.endian = endian; } | 1043 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1043/e88045708e1899ddaec5c5597476cbd3efd39266/IntViewBufferImpl.java/buggy/libjava/java/nio/IntViewBufferImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3094,
1767,
1892,
2828,
261,
12242,
7129,
16,
509,
1384,
16,
509,
7519,
16,
9506,
565,
509,
1800,
16,
509,
1754,
16,
509,
2267,
16,
9506,
565,
1250,
15075,
16,
30845,
14759,
13,
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,
282,
1071,
3094,
1767,
1892,
2828,
261,
12242,
7129,
16,
509,
1384,
16,
509,
7519,
16,
9506,
565,
509,
1800,
16,
509,
1754,
16,
509,
2267,
16,
9506,
565,
1250,
15075,
16,
30845,
14759,
13,
2... |
public void remove() { if (parent != null) { parent.remove(getPathElement()); | public Element remove(Path.PathElement nameIndex) { int index = getOneBasedIndex(nameIndex) - 1; if (children != null) { ArrayList list = (ArrayList) children.get(nameIndex.getName()); if (list != null && list.size() > index) { for (int i = index + 1; i < list.size(); i++) { Element element = (Element) list.get(i); if (element != null) { element.index--; } } Element element = (Element) list.remove(index); if (element != null) { element.parent = null; childrenCount--; } if (childrenCount == 0 && obj == null) { remove(); } return element; } | public void remove() { if (parent != null) { parent.remove(getPathElement()); } } | 48761 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48761/ab9a875cdd1176714ce1fbbe00c8a9991e12b210/PathMap.java/clean/core/src/java/org/apache/jackrabbit/core/PathMap.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1206,
1435,
288,
5411,
309,
261,
2938,
480,
446,
13,
288,
7734,
982,
18,
4479,
12,
588,
743,
1046,
10663,
5411,
289,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1206,
1435,
288,
5411,
309,
261,
2938,
480,
446,
13,
288,
7734,
982,
18,
4479,
12,
588,
743,
1046,
10663,
5411,
289,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
REBackTrackData result; if (gData.backTrackStackTop == gData.maxBackTrack) { gData.maxBackTrack <<= 1; REBackTrackData[] newStack = new REBackTrackData[gData.maxBackTrack]; for (int i = 0; i < gData.backTrackStackTop; i++) newStack[i] = gData.backTrackStack[i]; for (int i = gData.backTrackStackTop; i < gData.maxBackTrack; i++) newStack[i] = new REBackTrackData(x); gData.backTrackStack = newStack; } result = new REBackTrackData(x); gData.backTrackStack[gData.backTrackStackTop++] = result; result.continuation_op = op; result.continuation_pc = target; result.lastParen = gData.lastParen; result.currentState = new REProgState(gData.stateStack[gData.stateStackTop - 1]); if (gData.stateStackTop > 1) { result.precedingStateTop = gData.stateStackTop - 1; result.precedingState = new REProgState[result.precedingStateTop]; for (int i = 0; i < result.precedingStateTop; i++) result.precedingState[i] = new REProgState(gData.stateStack[i]); } else { result.precedingStateTop = 0; result.precedingState = null; } return result; | REBackTrackData backTrack = new REBackTrackData(gData, op, target, x); ++gData.backTrackSize; backTrack.previous = gData.backTrackLast; gData.backTrackLast = backTrack; | pushBackTrackState(REGlobalData gData, byte op, int target, REMatchState x) { REBackTrackData result; if (gData.backTrackStackTop == gData.maxBackTrack) { gData.maxBackTrack <<= 1; REBackTrackData[] newStack = new REBackTrackData[gData.maxBackTrack]; for (int i = 0; i < gData.backTrackStackTop; i++) newStack[i] = gData.backTrackStack[i]; for (int i = gData.backTrackStackTop; i < gData.maxBackTrack; i++) newStack[i] = new REBackTrackData(x); gData.backTrackStack = newStack; } result = new REBackTrackData(x); gData.backTrackStack[gData.backTrackStackTop++] = result; result.continuation_op = op; result.continuation_pc = target; result.lastParen = gData.lastParen; result.currentState = new REProgState(gData.stateStack[gData.stateStackTop - 1]); if (gData.stateStackTop > 1) { result.precedingStateTop = gData.stateStackTop - 1; result.precedingState = new REProgState[result.precedingStateTop]; for (int i = 0; i < result.precedingStateTop; i++) result.precedingState[i] = new REProgState(gData.stateStack[i]); } else { result.precedingStateTop = 0; result.precedingState = null; } return result; } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/1c1b4b37f0e7a3a86d7597b8f72506d4d41c5ab1/NativeRegExp.java/clean/src/org/mozilla/javascript/regexp/NativeRegExp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1817,
2711,
4402,
1119,
12,
862,
5160,
751,
314,
751,
16,
1160,
1061,
16,
509,
1018,
16,
2438,
2060,
1119,
619,
13,
565,
288,
3639,
2438,
2711,
4402,
751,
563,
31,
3639,
309,
261,
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,
377,
1817,
2711,
4402,
1119,
12,
862,
5160,
751,
314,
751,
16,
1160,
1061,
16,
509,
1018,
16,
2438,
2060,
1119,
619,
13,
565,
288,
3639,
2438,
2711,
4402,
751,
563,
31,
3639,
309,
261,
75,
... |
return IDEWorkbenchMessages.OpenResourceAction_dialogTitle; } | return IDEWorkbenchMessages.OpenResourceAction_dialogTitle; } | protected String getProblemsTitle() { return IDEWorkbenchMessages.OpenResourceAction_dialogTitle; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/ec943ad1464c034e89ad10776f2bb822c4d9de96/OpenResourceAction.java/clean/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenResourceAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
3570,
19122,
4247,
1435,
288,
3639,
327,
1599,
41,
2421,
22144,
5058,
18,
3678,
1420,
1803,
67,
12730,
4247,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
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,
4750,
514,
3570,
19122,
4247,
1435,
288,
3639,
327,
1599,
41,
2421,
22144,
5058,
18,
3678,
1420,
1803,
67,
12730,
4247,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
for( Iterator j=fromEdges.iterator(); j.hasNext(); ) { Edge e=(Edge) j.next(); if( e.getFromNode() == n ) { return true; } } return false; | return getEdgeFromNode(n) != null; | protected boolean hasEdgeFromNode(Node n) { for( Iterator j=fromEdges.iterator(); j.hasNext(); ) { Edge e=(Edge) j.next(); if( e.getFromNode() == n ) { return true; } } return false; } | 8321 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8321/73f075ae4a01ecf914ef4ce231f3a02b9d73d850/Node.java/buggy/sphinx4/edu/cmu/sphinx/result/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1250,
711,
6098,
28570,
12,
907,
290,
13,
288,
3639,
364,
12,
4498,
525,
33,
2080,
10697,
18,
9838,
5621,
525,
18,
5332,
2134,
5621,
262,
288,
5411,
11342,
425,
28657,
6098,
13,
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,
4750,
1250,
711,
6098,
28570,
12,
907,
290,
13,
288,
3639,
364,
12,
4498,
525,
33,
2080,
10697,
18,
9838,
5621,
525,
18,
5332,
2134,
5621,
262,
288,
5411,
11342,
425,
28657,
6098,
13,
5... |
x1,y - forBackground.getAscent(), x2 - x1,forBackground.getHeight())); | _x,y - forBackground.getAscent(), x2 - _x,forBackground.getHeight())); | public static float paintChunkList(Chunk chunks, Graphics2D gfx, float x, float y, float width, Color background) { FontMetrics forBackground = gfx.getFontMetrics(); float _x = 0.0f; Font lastFont = null; Color lastColor = null; while(chunks != null) { if(chunks.text != null) { Font font = chunks.style.getFont(); Color bgColor = chunks.style.getBackgroundColor(); if(bgColor != null) { float x1 = (_x == 0.0f ? x : x + chunks.x); float x2; if(chunks.next == null) x2 = width; else if(chunks.next.style == chunks.style) x2 = x + chunks.next.x; else x2 = x + chunks.width; //LineMetrics lm = font.getLineMetrics( // chunks.text,gfx.getFontRenderContext()); gfx.setXORMode(background); gfx.setColor(bgColor); gfx.fill(new Rectangle2D.Float( x1,y - forBackground.getAscent(), x2 - x1,forBackground.getHeight())); gfx.setPaintMode(); } gfx.setFont(font); gfx.setColor(chunks.style.getForegroundColor()); gfx.drawGlyphVector(chunks.text,x + chunks.x,y); //gfx.drawString(chunks.str,x + chunks.x,y); // Useful for debugging purposes //gfx.draw(new Rectangle2D.Float(x + chunks.x,y - 10, // chunks.width,10)); } _x = chunks.x + chunks.width; chunks = chunks.next; } return _x; } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/93b21cae61a037921829ebe554b8e3dbc8da5dda/ChunkCache.java/clean/org/gjt/sp/jedit/textarea/ChunkCache.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1431,
12574,
5579,
682,
12,
5579,
6055,
16,
16830,
22,
40,
30940,
16,
202,
202,
5659,
619,
16,
1431,
677,
16,
1431,
1835,
16,
5563,
5412,
13,
202,
95,
202,
202,
5711,
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,
1431,
12574,
5579,
682,
12,
5579,
6055,
16,
16830,
22,
40,
30940,
16,
202,
202,
5659,
619,
16,
1431,
677,
16,
1431,
1835,
16,
5563,
5412,
13,
202,
95,
202,
202,
5711,
5... |
int type = iCode[pc]; | int incrDecrMask = iCode[pc]; | static Object interpret(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, double[] argsDbl, int argShift, int argCount, NativeFunction fnOrScript, InterpreterData idata) throws JavaScriptException { if (cx.interpreterSecurityDomain != idata.securityDomain) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); } SecurityController sc = idata.securityController; Object savedDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = idata.securityDomain; try { return sc.callWithDomain(idata.securityDomain, cx, fnOrScript, scope, thisObj, args); } finally { cx.interpreterSecurityDomain = savedDomain; } } final Object DBL_MRK = Interpreter.DBL_MRK; final Scriptable undefined = Undefined.instance; final int LOCAL_SHFT = idata.itsMaxVars; final int STACK_SHFT = LOCAL_SHFT + idata.itsMaxLocals;// stack[0 <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_STACK_SHFT]: used for local temporaries// stack[STACK_SHFT <= i < STACK_SHFT + idata.itsMaxStack]: stack data// sDbl[i]: if stack[i] is DBL_MRK, sDbl[i] holds the number value int maxFrameArray = idata.itsMaxFrameArray; if (maxFrameArray != STACK_SHFT + idata.itsMaxStack) Kit.codeBug(); Object[] stack = new Object[maxFrameArray]; double[] sDbl = new double[maxFrameArray]; int stackTop = STACK_SHFT - 1; int withDepth = 0; int definedArgs = fnOrScript.argCount; if (definedArgs > argCount) { definedArgs = argCount; } for (int i = 0; i != definedArgs; ++i) { Object arg = args[argShift + i]; stack[i] = arg; if (arg == DBL_MRK) { sDbl[i] = argsDbl[argShift + i]; } } for (int i = definedArgs; i != idata.itsMaxVars; ++i) { stack[i] = undefined; } DebugFrame debuggerFrame = null; if (cx.debugger != null) { debuggerFrame = cx.debugger.getFrame(cx, idata); } if (idata.itsFunctionType != 0) { InterpretedFunction f = (InterpretedFunction)fnOrScript; if (!idata.useDynamicScope) { scope = fnOrScript.getParentScope(); } if (idata.itsCheckThis) { thisObj = ScriptRuntime.getThis(thisObj); } if (idata.itsNeedsActivation) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } } else { ScriptRuntime.initScript(cx, scope, fnOrScript, thisObj, idata.itsFromEvalCode); } if (idata.itsNestedFunctions != null) { if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) Kit.codeBug(); for (int i = 0; i < idata.itsNestedFunctions.length; i++) { InterpreterData fdata = idata.itsNestedFunctions[i]; if (fdata.itsFunctionType == FunctionNode.FUNCTION_STATEMENT) { createFunction(cx, scope, fdata, idata.itsFromEvalCode); } } } // Wrapped regexps for functions are stored in InterpretedFunction // but for script which should not contain references to scope // the regexps re-wrapped during each script execution Scriptable[] scriptRegExps = null; boolean useActivationVars = false; if (debuggerFrame != null) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) { useActivationVars = true; scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } debuggerFrame.onEnter(cx, scope, thisObj, args); } InterpreterData savedData = cx.interpreterData; cx.interpreterData = idata; cx.interpreterLineIndex = idata.firstLinePC; Object result = undefined; // If javaException != null on exit, it will be throw instead of // normal return Throwable javaException = null; int exceptionPC = -1; byte[] iCode = idata.itsICode; int pc = 0; int pcPrevBranch = 0; final boolean instructionCounting = (cx.instructionThreshold != 0); // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; String[] strings = idata.itsStringTable; String stringReg = null; int indexReg = 0; Loop: for (;;) { try { int op = iCode[pc++]; // Back indent to ease imlementation readingswitch (op) { case Icode_CATCH: { // The following code should be executed inside try/catch inside main // loop, not in the loop catch block itself to deal with exceptions // from observeInstructionCount. A special bytecode is used only to // simplify logic. if (javaException == null) Kit.codeBug(); pc = -1; boolean doCatch = false; int handlerOffset = getExceptionHandler(idata.itsExceptionTable, exceptionPC); if (handlerOffset >= 0) { final int SCRIPT_CAN_CATCH = 0, ONLY_FINALLY = 1, OTHER = 2; int exType; if (javaException instanceof JavaScriptException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof EcmaError) { // an offical ECMA error object, exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof EvaluatorException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof RuntimeException) { exType = ONLY_FINALLY; } else { // Error instance exType = OTHER; } if (exType != OTHER) { // Do not allow for JS to interfere with Error instances // (exType == OTHER), as they can be used to terminate // long running script if (exType == SCRIPT_CAN_CATCH) { // Allow JS to catch only JavaScriptException and // EcmaError pc = idata.itsExceptionTable[handlerOffset + EXCEPTION_CATCH_SLOT]; if (pc >= 0) { // Has catch block doCatch = true; } } if (pc < 0) { pc = idata.itsExceptionTable[handlerOffset + EXCEPTION_FINALLY_SLOT]; } } } if (debuggerFrame != null && !(javaException instanceof Error)) { debuggerFrame.onExceptionThrown(cx, javaException); } if (pc < 0) { break Loop; } // We caught an exception // restore scope at try point int tryWithDepth = idata.itsExceptionTable[ handlerOffset + EXCEPTION_WITH_DEPTH_SLOT]; while (tryWithDepth != withDepth) { if (scope == null) Kit.codeBug(); scope = ScriptRuntime.leaveWith(scope); --withDepth; } if (doCatch) { stackTop = STACK_SHFT - 1; int exLocal = idata.itsExceptionTable[ handlerOffset + EXCEPTION_LOCAL_SLOT]; stack[LOCAL_SHFT + exLocal] = ScriptRuntime.getCatchObject( cx, scope, javaException); } else { stackTop = STACK_SHFT; // Call finally handler with javaException on stack top to // distinguish from normal invocation through GOSUB // which would contain DBL_MRK on the stack stack[stackTop] = javaException; } // clear exception javaException = null; if (instructionCounting) { // 500: catch cost cx.addInstructionCount(500); pcPrevBranch = pc; } continue Loop; } case Token.THROW: { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); --stackTop; int sourceLine = getShort(iCode, pc); throw new JavaScriptException(value, idata.itsSourceFile, sourceLine); } case Token.GE : case Token.LE : case Token.GT : case Token.LT : stackTop = do_cmp(stack, sDbl, stackTop, op); continue Loop; case Token.IN : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.in(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; continue Loop; } case Token.INSTANCEOF : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.instanceOf(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; continue Loop; } case Token.EQ : case Token.NE : stackTop = do_eq(stack, sDbl, stackTop, op); continue Loop; case Token.SHEQ : case Token.SHNE : stackTop = do_sheq(stack, sDbl, stackTop, op); continue Loop; case Token.IFNE : if (stack_boolean(stack, sDbl, stackTop--)) { pc += 2; continue Loop; } break; case Token.IFEQ : if (!stack_boolean(stack, sDbl, stackTop--)) { pc += 2; continue Loop; } break; case Icode_IFEQ_POP : if (!stack_boolean(stack, sDbl, stackTop--)) { pc += 2; continue Loop; } stack[stackTop--] = null; break; case Token.GOTO : break; case Icode_GOSUB : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = pc + 2; break; case Icode_RETSUB : { // indexReg: local to store return address if (instructionCounting) { cx.addInstructionCount(pc - pcPrevBranch); } Object value = stack[LOCAL_SHFT + indexReg]; if (value != DBL_MRK) { // Invocation from exception handler, restore object to rethrow javaException = (Throwable)value; exceptionPC = pc - 1; pc = getJavaCatchPC(iCode); } else { // Normal return from GOSUB pc = (int)sDbl[LOCAL_SHFT + indexReg]; pcPrevBranch = pc; } continue Loop; } case Token.POP : stack[stackTop] = null; stackTop--; continue Loop; case Icode_DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; continue Loop; case Icode_DUP2 : stack[stackTop + 1] = stack[stackTop - 1]; sDbl[stackTop + 1] = sDbl[stackTop - 1]; stack[stackTop + 2] = stack[stackTop]; sDbl[stackTop + 2] = sDbl[stackTop]; stackTop += 2; continue Loop; case Icode_SWAP : { Object o = stack[stackTop]; stack[stackTop] = stack[stackTop - 1]; stack[stackTop - 1] = o; double d = sDbl[stackTop]; sDbl[stackTop] = sDbl[stackTop - 1]; sDbl[stackTop - 1] = d; continue Loop; } case Token.POPV : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); stack[stackTop] = null; --stackTop; continue Loop; case Token.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break Loop; case Token.RETURN_POPV : break Loop; case Icode_RETUNDEF : result = undefined; break Loop; case Token.BITNOT : { int rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; continue Loop; } case Token.BITAND : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; continue Loop; } case Token.BITOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; continue Loop; } case Token.BITXOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; continue Loop; } case Token.LSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; continue Loop; } case Token.RSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; continue Loop; } case Token.URSH : { int rIntValue = stack_int32(stack, sDbl, stackTop) & 0x1F; --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ScriptRuntime.toUint32(lDbl) >>> rIntValue; continue Loop; } case Token.NEG : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; continue Loop; } case Token.POS : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; continue Loop; } case Token.ADD : stackTop = do_add(stack, sDbl, stackTop); continue Loop; case Token.SUB : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; continue Loop; } case Token.MUL : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; continue Loop; } case Token.DIV : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; // Detect the divide by zero or let Java do it ? sDbl[stackTop] = lDbl / rDbl; continue Loop; } case Token.MOD : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; continue Loop; } case Token.NOT : stack[stackTop] = stack_boolean(stack, sDbl, stackTop) ? Boolean.FALSE : Boolean.TRUE; continue Loop; case Token.BINDNAME : stack[++stackTop] = ScriptRuntime.bind(scope, stringReg); continue Loop; case Token.SETNAME : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Scriptable lhs = (Scriptable)stack[stackTop]; stack[stackTop] = ScriptRuntime.setName(lhs, rhs, scope, stringReg); continue Loop; } case Token.DELPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.delete(cx, scope, lhs, rhs); continue Loop; } case Token.GETPROP : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, stringReg, scope); continue Loop; } case Token.SETPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProp(lhs, stringReg, rhs, scope); continue Loop; } case Icode_PROP_INC_DEC : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.propIncrDecr(lhs, stringReg, scope, iCode[pc]); ++pc; continue Loop; } case Token.GETELEM : stackTop = do_getElem(stack, sDbl, stackTop, cx, scope); continue Loop; case Token.SETELEM : stackTop = do_setElem(stack, sDbl, stackTop, cx, scope); continue Loop; case Icode_ELEM_INC_DEC: { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.elemIncrDecr(lhs, rhs, scope, iCode[pc]); ++pc; continue Loop; } case Token.GET_REF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getReference(lhs); continue Loop; } case Token.SET_REF : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); ScriptRuntime.setReference(lhs, rhs); stack[stackTop] = rhs; continue Loop; } case Icode_REF_INC_DEC : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.referenceIncrDecr(lhs, iCode[pc]); ++pc; continue Loop; } case Token.LOCAL_SAVE : stack[LOCAL_SHFT + indexReg] = stack[stackTop]; sDbl[LOCAL_SHFT + indexReg] = sDbl[stackTop]; --stackTop; continue Loop; case Token.LOCAL_LOAD : ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + indexReg]; sDbl[stackTop] = sDbl[LOCAL_SHFT + indexReg]; continue Loop; case Icode_CALLSPECIAL : { if (instructionCounting) { cx.instructionCount += INVOCATION_COST; } // indexReg: number of arguments int callType = iCode[pc] & 0xFF; boolean isNew = (iCode[pc + 1] != 0); int sourceLine = getShort(iCode, pc + 2); stackTop -= indexReg; Object[] outArgs = getArgsArray(stack, sDbl, stackTop + 1, indexReg); Object functionThis; if (isNew) { functionThis = null; } else { functionThis = stack[stackTop]; if (functionThis == DBL_MRK) { functionThis = doubleWrap(sDbl[stackTop]); } --stackTop; } Object function = stack[stackTop]; if (function == DBL_MRK) function = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.callSpecial( cx, function, isNew, functionThis, outArgs, scope, thisObj, callType, idata.itsSourceFile, sourceLine); pc += 4; continue Loop; } case Token.CALL : { if (instructionCounting) { cx.instructionCount += INVOCATION_COST; } // indexReg: number of arguments stackTop -= indexReg; int calleeArgShft = stackTop + 1; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; Scriptable calleeScope = scope; if (idata.itsNeedsActivation) { calleeScope = ScriptableObject.getTopLevelScope(scope); } Scriptable calleeThis; if (rhs instanceof Scriptable || rhs == null) { calleeThis = (Scriptable)rhs; } else { calleeThis = ScriptRuntime.toObject(cx, calleeScope, rhs); } if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.call not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; stack[stackTop] = interpret(cx, calleeScope, calleeThis, stack, sDbl, calleeArgShft, indexReg, f, f.itsData); } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, indexReg); stack[stackTop] = f.call(cx, calleeScope, calleeThis, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); throw notAFunction(lhs, idata, pc); } pc += 2; continue Loop; } case Token.NEW : { if (instructionCounting) { cx.instructionCount += INVOCATION_COST; } // indexReg: number of arguments stackTop -= indexReg; int calleeArgShft = stackTop + 1; Object lhs = stack[stackTop]; if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.construct not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; Scriptable newInstance = f.createObject(cx, scope); Object callResult = interpret(cx, scope, newInstance, stack, sDbl, calleeArgShft, indexReg, f, f.itsData); if (callResult instanceof Scriptable && callResult != undefined) { stack[stackTop] = callResult; } else { stack[stackTop] = newInstance; } } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, indexReg); stack[stackTop] = f.construct(cx, scope, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); throw notAFunction(lhs, idata, pc); } pc += 2; continue Loop; } case Token.TYPEOF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); continue Loop; } case Icode_TYPEOFNAME : stack[++stackTop] = ScriptRuntime.typeofName(scope, stringReg); continue Loop; case Icode_NAME_FAST_THIS : case Icode_NAME_SLOW_THIS : stackTop = do_nameAndThis(stack, stackTop, scope, stringReg, op); continue Loop; case Token.STRING : stack[++stackTop] = stringReg; continue Loop; case Icode_SHORTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc); pc += 2; continue Loop; case Icode_INTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc); pc += 4; continue Loop; case Token.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = idata.itsDoubleTable[indexReg]; continue Loop; case Token.NAME : stack[++stackTop] = ScriptRuntime.name(scope, stringReg); continue Loop; case Icode_NAME_INC_DEC : stack[++stackTop] = ScriptRuntime.nameIncrDecr(scope, stringReg, iCode[pc]); ++pc; continue Loop; case Icode_SETVAR1: indexReg = iCode[pc++]; // fallthrough case Token.SETVAR : if (!useActivationVars) { stack[indexReg] = stack[stackTop]; sDbl[indexReg] = sDbl[stackTop]; } else { Object val = stack[stackTop]; if (val == DBL_MRK) val = doubleWrap(sDbl[stackTop]); activationPut(fnOrScript, scope, indexReg, val); } continue Loop; case Icode_GETVAR1: indexReg = iCode[pc++]; // fallthrough case Token.GETVAR : ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[indexReg]; sDbl[stackTop] = sDbl[indexReg]; } else { stack[stackTop] = activationGet(fnOrScript, scope, indexReg); } continue Loop; case Icode_VAR_INC_DEC : { // indexReg : varindex ++stackTop; int type = iCode[pc]; if (!useActivationVars) { stack[stackTop] = DBL_MRK; Object varValue = stack[indexReg]; double d; if (varValue == DBL_MRK) { d = sDbl[indexReg]; } else { d = ScriptRuntime.toNumber(varValue); stack[indexReg] = DBL_MRK; } double d2 = (type == Node.PRE_INC || type == Node.POST_INC) ? d + 1.0 : d - 1.0; sDbl[indexReg] = d2; sDbl[stackTop] = (type == Node.POST_INC || type == Node.POST_DEC) ? d : d2; } else { String varName = fnOrScript.argNames[indexReg]; stack[stackTop] = ScriptRuntime.nameIncrDecr(scope, varName, type); } ++pc; continue Loop; } case Token.ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; continue Loop; case Token.ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; continue Loop; case Token.NULL : stack[++stackTop] = null; continue Loop; case Token.THIS : stack[++stackTop] = thisObj; continue Loop; case Token.THISFN : stack[++stackTop] = fnOrScript; continue Loop; case Token.FALSE : stack[++stackTop] = Boolean.FALSE; continue Loop; case Token.TRUE : stack[++stackTop] = Boolean.TRUE; continue Loop; case Token.UNDEFINED : stack[++stackTop] = Undefined.instance; continue Loop; case Token.ENTERWITH : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); ++withDepth; continue Loop; } case Token.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); --withDepth; continue Loop; case Token.CATCH_SCOPE : stack[stackTop] = ScriptRuntime.newCatchScope(stringReg, stack[stackTop]); continue Loop; case Token.ENUM_INIT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + indexReg] = ScriptRuntime.enumInit(lhs, scope); continue Loop; } case Token.ENUM_NEXT : case Token.ENUM_ID : { Object val = stack[LOCAL_SHFT + indexReg]; ++stackTop; stack[stackTop] = (op == Token.ENUM_NEXT) ? (Object)ScriptRuntime.enumNext(val) : (Object)ScriptRuntime.enumId(val); continue Loop; } case Icode_PUSH_PARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[++stackTop] = ScriptRuntime.getParent(lhs); continue Loop; } case Icode_SPECIAL_REF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.specialReference(lhs, scope, iCode[pc]); ++pc; continue Loop; } case Icode_SCOPE : stack[++stackTop] = scope; continue Loop; case Icode_CLOSURE : { InterpreterData closureData = idata.itsNestedFunctions[indexReg]; stack[++stackTop] = createFunction(cx, scope, closureData, idata.itsFromEvalCode); continue Loop; } case Token.REGEXP : { Scriptable regexp; if (idata.itsFunctionType != 0) { regexp = ((InterpretedFunction)fnOrScript).itsRegExps[indexReg]; } else { if (scriptRegExps == null) { scriptRegExps = wrapRegExps(cx, scope, idata); } regexp = scriptRegExps[indexReg]; } stack[++stackTop] = regexp; continue Loop; } case Icode_LITERAL_NEW : // indexReg: number of values in the literal ++stackTop; stack[stackTop] = new Object[indexReg]; sDbl[stackTop] = 0; continue Loop; case Icode_LITERAL_SET : { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); --stackTop; int i = (int)sDbl[stackTop]; ((Object[])stack[stackTop])[i] = value; sDbl[stackTop] = i + 1; continue Loop; } case Token.ARRAYLIT : case Icode_SPARE_ARRAYLIT : case Token.OBJECTLIT : { Object[] data = (Object[])stack[stackTop]; Object val; if (op == Token.OBJECTLIT) { Object[] ids = (Object[])idata.literalIds[indexReg]; val = ScriptRuntime.newObjectLiteral(ids, data, cx, scope); } else { int[] skipIndexces = null; if (op == Icode_SPARE_ARRAYLIT) { skipIndexces = (int[])idata.literalIds[indexReg]; } val = ScriptRuntime.newArrayLiteral(data, skipIndexces, cx, scope); } stack[stackTop] = val; continue Loop; } case Icode_LINE : cx.interpreterLineIndex = pc; if (debuggerFrame != null) { int line = getShort(iCode, pc); debuggerFrame.onLineChange(cx, line); } pc += 2; continue Loop; case Icode_REG_IND_C0: indexReg = 0; continue Loop; case Icode_REG_IND_C1: indexReg = 1; continue Loop; case Icode_REG_IND_C2: indexReg = 2; continue Loop; case Icode_REG_IND_C3: indexReg = 3; continue Loop; case Icode_REG_IND_C4: indexReg = 4; continue Loop; case Icode_REG_IND_C5: indexReg = 5; continue Loop; case Icode_REG_IND1: indexReg = 0xFF & iCode[pc]; ++pc; continue Loop; case Icode_REG_IND2: indexReg = getIndex(iCode, pc); pc += 2; continue Loop; case Icode_REG_IND4: indexReg = getInt(iCode, pc); pc += 4; continue Loop; case Icode_REG_STR_C0: stringReg = strings[0]; continue Loop; case Icode_REG_STR_C1: stringReg = strings[1]; continue Loop; case Icode_REG_STR_C2: stringReg = strings[2]; continue Loop; case Icode_REG_STR_C3: stringReg = strings[3]; continue Loop; case Icode_REG_STR1: stringReg = strings[0xFF & iCode[pc]]; ++pc; continue Loop; case Icode_REG_STR2: stringReg = strings[getIndex(iCode, pc)]; pc += 2; continue Loop; case Icode_REG_STR4: stringReg = strings[getInt(iCode, pc)]; pc += 4; continue Loop; default : dumpICode(idata); throw new RuntimeException("Unknown icode : "+op+" @ pc : "+(pc-1));} // end of interpreter switch // This should be reachable only for jump implementation // when pc points to encoded target offset if (instructionCounting) { cx.addInstructionCount(pc + 2 - pcPrevBranch); } int offset = getShort(iCode, pc); if (offset != 0) { // -1 accounts for pc pointing to jump opcode + 1 pc += offset - 1; } else { pc = idata.longJumps.getExistingInt(pc); } pcPrevBranch = pc; continue Loop; } // end of interpreter try catch (Throwable ex) { if (instructionCounting) { // Can not call addInstructionCount as it may trigger // exception cx.instructionCount += pc - pcPrevBranch; } javaException = ex; exceptionPC = pc - 1; pc = getJavaCatchPC(iCode); continue Loop; } } // end of interpreter loop cx.interpreterData = savedData; if (debuggerFrame != null) { if (javaException != null) { debuggerFrame.onExit(cx, true, javaException); } else { debuggerFrame.onExit(cx, false, result); } } if (idata.itsNeedsActivation || debuggerFrame != null) { ScriptRuntime.popActivation(cx); } if (javaException != null) { if (javaException instanceof RuntimeException) { throw (RuntimeException)javaException; } else { // Must be instance of Error or code bug throw (Error)javaException; } } return result; } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/cb3a4fef51dd031baf4bc78bcf8cc452587ea3b7/Interpreter.java/clean/js/rhino/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
18701,
1033,
8526,
833,
16,
1645,
8526,
833,
40,
3083,
16,
18701,
509,
1501,
10544,
16,
509,
1501,
1380,
16,
18701... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
18701,
1033,
8526,
833,
16,
1645,
8526,
833,
40,
3083,
16,
18701,
509,
1501,
10544,
16,
509,
1501,
1380,
16,
18701... |
UrlCacher uc = cus.makeUrlCacher(url); | UrlCacher uc = au.makeUrlCacher(cus, url); | protected boolean doCrawlLoop(String url, Set extractedUrls, Set parsedPages, CachedUrlSet cus, boolean overWrite) { boolean wasError = false; logger.debug("Dequeued url from list: "+url); UrlCacher uc = cus.makeUrlCacher(url); // don't cache if already cached, unless overwriting if (overWrite || !uc.getCachedUrl().hasContent()) { try { logger.debug("caching "+uc); uc.cache(); //IOException if there is a caching problem numUrlsFetched++; } catch (FileNotFoundException e) { logger.warning(uc+" not found on publisher's site"); } catch (IOException ioe) { //XXX handle this better. Requeue? logger.error("Problem caching "+uc+". Ignoring", ioe); wasError = true; } } else { if (!parsedPages.contains(uc.getUrl())) { logger.debug2(uc+" exists, not caching"); } } try { if (followLinks && !parsedPages.contains(uc.getUrl())) { CachedUrl cu = uc.getCachedUrl(); //XXX quick fix; if statement should be removed when we rework //handling of error condition if (cu.hasContent()) { addUrlsToSet(cu, extractedUrls, parsedPages);//IOException if the CU can't be read parsedPages.add(uc.getUrl()); numUrlsParsed++; } } } catch (IOException ioe) { //XXX handle this better. Requeue? logger.error("Problem parsing "+uc+". Ignoring", ioe); wasError = true; } logger.debug("Removing from list: "+uc.getUrl()); return !wasError; } | 8150 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8150/12fb3ea2d260218bb4a604c3b81931dfce4c0d7b/GoslingCrawlerImpl.java/buggy/src/org/lockss/crawler/GoslingCrawlerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1250,
741,
39,
15161,
6452,
12,
780,
880,
16,
1000,
9438,
10509,
16,
9506,
377,
1000,
2707,
5716,
16,
15771,
1489,
694,
27964,
16,
9506,
377,
1250,
1879,
3067,
13,
288,
565,
1250,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
741,
39,
15161,
6452,
12,
780,
880,
16,
1000,
9438,
10509,
16,
9506,
377,
1000,
2707,
5716,
16,
15771,
1489,
694,
27964,
16,
9506,
377,
1250,
1879,
3067,
13,
288,
565,
1250,
... |
XFormsContainingDocument containingDocument = new XFormsContainingDocument(objectPool, models, controlsDocument, repeatIndexesElement, | final XFormsContainingDocument containingDocument = new XFormsContainingDocument(models, controlsDocument, repeatIndexesElement, | private static XFormsContainingDocument createXFormsContainingDocument(ObjectPool objectPool, PipelineContext pipelineContext, String staticStateString, String dynamicStateString, Element filesElement) { final Document staticStateDocument = XFormsUtils.decodeXML(pipelineContext, staticStateString); final Document dynamicStateDocument = (dynamicStateString == null || "".equals(dynamicStateString)) ? null : XFormsUtils.decodeXML(pipelineContext, dynamicStateString); // Get controls from static state// final Document controlsDocument = Dom4jUtils.createDocument();// controlsDocument.add(staticStateDocument.getRootElement().element("controls").detach()); final Document controlsDocument = Dom4jUtils.createDocumentCopyParentNamespaces(staticStateDocument.getRootElement().element("controls")); // Get models from static state final Element modelsElement = staticStateDocument.getRootElement().element("models"); // Get instances from dynamic state final Element instancesElement = (dynamicStateDocument == null) ? null : dynamicStateDocument.getRootElement().element("instances"); // Get divs from dynamic state final Element divsElement = (dynamicStateDocument == null) ? null : dynamicStateDocument.getRootElement().element("divs"); // Get repeat indexes from dynamic state final Element repeatIndexesElement = (dynamicStateDocument == null) ? null : dynamicStateDocument.getRootElement().element("repeat-indexes"); // Get automatic event from dynamic state final Element eventElement = (dynamicStateDocument == null) ? null : dynamicStateDocument.getRootElement().element("event"); // Get all models final List models = new ArrayList(); { // FIXME: we don't get a System ID here. Is there a simple solution? for (Iterator i = modelsElement.elements().iterator(); i.hasNext();) { Element modelElement = (Element) i.next();// final Document modelDocument = Dom4jUtils.createDocument();// modelDocument.add(modelElement.detach()); final Document modelDocument = Dom4jUtils.createDocumentCopyParentNamespaces(modelElement); XFormsModel model = new XFormsModel(modelDocument); models.add(model); } } // Create XForms Engine XFormsContainingDocument containingDocument = new XFormsContainingDocument(objectPool, models, controlsDocument, repeatIndexesElement, staticStateDocument.getRootElement().attributeValue("container-type")); // Get instances boolean isInitializeEvent; { int foundInstancesCount = 0; int expectedInstancesCount = 0; if (instancesElement != null) { // Iterator over all the models Iterator modelIterator = containingDocument.getModels().iterator(); XFormsModel currentModel = null; int currentModelInstancesCount = 0; int currentCount = 0; for (Iterator i = instancesElement.elements().iterator(); i.hasNext();) { Element instanceElement = (Element) i.next(); // Go to next model if needed if (currentCount == currentModelInstancesCount) { currentModel = (XFormsModel) modelIterator.next(); currentModelInstancesCount = currentModel.getInstanceCount(); currentCount = 0; expectedInstancesCount += currentModelInstancesCount; } // Create and set instance document on current model// final Document instanceDocument = Dom4jUtils.createDocument();// instanceDocument.add(instanceElement.detach()); Document instanceDocument = Dom4jUtils.createDocumentCopyParentNamespaces(instanceElement); currentModel.setInstanceDocument(pipelineContext, currentCount, instanceDocument); currentCount++; foundInstancesCount++; } // Number of instances must be zero or match number of models if (foundInstancesCount != 0 && expectedInstancesCount != foundInstancesCount) throw new OXFException("Number of instances (" + foundInstancesCount + ") doesn't match number of instances in models (" + expectedInstancesCount + ")."); } // Initialization will take place if no instances are provided isInitializeEvent = foundInstancesCount == 0; } // Initialize XForms Engine containingDocument.initialize(pipelineContext); if (isInitializeEvent) containingDocument.dispatchExternalEvent(pipelineContext, new XXFormsInitializeEvent(containingDocument)); else containingDocument.dispatchExternalEvent(pipelineContext, new XXFormsInitializeStateEvent(containingDocument, divsElement, repeatIndexesElement)); // Run automatic event if present if (eventElement != null) { final String controlId = eventElement.attributeValue("source-control-id"); final String resource = eventElement.attributeValue("resource"); final String eventName = eventElement.attributeValue("name"); containingDocument.executeExternalEvent(pipelineContext, eventName, controlId, null, resource, filesElement); } return containingDocument; } | 54445 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54445/a6eb47de417fd6cf006fa4e9c8c250cb033f744f/XFormsServer.java/clean/src/java/org/orbeon/oxf/xforms/XFormsServer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1139,
18529,
24344,
2519,
752,
60,
18529,
24344,
2519,
12,
921,
2864,
733,
2864,
16,
13671,
1042,
5873,
1042,
16,
28524,
6647,
514,
760,
1119,
780,
16,
514,
5976,
1119,
780,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1139,
18529,
24344,
2519,
752,
60,
18529,
24344,
2519,
12,
921,
2864,
733,
2864,
16,
13671,
1042,
5873,
1042,
16,
28524,
6647,
514,
760,
1119,
780,
16,
514,
5976,
1119,
780,
16... |
protected Control createContents(Composite parent) { // initialize the dialog units initializeDialogUnits(parent); GridLayout layout = new GridLayout(); layout.numColumns = 2; layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.makeColumnsEqualWidth = false; parent.setLayout(layout); parent.setLayoutData(new GridData(GridData.FILL_BOTH)); createDialogAndButtonArea(parent); return parent; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/b342c22a9dd5c06c41272daa4376a8d418b3fdac/IconAndMessageDialog.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/IconAndMessageDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8888,
752,
6323,
12,
9400,
982,
13,
288,
9506,
202,
759,
4046,
326,
6176,
4971,
202,
202,
11160,
6353,
7537,
12,
2938,
1769,
9506,
202,
6313,
3744,
3511,
273,
394,
7145,
3744,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8888,
752,
6323,
12,
9400,
982,
13,
288,
9506,
202,
759,
4046,
326,
6176,
4971,
202,
202,
11160,
6353,
7537,
12,
2938,
1769,
9506,
202,
6313,
3744,
3511,
273,
394,
7145,
3744,
... | ||
waterValueLabel.setText("" + roundOneDecimal(water) + " units/day"); | waterValueLabel.setText("" + roundOneDecimal(water * 1000D) + " units/sol"); | public void updateInfo() { if (fuel != processor.getFuelRate()) { fuel = processor.getFuelRate(); fuelValueLabel.setText("" + roundOneDecimal(fuel) + " units/day"); } if (oxygen != processor.getOxygenRate()) { oxygen = processor.getOxygenRate(); oxygenValueLabel.setText("" + roundOneDecimal(oxygen) + " units/day"); } if (water != processor.getWaterRate()) { water = processor.getWaterRate(); waterValueLabel.setText("" + roundOneDecimal(water) + " units/day"); } } | 49678 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49678/8befcd018b4e0ec75534a4969d638ad44a550803/InsituResourceProcessorFacilityPanel.java/clean/org/mars_sim/msp/ui/standard/InsituResourceProcessorFacilityPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1089,
966,
1435,
288,
5411,
309,
261,
74,
20317,
480,
6659,
18,
588,
42,
20317,
4727,
10756,
288,
5411,
284,
20317,
273,
6659,
18,
588,
42,
20317,
4727,
5621,
5411,
284,
20317,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
966,
1435,
288,
5411,
309,
261,
74,
20317,
480,
6659,
18,
588,
42,
20317,
4727,
10756,
288,
5411,
284,
20317,
273,
6659,
18,
588,
42,
20317,
4727,
5621,
5411,
284,
20317,... |
void execute( String destinationDirectory, Set mojoDescriptors, MavenProject project, String goalPrefix ) | void execute( String destinationDirectory, PluginDescriptor pluginDescriptor ) | void execute( String destinationDirectory, Set mojoDescriptors, MavenProject project, String goalPrefix ) throws IOException; | 11530 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11530/5877385df1e5b2dff3e57131c8fac869556c3b8c/Generator.java/clean/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/Generator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1836,
12,
514,
2929,
2853,
16,
6258,
3187,
1909,
3187,
262,
3639,
1216,
1860,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1836,
12,
514,
2929,
2853,
16,
6258,
3187,
1909,
3187,
262,
3639,
1216,
1860,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
setLineAttributes((LineAttributes)null); | setLineAttributes((LineAttributes) null); | public void eUnset(EStructuralFeature eFeature) { switch (eDerivedStructuralFeatureID(eFeature)) { case TypePackage.LINE_SERIES__VISIBLE: unsetVisible(); return; case TypePackage.LINE_SERIES__LABEL: setLabel((Label)null); return; case TypePackage.LINE_SERIES__DATA_DEFINITION: getDataDefinition().clear(); return; case TypePackage.LINE_SERIES__SERIES_IDENTIFIER: setSeriesIdentifier(SERIES_IDENTIFIER_EDEFAULT); return; case TypePackage.LINE_SERIES__DATA_POINT: setDataPoint((DataPoint)null); return; case TypePackage.LINE_SERIES__DATA_SET: setDataSet((DataSet)null); return; case TypePackage.LINE_SERIES__FORMAT_SPECIFIER: setFormatSpecifier((FormatSpecifier)null); return; case TypePackage.LINE_SERIES__LABEL_POSITION: unsetLabelPosition(); return; case TypePackage.LINE_SERIES__STACKED: unsetStacked(); return; case TypePackage.LINE_SERIES__TRIGGERS: getTriggers().clear(); return; case TypePackage.LINE_SERIES__TRANSLUCENT: unsetTranslucent(); return; case TypePackage.LINE_SERIES__MARKER: setMarker((Marker)null); return; case TypePackage.LINE_SERIES__LINE_ATTRIBUTES: setLineAttributes((LineAttributes)null); return; case TypePackage.LINE_SERIES__CURVE: unsetCurve(); return; case TypePackage.LINE_SERIES__SHADOW_COLOR: setShadowColor((ColorDefinition)null); return; } eDynamicUnset(eFeature); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/LineSeriesImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/type/impl/LineSeriesImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
19698,
12,
41,
14372,
4595,
425,
4595,
13,
565,
288,
3639,
1620,
261,
73,
21007,
14372,
4595,
734,
12,
73,
4595,
3719,
3639,
288,
5411,
648,
1412,
2261,
18,
5997,
67,
2123,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19698,
12,
41,
14372,
4595,
425,
4595,
13,
565,
288,
3639,
1620,
261,
73,
21007,
14372,
4595,
734,
12,
73,
4595,
3719,
3639,
288,
5411,
648,
1412,
2261,
18,
5997,
67,
2123,
8... |
} | } | protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, HttpServletRequest request) { // fill the parameter values in the get/set methods fillParamValues(request); // set the dialog type setParamDialogtype(DIALOG_TYPE); // set the publishing type: publish project or direct publish if (CmsStringUtil.isNotEmpty(getParamResource())) { setParamDirectpublish("true"); } // set the action for the JSP switch if (DIALOG_CONFIRMED.equals(getParamAction())) { if (showUnlockConfirmation()) { // show unlock confirmation dialog setAction(ACTION_UNLOCK_CONFIRMATION); } else { // skip unlock confirmation dialog setAction(ACTION_CONFIRMED); } } else if (DIALOG_UNLOCK_CONFIRMED.equals(getParamAction())) { setAction(ACTION_CONFIRMED); } else if (REPORT_UPDATE.equals(getParamAction())) { setAction(ACTION_REPORT_UPDATE); } else if (REPORT_BEGIN.equals(getParamAction())) { setAction(ACTION_REPORT_BEGIN); } else if (REPORT_END.equals(getParamAction())) { if ("true".equals(getParamThreadHasNext())) { // after the link check start the publish thread startPublishThread(); setParamAction(REPORT_UPDATE); setAction(ACTION_REPORT_UPDATE); } else { // ends the publish thread setAction(ACTION_REPORT_END); } } else if (DIALOG_CANCEL.equals(getParamAction())) { setAction(ACTION_CANCEL); } else { setAction(ACTION_DEFAULT); // set parameters depending on publishing type if ("true".equals(getParamDirectpublish())) { // determine resource name, last modified date and last modified user of resource computePublishResource(); // add the title for the direct publish dialog setParamTitle(key("messagebox.title.publishresource") + ": " + getParamResourcename()); } else { // add the title for the publish project dialog setParamTitle(key("project.publish.title")); // determine the project id and name for publishing computePublishProject(); // determine target to close the report } } } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/2fa0efcae8f9aa5971c7763269a3b033e9256d4b/CmsPublishProject.java/clean/src/org/opencms/workplace/commons/CmsPublishProject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1208,
16514,
691,
1972,
12,
4747,
16514,
2628,
1947,
16,
9984,
590,
13,
288,
3639,
368,
3636,
326,
1569,
924,
316,
326,
336,
19,
542,
2590,
3639,
3636,
786,
1972,
12,
2293,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1208,
16514,
691,
1972,
12,
4747,
16514,
2628,
1947,
16,
9984,
590,
13,
288,
3639,
368,
3636,
326,
1569,
924,
316,
326,
336,
19,
542,
2590,
3639,
3636,
786,
1972,
12,
2293,
1... |
return "Wiki"; | return "wiki"; | public String getTool() { return "Wiki"; } | 51480 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51480/c4a21df5ed417d667f113638052a3d5e31671baf/RWikiEntityContentProducer.java/clean/search-impl/impl/src/java/org/sakaiproject/search/component/adapter/rwiki/RWikiEntityContentProducer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
336,
6364,
1435,
202,
95,
202,
202,
2463,
315,
25438,
14432,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
336,
6364,
1435,
202,
95,
202,
202,
2463,
315,
25438,
14432,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
System.setProperty("user.dir", workingDir.toString()); | public void setWorkingDirectory(File new_dir) { workingDir = makeAbsolute(new_dir); System.setProperty("user.dir", workingDir.toString()); } | 50370 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50370/c8a3588755fe688dd6c6cf6c9523905064172a41/LocalFileSystem.java/clean/src/java/org/apache/hadoop/fs/LocalFileSystem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
14836,
2853,
12,
812,
394,
67,
1214,
13,
288,
1377,
5960,
1621,
273,
1221,
10368,
12,
2704,
67,
1214,
1769,
540,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
14836,
2853,
12,
812,
394,
67,
1214,
13,
288,
1377,
5960,
1621,
273,
1221,
10368,
12,
2704,
67,
1214,
1769,
540,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
match(95); | match(96); | public final void sequenceType() throws RecognitionException, TokenStreamException, XPathException { returnAST = null; ASTPair currentAST = new ASTPair(); org.exist.xquery.parser.XQueryAST sequenceType_AST = null; boolean synPredMatched85 = false; if (((LA(1)==LITERAL_empty))) { int _m85 = mark(); synPredMatched85 = true; inputState.guessing++; try { { match(LITERAL_empty); match(LPAREN); } } catch (RecognitionException pe) { synPredMatched85 = false; } rewind(_m85); inputState.guessing--; } if ( synPredMatched85 ) { org.exist.xquery.parser.XQueryAST tmp129_AST = null; tmp129_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp129_AST); match(LITERAL_empty); match(LPAREN); match(RPAREN); sequenceType_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; } else { boolean synPredMatched87 = false; if (((LA(1)==95))) { int _m87 = mark(); synPredMatched87 = true; inputState.guessing++; try { { match(95); match(LPAREN); } } catch (RecognitionException pe) { synPredMatched87 = false; } rewind(_m87); inputState.guessing--; } if ( synPredMatched87 ) { org.exist.xquery.parser.XQueryAST tmp132_AST = null; tmp132_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp132_AST); match(95); match(LPAREN); match(RPAREN); sequenceType_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; } else if ((_tokenSet_2.member(LA(1)))) { itemType(); astFactory.addASTChild(currentAST, returnAST); { if (((LA(1) >= QUESTION && LA(1) <= PLUS))) { occurrenceIndicator(); astFactory.addASTChild(currentAST, returnAST); } else if ((_tokenSet_3.member(LA(1)))) { } else { throw new NoViableAltException(LT(1), getFilename()); } } sequenceType_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; } else { throw new NoViableAltException(LT(1), getFilename()); } } returnAST = sequenceType_AST; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/68bb69fc2bc91cbece43dcdf563e1be3ba003e1b/XQueryParser.java/buggy/src/org/exist/xquery/parser/XQueryParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
3102,
559,
1435,
1216,
9539,
16,
3155,
1228,
503,
16,
10172,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
3102,
559,
1435,
1216,
9539,
16,
3155,
1228,
503,
16,
10172,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
56... |
public static void notImplemented(String mockName) { throw new NotImplementedException("Not Implemented in " + mockName); } | public static void notImplemented( String mockName ) { throw new NotImplementedException("Not Implemented in " + mockName); } | public static void notImplemented(String mockName) { throw new NotImplementedException("Not Implemented in " + mockName); } | 54028 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54028/4aaf60d8fa76687c3492c508dd98678fbbd3d935/AssertMo.java/buggy/jmock/core/src/org/jmock/expectation/AssertMo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
486,
8644,
12,
780,
5416,
461,
13,
288,
3639,
604,
394,
10051,
503,
2932,
1248,
18788,
316,
315,
397,
5416,
461,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
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,
918,
486,
8644,
12,
780,
5416,
461,
13,
288,
3639,
604,
394,
10051,
503,
2932,
1248,
18788,
316,
315,
397,
5416,
461,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
meta.categories[i] = cat.getName(); | meta.categories[i] = cat.getFullPath(); | MetaData popuplateMetaData(AssetItem item) { MetaData meta = new MetaData(); List cats = item.getCategories(); meta.categories = new String[cats.size()]; for ( int i = 0; i < meta.categories.length; i++ ) { CategoryItem cat = (CategoryItem) cats.get(i); meta.categories[i] = cat.getName(); } meta.state = (item.getState() != null) ? item.getState().getName() : ""; getMetaDataMapper().copyToMetaData( meta, item ); meta.createdDate = calendarToDate(item.getCreatedDate()); meta.dateEffective = calendarToDate( item.getDateEffective() ); meta.dateExpired = calendarToDate( item.getDateExpired() ); return meta; } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/fb1031d1fe63718a2eb0c3fdd8376ed9b7df2039/JBRMSServiceServlet.java/buggy/drools-jbrms/src/main/java/org/drools/brms/server/JBRMSServiceServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
27512,
1843,
89,
994,
6998,
12,
6672,
1180,
761,
13,
288,
3639,
27512,
2191,
273,
394,
27512,
5621,
7734,
987,
27525,
273,
761,
18,
588,
10487,
5621,
3639,
2191,
18,
8995,
273,
394,
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,
377,
27512,
1843,
89,
994,
6998,
12,
6672,
1180,
761,
13,
288,
3639,
27512,
2191,
273,
394,
27512,
5621,
7734,
987,
27525,
273,
761,
18,
588,
10487,
5621,
3639,
2191,
18,
8995,
273,
394,
514,
... |
protected ICPPASTDeclSpecifier declSpecifierSeq(boolean parm, boolean forTypeId) throws BacktrackException, EndOfFileException, FoundDeclaratorException { IToken firstToken = LA(1); Flags flags = new Flags(parm, false, forTypeId); IToken last = null; boolean isInline = false, isVirtual = false, isExplicit = false, isFriend = false; boolean isConst = false, isVolatile = false, isRestrict = false; boolean isLong = false, isShort = false, isUnsigned = false, isSigned = false, isLongLong = false; boolean isTypename = false; int storageClass = IASTDeclSpecifier.sc_unspecified; int simpleType = IASTSimpleDeclSpecifier.t_unspecified; ITokenDuple duple = null; ICPPASTCompositeTypeSpecifier classSpec = null; ICPPASTElaboratedTypeSpecifier elabSpec = null; IASTEnumerationSpecifier enumSpec = null; IASTExpression typeofExpression = null; int startOffset = firstToken.getOffset(); declSpecifiers: for (;;) { switch (LT(1)) { case IToken.t_inline: last = consume(); isInline = true; break; case IToken.t_typedef: storageClass = IASTDeclSpecifier.sc_typedef; last = consume(); break; case IToken.t_auto: last = consume(); storageClass = IASTDeclSpecifier.sc_auto; break; case IToken.t_register: last = consume(); storageClass = IASTDeclSpecifier.sc_register; break; case IToken.t_static: storageClass = IASTDeclSpecifier.sc_static; last = consume(); break; case IToken.t_extern: storageClass = IASTDeclSpecifier.sc_extern; last = consume(); break; case IToken.t_mutable: storageClass = ICPPASTDeclSpecifier.sc_mutable; last = consume(); break; case IToken.t_virtual: isVirtual = true; last = consume(); break; case IToken.t_explicit: isExplicit = true; last = consume(); break; case IToken.t_friend: isFriend = true; last = consume(); break; case IToken.t_const: isConst = true; last = consume(); break; case IToken.t_volatile: isVolatile = true; last = consume(); break; case IToken.t_restrict: if (!supportRestrict) { IToken la = LA(1); throwBacktrack(la.getOffset(), la.getEndOffset() - la.getOffset()); } isRestrict = true; last = consume(); break; case IToken.t_signed: isSigned = true; flags.setEncounteredRawType(true); last = consume(); break; case IToken.t_unsigned: isUnsigned = true; flags.setEncounteredRawType(true); last = consume(); break; case IToken.t_short: isShort = true; flags.setEncounteredRawType(true); last = consume(); break; case IToken.t_long: if (isLong && supportLongLong) { isLong = false; isLongLong = true; } else isLong = true; flags.setEncounteredRawType(true); last = consume(); break; case IToken.t__Complex: if (!supportComplex) { IToken la = LA(1); throwBacktrack(la.getOffset(), la.getEndOffset() - la.getOffset()); } last = consume(IToken.t__Complex); simpleType = IGPPASTSimpleDeclSpecifier.t_Complex; break; case IToken.t__Imaginary: if (!supportComplex) { IToken la = LA(1); throwBacktrack(la.getOffset(), la.getLength()); } last = consume(IToken.t__Imaginary); simpleType = IGPPASTSimpleDeclSpecifier.t_Imaginary; break; case IToken.t_char: simpleType = IASTSimpleDeclSpecifier.t_char; flags.setEncounteredRawType(true); last = consume(); break; case IToken.t_wchar_t: simpleType = ICPPASTSimpleDeclSpecifier.t_wchar_t; flags.setEncounteredRawType(true); last = consume(); break; case IToken.t_bool: simpleType = ICPPASTSimpleDeclSpecifier.t_bool; flags.setEncounteredRawType(true); last = consume(); break; case IToken.t_int: flags.setEncounteredRawType(true); last = consume(); simpleType = IASTSimpleDeclSpecifier.t_int; break; case IToken.t_float: simpleType = IASTSimpleDeclSpecifier.t_float; flags.setEncounteredRawType(true); last = consume(); break; case IToken.t_double: simpleType = IASTSimpleDeclSpecifier.t_double; flags.setEncounteredRawType(true); last = consume(); break; case IToken.t_void: simpleType = IASTSimpleDeclSpecifier.t_void; flags.setEncounteredRawType(true); last = consume(); break; case IToken.t_typename: isTypename = true; last = consume(IToken.t_typename); duple = name(); flags.setEncounteredTypename(true); break; case IToken.tCOLONCOLON: case IToken.tIDENTIFIER: case IToken.tCOMPLETION: if (flags.haveEncounteredRawType()) break declSpecifiers; if (flags.haveEncounteredTypename()) break declSpecifiers; try { lookAheadForDeclarator(flags); } catch( FoundDeclaratorException fde ) { ICPPASTSimpleDeclSpecifier simpleDeclSpec = null; if (isLongLong || typeofExpression != null) { simpleDeclSpec = createGPPSimpleDeclSpecifier(); ((IGPPASTSimpleDeclSpecifier) simpleDeclSpec) .setLongLong(isLongLong); if (typeofExpression != null) { ((IGPPASTSimpleDeclSpecifier) simpleDeclSpec) .setTypeofExpression(typeofExpression); typeofExpression.setParent(simpleDeclSpec); typeofExpression .setPropertyInParent(IGPPASTSimpleDeclSpecifier.TYPEOF_EXPRESSION); } } else simpleDeclSpec = createSimpleDeclSpecifier(); if( last == null && typeofExpression != null ){ ((ASTNode) simpleDeclSpec).setOffsetAndLength((ASTNode) typeofExpression); } else { int l = last != null ? last.getEndOffset() - firstToken.getOffset() : 0; ((ASTNode) simpleDeclSpec) .setOffsetAndLength(firstToken.getOffset(), l); } simpleDeclSpec.setConst(isConst); simpleDeclSpec.setVolatile(isVolatile); if (simpleDeclSpec instanceof IGPPASTDeclSpecifier) ((IGPPASTDeclSpecifier) simpleDeclSpec).setRestrict(isRestrict); simpleDeclSpec.setFriend(isFriend); simpleDeclSpec.setInline(isInline); simpleDeclSpec.setStorageClass(storageClass); simpleDeclSpec.setVirtual(isVirtual); simpleDeclSpec.setExplicit(isExplicit); simpleDeclSpec.setType(simpleType); simpleDeclSpec.setLong(isLong); simpleDeclSpec.setShort(isShort); simpleDeclSpec.setUnsigned(isUnsigned); simpleDeclSpec.setSigned(isSigned); fde.declSpec = simpleDeclSpec; throw fde; } duple = name(); last = duple.getLastToken(); flags.setEncounteredTypename(true); break; case IToken.t_class: case IToken.t_struct: case IToken.t_union: if (flags.haveEncounteredTypename()) throwBacktrack(LA(1)); try { classSpec = classSpecifier(); flags.setEncounteredTypename(true); break; } catch (BacktrackException bt) { elabSpec = elaboratedTypeSpecifier(); flags.setEncounteredTypename(true); break; } case IToken.t_enum: if (flags.haveEncounteredTypename()) throwBacktrack(LA(1)); try { enumSpec = enumSpecifier(); flags.setEncounteredTypename(true); break; } catch (BacktrackException bt) { // this is an elaborated class specifier elabSpec = elaboratedTypeSpecifier(); flags.setEncounteredTypename(true); break; } default: if (supportTypeOfUnaries && LT(1) == IGCCToken.t_typeof) { typeofExpression = unaryTypeofExpression(); if (typeofExpression != null) { flags.setEncounteredTypename(true); } } break declSpecifiers; } } if (elabSpec != null) { elabSpec.setConst(isConst); elabSpec.setVolatile(isVolatile); if (elabSpec instanceof IGPPASTDeclSpecifier) ((IGPPASTDeclSpecifier) elabSpec).setRestrict(isRestrict); elabSpec.setFriend(isFriend); elabSpec.setInline(isInline); elabSpec.setStorageClass(storageClass); elabSpec.setVirtual(isVirtual); elabSpec.setExplicit(isExplicit); ((CPPASTNode) elabSpec).setOffsetAndLength(startOffset, calculateEndOffset(elabSpec) - startOffset); return elabSpec; } if (enumSpec != null) { enumSpec.setConst(isConst); enumSpec.setVolatile(isVolatile); if (enumSpec instanceof IGPPASTDeclSpecifier) ((IGPPASTDeclSpecifier) enumSpec).setRestrict(isRestrict); ((ICPPASTDeclSpecifier) enumSpec).setFriend(isFriend); ((ICPPASTDeclSpecifier) enumSpec).setVirtual(isVirtual); ((ICPPASTDeclSpecifier) enumSpec).setExplicit(isExplicit); enumSpec.setInline(isInline); enumSpec.setStorageClass(storageClass); ((CPPASTNode) enumSpec).setOffsetAndLength(startOffset, calculateEndOffset(enumSpec) - startOffset); return (ICPPASTDeclSpecifier) enumSpec; } if (classSpec != null) { classSpec.setConst(isConst); classSpec.setVolatile(isVolatile); if (classSpec instanceof IGPPASTDeclSpecifier) ((IGPPASTDeclSpecifier) classSpec).setRestrict(isRestrict); classSpec.setFriend(isFriend); classSpec.setInline(isInline); classSpec.setStorageClass(storageClass); classSpec.setVirtual(isVirtual); classSpec.setExplicit(isExplicit); ((CPPASTNode) classSpec).setOffsetAndLength(startOffset, calculateEndOffset(classSpec) - startOffset); return classSpec; } if (duple != null) { ICPPASTNamedTypeSpecifier nameSpec = (ICPPASTNamedTypeSpecifier) createNamedTypeSpecifier(); nameSpec.setIsTypename(isTypename); IASTName name = createName(duple); nameSpec.setName(name); name.setParent(nameSpec); name.setPropertyInParent(IASTNamedTypeSpecifier.NAME); nameSpec.setConst(isConst); nameSpec.setVolatile(isVolatile); if (nameSpec instanceof IGPPASTDeclSpecifier) ((IGPPASTDeclSpecifier) nameSpec).setRestrict(isRestrict); nameSpec.setFriend(isFriend); nameSpec.setInline(isInline); nameSpec.setStorageClass(storageClass); nameSpec.setVirtual(isVirtual); nameSpec.setExplicit(isExplicit); ((CPPASTNode) nameSpec).setOffsetAndLength(startOffset, last .getEndOffset() - startOffset); return nameSpec; } ICPPASTSimpleDeclSpecifier simpleDeclSpec = null; if (isLongLong || typeofExpression != null) { simpleDeclSpec = createGPPSimpleDeclSpecifier(); ((IGPPASTSimpleDeclSpecifier) simpleDeclSpec) .setLongLong(isLongLong); if (typeofExpression != null) { ((IGPPASTSimpleDeclSpecifier) simpleDeclSpec) .setTypeofExpression(typeofExpression); typeofExpression.setParent(simpleDeclSpec); typeofExpression .setPropertyInParent(IGPPASTSimpleDeclSpecifier.TYPEOF_EXPRESSION); } } else simpleDeclSpec = createSimpleDeclSpecifier(); if( last == null && typeofExpression != null ){ ((ASTNode) simpleDeclSpec).setOffsetAndLength((ASTNode) typeofExpression); } else { int l = last != null ? last.getEndOffset() - firstToken.getOffset() : 0; ((ASTNode) simpleDeclSpec) .setOffsetAndLength(firstToken.getOffset(), l); } simpleDeclSpec.setConst(isConst); simpleDeclSpec.setVolatile(isVolatile); if (simpleDeclSpec instanceof IGPPASTDeclSpecifier) ((IGPPASTDeclSpecifier) simpleDeclSpec).setRestrict(isRestrict); simpleDeclSpec.setFriend(isFriend); simpleDeclSpec.setInline(isInline); simpleDeclSpec.setStorageClass(storageClass); simpleDeclSpec.setVirtual(isVirtual); simpleDeclSpec.setExplicit(isExplicit); simpleDeclSpec.setType(simpleType); simpleDeclSpec.setLong(isLong); simpleDeclSpec.setShort(isShort); simpleDeclSpec.setUnsigned(isUnsigned); simpleDeclSpec.setSigned(isSigned); return simpleDeclSpec; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/52ae549c9f7c94405a98616e9b108eb17f961445/GNUCPPSourceParser.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
467,
4258,
4066,
882,
3456,
21416,
3496,
21416,
6926,
12,
6494,
19924,
16,
5411,
1250,
364,
11731,
13,
1216,
4297,
4101,
503,
16,
4403,
951,
812,
503,
16,
10750,
31419,
503,
288,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
467,
4258,
4066,
882,
3456,
21416,
3496,
21416,
6926,
12,
6494,
19924,
16,
5411,
1250,
364,
11731,
13,
1216,
4297,
4101,
503,
16,
4403,
951,
812,
503,
16,
10750,
31419,
503,
288,
36... | ||
m_guiBoard.updateFromGoBoard(); m_guiBoard.markLastMove(null); | if (! invokeAndWait(new Runnable() { public void run() { m_board.newGame(); m_guiBoard.updateFromGoBoard(); m_guiBoard.markLastMove(null); } }, response)) return false; | private boolean cmdBoardsize(String cmdArray[], StringBuffer response) { IntegerArgument argument = parseIntegerArgument(cmdArray, response); if (argument == null) return false; if (argument.m_integer < 1) { response.append("Invalid board size"); return false; } if (m_size > 0 && argument.m_integer != m_size) { response.append("Boardsize must be " + m_size); return false; } String command = m_gtp.getCommandBoardsize(argument.m_integer); if (command != null) { if (! send(command, response)) return false; } m_size = argument.m_integer; m_board.newGame(); command = m_gtp.getCommandClearBoard(m_size); if (! send(command, response)) return false; m_guiBoard.updateFromGoBoard(); m_guiBoard.markLastMove(null); return true; } | 2255 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2255/bc14181144a7faca53acebde6d38c4f134970de6/GtpDisplay.java/buggy/src/gtpdisplay/GtpDisplay.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
1797,
22233,
1467,
12,
780,
1797,
1076,
63,
6487,
6674,
766,
13,
565,
288,
3639,
2144,
1379,
1237,
273,
1109,
4522,
1379,
12,
4172,
1076,
16,
766,
1769,
3639,
309,
261,
3446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
1797,
22233,
1467,
12,
780,
1797,
1076,
63,
6487,
6674,
766,
13,
565,
288,
3639,
2144,
1379,
1237,
273,
1109,
4522,
1379,
12,
4172,
1076,
16,
766,
1769,
3639,
309,
261,
3446,
... |
new TextModeClientInterfaceServer(node, client, port, bind_ip); | new TextModeClientInterfaceServer(node, port, bind_ip); | public static void maybeCreate(Node node, Config config) throws IOException { SubConfig TMCIConfig = new SubConfig("tmci", config); TMCIConfig.register("enabled", true, 1, true, "Enable TMCI", "Whether to enable the TMCI", new TMCIEnabledCallback(node)); TMCIConfig.register("bindTo", "127.0.0.1", 2, true, "IP address to bind to", "IP address to bind to", new TMCIBindtoCallback(node)); TMCIConfig.register("port", 2323, 1, true, "Testnet port", "Testnet port number", new TCMIPortNumberCallback(node)); TMCIConfig.register("directEnabled", false, 1, true, "Enable on stdout/stdin?", "Enable text mode client interface on standard input/output? (.enabled refers to providing a telnet-style server, this runs it over a socket)", new TMCIDirectEnabledCallback(node)); boolean TMCIEnabled = TMCIConfig.getBoolean("enabled"); int port = TMCIConfig.getInt("port"); String bind_ip = TMCIConfig.getString("bindTo"); boolean direct = TMCIConfig.getBoolean("directEnabled"); HighLevelSimpleClient client = node.makeClient(RequestStarter.INTERACTIVE_PRIORITY_CLASS); if(TMCIEnabled){ new TextModeClientInterfaceServer(node, client, port, bind_ip); Logger.normal(node, "TMCI started on "+bind_ip+":"+port); System.out.println("TMCI started on "+bind_ip+":"+port); } else{ Logger.normal(node, "Not starting TMCI as it's disabled"); } if(direct) { TextModeClientInterface directTMCI = new TextModeClientInterface(node, client, node.downloadDir, System.in, System.out); Thread t = new Thread(directTMCI, "Direct text mode interface"); t.setDaemon(true); t.start(); node.setDirectTMCI(directTMCI); } TMCIConfig.finishedInitialization(); } | 46035 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46035/0f77d1c3db84068c486f4734003efa30214aea88/TextModeClientInterfaceServer.java/buggy/src/freenet/node/TextModeClientInterfaceServer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
6944,
1684,
12,
907,
756,
16,
1903,
642,
13,
1216,
1860,
288,
202,
202,
1676,
809,
27435,
7266,
809,
273,
394,
2592,
809,
2932,
16925,
8450,
3113,
642,
1769,
9506,
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,
760,
918,
6944,
1684,
12,
907,
756,
16,
1903,
642,
13,
1216,
1860,
288,
202,
202,
1676,
809,
27435,
7266,
809,
273,
394,
2592,
809,
2932,
16925,
8450,
3113,
642,
1769,
9506,
2... |
MockMatchBuilder builder1 = new MockMatchBuilder(); MockMatchBuilder builder2 = new MockMatchBuilder(); | MockMatchBuilder builder1 = new MockMatchBuilder(); MockMatchBuilder builder2 = new MockMatchBuilder(); | public void testDuplicateMethodNameOverridesPreviousMapping() { MockMatchBuilder builder1 = new MockMatchBuilder(); MockMatchBuilder builder2 = new MockMatchBuilder(); mock.registerMethodName(BUILDER_ID, builder1); mock.registerMethodName(BUILDER_ID, builder2); assertSame("builder2", builder2, mock.lookupID(BUILDER_ID)); } | 57371 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57371/c26c57f3ac4851e6bc9c5df8515ac73f4045eebf/MockTest.java/clean/jmock/core/src/test/jmock/MockTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
11826,
11666,
13084,
8351,
3233,
1435,
288,
202,
202,
9865,
2060,
1263,
2089,
21,
273,
394,
7867,
2060,
1263,
5621,
202,
202,
9865,
2060,
1263,
2089,
22,
273,
394,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
11826,
11666,
13084,
8351,
3233,
1435,
288,
202,
202,
9865,
2060,
1263,
2089,
21,
273,
394,
7867,
2060,
1263,
5621,
202,
202,
9865,
2060,
1263,
2089,
22,
273,
394,
78... |
public LWJGLPropertiesDialog(PropertiesIO source, URL imageFile) { if (null == source) throw new JmeException("PropertyIO source cannot be null"); this.source = source; this.imageFile = imageFile; try { this.modes = Display.getAvailableDisplayModes(); } catch (LWJGLException e) { e.printStackTrace(); } Arrays.sort(modes, new DisplayModeSorter()); createUI(); | public LWJGLPropertiesDialog(PropertiesIO source, String imageFile) { this(source, getURL(imageFile)); | public LWJGLPropertiesDialog(PropertiesIO source, URL imageFile) { if (null == source) throw new JmeException("PropertyIO source cannot be null"); this.source = source; this.imageFile = imageFile; try { this.modes = Display.getAvailableDisplayModes(); } catch (LWJGLException e) { e.printStackTrace(); } Arrays.sort(modes, new DisplayModeSorter()); createUI(); } | 19503 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19503/522ff72ab4b31ed8dcda10ce5032f38da0fed0e7/LWJGLPropertiesDialog.java/buggy/src/com/jme/system/lwjgl/LWJGLPropertiesDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
511,
59,
46,
11261,
2297,
6353,
12,
2297,
4294,
1084,
16,
1976,
31146,
13,
288,
3639,
309,
261,
2011,
422,
1084,
13,
5411,
604,
394,
804,
3501,
503,
2932,
1396,
4294,
1084,
2780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
511,
59,
46,
11261,
2297,
6353,
12,
2297,
4294,
1084,
16,
1976,
31146,
13,
288,
3639,
309,
261,
2011,
422,
1084,
13,
5411,
604,
394,
804,
3501,
503,
2932,
1396,
4294,
1084,
2780,
... |
return new OtherLockCountAnalysis(methodGen, vnaDataflow, dfs); | MethodGen methodGen = classContext.getMethodGen(method); CFG cfg = classContext.getCFG(method); DepthFirstSearch dfs = classContext.getDepthFirstSearch(method); ValueNumberDataflow vnaDataflow = classContext.getValueNumberDataflow(method); LockCountAnalysis analysis = new OtherLockCountAnalysis(methodGen, vnaDataflow, dfs); Dataflow<LockCount, LockCountAnalysis> dataflow = new Dataflow<LockCount, LockCountAnalysis>(cfg, analysis); dataflow.execute(); return dataflow; | public static void main(String[] argv) { try { if (argv.length != 1) { System.out.println("edu.umd.cs.daveho.ba.OtherLockCountAnalysis <filename>"); System.exit(1); } DataflowTestDriver<LockCount, LockCountAnalysis> driver = new DataflowTestDriver<LockCount, LockCountAnalysis>() { public LockCountAnalysis createAnalysis(MethodGen methodGen, CFG cfg) throws DataflowAnalysisException { DepthFirstSearch dfs = new DepthFirstSearch(cfg).search(); ValueNumberDataflow vnaDataflow = new ValueNumberDataflow(cfg, new ValueNumberAnalysis(methodGen, dfs)); vnaDataflow.execute(); return new OtherLockCountAnalysis(methodGen, vnaDataflow, dfs); } }; driver.execute(argv[0]); } catch (Exception e) { e.printStackTrace(); } } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/0cb8b5532a501fb30117ec4a7118ae06a10c5f62/OtherLockCountAnalysis.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/ba/OtherLockCountAnalysis.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
5261,
13,
288,
202,
202,
698,
288,
1082,
202,
430,
261,
19485,
18,
2469,
480,
404,
13,
288,
9506,
202,
3163,
18,
659,
18,
8222,
2932,
28049,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
5261,
13,
288,
202,
202,
698,
288,
1082,
202,
430,
261,
19485,
18,
2469,
480,
404,
13,
288,
9506,
202,
3163,
18,
659,
18,
8222,
2932,
28049,
1... |
public void endElement(String name) | public void endElement(String name) | public void endElement(String name) throws org.xml.sax.SAXException { //-- Do delagation if necessary if ((unmarshaller != null) && (depth > 0)) { unmarshaller.endElement(name); --depth; return; } //-- check for name mismatches if ((unmarshaller != null) && (charUnmarshaller != unmarshaller)) { if (!name.equals(unmarshaller.elementName())) { String err = "missing end element for "; err += unmarshaller.elementName(); throw new SAXException(err); } } //-- call finish for any necessary cleanup unmarshaller.finish(); if (SchemaNames.ANNOTATION.equals(name)) { Annotation ann = (Annotation)unmarshaller.getObject(); _element.addAnnotation(ann); } else if (SchemaNames.COMPLEX_TYPE.equals(name)) { XMLType xmlType = ((ComplexTypeUnmarshaller)unmarshaller).getComplexType(); _element.setType(xmlType); } else if (SchemaNames.SIMPLE_TYPE.equals(name)) { XMLType xmlType = ((SimpleTypeUnmarshaller)unmarshaller).getSimpleType(); _element.setType(xmlType); } unmarshaller = null; } //-- endElement | 3614 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3614/f77be9c7ad750520fffe9b9e71c99998033c7a9f/ElementUnmarshaller.java/clean/trunk/castor-2002/castor/src/main/org/exolab/castor/xml/schema/reader/ElementUnmarshaller.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
14840,
12,
780,
508,
13,
540,
1216,
2358,
18,
2902,
18,
87,
651,
18,
55,
2501,
503,
565,
288,
7734,
368,
413,
2256,
1464,
346,
367,
309,
4573,
3639,
309,
14015,
318,
27296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14840,
12,
780,
508,
13,
540,
1216,
2358,
18,
2902,
18,
87,
651,
18,
55,
2501,
503,
565,
288,
7734,
368,
413,
2256,
1464,
346,
367,
309,
4573,
3639,
309,
14015,
318,
27296,
... |
if (! (pair.car instanceof Symbol)) | if (! (pair.car instanceof String)) | public Expression rewrite (Object obj, Translator tr) { int obj_length = List.list_length (obj); if (obj_length != 2) return tr.syntaxError ("invalid define-syntax syntax"); Pair pair = (Pair) obj; if (! (pair.car instanceof Symbol)) return tr.syntaxError ("define-syntax: keyword is not a symbol"); Symbol keyword = (Symbol) pair.car; pair = (Pair) pair.cdr; Object transformer_spec = pair.car; obj_length = List.list_length (transformer_spec); if (obj_length < 2) return tr.syntaxError ("define-syntax: transformer spec missing or too short"); pair = (Pair) transformer_spec; if (pair.car != SyntaxRules.syntaxRulesSymbol) return tr.syntaxError ("define-syntax: no syntax-rules"); pair = (Pair) pair.cdr; Object literals_list = pair.car; int num_literals = List.length (literals_list); if (num_literals < 0) return tr.syntaxError ("define-syntax: invalid literals list"); Symbol[] literal_identifiers = new Symbol [num_literals + 1]; literal_identifiers[0] = keyword; for (int i = 0; i < num_literals; i++) { Pair lit_pair = (Pair) literals_list; if (! (lit_pair.car instanceof Symbol)) return tr.syntaxError ("define-syntax: non-symbol in literals list"); literal_identifiers[i+1] = (Symbol) lit_pair.car; literals_list = lit_pair.cdr; } SyntaxRules rules = new SyntaxRules (literal_identifiers, pair.cdr, tr); // Add rules to translation environment. tr.addGlobal(keyword, rules); // Add rules to execution environment. SetExp result = new SetExp (keyword, new QuoteExp (rules)); result.setDefining (true); return result; } | 36870 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/36870/c80f2d32e77aa3a0fd0f9a4942f076d39f20d415/define_syntax.java/clean/kawa/standard/define_syntax.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5371,
10738,
261,
921,
1081,
16,
18669,
433,
13,
225,
288,
565,
509,
1081,
67,
2469,
273,
987,
18,
1098,
67,
2469,
261,
2603,
1769,
565,
309,
261,
2603,
67,
2469,
480,
576,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5371,
10738,
261,
921,
1081,
16,
18669,
433,
13,
225,
288,
565,
509,
1081,
67,
2469,
273,
987,
18,
1098,
67,
2469,
261,
2603,
1769,
565,
309,
261,
2603,
67,
2469,
480,
576,
13,
... |
debug("File too small by: " + (TestFile.length() - savedFile.length()) ); | LOG.debug("File too small by: " + (TestFile.length() - savedFile.length()) ); | private static boolean isComplete() { if ( savedFile.length() < TestFile.length() ) { debug("File too small by: " + (TestFile.length() - savedFile.length()) ); return false; } else if ( savedFile.length() > TestFile.length() ) { debug("File too large by: " + (savedFile.length() - TestFile.length()) ); return false; } FileInputStream stream=null; try { stream = new FileInputStream(savedFile); for (int i=0 ; ; i++) { int c=stream.read(); if (c==-1)//eof break; if ((byte)c!=TestFile.getByte(i)) { debug("Bad byte at "+i+"\n"); return false; } } } catch (IOException ioe) { //ioe.printStackTrace(); return false; } finally { if (stream!=null) { try { stream.close(); } catch (IOException ignored) { } } } return true; } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/db8ed6265339c2c6d071408d0ff15b2e0b579cad/DownloadTest.java/clean/components/gnutella-core/src/test/java/com/limegroup/gnutella/downloader/DownloadTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
353,
6322,
1435,
288,
3639,
309,
261,
5198,
812,
18,
2469,
1435,
411,
7766,
812,
18,
2469,
1435,
262,
288,
5411,
2018,
18,
4148,
2932,
812,
4885,
5264,
635,
30,
315,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
353,
6322,
1435,
288,
3639,
309,
261,
5198,
812,
18,
2469,
1435,
411,
7766,
812,
18,
2469,
1435,
262,
288,
5411,
2018,
18,
4148,
2932,
812,
4885,
5264,
635,
30,
315,
39... |
return new Object[][] { {"Class", name}, {"ID", activeObject.getID()} }; | return new Object[][] { { "Class", name }, { "ID", activeObject.getID() } }; | protected Object[][] getDataObjectInfo() { return new Object[][] { {"Class", name}, {"ID", activeObject.getID()} }; } | 50951 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50951/a2cd9b6d05be6ee9dc798dfafe5692ec64040fb8/ActiveObjectPanel.java/buggy/src/org/objectweb/proactive/ic2d/gui/data/ActiveObjectPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1033,
63,
6362,
65,
4303,
921,
966,
1435,
288,
565,
327,
394,
1033,
63,
6362,
65,
288,
3639,
12528,
797,
3113,
508,
5779,
3639,
12528,
734,
3113,
2695,
921,
18,
588,
734,
17767,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1033,
63,
6362,
65,
4303,
921,
966,
1435,
288,
565,
327,
394,
1033,
63,
6362,
65,
288,
3639,
12528,
797,
3113,
508,
5779,
3639,
12528,
734,
3113,
2695,
921,
18,
588,
734,
17767,
1... |
return new ForEachNode(parse(children), parse(next), select, sortKeys); | ForEachNode ret = new ForEachNode(select, sortKeys); ret.children = parse(children); return ret; | final TemplateNode parseForEach(Node node, Node children, Node next) throws TransformerConfigurationException, XPathExpressionException { NamedNodeMap attrs = node.getAttributes(); String s = getRequiredAttribute(attrs, "select", node); List sortKeys = parseSortKeys(children); Expr select = (Expr) xpath.compile(s); return new ForEachNode(parse(children), parse(next), select, sortKeys); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b8e6f02cb6a820cbb793320542ee01a4b70f176a/Stylesheet.java/clean/core/src/classpath/gnu/gnu/xml/transform/Stylesheet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
5035,
907,
1109,
1290,
3442,
12,
907,
756,
16,
2029,
2325,
16,
2029,
1024,
13,
565,
1216,
11519,
10737,
16,
10172,
2300,
503,
225,
288,
565,
9796,
907,
863,
3422,
273,
756,
18,
588... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
5035,
907,
1109,
1290,
3442,
12,
907,
756,
16,
2029,
2325,
16,
2029,
1024,
13,
565,
1216,
11519,
10737,
16,
10172,
2300,
503,
225,
288,
565,
9796,
907,
863,
3422,
273,
756,
18,
588... |
AST __t771 = _t; | AST __t776 = _t; | public final void for_record_spec(AST _t, int contextQualifier ) throws RecognitionException { AST for_record_spec_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST rp1 = null; AST rp2 = null; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case CURRENT: case EACH: case FIRST: case LAST: case NEXT: case PREV: { findwhich(_t); _t = _retTree; break; } case RECORD_NAME: { break; } default: { throw new NoViableAltException(_t); } } } AST __t768 = _t; rp1 = _t==ASTNULL ? null :(AST)_t; match(_t,RECORD_NAME); _t = _t.getFirstChild(); if ( inputState.guessing==0 ) { action.recordNameNode(rp1, contextQualifier); } recordphrase(_t); _t = _retTree; _t = __t768; _t = _t.getNextSibling(); { _loop772: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==COMMA)) { AST tmp214_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case CURRENT: case EACH: case FIRST: case LAST: case NEXT: case PREV: { findwhich(_t); _t = _retTree; break; } case RECORD_NAME: { break; } default: { throw new NoViableAltException(_t); } } } AST __t771 = _t; rp2 = _t==ASTNULL ? null :(AST)_t; match(_t,RECORD_NAME); _t = _t.getFirstChild(); if ( inputState.guessing==0 ) { action.recordNameNode(rp2, contextQualifier); } recordphrase(_t); _t = _retTree; _t = __t771; _t = _t.getNextSibling(); } else { break _loop772; } } while (true); } _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/f492fd11e745beb562b4e209643ba003aa8a6271/TreeParser01.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
364,
67,
3366,
67,
2793,
12,
9053,
389,
88,
16,
202,
202,
474,
819,
16185,
202,
13,
1216,
9539,
288,
9506,
202,
9053,
364,
67,
3366,
67,
2793,
67,
9053,
67,
267,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
364,
67,
3366,
67,
2793,
12,
9053,
389,
88,
16,
202,
202,
474,
819,
16185,
202,
13,
1216,
9539,
288,
9506,
202,
9053,
364,
67,
3366,
67,
2793,
67,
9053,
67,
267,
... |
boolean namedAccess = (!matchesAnyName && getIterableAxis().supportsNamedAccess(support)); | IterableAxis iterableAxis = getIterableAxis(); boolean namedAccess = (!matchesAnyName && iterableAxis.supportsNamedAccess(support)); | public List evaluate(Context context) throws JaxenException { List contextNodeSet = context.getNodeSet(); int contextSize = contextNodeSet.size(); // optimize for context size 0 if (contextSize == 0) { return Collections.EMPTY_LIST; } ContextSupport support = context.getContextSupport(); boolean namedAccess = (!matchesAnyName && getIterableAxis().supportsNamedAccess(support)); // optimize for context size 1 (common case, avoids lots of object creation) if (contextSize == 1) { Object contextNode = contextNodeSet.get(0); if (namedAccess) { // get the iterator over the nodes and check it String uri = support.translateNamespacePrefixToUri(prefix); Iterator axisNodeIter = getIterableAxis().namedAccessIterator( contextNode, support, localName, prefix, uri); if (axisNodeIter == null || axisNodeIter.hasNext() == false) { return Collections.EMPTY_LIST; } // convert iterator to list for predicate test // no need to filter as named access guarantees this List newNodeSet = new ArrayList(); while (axisNodeIter.hasNext()) { newNodeSet.add(axisNodeIter.next()); } // evaluate the predicates return getPredicateSet().evaluatePredicates(newNodeSet, support); } else { // get the iterator over the nodes and check it Iterator axisNodeIter = axisIterator(contextNode, support); if (axisNodeIter == null || axisNodeIter.hasNext() == false) { return Collections.EMPTY_LIST; } // run through iterator, filtering using matches() // adding to list for predicate test List newNodeSet = new ArrayList(); while (axisNodeIter.hasNext()) { Object eachAxisNode = axisNodeIter.next(); if (matches(eachAxisNode, support)) { newNodeSet.add(eachAxisNode); } } // evaluate the predicates return getPredicateSet().evaluatePredicates(newNodeSet, support); } } // full case IdentitySet unique = new IdentitySet(); List interimSet = new ArrayList(contextSize); List newNodeSet = new ArrayList(contextSize); if (namedAccess) { String uri = support.translateNamespacePrefixToUri(prefix); for (int i = 0; i < contextSize; ++i) { Object eachContextNode = contextNodeSet.get(i); Iterator axisNodeIter = getIterableAxis().namedAccessIterator( eachContextNode, support, localName, prefix, uri); if (axisNodeIter == null || axisNodeIter.hasNext() == false) { continue; } // ensure only one of each node in the result while (axisNodeIter.hasNext()) { Object eachAxisNode = axisNodeIter.next(); if (! unique.contains(eachAxisNode)) { unique.add(eachAxisNode); interimSet.add(eachAxisNode); } } // evaluate the predicates newNodeSet.addAll(getPredicateSet().evaluatePredicates(interimSet, support)); interimSet.clear(); } } else { for (int i = 0; i < contextSize; ++i) { Object eachContextNode = contextNodeSet.get(i); Iterator axisNodeIter = axisIterator(eachContextNode, support); if (axisNodeIter == null || axisNodeIter.hasNext() == false) { continue; } // ensure only unique matching nodes in the result while (axisNodeIter.hasNext()) { Object eachAxisNode = axisNodeIter.next(); if (matches(eachAxisNode, support)) { if (! unique.contains(eachAxisNode)) { unique.add(eachAxisNode); interimSet.add(eachAxisNode); } } } // evaluate the predicates newNodeSet.addAll(getPredicateSet().evaluatePredicates(interimSet, support)); interimSet.clear(); } } return newNodeSet; } | 47970 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47970/cb350c5322207c89afc7f21eb95e0fe157aebf0f/DefaultNameStep.java/clean/src/java/main/org/jaxen/expr/DefaultNameStep.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
5956,
12,
1042,
819,
13,
1216,
25824,
275,
503,
288,
3639,
987,
819,
907,
694,
225,
273,
819,
18,
588,
907,
694,
5621,
3639,
509,
819,
1225,
273,
819,
907,
694,
18,
1467,
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,
987,
5956,
12,
1042,
819,
13,
1216,
25824,
275,
503,
288,
3639,
987,
819,
907,
694,
225,
273,
819,
18,
588,
907,
694,
5621,
3639,
509,
819,
1225,
273,
819,
907,
694,
18,
1467,
5... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.