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 |
|---|---|---|---|---|---|---|
public void updateLocation(Body body) { // System.out.println("MigrationManagerWithMixedLocation.updateLocation " + // locationServer); if (locationServer != null) { // System.out.println("MigrationManagerWithMixedLocation.updateLocation"); locationServer.updateLocation(body.getID(), body.getRemoteAdapter()); } } | 58694 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58694/fbbe1d2e3a60d6ea78631a8b1b9d1daca5b41eb8/MigrationManagerWithMixedLocation.java/buggy/src/org/objectweb/proactive/ext/mixedlocation/MigrationManagerWithMixedLocation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
2725,
2735,
12,
2250,
3432,
15329,
759,
3163,
18,
659,
18,
8222,
2932,
10224,
1318,
1190,
19846,
2735,
18,
2725,
2735,
6,
15,
759,
3562,
2081,
1769,
430,
12,
3562,
2081,
5,
33,
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,
1071,
6459,
2725,
2735,
12,
2250,
3432,
15329,
759,
3163,
18,
659,
18,
8222,
2932,
10224,
1318,
1190,
19846,
2735,
18,
2725,
2735,
6,
15,
759,
3562,
2081,
1769,
430,
12,
3562,
2081,
5,
33,
2... | ||
try { getFiles(); } catch (PatternSyntaxException e) { return new String[] {}; } | try { getFiles(); } catch (PatternSyntaxException e) { System.out.println("BAD PATTERN: " + e.getPattern()); return new String[] {}; } | public String[] getNames() { try { getFiles(); } catch (PatternSyntaxException e) { // This can happen if someone does Dir.glob("{") or similiar. return new String[] {}; } ArrayList allMatchedNames = new ArrayList(); for (Iterator iter = patterns.iterator(); iter.hasNext();) { GlobPattern pattern = (GlobPattern) iter.next(); allMatchedNames.addAll(pattern.getMatchedFiles()); } return (String[]) allMatchedNames.toArray(new String[allMatchedNames.size()]); } | 1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/6acc52ad20fb231f849a10dff6ce197f6ea9c617/Glob.java/clean/src/org/jruby/util/Glob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
8526,
336,
1557,
1435,
288,
377,
202,
698,
288,
377,
202,
202,
588,
2697,
5621,
377,
202,
97,
1044,
261,
3234,
14714,
425,
13,
288,
377,
202,
202,
759,
1220,
848,
5865,
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,
514,
8526,
336,
1557,
1435,
288,
377,
202,
698,
288,
377,
202,
202,
588,
2697,
5621,
377,
202,
97,
1044,
261,
3234,
14714,
425,
13,
288,
377,
202,
202,
759,
1220,
848,
5865,
309,
... |
ret.add(new JimpleValue(((AssignStmt) stmt).getRightOp())); | ret.add(new JimpleValue((Immediate) ((AssignStmt) stmt).getRightOp())); | public List/*<ContextValue>*/ getArgsContextValues() { ArrayList ret=new ArrayList(1); if (stmt instanceof AssignStmt) { AssignStmt a = (AssignStmt) stmt; if (a.getLeftOp() instanceof FieldRef) ret.add(new JimpleValue(((AssignStmt) stmt).getRightOp())); Value rhs = a.getRightOp(); if (rhs instanceof InvokeExpr) { InvokeExpr vie = (InvokeExpr) rhs; if (MethodCategory.getCategory(vie.getMethodRef()) == MethodCategory.ACCESSOR_SET) ret.add(new JimpleValue(vie.getArg(0))); } } else if (stmt instanceof InvokeStmt) { InvokeExpr ie = ((InvokeStmt)stmt).getInvokeExpr(); ret.add(new JimpleValue(ie.getArg(0))); } else throw new InternalCompilerError("stmt neither an assignment nor an invoke"); return ret; } | 236 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/236/21a29dafc02d35ff81c11dd7a0340c9cfb6bd8e5/SetFieldShadowMatch.java/buggy/aop/abc/src/abc/weaving/matching/SetFieldShadowMatch.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
20308,
32,
1042,
620,
34,
5549,
30169,
1042,
1972,
1435,
288,
202,
19558,
325,
33,
2704,
2407,
12,
21,
1769,
202,
430,
261,
10589,
1276,
12093,
8952,
13,
288,
202,
202,
4910,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20308,
32,
1042,
620,
34,
5549,
30169,
1042,
1972,
1435,
288,
202,
19558,
325,
33,
2704,
2407,
12,
21,
1769,
202,
430,
261,
10589,
1276,
12093,
8952,
13,
288,
202,
202,
4910,
... |
summaryCell(formatter.format( (time_end-time_start)/1000.) +" seconds"); | summaryCell(formatter.format((time_end-time_start)/1000.)+" seconds"); | private void summarize(List<ISuite> suites) { tableStart( "param"); out.print("<tr><th>Test</th>"); tableColumnStart("Methods<br/>Passed"); tableColumnStart("Scenarios<br/>Passed"); tableColumnStart("# skipped"); tableColumnStart("# failed"); tableColumnStart("Total<br/>Time"); tableColumnStart("Included<br/>Groups"); tableColumnStart("Excluded<br/>Groups"); out.println("</tr>"); NumberFormat formatter=new DecimalFormat("#,##0.0"); int qty_tests=0; int qty_pass_m=0; int qty_pass_s=0; int qty_skip=0; int qty_fail=0; long time_start=Long.MAX_VALUE; long time_end=Long.MIN_VALUE; for(ISuite suite:suites) { if(suites.size()>1) { titleRow(suite.getName(),7); } Map<String,ISuiteResult> tests=suite.getResults(); for(ISuiteResult r : tests.values()) { qty_tests+=1; ITestContext overview=r.getTestContext(); startSummaryRow(overview.getName()); int q=getMethodSet(overview.getPassedTests()).size(); qty_pass_m+=q; summaryCell(q); q=overview.getPassedTests().size(); qty_pass_s+=q; summaryCell(q); q=getMethodSet(overview.getSkippedTests()).size(); qty_skip+=q; summaryCell(q); q=getMethodSet(overview.getFailedTests()).size(); qty_fail+=q; summaryCell(q); time_start=Math.min(overview.getStartDate().getTime(),time_start); time_end=Math.max(overview.getEndDate().getTime(),time_end); summaryCell(formatter.format( (overview.getEndDate().getTime()-overview.getStartDate().getTime())/1000.) +" seconds"); summaryCell(overview.getIncludedGroups()); summaryCell(overview.getExcludedGroups()); out.println("</tr>"); } } if(qty_tests>1) { out.println("<tr class=\"total\"><td>Total</td>"); summaryCell(qty_pass_m); summaryCell(qty_pass_s); summaryCell(qty_skip); summaryCell(qty_fail); summaryCell(formatter.format( (time_end-time_start)/1000.) +" seconds"); out.println("<td colspan=\"2\"> </td></tr>"); out.println("</table>"); } } | 46463 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46463/2c30372d5bda4ec1fa4ac94eaa43d64f3e1d0a1a/EmailableReporter.java/buggy/src/main/org/testng/reporters/EmailableReporter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
28712,
12,
682,
32,
5127,
9519,
34,
27208,
13,
225,
288,
565,
1014,
1685,
12,
1377,
315,
891,
8863,
565,
596,
18,
1188,
2932,
32,
313,
4438,
451,
34,
4709,
1757,
451,
2984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
28712,
12,
682,
32,
5127,
9519,
34,
27208,
13,
225,
288,
565,
1014,
1685,
12,
1377,
315,
891,
8863,
565,
596,
18,
1188,
2932,
32,
313,
4438,
451,
34,
4709,
1757,
451,
2984,
... |
pout.println("Hi. This is the James mail server (we don't know where)."); | String machine ="[unknown]"; try{ InetAddress me = InetAddress.getLocalHost(); machine = me.getHostName(); }catch(Exception e){ machine = "[address unknown]"; } pout.println("Hi. This is the James mail server at " + machine + "."); | private void bounce(MailImpl mail, MessagingException ex) { StringWriter sout = new StringWriter(); PrintWriter pout = new PrintWriter(sout, true); pout.println("Hi. This is the James mail server (we don't know where)."); // at " + InetAddress.getLocalHost() + "."); pout.println("I'm afraid I wasn't able to deliver your message to the following addresses."); pout.println("This is a permanent error; I've given up. Sorry it didn't work out."); pout.println(); for (Iterator i = mail.getRecipients().iterator(); i.hasNext(); ) { pout.println(i.next()); } pout.println(ex.getMessage().trim()); pout.println(); pout.println("The original message is attached."); log("Sending failure message " + mail.getName()); try { getMailetContext().bounce(mail, sout.toString()); } catch (MessagingException me) { log("encountered unexpected messaging exception while bouncing message: " + me.getMessage()); } } | 47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/027f1c9469ba85cae79e686643b2911f8885bc87/RemoteDelivery.java/clean/trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
324,
8386,
12,
6759,
2828,
4791,
16,
23794,
503,
431,
13,
288,
3639,
17436,
272,
659,
273,
394,
17436,
5621,
3639,
14071,
293,
659,
273,
394,
14071,
12,
87,
659,
16,
638,
176... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
324,
8386,
12,
6759,
2828,
4791,
16,
23794,
503,
431,
13,
288,
3639,
17436,
272,
659,
273,
394,
17436,
5621,
3639,
14071,
293,
659,
273,
394,
14071,
12,
87,
659,
16,
638,
176... |
AST tmp1199_AST_in = (AST)_t; | AST tmp1209_AST_in = (AST)_t; | public final void definetemptablestate(AST _t) throws RecognitionException { AST definetemptablestate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST def = null; AST id = null; AST bt = null; AST __t591 = _t; def = _t==ASTNULL ? null :(AST)_t; match(_t,DEFINE); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NEW: case SHARED: { def_shared(_t); _t = _retTree; break; } case PRIVATE: case PUBLIC: case TEMPTABLE: case PROTECTED: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case PRIVATE: case PUBLIC: case PROTECTED: { def_visib(_t); _t = _retTree; break; } case TEMPTABLE: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp1183_AST_in = (AST)_t; match(_t,TEMPTABLE); _t = _t.getNextSibling(); id = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); if ( inputState.guessing==0 ) { action.defineTemptable(def, id); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case UNDO: { AST tmp1184_AST_in = (AST)_t; match(_t,UNDO); _t = _t.getNextSibling(); break; } case NOUNDO: { AST tmp1185_AST_in = (AST)_t; match(_t,NOUNDO); _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case COLUMNLABEL: case FIELD: case INDEX: case LABEL: case LIKE: case RCODEINFORMATION: case BEFORETABLE: case NAMESPACEPREFIX: case NAMESPACEURI: case REFERENCEONLY: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NAMESPACEURI: { namespace_uri(_t); _t = _retTree; break; } case EOF: case PERIOD: case COLUMNLABEL: case FIELD: case INDEX: case LABEL: case LIKE: case RCODEINFORMATION: case BEFORETABLE: case NAMESPACEPREFIX: case REFERENCEONLY: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NAMESPACEPREFIX: { namespace_prefix(_t); _t = _retTree; break; } case EOF: case PERIOD: case COLUMNLABEL: case FIELD: case INDEX: case LABEL: case LIKE: case RCODEINFORMATION: case BEFORETABLE: case REFERENCEONLY: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case REFERENCEONLY: { AST tmp1186_AST_in = (AST)_t; match(_t,REFERENCEONLY); _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case COLUMNLABEL: case FIELD: case INDEX: case LABEL: case LIKE: case RCODEINFORMATION: case BEFORETABLE: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LIKE: { def_table_like(_t); _t = _retTree; break; } case EOF: case PERIOD: case COLUMNLABEL: case FIELD: case INDEX: case LABEL: case RCODEINFORMATION: case BEFORETABLE: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case COLUMNLABEL: case LABEL: { label_constant(_t); _t = _retTree; break; } case EOF: case PERIOD: case FIELD: case INDEX: case RCODEINFORMATION: case BEFORETABLE: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case BEFORETABLE: { AST __t601 = _t; AST tmp1187_AST_in = (AST)_t; match(_t,BEFORETABLE); _t = _t.getFirstChild(); bt = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); if ( inputState.guessing==0 ) { action.defineBuffer(bt, bt, id, false); } _t = __t601; _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case FIELD: case INDEX: case RCODEINFORMATION: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case RCODEINFORMATION: { AST tmp1188_AST_in = (AST)_t; match(_t,RCODEINFORMATION); _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case FIELD: case INDEX: { break; } default: { throw new NoViableAltException(_t); } } } { _loop604: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==FIELD)) { def_table_field(_t); _t = _retTree; } else { break _loop604; } } while (true); } { _loop615: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==INDEX)) { AST __t606 = _t; AST tmp1189_AST_in = (AST)_t; match(_t,INDEX); _t = _t.getFirstChild(); AST tmp1190_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); { _loop610: do { if (_t==null) _t=ASTNULL; if ((_tokenSet_19.member(_t.getType()))) { { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case AS: { AST tmp1191_AST_in = (AST)_t; match(_t,AS); _t = _t.getNextSibling(); break; } case IS: { AST tmp1192_AST_in = (AST)_t; match(_t,IS); _t = _t.getNextSibling(); break; } case PRIMARY: case UNIQUE: case WORDINDEX: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case UNIQUE: { AST tmp1193_AST_in = (AST)_t; match(_t,UNIQUE); _t = _t.getNextSibling(); break; } case PRIMARY: { AST tmp1194_AST_in = (AST)_t; match(_t,PRIMARY); _t = _t.getNextSibling(); break; } case WORDINDEX: { AST tmp1195_AST_in = (AST)_t; match(_t,WORDINDEX); _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } } else { break _loop610; } } while (true); } { int _cnt614=0; _loop614: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==ID)) { AST tmp1196_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); { _loop613: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ASCENDING: { AST tmp1197_AST_in = (AST)_t; match(_t,ASCENDING); _t = _t.getNextSibling(); break; } case DESCENDING: { AST tmp1198_AST_in = (AST)_t; match(_t,DESCENDING); _t = _t.getNextSibling(); break; } case CASESENSITIVE: { AST tmp1199_AST_in = (AST)_t; match(_t,CASESENSITIVE); _t = _t.getNextSibling(); break; } default: { break _loop613; } } } while (true); } } else { if ( _cnt614>=1 ) { break _loop614; } else {throw new NoViableAltException(_t);} } _cnt614++; } while (true); } _t = __t606; _t = _t.getNextSibling(); } else { break _loop615; } } while (true); } state_end(_t); _t = _retTree; _t = __t591; _t = _t.getNextSibling(); _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,
2217,
278,
5744,
9237,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2217,
278,
5744,
9237,
395,
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,
2217,
278,
5744,
9237,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2217,
278,
5744,
9237,
395,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
422... |
runtime.getCurrentContext().popClass(); | runtime.getCurrentContext().setRubyClass(oldParent); | public static IRubyObject loadAndCall(IRubyObject self, String name, byte[] javaClass, String methodName) throws Throwable { Loader loader = new Loader(); Class c = loader.loadClass(name, javaClass); Method method = c.getMethod(methodName, new Class[] { Ruby.class, IRubyObject.class }); Ruby runtime = self.getRuntime(); try { runtime.getCurrentContext().pushClass(self.getType()); return (IRubyObject) method.invoke(null, new Object[] { runtime, self }); } catch (InvocationTargetException e) { throw unrollException(e); } finally { runtime.getCurrentContext().popClass(); } } | 45827 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45827/abfe85d15f992ecf4447b155d177050fe2239c3b/TestHelper.java/clean/src/org/jruby/util/TestHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15908,
10340,
921,
1262,
1876,
1477,
12,
7937,
10340,
921,
365,
16,
514,
508,
16,
1160,
8526,
2252,
797,
16,
514,
4918,
13,
5411,
1216,
4206,
565,
288,
3639,
13920,
4088,
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,
760,
15908,
10340,
921,
1262,
1876,
1477,
12,
7937,
10340,
921,
365,
16,
514,
508,
16,
1160,
8526,
2252,
797,
16,
514,
4918,
13,
5411,
1216,
4206,
565,
288,
3639,
13920,
4088,
273,
... |
return null; | return graphics.getFont(); | public Font getFont() { return null; // TODO } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/3606b7996ab5dbdf4a0195418025163510897b5d/DebugGraphics.java/buggy/core/src/classpath/javax/javax/swing/DebugGraphics.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
10063,
18776,
1435,
225,
288,
202,
202,
2463,
17313,
18,
588,
5711,
5621,
368,
2660,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
10063,
18776,
1435,
225,
288,
202,
202,
2463,
17313,
18,
588,
5711,
5621,
368,
2660,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
getContext( ).getUIServiceProvider( ), | getContext( ), | public Composite getComponent( Composite parent ) { // Layout for the content composite GridLayout glContent = new GridLayout( ); glContent.marginHeight = 7; glContent.marginWidth = 7; cmpContent = new Composite( parent, SWT.NONE ); cmpContent.setLayout( glContent ); lacTitle = new LabelAttributesComposite( cmpContent, SWT.NONE, Messages.getString( "OrthogonalSeriesLabelAttributeSheetImpl.Lbl.Title" ), getSeriesForProcessing( ) //$NON-NLS-1$ .getTitlePosition( ), getLabel( ), getChart( ).getUnits( ), true, true, getContext( ).getUIServiceProvider( ), LabelAttributesComposite.ALLOW_HORIZONTAL_POSITION | LabelAttributesComposite.ALLOW_VERTICAL_POSITION, false ); GridData gdLACTitle = new GridData( GridData.FILL_HORIZONTAL ); gdLACTitle.widthHint = 200; lacTitle.setLayoutData( gdLACTitle ); lacTitle.addListener( this ); return cmpContent; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/c60a4815037b62e9358af2625eb6236e7c979d0f/PieTitleSheet.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/format/popup/series/PieTitleSheet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
14728,
10322,
12,
14728,
982,
262,
202,
95,
202,
202,
759,
9995,
364,
326,
913,
9635,
202,
202,
6313,
3744,
5118,
1350,
273,
394,
7145,
3744,
12,
11272,
202,
202,
7043,
1350,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14728,
10322,
12,
14728,
982,
262,
202,
95,
202,
202,
759,
9995,
364,
326,
913,
9635,
202,
202,
6313,
3744,
5118,
1350,
273,
394,
7145,
3744,
12,
11272,
202,
202,
7043,
1350,
... |
public void setPersonal(String name) throws UnsupportedEncodingException { encodedPersonal = MimeUtility.encodeWord(name); | public void setPersonal(String name, String charset) throws UnsupportedEncodingException { | public void setPersonal(String name) throws UnsupportedEncodingException { encodedPersonal = MimeUtility.encodeWord(name); personal = name; } | 6764 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6764/11bb40b2e6682d32c4734156e23cf1971b319690/InternetAddress.java/buggy/geronimo-spec-javamail/src/main/java/javax/mail/internet/InternetAddress.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
8346,
287,
12,
780,
508,
13,
1216,
15367,
288,
3639,
3749,
8346,
287,
273,
22059,
6497,
18,
3015,
3944,
12,
529,
1769,
3639,
17816,
273,
508,
31,
565,
289,
2,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
8346,
287,
12,
780,
508,
13,
1216,
15367,
288,
3639,
3749,
8346,
287,
273,
22059,
6497,
18,
3015,
3944,
12,
529,
1769,
3639,
17816,
273,
508,
31,
565,
289,
2,
-100,
-100... |
} catch (Exception e) { e.printStackTrace(); | public void initialize() { if (!isInstalled()) return; initializePreferences(); try { IDocumentProvider provider= fEditor.getDocumentProvider(); fCachedDocument= provider.getDocument(fEditor.getEditorInput()); fAllowCollapsing= true; if (fEditor instanceof CEditor) { IWorkingCopyManager manager= CUIPlugin.getDefault().getWorkingCopyManager(); fInput= manager.getWorkingCopy(fEditor.getEditorInput()); } if (fInput != null) { ProjectionAnnotationModel model= (ProjectionAnnotationModel) fEditor.getAdapter(ProjectionAnnotationModel.class); if (model != null) { if (fInput instanceof IWorkingCopy) { IWorkingCopy unit= (IWorkingCopy) fInput; synchronized (unit) { try { unit.reconcile(); } catch (CModelException x) { } } } Map additions= computeAdditions((IParent) fInput); model.removeAllAnnotations(); model.replaceAnnotations(null, additions); } } } finally { fCachedDocument= null; fAllowCollapsing= false; } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/be32ca5a0a826bca14e617628cdeb2c77dd2cee3/DefaultCFoldingStructureProvider.java/buggy/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/folding/DefaultCFoldingStructureProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
97,
1044,
261,
503,
425,
13,
288,
425,
18,
1188,
6332,
5621,
918,
97,
1044,
261,
503,
425,
13,
288,
425,
18,
1188,
6332,
5621,
4046,
17767,
1044,
261,
503,
425,
13,
288,
425... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
97,
1044,
261,
503,
425,
13,
288,
425,
18,
1188,
6332,
5621,
918,
97,
1044,
261,
503,
425,
13,
288,
425,
18,
1188,
6332,
5621,
4046,
17767,
1044,
261,
503,
425,
13,
288,
425... | |
ResourceBundle.getBundle( Messages.ENGINE, rtc.getLocale( ) ) ); | ResourceBundle.getBundle( Messages.ENGINE, rtc.getULocale( ).toLocale( ) ) ); | final double computeAxisLabelThickness( IDisplayServer xs, Label la, int iOrientation ) throws ChartException { if ( !la.isSetVisible( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.unset.label.visibility", //$NON-NLS-1$ new Object[]{ la.getCaption( ).getValue( ) }, ResourceBundle.getBundle( Messages.ENGINE, rtc.getLocale( ) ) ); } if ( !la.isVisible( ) ) { return 0; } String sText; double[] da = getTickCordinates( ); if ( iOrientation == VERTICAL ) { double dW, dMaxW = 0, dMaxW2 = 0; if ( ( getType( ) & TEXT ) == TEXT || bCategoryScale ) { final DataSetIterator dsi = getData( ); final int iDateTimeUnit = ( getType( ) == IConstants.DATE_TIME ) ? CDateTime.computeUnit( dsi ) : IConstants.UNDEFINED; dsi.reset( ); int i = 0; while ( dsi.hasNext( ) ) { la.getCaption( ).setValue( formatCategoryValue( getType( ), dsi.next( ), iDateTimeUnit ) ); dW = computeWidth( xs, la ); if ( isAxisLabelStaggered( ) && baTickLabelStaggered[i] ) { dMaxW2 = Math.max( dW, dMaxW2 ); } else if ( dW > dMaxW ) { dMaxW = dW; } i++; } } else if ( ( getType( ) & LINEAR ) == LINEAR ) { final NumberDataElement nde = NumberDataElementImpl.create( 0 ); double dAxisValue = asDouble( getMinimum( ) ).doubleValue( ); double dAxisStep = asDouble( getStep( ) ).doubleValue( ); DecimalFormat df = null; if ( fs == null ) { df = new DecimalFormat( getNumericPattern( ) ); } for ( int i = 0; i < da.length; i++ ) { nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, fs, rtc.getLocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } la.getCaption( ).setValue( sText ); dW = computeWidth( xs, la ); if ( isAxisLabelStaggered( ) && baTickLabelStaggered[i] ) { dMaxW2 = Math.max( dW, dMaxW2 ); } else if ( dW > dMaxW ) { dMaxW = dW; } dAxisValue += dAxisStep; } } else if ( ( getType( ) & LOGARITHMIC ) == LOGARITHMIC ) { final NumberDataElement nde = NumberDataElementImpl.create( 0 ); double dAxisValue = asDouble( getMinimum( ) ).doubleValue( ); double dAxisStep = asDouble( getStep( ) ).doubleValue( ); DecimalFormat df = null; for ( int i = 0; i < da.length; i++ ) { if ( fs == null ) { df = new DecimalFormat( getNumericPattern( dAxisValue ) ); } nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, fs, rtc.getLocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } la.getCaption( ).setValue( sText ); dW = computeWidth( xs, la ); if ( isAxisLabelStaggered( ) && baTickLabelStaggered[i] ) { dMaxW2 = Math.max( dW, dMaxW2 ); } else if ( dW > dMaxW ) { dMaxW = dW; } dAxisValue *= dAxisStep; } } else if ( ( getType( ) & DATE_TIME ) == DATE_TIME ) { CDateTime cdtAxisValue = asDateTime( getMinimum( ) ); int iStep = asInteger( getStep( ) ); int iUnit = asInteger( getUnit( ) ); SimpleDateFormat sdf = null; if ( fs == null ) { sdf = new SimpleDateFormat( CDateTime.getPreferredFormat( iUnit ) ); } for ( int i = 0; i < da.length; i++ ) { try { sText = ValueFormatter.format( cdtAxisValue, fs, rtc.getLocale( ), sdf ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } la.getCaption( ).setValue( sText ); dW = computeWidth( xs, la ); if ( isAxisLabelStaggered( ) && baTickLabelStaggered[i] ) { dMaxW2 = Math.max( dW, dMaxW2 ); } else if ( dW > dMaxW ) { dMaxW = dW; } cdtAxisValue = cdtAxisValue.forward( iUnit, iStep ); } } return dMaxW + dMaxW2; } else if ( iOrientation == HORIZONTAL ) { double dH, dMaxH = 0, dMaxH2 = 0; if ( ( getType( ) & TEXT ) == TEXT || bCategoryScale ) { final DataSetIterator dsi = getData( ); final int iDateTimeUnit = ( getType( ) == IConstants.DATE_TIME ) ? CDateTime.computeUnit( dsi ) : IConstants.UNDEFINED; dsi.reset( ); int i = 0; while ( dsi.hasNext( ) ) { la.getCaption( ).setValue( formatCategoryValue( getType( ), dsi.next( ), iDateTimeUnit ) ); dH = computeHeight( xs, la ); if ( isAxisLabelStaggered( ) && baTickLabelStaggered[i] ) { dMaxH2 = Math.max( dH, dMaxH2 ); } else if ( dH > dMaxH ) { dMaxH = dH; } i++; } } else if ( ( getType( ) & LINEAR ) == LINEAR ) { final NumberDataElement nde = NumberDataElementImpl.create( 0 ); double dAxisValue = asDouble( getMinimum( ) ).doubleValue( ); final double dAxisStep = asDouble( getStep( ) ).doubleValue( ); DecimalFormat df = null; if ( fs == null ) { df = new DecimalFormat( getNumericPattern( ) ); } for ( int i = 0; i < da.length; i++ ) { nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, fs, rtc.getLocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } la.getCaption( ).setValue( sText ); dH = computeHeight( xs, la ); if ( isAxisLabelStaggered( ) && baTickLabelStaggered[i] ) { dMaxH2 = Math.max( dH, dMaxH2 ); } else if ( dH > dMaxH ) { dMaxH = dH; } dAxisValue += dAxisStep; } } else if ( ( getType( ) & LOGARITHMIC ) == LOGARITHMIC ) { final NumberDataElement nde = NumberDataElementImpl.create( 0 ); double dAxisValue = asDouble( getMinimum( ) ).doubleValue( ); final double dAxisStep = asDouble( getStep( ) ).doubleValue( ); DecimalFormat df = null; for ( int i = 0; i < da.length; i++ ) { if ( fs == null ) { df = new DecimalFormat( getNumericPattern( dAxisValue ) ); } nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, fs, rtc.getLocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } la.getCaption( ).setValue( sText ); dH = computeHeight( xs, la ); if ( isAxisLabelStaggered( ) && baTickLabelStaggered[i] ) { dMaxH2 = Math.max( dH, dMaxH2 ); } else if ( dH > dMaxH ) { dMaxH = dH; } dAxisValue *= dAxisStep; } } else if ( ( getType( ) & DATE_TIME ) == DATE_TIME ) { CDateTime cdtAxisValue = asDateTime( getMinimum( ) ); final int iStep = asInteger( getStep( ) ); final int iUnit = asInteger( getUnit( ) ); SimpleDateFormat sdf = null; if ( fs == null ) { sdf = new SimpleDateFormat( CDateTime.getPreferredFormat( iUnit ) ); } for ( int i = 0; i < da.length; i++ ) { try { sText = ValueFormatter.format( cdtAxisValue, fs, rtc.getLocale( ), sdf ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } la.getCaption( ).setValue( sText ); dH = computeHeight( xs, la ); if ( isAxisLabelStaggered( ) && baTickLabelStaggered[i] ) { dMaxH2 = Math.max( dH, dMaxH2 ); } else if ( dH > dMaxH ) { dMaxH = dH; } cdtAxisValue.forward( iUnit, iStep ); } } return dMaxH + dMaxH2; } return 0; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/ae8909f5c697c610266e491d0af9a02eed14e2e4/AutoScale.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/withaxes/AutoScale.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6385,
1645,
3671,
6558,
2224,
1315,
19517,
12,
1599,
291,
1601,
2081,
9280,
16,
5287,
7125,
16,
1082,
202,
474,
277,
14097,
262,
1216,
14804,
503,
202,
95,
202,
202,
430,
261,
401,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6385,
1645,
3671,
6558,
2224,
1315,
19517,
12,
1599,
291,
1601,
2081,
9280,
16,
5287,
7125,
16,
1082,
202,
474,
277,
14097,
262,
1216,
14804,
503,
202,
95,
202,
202,
430,
261,
401,
... |
private boolean validateNoNameCollisions( | private IResource[] validateNoNameCollisions( | private boolean validateNoNameCollisions( IContainer destination, IResource[] sourceResources, IProgressMonitor monitor) { List deleteItems = new ArrayList(); IWorkspaceRoot workspaceRoot = destination.getWorkspace().getRoot(); for (int i = 0; i < sourceResources.length; i++) { final IResource currentResource = sourceResources[i]; final IPath currentPath = destination.getFullPath().append(currentResource.getName()); IResource newResource = workspaceRoot.findMember(currentPath); if (newResource != null) { // Check to see if we would be overwriting a parent folder if (currentPath.isPrefixOf(currentResource.getFullPath())) { //Run it inside of a runnable to make sure we get to parent off of the shell as we are not //in the UI thread. Runnable notice = new Runnable() { public void run() { MessageDialog.openError(parentShell, WorkbenchMessages.getString("CopyFilesAndFoldersOperation.overwriteProblemTitle"), //$NON-NLS-1$ WorkbenchMessages.format("CopyFilesAndFoldersOperation.overwriteProblem", new Object[] { currentPath, currentResource.getFullPath()})); //$NON-NLS-1$ } }; parentShell.getDisplay().syncExec(notice); canceled = true; return false; } else { if (checkOverwrite(parentShell, newResource)) { // do not delete folders, we want to merge in this case, // not replace. if (newResource.getType() == IResource.FILE) { deleteItems.add(newResource); } } else { canceled = true; return false; } } } } //No overwrite issues if (deleteItems.size() == 0) return true; //Now try deletions IResource[] deleteResources = new IResource[deleteItems.size()]; deleteItems.toArray(deleteResources); try { monitor.subTask(WorkbenchMessages.getString("CopyFilesAndFoldersOperation.deletingCollision")); //$NON-NLS-1$ destination.getWorkspace().delete( deleteResources, IResource.KEEP_HISTORY, new SubProgressMonitor(monitor, 25)); } catch (CoreException exception) { recordError(exception); return false; } return true; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/55a0765998ffb552f84192bb2b3b6177a5c39ba5/CopyFilesAndFoldersOperation.java/buggy/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/actions/CopyFilesAndFoldersOperation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
1954,
2279,
461,
13535,
12682,
12,
202,
202,
45,
2170,
2929,
16,
202,
202,
45,
1420,
8526,
1084,
3805,
16,
202,
202,
45,
5491,
7187,
6438,
13,
288,
202,
202,
682,
1430,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
1954,
2279,
461,
13535,
12682,
12,
202,
202,
45,
2170,
2929,
16,
202,
202,
45,
1420,
8526,
1084,
3805,
16,
202,
202,
45,
5491,
7187,
6438,
13,
288,
202,
202,
682,
1430,... |
public void handlAnyThing(String value1, int abc, Date date){ | public void handlAnyThing(String value1, int abc, Date date) { | public void handlAnyThing(String value1, int abc, Date date){ } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/50920db14c45d59089b0a4f3c9050a30713f9522/RPCServiceClass.java/clean/modules/integration/test/org/apache/axis2/rpc/RPCServiceClass.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
948,
80,
2961,
10193,
12,
780,
460,
21,
16,
509,
20011,
16,
2167,
1509,
13,
288,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
948,
80,
2961,
10193,
12,
780,
460,
21,
16,
509,
20011,
16,
2167,
1509,
13,
288,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if (ackRequest.getRouteHeaders() != null) this.routeList = ackRequest.getRouteHeaders(); | private void sendAck(Request request, boolean throwIOExceptionAsSipException) throws SipException { SIPRequest ackRequest = (SIPRequest) request; if (sipStack.isLoggingEnabled()) sipStack.logWriter.logDebug("sendAck" + this); if (!ackRequest.getMethod().equals(Request.ACK)) throw new SipException("Bad request method -- should be ACK"); if (this.getState() == null || this.getState().getValue() == EARLY_STATE) { if (sipStack.logWriter.isLoggingEnabled()) { sipStack.logWriter.logError("Bad Dialog State for " + this + " dialogID = " + this.getDialogId()); } throw new SipException("Bad dialog state " + this.getState()); } if (!this.getCallId().getCallId().equals( ((SIPRequest) request).getCallId().getCallId())) { if (sipStack.isLoggingEnabled()) { sipStack.logWriter.logError("CallID " + this.getCallId()); sipStack.logWriter.logError("RequestCallID = " + ackRequest.getCallId().getCallId()); sipStack.logWriter.logError("dialog = " + this); } throw new SipException("Bad call ID in request"); } try { if (sipStack.isLoggingEnabled()) { sipStack.logWriter .logDebug("setting from tag For outgoing ACK= " + this.getLocalTag()); sipStack.logWriter .logDebug("setting To tag for outgoing ACK = " + this.getRemoteTag()); sipStack.logWriter.logDebug("ack = " + ackRequest); } if (this.getLocalTag() != null) ackRequest.getFrom().setTag(this.getLocalTag()); if (this.getRemoteTag() != null) ackRequest.getTo().setTag(this.getRemoteTag()); } catch (ParseException ex) { throw new SipException(ex.getMessage()); } Hop hop = sipStack.getNextHop(ackRequest); // Hop hop = defaultRouter.getNextHop(ackRequest); if (hop == null) throw new SipException("No route!"); try { if (sipStack.isLoggingEnabled()) sipStack.logWriter.logDebug("hop = " + hop); ListeningPointImpl lp = (ListeningPointImpl) this.sipProvider .getListeningPoint(hop.getTransport()); if (lp == null) throw new SipException( "No listening point for this provider registered at " + hop); InetAddress inetAddress = InetAddress.getByName(hop.getHost()); MessageChannel messageChannel = lp.getMessageProcessor() .createMessageChannel(inetAddress, hop.getPort()); this.lastAck = ackRequest; // Store the route list from the Ack as the route headers // for this dialog if (ackRequest.getRouteHeaders() != null) this.routeList = ackRequest.getRouteHeaders(); messageChannel.sendMessage(ackRequest); } catch (IOException ex) { if (throwIOExceptionAsSipException) throw new SipException("Could not send ack", ex); this.raiseIOException(hop.getHost(), hop.getPort(), hop .getTransport()); } catch (SipException ex) { if (sipStack.isLoggingEnabled()) sipStack.logWriter.logException(ex); throw ex; } catch (Exception ex) { if (sipStack.isLoggingEnabled()) sipStack.logWriter.logException(ex); throw new SipException("Could not create message channel", ex); } this.ackSeen = true; } | 7607 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7607/c211bf59f177fd36d08938c45852ba731d1d39ad/SIPDialog.java/clean/trunk/src/gov/nist/javax/sip/stack/SIPDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1366,
11931,
12,
691,
590,
16,
1250,
604,
14106,
1463,
17550,
503,
13,
1082,
202,
15069,
13475,
503,
288,
202,
202,
17739,
691,
8479,
691,
273,
261,
17739,
691,
13,
590,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1366,
11931,
12,
691,
590,
16,
1250,
604,
14106,
1463,
17550,
503,
13,
1082,
202,
15069,
13475,
503,
288,
202,
202,
17739,
691,
8479,
691,
273,
261,
17739,
691,
13,
590,
... | |
this.out = new OutputStreamWriter(out); flsh = autoFlush; error = false; | this(out, false); | public PrintWriter(OutputStream out, boolean autoFlush) { this.out = new OutputStreamWriter(out); flsh = autoFlush; error = false; } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/1ec8969a05c3f09c4b5b6551bf396137acb82de2/PrintWriter.java/buggy/libraries/javalib/java/io/PrintWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
14071,
12,
4632,
596,
16,
1250,
3656,
8207,
13,
225,
288,
565,
333,
18,
659,
273,
394,
24248,
12,
659,
1769,
565,
1183,
674,
273,
3656,
8207,
31,
565,
555,
273,
629,
31,
225,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
14071,
12,
4632,
596,
16,
1250,
3656,
8207,
13,
225,
288,
565,
333,
18,
659,
273,
394,
24248,
12,
659,
1769,
565,
1183,
674,
273,
3656,
8207,
31,
565,
555,
273,
629,
31,
225,
28... |
int i; | private void newDistribution(Instances data) throws Exception { Instances [] localInstances; int i; localModel().setDistribution(new Distribution((Instances)data, localModel())); m_train = data; if (!m_isLeaf){ localInstances = (Instances [])localModel().split(data); for (i=0;i<m_sons.length;i++) son(i).newDistribution(localInstances[i]); } } | 4773 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4773/58592303c619abe08416a56f9064f48eb63523ff/C45PruneableClassifierTree.java/clean/weka/classifiers/trees/j48/C45PruneableClassifierTree.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
394,
9003,
12,
5361,
501,
13,
1216,
1185,
288,
565,
18357,
5378,
1191,
5361,
31,
4202,
1191,
1488,
7675,
542,
9003,
12,
2704,
17547,
12443,
5361,
13,
892,
16,
6862,
1082,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
394,
9003,
12,
5361,
501,
13,
1216,
1185,
288,
565,
18357,
5378,
1191,
5361,
31,
4202,
1191,
1488,
7675,
542,
9003,
12,
2704,
17547,
12443,
5361,
13,
892,
16,
6862,
1082,
225,
... | |
int count = getShort(iCode, pc + 3); | int count = getIndex(iCode, pc + 3); | 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) { return execWithNewDomain(cx, scope, thisObj, args, argsDbl, argShift, argCount, fnOrScript, idata); } final Object DBL_MRK = Interpreter.DBL_MRK; final Scriptable undefined = Undefined.instance; final int VAR_SHFT = 0; final int maxVars = idata.itsMaxVars; final int LOCAL_SHFT = VAR_SHFT + maxVars; final int TRY_STACK_SHFT = LOCAL_SHFT + idata.itsMaxLocals; final int STACK_SHFT = TRY_STACK_SHFT + idata.itsMaxTryDepth;// stack[VAR_SHFT <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_STACK_SHFT]: used for newtemp/usetemp// stack[TRY_STACK_SHFT <= i < STACK_SHFT]: stack of try scopes// stack[STACK_SHFT <= i < STACK_SHFT + idata.itsMaxStack]: stack data// sDbl[TRY_STACK_SHFT <= i < STACK_SHFT]: stack of try block pc, stored as doubles// sDbl[any other i]: if stack[i] is DBL_MRK, sDbl[i] holds the number value int maxFrameArray = idata.itsMaxFrameArray; if (maxFrameArray != STACK_SHFT + idata.itsMaxStack) Context.codeBug(); Object[] stack = new Object[maxFrameArray]; double[] sDbl = new double[maxFrameArray]; int stackTop = STACK_SHFT - 1; int tryStackTop = 0; // add TRY_STACK_SHFT to get real index int definedArgs = fnOrScript.argCount; if (definedArgs > argCount) { definedArgs = argCount; } for (int i = 0; i != definedArgs; ++i) { Object arg = args[argShift + i]; stack[VAR_SHFT + i] = arg; if (arg == DBL_MRK) { sDbl[VAR_SHFT + i] = argsDbl[argShift + i]; } } for (int i = definedArgs; i != maxVars; ++i) { stack[VAR_SHFT + i] = undefined; } DebugFrame debuggerFrame = null; if (cx.debugger != null) { DebuggableScript dscript = (DebuggableScript)fnOrScript; debuggerFrame = cx.debugger.getFrame(cx, dscript); } if (idata.itsFunctionType != 0) { if (fnOrScript.itsClosure != null) { scope = fnOrScript.itsClosure; } else if (!idata.itsUseDynamicScope) { 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 { scope = ScriptRuntime.initScript(cx, scope, fnOrScript, thisObj, idata.itsFromEvalCode); } if (idata.itsNestedFunctions != null) { if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) Context.codeBug(); for (int i = 0; i < idata.itsNestedFunctions.length; i++) { createFunctionObject(idata.itsNestedFunctions[i], scope, idata.itsFromEvalCode); } } 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); } Object result = undefined; byte[] iCode = idata.itsICode; String[] strings = idata.itsStringTable; int pc = 0; int pcPrevBranch = pc; final int instructionThreshold = cx.instructionThreshold; // During function call this will be set to -1 so catch can properly // adjust it int instructionCount = cx.instructionCount; // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; Loop: while (true) { try { switch (iCode[pc] & 0xff) { // Back indent to ease imlementation reading case TokenStream.ENDTRY : tryStackTop--; break; case TokenStream.TRY : stack[TRY_STACK_SHFT + tryStackTop] = scope; sDbl[TRY_STACK_SHFT + tryStackTop] = (double)pc; ++tryStackTop; // Skip starting pc of catch/finally blocks pc += 4; break; case TokenStream.GE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl <= lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.LE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl <= rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.GT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl < lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.LT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl < rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.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; break; } case TokenStream.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(scope, lhs, rhs); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.EQ : { --stackTop; boolean valBln = do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.NE : { --stackTop; boolean valBln = !do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.SHEQ : { --stackTop; boolean valBln = do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.SHNE : { --stackTop; boolean valBln = !do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.IFNE : { Object val = stack[stackTop]; boolean valBln; if (val != DBL_MRK) { valBln = !ScriptRuntime.toBoolean(val); } else { double valDbl = sDbl[stackTop]; valBln = !(valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; } case TokenStream.IFEQ : { boolean valBln; Object val = stack[stackTop]; if (val != DBL_MRK) { valBln = ScriptRuntime.toBoolean(val); } else { double valDbl = sDbl[stackTop]; valBln = (valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; } case TokenStream.GOTO : if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.GOSUB : sDbl[++stackTop] = pc + 3; if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.RETSUB : { int slot = (iCode[pc + 1] & 0xFF); if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = (int)sDbl[LOCAL_SHFT + slot]; continue; } case TokenStream.POP : stackTop--; break; case TokenStream.DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; break; case TokenStream.POPV : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break; case TokenStream.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break Loop; case RETURN_UNDEF_ICODE : result = undefined; break Loop; case END_ICODE: break Loop; case TokenStream.BITNOT : { int rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; break; } case TokenStream.BITAND : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; break; } case TokenStream.BITOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; break; } case TokenStream.BITXOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; break; } case TokenStream.LSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; break; } case TokenStream.RSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; break; } case TokenStream.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; break; } case TokenStream.ADD : --stackTop; do_add(stack, sDbl, stackTop); break; case TokenStream.SUB : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; break; } case TokenStream.NEG : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; break; } case TokenStream.POS : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; break; } case TokenStream.MUL : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; break; } case TokenStream.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; break; } case TokenStream.MOD : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; break; } case TokenStream.BINDNAME : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.bind(scope, name); pc += 2; break; } case TokenStream.GETBASE : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.getBase(scope, name); pc += 2; break; } case TokenStream.SETNAME : { String name = strings[getShort(iCode, pc + 1)]; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; // what about class cast exception here for lhs? Scriptable lhs = (Scriptable)stack[stackTop]; stack[stackTop] = ScriptRuntime.setName(lhs, rhs, scope, name); pc += 2; break; } case TokenStream.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(lhs, rhs); break; } case TokenStream.GETPROP : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; } case TokenStream.SETPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; } case TokenStream.GETELEM : do_getElem(cx, stack, sDbl, stackTop, scope); --stackTop; break; case TokenStream.SETELEM : do_setElem(cx, stack, sDbl, stackTop, scope); stackTop -= 2; break; case TokenStream.PROPINC : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrement(lhs, name, scope); break; } case TokenStream.PROPDEC : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrement(lhs, name, scope); break; } case TokenStream.ELEMINC : { 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.postIncrementElem(lhs, rhs, scope); break; } case TokenStream.ELEMDEC : { 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.postDecrementElem(lhs, rhs, scope); break; } case TokenStream.GETTHIS : { Scriptable lhs = (Scriptable)stack[stackTop]; stack[stackTop] = ScriptRuntime.getThis(lhs); break; } case TokenStream.NEWTEMP : { int slot = (iCode[++pc] & 0xFF); stack[LOCAL_SHFT + slot] = stack[stackTop]; sDbl[LOCAL_SHFT + slot] = sDbl[stackTop]; break; } case TokenStream.USETEMP : { int slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + slot]; sDbl[stackTop] = sDbl[LOCAL_SHFT + slot]; break; } case TokenStream.CALLSPECIAL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int lineNum = getShort(iCode, pc + 1); String name = strings[getShort(iCode, pc + 3)]; int count = getShort(iCode, pc + 5); stackTop -= count; Object[] outArgs = getArgsArray(stack, sDbl, stackTop + 1, count); 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.callSpecial( cx, lhs, rhs, outArgs, thisObj, scope, name, lineNum); pc += 6; instructionCount = cx.instructionCount; break; } case TokenStream.CALL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } cx.instructionCount = instructionCount; int count = getShort(iCode, pc + 3); stackTop -= count; 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, count, f, f.itsData); } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, count); stack[stackTop] = f.call(cx, calleeScope, calleeThis, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined int i = getShort(iCode, pc + 1); if (i != -1) lhs = strings[i]; } throw NativeGlobal.typeError1 ("msg.isnt.function", ScriptRuntime.toString(lhs), calleeScope); } pc += 4; instructionCount = cx.instructionCount; break; } case TokenStream.NEW : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int count = getShort(iCode, pc + 3); stackTop -= count; 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, count, 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, count); stack[stackTop] = f.construct(cx, scope, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined int i = getShort(iCode, pc + 1); if (i != -1) lhs = strings[i]; } throw NativeGlobal.typeError1 ("msg.isnt.function", ScriptRuntime.toString(lhs), scope); } pc += 4; instructionCount = cx.instructionCount; break; } case TokenStream.TYPEOF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); break; } case TokenStream.TYPEOFNAME : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; } case TokenStream.STRING : stack[++stackTop] = strings[getShort(iCode, pc + 1)]; pc += 2; break; case SHORTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc + 1); pc += 2; break; case INTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc + 1); pc += 4; break; case TokenStream.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = idata.itsDoubleTable[getShort(iCode, pc + 1)]; pc += 2; break; case TokenStream.NAME : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.name(scope, name); pc += 2; break; } case TokenStream.NAMEINC : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.postIncrement(scope, name); pc += 2; break; } case TokenStream.NAMEDEC : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.postDecrement(scope, name); pc += 2; break; } case TokenStream.SETVAR : { int slot = (iCode[++pc] & 0xFF); if (!useActivationVars) { stack[VAR_SHFT + slot] = stack[stackTop]; sDbl[VAR_SHFT + slot] = sDbl[stackTop]; } else { Object val = stack[stackTop]; if (val == DBL_MRK) val = doubleWrap(sDbl[stackTop]); activationPut(fnOrScript, scope, slot, val); } break; } case TokenStream.GETVAR : { int slot = (iCode[++pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; } else { stack[stackTop] = activationGet(fnOrScript, scope, slot); } break; } case TokenStream.VARINC : { int slot = (iCode[++pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) + 1.0; } else { Object val = activationGet(fnOrScript, scope, slot); stack[stackTop] = val; val = doubleWrap(ScriptRuntime.toNumber(val) + 1.0); activationPut(fnOrScript, scope, slot, val); } break; } case TokenStream.VARDEC : { int slot = (iCode[++pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) - 1.0; } else { Object val = activationGet(fnOrScript, scope, slot); stack[stackTop] = val; val = doubleWrap(ScriptRuntime.toNumber(val) - 1.0); activationPut(fnOrScript, scope, slot, val); } break; } case TokenStream.ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; break; case TokenStream.ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; break; case TokenStream.NULL : stack[++stackTop] = null; break; case TokenStream.THIS : stack[++stackTop] = thisObj; break; case TokenStream.THISFN : stack[++stackTop] = fnOrScript; break; case TokenStream.FALSE : stack[++stackTop] = Boolean.FALSE; break; case TokenStream.TRUE : stack[++stackTop] = Boolean.TRUE; break; case TokenStream.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case TokenStream.THROW : { Object exception = stack[stackTop]; if (exception == DBL_MRK) exception = doubleWrap(sDbl[stackTop]); --stackTop; throw new JavaScriptException(exception); } case TokenStream.JTHROW : { Object exception = stack[stackTop]; // No need to check for DBL_MRK: exception must be Exception --stackTop; if (exception instanceof JavaScriptException) throw (JavaScriptException)exception; else throw (RuntimeException)exception; } case TokenStream.ENTERWITH : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); break; } case TokenStream.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); break; case TokenStream.NEWSCOPE : stack[++stackTop] = ScriptRuntime.newScope(); break; case TokenStream.ENUMINIT : { int slot = (iCode[++pc] & 0xFF); Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + slot] = ScriptRuntime.initEnum(lhs, scope); break; } case TokenStream.ENUMNEXT : { int slot = (iCode[++pc] & 0xFF); Object val = stack[LOCAL_SHFT + slot]; ++stackTop; stack[stackTop] = ScriptRuntime.nextEnum(val); break; } case TokenStream.GETPROTO : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProto(lhs, scope); break; } case TokenStream.GETPARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs); break; } case TokenStream.GETSCOPEPARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs, scope); break; } case TokenStream.SETPROTO : { 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.setProto(lhs, rhs, scope); break; } case TokenStream.SETPARENT : { 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.setParent(lhs, rhs, scope); break; } case TokenStream.SCOPE : stack[++stackTop] = scope; break; case TokenStream.CLOSURE : { int i = getShort(iCode, pc + 1); InterpretedFunction f = idata.itsNestedFunctions[i]; InterpretedFunction closure = new InterpretedFunction(f, scope, cx); createFunctionObject(closure, scope, idata.itsFromEvalCode); stack[++stackTop] = closure; pc += 2; break; } case TokenStream.REGEXP : { int i = getShort(iCode, pc + 1); stack[++stackTop] = idata.itsRegExpLiterals[i]; pc += 2; break; } case SOURCEFILE_ICODE : cx.interpreterSourceFile = idata.itsSourceFile; break; case LINE_ICODE : { int line = getShort(iCode, pc + 1); cx.interpreterLine = line; if (debuggerFrame != null) { debuggerFrame.onLineChange(cx, line); } pc += 2; break; } default : { dumpICode(idata); throw new RuntimeException ("Unknown icode : "+(iCode[pc] & 0xff)+" @ pc : "+pc); } // end of interpreter switch } pc++; } catch (Throwable ex) { if (instructionThreshold != 0) { if (instructionCount < 0) { // throw during function call instructionCount = cx.instructionCount; } else { // throw during any other operation instructionCount += pc - pcPrevBranch; cx.instructionCount = instructionCount; } } final int SCRIPT_THROW = 0, ECMA = 1, RUNTIME = 2, OTHER = 3; int exType; Object catchObj = ex; // Object seen by script catch for (;;) { if (catchObj instanceof JavaScriptException) { catchObj = ScriptRuntime.unwrapJavaScriptException ((JavaScriptException)catchObj); exType = SCRIPT_THROW; } else if (catchObj instanceof EcmaError) { // an offical ECMA error object, catchObj = ((EcmaError)catchObj).getErrorObject(); exType = ECMA; } else if (catchObj instanceof RuntimeException) { if (catchObj instanceof WrappedException) { Object w = ((WrappedException) catchObj).unwrap(); if (w instanceof Throwable) { catchObj = ex = (Throwable) w; continue; } } catchObj = null; // script can not catch this exType = RUNTIME; } else { // Error instance catchObj = null; // script can not catch this exType = OTHER; } break; } if (exType != OTHER && debuggerFrame != null) { debuggerFrame.onExceptionThrown(cx, ex); } boolean rethrow = true; if (exType != OTHER && tryStackTop > 0) { // Do not allow for JS to interfere with Error instances // (exType == OTHER), as they can be used to terminate // long running script --tryStackTop; int try_pc = (int)sDbl[TRY_STACK_SHFT + tryStackTop]; if (exType == SCRIPT_THROW || exType == ECMA) { // Allow JS to catch only JavaScriptException and // EcmaError int catch_offset = getShort(iCode, try_pc + 1); if (catch_offset != 0) { // Has catch block rethrow = false; pc = try_pc + catch_offset; stackTop = STACK_SHFT; stack[stackTop] = catchObj; } } if (rethrow) { int finally_offset = getShort(iCode, try_pc + 3); if (finally_offset != 0) { // has finally block rethrow = false; pc = try_pc + finally_offset; stackTop = STACK_SHFT; stack[stackTop] = ex; } } } if (rethrow) { if (debuggerFrame != null) { debuggerFrame.onExit(cx, true, ex); } if (idata.itsNeedsActivation) { ScriptRuntime.popActivation(cx); } if (exType == SCRIPT_THROW) throw (JavaScriptException)ex; if (exType == ECMA || exType == RUNTIME) throw (RuntimeException)ex; throw (Error)ex; } // We caught an exception, // Notify instruction observer if necessary // and point pcPrevBranch to start of catch/finally block if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { // Note: this can throw Error cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc; // restore scope at try point scope = (Scriptable)stack[TRY_STACK_SHFT + tryStackTop]; } } if (debuggerFrame != null) { debuggerFrame.onExit(cx, false, result); } if (idata.itsNeedsActivation) { ScriptRuntime.popActivation(cx); } if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } cx.instructionCount = instructionCount; } return result; } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/85132aacd6645eb0864e9deff934a25c44792a21/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... |
C_Term self = distType.self(); | C_Var self = distType.self(); | private X10ParsedClassType transferAttributes(X10ParsedClassType t, X10ParsedClassType distType) { //Report.report(1, "ArrayConstructor: transferring attributes from " + distType // + " to " + t); C_Term self = distType.self(); if (self != null) { t.setDistribution(self); } C_Term onePlace = distType.onePlace(); if (onePlace !=null) { t.setOnePlace(onePlace); //Report.report(1, "Setting oneplace result is " + t); } boolean isRect = distType.isRect(); if (isRect) t.setRect(); boolean zeroBased = distType.isZeroBased(); //Report.report(1, "ArrayConstructor zeroBased? " + zeroBased); if (zeroBased){ t.setZeroBased(); } C_Term rank = distType.rank(); if (rank !=null) t.setRank(rank); if (t.hasLocalProperty() && zeroBased && isRect && C_Lit.ONE.equals(rank)) t.setRail(); //Report.report(1, "t is now " + t); return t; } | 1832 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1832/06304835049655f4d36cb3ccb10bdc8623791da8/ArrayConstructor_c.java/buggy/x10.compiler/src/polyglot/ext/x10/ast/ArrayConstructor_c.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1139,
2163,
11257,
18328,
7412,
2498,
12,
60,
2163,
11257,
18328,
268,
16,
1139,
2163,
11257,
18328,
2411,
559,
13,
288,
202,
202,
759,
4820,
18,
6006,
12,
21,
16,
315,
1076,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1139,
2163,
11257,
18328,
7412,
2498,
12,
60,
2163,
11257,
18328,
268,
16,
1139,
2163,
11257,
18328,
2411,
559,
13,
288,
202,
202,
759,
4820,
18,
6006,
12,
21,
16,
315,
1076,
... |
public org.quickfix.field.OrdRejReason getOrdRejReason() throws FieldNotFound { org.quickfix.field.OrdRejReason value = new org.quickfix.field.OrdRejReason(); | public quickfix.field.OrdRejReason getOrdRejReason() throws FieldNotFound { quickfix.field.OrdRejReason value = new quickfix.field.OrdRejReason(); | public org.quickfix.field.OrdRejReason getOrdRejReason() throws FieldNotFound { org.quickfix.field.OrdRejReason value = new org.quickfix.field.OrdRejReason(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/ListStatus.java/buggy/src/java/src/quickfix/fix43/ListStatus.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
15383,
426,
78,
8385,
10117,
72,
426,
78,
8385,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
15383,
426,
78,
8385,
460... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
15383,
426,
78,
8385,
10117,
72,
426,
78,
8385,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
15383,
426,
78,
8385,
460... |
if (action == null) throw new NullPointerException(); | if (action == null) { throw new NullPointerException(); } | public ActionHandler(IAction action) { if (action == null) throw new NullPointerException(); this.action = action; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/ActionHandler.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ActionHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4382,
1503,
12,
45,
1803,
1301,
13,
288,
3639,
309,
261,
1128,
422,
446,
13,
5411,
604,
394,
10108,
5621,
3639,
333,
18,
1128,
273,
1301,
31,
565,
289,
2,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4382,
1503,
12,
45,
1803,
1301,
13,
288,
3639,
309,
261,
1128,
422,
446,
13,
5411,
604,
394,
10108,
5621,
3639,
333,
18,
1128,
273,
1301,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
... |
private static String toISOString( String s ) { String ISOString = s; if ( s != null ) { try { ISOString = new String( s.getBytes( "UTF-8" ), "ISO-8859-1" ); //$NON-NLS-1$ //$NON-NLS-2$ } catch ( UnsupportedEncodingException e ) { ISOString = s; } } return ISOString; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/4f8d9ec70a9a4bdebe627870db17ed54ddb4e8ef/ParameterAccessor.java/clean/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/utility/ParameterAccessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
514,
358,
12609,
780,
12,
514,
272,
262,
202,
95,
202,
202,
780,
9351,
780,
273,
272,
31,
9506,
202,
430,
261,
272,
480,
446,
262,
202,
202,
95,
1082,
202,
698,
1082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
514,
358,
12609,
780,
12,
514,
272,
262,
202,
95,
202,
202,
780,
9351,
780,
273,
272,
31,
9506,
202,
430,
261,
272,
480,
446,
262,
202,
202,
95,
1082,
202,
698,
1082,
... | ||
public static IRubyObject s_kill(ThreadClass rubyThread) { | public static IRubyObject s_kill(IRubyObject receiver, ThreadClass rubyThread) { | public static IRubyObject s_kill(ThreadClass rubyThread) { return rubyThread.kill(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/21ee4566272339487c6a2a51963250c4edafd9d8/ThreadClass.java/clean/src/org/jruby/ThreadClass.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15908,
10340,
921,
272,
67,
16418,
12,
7937,
10340,
921,
5971,
16,
4884,
797,
22155,
3830,
13,
288,
377,
202,
2463,
22155,
3830,
18,
16418,
5621,
565,
289,
2,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15908,
10340,
921,
272,
67,
16418,
12,
7937,
10340,
921,
5971,
16,
4884,
797,
22155,
3830,
13,
288,
377,
202,
2463,
22155,
3830,
18,
16418,
5621,
565,
289,
2,
-100,
-100,
-100,... |
else if (!ignoreMethod(ident) && (parentStream instanceof SIRStream)) | else if (ident.equals("initPath")) { if (!(parentStream instanceof SIRFeedbackLoop)) at.dms.util.Utils.fail("initPath declared for non-Feedbackloop"); ((SIRFeedbackLoop)parentStream).setInitPath(new JMethodDeclaration(null, modifiers, returnType, ident, parameters, exceptions, body, null, null)); } else if (!ignoreMethodDeclaration(ident) && (parentStream instanceof SIRStream)) | public Object visitMethodDeclaration(JMethodDeclaration self, int modifiers, CType returnType, String ident, JFormalParameter[] parameters, CClassType[] exceptions, JBlock body) { printMe("MethodDeclaration: " + ident); if (parameters.length == 0) parameters = JFormalParameter.EMPTY; for (int i = 0; i < parameters.length; i++) trash = parameters[i].accept(this); body = (JBlock)body.accept(this); if (exceptions.length == 0) exceptions = CClassType.EMPTY; /*Install work functio*/ if (ident.equals("work")) { if (parentStream instanceof SIRFilter) { ((SIRFilter)parentStream).setWork(new JMethodDeclaration(null, modifiers, returnType, ident, parameters, exceptions, body, null, null)); } else at.dms.util.Utils.fail("Work Function Declared for Non-Filter"); } /*Install init function for filter*/ else if (ident.equals("init") && (parentStream instanceof SIRFilter)) { ((SIRFilter)parentStream).setInit(new JMethodDeclaration(null, modifiers, returnType, ident, parameters, exceptions, body, null, null)); } else if (!ignoreMethod(ident) && (parentStream instanceof SIRStream)) ((SIRStream)parentStream).addMethod(new JMethodDeclaration(null, modifiers, returnType, ident, parameters, exceptions, body, null, null)); return self; } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/5373e53b039f90d3d14add456ce20b98d546e598/Kopi2SIR.java/buggy/streams/src/at/dms/kjc/Kopi2SIR.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
25138,
6094,
12,
46,
1305,
6094,
365,
16,
4766,
4202,
509,
10429,
16,
4766,
4202,
385,
559,
9424,
16,
4766,
4202,
514,
3390,
16,
4766,
4202,
804,
13985,
8526,
1472,
16,
4766,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
25138,
6094,
12,
46,
1305,
6094,
365,
16,
4766,
4202,
509,
10429,
16,
4766,
4202,
385,
559,
9424,
16,
4766,
4202,
514,
3390,
16,
4766,
4202,
804,
13985,
8526,
1472,
16,
4766,
... |
MasterDetailObservables.detailValue( selectedAdventureObservable, BeansObservables .valueFactory(realm, "name"), String.class), null); | BeansObservables.observeDetailValue(realm, selectedAdventureObservable, "name", String.class), null); | public void testScenario03() { // List adventures and for the selected adventure allow its default // lodging�s name and description to be changed in text controls. If // there is no selected adventure or the default lodging is null the // text controls are disabled. This is a nested property. The default // lodging can be changed elsewhere, and the list final Catalog catalog = SampleData.CATALOG_2005; final ListViewer categoryListViewer = new ListViewer(getComposite(), SWT.BORDER); categoryListViewer.getList().setLayoutData( new GridData(SWT.FILL, SWT.FILL, false, false)); categoryListViewer.setLabelProvider(new LabelProvider() { public String getText(Object element) { return ((Category) element).getName(); } }); categoryListViewer .setContentProvider(new ObservableListContentProvider()); categoryListViewer.setInput(BeansObservables.observeList(realm, catalog, "categories")); assertArrayEquals(catalog.getCategories(), getViewerContent( categoryListViewer).toArray()); final IObservableValue selectedCategoryObservable = ViewersObservables .observeSingleSelection(categoryListViewer); final ListViewer adventureListViewer = new ListViewer(getComposite(), SWT.BORDER); adventureListViewer.getList().setLayoutData( new GridData(SWT.FILL, SWT.FILL, false, false)); adventureListViewer.setLabelProvider(new LabelProvider() { public String getText(Object element) { return ((Adventure) element).getName(); } }); adventureListViewer .setContentProvider(new ObservableListContentProvider()); adventureListViewer.setInput(MasterDetailObservables.detailList( selectedCategoryObservable, BeansObservables.listFactory( realm, "adventures"), Adventure.class)); ComputedValue categorySelectionExistsObservable = new ComputedValue() { protected Object calculate() { return new Boolean( selectedCategoryObservable.getValue() != null); } }; getDbc().bindValue( SWTObservables.observeEnabled(adventureListViewer.getList()), categorySelectionExistsObservable, null); final IObservableValue selectedAdventureObservable = ViewersObservables .observeSingleSelection(adventureListViewer); ComputedValue adventureSelectionExistsObservable = new ComputedValue() { protected Object calculate() { return new Boolean( selectedAdventureObservable.getValue() != null); } }; final Text txtName = new Text(getComposite(), SWT.BORDER); getDbc().bindValue(SWTObservables.observeEnabled(txtName), adventureSelectionExistsObservable, null); getDbc().bindValue( SWTObservables.observeText(txtName, SWT.Modify), MasterDetailObservables.detailValue( selectedAdventureObservable, BeansObservables .valueFactory(realm, "name"), String.class), null); assertEquals(txtName.getText(), ""); assertFalse(txtName.getEnabled()); final Text txtDescription = new Text(getComposite(), SWT.BORDER); getDbc().bindValue(SWTObservables.observeEnabled(txtDescription), adventureSelectionExistsObservable, null); getDbc().bindValue( SWTObservables.observeText(txtDescription, SWT.Modify), MasterDetailObservables.detailValue( selectedAdventureObservable, BeansObservables .valueFactory(realm, "description"), String.class), null); assertFalse(adventureListViewer.getList().isEnabled()); categoryListViewer.setSelection(new StructuredSelection( SampleData.SUMMER_CATEGORY)); assertTrue(adventureListViewer.getList().isEnabled()); assertFalse(txtName.getEnabled()); adventureListViewer.setSelection(new StructuredSelection( SampleData.RAFTING_HOLIDAY)); assertEquals(Boolean.TRUE, adventureSelectionExistsObservable.getValue()); assertTrue(txtName.getEnabled()); assertEquals(SampleData.RAFTING_HOLIDAY.getName(), txtName.getText()); categoryListViewer.setSelection(new StructuredSelection( SampleData.WINTER_CATEGORY)); assertTrue(adventureListViewer.getList().isEnabled()); assertFalse(txtName.getEnabled()); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/a469cb14d7815f1d5dea6c4a44ea9ea80e229bed/MasterDetailScenarios.java/clean/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/MasterDetailScenarios.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
21390,
4630,
1435,
288,
202,
202,
759,
987,
1261,
616,
1823,
471,
364,
326,
3170,
1261,
616,
594,
1699,
2097,
805,
202,
202,
759,
328,
369,
1998,
176,
128,
126,
87,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21390,
4630,
1435,
288,
202,
202,
759,
987,
1261,
616,
1823,
471,
364,
326,
3170,
1261,
616,
594,
1699,
2097,
805,
202,
202,
759,
328,
369,
1998,
176,
128,
126,
87,... |
encodingSize = 1 + EncodingUtils.encodedDoubleLength(); | encodingSize += EncodingUtils.encodedDoubleLength(); | private static int getEncodingSize(String name, Object value) { int encodingSize; char propertyPrefix = name.charAt(0); switch (propertyPrefix) { case BOOLEAN_PROPERTY_PREFIX: encodingSize = 1 + EncodingUtils.encodedBooleanLength(); break; case BYTE_PROPERTY_PREFIX: encodingSize = 1 + EncodingUtils.encodedByteLength(); break; case SHORT_PROPERTY_PREFIX: encodingSize = 1 + EncodingUtils.encodedShortLength(); break; case INT_PROPERTY_PREFIX: encodingSize = 1 + EncodingUtils.encodedIntegerLength(); break; case LONG_PROPERTY_PREFIX: encodingSize = 1 + EncodingUtils.encodedLongLength(); break; case FLOAT_PROPERTY_PREFIX: encodingSize = 1 + EncodingUtils.encodedFloatLength(); break; case DOUBLE_PROPERTY_PREFIX: encodingSize = 1 + EncodingUtils.encodedDoubleLength(); break; case AMQP_WIDE_STRING_PROPERTY_PREFIX: //case AMQP_STRING_PROPERTY_PREFIX: case STRING_PROPERTY_PREFIX: encodingSize = 1 + EncodingUtils.encodedLongStringLength((String) value); break; //case AMQP_ASCII_STRING_PROPERTY_PREFIX: case CHAR_PROPERTY_PREFIX: encodingSize = 1 + EncodingUtils.encodedShortStringLength("" + (Character) value); break; case BYTES_PROPERTY_PREFIX: encodingSize = 1 + ((byte[]) value).length; break; case XML_PROPERTY_PREFIX: encodingSize = 1 + EncodingUtils.encodedLongStringLength(valueAsXML(name, value)); break; default: //encodingSize = 1 + EncodingUtils.encodedLongStringLength(String.valueOf(value)); // We are using XML String encoding throw new IllegalArgumentException("Unsupported type in field table: " + value.getClass()); }// the extra byte for the type indicator is calculated in the name return encodingSize; } | 45585 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45585/f03bf5db1d823c8c01435eea6dc1f5ab6feac265/PropertyFieldTable.java/clean/qpid/java/common/src/main/java/org/apache/qpid/framing/PropertyFieldTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
509,
29505,
1225,
12,
780,
508,
16,
1033,
460,
13,
565,
288,
3639,
509,
2688,
1225,
31,
3639,
1149,
1272,
2244,
273,
508,
18,
3001,
861,
12,
20,
1769,
3639,
1620,
261,
4468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
509,
29505,
1225,
12,
780,
508,
16,
1033,
460,
13,
565,
288,
3639,
509,
2688,
1225,
31,
3639,
1149,
1272,
2244,
273,
508,
18,
3001,
861,
12,
20,
1769,
3639,
1620,
261,
4468,
... |
new Test("KANNADA-MALAYALAM", TestUtility.KANNADA_SCRIPT, TestUtility.MALAYALAM_SCRIPT ) | new Test("KANNADA-MALAYALAM") | public void TestKannadaMalayalam() throws IOException, ParseException { new Test("MALAYALAM-KANNADA", TestUtility.MALAYALAM_SCRIPT, TestUtility.KANNADA_SCRIPT) .test("[:MALAYALAM:]", "[:KANNADA:]", "[\u0cDe]", /*roundtrip exclusions*/ this, new Legal()); new Test("KANNADA-MALAYALAM", TestUtility.KANNADA_SCRIPT, TestUtility.MALAYALAM_SCRIPT ) .test( "[:KANNADA:]", "[:MALAYALAM:]", "[\u0D34]", /*roundtrip exclusions*/ this, new Legal()); } | 5620 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5620/8700d4e6930488562c21318f17514cc50d94d5e4/RoundTripTest.java/clean/icu4j/src/com/ibm/icu/dev/test/translit/RoundTripTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
7766,
47,
1072,
16524,
49,
287,
528,
287,
301,
1435,
1216,
1860,
16,
10616,
288,
3639,
394,
7766,
2932,
49,
1013,
5255,
1013,
2192,
17,
47,
11489,
1880,
37,
3113,
6647,
7766,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7766,
47,
1072,
16524,
49,
287,
528,
287,
301,
1435,
1216,
1860,
16,
10616,
288,
3639,
394,
7766,
2932,
49,
1013,
5255,
1013,
2192,
17,
47,
11489,
1880,
37,
3113,
6647,
7766,
... |
case 354 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new ClassOrInterfaceType..."); } | case 355 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new ClassOrInterfaceType..."); } | protected void consumeRule(int act) { switch ( act ) { case 27 : if (DEBUG) { System.out.println("Type ::= PrimitiveType"); } //$NON-NLS-1$ consumePrimitiveType(); break; case 41 : if (DEBUG) { System.out.println("ReferenceType ::= ClassOrInterfaceType"); } //$NON-NLS-1$ consumeReferenceType(); break; case 45 : if (DEBUG) { System.out.println("ClassOrInterface ::= Name"); } //$NON-NLS-1$ consumeClassOrInterfaceName(); break; case 46 : if (DEBUG) { System.out.println("ClassOrInterface ::= GenericType DOT Name"); } //$NON-NLS-1$ consumeClassOrInterface(); break; case 47 : if (DEBUG) { System.out.println("GenericType ::= ClassOrInterface TypeArguments"); } //$NON-NLS-1$ consumeGenericType(); break; case 48 : if (DEBUG) { System.out.println("ArrayTypeWithTypeArgumentsName ::= GenericType DOT Name"); } //$NON-NLS-1$ consumeArrayTypeWithTypeArgumentsName(); break; case 49 : if (DEBUG) { System.out.println("ArrayType ::= PrimitiveType Dims"); } //$NON-NLS-1$ consumePrimitiveArrayType(); break; case 50 : if (DEBUG) { System.out.println("ArrayType ::= Name Dims"); } //$NON-NLS-1$ consumeNameArrayType(); break; case 51 : if (DEBUG) { System.out.println("ArrayType ::= ArrayTypeWithTypeArgumentsName Dims"); } //$NON-NLS-1$ consumeGenericTypeNameArrayType(); break; case 52 : if (DEBUG) { System.out.println("ArrayType ::= GenericType Dims"); } //$NON-NLS-1$ consumeGenericTypeArrayType(); break; case 57 : if (DEBUG) { System.out.println("QualifiedName ::= Name DOT SimpleName"); } //$NON-NLS-1$ consumeQualifiedName(); break; case 58 : if (DEBUG) { System.out.println("CompilationUnit ::= EnterCompilationUnit..."); } //$NON-NLS-1$ consumeCompilationUnit(); break; case 59 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration"); } //$NON-NLS-1$ consumeInternalCompilationUnit(); break; case 60 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$ consumeInternalCompilationUnit(); break; case 61 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$ consumeInternalCompilationUnitWithTypes(); break; case 62 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$ consumeInternalCompilationUnitWithTypes(); break; case 63 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); } //$NON-NLS-1$ consumeInternalCompilationUnit(); break; case 64 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= TypeDeclarations"); } //$NON-NLS-1$ consumeInternalCompilationUnitWithTypes(); break; case 65 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); } //$NON-NLS-1$ consumeInternalCompilationUnitWithTypes(); break; case 66 : if (DEBUG) { System.out.println("InternalCompilationUnit ::="); } //$NON-NLS-1$ consumeEmptyInternalCompilationUnit(); break; case 67 : if (DEBUG) { System.out.println("ReduceImports ::="); } //$NON-NLS-1$ consumeReduceImports(); break; case 68 : if (DEBUG) { System.out.println("EnterCompilationUnit ::="); } //$NON-NLS-1$ consumeEnterCompilationUnit(); break; case 83 : if (DEBUG) { System.out.println("CatchHeader ::= catch LPAREN FormalParameter RPAREN..."); } //$NON-NLS-1$ consumeCatchHeader(); break; case 85 : if (DEBUG) { System.out.println("ImportDeclarations ::= ImportDeclarations..."); } //$NON-NLS-1$ consumeImportDeclarations(); break; case 87 : if (DEBUG) { System.out.println("TypeDeclarations ::= TypeDeclarations TypeDeclaration"); } //$NON-NLS-1$ consumeTypeDeclarations(); break; case 88 : if (DEBUG) { System.out.println("PackageDeclaration ::= PackageDeclarationName SEMICOLON"); } //$NON-NLS-1$ consumePackageDeclaration(); break; case 89 : if (DEBUG) { System.out.println("PackageDeclarationName ::= Modifiers package..."); } //$NON-NLS-1$ consumePackageDeclarationNameWithModifiers(); break; case 90 : if (DEBUG) { System.out.println("PackageDeclarationName ::= package Name"); } //$NON-NLS-1$ consumePackageDeclarationName(); break; case 95 : if (DEBUG) { System.out.println("SingleTypeImportDeclaration ::=..."); } //$NON-NLS-1$ consumeImportDeclaration(); break; case 96 : if (DEBUG) { System.out.println("SingleTypeImportDeclarationName ::= import Name"); } //$NON-NLS-1$ consumeSingleTypeImportDeclarationName(); break; case 97 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclaration ::=..."); } //$NON-NLS-1$ consumeImportDeclaration(); break; case 98 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclarationName ::= import Name DOT..."); } //$NON-NLS-1$ consumeTypeImportOnDemandDeclarationName(); break; case 101 : if (DEBUG) { System.out.println("TypeDeclaration ::= SEMICOLON"); } //$NON-NLS-1$ consumeEmptyTypeDeclaration(); break; case 105 : if (DEBUG) { System.out.println("Modifiers ::= Modifiers Modifier"); } //$NON-NLS-1$ consumeModifiers2(); break; case 117 : if (DEBUG) { System.out.println("Modifier ::= Annotation"); } //$NON-NLS-1$ consumeAnnotationAsModifier(); break; case 118 : if (DEBUG) { System.out.println("ClassDeclaration ::= ClassHeader ClassBody"); } //$NON-NLS-1$ consumeClassDeclaration(); break; case 119 : if (DEBUG) { System.out.println("ClassHeader ::= ClassHeaderName ClassHeaderExtendsopt..."); } //$NON-NLS-1$ consumeClassHeader(); break; case 120 : if (DEBUG) { System.out.println("ClassHeaderName ::= ClassHeaderName1 TypeParameters"); } //$NON-NLS-1$ consumeTypeHeaderNameWithTypeParameters(); break; case 122 : if (DEBUG) { System.out.println("ClassHeaderName1 ::= Modifiersopt class Identifier"); } //$NON-NLS-1$ consumeClassHeaderName1(); break; case 123 : if (DEBUG) { System.out.println("ClassHeaderExtends ::= extends ClassType"); } //$NON-NLS-1$ consumeClassHeaderExtends(); break; case 124 : if (DEBUG) { System.out.println("ClassHeaderImplements ::= implements InterfaceTypeList"); } //$NON-NLS-1$ consumeClassHeaderImplements(); break; case 126 : if (DEBUG) { System.out.println("InterfaceTypeList ::= InterfaceTypeList COMMA..."); } //$NON-NLS-1$ consumeInterfaceTypeList(); break; case 127 : if (DEBUG) { System.out.println("InterfaceType ::= ClassOrInterfaceType"); } //$NON-NLS-1$ consumeInterfaceType(); break; case 130 : if (DEBUG) { System.out.println("ClassBodyDeclarations ::= ClassBodyDeclarations..."); } //$NON-NLS-1$ consumeClassBodyDeclarations(); break; case 134 : if (DEBUG) { System.out.println("ClassBodyDeclaration ::= Diet NestedMethod Block"); } //$NON-NLS-1$ consumeClassBodyDeclaration(); break; case 135 : if (DEBUG) { System.out.println("Diet ::="); } //$NON-NLS-1$ consumeDiet(); break; case 136 : if (DEBUG) { System.out.println("Initializer ::= Diet NestedMethod Block"); } //$NON-NLS-1$ consumeClassBodyDeclaration(); break; case 143 : if (DEBUG) { System.out.println("ClassMemberDeclaration ::= SEMICOLON"); } //$NON-NLS-1$ consumeEmptyClassMemberDeclaration(); break; case 146 : if (DEBUG) { System.out.println("FieldDeclaration ::= Modifiersopt Type..."); } //$NON-NLS-1$ consumeFieldDeclaration(); break; case 148 : if (DEBUG) { System.out.println("VariableDeclarators ::= VariableDeclarators COMMA..."); } //$NON-NLS-1$ consumeVariableDeclarators(); break; case 151 : if (DEBUG) { System.out.println("EnterVariable ::="); } //$NON-NLS-1$ consumeEnterVariable(); break; case 152 : if (DEBUG) { System.out.println("ExitVariableWithInitialization ::="); } //$NON-NLS-1$ consumeExitVariableWithInitialization(); break; case 153 : if (DEBUG) { System.out.println("ExitVariableWithoutInitialization ::="); } //$NON-NLS-1$ consumeExitVariableWithoutInitialization(); break; case 154 : if (DEBUG) { System.out.println("ForceNoDiet ::="); } //$NON-NLS-1$ consumeForceNoDiet(); break; case 155 : if (DEBUG) { System.out.println("RestoreDiet ::="); } //$NON-NLS-1$ consumeRestoreDiet(); break; case 160 : if (DEBUG) { System.out.println("MethodDeclaration ::= MethodHeader MethodBody"); } //$NON-NLS-1$ // set to true to consume a method with a body consumeMethodDeclaration(true); break; case 161 : if (DEBUG) { System.out.println("AbstractMethodDeclaration ::= MethodHeader SEMICOLON"); } //$NON-NLS-1$ // set to false to consume a method without body consumeMethodDeclaration(false); break; case 162 : if (DEBUG) { System.out.println("MethodHeader ::= MethodHeaderName FormalParameterListopt"); } //$NON-NLS-1$ consumeMethodHeader(); break; case 163 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt TypeParameters Type..."); } //$NON-NLS-1$ consumeMethodHeaderNameWithTypeParameters(); break; case 164 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt Type Identifier LPAREN"); } //$NON-NLS-1$ consumeMethodHeaderName(); break; case 165 : if (DEBUG) { System.out.println("MethodHeaderRightParen ::= RPAREN"); } //$NON-NLS-1$ consumeMethodHeaderRightParen(); break; case 166 : if (DEBUG) { System.out.println("MethodHeaderExtendedDims ::= Dimsopt"); } //$NON-NLS-1$ consumeMethodHeaderExtendedDims(); break; case 167 : if (DEBUG) { System.out.println("MethodHeaderThrowsClause ::= throws ClassTypeList"); } //$NON-NLS-1$ consumeMethodHeaderThrowsClause(); break; case 168 : if (DEBUG) { System.out.println("ConstructorHeader ::= ConstructorHeaderName..."); } //$NON-NLS-1$ consumeConstructorHeader(); break; case 169 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt TypeParameters..."); } //$NON-NLS-1$ consumeConstructorHeaderNameWithTypeParameters(); break; case 170 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt Identifier LPAREN"); } //$NON-NLS-1$ consumeConstructorHeaderName(); break; case 172 : if (DEBUG) { System.out.println("FormalParameterList ::= FormalParameterList COMMA..."); } //$NON-NLS-1$ consumeFormalParameterList(); break; case 173 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type..."); } //$NON-NLS-1$ consumeFormalParameter(false); break; case 174 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type ELLIPSIS..."); } //$NON-NLS-1$ consumeFormalParameter(true); break; case 176 : if (DEBUG) { System.out.println("ClassTypeList ::= ClassTypeList COMMA ClassTypeElt"); } //$NON-NLS-1$ consumeClassTypeList(); break; case 177 : if (DEBUG) { System.out.println("ClassTypeElt ::= ClassType"); } //$NON-NLS-1$ consumeClassTypeElt(); break; case 178 : if (DEBUG) { System.out.println("MethodBody ::= NestedMethod LBRACE BlockStatementsopt..."); } //$NON-NLS-1$ consumeMethodBody(); break; case 179 : if (DEBUG) { System.out.println("NestedMethod ::="); } //$NON-NLS-1$ consumeNestedMethod(); break; case 180 : if (DEBUG) { System.out.println("StaticInitializer ::= StaticOnly Block"); } //$NON-NLS-1$ consumeStaticInitializer(); break; case 181 : if (DEBUG) { System.out.println("StaticOnly ::= static"); } //$NON-NLS-1$ consumeStaticOnly(); break; case 182 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader MethodBody"); } //$NON-NLS-1$ consumeConstructorDeclaration() ; break; case 183 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader SEMICOLON"); } //$NON-NLS-1$ consumeInvalidConstructorDeclaration() ; break; case 184 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= this LPAREN..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocation(0, THIS_CALL); break; case 185 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments this"); } //$NON-NLS-1$ consumeExplicitConstructorInvocationWithTypeArguments(0,THIS_CALL); break; case 186 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= super LPAREN..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocation(0,SUPER_CALL); break; case 187 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocationWithTypeArguments(0,SUPER_CALL); break; case 188 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT super..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocation(1, SUPER_CALL); break; case 189 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocationWithTypeArguments(1, SUPER_CALL); break; case 190 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT super LPAREN"); } //$NON-NLS-1$ consumeExplicitConstructorInvocation(2, SUPER_CALL); break; case 191 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocationWithTypeArguments(2, SUPER_CALL); break; case 192 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT this..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocation(1, THIS_CALL); break; case 193 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocationWithTypeArguments(1, THIS_CALL); break; case 194 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT this LPAREN"); } //$NON-NLS-1$ consumeExplicitConstructorInvocation(2, THIS_CALL); break; case 195 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); } //$NON-NLS-1$ consumeExplicitConstructorInvocationWithTypeArguments(2, THIS_CALL); break; case 196 : if (DEBUG) { System.out.println("InterfaceDeclaration ::= InterfaceHeader InterfaceBody"); } //$NON-NLS-1$ consumeInterfaceDeclaration(); break; case 197 : if (DEBUG) { System.out.println("InterfaceHeader ::= InterfaceHeaderName..."); } //$NON-NLS-1$ consumeInterfaceHeader(); break; case 198 : if (DEBUG) { System.out.println("InterfaceHeaderName ::= InterfaceHeaderName1..."); } //$NON-NLS-1$ consumeTypeHeaderNameWithTypeParameters(); break; case 200 : if (DEBUG) { System.out.println("InterfaceHeaderName1 ::= Modifiersopt interface..."); } //$NON-NLS-1$ consumeInterfaceHeaderName1(); break; case 202 : if (DEBUG) { System.out.println("InterfaceHeaderExtends ::= extends InterfaceTypeList"); } //$NON-NLS-1$ consumeInterfaceHeaderExtends(); break; case 205 : if (DEBUG) { System.out.println("InterfaceMemberDeclarations ::=..."); } //$NON-NLS-1$ consumeInterfaceMemberDeclarations(); break; case 206 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= SEMICOLON"); } //$NON-NLS-1$ consumeEmptyInterfaceMemberDeclaration(); break; case 209 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= InvalidMethodDeclaration"); } //$NON-NLS-1$ ignoreMethodBody(); break; case 210 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); } //$NON-NLS-1$ ignoreInvalidConstructorDeclaration(true); break; case 211 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); } //$NON-NLS-1$ ignoreInvalidConstructorDeclaration(false); break; case 218 : if (DEBUG) { System.out.println("PushLeftBrace ::="); } //$NON-NLS-1$ consumePushLeftBrace(); break; case 219 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace ,opt RBRACE"); } //$NON-NLS-1$ consumeEmptyArrayInitializer(); break; case 220 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$ consumeArrayInitializer(); break; case 221 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$ consumeArrayInitializer(); break; case 223 : if (DEBUG) { System.out.println("VariableInitializers ::= VariableInitializers COMMA..."); } //$NON-NLS-1$ consumeVariableInitializers(); break; case 224 : if (DEBUG) { System.out.println("Block ::= OpenBlock LBRACE BlockStatementsopt RBRACE"); } //$NON-NLS-1$ consumeBlock(); break; case 225 : if (DEBUG) { System.out.println("OpenBlock ::="); } //$NON-NLS-1$ consumeOpenBlock() ; break; case 227 : if (DEBUG) { System.out.println("BlockStatements ::= BlockStatements BlockStatement"); } //$NON-NLS-1$ consumeBlockStatements() ; break; case 231 : if (DEBUG) { System.out.println("BlockStatement ::= InvalidInterfaceDeclaration"); } //$NON-NLS-1$ ignoreInterfaceDeclaration(); break; case 232 : if (DEBUG) { System.out.println("LocalVariableDeclarationStatement ::=..."); } //$NON-NLS-1$ consumeLocalVariableDeclarationStatement(); break; case 233 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Type PushModifiers..."); } //$NON-NLS-1$ consumeLocalVariableDeclaration(); break; case 234 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Modifiers Type..."); } //$NON-NLS-1$ consumeLocalVariableDeclaration(); break; case 235 : if (DEBUG) { System.out.println("PushModifiers ::="); } //$NON-NLS-1$ consumePushModifiers(); break; case 236 : if (DEBUG) { System.out.println("PushModifiersForHeader ::="); } //$NON-NLS-1$ consumePushModifiersForHeader(); break; case 237 : if (DEBUG) { System.out.println("PushRealModifiers ::="); } //$NON-NLS-1$ consumePushRealModifiers(); break; case 263 : if (DEBUG) { System.out.println("EmptyStatement ::= SEMICOLON"); } //$NON-NLS-1$ consumeEmptyStatement(); break; case 264 : if (DEBUG) { System.out.println("LabeledStatement ::= Identifier COLON Statement"); } //$NON-NLS-1$ consumeStatementLabel() ; break; case 265 : if (DEBUG) { System.out.println("LabeledStatementNoShortIf ::= Identifier COLON..."); } //$NON-NLS-1$ consumeStatementLabel() ; break; case 266 : if (DEBUG) { System.out.println("ExpressionStatement ::= StatementExpression SEMICOLON"); } //$NON-NLS-1$ consumeExpressionStatement(); break; case 275 : if (DEBUG) { System.out.println("IfThenStatement ::= if LPAREN Expression RPAREN..."); } //$NON-NLS-1$ consumeStatementIfNoElse(); break; case 276 : if (DEBUG) { System.out.println("IfThenElseStatement ::= if LPAREN Expression RPAREN..."); } //$NON-NLS-1$ consumeStatementIfWithElse(); break; case 277 : if (DEBUG) { System.out.println("IfThenElseStatementNoShortIf ::= if LPAREN Expression..."); } //$NON-NLS-1$ consumeStatementIfWithElse(); break; case 278 : if (DEBUG) { System.out.println("SwitchStatement ::= switch LPAREN Expression RPAREN..."); } //$NON-NLS-1$ consumeStatementSwitch() ; break; case 279 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE RBRACE"); } //$NON-NLS-1$ consumeEmptySwitchBlock() ; break; case 282 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE SwitchBlockStatements..."); } //$NON-NLS-1$ consumeSwitchBlock() ; break; case 284 : if (DEBUG) { System.out.println("SwitchBlockStatements ::= SwitchBlockStatements..."); } //$NON-NLS-1$ consumeSwitchBlockStatements() ; break; case 285 : if (DEBUG) { System.out.println("SwitchBlockStatement ::= SwitchLabels BlockStatements"); } //$NON-NLS-1$ consumeSwitchBlockStatement() ; break; case 287 : if (DEBUG) { System.out.println("SwitchLabels ::= SwitchLabels SwitchLabel"); } //$NON-NLS-1$ consumeSwitchLabels() ; break; case 288 : if (DEBUG) { System.out.println("SwitchLabel ::= case ConstantExpression COLON"); } //$NON-NLS-1$ consumeCaseLabel(); break; case 289 : if (DEBUG) { System.out.println("SwitchLabel ::= default COLON"); } //$NON-NLS-1$ consumeDefaultLabel(); break; case 290 : if (DEBUG) { System.out.println("WhileStatement ::= while LPAREN Expression RPAREN..."); } //$NON-NLS-1$ consumeStatementWhile() ; break; case 291 : if (DEBUG) { System.out.println("WhileStatementNoShortIf ::= while LPAREN Expression..."); } //$NON-NLS-1$ consumeStatementWhile() ; break; case 292 : if (DEBUG) { System.out.println("DoStatement ::= do Statement while LPAREN Expression..."); } //$NON-NLS-1$ consumeStatementDo() ; break; case 293 : if (DEBUG) { System.out.println("ForStatement ::= for LPAREN ForInitopt SEMICOLON..."); } //$NON-NLS-1$ consumeStatementFor() ; break; case 294 : if (DEBUG) { System.out.println("ForStatementNoShortIf ::= for LPAREN ForInitopt..."); } //$NON-NLS-1$ consumeStatementFor() ; break; case 295 : if (DEBUG) { System.out.println("ForInit ::= StatementExpressionList"); } //$NON-NLS-1$ consumeForInit() ; break; case 299 : if (DEBUG) { System.out.println("StatementExpressionList ::= StatementExpressionList..."); } //$NON-NLS-1$ consumeStatementExpressionList() ; break; case 300 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression SEMICOLON"); } //$NON-NLS-1$ consumeSimpleAssertStatement() ; break; case 301 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression COLON Expression"); } //$NON-NLS-1$ consumeAssertStatement() ; break; case 302 : if (DEBUG) { System.out.println("BreakStatement ::= break SEMICOLON"); } //$NON-NLS-1$ consumeStatementBreak() ; break; case 303 : if (DEBUG) { System.out.println("BreakStatement ::= break Identifier SEMICOLON"); } //$NON-NLS-1$ consumeStatementBreakWithLabel() ; break; case 304 : if (DEBUG) { System.out.println("ContinueStatement ::= continue SEMICOLON"); } //$NON-NLS-1$ consumeStatementContinue() ; break; case 305 : if (DEBUG) { System.out.println("ContinueStatement ::= continue Identifier SEMICOLON"); } //$NON-NLS-1$ consumeStatementContinueWithLabel() ; break; case 306 : if (DEBUG) { System.out.println("ReturnStatement ::= return Expressionopt SEMICOLON"); } //$NON-NLS-1$ consumeStatementReturn() ; break; case 307 : if (DEBUG) { System.out.println("ThrowStatement ::= throw Expression SEMICOLON"); } //$NON-NLS-1$ consumeStatementThrow(); break; case 308 : if (DEBUG) { System.out.println("SynchronizedStatement ::= OnlySynchronized LPAREN..."); } //$NON-NLS-1$ consumeStatementSynchronized(); break; case 309 : if (DEBUG) { System.out.println("OnlySynchronized ::= synchronized"); } //$NON-NLS-1$ consumeOnlySynchronized(); break; case 310 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catches"); } //$NON-NLS-1$ consumeStatementTry(false); break; case 311 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catchesopt Finally"); } //$NON-NLS-1$ consumeStatementTry(true); break; case 313 : if (DEBUG) { System.out.println("ExitTryBlock ::="); } //$NON-NLS-1$ consumeExitTryBlock(); break; case 315 : if (DEBUG) { System.out.println("Catches ::= Catches CatchClause"); } //$NON-NLS-1$ consumeCatches(); break; case 316 : if (DEBUG) { System.out.println("CatchClause ::= catch LPAREN FormalParameter RPAREN..."); } //$NON-NLS-1$ consumeStatementCatch() ; break; case 318 : if (DEBUG) { System.out.println("PushLPAREN ::= LPAREN"); } //$NON-NLS-1$ consumeLeftParen(); break; case 319 : if (DEBUG) { System.out.println("PushRPAREN ::= RPAREN"); } //$NON-NLS-1$ consumeRightParen(); break; case 324 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= this"); } //$NON-NLS-1$ consumePrimaryNoNewArrayThis(); break; case 325 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Expression_NotName..."); } //$NON-NLS-1$ consumePrimaryNoNewArray(); break; case 326 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Name PushRPAREN"); } //$NON-NLS-1$ consumePrimaryNoNewArrayWithName(); break; case 329 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT this"); } //$NON-NLS-1$ consumePrimaryNoNewArrayNameThis(); break; case 330 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT super"); } //$NON-NLS-1$ consumePrimaryNoNewArrayNameSuper(); break; case 331 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT class"); } //$NON-NLS-1$ consumePrimaryNoNewArrayName(); break; case 332 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name Dims DOT class"); } //$NON-NLS-1$ consumePrimaryNoNewArrayArrayType(); break; case 333 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType Dims DOT class"); } //$NON-NLS-1$ consumePrimaryNoNewArrayPrimitiveArrayType(); break; case 334 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType DOT class"); } //$NON-NLS-1$ consumePrimaryNoNewArrayPrimitiveType(); break; case 337 : if (DEBUG) { System.out.println("AllocationHeader ::= new ClassType LPAREN..."); } //$NON-NLS-1$ consumeAllocationHeader(); break; case 338 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new..."); } //$NON-NLS-1$ consumeClassInstanceCreationExpressionWithTypeArguments(); break; case 339 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new ClassType LPAREN"); } //$NON-NLS-1$ consumeClassInstanceCreationExpression(); break; case 340 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); } //$NON-NLS-1$ consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ; break; case 341 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); } //$NON-NLS-1$ consumeClassInstanceCreationExpressionQualified() ; break; case 342 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); } //$NON-NLS-1$ consumeClassInstanceCreationExpressionQualified() ; break; case 343 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); } //$NON-NLS-1$ consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ; break; case 344 : if (DEBUG) { System.out.println("ClassInstanceCreationExpressionName ::= Name DOT"); } //$NON-NLS-1$ consumeClassInstanceCreationExpressionName() ; break; case 345 : if (DEBUG) { System.out.println("ClassBodyopt ::="); } //$NON-NLS-1$ consumeClassBodyopt(); break; case 347 : if (DEBUG) { System.out.println("ClassBodySimpleNameopt ::="); } //$NON-NLS-1$ consumeClassBodyopt(); break; case 349 : if (DEBUG) { System.out.println("EnterAnonymousClassBodySimpleName ::="); } //$NON-NLS-1$ consumeEnterAnonymousClassBodySimpleName(); break; case 350 : if (DEBUG) { System.out.println("EnterAnonymousClassBody ::="); } //$NON-NLS-1$ consumeEnterAnonymousClassBody(); break; case 352 : if (DEBUG) { System.out.println("ArgumentList ::= ArgumentList COMMA Expression"); } //$NON-NLS-1$ consumeArgumentList(); break; case 353 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new PrimitiveType..."); } //$NON-NLS-1$ consumeArrayCreationHeader(); break; case 354 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new ClassOrInterfaceType..."); } //$NON-NLS-1$ consumeArrayCreationHeader(); break; case 355 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); } //$NON-NLS-1$ consumeArrayCreationExpressionWithoutInitializer(); break; case 356 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new PrimitiveType"); } //$NON-NLS-1$ consumeArrayCreationExpressionWithInitializer(); break; case 357 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); } //$NON-NLS-1$ consumeArrayCreationExpressionWithoutInitializer(); break; case 358 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new..."); } //$NON-NLS-1$ consumeArrayCreationExpressionWithInitializer(); break; case 360 : if (DEBUG) { System.out.println("DimWithOrWithOutExprs ::= DimWithOrWithOutExprs..."); } //$NON-NLS-1$ consumeDimWithOrWithOutExprs(); break; case 362 : if (DEBUG) { System.out.println("DimWithOrWithOutExpr ::= LBRACKET RBRACKET"); } //$NON-NLS-1$ consumeDimWithOrWithOutExpr(); break; case 363 : if (DEBUG) { System.out.println("Dims ::= DimsLoop"); } //$NON-NLS-1$ consumeDims(); break; case 366 : if (DEBUG) { System.out.println("OneDimLoop ::= LBRACKET RBRACKET"); } //$NON-NLS-1$ consumeOneDimLoop(); break; case 367 : if (DEBUG) { System.out.println("FieldAccess ::= Primary DOT Identifier"); } //$NON-NLS-1$ consumeFieldAccess(false); break; case 368 : if (DEBUG) { System.out.println("FieldAccess ::= super DOT Identifier"); } //$NON-NLS-1$ consumeFieldAccess(true); break; case 369 : if (DEBUG) { System.out.println("MethodInvocation ::= Name LPAREN ArgumentListopt RPAREN"); } //$NON-NLS-1$ consumeMethodInvocationName(); break; case 370 : if (DEBUG) { System.out.println("MethodInvocation ::= Name DOT OnlyTypeArguments..."); } //$NON-NLS-1$ consumeMethodInvocationNameWithTypeArguments(); break; case 371 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT OnlyTypeArguments..."); } //$NON-NLS-1$ consumeMethodInvocationPrimaryWithTypeArguments(); break; case 372 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT Identifier LPAREN..."); } //$NON-NLS-1$ consumeMethodInvocationPrimary(); break; case 373 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT OnlyTypeArguments..."); } //$NON-NLS-1$ consumeMethodInvocationSuperWithTypeArguments(); break; case 374 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT Identifier LPAREN..."); } //$NON-NLS-1$ consumeMethodInvocationSuper(); break; case 375 : if (DEBUG) { System.out.println("ArrayAccess ::= Name LBRACKET Expression RBRACKET"); } //$NON-NLS-1$ consumeArrayAccess(true); break; case 376 : if (DEBUG) { System.out.println("ArrayAccess ::= PrimaryNoNewArray LBRACKET Expression..."); } //$NON-NLS-1$ consumeArrayAccess(false); break; case 377 : if (DEBUG) { System.out.println("ArrayAccess ::= ArrayCreationWithArrayInitializer..."); } //$NON-NLS-1$ consumeArrayAccess(false); break; case 379 : if (DEBUG) { System.out.println("PostfixExpression ::= Name"); } //$NON-NLS-1$ consumePostfixExpression(); break; case 382 : if (DEBUG) { System.out.println("PostIncrementExpression ::= PostfixExpression PLUS_PLUS"); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.PLUS,true); break; case 383 : if (DEBUG) { System.out.println("PostDecrementExpression ::= PostfixExpression..."); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.MINUS,true); break; case 384 : if (DEBUG) { System.out.println("PushPosition ::="); } //$NON-NLS-1$ consumePushPosition(); break; case 387 : if (DEBUG) { System.out.println("UnaryExpression ::= PLUS PushPosition UnaryExpression"); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.PLUS); break; case 388 : if (DEBUG) { System.out.println("UnaryExpression ::= MINUS PushPosition UnaryExpression"); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.MINUS); break; case 390 : if (DEBUG) { System.out.println("PreIncrementExpression ::= PLUS_PLUS PushPosition..."); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.PLUS,false); break; case 391 : if (DEBUG) { System.out.println("PreDecrementExpression ::= MINUS_MINUS PushPosition..."); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.MINUS,false); break; case 393 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= TWIDDLE PushPosition..."); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.TWIDDLE); break; case 394 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= NOT PushPosition..."); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.NOT); break; case 396 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN PrimitiveType Dimsopt..."); } //$NON-NLS-1$ consumeCastExpressionWithPrimitiveType(); break; case 397 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); } //$NON-NLS-1$ consumeCastExpressionWithGenericsArray(); break; case 398 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); } //$NON-NLS-1$ consumeCastExpressionWithQualifiedGenericsArray(); break; case 399 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name PushRPAREN..."); } //$NON-NLS-1$ consumeCastExpressionLL1(); break; case 400 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name Dims PushRPAREN..."); } //$NON-NLS-1$ consumeCastExpressionWithNameArray(); break; case 401 : if (DEBUG) { System.out.println("OnlyTypeArgumentsForCastExpression ::= OnlyTypeArguments"); } //$NON-NLS-1$ consumeOnlyTypeArgumentsForCastExpression(); break; case 402 : if (DEBUG) { System.out.println("InsideCastExpression ::="); } //$NON-NLS-1$ consumeInsideCastExpression(); break; case 403 : if (DEBUG) { System.out.println("InsideCastExpressionLL1 ::="); } //$NON-NLS-1$ consumeInsideCastExpressionLL1(); break; case 404 : if (DEBUG) { System.out.println("InsideCastExpressionWithQualifiedGenerics ::="); } //$NON-NLS-1$ consumeInsideCastExpressionWithQualifiedGenerics(); break; case 406 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.MULTIPLY); break; case 407 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.DIVIDE); break; case 408 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.REMAINDER); break; case 410 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression PLUS..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.PLUS); break; case 411 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression MINUS..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.MINUS); break; case 413 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression LEFT_SHIFT..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.LEFT_SHIFT); break; case 414 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression RIGHT_SHIFT..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.RIGHT_SHIFT); break; case 415 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT); break; case 417 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.LESS); break; case 418 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression GREATER..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.GREATER); break; case 419 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS_EQUAL"); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.LESS_EQUAL); break; case 420 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.GREATER_EQUAL); break; case 422 : if (DEBUG) { System.out.println("InstanceofExpression ::= InstanceofExpression instanceof"); } //$NON-NLS-1$ consumeInstanceOfExpression(OperatorIds.INSTANCEOF); break; case 424 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression EQUAL_EQUAL..."); } //$NON-NLS-1$ consumeEqualityExpression(OperatorIds.EQUAL_EQUAL); break; case 425 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression NOT_EQUAL..."); } //$NON-NLS-1$ consumeEqualityExpression(OperatorIds.NOT_EQUAL); break; case 427 : if (DEBUG) { System.out.println("AndExpression ::= AndExpression AND EqualityExpression"); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.AND); break; case 429 : if (DEBUG) { System.out.println("ExclusiveOrExpression ::= ExclusiveOrExpression XOR..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.XOR); break; case 431 : if (DEBUG) { System.out.println("InclusiveOrExpression ::= InclusiveOrExpression OR..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.OR); break; case 433 : if (DEBUG) { System.out.println("ConditionalAndExpression ::= ConditionalAndExpression..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.AND_AND); break; case 435 : if (DEBUG) { System.out.println("ConditionalOrExpression ::= ConditionalOrExpression..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.OR_OR); break; case 437 : if (DEBUG) { System.out.println("ConditionalExpression ::= ConditionalOrExpression..."); } //$NON-NLS-1$ consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ; break; case 440 : if (DEBUG) { System.out.println("Assignment ::= PostfixExpression AssignmentOperator..."); } //$NON-NLS-1$ consumeAssignment(); break; case 442 : if (DEBUG) { System.out.println("Assignment ::= InvalidArrayInitializerAssignement"); } //$NON-NLS-1$ ignoreExpressionAssignment(); break; case 443 : if (DEBUG) { System.out.println("AssignmentOperator ::= EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(EQUAL); break; case 444 : if (DEBUG) { System.out.println("AssignmentOperator ::= MULTIPLY_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(MULTIPLY); break; case 445 : if (DEBUG) { System.out.println("AssignmentOperator ::= DIVIDE_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(DIVIDE); break; case 446 : if (DEBUG) { System.out.println("AssignmentOperator ::= REMAINDER_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(REMAINDER); break; case 447 : if (DEBUG) { System.out.println("AssignmentOperator ::= PLUS_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(PLUS); break; case 448 : if (DEBUG) { System.out.println("AssignmentOperator ::= MINUS_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(MINUS); break; case 449 : if (DEBUG) { System.out.println("AssignmentOperator ::= LEFT_SHIFT_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(LEFT_SHIFT); break; case 450 : if (DEBUG) { System.out.println("AssignmentOperator ::= RIGHT_SHIFT_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(RIGHT_SHIFT); break; case 451 : if (DEBUG) { System.out.println("AssignmentOperator ::= UNSIGNED_RIGHT_SHIFT_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(UNSIGNED_RIGHT_SHIFT); break; case 452 : if (DEBUG) { System.out.println("AssignmentOperator ::= AND_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(AND); break; case 453 : if (DEBUG) { System.out.println("AssignmentOperator ::= XOR_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(XOR); break; case 454 : if (DEBUG) { System.out.println("AssignmentOperator ::= OR_EQUAL"); } //$NON-NLS-1$ consumeAssignmentOperator(OR); break; case 458 : if (DEBUG) { System.out.println("Expressionopt ::="); } //$NON-NLS-1$ consumeEmptyExpression(); break; case 463 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::="); } //$NON-NLS-1$ consumeEmptyClassBodyDeclarationsopt(); break; case 464 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$ consumeClassBodyDeclarationsopt(); break; case 465 : if (DEBUG) { System.out.println("Modifiersopt ::="); } //$NON-NLS-1$ consumeDefaultModifiers(); break; case 466 : if (DEBUG) { System.out.println("Modifiersopt ::= Modifiers"); } //$NON-NLS-1$ consumeModifiers(); break; case 467 : if (DEBUG) { System.out.println("BlockStatementsopt ::="); } //$NON-NLS-1$ consumeEmptyBlockStatementsopt(); break; case 469 : if (DEBUG) { System.out.println("Dimsopt ::="); } //$NON-NLS-1$ consumeEmptyDimsopt(); break; case 471 : if (DEBUG) { System.out.println("ArgumentListopt ::="); } //$NON-NLS-1$ consumeEmptyArgumentListopt(); break; case 475 : if (DEBUG) { System.out.println("FormalParameterListopt ::="); } //$NON-NLS-1$ consumeFormalParameterListopt(); break; case 479 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::="); } //$NON-NLS-1$ consumeEmptyInterfaceMemberDeclarationsopt(); break; case 480 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$ consumeInterfaceMemberDeclarationsopt(); break; case 481 : if (DEBUG) { System.out.println("NestedType ::="); } //$NON-NLS-1$ consumeNestedType(); break; case 482 : if (DEBUG) { System.out.println("ForInitopt ::="); } //$NON-NLS-1$ consumeEmptyForInitopt(); break; case 484 : if (DEBUG) { System.out.println("ForUpdateopt ::="); } //$NON-NLS-1$ consumeEmptyForUpdateopt(); break; case 488 : if (DEBUG) { System.out.println("Catchesopt ::="); } //$NON-NLS-1$ consumeEmptyCatchesopt(); break; case 490 : if (DEBUG) { System.out.println("EnumDeclaration ::= EnumHeader EnumBody"); } //$NON-NLS-1$ consumeEnumDeclaration(); break; case 491 : if (DEBUG) { System.out.println("EnumHeader ::= EnumHeaderName ClassHeaderImplementsopt"); } //$NON-NLS-1$ consumeEnumHeader(); break; case 492 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier"); } //$NON-NLS-1$ consumeEnumHeaderName(); break; case 493 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumBodyDeclarationsopt RBRACE"); } //$NON-NLS-1$ consumeEnumBodyNoConstants(); break; case 494 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE COMMA EnumBodyDeclarationsopt..."); } //$NON-NLS-1$ consumeEnumBodyNoConstants(); break; case 495 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants COMMA..."); } //$NON-NLS-1$ consumeEnumBodyWithConstants(); break; case 496 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants..."); } //$NON-NLS-1$ consumeEnumBodyWithConstants(); break; case 498 : if (DEBUG) { System.out.println("EnumConstants ::= EnumConstants COMMA EnumConstant"); } //$NON-NLS-1$ consumeEnumConstants(); break; case 499 : if (DEBUG) { System.out.println("EnumConstantHeaderName ::= Modifiersopt Identifier"); } //$NON-NLS-1$ consumeEnumConstantHeaderName(); break; case 500 : if (DEBUG) { System.out.println("EnumConstantHeader ::= EnumConstantHeaderName..."); } //$NON-NLS-1$ consumeEnumConstantHeader(); break; case 501 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader ForceNoDiet..."); } //$NON-NLS-1$ consumeEnumConstantWithClassBody(); break; case 502 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader"); } //$NON-NLS-1$ consumeEnumConstantNoClassBody(); break; case 503 : if (DEBUG) { System.out.println("Arguments ::= LPAREN ArgumentListopt RPAREN"); } //$NON-NLS-1$ consumeArguments(); break; case 504 : if (DEBUG) { System.out.println("Argumentsopt ::="); } //$NON-NLS-1$ consumeEmptyArguments(); break; case 506 : if (DEBUG) { System.out.println("EnumDeclarations ::= SEMICOLON ClassBodyDeclarationsopt"); } //$NON-NLS-1$ consumeEnumDeclarations(); break; case 507 : if (DEBUG) { System.out.println("EnumBodyDeclarationsopt ::="); } //$NON-NLS-1$ consumeEmptyEnumDeclarations(); break; case 509 : if (DEBUG) { System.out.println("EnhancedForStatement ::= EnhancedForStatementHeader..."); } //$NON-NLS-1$ consumeEnhancedForStatement(); break; case 510 : if (DEBUG) { System.out.println("EnhancedForStatementNoShortIf ::=..."); } //$NON-NLS-1$ consumeEnhancedForStatement(); break; case 511 : if (DEBUG) { System.out.println("EnhancedForStatementHeader ::= for LPAREN Type..."); } //$NON-NLS-1$ consumeEnhancedForStatementHeader(false); break; case 512 : if (DEBUG) { System.out.println("EnhancedForStatementHeader ::= for LPAREN Modifiers Type"); } //$NON-NLS-1$ consumeEnhancedForStatementHeader(true); break; case 513 : if (DEBUG) { System.out.println("SingleStaticImportDeclaration ::=..."); } //$NON-NLS-1$ consumeImportDeclaration(); break; case 514 : if (DEBUG) { System.out.println("SingleStaticImportDeclarationName ::= import static Name"); } //$NON-NLS-1$ consumeSingleStaticImportDeclarationName(); break; case 515 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclaration ::=..."); } //$NON-NLS-1$ consumeImportDeclaration(); break; case 516 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclarationName ::= import static..."); } //$NON-NLS-1$ consumeStaticImportOnDemandDeclarationName(); break; case 517 : if (DEBUG) { System.out.println("TypeArguments ::= LESS TypeArgumentList1"); } //$NON-NLS-1$ consumeTypeArguments(); break; case 518 : if (DEBUG) { System.out.println("OnlyTypeArguments ::= LESS TypeArgumentList1"); } //$NON-NLS-1$ consumeOnlyTypeArguments(); break; case 520 : if (DEBUG) { System.out.println("TypeArgumentList1 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$ consumeTypeArgumentList1(); break; case 522 : if (DEBUG) { System.out.println("TypeArgumentList ::= TypeArgumentList COMMA TypeArgument"); } //$NON-NLS-1$ consumeTypeArgumentList(); break; case 523 : if (DEBUG) { System.out.println("TypeArgument ::= ReferenceType"); } //$NON-NLS-1$ consumeTypeArgument(); break; case 527 : if (DEBUG) { System.out.println("ReferenceType1 ::= ReferenceType GREATER"); } //$NON-NLS-1$ consumeReferenceType1(); break; case 528 : if (DEBUG) { System.out.println("ReferenceType1 ::= ClassOrInterface LESS..."); } //$NON-NLS-1$ consumeTypeArgumentReferenceType1(); break; case 530 : if (DEBUG) { System.out.println("TypeArgumentList2 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$ consumeTypeArgumentList2(); break; case 533 : if (DEBUG) { System.out.println("ReferenceType2 ::= ReferenceType RIGHT_SHIFT"); } //$NON-NLS-1$ consumeReferenceType2(); break; case 534 : if (DEBUG) { System.out.println("ReferenceType2 ::= ClassOrInterface LESS..."); } //$NON-NLS-1$ consumeTypeArgumentReferenceType2(); break; case 536 : if (DEBUG) { System.out.println("TypeArgumentList3 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$ consumeTypeArgumentList3(); break; case 539 : if (DEBUG) { System.out.println("ReferenceType3 ::= ReferenceType UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$ consumeReferenceType3(); break; case 540 : if (DEBUG) { System.out.println("Wildcard ::= QUESTION"); } //$NON-NLS-1$ consumeWildcard(); break; case 541 : if (DEBUG) { System.out.println("Wildcard ::= QUESTION WildcardBounds"); } //$NON-NLS-1$ consumeWildcardWithBounds(); break; case 542 : if (DEBUG) { System.out.println("WildcardBounds ::= extends ReferenceType"); } //$NON-NLS-1$ consumeWildcardBoundsExtends(); break; case 543 : if (DEBUG) { System.out.println("WildcardBounds ::= super ReferenceType"); } //$NON-NLS-1$ consumeWildcardBoundsSuper(); break; case 544 : if (DEBUG) { System.out.println("Wildcard1 ::= QUESTION GREATER"); } //$NON-NLS-1$ consumeWildcard1(); break; case 545 : if (DEBUG) { System.out.println("Wildcard1 ::= QUESTION WildcardBounds1"); } //$NON-NLS-1$ consumeWildcard1WithBounds(); break; case 546 : if (DEBUG) { System.out.println("WildcardBounds1 ::= extends ReferenceType1"); } //$NON-NLS-1$ consumeWildcardBounds1Extends(); break; case 547 : if (DEBUG) { System.out.println("WildcardBounds1 ::= super ReferenceType1"); } //$NON-NLS-1$ consumeWildcardBounds1Super(); break; case 548 : if (DEBUG) { System.out.println("Wildcard2 ::= QUESTION RIGHT_SHIFT"); } //$NON-NLS-1$ consumeWildcard2(); break; case 549 : if (DEBUG) { System.out.println("Wildcard2 ::= QUESTION WildcardBounds2"); } //$NON-NLS-1$ consumeWildcard2WithBounds(); break; case 550 : if (DEBUG) { System.out.println("WildcardBounds2 ::= extends ReferenceType2"); } //$NON-NLS-1$ consumeWildcardBounds2Extends(); break; case 551 : if (DEBUG) { System.out.println("WildcardBounds2 ::= super ReferenceType2"); } //$NON-NLS-1$ consumeWildcardBounds2Super(); break; case 552 : if (DEBUG) { System.out.println("Wildcard3 ::= QUESTION UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$ consumeWildcard3(); break; case 553 : if (DEBUG) { System.out.println("Wildcard3 ::= QUESTION WildcardBounds3"); } //$NON-NLS-1$ consumeWildcard3WithBounds(); break; case 554 : if (DEBUG) { System.out.println("WildcardBounds3 ::= extends ReferenceType3"); } //$NON-NLS-1$ consumeWildcardBounds3Extends(); break; case 555 : if (DEBUG) { System.out.println("WildcardBounds3 ::= super ReferenceType3"); } //$NON-NLS-1$ consumeWildcardBounds3Super(); break; case 556 : if (DEBUG) { System.out.println("TypeParameterHeader ::= Identifier"); } //$NON-NLS-1$ consumeTypeParameterHeader(); break; case 557 : if (DEBUG) { System.out.println("TypeParameters ::= LESS TypeParameterList1"); } //$NON-NLS-1$ consumeTypeParameters(); break; case 559 : if (DEBUG) { System.out.println("TypeParameterList ::= TypeParameterList COMMA..."); } //$NON-NLS-1$ consumeTypeParameterList(); break; case 561 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ consumeTypeParameterWithExtends(); break; case 562 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ consumeTypeParameterWithExtendsAndBounds(); break; case 564 : if (DEBUG) { System.out.println("AdditionalBoundList ::= AdditionalBoundList..."); } //$NON-NLS-1$ consumeAdditionalBoundList(); break; case 565 : if (DEBUG) { System.out.println("AdditionalBound ::= AND ReferenceType"); } //$NON-NLS-1$ consumeAdditionalBound(); break; case 567 : if (DEBUG) { System.out.println("TypeParameterList1 ::= TypeParameterList COMMA..."); } //$NON-NLS-1$ consumeTypeParameterList1(); break; case 568 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader GREATER"); } //$NON-NLS-1$ consumeTypeParameter1(); break; case 569 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ consumeTypeParameter1WithExtends(); break; case 570 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); } //$NON-NLS-1$ consumeTypeParameter1WithExtendsAndBounds(); break; case 572 : if (DEBUG) { System.out.println("AdditionalBoundList1 ::= AdditionalBoundList..."); } //$NON-NLS-1$ consumeAdditionalBoundList1(); break; case 573 : if (DEBUG) { System.out.println("AdditionalBound1 ::= AND ReferenceType1"); } //$NON-NLS-1$ consumeAdditionalBound1(); break; case 579 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= PLUS PushPosition..."); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.PLUS); break; case 580 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= MINUS PushPosition..."); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.MINUS); break; case 583 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= TWIDDLE..."); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.TWIDDLE); break; case 584 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= NOT PushPosition"); } //$NON-NLS-1$ consumeUnaryExpression(OperatorIds.NOT); break; case 587 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.MULTIPLY); break; case 588 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name MULTIPLY..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.MULTIPLY); break; case 589 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.DIVIDE); break; case 590 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name DIVIDE..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.DIVIDE); break; case 591 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.REMAINDER); break; case 592 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name REMAINDER..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.REMAINDER); break; case 594 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.PLUS); break; case 595 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name PLUS..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.PLUS); break; case 596 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.MINUS); break; case 597 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name MINUS..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.MINUS); break; case 599 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.LEFT_SHIFT); break; case 600 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name LEFT_SHIFT..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.LEFT_SHIFT); break; case 601 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.RIGHT_SHIFT); break; case 602 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name RIGHT_SHIFT..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.RIGHT_SHIFT); break; case 603 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT); break; case 604 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name UNSIGNED_RIGHT_SHIFT..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.UNSIGNED_RIGHT_SHIFT); break; case 606 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.LESS); break; case 607 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.LESS); break; case 608 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.GREATER); break; case 609 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.GREATER); break; case 610 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.LESS_EQUAL); break; case 611 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS_EQUAL..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.LESS_EQUAL); break; case 612 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.GREATER_EQUAL); break; case 613 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER_EQUAL..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.GREATER_EQUAL); break; case 615 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::= Name instanceof..."); } //$NON-NLS-1$ consumeInstanceOfExpressionWithName(OperatorIds.INSTANCEOF); break; case 616 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::=..."); } //$NON-NLS-1$ consumeInstanceOfExpression(OperatorIds.INSTANCEOF); break; case 618 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); } //$NON-NLS-1$ consumeEqualityExpression(OperatorIds.EQUAL_EQUAL); break; case 619 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name EQUAL_EQUAL..."); } //$NON-NLS-1$ consumeEqualityExpressionWithName(OperatorIds.EQUAL_EQUAL); break; case 620 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); } //$NON-NLS-1$ consumeEqualityExpression(OperatorIds.NOT_EQUAL); break; case 621 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name NOT_EQUAL..."); } //$NON-NLS-1$ consumeEqualityExpressionWithName(OperatorIds.NOT_EQUAL); break; case 623 : if (DEBUG) { System.out.println("AndExpression_NotName ::= AndExpression_NotName AND..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.AND); break; case 624 : if (DEBUG) { System.out.println("AndExpression_NotName ::= Name AND EqualityExpression"); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.AND); break; case 626 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.XOR); break; case 627 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::= Name XOR AndExpression"); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.XOR); break; case 629 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.OR); break; case 630 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::= Name OR..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.OR); break; case 632 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.AND_AND); break; case 633 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::= Name AND_AND..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.AND_AND); break; case 635 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::=..."); } //$NON-NLS-1$ consumeBinaryExpression(OperatorIds.OR_OR); break; case 636 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::= Name OR_OR..."); } //$NON-NLS-1$ consumeBinaryExpressionWithName(OperatorIds.OR_OR); break; case 638 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::=..."); } //$NON-NLS-1$ consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ; break; case 639 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::= Name QUESTION..."); } //$NON-NLS-1$ consumeConditionalExpressionWithName(OperatorIds.QUESTIONCOLON) ; break; case 643 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeader ::= Modifiers AT..."); } //$NON-NLS-1$ consumeAnnotationTypeDeclarationHeader() ; break; case 644 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeader ::= AT..."); } //$NON-NLS-1$ consumeAnnotationTypeDeclarationHeader() ; break; case 645 : if (DEBUG) { System.out.println("AnnotationTypeDeclaration ::=..."); } //$NON-NLS-1$ consumeAnnotationTypeDeclaration() ; break; case 647 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::="); } //$NON-NLS-1$ consumeEmptyAnnotationTypeMemberDeclarationsopt() ; break; case 650 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarations ::=..."); } //$NON-NLS-1$ consumeAnnotationTypeMemberDeclarations() ; break; case 651 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationHeader ::= Modifiersopt"); } //$NON-NLS-1$ consumeAnnotationTypeMemberDeclarationHeader() ; break; case 652 : if (DEBUG) { System.out.println("AnnotationTypeMemberHeaderExtendedDims ::= Dimsopt"); } //$NON-NLS-1$ consumeAnnotationTypeMemberHeaderExtendedDims() ; break; case 653 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclaration ::=..."); } //$NON-NLS-1$ consumeAnnotationTypeMemberDeclaration() ; break; case 656 : if (DEBUG) { System.out.println("DefaultValueopt ::="); } //$NON-NLS-1$ consumeEmptyDefaultValue() ; break; case 662 : if (DEBUG) { System.out.println("NormalAnnotation ::= AT Name LPAREN MemberValuePairsopt"); } //$NON-NLS-1$ consumeNormalAnnotation() ; break; case 663 : if (DEBUG) { System.out.println("MemberValuePairsopt ::="); } //$NON-NLS-1$ consumeEmptyMemberValuePairsopt() ; break; case 666 : if (DEBUG) { System.out.println("MemberValuePairs ::= MemberValuePairs COMMA..."); } //$NON-NLS-1$ consumeMemberValuePairs() ; break; case 667 : if (DEBUG) { System.out.println("MemberValuePair ::= SimpleName EQUAL MemberValue"); } //$NON-NLS-1$ consumeMemberValuePair() ; break; case 669 : if (DEBUG) { System.out.println("MemberValue ::= Name"); } //$NON-NLS-1$ consumeMemberValueAsName() ; break; case 672 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$ consumeMemberValueArrayInitializer() ; break; case 673 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$ consumeMemberValueArrayInitializer() ; break; case 674 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$ consumeEmptyMemberValueArrayInitializer() ; break; case 675 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$ consumeEmptyMemberValueArrayInitializer() ; break; case 677 : if (DEBUG) { System.out.println("MemberValues ::= MemberValues COMMA MemberValue"); } //$NON-NLS-1$ consumeMemberValues() ; break; case 678 : if (DEBUG) { System.out.println("MarkerAnnotation ::= AT Name"); } //$NON-NLS-1$ consumeMarkerAnnotation() ; break; case 679 : if (DEBUG) { System.out.println("SingleMemberAnnotation ::= AT Name LPAREN MemberValue..."); } //$NON-NLS-1$ consumeSingleMemberAnnotation() ; break; }} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/836fef68856b7e7f6b208deb388901eeda69de4b/Parser.java/buggy/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
7865,
2175,
12,
474,
1328,
13,
288,
225,
1620,
261,
1328,
262,
288,
565,
648,
12732,
294,
309,
261,
9394,
13,
288,
2332,
18,
659,
18,
8222,
2932,
559,
493,
33,
14488,
559,
8863,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
7865,
2175,
12,
474,
1328,
13,
288,
225,
1620,
261,
1328,
262,
288,
565,
648,
12732,
294,
309,
261,
9394,
13,
288,
2332,
18,
659,
18,
8222,
2932,
559,
493,
33,
14488,
559,
8863,
... |
if(currSchema.fTargetNamespace == null) | if(currSchema.fTargetNamespace == null) | void checkForDuplicateNames(String qName, Hashtable registry, Element currComp, XSDocumentInfo currSchema) { Object objElem = null; // REVISIT: when we add derivation checking, we'll have to make // sure that ID constraint collisions don't necessarily result in error messages. if((objElem = registry.get(qName)) == null) { // just add it in! registry.put(qName, currComp); } else { Element collidingElem = (Element)objElem; if(collidingElem == currComp) return; Element elemParent = null; XSDocumentInfo redefinedSchema = null; // case where we've collided with a redefining element // (the parent of the colliding element is a redefine) boolean collidedWithRedefine = true; if((DOMUtil.getLocalName((elemParent = DOMUtil.getParent(collidingElem))).equals(SchemaSymbols.ELT_REDEFINE))) { redefinedSchema = (XSDocumentInfo)(fRedefine2XSDMap.get(elemParent)); // case where we're a redefining element. } else if((DOMUtil.getLocalName(DOMUtil.getParent(currComp)).equals(SchemaSymbols.ELT_REDEFINE))){ redefinedSchema = (XSDocumentInfo)(fDoc2XSDocumentMap.get(DOMUtil.getDocument(collidingElem))); collidedWithRedefine = false; } if(redefinedSchema != null) { //redefinition involved somehow String newName = qName.substring(qName.lastIndexOf(',')+1)+REDEF_IDENTIFIER; if(redefinedSchema == currSchema) { // object comp. okay here // now have to do some renaming... currComp.setAttribute(SchemaSymbols.ATT_NAME, newName); if(currSchema.fTargetNamespace == null) registry.put(","+newName, currComp); else registry.put(currSchema.fTargetNamespace+","+newName, currComp); // and take care of nested redefines by calling recursively: if(currSchema.fTargetNamespace == null) checkForDuplicateNames(","+newName, registry, currComp, currSchema); else checkForDuplicateNames(currSchema.fTargetNamespace+","+newName, registry, currComp, currSchema); } else { // we may be redefining the wrong schema if(collidedWithRedefine) { if(currSchema.fTargetNamespace == null) checkForDuplicateNames(","+newName, registry, currComp, currSchema); else checkForDuplicateNames(currSchema.fTargetNamespace+","+newName, registry, currComp, currSchema); } else { // REVISIT: error that redefined element in wrong schema fElementTraverser.reportSchemaError("src-redefine.1", new Object [] {qName}); } } } else { // we've just got a flat-out collision fElementTraverser.reportSchemaError("sch-props-correct.2", new Object []{qName}); } } } // checkForDuplicateNames(String, Hashtable, Element, XSDocumentInfo):void | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/4b0def86a1a96df8c8cbd5bf50c757023d94325b/XSDHandler.java/clean/src/org/apache/xerces/impl/v2/XSDHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
13855,
11826,
1557,
12,
780,
22914,
16,
5411,
18559,
4023,
16,
3010,
4306,
2945,
16,
5411,
1139,
55,
2519,
966,
4306,
3078,
13,
288,
3639,
1033,
1081,
7498,
273,
446,
31,
3639,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
13855,
11826,
1557,
12,
780,
22914,
16,
5411,
18559,
4023,
16,
3010,
4306,
2945,
16,
5411,
1139,
55,
2519,
966,
4306,
3078,
13,
288,
3639,
1033,
1081,
7498,
273,
446,
31,
3639,
368,
... |
- cm.getTitle( ) .getBounds( ) .scaledInstance( dScale ) .getHeight( ); | - titleBounds.getHeight( ) * titleHPos; double dMaxLegendWidth = boFull.getWidth( ) / 3; double dMaxLegendHeight = boFull.getHeight( ) / 3; switch ( lgPosition.getValue( ) ) { case Position.LEFT : case Position.RIGHT : case Position.OUTSIDE : if ( dAvailableWidth > dMaxLegendWidth ) { dAvailableWidth = dMaxLegendWidth; } break; case Position.ABOVE : case Position.BELOW : if ( dAvailableHeight > dMaxLegendHeight ) { dAvailableHeight = dMaxLegendHeight; } break; } | public final Size compute( IDisplayServer xs, Chart cm, SeriesDefinition[] seda, RunTimeContext rtc ) throws ChartException { // THREE CASES: // 1. ALL SERIES IN ONE ARRAYLIST // 2. ONE SERIES PER ARRAYLIST // 3. ALL OTHERS final Legend lg = cm.getLegend( ); if ( !lg.isSetOrientation( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.legend.orientation.horzvert", //$NON-NLS-1$ Messages.getResourceBundle( xs.getULocale( ) ) ); } if ( !lg.isSetDirection( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.legend.direction.tblr", //$NON-NLS-1$ Messages.getResourceBundle( xs.getULocale( ) ) ); } // INITIALIZATION OF VARS USED IN FOLLOWING LOOPS final Orientation orientation = lg.getOrientation( ); final Direction direction = lg.getDirection( ); Label la = LabelImpl.create( ); la.setCaption( TextImpl.copyInstance( lg.getText( ) ) ); ClientArea ca = lg.getClientArea( ); LineAttributes lia = ca.getOutline( ); double dSeparatorThickness = lia.getThickness( ); double dWidth = 0, dHeight = 0; la.getCaption( ).setValue( "X" ); //$NON-NLS-1$ final ITextMetrics itm = xs.getTextMetrics( la ); double dItemHeight = itm.getFullHeight( ); Series se; List al; double dScale = xs.getDpiResolution( ) / 72d; Insets insCA = ca.getInsets( ).scaledInstance( dScale ); final boolean bPaletteByCategory = ( cm.getLegend( ) .getItemType( ) .getValue( ) == LegendItemType.CATEGORIES ); final double maxWrappingSize = lg.getWrappingSize( ) * dScale; Series seBase; final List legendItems = new ArrayList( ); final double dHorizontalSpacing = 3 * dScale; final double dVerticalSpacing = 3 * dScale; // Get maximum block width/height available Block bl = cm.getBlock( ); Bounds boFull = bl.getBounds( ).scaledInstance( dScale ); Insets ins = bl.getInsets( ).scaledInstance( dScale ); Insets lgIns = lg.getInsets( ).scaledInstance( dScale ); double dAvailableWidth = boFull.getWidth( ) - ins.getLeft( ) - ins.getRight( ) - lgIns.getLeft( ) - lgIns.getRight( ); double dAvailableHeight = boFull.getHeight( ) - ins.getTop( ) - ins.getBottom( ) - lgIns.getTop( ) - lgIns.getBottom( ) - cm.getTitle( ) .getBounds( ) .scaledInstance( dScale ) .getHeight( ); // Calculate if minSlice applicable. boolean bMinSliceDefined = false; String sMinSliceLabel = null; boolean bMinSliceApplied = false; int[] filteredMinSliceEntry = null; if ( cm instanceof ChartWithoutAxes ) { bMinSliceDefined = ( (ChartWithoutAxes) cm ).isSetMinSlice( ); sMinSliceLabel = ( (ChartWithoutAxes) cm ).getMinSliceLabel( ); if ( sMinSliceLabel == null || sMinSliceLabel.length( ) == 0 ) { sMinSliceLabel = IConstants.UNDEFINED_STRING; } else { sMinSliceLabel = rtc.externalizedMessage( sMinSliceLabel ); } } // calculate if need an extra legend item when minSlice defined. if ( bMinSliceDefined && bPaletteByCategory && cm instanceof ChartWithoutAxes ) { Map renders = rtc.getSeriesRenderers( ); if ( renders != null && !( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS SeriesDefinition sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); EList sdA = sdBase.getSeriesDefinitions( ); SeriesDefinition[] sdOrtho = (SeriesDefinition[]) sdA.toArray( new SeriesDefinition[sdA.size( )] ); DataSetIterator dsiOrtho = null; BaseRenderer br; boolean started = false; ENTRANCE: for ( int i = 0; i < sdOrtho.length; i++ ) { List sdRuntimeSA = sdOrtho[i].getRunTimeSeries( ); Series[] alRuntimeSeries = (Series[]) sdRuntimeSA.toArray( new Series[sdRuntimeSA.size( )] ); for ( int j = 0; j < alRuntimeSeries.length; j++ ) { try { dsiOrtho = new DataSetIterator( alRuntimeSeries[j].getDataSet( ) ); LegendItemRenderingHints lirh = (LegendItemRenderingHints) renders.get( alRuntimeSeries[j] ); if ( lirh == null ) { filteredMinSliceEntry = null; break ENTRANCE; } br = lirh.getRenderer( ); // ask each render for filtered min slice info int[] fsa = br.getFilteredMinSliceEntry( dsiOrtho ); if ( fsa != null && fsa.length > 0 ) { bMinSliceApplied = true; } if ( !started ) { started = true; filteredMinSliceEntry = fsa; } else { // get duplicate indices for all renderers filteredMinSliceEntry = getDuplicateIndices( fsa, filteredMinSliceEntry ); if ( filteredMinSliceEntry == null || filteredMinSliceEntry.length == 0 ) { filteredMinSliceEntry = null; break ENTRANCE; } } } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } } } // assign a zero-length array for successive convenience if ( filteredMinSliceEntry == null ) { filteredMinSliceEntry = new int[0]; } } } // COMPUTATIONS HERE MUST BE IN SYNC WITH THE ACTUAL RENDERER if ( orientation.getValue( ) == Orientation.VERTICAL ) { double dW, dMaxW = 0; double dRealHeight = 0, dExtraWidth = 0, dDeltaHeight; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; if ( cm instanceof ChartWithAxes ) { // ONLY SUPPORT 1 BASE AXIS FOR NOW final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { return SizeImpl.create( 0, 0 ); } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { return SizeImpl.create( 0, 0 ); } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); } // OK TO ASSUME THAT 1 BASE RUNTIME SERIES EXISTS seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } FormatSpecifier fs = null; if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } int pos = -1; while ( dsiBase.hasNext( ) ) { Object obj = dsiBase.next( ); pos++; // filter the not-used legend. if ( bMinSliceApplied && Arrays.binarySearch( filteredMinSliceEntry, pos ) >= 0 ) { continue; } String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } double dFWidth = bb.getWidth( ); double dFHeight = bb.getHeight( ); dDeltaHeight = insCA.getTop( ) + dFHeight + insCA.getBottom( ); if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dWidth + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dWidth = dFWidth; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = dDeltaHeight; } else { dWidth = Math.max( dFWidth, dWidth ); dHeight += dDeltaHeight; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dExtraWidth, dHeight - dDeltaHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), pos ) ); } // compute the extra MinSlice legend item if applicable. if ( bMinSliceApplied ) { la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } double dFWidth = bb.getWidth( ); double dFHeight = bb.getHeight( ); dDeltaHeight = insCA.getTop( ) + dFHeight + insCA.getBottom( ); if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dWidth + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dWidth = dFWidth; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = dDeltaHeight; } else { dWidth = Math.max( dFWidth, dWidth ); dHeight += dDeltaHeight; } legendItems.add( new LegendItemHints( LEGEND_MINSLICE_ENTRY, new Point( dExtraWidth, dHeight - dDeltaHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), dsiBase.size( ) ) ); } dWidth += insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing + insCA.getRight( ) + dExtraWidth; dHeight = Math.max( dRealHeight, dHeight ); } else if ( direction.getValue( ) == Direction.TOP_BOTTOM ) { // (VERTICAL => TB) dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); boolean oneVisibleSerie = false; for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); if ( se.isVisible( ) ) { oneVisibleSerie = true; } else { continue; } Object obj = se.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( lgtext, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } dW = bb.getWidth( ); double dFHeight = bb.getHeight( ); double dExtraHeight = 0; String extraText = null; dDeltaHeight = insCA.getTop( ) + dFHeight + insCA.getBottom( ); if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = LabelImpl.copyInstance( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dW = Math.max( dW, itm.getFullWidth( ) ); dExtraHeight = itm.getFullHeight( ); extraText = seLabel.getCaption( ).getValue( ); dDeltaHeight += dExtraHeight + 2 * dScale; } } if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = dW; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = dDeltaHeight; } else { dMaxW = Math.max( dW, dMaxW ); dHeight += dDeltaHeight; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dExtraWidth, dHeight - dDeltaHeight ), dW, dFHeight, la.getCaption( ).getValue( ), dExtraHeight, extraText ) ); } // SETUP HORIZONTAL SEPARATOR SPACING if ( oneVisibleSerie && j < seda.length - 1 && ( lg.getSeparator( ) == null || lg.getSeparator( ) .isVisible( ) ) ) { dHeight += dSeparatorThickness; legendItems.add( new LegendItemHints( LEGEND_SEPERATOR, new Point( dExtraWidth, dHeight - dSeparatorThickness / 2 ), dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2, 0, null, 0, null ) ); } } // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING + MAX // ITEM WIDTH + RIGHT INSETS dWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing + dMaxW + insCA.getRight( ) + dExtraWidth; dHeight = Math.max( dRealHeight, dHeight ); } else if ( direction.getValue( ) == Direction.LEFT_RIGHT ) { // (VERTICAL => LR) dSeparatorThickness += dHorizontalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); boolean oneVisibleSerie = false; for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); if ( se.isVisible( ) ) { oneVisibleSerie = true; } else { continue; } Object obj = se.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( lgtext, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } dW = bb.getWidth( ); double dFHeight = bb.getHeight( ); double dExtraHeight = 0; String extraText = null; dDeltaHeight = insCA.getTop( ) + dFHeight + insCA.getBottom( ); if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = LabelImpl.copyInstance( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dW = Math.max( dW, itm.getFullWidth( ) ); dExtraHeight = itm.getFullHeight( ); extraText = seLabel.getCaption( ).getValue( ); dDeltaHeight += itm.getFullHeight( ) + 2 * dScale; } } if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = dW; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = dDeltaHeight; } else { dMaxW = Math.max( dW, dMaxW ); dHeight += dDeltaHeight; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dExtraWidth, dHeight - dDeltaHeight ), dW, dFHeight, la.getCaption( ).getValue( ), dExtraHeight, extraText ) ); } if ( oneVisibleSerie ) { dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; } dMaxW = 0; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = 0; // SETUP VERTICAL SEPARATOR SPACING if ( oneVisibleSerie && j < seda.length - 1 && ( lg.getSeparator( ) == null || lg.getSeparator( ) .isVisible( ) ) ) { dExtraWidth += dSeparatorThickness; legendItems.add( new LegendItemHints( LEGEND_SEPERATOR, new Point( dExtraWidth - dSeparatorThickness / 2, 0 ), 0, dRealHeight, null, 0, null ) ); } } // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING + // MAX ITEM WIDTH + RIGHT INSETS dWidth += dExtraWidth; dHeight = Math.max( dRealHeight, dHeight ); } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.direction", //$NON-NLS-1$ new Object[]{ direction.getName( ) }, Messages.getResourceBundle( xs.getULocale( ) ) ); } } else if ( orientation.getValue( ) == Orientation.HORIZONTAL ) { double dH, dMaxH = 0; double dRealWidth = 0, dExtraHeight = 0, dDeltaWidth; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; if ( cm instanceof ChartWithAxes ) { // ONLY SUPPORT 1 BASE AXIS FOR NOW final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.base.axis.no.series.definitions", //$NON-NLS-1$ Messages.getResourceBundle( xs.getULocale( ) ) ); } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.base.axis.no.series.definitions", //$NON-NLS-1$ Messages.getResourceBundle( xs.getULocale( ) ) ); } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); } // OK TO ASSUME THAT 1 BASE RUNTIME SERIES EXISTS seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } FormatSpecifier fs = null; if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } int pos = -1; while ( dsiBase.hasNext( ) ) { Object obj = dsiBase.next( ); pos++; // filter the not-used legend. if ( bMinSliceApplied && Arrays.binarySearch( filteredMinSliceEntry, pos ) >= 0 ) { continue; } String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } double dFWidth = bb.getWidth( ); double dFHeight = bb.getHeight( ); dDeltaWidth = insCA.getLeft( ) + dFWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dHeight = dFHeight; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = dDeltaWidth; } else { dHeight = Math.max( dFHeight, dHeight ); dWidth += dDeltaWidth; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dWidth - dDeltaWidth, dExtraHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), pos ) ); } // compute the extra MinSlice legend item if applicable. if ( bMinSliceApplied ) { la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } double dFWidth = bb.getWidth( ); double dFHeight = bb.getHeight( ); dDeltaWidth = insCA.getLeft( ) + dFWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dHeight = dFHeight; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = dDeltaWidth; } else { dHeight = Math.max( dFHeight, dHeight ); dWidth += dDeltaWidth; } legendItems.add( new LegendItemHints( LEGEND_MINSLICE_ENTRY, new Point( dWidth - dDeltaWidth, dExtraHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), dsiBase.size( ) ) ); } dHeight += dExtraHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dWidth = Math.max( dWidth, dRealWidth ); } else if ( direction.getValue( ) == Direction.TOP_BOTTOM ) { // (HORIZONTAL => TB) dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { dWidth = 0; al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); boolean oneVisibleSerie = false; for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); if ( se.isVisible( ) ) { oneVisibleSerie = true; } else { continue; } Object obj = se.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( lgtext, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } dH = bb.getHeight( ); double dFHeight = dH; double dFWidth = bb.getWidth( ); double dEHeight = 0; String extraText = null; dDeltaWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dFWidth + insCA.getRight( ) + dHorizontalSpacing; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = LabelImpl.copyInstance( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dEHeight = itm.getFullHeight( ); extraText = seLabel.getCaption( ).getValue( ); dH += dEHeight + 2 * dScale; dDeltaWidth = Math.max( dDeltaWidth, itm.getFullWidth( ) ); } } if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = dH; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = dDeltaWidth; } else { dMaxH = Math.max( dH, dMaxH ); dWidth += dDeltaWidth; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dWidth - dDeltaWidth, dExtraHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), dEHeight, extraText ) ); } if ( oneVisibleSerie ) { dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; } dMaxH = 0; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = 0; // SETUP HORIZONTAL SEPARATOR SPACING if ( oneVisibleSerie && j < seda.length - 1 && ( lg.getSeparator( ) == null || lg.getSeparator( ) .isVisible( ) ) ) { dHeight += dSeparatorThickness; legendItems.add( new LegendItemHints( LEGEND_SEPERATOR, new Point( 0, dExtraHeight - dSeparatorThickness / 2 ), dRealWidth, 0, null, 0, null ) ); } } dHeight += dExtraHeight; dWidth = Math.max( dRealWidth, dWidth ); } else if ( direction.getValue( ) == Direction.LEFT_RIGHT ) { // (HORIZONTAL => LR) dSeparatorThickness += dHorizontalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); boolean oneVisibleSerie = false; for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); if ( se.isVisible( ) ) { oneVisibleSerie = true; } else { continue; } Object obj = se.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( lgtext, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } dH = bb.getHeight( ); double dFHeight = dH; double dFWidth = bb.getWidth( ); double dEHeight = 0; String extraText = null; dDeltaWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dFWidth + insCA.getRight( ) + dHorizontalSpacing; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = LabelImpl.copyInstance( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dEHeight = itm.getFullHeight( ); extraText = seLabel.getCaption( ).getValue( ); dH += dEHeight + 2 * dScale; dDeltaWidth = Math.max( dDeltaWidth, itm.getFullWidth( ) ); } } if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = dH; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = dDeltaWidth; } else { dMaxH = Math.max( dH, dMaxH ); dWidth += dDeltaWidth; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dWidth - dDeltaWidth, dExtraHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), dEHeight, extraText ) ); } // SETUP VERTICAL SEPARATOR SPACING if ( oneVisibleSerie && j < seda.length - 1 && ( lg.getSeparator( ) == null || lg.getSeparator( ) .isVisible( ) ) ) { dWidth += dSeparatorThickness; legendItems.add( new LegendItemHints( LEGEND_SEPERATOR, new Point( dWidth - dSeparatorThickness / 2, dExtraHeight ), 0, dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing, null, 0, null ) ); } } dHeight += insCA.getTop( ) + dVerticalSpacing + insCA.getBottom( ) + dMaxH + dExtraHeight; dWidth = Math.max( dRealWidth, dWidth ); } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.direction", //$NON-NLS-1$ new Object[]{ direction }, Messages.getResourceBundle( xs.getULocale( ) ) ); } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.orientation", //$NON-NLS-1$ new Object[]{ orientation }, Messages.getResourceBundle( xs.getULocale( ) ) ); } // consider legend title size. Label lgTitle = lg.getTitle( ); Size titleSize = null; if ( lgTitle != null && lgTitle.isSetVisible( ) && lgTitle.isVisible( ) ) { lgTitle = LabelImpl.copyInstance( lgTitle ); // handle external resource string final String sPreviousValue = lgTitle.getCaption( ).getValue( ); lgTitle.getCaption( ) .setValue( rtc.externalizedMessage( sPreviousValue ) ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, lgTitle, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } int iTitlePos = lg.getTitlePosition( ).getValue( ); // swap left/right if ( rtc.isRightToLeft( ) ) { if ( iTitlePos == Position.LEFT ) { iTitlePos = Position.RIGHT; } else if ( iTitlePos == Position.RIGHT ) { iTitlePos = Position.LEFT; } } double shadowness = 3 * dScale; switch ( iTitlePos ) { case Position.ABOVE : case Position.BELOW : dHeight += bb.getHeight( ) + 2 * shadowness; dWidth = Math.max( dWidth, bb.getWidth( ) + 2 * shadowness ); break; case Position.LEFT : case Position.RIGHT : dWidth += bb.getWidth( ) + 2 * shadowness; dHeight = Math.max( dHeight, bb.getHeight( ) + 2 * shadowness ); break; } titleSize = SizeImpl.create( bb.getWidth( ) + 2 * shadowness, bb.getHeight( ) + 2 * shadowness ); } itm.dispose( ); // DISPOSE RESOURCE AFTER USE if ( rtc != null ) { LegendItemHints[] liha = (LegendItemHints[]) legendItems.toArray( new LegendItemHints[legendItems.size( )] ); // update context hints here. LegendLayoutHints lilh = new LegendLayoutHints( SizeImpl.create( dWidth, dHeight ), titleSize, bMinSliceApplied, sMinSliceLabel, liha ); rtc.setLegendLayoutHints( lilh ); } sz = SizeImpl.create( dWidth, dHeight ); return sz; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/bdbe857d641e2e27600409e7bb20f1950ed1536b/LegendBuilder.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/LegendBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
6321,
3671,
12,
1599,
291,
1601,
2081,
9280,
16,
14804,
5003,
16,
1082,
202,
6485,
1852,
8526,
24336,
69,
16,
1939,
950,
1042,
436,
5111,
262,
1216,
14804,
503,
202,
95,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6321,
3671,
12,
1599,
291,
1601,
2081,
9280,
16,
14804,
5003,
16,
1082,
202,
6485,
1852,
8526,
24336,
69,
16,
1939,
950,
1042,
436,
5111,
262,
1216,
14804,
503,
202,
95,
... |
throw new BCException("conflicting dominates orders"); | ISourceLocation[] isls = new ISourceLocation[2]; isls[0]=orderer.getSourceLocation(); isls[1]=d.getSourceLocation(); Message m = new Message("conflicting declare precedence orderings for aspects: "+ aspect1.getName()+" and "+aspect2.getName(),null,true,isls); messageHandler.handleMessage(m); | public int compareByDominates(ResolvedTypeX aspect1, ResolvedTypeX aspect2) { //System.out.println("dom compare: " + aspect1 + " with " + aspect2); //System.out.println(crosscuttingMembersSet.getDeclareDominates()); //??? We probably want to cache this result. This is order N where N is the //??? number of dominates declares in the whole system. //??? This method can be called a large number of times. int order = 0; for (Iterator i = crosscuttingMembersSet.getDeclareDominates().iterator(); i.hasNext(); ) { DeclarePrecedence d = (DeclarePrecedence)i.next(); int thisOrder = d.compare(aspect1, aspect2); //System.out.println("comparing: " + thisOrder + ": " + d); if (thisOrder != 0) { if (order != 0 && order != thisOrder) { throw new BCException("conflicting dominates orders"); } else { order = thisOrder; } } } return order; } | 7955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7955/2c835c0a5c2ea14477e9d2a79aecb6253bc71c56/World.java/buggy/org.aspectj/modules/weaver/src/org/aspectj/weaver/World.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
3400,
858,
8832,
4174,
12,
12793,
559,
60,
9648,
21,
16,
22776,
559,
60,
9648,
22,
13,
288,
202,
202,
759,
3163,
18,
659,
18,
8222,
2932,
9859,
3400,
30,
315,
397,
9648... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3400,
858,
8832,
4174,
12,
12793,
559,
60,
9648,
21,
16,
22776,
559,
60,
9648,
22,
13,
288,
202,
202,
759,
3163,
18,
659,
18,
8222,
2932,
9859,
3400,
30,
315,
397,
9648... |
public void ruleAction(int ruleNumber) { switch (ruleNumber) { // // Rule 1: TypeName ::= TypeName . ErrorId // case 1: { //#line 6 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name TypeName = (Name) getRhsSym(1); //#line 8 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), TypeName, "*")); break; } // // Rule 2: PackageName ::= PackageName . ErrorId // case 2: { //#line 16 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name PackageName = (Name) getRhsSym(1); //#line 18 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), PackageName, "*")); break; } // // Rule 3: ExpressionName ::= AmbiguousName . ErrorId // case 3: { //#line 26 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 28 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, "*")); break; } // // Rule 4: MethodName ::= AmbiguousName . ErrorId // case 4: { //#line 36 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 38 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, "*")); break; } // // Rule 5: PackageOrTypeName ::= PackageOrTypeName . ErrorId // case 5: { //#line 46 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name PackageOrTypeName = (Name) getRhsSym(1); //#line 48 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), PackageOrTypeName, "*")); break; } // // Rule 6: AmbiguousName ::= AmbiguousName . ErrorId // case 6: { //#line 56 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 58 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, "*")); break; } // // Rule 7: FieldAccess ::= Primary . ErrorId // case 7: { //#line 66 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Expr Primary = (Expr) getRhsSym(1); //#line 68 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(nf.Field(pos(), Primary, "*")); break; } // // Rule 8: FieldAccess ::= super . ErrorId // case 8: { //#line 73 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getLeftSpan())), "*")); break; } // // Rule 9: FieldAccess ::= ClassName . super$sup . ErrorId // case 9: { //#line 76 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name ClassName = (Name) getRhsSym(1); //#line 76 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" IToken sup = (IToken) getRhsIToken(3); //#line 78 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), "*")); break; } // // Rule 10: MethodInvocation ::= MethodPrimaryPrefix ( ArgumentListopt ) // case 10: { //#line 82 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Object MethodPrimaryPrefix = (Object) getRhsSym(1); //#line 82 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 84 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Expr Primary = (Expr) ((Object[]) MethodPrimaryPrefix)[0]; polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) ((Object[]) MethodPrimaryPrefix)[1]; setResult(nf.Call(pos(), Primary, identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 11: MethodInvocation ::= MethodSuperPrefix ( ArgumentListopt ) // case 11: { //#line 89 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" polyglot.lex.Identifier MethodSuperPrefix = (polyglot.lex.Identifier) getRhsSym(1); //#line 89 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 91 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" polyglot.lex.Identifier identifier = MethodSuperPrefix; setResult(nf.Call(pos(), nf.Super(pos(getLeftSpan())), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 12: MethodInvocation ::= MethodClassNameSuperPrefix ( ArgumentListopt ) // case 12: { //#line 95 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Object MethodClassNameSuperPrefix = (Object) getRhsSym(1); //#line 95 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 97 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name ClassName = (Name) ((Object[]) MethodClassNameSuperPrefix)[0]; JPGPosition super_pos = (JPGPosition) ((Object[]) MethodClassNameSuperPrefix)[1]; polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) ((Object[]) MethodClassNameSuperPrefix)[2]; setResult(nf.Call(pos(), nf.Super(super_pos, ClassName.toType()), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 13: MethodPrimaryPrefix ::= Primary . ErrorId$ErrorId // case 13: { //#line 104 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Expr Primary = (Expr) getRhsSym(1); //#line 104 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" IToken ErrorId = (IToken) getRhsIToken(3); //#line 106 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Object[] a = new Object[2]; a[0] = Primary; a[1] = id(getRhsFirstTokenIndex(3)); setResult(a); break; } // // Rule 14: MethodSuperPrefix ::= super . ErrorId$ErrorId // case 14: { //#line 112 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" IToken ErrorId = (IToken) getRhsIToken(3); //#line 114 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(id(getRhsFirstTokenIndex(3))); break; } // // Rule 15: MethodClassNameSuperPrefix ::= ClassName . super$sup . ErrorId$ErrorId // case 15: { //#line 117 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name ClassName = (Name) getRhsSym(1); //#line 117 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" IToken sup = (IToken) getRhsIToken(3); //#line 117 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" IToken ErrorId = (IToken) getRhsIToken(5); //#line 119 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Object[] a = new Object[3]; a[0] = ClassName; a[1] = pos(getRhsFirstTokenIndex(3)); a[2] = id(getRhsFirstTokenIndex(5)); setResult(a); break; } // // Rule 16: identifier ::= IDENTIFIER$ident // case 16: { //#line 94 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken ident = (IToken) getRhsIToken(1); //#line 96 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ident.setKind(X10Parsersym.TK_IDENTIFIER); setResult(id(getRhsFirstTokenIndex(1))); break; } // // Rule 19: IntegralType ::= byte // case 19: { //#line 121 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Byte())); break; } // // Rule 20: IntegralType ::= char // case 20: { //#line 126 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Char())); break; } // // Rule 21: IntegralType ::= short // case 21: { //#line 131 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Short())); break; } // // Rule 22: IntegralType ::= int // case 22: { //#line 136 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Int())); break; } // // Rule 23: IntegralType ::= long // case 23: { //#line 141 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Long())); break; } // // Rule 24: FloatingPointType ::= float // case 24: { //#line 147 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Float())); break; } // // Rule 25: FloatingPointType ::= double // case 25: { //#line 152 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Double())); break; } // // Rule 28: TypeName ::= identifier // case 28: { //#line 175 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 177 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 29: TypeName ::= TypeName . identifier // case 29: { //#line 180 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name TypeName = (Name) getRhsSym(1); //#line 180 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 182 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), TypeName, identifier.getIdentifier())); break; } // // Rule 31: ArrayType ::= Type [ ] // case 31: { //#line 194 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(1); //#line 196 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.array(Type, pos(), 1)); break; } // // Rule 32: PackageName ::= identifier // case 32: { //#line 241 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 243 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 33: PackageName ::= PackageName . identifier // case 33: { //#line 246 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name PackageName = (Name) getRhsSym(1); //#line 246 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 248 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), PackageName, identifier.getIdentifier())); break; } // // Rule 34: ExpressionName ::= identifier // case 34: { //#line 262 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 264 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 35: ExpressionName ::= AmbiguousName . identifier // case 35: { //#line 267 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 267 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 269 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, identifier.getIdentifier())); break; } // // Rule 36: MethodName ::= identifier // case 36: { //#line 277 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 279 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 37: MethodName ::= AmbiguousName . identifier // case 37: { //#line 282 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 282 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 284 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, identifier.getIdentifier())); break; } // // Rule 38: PackageOrTypeName ::= identifier // case 38: { //#line 292 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 294 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 39: PackageOrTypeName ::= PackageOrTypeName . identifier // case 39: { //#line 297 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name PackageOrTypeName = (Name) getRhsSym(1); //#line 297 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 299 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), PackageOrTypeName, identifier.getIdentifier())); break; } // // Rule 40: AmbiguousName ::= identifier // case 40: { //#line 307 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 309 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 41: AmbiguousName ::= AmbiguousName . identifier // case 41: { //#line 312 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 312 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 314 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, identifier.getIdentifier())); break; } // // Rule 42: CompilationUnit ::= PackageDeclarationopt ImportDeclarationsopt TypeDeclarationsopt // case 42: { //#line 324 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" PackageNode PackageDeclarationopt = (PackageNode) getRhsSym(1); //#line 324 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ImportDeclarationsopt = (List) getRhsSym(2); //#line 324 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List TypeDeclarationsopt = (List) getRhsSym(3); //#line 326 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // Add import x10.lang.* by default. Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); int token_pos = (ImportDeclarationsopt.size() == 0 ? TypeDeclarationsopt.size() == 0 ? super.getSize() - 1 : getPrevious(getRhsFirstTokenIndex(3)) : getRhsLastTokenIndex(2) ); Import x10LangImport = nf.Import(pos(token_pos), Import.PACKAGE, x10Lang.toString()); ImportDeclarationsopt.add(x10LangImport); setResult(nf.SourceFile(pos(getLeftSpan(), getRightSpan()), PackageDeclarationopt, ImportDeclarationsopt, TypeDeclarationsopt)); break; } // // Rule 43: ImportDeclarations ::= ImportDeclaration // case 43: { //#line 342 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Import ImportDeclaration = (Import) getRhsSym(1); //#line 344 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Import.class, false); l.add(ImportDeclaration); setResult(l); break; } // // Rule 44: ImportDeclarations ::= ImportDeclarations ImportDeclaration // case 44: { //#line 349 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ImportDeclarations = (List) getRhsSym(1); //#line 349 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Import ImportDeclaration = (Import) getRhsSym(2); //#line 351 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (ImportDeclaration != null) ImportDeclarations.add(ImportDeclaration); //setResult(l); break; } // // Rule 45: TypeDeclarations ::= TypeDeclaration // case 45: { //#line 357 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl TypeDeclaration = (ClassDecl) getRhsSym(1); //#line 359 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TopLevelDecl.class, false); if (TypeDeclaration != null) l.add(TypeDeclaration); setResult(l); break; } // // Rule 46: TypeDeclarations ::= TypeDeclarations TypeDeclaration // case 46: { //#line 365 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List TypeDeclarations = (List) getRhsSym(1); //#line 365 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl TypeDeclaration = (ClassDecl) getRhsSym(2); //#line 367 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (TypeDeclaration != null) TypeDeclarations.add(TypeDeclaration); //setResult(l); break; } // // Rule 49: SingleTypeImportDeclaration ::= import TypeName ; // case 49: { //#line 380 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name TypeName = (Name) getRhsSym(2); //#line 382 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Import(pos(getLeftSpan(), getRightSpan()), Import.CLASS, TypeName.toString())); break; } // // Rule 50: TypeImportOnDemandDeclaration ::= import PackageOrTypeName . * ; // case 50: { //#line 386 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name PackageOrTypeName = (Name) getRhsSym(2); //#line 388 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Import(pos(getLeftSpan(), getRightSpan()), Import.PACKAGE, PackageOrTypeName.toString())); break; } // // Rule 53: TypeDeclaration ::= ; // case 53: { //#line 402 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(null); break; } // // Rule 56: ClassModifiers ::= ClassModifiers ClassModifier // case 56: { //#line 414 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ClassModifiers = (Flags) getRhsSym(1); //#line 414 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ClassModifier = (Flags) getRhsSym(2); //#line 416 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ClassModifiers.set(ClassModifier)); break; } // // Rule 57: ClassModifier ::= public // case 57: { //#line 424 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 58: ClassModifier ::= protected // case 58: { //#line 429 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 59: ClassModifier ::= private // case 59: { //#line 434 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 60: ClassModifier ::= abstract // case 60: { //#line 439 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 61: ClassModifier ::= static // case 61: { //#line 444 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 62: ClassModifier ::= final // case 62: { //#line 449 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 63: ClassModifier ::= strictfp // case 63: { //#line 454 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STRICTFP); break; } // // Rule 64: Super ::= extends ClassType // case 64: { //#line 466 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode ClassType = (TypeNode) getRhsSym(2); //#line 468 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ClassType); break; } // // Rule 65: Interfaces ::= implements InterfaceTypeList // case 65: { //#line 477 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceTypeList = (List) getRhsSym(2); //#line 479 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(InterfaceTypeList); break; } // // Rule 66: InterfaceTypeList ::= InterfaceType // case 66: { //#line 483 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(1); //#line 485 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(InterfaceType); setResult(l); break; } // // Rule 67: InterfaceTypeList ::= InterfaceTypeList , InterfaceType // case 67: { //#line 490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceTypeList = (List) getRhsSym(1); //#line 490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(3); //#line 492 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" InterfaceTypeList.add(InterfaceType); setResult(InterfaceTypeList); break; } // // Rule 68: ClassBody ::= { ClassBodyDeclarationsopt } // case 68: { //#line 502 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ClassBodyDeclarationsopt = (List) getRhsSym(2); //#line 504 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ClassBody(pos(getLeftSpan(), getRightSpan()), ClassBodyDeclarationsopt)); break; } // // Rule 70: ClassBodyDeclarations ::= ClassBodyDeclarations ClassBodyDeclaration // case 70: { //#line 509 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ClassBodyDeclarations = (List) getRhsSym(1); //#line 509 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ClassBodyDeclaration = (List) getRhsSym(2); //#line 511 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassBodyDeclarations.addAll(ClassBodyDeclaration); // setResult(a); break; } // // Rule 72: ClassBodyDeclaration ::= InstanceInitializer // case 72: { //#line 517 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block InstanceInitializer = (Block) getRhsSym(1); //#line 519 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(nf.Initializer(pos(), Flags.NONE, InstanceInitializer)); setResult(l); break; } // // Rule 73: ClassBodyDeclaration ::= StaticInitializer // case 73: { //#line 524 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block StaticInitializer = (Block) getRhsSym(1); //#line 526 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(nf.Initializer(pos(), Flags.STATIC, StaticInitializer)); setResult(l); break; } // // Rule 74: ClassBodyDeclaration ::= ConstructorDeclaration // case 74: { //#line 531 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ConstructorDecl ConstructorDeclaration = (ConstructorDecl) getRhsSym(1); //#line 533 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(ConstructorDeclaration); setResult(l); break; } // // Rule 76: ClassMemberDeclaration ::= MethodDeclaration // case 76: { //#line 540 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" MethodDecl MethodDeclaration = (MethodDecl) getRhsSym(1); //#line 542 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(MethodDeclaration); setResult(l); break; } // // Rule 77: ClassMemberDeclaration ::= ClassDeclaration // case 77: { //#line 547 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl ClassDeclaration = (ClassDecl) getRhsSym(1); //#line 549 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(ClassDeclaration); setResult(l); break; } // // Rule 78: ClassMemberDeclaration ::= InterfaceDeclaration // case 78: { //#line 554 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl InterfaceDeclaration = (ClassDecl) getRhsSym(1); //#line 556 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(InterfaceDeclaration); setResult(l); break; } // // Rule 79: ClassMemberDeclaration ::= ; // case 79: { //#line 563 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); setResult(l); break; } // // Rule 80: VariableDeclarators ::= VariableDeclarator // case 80: { //#line 571 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VarDeclarator VariableDeclarator = (VarDeclarator) getRhsSym(1); //#line 573 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), X10VarDeclarator.class, false); l.add(VariableDeclarator); setResult(l); break; } // // Rule 81: VariableDeclarators ::= VariableDeclarators , VariableDeclarator // case 81: { //#line 578 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableDeclarators = (List) getRhsSym(1); //#line 578 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VarDeclarator VariableDeclarator = (VarDeclarator) getRhsSym(3); //#line 580 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VariableDeclarators.add(VariableDeclarator); // setResult(VariableDeclarators); break; } // // Rule 83: VariableDeclarator ::= VariableDeclaratorId = VariableInitializer // case 83: { //#line 586 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator VariableDeclaratorId = (X10VarDeclarator) getRhsSym(1); //#line 586 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr VariableInitializer = (Expr) getRhsSym(3); //#line 588 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VariableDeclaratorId.init = VariableInitializer; VariableDeclaratorId.position(pos()); // setResult(VariableDeclaratorId); break; } // // Rule 84: TraditionalVariableDeclaratorId ::= identifier // case 84: { //#line 594 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 596 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new X10VarDeclarator(pos(), identifier.getIdentifier())); break; } // // Rule 85: TraditionalVariableDeclaratorId ::= TraditionalVariableDeclaratorId [ ] // case 85: { //#line 599 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator TraditionalVariableDeclaratorId = (X10VarDeclarator) getRhsSym(1); //#line 601 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TraditionalVariableDeclaratorId.dims++; TraditionalVariableDeclaratorId.position(pos()); // setResult(a); break; } // // Rule 87: VariableDeclaratorId ::= identifier [ IdentifierList ] // case 87: { //#line 608 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 608 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List IdentifierList = (List) getRhsSym(3); //#line 610 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new X10VarDeclarator(pos(), identifier.getIdentifier(), IdentifierList)); break; } // // Rule 88: VariableDeclaratorId ::= [ IdentifierList ] // case 88: { //#line 613 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List IdentifierList = (List) getRhsSym(2); //#line 615 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new X10VarDeclarator(pos(), IdentifierList)); break; } // // Rule 92: FieldModifiers ::= FieldModifiers FieldModifier // case 92: { //#line 623 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags FieldModifiers = (Flags) getRhsSym(1); //#line 623 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags FieldModifier = (Flags) getRhsSym(2); //#line 625 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(FieldModifiers.set(FieldModifier)); break; } // // Rule 93: FieldModifier ::= public // case 93: { //#line 633 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 94: FieldModifier ::= protected // case 94: { //#line 638 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 95: FieldModifier ::= private // case 95: { //#line 643 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 96: FieldModifier ::= static // case 96: { //#line 648 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 97: FieldModifier ::= final // case 97: { //#line 653 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 98: FieldModifier ::= transient // case 98: { //#line 658 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.TRANSIENT); break; } // // Rule 99: MethodDeclaration ::= MethodHeader MethodBody // case 99: { //#line 667 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" MethodDecl MethodHeader = (MethodDecl) getRhsSym(1); //#line 667 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block MethodBody = (Block) getRhsSym(2); //#line 669 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" JPGPosition old_pos = (JPGPosition) MethodHeader.position(); setResult(MethodHeader.body(MethodBody) .position(pos(old_pos.getLeftIToken().getTokenIndex(), getRightSpan()))); break; } // // Rule 101: ResultType ::= void // case 101: { //#line 680 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Void())); break; } // // Rule 102: FormalParameterList ::= LastFormalParameter // case 102: { //#line 700 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Formal LastFormalParameter = (Formal) getRhsSym(1); //#line 702 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Formal.class, false); l.add(LastFormalParameter); setResult(l); break; } // // Rule 103: FormalParameterList ::= FormalParameters , LastFormalParameter // case 103: { //#line 707 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List FormalParameters = (List) getRhsSym(1); //#line 707 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Formal LastFormalParameter = (Formal) getRhsSym(3); //#line 709 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" FormalParameters.add(LastFormalParameter); // setResult(FormalParameters); break; } // // Rule 104: FormalParameters ::= FormalParameter // case 104: { //#line 714 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10Formal FormalParameter = (X10Formal) getRhsSym(1); //#line 716 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Formal.class, false); l.add(FormalParameter); setResult(l); break; } // // Rule 105: FormalParameters ::= FormalParameters , FormalParameter // case 105: { //#line 721 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List FormalParameters = (List) getRhsSym(1); //#line 721 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 723 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" FormalParameters.add(FormalParameter); // setResult(FormalParameters); break; } // // Rule 106: FormalParameter ::= VariableModifiersopt Type VariableDeclaratorId // case 106: { //#line 728 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiersopt = (Flags) getRhsSym(1); //#line 728 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 728 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator VariableDeclaratorId = (X10VarDeclarator) getRhsSym(3); //#line 730 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (VariableDeclaratorId != null) setResult(nf.Formal(pos(), VariableModifiersopt, nf.array(Type, pos(getRhsFirstTokenIndex(2), getRhsLastTokenIndex(2)), VariableDeclaratorId.dims), VariableDeclaratorId.name, VariableDeclaratorId.names())); else setResult(nf.Formal(pos(), VariableModifiersopt, nf.array(Type, pos(getRhsFirstTokenIndex(2), getRhsLastTokenIndex(2)), 1), "", new AmbExpr[0])); break; } // // Rule 108: VariableModifiers ::= VariableModifiers VariableModifier // case 108: { //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiers = (Flags) getRhsSym(1); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifier = (Flags) getRhsSym(2); //#line 740 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(VariableModifiers.set(VariableModifier)); break; } // // Rule 109: VariableModifier ::= final // case 109: { //#line 746 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 110: LastFormalParameter ::= VariableModifiersopt Type ...opt$opt VariableDeclaratorId // case 110: { //#line 752 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiersopt = (Flags) getRhsSym(1); //#line 752 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 752 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Object opt = (Object) getRhsSym(3); //#line 752 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator VariableDeclaratorId = (X10VarDeclarator) getRhsSym(4); //#line 754 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" assert(opt == null); setResult(nf.Formal(pos(), VariableModifiersopt, nf.array(Type, pos(getRhsFirstTokenIndex(2), getRhsLastTokenIndex(2)), VariableDeclaratorId.dims), VariableDeclaratorId.name, VariableDeclaratorId.names())); break; } // // Rule 112: MethodModifiers ::= MethodModifiers MethodModifier // case 112: { //#line 766 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags MethodModifiers = (Flags) getRhsSym(1); //#line 766 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags MethodModifier = (Flags) getRhsSym(2); //#line 768 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(MethodModifiers.set(MethodModifier)); break; } // // Rule 113: MethodModifier ::= public // case 113: { //#line 776 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 114: MethodModifier ::= protected // case 114: { //#line 781 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 115: MethodModifier ::= private // case 115: { //#line 786 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 116: MethodModifier ::= abstract // case 116: { //#line 791 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 117: MethodModifier ::= static // case 117: { //#line 796 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 118: MethodModifier ::= final // case 118: { //#line 801 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 119: MethodModifier ::= native // case 119: { //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NATIVE); break; } // // Rule 120: MethodModifier ::= strictfp // case 120: { //#line 816 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STRICTFP); break; } // // Rule 121: Throws ::= throws ExceptionTypeList // case 121: { //#line 820 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ExceptionTypeList = (List) getRhsSym(2); //#line 822 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ExceptionTypeList); break; } // // Rule 122: ExceptionTypeList ::= ExceptionType // case 122: { //#line 826 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode ExceptionType = (TypeNode) getRhsSym(1); //#line 828 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(ExceptionType); setResult(l); break; } // // Rule 123: ExceptionTypeList ::= ExceptionTypeList , ExceptionType // case 123: { //#line 833 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ExceptionTypeList = (List) getRhsSym(1); //#line 833 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode ExceptionType = (TypeNode) getRhsSym(3); //#line 835 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ExceptionTypeList.add(ExceptionType); // setResult(ExceptionTypeList); break; } // // Rule 126: MethodBody ::= ; // case 126: setResult(null); break; // // Rule 128: StaticInitializer ::= static Block // case 128: { //#line 855 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 857 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Block); break; } // // Rule 129: SimpleTypeName ::= identifier // case 129: { //#line 872 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 874 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 131: ConstructorModifiers ::= ConstructorModifiers ConstructorModifier // case 131: { //#line 879 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstructorModifiers = (Flags) getRhsSym(1); //#line 879 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstructorModifier = (Flags) getRhsSym(2); //#line 881 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ConstructorModifiers.set(ConstructorModifier)); break; } // // Rule 132: ConstructorModifier ::= public // case 132: { //#line 889 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 133: ConstructorModifier ::= protected // case 133: { //#line 894 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 134: ConstructorModifier ::= private // case 134: { //#line 899 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 135: ConstructorBody ::= { ExplicitConstructorInvocationopt BlockStatementsopt } // case 135: { //#line 903 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt ExplicitConstructorInvocationopt = (Stmt) getRhsSym(2); //#line 903 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatementsopt = (List) getRhsSym(3); //#line 905 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l; if (ExplicitConstructorInvocationopt == null) l = BlockStatementsopt; else { l = new TypedList(new LinkedList(), Stmt.class, false); l.add(ExplicitConstructorInvocationopt); l.addAll(BlockStatementsopt); } setResult(nf.Block(pos(), l)); break; } // // Rule 136: Arguments ::= ( ArgumentListopt ) // case 136: { //#line 936 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ArgumentListopt = (List) getRhsSym(2); //#line 938 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ArgumentListopt); break; } // // Rule 139: InterfaceModifiers ::= InterfaceModifiers InterfaceModifier // case 139: { //#line 954 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags InterfaceModifiers = (Flags) getRhsSym(1); //#line 954 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags InterfaceModifier = (Flags) getRhsSym(2); //#line 956 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(InterfaceModifiers.set(InterfaceModifier)); break; } // // Rule 140: InterfaceModifier ::= public // case 140: { //#line 964 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 141: InterfaceModifier ::= protected // case 141: { //#line 969 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 142: InterfaceModifier ::= private // case 142: { //#line 974 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 143: InterfaceModifier ::= abstract // case 143: { //#line 979 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 144: InterfaceModifier ::= static // case 144: { //#line 984 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 145: InterfaceModifier ::= strictfp // case 145: { //#line 989 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STRICTFP); break; } // // Rule 146: ExtendsInterfaces ::= extends InterfaceType // case 146: { //#line 993 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(2); //#line 995 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(InterfaceType); setResult(l); break; } // // Rule 147: ExtendsInterfaces ::= ExtendsInterfaces , InterfaceType // case 147: { //#line 1000 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ExtendsInterfaces = (List) getRhsSym(1); //#line 1000 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(3); //#line 1002 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ExtendsInterfaces.add(InterfaceType); // setResult(ExtendsInterfaces); break; } // // Rule 148: InterfaceBody ::= { InterfaceMemberDeclarationsopt } // case 148: { //#line 1012 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceMemberDeclarationsopt = (List) getRhsSym(2); //#line 1014 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ClassBody(pos(), InterfaceMemberDeclarationsopt)); break; } // // Rule 150: InterfaceMemberDeclarations ::= InterfaceMemberDeclarations InterfaceMemberDeclaration // case 150: { //#line 1019 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceMemberDeclarations = (List) getRhsSym(1); //#line 1019 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceMemberDeclaration = (List) getRhsSym(2); //#line 1021 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" InterfaceMemberDeclarations.addAll(InterfaceMemberDeclaration); // setResult(l); break; } // // Rule 152: InterfaceMemberDeclaration ::= AbstractMethodDeclaration // case 152: { //#line 1027 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" MethodDecl AbstractMethodDeclaration = (MethodDecl) getRhsSym(1); //#line 1029 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(AbstractMethodDeclaration); setResult(l); break; } // // Rule 153: InterfaceMemberDeclaration ::= ClassDeclaration // case 153: { //#line 1034 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl ClassDeclaration = (ClassDecl) getRhsSym(1); //#line 1036 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(ClassDeclaration); setResult(l); break; } // // Rule 154: InterfaceMemberDeclaration ::= InterfaceDeclaration // case 154: { //#line 1041 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl InterfaceDeclaration = (ClassDecl) getRhsSym(1); //#line 1043 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(InterfaceDeclaration); setResult(l); break; } // // Rule 155: InterfaceMemberDeclaration ::= ; // case 155: { //#line 1050 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Collections.EMPTY_LIST); break; } // // Rule 156: ConstantDeclaration ::= ConstantModifiersopt Type VariableDeclarators // case 156: { //#line 1054 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstantModifiersopt = (Flags) getRhsSym(1); //#line 1054 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1054 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableDeclarators = (List) getRhsSym(3); //#line 1056 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); for (Iterator i = VariableDeclarators.iterator(); i.hasNext();) { X10VarDeclarator d = (X10VarDeclarator) i.next(); if (d.hasExplodedVars()) // TODO: Report this exception correctly. throw new Error("Field Declarations may not have exploded variables." + pos()); l.add(nf.FieldDecl(pos(getRhsFirstTokenIndex(2), getRightSpan()), ConstantModifiersopt, nf.array(Type, pos(getRhsFirstTokenIndex(2), getRhsLastTokenIndex(2)), d.dims), d.name, d.init)); } setResult(l); break; } // // Rule 158: ConstantModifiers ::= ConstantModifiers ConstantModifier // case 158: { //#line 1074 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstantModifiers = (Flags) getRhsSym(1); //#line 1074 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstantModifier = (Flags) getRhsSym(2); //#line 1076 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ConstantModifiers.set(ConstantModifier)); break; } // // Rule 159: ConstantModifier ::= public // case 159: { //#line 1084 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 160: ConstantModifier ::= static // case 160: { //#line 1089 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 161: ConstantModifier ::= final // case 161: { //#line 1094 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 163: AbstractMethodModifiers ::= AbstractMethodModifiers AbstractMethodModifier // case 163: { //#line 1101 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags AbstractMethodModifiers = (Flags) getRhsSym(1); //#line 1101 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags AbstractMethodModifier = (Flags) getRhsSym(2); //#line 1103 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(AbstractMethodModifiers.set(AbstractMethodModifier)); break; } // // Rule 164: AbstractMethodModifier ::= public // case 164: { //#line 1111 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 165: AbstractMethodModifier ::= abstract // case 165: { //#line 1116 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 166: SimpleName ::= identifier // case 166: { //#line 1172 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1174 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 167: ArrayInitializer ::= { VariableInitializersopt ,opt$opt } // case 167: { //#line 1201 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableInitializersopt = (List) getRhsSym(2); //#line 1201 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Object opt = (Object) getRhsSym(3); //#line 1203 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (VariableInitializersopt == null) setResult(nf.ArrayInit(pos())); else setResult(nf.ArrayInit(pos(), VariableInitializersopt)); break; } // // Rule 168: VariableInitializers ::= VariableInitializer // case 168: { //#line 1209 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr VariableInitializer = (Expr) getRhsSym(1); //#line 1211 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(VariableInitializer); setResult(l); break; } // // Rule 169: VariableInitializers ::= VariableInitializers , VariableInitializer // case 169: { //#line 1216 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableInitializers = (List) getRhsSym(1); //#line 1216 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr VariableInitializer = (Expr) getRhsSym(3); //#line 1218 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VariableInitializers.add(VariableInitializer); //setResult(VariableInitializers); break; } // // Rule 170: Block ::= { BlockStatementsopt } // case 170: { //#line 1237 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatementsopt = (List) getRhsSym(2); //#line 1239 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Block(pos(), BlockStatementsopt)); break; } // // Rule 171: BlockStatements ::= BlockStatement // case 171: { //#line 1243 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatement = (List) getRhsSym(1); //#line 1245 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Stmt.class, false); l.addAll(BlockStatement); setResult(l); break; } // // Rule 172: BlockStatements ::= BlockStatements BlockStatement // case 172: { //#line 1250 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatements = (List) getRhsSym(1); //#line 1250 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatement = (List) getRhsSym(2); //#line 1252 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" BlockStatements.addAll(BlockStatement); //setResult(l); break; } // // Rule 174: BlockStatement ::= ClassDeclaration // case 174: { //#line 1258 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl ClassDeclaration = (ClassDecl) getRhsSym(1); //#line 1260 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(nf.LocalClassDecl(pos(), ClassDeclaration)); setResult(l); break; } // // Rule 175: BlockStatement ::= Statement // case 175: { //#line 1265 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(1); //#line 1267 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(Statement); setResult(l); break; } // // Rule 177: LocalVariableDeclaration ::= VariableModifiersopt Type VariableDeclarators // case 177: { //#line 1275 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiersopt = (Flags) getRhsSym(1); //#line 1275 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1275 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableDeclarators = (List) getRhsSym(3); //#line 1277 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), LocalDecl.class, false); List s = new TypedList(new LinkedList(), Stmt.class, false); if (VariableDeclarators != null) { for (Iterator i = VariableDeclarators.iterator(); i.hasNext(); ) { X10VarDeclarator d = (X10VarDeclarator) i.next(); d.setFlag(VariableModifiersopt); // use d.flags below and not flags, setFlag may change it. l.add(nf.LocalDecl(d.pos, d.flags, nf.array(Type, pos(d), d.dims), d.name, d.init)); // [IP] TODO: Add X10Local with exploded variables if (d.hasExplodedVars()) s.addAll(X10Formal_c.explode(nf, ts, d.name, pos(d), d.flags, d.names())); } } l.addAll(s); setResult(l); break; } // // Rule 201: IfThenStatement ::= if ( Expression ) Statement // case 201: { //#line 1338 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1338 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(5); //#line 1340 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.If(pos(), Expression, Statement)); break; } // // Rule 202: IfThenElseStatement ::= if ( Expression ) StatementNoShortIf else Statement // case 202: { //#line 1344 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1344 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1344 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(7); //#line 1346 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.If(pos(), Expression, StatementNoShortIf, Statement)); break; } // // Rule 203: IfThenElseStatementNoShortIf ::= if ( Expression ) StatementNoShortIf$true_stmt else StatementNoShortIf$false_stmt // case 203: { //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt true_stmt = (Stmt) getRhsSym(5); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt false_stmt = (Stmt) getRhsSym(7); //#line 1352 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.If(pos(), Expression, true_stmt, false_stmt)); break; } // // Rule 204: EmptyStatement ::= ; // case 204: { //#line 1358 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Empty(pos())); break; } // // Rule 205: LabeledStatement ::= identifier : Statement // case 205: { //#line 1362 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1362 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(3); //#line 1364 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Labeled(pos(), identifier.getIdentifier(), Statement)); break; } // // Rule 206: LabeledStatementNoShortIf ::= identifier : StatementNoShortIf // case 206: { //#line 1368 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1368 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(3); //#line 1370 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Labeled(pos(), identifier.getIdentifier(), StatementNoShortIf)); break; } // // Rule 207: ExpressionStatement ::= StatementExpression ; // case 207: { //#line 1373 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr StatementExpression = (Expr) getRhsSym(1); //#line 1375 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Eval(pos(), StatementExpression)); break; } // // Rule 215: AssertStatement ::= assert Expression ; // case 215: { //#line 1396 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1398 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Assert(pos(), Expression)); break; } // // Rule 216: AssertStatement ::= assert Expression$expr1 : Expression$expr2 ; // case 216: { //#line 1401 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr expr1 = (Expr) getRhsSym(2); //#line 1401 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr expr2 = (Expr) getRhsSym(4); //#line 1403 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Assert(pos(), expr1, expr2)); break; } // // Rule 217: SwitchStatement ::= switch ( Expression ) SwitchBlock // case 217: { //#line 1407 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1407 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlock = (List) getRhsSym(5); //#line 1409 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Switch(pos(), Expression, SwitchBlock)); break; } // // Rule 218: SwitchBlock ::= { SwitchBlockStatementGroupsopt SwitchLabelsopt } // case 218: { //#line 1413 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlockStatementGroupsopt = (List) getRhsSym(2); //#line 1413 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchLabelsopt = (List) getRhsSym(3); //#line 1415 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" SwitchBlockStatementGroupsopt.addAll(SwitchLabelsopt); setResult(SwitchBlockStatementGroupsopt); break; } // // Rule 220: SwitchBlockStatementGroups ::= SwitchBlockStatementGroups SwitchBlockStatementGroup // case 220: { //#line 1421 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlockStatementGroups = (List) getRhsSym(1); //#line 1421 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlockStatementGroup = (List) getRhsSym(2); //#line 1423 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" SwitchBlockStatementGroups.addAll(SwitchBlockStatementGroup); // setResult(SwitchBlockStatementGroups); break; } // // Rule 221: SwitchBlockStatementGroup ::= SwitchLabels BlockStatements // case 221: { //#line 1428 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchLabels = (List) getRhsSym(1); //#line 1428 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatements = (List) getRhsSym(2); //#line 1430 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), SwitchElement.class, false); l.addAll(SwitchLabels); l.add(nf.SwitchBlock(pos(), BlockStatements)); setResult(l); break; } // // Rule 222: SwitchLabels ::= SwitchLabel // case 222: { //#line 1437 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Case SwitchLabel = (Case) getRhsSym(1); //#line 1439 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Case.class, false); l.add(SwitchLabel); setResult(l); break; } // // Rule 223: SwitchLabels ::= SwitchLabels SwitchLabel // case 223: { //#line 1444 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchLabels = (List) getRhsSym(1); //#line 1444 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Case SwitchLabel = (Case) getRhsSym(2); //#line 1446 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" SwitchLabels.add(SwitchLabel); //setResult(SwitchLabels); break; } // // Rule 224: SwitchLabel ::= case ConstantExpression : // case 224: { //#line 1451 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConstantExpression = (Expr) getRhsSym(2); //#line 1453 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Case(pos(), ConstantExpression)); break; } // // Rule 225: SwitchLabel ::= default : // case 225: { //#line 1460 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Default(pos())); break; } // // Rule 226: WhileStatement ::= while ( Expression ) Statement // case 226: { //#line 1467 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1467 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(5); //#line 1469 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.While(pos(), Expression, Statement)); break; } // // Rule 227: WhileStatementNoShortIf ::= while ( Expression ) StatementNoShortIf // case 227: { //#line 1473 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1473 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1475 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.While(pos(), Expression, StatementNoShortIf)); break; } // // Rule 228: DoStatement ::= do Statement while ( Expression ) ; // case 228: { //#line 1479 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(2); //#line 1479 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(5); //#line 1481 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Do(pos(), Statement, Expression)); break; } // // Rule 231: BasicForStatement ::= for ( ForInitopt ; Expressionopt ; ForUpdateopt ) Statement // case 231: { //#line 1488 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForInitopt = (List) getRhsSym(3); //#line 1488 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expressionopt = (Expr) getRhsSym(5); //#line 1488 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForUpdateopt = (List) getRhsSym(7); //#line 1488 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(9); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.For(pos(), ForInitopt, Expressionopt, ForUpdateopt, Statement)); break; } // // Rule 232: ForStatementNoShortIf ::= for ( ForInitopt ; Expressionopt ; ForUpdateopt ) StatementNoShortIf // case 232: { //#line 1494 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForInitopt = (List) getRhsSym(3); //#line 1494 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expressionopt = (Expr) getRhsSym(5); //#line 1494 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForUpdateopt = (List) getRhsSym(7); //#line 1494 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(9); //#line 1496 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.For(pos(), ForInitopt, Expressionopt, ForUpdateopt, StatementNoShortIf)); break; } // // Rule 234: ForInit ::= LocalVariableDeclaration // case 234: { //#line 1501 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List LocalVariableDeclaration = (List) getRhsSym(1); //#line 1503 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ForInit.class, false); l.addAll(LocalVariableDeclaration); //setResult(l); break; } // // Rule 236: StatementExpressionList ::= StatementExpression // case 236: { //#line 1511 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr StatementExpression = (Expr) getRhsSym(1); //#line 1513 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Eval.class, false); l.add(nf.Eval(pos(), StatementExpression)); setResult(l); break; } // // Rule 237: StatementExpressionList ::= StatementExpressionList , StatementExpression // case 237: { //#line 1518 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List StatementExpressionList = (List) getRhsSym(1); //#line 1518 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr StatementExpression = (Expr) getRhsSym(3); //#line 1520 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" StatementExpressionList.add(nf.Eval(pos(), StatementExpression)); //setResult(StatementExpressionList); break; } // // Rule 238: BreakStatement ::= break identifieropt ; // case 238: { //#line 1528 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name identifieropt = (Name) getRhsSym(2); //#line 1530 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (identifieropt == null) setResult(nf.Break(pos())); else setResult(nf.Break(pos(), identifieropt.toString())); break; } // // Rule 239: ContinueStatement ::= continue identifieropt ; // case 239: { //#line 1536 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name identifieropt = (Name) getRhsSym(2); //#line 1538 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (identifieropt == null) setResult(nf.Continue(pos())); else setResult(nf.Continue(pos(), identifieropt.toString())); break; } // // Rule 240: ReturnStatement ::= return Expressionopt ; // case 240: { //#line 1544 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expressionopt = (Expr) getRhsSym(2); //#line 1546 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Return(pos(), Expressionopt)); break; } // // Rule 241: ThrowStatement ::= throw Expression ; // case 241: { //#line 1550 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1552 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Throw(pos(), Expression)); break; } // // Rule 242: TryStatement ::= try Block Catches // case 242: { //#line 1562 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 1562 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List Catches = (List) getRhsSym(3); //#line 1564 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Try(pos(), Block, Catches)); break; } // // Rule 243: TryStatement ::= try Block Catchesopt Finally // case 243: { //#line 1567 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 1567 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List Catchesopt = (List) getRhsSym(3); //#line 1567 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Finally = (Block) getRhsSym(4); //#line 1569 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Try(pos(), Block, Catchesopt, Finally)); break; } // // Rule 244: Catches ::= CatchClause // case 244: { //#line 1573 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Catch CatchClause = (Catch) getRhsSym(1); //#line 1575 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Catch.class, false); l.add(CatchClause); setResult(l); break; } // // Rule 245: Catches ::= Catches CatchClause // case 245: { //#line 1580 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List Catches = (List) getRhsSym(1); //#line 1580 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Catch CatchClause = (Catch) getRhsSym(2); //#line 1582 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Catches.add(CatchClause); //setResult(Catches); break; } // // Rule 246: CatchClause ::= catch ( FormalParameter ) Block // case 246: { //#line 1587 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1587 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(5); //#line 1589 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Catch(pos(), FormalParameter, Block)); break; } // // Rule 247: Finally ::= finally Block // case 247: { //#line 1593 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 1595 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Block); break; } // // Rule 251: PrimaryNoNewArray ::= Type . class // case 251: { //#line 1613 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1615 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (Type instanceof Name) { Name a = (Name) Type; setResult(nf.ClassLit(pos(), a.toType())); } else if (Type instanceof TypeNode) { setResult(nf.ClassLit(pos(), Type)); } else if (Type instanceof CanonicalTypeNode) { CanonicalTypeNode a = (CanonicalTypeNode) Type; setResult(nf.ClassLit(pos(), a)); } else assert(false); break; } // // Rule 252: PrimaryNoNewArray ::= void . class // case 252: { //#line 1634 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ClassLit(pos(), nf.CanonicalTypeNode(pos(getLeftSpan()), ts.Void()))); break; } // // Rule 253: PrimaryNoNewArray ::= this // case 253: { //#line 1640 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.This(pos())); break; } // // Rule 254: PrimaryNoNewArray ::= ClassName . this // case 254: { //#line 1643 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ClassName = (Name) getRhsSym(1); //#line 1645 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.This(pos(), ClassName.toType())); break; } // // Rule 255: PrimaryNoNewArray ::= ( Expression ) // case 255: { //#line 1648 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1650 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ParExpr(pos(), Expression)); break; } // // Rule 260: Literal ::= IntegerLiteral$IntegerLiteral // case 260: { //#line 1658 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken IntegerLiteral = (IToken) getRhsIToken(1); //#line 1660 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.IntegerLiteral a = int_lit(getRhsFirstTokenIndex(1)); setResult(nf.IntLit(pos(), IntLit.INT, a.getValue().intValue())); break; } // // Rule 261: Literal ::= LongLiteral$LongLiteral // case 261: { //#line 1664 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken LongLiteral = (IToken) getRhsIToken(1); //#line 1666 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.LongLiteral a = long_lit(getRhsFirstTokenIndex(1)); setResult(nf.IntLit(pos(), IntLit.LONG, a.getValue().longValue())); break; } // // Rule 262: Literal ::= FloatingPointLiteral$FloatLiteral // case 262: { //#line 1670 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken FloatLiteral = (IToken) getRhsIToken(1); //#line 1672 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.FloatLiteral a = float_lit(getRhsFirstTokenIndex(1)); setResult(nf.FloatLit(pos(), FloatLit.FLOAT, a.getValue().floatValue())); break; } // // Rule 263: Literal ::= DoubleLiteral$DoubleLiteral // case 263: { //#line 1676 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken DoubleLiteral = (IToken) getRhsIToken(1); //#line 1678 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.DoubleLiteral a = double_lit(getRhsFirstTokenIndex(1)); setResult(nf.FloatLit(pos(), FloatLit.DOUBLE, a.getValue().doubleValue())); break; } // // Rule 264: Literal ::= BooleanLiteral // case 264: { //#line 1682 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.BooleanLiteral BooleanLiteral = (polyglot.lex.BooleanLiteral) getRhsSym(1); //#line 1684 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.BooleanLit(pos(), BooleanLiteral.getValue().booleanValue())); break; } // // Rule 265: Literal ::= CharacterLiteral$CharacterLiteral // case 265: { //#line 1687 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken CharacterLiteral = (IToken) getRhsIToken(1); //#line 1689 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.CharacterLiteral a = char_lit(getRhsFirstTokenIndex(1)); setResult(nf.CharLit(pos(), a.getValue().charValue())); break; } // // Rule 266: Literal ::= StringLiteral$str // case 266: { //#line 1693 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken str = (IToken) getRhsIToken(1); //#line 1695 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.StringLiteral a = string_lit(getRhsFirstTokenIndex(1)); setResult(nf.StringLit(pos(), a.getValue())); break; } // // Rule 267: Literal ::= null // case 267: { //#line 1701 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.NullLit(pos())); break; } // // Rule 268: BooleanLiteral ::= true$trueLiteral // case 268: { //#line 1705 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken trueLiteral = (IToken) getRhsIToken(1); //#line 1707 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(boolean_lit(getRhsFirstTokenIndex(1))); break; } // // Rule 269: BooleanLiteral ::= false$falseLiteral // case 269: { //#line 1710 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken falseLiteral = (IToken) getRhsIToken(1); //#line 1712 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(boolean_lit(getRhsFirstTokenIndex(1))); break; } // // Rule 270: ArgumentList ::= Expression // case 270: { //#line 1725 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(1); //#line 1727 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(Expression); setResult(l); break; } // // Rule 271: ArgumentList ::= ArgumentList , Expression // case 271: { //#line 1732 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ArgumentList = (List) getRhsSym(1); //#line 1732 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1734 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ArgumentList.add(Expression); //setResult(ArgumentList); break; } // // Rule 272: DimExprs ::= DimExpr // case 272: { //#line 1768 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr DimExpr = (Expr) getRhsSym(1); //#line 1770 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(DimExpr); setResult(l); break; } // // Rule 273: DimExprs ::= DimExprs DimExpr // case 273: { //#line 1775 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List DimExprs = (List) getRhsSym(1); //#line 1775 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr DimExpr = (Expr) getRhsSym(2); //#line 1777 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" DimExprs.add(DimExpr); //setResult(DimExprs); break; } // // Rule 274: DimExpr ::= [ Expression ] // case 274: { //#line 1782 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1784 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Expression.position(pos())); break; } // // Rule 275: Dims ::= [ ] // case 275: { //#line 1790 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Integer(1)); break; } // // Rule 276: Dims ::= Dims [ ] // case 276: { //#line 1793 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Integer Dims = (Integer) getRhsSym(1); //#line 1795 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Integer(Dims.intValue() + 1)); break; } // // Rule 277: FieldAccess ::= Primary . identifier // case 277: { //#line 1799 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Primary = (Expr) getRhsSym(1); //#line 1799 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1801 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Field(pos(), Primary, identifier.getIdentifier())); break; } // // Rule 278: FieldAccess ::= super . identifier // case 278: { //#line 1804 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1806 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getLeftSpan())), identifier.getIdentifier())); break; } // // Rule 279: FieldAccess ::= ClassName . super$sup . identifier // case 279: { //#line 1809 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ClassName = (Name) getRhsSym(1); //#line 1809 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken sup = (IToken) getRhsIToken(3); //#line 1809 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(5); //#line 1811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), identifier.getIdentifier())); break; } // // Rule 280: MethodInvocation ::= MethodName ( ArgumentListopt ) // case 280: { //#line 1815 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name MethodName = (Name) getRhsSym(1); //#line 1815 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 1817 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Call(pos(), MethodName.prefix == null ? null : MethodName.prefix.toReceiver(), MethodName.name, ArgumentListopt)); break; } // // Rule 282: PostfixExpression ::= ExpressionName // case 282: { //#line 1840 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ExpressionName = (Name) getRhsSym(1); //#line 1842 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ExpressionName.toExpr()); break; } // // Rule 285: PostIncrementExpression ::= PostfixExpression ++ // case 285: { //#line 1848 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr PostfixExpression = (Expr) getRhsSym(1); //#line 1850 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), PostfixExpression, Unary.POST_INC)); break; } // // Rule 286: PostDecrementExpression ::= PostfixExpression -- // case 286: { //#line 1854 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr PostfixExpression = (Expr) getRhsSym(1); //#line 1856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), PostfixExpression, Unary.POST_DEC)); break; } // // Rule 289: UnaryExpression ::= + UnaryExpression // case 289: { //#line 1862 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1864 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.POS, UnaryExpression)); break; } // // Rule 290: UnaryExpression ::= - UnaryExpression // case 290: { //#line 1867 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1869 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.NEG, UnaryExpression)); break; } // // Rule 292: PreIncrementExpression ::= ++ UnaryExpression // case 292: { //#line 1874 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1876 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.PRE_INC, UnaryExpression)); break; } // // Rule 293: PreDecrementExpression ::= -- UnaryExpression // case 293: { //#line 1880 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1882 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.PRE_DEC, UnaryExpression)); break; } // // Rule 295: UnaryExpressionNotPlusMinus ::= ~ UnaryExpression // case 295: { //#line 1887 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1889 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.BIT_NOT, UnaryExpression)); break; } // // Rule 296: UnaryExpressionNotPlusMinus ::= ! UnaryExpression // case 296: { //#line 1892 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1894 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.NOT, UnaryExpression)); break; } // // Rule 299: MultiplicativeExpression ::= MultiplicativeExpression * UnaryExpression // case 299: { //#line 1906 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(1); //#line 1906 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(3); //#line 1908 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), MultiplicativeExpression, Binary.MUL, UnaryExpression)); break; } // // Rule 300: MultiplicativeExpression ::= MultiplicativeExpression / UnaryExpression // case 300: { //#line 1911 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(1); //#line 1911 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(3); //#line 1913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), MultiplicativeExpression, Binary.DIV, UnaryExpression)); break; } // // Rule 301: MultiplicativeExpression ::= MultiplicativeExpression % UnaryExpression // case 301: { //#line 1916 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(1); //#line 1916 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(3); //#line 1918 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), MultiplicativeExpression, Binary.MOD, UnaryExpression)); break; } // // Rule 303: AdditiveExpression ::= AdditiveExpression + MultiplicativeExpression // case 303: { //#line 1923 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(1); //#line 1923 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(3); //#line 1925 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), AdditiveExpression, Binary.ADD, MultiplicativeExpression)); break; } // // Rule 304: AdditiveExpression ::= AdditiveExpression - MultiplicativeExpression // case 304: { //#line 1928 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(1); //#line 1928 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(3); //#line 1930 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), AdditiveExpression, Binary.SUB, MultiplicativeExpression)); break; } // // Rule 306: ShiftExpression ::= ShiftExpression << AdditiveExpression // case 306: { //#line 1935 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(1); //#line 1935 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(3); //#line 1937 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ShiftExpression, Binary.SHL, AdditiveExpression)); break; } // // Rule 307: ShiftExpression ::= ShiftExpression > > AdditiveExpression // case 307: { //#line 1940 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(1); //#line 1940 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(4); //#line 1942 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(nf.Binary(pos(), ShiftExpression, Binary.SHR, AdditiveExpression)); break; } // // Rule 308: ShiftExpression ::= ShiftExpression > > > AdditiveExpression // case 308: { //#line 1946 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(1); //#line 1946 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(5); //#line 1948 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(nf.Binary(pos(), ShiftExpression, Binary.USHR, AdditiveExpression)); break; } // // Rule 310: RelationalExpression ::= RelationalExpression < ShiftExpression // case 310: { //#line 1954 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1954 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(3); //#line 1956 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), RelationalExpression, Binary.LT, ShiftExpression)); break; } // // Rule 311: RelationalExpression ::= RelationalExpression > ShiftExpression // case 311: { //#line 1959 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1959 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(3); //#line 1961 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), RelationalExpression, Binary.GT, ShiftExpression)); break; } // // Rule 312: RelationalExpression ::= RelationalExpression <= ShiftExpression // case 312: { //#line 1964 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1964 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(3); //#line 1966 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), RelationalExpression, Binary.LE, ShiftExpression)); break; } // // Rule 313: RelationalExpression ::= RelationalExpression > = ShiftExpression // case 313: { //#line 1969 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1969 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(4); //#line 1971 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(nf.Binary(pos(), RelationalExpression, Binary.GE, ShiftExpression)); break; } // // Rule 315: EqualityExpression ::= EqualityExpression == RelationalExpression // case 315: { //#line 1985 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr EqualityExpression = (Expr) getRhsSym(1); //#line 1985 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(3); //#line 1987 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), EqualityExpression, Binary.EQ, RelationalExpression)); break; } // // Rule 316: EqualityExpression ::= EqualityExpression != RelationalExpression // case 316: { //#line 1990 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr EqualityExpression = (Expr) getRhsSym(1); //#line 1990 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(3); //#line 1992 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), EqualityExpression, Binary.NE, RelationalExpression)); break; } // // Rule 318: AndExpression ::= AndExpression & EqualityExpression // case 318: { //#line 1997 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AndExpression = (Expr) getRhsSym(1); //#line 1997 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr EqualityExpression = (Expr) getRhsSym(3); //#line 1999 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), AndExpression, Binary.BIT_AND, EqualityExpression)); break; } // // Rule 320: ExclusiveOrExpression ::= ExclusiveOrExpression ^ AndExpression // case 320: { //#line 2004 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ExclusiveOrExpression = (Expr) getRhsSym(1); //#line 2004 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AndExpression = (Expr) getRhsSym(3); //#line 2006 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ExclusiveOrExpression, Binary.BIT_XOR, AndExpression)); break; } // // Rule 322: InclusiveOrExpression ::= InclusiveOrExpression | ExclusiveOrExpression // case 322: { //#line 2011 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr InclusiveOrExpression = (Expr) getRhsSym(1); //#line 2011 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ExclusiveOrExpression = (Expr) getRhsSym(3); //#line 2013 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), InclusiveOrExpression, Binary.BIT_OR, ExclusiveOrExpression)); break; } // // Rule 324: ConditionalAndExpression ::= ConditionalAndExpression && InclusiveOrExpression // case 324: { //#line 2018 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalAndExpression = (Expr) getRhsSym(1); //#line 2018 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr InclusiveOrExpression = (Expr) getRhsSym(3); //#line 2020 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ConditionalAndExpression, Binary.COND_AND, InclusiveOrExpression)); break; } // // Rule 326: ConditionalOrExpression ::= ConditionalOrExpression || ConditionalAndExpression // case 326: { //#line 2025 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalOrExpression = (Expr) getRhsSym(1); //#line 2025 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalAndExpression = (Expr) getRhsSym(3); //#line 2027 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ConditionalOrExpression, Binary.COND_OR, ConditionalAndExpression)); break; } // // Rule 328: ConditionalExpression ::= ConditionalOrExpression ? Expression : ConditionalExpression // case 328: { //#line 2032 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalOrExpression = (Expr) getRhsSym(1); //#line 2032 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 2032 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalExpression = (Expr) getRhsSym(5); //#line 2034 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Conditional(pos(), ConditionalOrExpression, Expression, ConditionalExpression)); break; } // // Rule 331: Assignment ::= LeftHandSide AssignmentOperator AssignmentExpression // case 331: { //#line 2041 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr LeftHandSide = (Expr) getRhsSym(1); //#line 2041 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Assign.Operator AssignmentOperator = (Assign.Operator) getRhsSym(2); //#line 2041 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AssignmentExpression = (Expr) getRhsSym(3); //#line 2043 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Assign(pos(), LeftHandSide, AssignmentOperator, AssignmentExpression)); break; } // // Rule 332: LeftHandSide ::= ExpressionName // case 332: { //#line 2047 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ExpressionName = (Name) getRhsSym(1); //#line 2049 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ExpressionName.toExpr()); break; } // // Rule 335: AssignmentOperator ::= = // case 335: { //#line 2057 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.ASSIGN); break; } // // Rule 336: AssignmentOperator ::= *= // case 336: { //#line 2062 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.MUL_ASSIGN); break; } // // Rule 337: AssignmentOperator ::= /= // case 337: { //#line 2067 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.DIV_ASSIGN); break; } // // Rule 338: AssignmentOperator ::= %= // case 338: { //#line 2072 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.MOD_ASSIGN); break; } // // Rule 339: AssignmentOperator ::= += // case 339: { //#line 2077 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.ADD_ASSIGN); break; } // // Rule 340: AssignmentOperator ::= -= // case 340: { //#line 2082 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.SUB_ASSIGN); break; } // // Rule 341: AssignmentOperator ::= <<= // case 341: { //#line 2087 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.SHL_ASSIGN); break; } // // Rule 342: AssignmentOperator ::= > > = // case 342: { //#line 2092 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(Assign.SHR_ASSIGN); break; } // // Rule 343: AssignmentOperator ::= > > > = // case 343: { //#line 2098 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(Assign.USHR_ASSIGN); break; } // // Rule 344: AssignmentOperator ::= &= // case 344: { //#line 2104 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.BIT_AND_ASSIGN); break; } // // Rule 345: AssignmentOperator ::= ^= // case 345: { //#line 2109 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.BIT_XOR_ASSIGN); break; } // // Rule 346: AssignmentOperator ::= |= // case 346: { //#line 2114 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.BIT_OR_ASSIGN); break; } // // Rule 349: Dimsopt ::= $Empty // case 349: { //#line 2127 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Integer(0)); break; } // // Rule 351: Catchesopt ::= $Empty // case 351: { //#line 2134 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 353: identifieropt ::= $Empty // case 353: setResult(null); break; // // Rule 354: identifieropt ::= identifier // case 354: { //#line 2141 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 2143 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 355: ForUpdateopt ::= $Empty // case 355: { //#line 2149 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ForUpdate.class, false)); break; } // // Rule 357: Expressionopt ::= $Empty // case 357: setResult(null); break; // // Rule 359: ForInitopt ::= $Empty // case 359: { //#line 2160 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ForInit.class, false)); break; } // // Rule 361: SwitchLabelsopt ::= $Empty // case 361: { //#line 2167 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Case.class, false)); break; } // // Rule 363: SwitchBlockStatementGroupsopt ::= $Empty // case 363: { //#line 2174 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), SwitchElement.class, false)); break; } // // Rule 365: VariableModifiersopt ::= $Empty // case 365: { //#line 2181 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 367: VariableInitializersopt ::= $Empty // case 367: setResult(null); break; // // Rule 369: AbstractMethodModifiersopt ::= $Empty // case 369: { //#line 2211 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 371: ConstantModifiersopt ::= $Empty // case 371: { //#line 2218 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 373: InterfaceMemberDeclarationsopt ::= $Empty // case 373: { //#line 2225 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 375: ExtendsInterfacesopt ::= $Empty // case 375: { //#line 2232 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 377: InterfaceModifiersopt ::= $Empty // case 377: { //#line 2239 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 379: ClassBodyopt ::= $Empty // case 379: setResult(null); break; // // Rule 381: Argumentsopt ::= $Empty // case 381: setResult(null); break; // // Rule 382: Argumentsopt ::= Arguments // case 382: throw new Error("No action specified for rule " + 382); // // Rule 383: ,opt ::= $Empty // case 383: setResult(null); break; // // Rule 385: ArgumentListopt ::= $Empty // case 385: { //#line 2269 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 387: BlockStatementsopt ::= $Empty // case 387: { //#line 2276 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Stmt.class, false)); break; } // // Rule 389: ExplicitConstructorInvocationopt ::= $Empty // case 389: setResult(null); break; // // Rule 391: ConstructorModifiersopt ::= $Empty // case 391: { //#line 2287 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 393: ...opt ::= $Empty // case 393: setResult(null); break; // // Rule 395: FormalParameterListopt ::= $Empty // case 395: { //#line 2298 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Formal.class, false)); break; } // // Rule 397: Throwsopt ::= $Empty // case 397: { //#line 2305 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 399: MethodModifiersopt ::= $Empty // case 399: { //#line 2312 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 401: FieldModifiersopt ::= $Empty // case 401: { //#line 2319 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 403: ClassBodyDeclarationsopt ::= $Empty // case 403: { //#line 2326 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 405: Interfacesopt ::= $Empty // case 405: { //#line 2333 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 407: Superopt ::= $Empty // case 407: { //#line 2340 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), "x10.lang.Object").toType()); break; } // // Rule 409: ClassModifiersopt ::= $Empty // case 409: { //#line 2351 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 411: TypeDeclarationsopt ::= $Empty // case 411: { //#line 2363 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TopLevelDecl.class, false)); break; } // // Rule 413: ImportDeclarationsopt ::= $Empty // case 413: { //#line 2370 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Import.class, false)); break; } // // Rule 415: PackageDeclarationopt ::= $Empty // case 415: setResult(null); break; // // Rule 417: ClassType ::= TypeName DepParametersopt PlaceTypeSpecifieropt // case 417: { //#line 715 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name TypeName = (Name) getRhsSym(1); //#line 715 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 715 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object PlaceTypeSpecifieropt = (Object) getRhsSym(3); //#line 717 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DepParametersopt == null ? TypeName.toType() : ((X10TypeNode) TypeName.toType()).dep(null, DepParametersopt)); break; } // // Rule 418: InterfaceType ::= TypeName DepParametersopt PlaceTypeSpecifieropt // case 418: { //#line 724 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name TypeName = (Name) getRhsSym(1); //#line 724 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 724 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object PlaceTypeSpecifieropt = (Object) getRhsSym(3); //#line 726 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DepParametersopt == null ? TypeName.toType() : ((X10TypeNode) TypeName.toType()).dep(null, DepParametersopt)); break; } // // Rule 419: PackageDeclaration ::= package PackageName ; // case 419: { //#line 732 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name PackageName = (Name) getRhsSym(2); //#line 734 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(PackageName.toPackage()); break; } // // Rule 420: NormalClassDeclaration ::= X10ClassModifiersopt class identifier PropertyListopt Superopt Interfacesopt ClassBody // case 420: { //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiersopt = (X10Flags) getRhsSym(1); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(4); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Superopt = (TypeNode) getRhsSym(5); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Interfacesopt = (List) getRhsSym(6); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBody = (ClassBody) getRhsSym(7); //#line 740 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" checkTypeName(identifier); List/*<PropertyDecl>*/ props = PropertyListopt == null ? null : (List) PropertyListopt[0]; Expr ci = PropertyListopt == null ? null : (Expr) PropertyListopt[1]; setResult(X10Flags.isValue(X10ClassModifiersopt) ? nf.ValueClassDecl(pos(), X10ClassModifiersopt, identifier.getIdentifier(), props, ci, Superopt, Interfacesopt, ClassBody) : nf.ClassDecl(pos(), X10ClassModifiersopt, identifier.getIdentifier(), props, ci, Superopt, Interfacesopt, ClassBody)); break; } // // Rule 422: X10ClassModifiers ::= X10ClassModifiers X10ClassModifier // case 422: { //#line 753 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiers = (X10Flags) getRhsSym(1); //#line 753 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifier = (X10Flags) getRhsSym(2); //#line 755 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags result = X10ClassModifiers.setX(X10ClassModifier); setResult(result); break; } // // Rule 423: X10ClassModifier ::= ClassModifier // case 423: { //#line 761 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags ClassModifier = (Flags) getRhsSym(1); //#line 763 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.toX10Flags(ClassModifier)); break; } // // Rule 424: X10ClassModifier ::= safe // case 424: { //#line 768 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.SAFE); break; } // // Rule 425: PropertyList ::= ( Properties WhereClauseopt ) // case 425: { //#line 772 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Properties = (List) getRhsSym(2); //#line 772 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(3); //#line 774 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] result = new Object[2]; result[0] = Properties; result[1] = WhereClauseopt; setResult(result); break; } // // Rule 426: PropertyList ::= ( WhereClause ) // case 426: { //#line 779 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClause = (Expr) getRhsSym(2); //#line 781 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] result = new Object[2]; result[0] = null; result[1] = WhereClause; setResult(result); break; } // // Rule 427: Properties ::= Property // case 427: { //#line 788 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" PropertyDecl Property = (PropertyDecl) getRhsSym(1); //#line 790 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), PropertyDecl.class, false); l.add(Property); setResult(l); break; } // // Rule 428: Properties ::= Properties , Property // case 428: { //#line 795 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Properties = (List) getRhsSym(1); //#line 795 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" PropertyDecl Property = (PropertyDecl) getRhsSym(3); //#line 797 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Properties.add(Property); // setResult(FormalParameters); break; } // // Rule 429: Property ::= Type identifier // case 429: { //#line 803 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 803 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(2); //#line 805 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.PropertyDecl(pos(), Flags.PUBLIC.Final(), Type, identifier.getIdentifier())); break; } // // Rule 430: MethodHeader ::= ThisClauseopt MethodModifiersopt ResultType MethodDeclarator Throwsopt // case 430: { //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr ThisClauseopt = (DepParameterExpr) getRhsSym(1); //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags MethodModifiersopt = (Flags) getRhsSym(2); //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ResultType = (TypeNode) getRhsSym(3); //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] MethodDeclarator = (Object[]) getRhsSym(4); //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Throwsopt = (List) getRhsSym(5); //#line 813 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name c = (MethodDeclarator != null) ? (Name) MethodDeclarator[0] : null; List d = (MethodDeclarator != null) ? (List) MethodDeclarator[1] : null; Integer e = (MethodDeclarator != null) ? (Integer) MethodDeclarator[2] : null; Expr where = (MethodDeclarator != null) ? (Expr) MethodDeclarator[3] : null; if (ResultType.type() == ts.Void() && e != null && e.intValue() > 0) { // TODO: error!!! System.err.println("Fix me - encountered method returning void but with non-zero rank?"); } setResult(nf.MethodDecl(pos(getRhsFirstTokenIndex(3), getRhsLastTokenIndex(4)), ThisClauseopt, MethodModifiersopt, nf.array((TypeNode) ResultType, pos(getRhsFirstTokenIndex(3), getRhsLastTokenIndex(3)), e != null ? e.intValue() : 1), c != null ? c.toString() : "", d, where, Throwsopt, null)); break; } // // Rule 431: ExplicitConstructorInvocation ::= this ( ArgumentListopt ) ; // case 431: { //#line 835 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(3); //#line 837 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ThisCall(pos(), ArgumentListopt)); break; } // // Rule 432: ExplicitConstructorInvocation ::= super ( ArgumentListopt ) ; // case 432: { //#line 840 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(3); //#line 842 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.SuperCall(pos(), ArgumentListopt)); break; } // // Rule 433: ExplicitConstructorInvocation ::= Primary . this ( ArgumentListopt ) ; // case 433: { //#line 845 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 845 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 847 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ThisCall(pos(), Primary, ArgumentListopt)); break; } // // Rule 434: ExplicitConstructorInvocation ::= Primary . super ( ArgumentListopt ) ; // case 434: { //#line 850 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 850 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 852 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.SuperCall(pos(), Primary, ArgumentListopt)); break; } // // Rule 435: NormalInterfaceDeclaration ::= InterfaceModifiersopt interface identifier PropertyListopt ExtendsInterfacesopt InterfaceBody // case 435: { //#line 856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags InterfaceModifiersopt = (Flags) getRhsSym(1); //#line 856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(4); //#line 856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ExtendsInterfacesopt = (List) getRhsSym(5); //#line 856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody InterfaceBody = (ClassBody) getRhsSym(6); //#line 858 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" checkTypeName(identifier); List/*<PropertyDecl>*/ props = PropertyListopt == null ? null : (List) PropertyListopt[0]; Expr ci = PropertyListopt == null ? null : (Expr) PropertyListopt[1]; setResult(nf.ClassDecl(pos(), InterfaceModifiersopt.Interface(), identifier.getIdentifier(), props, ci, null, ExtendsInterfacesopt, InterfaceBody)); break; } // // Rule 436: AbstractMethodDeclaration ::= ThisClauseopt AbstractMethodModifiersopt ResultType MethodDeclarator Throwsopt ; // case 436: { //#line 873 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr ThisClauseopt = (DepParameterExpr) getRhsSym(1); //#line 873 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags AbstractMethodModifiersopt = (Flags) getRhsSym(2); //#line 873 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ResultType = (TypeNode) getRhsSym(3); //#line 873 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] MethodDeclarator = (Object[]) getRhsSym(4); //#line 873 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Throwsopt = (List) getRhsSym(5); //#line 875 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name c = (Name) MethodDeclarator[0]; List d = (List) MethodDeclarator[1]; Integer e = (Integer) MethodDeclarator[2]; Expr where = (Expr) MethodDeclarator[3]; if (ResultType.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! assert(false); } setResult(nf.MethodDecl(pos(getRhsFirstTokenIndex(3), getRhsLastTokenIndex(4)), ThisClauseopt, AbstractMethodModifiersopt , nf.array((TypeNode) ResultType, pos(getRhsFirstTokenIndex(3), getRhsLastTokenIndex(3)), e.intValue()), c.toString(), d, where, Throwsopt, null)); break; } // // Rule 437: ClassInstanceCreationExpression ::= new ClassOrInterfaceType ( ArgumentListopt ) ClassBodyopt // case 437: { //#line 898 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ClassOrInterfaceType = (TypeNode) getRhsSym(2); //#line 898 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(4); //#line 898 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBodyopt = (ClassBody) getRhsSym(6); //#line 900 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" if (ClassBodyopt == null) setResult(nf.New(pos(), ClassOrInterfaceType, ArgumentListopt)); else setResult(nf.New(pos(), ClassOrInterfaceType, ArgumentListopt, ClassBodyopt)); break; } // // Rule 438: ClassInstanceCreationExpression ::= Primary . new identifier ( ArgumentListopt ) ClassBodyopt // case 438: { //#line 905 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 905 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(4); //#line 905 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(6); //#line 905 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBodyopt = (ClassBody) getRhsSym(8); //#line 907 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name b = new Name(nf, ts, pos(), identifier.getIdentifier()); if (ClassBodyopt == null) setResult(nf.New(pos(), Primary, b.toType(), ArgumentListopt)); else setResult(nf.New(pos(), Primary, b.toType(), ArgumentListopt, ClassBodyopt)); break; } // // Rule 439: ClassInstanceCreationExpression ::= AmbiguousName . new identifier ( ArgumentListopt ) ClassBodyopt // case 439: { //#line 913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name AmbiguousName = (Name) getRhsSym(1); //#line 913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(4); //#line 913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(6); //#line 913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBodyopt = (ClassBody) getRhsSym(8); //#line 915 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name b = new Name(nf, ts, pos(), identifier.getIdentifier()); if (ClassBodyopt == null) setResult(nf.New(pos(), AmbiguousName.toExpr(), b.toType(), ArgumentListopt)); else setResult(nf.New(pos(), AmbiguousName.toExpr(), b.toType(), ArgumentListopt, ClassBodyopt)); break; } // // Rule 440: MethodInvocation ::= Primary . identifier ( ArgumentListopt ) // case 440: { //#line 922 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 922 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 922 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 924 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Call(pos(), Primary, identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 441: MethodInvocation ::= super . identifier ( ArgumentListopt ) // case 441: { //#line 927 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 927 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 929 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Call(pos(), nf.Super(pos(getLeftSpan())), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 442: MethodInvocation ::= ClassName . super$sup . identifier ( ArgumentListopt ) // case 442: { //#line 932 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name ClassName = (Name) getRhsSym(1); //#line 932 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IToken sup = (IToken) getRhsIToken(3); //#line 932 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(5); //#line 932 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(7); //#line 934 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Call(pos(), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 444: AssignPropertyCall ::= property ( ArgumentList ) // case 444: { //#line 939 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(3); //#line 941 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.AssignPropertyCall(pos(), ArgumentList)); break; } // // Rule 445: Type ::= DataType // case 445: { //#line 950 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode DataType = (TypeNode) getRhsSym(1); //#line 952 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DataType); break; } // // Rule 446: Type ::= nullable < Type > DepParametersopt // case 446: { //#line 955 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 955 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(5); //#line 957 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10TypeNode t = nf.Nullable(pos(), Type); setResult(DepParametersopt == null ? t : t.dep(null, DepParametersopt)); break; } // // Rule 447: Type ::= future < Type > // case 447: { //#line 963 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 965 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Future(pos(), Type)); break; } // // Rule 451: PrimitiveType ::= NumericType DepParametersopt // case 451: { //#line 980 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode NumericType = (TypeNode) getRhsSym(1); //#line 980 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 982 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" // System.out.println("Parser: parsed PrimitiveType |" + NumericType + "| |" + DepParametersopt +"|"); setResult(DepParametersopt == null ? NumericType : ((X10TypeNode) NumericType).dep(null, DepParametersopt)); break; } // // Rule 452: PrimitiveType ::= boolean DepParametersopt // case 452: { //#line 988 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 990 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10TypeNode res = (X10TypeNode) nf.CanonicalTypeNode(pos(), ts.Boolean()); setResult(DepParametersopt==null ? res : res.dep(null, DepParametersopt)); break; } // // Rule 457: ClassOrInterfaceType ::= TypeName DepParametersopt PlaceTypeSpecifieropt // case 457: { //#line 1002 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name TypeName = (Name) getRhsSym(1); //#line 1002 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 1002 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object PlaceTypeSpecifieropt = (Object) getRhsSym(3); //#line 1004 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10TypeNode type; if (ts.isPrimitiveTypeName(TypeName.name)) { try { type= (X10TypeNode) nf.CanonicalTypeNode(pos(), ts.primitiveForName(TypeName.name)); } catch (SemanticException e) { throw new InternalCompilerError("Unable to create primitive type for '" + TypeName.name + "'!"); } } else type= (X10TypeNode) TypeName.toType(); // System.out.println("Parser: parsed ClassOrInterfaceType |" + TypeName + "| |" + DepParametersopt +"|"); setResult(DepParametersopt == null ? type : type.dep(null, DepParametersopt)); break; } // // Rule 458: DepParameters ::= ( DepParameterExpr ) // case 458: { //#line 1021 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameterExpr = (DepParameterExpr) getRhsSym(2); //#line 1023 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DepParameterExpr); break; } // // Rule 459: DepParameterExpr ::= ArgumentList WhereClauseopt // case 459: { //#line 1027 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(1); //#line 1027 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(2); //#line 1029 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.DepParameterExpr(pos(), ArgumentList, WhereClauseopt)); break; } // // Rule 460: DepParameterExpr ::= WhereClause // case 460: { //#line 1032 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClause = (Expr) getRhsSym(1); //#line 1034 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.DepParameterExpr(pos(), Collections.EMPTY_LIST, WhereClause)); break; } // // Rule 461: WhereClause ::= : ConstExpression // case 461: { //#line 1038 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExpression = (Expr) getRhsSym(2); //#line 1040 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstExpression); break; } // // Rule 462: ConstPrimary ::= Literal // case 462: { //#line 1045 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.ast.Lit Literal = (polyglot.ast.Lit) getRhsSym(1); //#line 1047 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(Literal); break; } // // Rule 463: ConstPrimary ::= Type . class // case 463: { //#line 1050 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1052 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" if (Type instanceof Name) { Name a = (Name) Type; setResult(nf.ClassLit(pos(), a.toType())); } else if (Type instanceof TypeNode) { setResult(nf.ClassLit(pos(), Type)); } else if (Type instanceof CanonicalTypeNode) { CanonicalTypeNode a = (CanonicalTypeNode) Type; setResult(nf.ClassLit(pos(), a)); } else assert(false); break; } // // Rule 464: ConstPrimary ::= void . class // case 464: { //#line 1071 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ClassLit(pos(), nf.CanonicalTypeNode(pos(getLeftSpan()), ts.Void()))); break; } // // Rule 465: ConstPrimary ::= this // case 465: { //#line 1077 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.This(pos())); break; } // // Rule 466: ConstPrimary ::= here // case 466: { //#line 1082 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Here(pos())); break; } // // Rule 467: ConstPrimary ::= ClassName . this // case 467: { //#line 1085 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name ClassName = (Name) getRhsSym(1); //#line 1087 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.This(pos(), ClassName.toType())); break; } // // Rule 468: ConstPrimary ::= ( ConstExpression ) // case 468: { //#line 1090 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExpression = (Expr) getRhsSym(2); //#line 1092 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstExpression); break; } // // Rule 470: ConstPrimary ::= self // case 470: { //#line 1098 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Self(pos())); break; } // // Rule 471: ConstPostfixExpression ::= ConstPrimary // case 471: { //#line 1104 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstPrimary = (Expr) getRhsSym(1); //#line 1106 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstPrimary); break; } // // Rule 472: ConstPostfixExpression ::= ExpressionName // case 472: { //#line 1109 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name ExpressionName = (Name) getRhsSym(1); //#line 1111 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ExpressionName.toExpr()); break; } // // Rule 473: ConstUnaryExpression ::= ConstPostfixExpression // case 473: { //#line 1114 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstPostfixExpression = (Expr) getRhsSym(1); //#line 1116 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstPostfixExpression); break; } // // Rule 474: ConstUnaryExpression ::= + ConstUnaryExpression // case 474: { //#line 1119 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(2); //#line 1121 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Unary(pos(), Unary.POS, ConstUnaryExpression)); break; } // // Rule 475: ConstUnaryExpression ::= - ConstUnaryExpression // case 475: { //#line 1124 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(2); //#line 1126 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Unary(pos(), Unary.NEG, ConstUnaryExpression)); break; } // // Rule 476: ConstUnaryExpression ::= ! ConstUnaryExpression // case 476: { //#line 1129 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(2); //#line 1131 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Unary(pos(), Unary.NOT, ConstUnaryExpression)); break; } // // Rule 477: ConstMultiplicativeExpression ::= ConstUnaryExpression // case 477: { //#line 1135 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(1); //#line 1137 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstUnaryExpression); break; } // // Rule 478: ConstMultiplicativeExpression ::= ConstMultiplicativeExpression * ConstUnaryExpression // case 478: { //#line 1140 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1140 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(3); //#line 1142 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstMultiplicativeExpression, Binary.MUL, ConstUnaryExpression)); break; } // // Rule 479: ConstMultiplicativeExpression ::= ConstMultiplicativeExpression / ConstUnaryExpression // case 479: { //#line 1145 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1145 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(3); //#line 1147 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstMultiplicativeExpression, Binary.DIV, ConstUnaryExpression)); break; } // // Rule 480: ConstMultiplicativeExpression ::= ConstMultiplicativeExpression % ConstUnaryExpression // case 480: { //#line 1150 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1150 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(3); //#line 1152 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstMultiplicativeExpression, Binary.MOD, ConstUnaryExpression)); break; } // // Rule 481: ConstAdditiveExpression ::= ConstMultiplicativeExpression // case 481: { //#line 1156 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1158 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstMultiplicativeExpression); break; } // // Rule 482: ConstAdditiveExpression ::= ConstAdditiveExpression + ConstMultiplicativeExpression // case 482: { //#line 1161 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(1); //#line 1161 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(3); //#line 1163 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstAdditiveExpression, Binary.ADD, ConstMultiplicativeExpression)); break; } // // Rule 483: ConstAdditiveExpression ::= ConstAdditiveExpression - ConstMultiplicativeExpression // case 483: { //#line 1166 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(1); //#line 1166 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(3); //#line 1168 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstAdditiveExpression, Binary.SUB, ConstMultiplicativeExpression)); break; } // // Rule 484: ConstRelationalExpression ::= ConstAdditiveExpression // case 484: { //#line 1173 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(1); //#line 1175 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstAdditiveExpression); break; } // // Rule 485: ConstRelationalExpression ::= ConstRelationalExpression < ConstAdditiveExpression // case 485: { //#line 1178 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1178 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(3); //#line 1180 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.LT, ConstAdditiveExpression)); break; } // // Rule 486: ConstRelationalExpression ::= ConstRelationalExpression > ConstAdditiveExpression // case 486: { //#line 1183 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1183 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(3); //#line 1185 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.GT, ConstAdditiveExpression)); break; } // // Rule 487: ConstRelationalExpression ::= ConstRelationalExpression <= ConstAdditiveExpression // case 487: { //#line 1188 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1188 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(3); //#line 1190 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.LE, ConstAdditiveExpression)); break; } // // Rule 488: ConstRelationalExpression ::= ConstRelationalExpression > = ConstAdditiveExpression // case 488: { //#line 1193 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1193 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(4); //#line 1195 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.GE, ConstAdditiveExpression)); break; } // // Rule 489: ConstEqualityExpression ::= ConstRelationalExpression // case 489: { //#line 1199 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1201 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstRelationalExpression); break; } // // Rule 490: ConstEqualityExpression ::= ConstEqualityExpression == ConstRelationalExpression // case 490: { //#line 1204 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(1); //#line 1204 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(3); //#line 1206 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstEqualityExpression, Binary.EQ, ConstRelationalExpression)); break; } // // Rule 491: ConstEqualityExpression ::= ConstEqualityExpression != ConstRelationalExpression // case 491: { //#line 1209 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(1); //#line 1209 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(3); //#line 1211 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstEqualityExpression, Binary.NE, ConstRelationalExpression)); break; } // // Rule 492: ConstAndExpression ::= ConstEqualityExpression // case 492: { //#line 1215 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(1); //#line 1217 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstEqualityExpression); break; } // // Rule 493: ConstAndExpression ::= ConstAndExpression && ConstEqualityExpression // case 493: { //#line 1220 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAndExpression = (Expr) getRhsSym(1); //#line 1220 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(3); //#line 1222 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstAndExpression, Binary.COND_AND, ConstEqualityExpression)); break; } // // Rule 494: ConstExclusiveOrExpression ::= ConstAndExpression // case 494: { //#line 1226 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAndExpression = (Expr) getRhsSym(1); //#line 1228 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstAndExpression); break; } // // Rule 495: ConstExclusiveOrExpression ::= ConstExclusiveOrExpression ^ ConstAndExpression // case 495: { //#line 1231 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExclusiveOrExpression = (Expr) getRhsSym(1); //#line 1231 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAndExpression = (Expr) getRhsSym(3); //#line 1233 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstExclusiveOrExpression, Binary.BIT_XOR, ConstAndExpression)); break; } // // Rule 496: ConstInclusiveOrExpression ::= ConstExclusiveOrExpression // case 496: { //#line 1237 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExclusiveOrExpression = (Expr) getRhsSym(1); //#line 1239 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstExclusiveOrExpression); break; } // // Rule 497: ConstInclusiveOrExpression ::= ConstInclusiveOrExpression || ConstExclusiveOrExpression // case 497: { //#line 1242 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstInclusiveOrExpression = (Expr) getRhsSym(1); //#line 1242 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExclusiveOrExpression = (Expr) getRhsSym(3); //#line 1244 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstInclusiveOrExpression, Binary.COND_OR, ConstExclusiveOrExpression)); break; } // // Rule 498: ConstExpression ::= ConstInclusiveOrExpression // case 498: { //#line 1248 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstInclusiveOrExpression = (Expr) getRhsSym(1); //#line 1250 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstInclusiveOrExpression); break; } // // Rule 499: ConstExpression ::= ConstInclusiveOrExpression ? ConstExpression$first : ConstExpression // case 499: { //#line 1253 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstInclusiveOrExpression = (Expr) getRhsSym(1); //#line 1253 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr first = (Expr) getRhsSym(3); //#line 1253 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExpression = (Expr) getRhsSym(5); //#line 1255 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Conditional(pos(), ConstInclusiveOrExpression, first, ConstExpression)); break; } // // Rule 500: ConstFieldAccess ::= ConstPrimary . identifier // case 500: { //#line 1260 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstPrimary = (Expr) getRhsSym(1); //#line 1260 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1262 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Field(pos(), ConstPrimary, identifier.getIdentifier())); break; } // // Rule 501: ConstFieldAccess ::= super . identifier // case 501: { //#line 1265 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1267 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getLeftSpan())), identifier.getIdentifier())); break; } // // Rule 502: ConstFieldAccess ::= ClassName . super$sup . identifier // case 502: { //#line 1270 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name ClassName = (Name) getRhsSym(1); //#line 1270 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IToken sup = (IToken) getRhsIToken(3); //#line 1270 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(5); //#line 1272 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), identifier.getIdentifier())); break; } // // Rule 504: X10ArrayType ::= Type [ . ] // case 504: { //#line 1288 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1290 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, false, null)); break; } // // Rule 505: X10ArrayType ::= Type value [ . ] // case 505: { //#line 1293 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1295 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, true, null)); break; } // // Rule 506: X10ArrayType ::= Type [ DepParameterExpr ] // case 506: { //#line 1298 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1298 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameterExpr = (DepParameterExpr) getRhsSym(3); //#line 1300 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, false, DepParameterExpr)); break; } // // Rule 507: X10ArrayType ::= Type value [ DepParameterExpr ] // case 507: { //#line 1303 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1303 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameterExpr = (DepParameterExpr) getRhsSym(4); //#line 1305 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, true, DepParameterExpr)); break; } // // Rule 508: ObjectKind ::= value // case 508: throw new Error("No action specified for rule " + 508); // // Rule 509: ObjectKind ::= reference // case 509: throw new Error("No action specified for rule " + 509); // // Rule 510: MethodModifier ::= atomic // case 510: { //#line 1319 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.ATOMIC); break; } // // Rule 511: MethodModifier ::= extern // case 511: { //#line 1324 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(Flags.NATIVE); break; } // // Rule 512: MethodModifier ::= safe // case 512: { //#line 1329 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.SAFE); break; } // // Rule 513: MethodModifier ::= sequential // case 513: { //#line 1334 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.SEQUENTIAL); break; } // // Rule 514: MethodModifier ::= local // case 514: { //#line 1339 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.LOCAL); break; } // // Rule 515: MethodModifier ::= nonblocking // case 515: { //#line 1344 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.NON_BLOCKING); break; } // // Rule 517: ValueClassDeclaration ::= X10ClassModifiersopt value identifier PropertyListopt Superopt Interfacesopt ClassBody // case 517: { //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiersopt = (X10Flags) getRhsSym(1); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(4); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Superopt = (TypeNode) getRhsSym(5); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Interfacesopt = (List) getRhsSym(6); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBody = (ClassBody) getRhsSym(7); //#line 1352 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" checkTypeName(identifier); List/*<PropertyDecl>*/ props = PropertyListopt==null ? null : (List) PropertyListopt[0]; Expr ci = PropertyListopt==null ? null : (Expr) PropertyListopt[1]; setResult(nf.ValueClassDecl(pos(getLeftSpan(), getRightSpan()), X10ClassModifiersopt, identifier.getIdentifier(), props, ci, Superopt, Interfacesopt, ClassBody)); break; } // // Rule 518: ValueClassDeclaration ::= X10ClassModifiersopt value class identifier PropertyListopt Superopt Interfacesopt ClassBody // case 518: { //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiersopt = (X10Flags) getRhsSym(1); //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(4); //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(5); //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Superopt = (TypeNode) getRhsSym(6); //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Interfacesopt = (List) getRhsSym(7); //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBody = (ClassBody) getRhsSym(8); //#line 1362 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" checkTypeName(identifier); List/*<PropertyDecl>*/ props = PropertyListopt==null ? null : (List) PropertyListopt[0]; Expr ci = PropertyListopt==null ? null : (Expr) PropertyListopt[1]; setResult(nf.ValueClassDecl(pos(getLeftSpan(), getRightSpan()), X10ClassModifiersopt, identifier.getIdentifier(), props, ci, Superopt, Interfacesopt, ClassBody)); break; } // // Rule 519: ConstructorDeclaration ::= ConstructorModifiersopt ConstructorDeclarator Throwsopt ConstructorBody // case 519: { //#line 1371 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags ConstructorModifiersopt = (Flags) getRhsSym(1); //#line 1371 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] ConstructorDeclarator = (Object[]) getRhsSym(2); //#line 1371 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Throwsopt = (List) getRhsSym(3); //#line 1371 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Block ConstructorBody = (Block) getRhsSym(4); //#line 1373 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name a = (Name) ConstructorDeclarator[1]; DepParameterExpr c = (DepParameterExpr) ConstructorDeclarator[2]; List b = (List) ConstructorDeclarator[3]; Expr e = (Expr) ConstructorDeclarator[4]; setResult(nf.ConstructorDecl(pos(), ConstructorModifiersopt, a.toString(), c, b, e, Throwsopt, ConstructorBody)); break; } // // Rule 520: ConstructorDeclarator ::= SimpleTypeName DepParametersopt ( FormalParameterListopt WhereClauseopt ) // case 520: { //#line 1381 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name SimpleTypeName = (Name) getRhsSym(1); //#line 1381 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 1381 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List FormalParameterListopt = (List) getRhsSym(4); //#line 1381 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(5); //#line 1383 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] a = new Object[5]; a[1] = SimpleTypeName; a[2] = DepParametersopt; a[3] = FormalParameterListopt; a[4] = WhereClauseopt; setResult(a); break; } // // Rule 521: ThisClause ::= this DepParameters // case 521: { //#line 1391 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameters = (DepParameterExpr) getRhsSym(2); //#line 1393 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DepParameters); break; } // // Rule 522: Super ::= extends DataType // case 522: { //#line 1397 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode DataType = (TypeNode) getRhsSym(2); //#line 1399 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DataType); break; } // // Rule 523: MethodDeclarator ::= identifier ( FormalParameterListopt WhereClauseopt ) // case 523: { //#line 1403 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1403 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List FormalParameterListopt = (List) getRhsSym(3); //#line 1403 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(4); //#line 1405 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" // System.out.println("Parsing methoddeclarator..."); Object[] a = new Object[5]; a[0] = new Name(nf, ts, pos(), identifier.getIdentifier()); a[1] = FormalParameterListopt; a[2] = new Integer(0); a[3] = WhereClauseopt; setResult(a); break; } // // Rule 524: MethodDeclarator ::= MethodDeclarator [ ] // case 524: { //#line 1415 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] MethodDeclarator = (Object[]) getRhsSym(1); //#line 1417 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" MethodDeclarator[2] = new Integer(((Integer) MethodDeclarator[2]).intValue() + 1); // setResult(MethodDeclarator); break; } // // Rule 525: FieldDeclaration ::= ThisClauseopt FieldModifiersopt Type VariableDeclarators ; // case 525: { //#line 1423 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr ThisClauseopt = (DepParameterExpr) getRhsSym(1); //#line 1423 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags FieldModifiersopt = (Flags) getRhsSym(2); //#line 1423 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1423 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List VariableDeclarators = (List) getRhsSym(4); //#line 1425 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), ClassMember.class, false); if (VariableDeclarators != null && VariableDeclarators.size() > 0) { for (Iterator i = VariableDeclarators.iterator(); i.hasNext();) { X10VarDeclarator d = (X10VarDeclarator) i.next(); if (d.hasExplodedVars()) // TODO: Report this exception correctly. throw new Error("Field Declarations may not have exploded variables." + pos()); d.setFlag(FieldModifiersopt); l.add(nf.FieldDecl(d.position(), ThisClauseopt, d.flags, nf.array(Type, Type.position(), d.dims), d.name, d.init)); } } setResult(l); break; } // // Rule 526: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt Dims ArrayInitializer // case 526: { //#line 1459 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1459 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(3); //#line 1459 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Integer Dims = (Integer) getRhsSym(4); //#line 1459 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ArrayInit ArrayInitializer = (ArrayInit) getRhsSym(5); //#line 1461 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" // setResult(nf.ArrayConstructor(pos(), a, false, null, d)); setResult(nf.NewArray(pos(), ArrayBaseType, Dims.intValue(), ArrayInitializer)); break; } // // Rule 527: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt DimExpr Dims // case 527: { //#line 1465 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1465 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(3); //#line 1465 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr DimExpr = (Expr) getRhsSym(4); //#line 1465 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Integer Dims = (Integer) getRhsSym(5); //#line 1467 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" // setResult(nf.ArrayConstructor(pos(), a, false, null, d)); setResult(nf.NewArray(pos(), ArrayBaseType, Collections.singletonList(DimExpr), Dims.intValue())); break; } // // Rule 528: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt DimExpr DimExprs Dimsopt // case 528: { //#line 1471 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1471 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(3); //#line 1471 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr DimExpr = (Expr) getRhsSym(4); //#line 1471 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List DimExprs = (List) getRhsSym(5); //#line 1471 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Integer Dimsopt = (Integer) getRhsSym(6); //#line 1473 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" // setResult(nf.ArrayConstructor(pos(), a, false, null, d)); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(DimExpr); l.addAll(DimExprs); setResult(nf.NewArray(pos(), ArrayBaseType, l, Dimsopt.intValue())); break; } // // Rule 529: ArrayCreationExpression ::= new ArrayBaseType Valueopt Unsafeopt [ Expression ] // case 529: { //#line 1480 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1480 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Valueopt = (Object) getRhsSym(3); //#line 1480 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(4); //#line 1480 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(6); //#line 1482 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ArrayConstructor(pos(), ArrayBaseType, Unsafeopt != null, Valueopt != null, Expression, null)); break; } // // Rule 530: ArrayCreationExpression ::= new ArrayBaseType Valueopt Unsafeopt [ Expression$distr ] Expression$initializer // case 530: { //#line 1485 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1485 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Valueopt = (Object) getRhsSym(3); //#line 1485 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(4); //#line 1485 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr distr = (Expr) getRhsSym(6); //#line 1485 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr initializer = (Expr) getRhsSym(8); //#line 1487 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ArrayConstructor(pos(), ArrayBaseType, Unsafeopt != null, Valueopt != null, distr, initializer)); break; } // // Rule 531: ArrayCreationExpression ::= new ArrayBaseType Valueopt Unsafeopt [ Expression ] ($lparen FormalParameter ) MethodBody // case 531: { //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Valueopt = (Object) getRhsSym(3); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(4); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(6); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IToken lparen = (IToken) getRhsIToken(8); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(9); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Block MethodBody = (Block) getRhsSym(11); //#line 1492 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr initializer = makeInitializer( pos(getRhsFirstTokenIndex(8), getRightSpan()), ArrayBaseType, FormalParameter, MethodBody ); setResult(nf.ArrayConstructor(pos(), ArrayBaseType, Unsafeopt != null, Valueopt != null, Expression, initializer)); break; } // // Rule 532: Valueopt ::= $Empty // case 532: setResult(null); break; // // Rule 533: Valueopt ::= value // case 533: { //#line 1501 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" // any value distinct from null setResult(this); break; } // // Rule 536: ArrayBaseType ::= nullable < Type > // case 536: { //#line 1508 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1510 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Nullable(pos(), Type)); break; } // // Rule 537: ArrayBaseType ::= future < Type > // case 537: { //#line 1513 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1515 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Future(pos(), Type)); break; } // // Rule 538: ArrayBaseType ::= ( Type ) // case 538: { //#line 1518 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1520 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(Type); break; } // // Rule 539: ArrayAccess ::= ExpressionName [ ArgumentList ] // case 539: { //#line 1524 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name ExpressionName = (Name) getRhsSym(1); //#line 1524 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(3); //#line 1526 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" if (ArgumentList.size() == 1) setResult(nf.X10ArrayAccess1(pos(), ExpressionName.toExpr(), (Expr) ArgumentList.get(0))); else setResult(nf.X10ArrayAccess(pos(), ExpressionName.toExpr(), ArgumentList)); break; } // // Rule 540: ArrayAccess ::= PrimaryNoNewArray [ ArgumentList ] // case 540: { //#line 1531 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PrimaryNoNewArray = (Expr) getRhsSym(1); //#line 1531 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(3); //#line 1533 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" if (ArgumentList.size() == 1) setResult(nf.X10ArrayAccess1(pos(), PrimaryNoNewArray, (Expr) ArgumentList.get(0))); else setResult(nf.X10ArrayAccess(pos(), PrimaryNoNewArray, ArgumentList)); break; } // // Rule 557: NowStatement ::= now ( Clock ) Statement // case 557: { //#line 1559 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(3); //#line 1559 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(5); //#line 1561 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Now(pos(), Clock, Statement)); break; } // // Rule 558: ClockedClause ::= clocked ( ClockList ) // case 558: { //#line 1565 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockList = (List) getRhsSym(3); //#line 1567 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ClockList); break; } // // Rule 559: AsyncStatement ::= async PlaceExpressionSingleListopt ClockedClauseopt Statement // case 559: { //#line 1571 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1571 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(3); //#line 1571 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(4); //#line 1573 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Async(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), ClockedClauseopt, Statement)); break; } // // Rule 560: AtomicStatement ::= atomic PlaceExpressionSingleListopt Statement // case 560: { //#line 1581 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1581 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(3); //#line 1583 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Atomic(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), Statement)); break; } // // Rule 561: WhenStatement ::= when ( Expression ) Statement // case 561: { //#line 1590 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1590 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(5); //#line 1592 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.When(pos(), Expression, Statement)); break; } // // Rule 562: WhenStatement ::= WhenStatement or$or ( Expression ) Statement // case 562: { //#line 1595 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" When WhenStatement = (When) getRhsSym(1); //#line 1595 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IToken or = (IToken) getRhsIToken(2); //#line 1595 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(4); //#line 1595 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(6); //#line 1597 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" WhenStatement.addBranch(pos(getRhsFirstTokenIndex(2), getRightSpan()), Expression, Statement); setResult(WhenStatement); break; } // // Rule 563: ForEachStatement ::= foreach ( FormalParameter : Expression ) ClockedClauseopt Statement // case 563: { //#line 1602 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1602 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1602 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1602 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(8); //#line 1604 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, Statement)); break; } // // Rule 564: AtEachStatement ::= ateach ( FormalParameter : Expression ) ClockedClauseopt Statement // case 564: { //#line 1612 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1612 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1612 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1612 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(8); //#line 1614 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.AtEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, Statement)); break; } // // Rule 565: EnhancedForStatement ::= for ( FormalParameter : Expression ) Statement // case 565: { //#line 1622 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1622 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1622 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(7); //#line 1624 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForLoop(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, Statement)); break; } // // Rule 566: FinishStatement ::= finish Statement // case 566: { //#line 1631 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(2); //#line 1633 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Finish(pos(), Statement)); break; } // // Rule 567: NowStatementNoShortIf ::= now ( Clock ) StatementNoShortIf // case 567: { //#line 1638 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(3); //#line 1638 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1640 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Now(pos(), Clock, StatementNoShortIf)); break; } // // Rule 568: AsyncStatementNoShortIf ::= async PlaceExpressionSingleListopt ClockedClauseopt StatementNoShortIf // case 568: { //#line 1644 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1644 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(3); //#line 1644 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(4); //#line 1646 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Async(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), ClockedClauseopt, StatementNoShortIf)); break; } // // Rule 569: AtomicStatementNoShortIf ::= atomic StatementNoShortIf // case 569: { //#line 1653 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(2); //#line 1655 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Atomic(pos(), nf.Here(pos(getLeftSpan())), StatementNoShortIf)); break; } // // Rule 570: WhenStatementNoShortIf ::= when ( Expression ) StatementNoShortIf // case 570: { //#line 1659 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1659 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1661 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.When(pos(), Expression, StatementNoShortIf)); break; } // // Rule 571: WhenStatementNoShortIf ::= WhenStatement or$or ( Expression ) StatementNoShortIf // case 571: { //#line 1664 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" When WhenStatement = (When) getRhsSym(1); //#line 1664 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IToken or = (IToken) getRhsIToken(2); //#line 1664 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(4); //#line 1664 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(6); //#line 1666 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" WhenStatement.addBranch(pos(getRhsFirstTokenIndex(2), getRightSpan()), Expression, StatementNoShortIf); setResult(WhenStatement); break; } // // Rule 572: ForEachStatementNoShortIf ::= foreach ( FormalParameter : Expression ) ClockedClauseopt StatementNoShortIf // case 572: { //#line 1671 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1671 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1671 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1671 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(8); //#line 1673 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, StatementNoShortIf)); break; } // // Rule 573: AtEachStatementNoShortIf ::= ateach ( FormalParameter : Expression ) ClockedClauseopt StatementNoShortIf // case 573: { //#line 1682 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1682 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1682 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1682 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(8); //#line 1684 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.AtEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, StatementNoShortIf)); break; } // // Rule 574: EnhancedForStatementNoShortIf ::= for ( FormalParameter : Expression ) StatementNoShortIf // case 574: { //#line 1692 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1692 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1692 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(7); //#line 1694 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForLoop(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, StatementNoShortIf)); break; } // // Rule 575: FinishStatementNoShortIf ::= finish StatementNoShortIf // case 575: { //#line 1701 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(2); //#line 1703 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Finish(pos(), StatementNoShortIf)); break; } // // Rule 576: PlaceExpressionSingleList ::= ( PlaceExpression ) // case 576: { //#line 1708 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpression = (Expr) getRhsSym(2); //#line 1710 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(PlaceExpression); break; } // // Rule 578: NextStatement ::= next ; // case 578: { //#line 1718 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Next(pos())); break; } // // Rule 579: AwaitStatement ::= await Expression ; // case 579: { //#line 1722 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(2); //#line 1724 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Await(pos(), Expression)); break; } // // Rule 580: ClockList ::= Clock // case 580: { //#line 1728 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(1); //#line 1730 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(Clock); setResult(l); break; } // // Rule 581: ClockList ::= ClockList , Clock // case 581: { //#line 1735 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockList = (List) getRhsSym(1); //#line 1735 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(3); //#line 1737 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClockList.add(Clock); setResult(ClockList); break; } // // Rule 582: Clock ::= Expression // case 582: { //#line 1743 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(1); //#line 1745 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(Expression); break; } // // Rule 583: CastExpression ::= ( Type ) UnaryExpressionNotPlusMinus // case 583: { //#line 1755 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1755 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr UnaryExpressionNotPlusMinus = (Expr) getRhsSym(4); //#line 1757 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Cast(pos(), Type, UnaryExpressionNotPlusMinus)); break; } // // Rule 584: CastExpression ::= ( @ Expression ) UnaryExpressionNotPlusMinus // case 584: { //#line 1760 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1760 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr UnaryExpressionNotPlusMinus = (Expr) getRhsSym(5); //#line 1762 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.PlaceCast(pos(), Expression, UnaryExpressionNotPlusMinus)); break; } // // Rule 585: RelationalExpression ::= RelationalExpression instanceof Type // case 585: { //#line 1772 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1772 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1774 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Instanceof(pos(), RelationalExpression, Type)); break; } // // Rule 586: IdentifierList ::= identifier // case 586: { //#line 1780 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1782 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), Name.class, false); l.add(new Name(nf, ts, pos(), identifier.getIdentifier())); setResult(l); break; } // // Rule 587: IdentifierList ::= IdentifierList , identifier // case 587: { //#line 1787 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List IdentifierList = (List) getRhsSym(1); //#line 1787 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1789 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IdentifierList.add(new Name(nf, ts, pos(), identifier.getIdentifier())); setResult(IdentifierList); break; } // // Rule 588: Primary ::= here // case 588: { //#line 1796 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(((X10NodeFactory) nf).Here(pos()));//// A "here" expression used to be treated as an ExpressionName instead// of as a primary.//// setResult(new Name(nf, ts, pos(), "here"){// public Expr toExpr() {// return ((X10NodeFactory) nf).Here(pos);// }// }); break; } // // Rule 591: RegionExpression ::= Expression$expr1 : Expression$expr2 // case 591: { //#line 1812 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr expr1 = (Expr) getRhsSym(1); //#line 1812 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr expr2 = (Expr) getRhsSym(3); //#line 1814 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" /*Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Name x10LangRegion = new Name(nf, ts, pos(), x10Lang, "region"); Name x10LangRegionFactory = new Name(nf, ts, pos(), x10LangRegion, "factory"); Name x10LangRegionFactoryRegion = new Name(nf, ts, pos(), x10LangRegionFactory, "region"); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(expr1); l.add(expr2); Call regionCall = nf.Call( pos(), x10LangRegionFactoryRegion.prefix.toReceiver(), "region", l ); */ Call regionCall = nf.RegionMaker(pos(), expr1, expr2); setResult(regionCall); break; } // // Rule 592: RegionExpressionList ::= RegionExpression // case 592: { //#line 1830 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr RegionExpression = (Expr) getRhsSym(1); //#line 1832 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(RegionExpression); setResult(l); break; } // // Rule 593: RegionExpressionList ::= RegionExpressionList , RegionExpression // case 593: { //#line 1837 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List RegionExpressionList = (List) getRhsSym(1); //#line 1837 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr RegionExpression = (Expr) getRhsSym(3); //#line 1839 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" RegionExpressionList.add(RegionExpression); //setResult(RegionExpressionList); break; } // // Rule 594: Primary ::= [ RegionExpressionList ] // case 594: { //#line 1844 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List RegionExpressionList = (List) getRhsSym(2); //#line 1846 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Name x10LangRegion = new Name(nf, ts, pos(), x10Lang, "region"); Name x10LangRegionFactory = new Name(nf, ts, pos(), x10LangRegion, "factory"); Name x10LangRegionFactoryRegion = new Name(nf, ts, pos(), x10LangRegionFactory, "region"); Name x10LangPoint = new Name(nf, ts, pos(), x10Lang, "point"); Name x10LangPointFactory = new Name(nf, ts, pos(), x10LangPoint, "factory"); Name x10LangPointFactoryPoint = new Name(nf, ts, pos(), x10LangPointFactory, "point"); Tuple tuple = nf.Tuple(pos(), x10LangPointFactoryPoint, x10LangRegionFactoryRegion, RegionExpressionList); setResult(tuple); break; } // // Rule 595: AssignmentExpression ::= Expression$expr1 -> Expression$expr2 // case 595: { //#line 1860 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr expr1 = (Expr) getRhsSym(1); //#line 1860 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr expr2 = (Expr) getRhsSym(3); //#line 1862 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ConstantDistMaker call = nf.ConstantDistMaker(pos(), expr1, expr2); setResult(call); break; } // // Rule 596: FutureExpression ::= future PlaceExpressionSingleListopt { Expression } // case 596: { //#line 1867 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1867 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(4); //#line 1869 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Future(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), Expression)); break; } // // Rule 597: FieldModifier ::= mutable // case 597: { //#line 1877 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.MUTABLE); break; } // // Rule 598: FieldModifier ::= const // case 598: { //#line 1882 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(Flags.PUBLIC.set(Flags.STATIC).set(Flags.FINAL)); break; } // // Rule 599: FunExpression ::= fun Type ( FormalParameterListopt ) { Expression } // case 599: throw new Error("No action specified for rule " + 599); // // Rule 600: MethodInvocation ::= MethodName ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 600: throw new Error("No action specified for rule " + 600); // // Rule 601: MethodInvocation ::= Primary . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 601: throw new Error("No action specified for rule " + 601); // // Rule 602: MethodInvocation ::= super . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 602: throw new Error("No action specified for rule " + 602); // // Rule 603: MethodInvocation ::= ClassName . super . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 603: throw new Error("No action specified for rule " + 603); // // Rule 604: MethodInvocation ::= TypeName . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 604: throw new Error("No action specified for rule " + 604); // // Rule 605: ClassInstanceCreationExpression ::= new ClassOrInterfaceType ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) ClassBodyopt // case 605: throw new Error("No action specified for rule " + 605); // // Rule 606: ClassInstanceCreationExpression ::= Primary . new identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) ClassBodyopt // case 606: throw new Error("No action specified for rule " + 606); // // Rule 607: ClassInstanceCreationExpression ::= AmbiguousName . new identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) ClassBodyopt // case 607: throw new Error("No action specified for rule " + 607); // // Rule 608: MethodModifier ::= synchronized // case 608: { //#line 1913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" unrecoverableSyntaxError = true; eq.enqueue(ErrorInfo.SYNTAX_ERROR, getErrorLocation(getLeftSpan(), getRightSpan()) + "\"synchronized\" is an invalid X10 Method Modifier"); setResult(Flags.SYNCHRONIZED); break; } // // Rule 609: FieldModifier ::= volatile // case 609: { //#line 1922 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" unrecoverableSyntaxError = true; eq.enqueue(ErrorInfo.SYNTAX_ERROR, getErrorLocation(getLeftSpan(), getRightSpan()) + "\"volatile\" is an invalid X10 Field Modifier"); setResult(Flags.VOLATILE); break; } // // Rule 610: SynchronizedStatement ::= synchronized ( Expression ) Block // case 610: { //#line 1929 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1929 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Block Block = (Block) getRhsSym(5); //#line 1931 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" unrecoverableSyntaxError = true; eq.enqueue(ErrorInfo.SYNTAX_ERROR, getErrorLocation(getLeftSpan(), getRightSpan()) + "Synchronized Statement is invalid in X10"); setResult(nf.Synchronized(pos(), Expression, Block)); break; } // // Rule 611: ThisClauseopt ::= $Empty // case 611: setResult(null); break; // // Rule 613: PlaceTypeSpecifieropt ::= $Empty // case 613: setResult(null); break; // // Rule 615: DepParametersopt ::= $Empty // case 615: setResult(null); break; // // Rule 617: PropertyListopt ::= $Empty // case 617: setResult(null); break; // // Rule 619: WhereClauseopt ::= $Empty // case 619: setResult(null); break; // // Rule 621: ObjectKindopt ::= $Empty // case 621: setResult(null); break; // // Rule 623: ArrayInitializeropt ::= $Empty // case 623: setResult(null); break; // // Rule 625: PlaceExpressionSingleListopt ::= $Empty // case 625: setResult(null); break; // // Rule 627: ArgumentListopt ::= $Empty // case 627: setResult(null); break; // // Rule 629: X10ClassModifiersopt ::= $Empty // case 629: { //#line 1977 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.toX10Flags(Flags.NONE)); break; } // // Rule 631: DepParametersopt ::= $Empty // case 631: setResult(null); break; // // Rule 633: Unsafeopt ::= $Empty // case 633: setResult(null); break; // // Rule 634: Unsafeopt ::= unsafe // case 634: { //#line 1989 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" // any value distinct from null setResult(this); break; } // // Rule 635: ParamIdopt ::= $Empty // case 635: setResult(null); break; // // Rule 636: ParamIdopt ::= identifier // case 636: { //#line 1996 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1998 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 637: ClockedClauseopt ::= $Empty // case 637: { //#line 2004 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(new TypedList(new LinkedList(), Expr.class, false)); break; } default: break; } return; } | 1832 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1832/56cdb14fdb9589988a93eb9a76aae3872ab98272/X10Parser.java/buggy/x10.compiler/src/x10/parser/X10Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1720,
1803,
12,
474,
1720,
1854,
13,
565,
288,
3639,
1620,
261,
5345,
1854,
13,
3639,
288,
2398,
368,
5411,
368,
6781,
404,
30,
225,
21036,
493,
33,
21036,
263,
1068,
548,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1803,
12,
474,
1720,
1854,
13,
565,
288,
3639,
1620,
261,
5345,
1854,
13,
3639,
288,
2398,
368,
5411,
368,
6781,
404,
30,
225,
21036,
493,
33,
21036,
263,
1068,
548,
54... | ||
set.remove(id); | required.remove(id); | protected void loadTargetProfile(ITarget target) { if (target.useAllPlugins()) { handleSelectAll(true); return; } HashSet set = new HashSet(); ITargetFeature[] targetFeatures = target.getFeatures(); Stack features = new Stack(); FeatureModelManager featureManager = null; if (fCurrentFeatures == null) featureManager = PDECore.getDefault().getFeatureModelManager(); for (int i = 0 ; i < targetFeatures.length; i++) { IFeatureModel model = (featureManager != null) ? featureManager.findFeatureModel(targetFeatures[i].getId()) : (IFeatureModel)fCurrentFeatures.get(targetFeatures[i].getId()); if (model != null) features.push(model.getFeature()); } while (!features.isEmpty()) { IFeature feature = (IFeature) features.pop(); IFeaturePlugin [] plugins = feature.getPlugins(); for (int j = 0; j < plugins.length; j++) { set.add(plugins[j].getId()); } IFeatureChild[] children = feature.getIncludedFeatures(); for (int j = 0; j < children.length; j++) { IFeatureModel model = (featureManager != null) ? featureManager.findFeatureModel(children[j].getId()) : (IFeatureModel)fCurrentFeatures.get(children[j].getId()); features.push(model); } } ITargetPlugin[] plugins = target.getPlugins(); for (int i = 0 ; i < plugins.length; i++) { set.add(plugins[i].getId()); } IPluginModelBase[] models = getCurrentModels(); int counter = 0; for (int i = 0; i < models.length; i++) { String id = models[i].getPluginBase().getId(); if (id == null) continue; if (set.contains(id)) { ++counter; if (!fPluginListViewer.getChecked(models[i])) { fPluginTreeViewer.setChecked(models[i], true); fPluginListViewer.setChecked(models[i], true); if (!models[i].isEnabled()) fChangedModels.add(models[i]); // handle checking the parent String path = models[i].getInstallLocation(); if (path != null) { File parent = new File(path).getParentFile(); fPluginTreeViewer.setChecked(parent, true); handleGrayChecked(parent, false); } } set.remove(id); } else { if (fPluginListViewer.getChecked(models[i])) { fPluginTreeViewer.setChecked(models[i], false); fPluginListViewer.setChecked(models[i], false); if (models[i].isEnabled()) fChangedModels.add(models[i]); // handle updating parent String path = models[i].getInstallLocation(); if (path != null) { File parent = new File(path).getParentFile(); handleGrayChecked(parent, true); } } } } setCounter(counter); } | 8783 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8783/263a5d279976427aabfa71fbb1b8218834d68ab7/TargetPluginsTab.java/buggy/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/TargetPluginsTab.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1262,
2326,
4029,
12,
1285,
826,
1018,
13,
288,
202,
202,
430,
261,
3299,
18,
1202,
1595,
9461,
10756,
288,
1082,
202,
4110,
3391,
1595,
12,
3767,
1769,
1082,
202,
2463,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1262,
2326,
4029,
12,
1285,
826,
1018,
13,
288,
202,
202,
430,
261,
3299,
18,
1202,
1595,
9461,
10756,
288,
1082,
202,
4110,
3391,
1595,
12,
3767,
1769,
1082,
202,
2463,
... |
outBuff.append("Instances: " + userTestStructure.numInstances() + "\n"); | outBuff.append("Instances: " + source.getDataSet().numInstances() + "\n"); | protected void reevaluateModel(final String name, final Classifier classifier, final Instances trainHeader) { if (m_RunThread == null) { synchronized (this) { m_StartBut.setEnabled(false); m_StopBut.setEnabled(true); } m_RunThread = new Thread() { public void run() { // Copy the current state of things m_Log.statusMessage("Setting up..."); StringBuffer outBuff = m_History.getNamedBuffer(name); DataSource source = null; Instances userTestStructure = null; // additional vis info (either shape type or point size) FastVector plotShape = new FastVector(); FastVector plotSize = new FastVector(); Instances predInstances = null; CostMatrix costMatrix = null; if (m_EvalWRTCostsBut.isSelected()) { costMatrix = new CostMatrix((CostMatrix) m_CostMatrixEditor .getValue()); } boolean outputConfusion = m_OutputConfusionBut.isSelected(); boolean outputPerClass = m_OutputPerClassBut.isSelected(); boolean outputSummary = true; boolean outputEntropy = m_OutputEntropyBut.isSelected(); boolean saveVis = m_StorePredictionsBut.isSelected(); boolean outputPredictionsText = m_OutputPredictionsTextBut.isSelected(); String grph = null; Evaluation eval = null; try { boolean incrementalLoader = (m_TestLoader instanceof IncrementalConverter); if (m_TestLoader != null && m_TestLoader.getStructure() != null) { m_TestLoader.reset(); source = new DataSource(m_TestLoader); userTestStructure = source.getStructure(); } // Check the test instance compatibility if (source == null) { throw new Exception("No user test set has been specified"); } if (trainHeader != null) { if (trainHeader.classIndex() > userTestStructure.numAttributes()-1) throw new Exception("Train and test set are not compatible"); userTestStructure.setClassIndex(trainHeader.classIndex()); if (!trainHeader.equalHeaders(userTestStructure)) { throw new Exception("Train and test set are not compatible"); } } else { userTestStructure. setClassIndex(userTestStructure.numAttributes()-1); } if (m_Log instanceof TaskLogger) { ((TaskLogger)m_Log).taskStarted(); } m_Log.statusMessage("Evaluating on test data..."); m_Log.logMessage("Re-evaluating classifier (" + name + ") on test set"); eval = new Evaluation(userTestStructure, costMatrix); eval.useNoPriors(); // set up the structure of the plottable instances for // visualization predInstances = setUpVisualizableInstances(userTestStructure); predInstances.setClassIndex(userTestStructure.classIndex()+1); outBuff.append("\n=== Re-evaluation on test set ===\n\n"); outBuff.append("User supplied test set\n"); outBuff.append("Relation: " + userTestStructure.relationName() + '\n'); if (incrementalLoader) outBuff.append("Instances: unknown (yet). Reading incrementally\n"); else outBuff.append("Instances: " + userTestStructure.numInstances() + "\n"); outBuff.append("Attributes: " + userTestStructure.numAttributes() + "\n\n"); if (trainHeader == null) outBuff.append("NOTE - if test set is not compatible then results are " + "unpredictable\n\n"); if (outputPredictionsText) { outBuff.append("=== Predictions on test set ===\n\n"); outBuff.append(" inst#, actual, predicted, error"); if (userTestStructure.classAttribute().isNominal()) { outBuff.append(", probability distribution"); } outBuff.append("\n"); } Instance instance; int jj = 0; while (source.hasMoreElements()) { instance = source.nextElement(); instance.setDataset(userTestStructure); processClassifierPrediction(instance, classifier, eval, predInstances, plotShape, plotSize); if (outputPredictionsText) { outBuff.append(predictionText(classifier, instance, jj+1)); } if ((++jj % 100) == 0) { m_Log.statusMessage("Evaluating on test data. Processed " +jj+" instances..."); } } if (outputPredictionsText) { outBuff.append("\n"); } if (outputSummary) { outBuff.append(eval.toSummaryString(outputEntropy) + "\n"); } if (userTestStructure.classAttribute().isNominal()) { if (outputPerClass) { outBuff.append(eval.toClassDetailsString() + "\n"); } if (outputConfusion) { outBuff.append(eval.toMatrixString() + "\n"); } } m_History.updateResult(name); m_Log.logMessage("Finished re-evaluation"); m_Log.statusMessage("OK"); } catch (Exception ex) { ex.printStackTrace(); m_Log.logMessage(ex.getMessage()); m_Log.statusMessage("See error log"); ex.printStackTrace(); m_Log.logMessage(ex.getMessage()); JOptionPane.showMessageDialog(ClassifierPanel.this, "Problem evaluationg classifier:\n" + ex.getMessage(), "Evaluate classifier", JOptionPane.ERROR_MESSAGE); m_Log.statusMessage("Problem evaluating classifier"); } finally { try { if (predInstances != null && predInstances.numInstances() > 0) { if (predInstances.attribute(predInstances.classIndex()) .isNumeric()) { postProcessPlotInfo(plotSize); } m_CurrentVis = new VisualizePanel(); m_CurrentVis.setName(name+" (" +userTestStructure.relationName()+")"); m_CurrentVis.setLog(m_Log); PlotData2D tempd = new PlotData2D(predInstances); tempd.setShapeSize(plotSize); tempd.setShapeType(plotShape); tempd.setPlotName(name+" ("+userTestStructure.relationName() +")"); tempd.addInstanceNumberAttribute(); m_CurrentVis.addPlot(tempd); m_CurrentVis.setColourIndex(predInstances.classIndex()+1); if (classifier instanceof Drawable) { try { grph = ((Drawable)classifier).graph(); } catch (Exception ex) { } } if (saveVis) { FastVector vv = new FastVector(); vv.addElement(classifier); if (trainHeader != null) vv.addElement(trainHeader); vv.addElement(m_CurrentVis); if (grph != null) { vv.addElement(grph); } if ((eval != null) && (eval.predictions() != null)) { vv.addElement(eval.predictions()); vv.addElement(userTestStructure.classAttribute()); } m_History.addObject(name, vv); } else { FastVector vv = new FastVector(); vv.addElement(classifier); if (trainHeader != null) vv.addElement(trainHeader); m_History.addObject(name, vv); } } } catch (Exception ex) { ex.printStackTrace(); } if (isInterrupted()) { m_Log.logMessage("Interrupted reevaluate model"); m_Log.statusMessage("Interrupted"); } synchronized (this) { m_StartBut.setEnabled(true); m_StopBut.setEnabled(false); m_RunThread = null; } if (m_Log instanceof TaskLogger) { ((TaskLogger)m_Log).taskFinished(); } } } }; m_RunThread.setPriority(Thread.MIN_PRIORITY); m_RunThread.start(); } } | 4773 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4773/95e2097608349ef876c1b8dd7311ba52b983cfc9/ClassifierPanel.java/clean/weka/gui/explorer/ClassifierPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
283,
21024,
1488,
12,
6385,
514,
508,
16,
21394,
727,
1659,
1251,
14622,
16,
21394,
727,
18357,
4691,
1864,
13,
288,
565,
309,
261,
81,
67,
1997,
3830,
422,
446,
13,
288,
137... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
283,
21024,
1488,
12,
6385,
514,
508,
16,
21394,
727,
1659,
1251,
14622,
16,
21394,
727,
18357,
4691,
1864,
13,
288,
565,
309,
261,
81,
67,
1997,
3830,
422,
446,
13,
288,
137... |
IStatus statusLocal = new Status(IStatus.OK, " ", IStatus.OK, (J2EEPluginResourceHandler.getString("J2EEDeployOperation_2_UI_", new Object[]{DeployerName})), null); | private void addOKStatus(String DeployerName, IStatus main) { //IStatus statusLocal = new Status(IStatus.OK, " ", IStatus.OK, (J2EEPluginResourceHandler.getString("J2EEDeployOperation_2_UI_", new Object[]{DeployerName})), null); //$NON-NLS-1$ //$NON-NLS-2$ //TODO //addStatus(statusLocal); } | 8196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8196/47a68c887da65ca71586e3a85c2c69de296d4757/J2EEDeployOperation.java/buggy/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deploy/J2EEDeployOperation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
45,
1482,
1267,
2042,
273,
394,
2685,
12,
45,
1482,
18,
3141,
16,
315,
3104,
467,
1482,
18,
3141,
16,
261,
46,
22,
9383,
3773,
1420,
1503,
18,
588,
780,
2932,
46,
22,
9383,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
45,
1482,
1267,
2042,
273,
394,
2685,
12,
45,
1482,
18,
3141,
16,
315,
3104,
467,
1482,
18,
3141,
16,
261,
46,
22,
9383,
3773,
1420,
1503,
18,
588,
780,
2932,
46,
22,
9383,... | |
throw new PainterException("wrong arguments"); | throw new PainterException("aload: wrong arguments"); | protected HashMap constructSystemDict() { HashMap systemDict = new HashMap(); // newpath systemDict.put("newpath", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.newpath(); } }); // moveto systemDict.put("moveto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.pencil.moveto(data[0], data[1]); } }); // rmoveto systemDict.put("rmoveto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.pencil.rmoveto(data[0], data[1]); } }); // lineto systemDict.put("lineto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.pencil.lineto(data[0], data[1]); } }); // rlineto systemDict.put("rlineto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.pencil.rlineto(data[0], data[1]); } }); // arc systemDict.put("arc", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(5); context.pencil.arc(data[0], data[1], data[2], data[3], data[4]); } }); // arcn systemDict.put("arcn", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(5); context.pencil.arcn(data[0], data[1], data[2], data[3], data[4]); } }); // curveto systemDict.put("curveto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(6); context.pencil.curveto(data[0], data[1], data[2], data[3], data[4], data[5]); } }); // rcurveto systemDict.put("rcurveto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(6); context.pencil.rcurveto(data[0], data[1], data[2], data[3], data[4], data[5]); } }); // closepath systemDict.put("closepath", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.closepath(); } }); // gsave systemDict.put("gsave", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.gsave(); } }); // grestore systemDict.put("grestore", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.grestore(); } }); // translate systemDict.put("translate", new PACommand() { public void execute(PAContext context) throws PainterException { if (context.peekOperand() instanceof Number) { double data[]; AffineTransform at = new AffineTransform(); AffineTransform ctm = context.pencil.graphics.getTransform(); data = context.popNumberOperands(2); at.translate(data[0], data[1]); ctm.concatenate(at); context.pencil.graphics.setTransform(ctm); } else { Object data[]; data = context.popOperands(3); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList array = (ArrayList) data[2]; if (! (array.size() == 6)) { throw new PainterException("wrong arguments"); } AffineTransform at = new AffineTransform(); at.translate( ( (Number) data[0]).doubleValue(), ( (Number) data[1]).doubleValue()); double[] entries = new double[6]; at.getMatrix(entries); for (int i = 0; i < 6; i++) { array.set(i, new Double(entries[i])); } context.operands.push(array); } } }); // rotate systemDict.put("rotate", new PACommand() { public void execute(PAContext context) throws PainterException { if (context.peekOperand() instanceof Number) { double data[]; AffineTransform at = new AffineTransform(); AffineTransform ctm = context.pencil.graphics.getTransform(); data = context.popNumberOperands(1); at.rotate(data[0] * Math.PI / 180.0d); ctm.concatenate(at); context.pencil.graphics.setTransform(ctm); } else { Object data[]; AffineTransform at = new AffineTransform(); data = context.popOperands(2); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList array = (ArrayList) data[1]; if (! (array.size() == 6)) { throw new PainterException("wrong arguments"); } at.rotate( ( (Number) data[0]).doubleValue()); double[] entries = new double[6]; at.getMatrix(entries); for (int i = 0; i < 6; i++) { array.set(i, new Double(entries[i])); } context.operands.push(array); } } }); // scale systemDict.put("scale", new PACommand() { public void execute(PAContext context) throws PainterException { if (context.peekOperand() instanceof Number) { double data[]; AffineTransform at = new AffineTransform(); AffineTransform ctm = context.pencil.graphics.getTransform(); data = context.popNumberOperands(2); at.scale(data[0], data[1]); ctm.concatenate(at); context.pencil.graphics.setTransform(ctm); } else { Object data[]; data = context.popOperands(3); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList array = (ArrayList) data[2]; double[] entries = new double[6]; if (! (array.size() == 6)) { throw new PainterException("wrong arguments"); } entries[0] = ( (Number) data[0]).doubleValue(); entries[1] = 0.0d; entries[2] = 0.0d; entries[3] = ( (Number) data[1]).doubleValue(); entries[4] = 0.0d; entries[5] = 0.0d; for (int i = 0; i < 6; i++) { array.set(i, new Double(entries[i])); } context.operands.push(array); } } }); // stroke systemDict.put("stroke", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.stroke(); } }); // fill systemDict.put("fill", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.fill(); } }); // eofill systemDict.put("eofill", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.eofill(); } }); // show systemDict.put("show", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); if (! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } context.pencil.show( (String) data[0]); } }); // stringwidth systemDict.put("stringwidth", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; float[] result; Font font; data = context.popOperands(1); if (! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } font = context.pencil.graphics.getFont(); Rectangle2D rect = font.getStringBounds( (String) data[0], context.pencil.graphics. getFontRenderContext()); context.operands.push(new Float(rect.getWidth())); context.operands.push(new Float(rect.getHeight())); } }); // showpage systemDict.put("showpage", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.showpage(); } }); // findfont systemDict.put("findfont", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } context.operands.push(context.pencil.findFont( (String) patoken.value)); } }); // scalefont systemDict.put("scalefont", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Font)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } context.operands.push( ( (Font) data[0]).deriveFont( ( (Number) data[1]). floatValue())); } }); // setfont systemDict.put("setfont", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); if (! (data[0] instanceof Font)) { throw new PainterException("wrong arguments"); } context.pencil.graphics.setFont( (Font) data[0]); } }); // def systemDict.put("def", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(2); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } try { ( (HashMap) context.dictionaries.peek()).put(patoken.value, data[1]); } catch (EmptyStackException e) { throw new PainterException(e.toString()); } } }); // bind systemDict.put("bind", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } context.engine.bindProcedure(patoken); context.operands.push(patoken); } }); // mul systemDict.put("mul", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.operands.push(new Double(data[0] * data[1])); } }); // div systemDict.put("div", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.operands.push(new Double(data[0] / data[1])); } }); // mod systemDict.put("mod", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); int a, b, m; a = (int) data[0]; b = (int) data[1]; m = a % b; context.operands.push(new Integer(m)); } }); // add systemDict.put("add", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.operands.push(new Double(data[0] + data[1])); } }); // neg systemDict.put("neg", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Double( -data[0])); } }); // sub systemDict.put("sub", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.operands.push(new Double(data[0] - data[1])); } }); // atan systemDict.put("atan", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.operands.push(new Double(Math.atan2(data[0], data[1]))); } }); // sin systemDict.put("sin", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Double(Math.sin(data[0] * Math.PI / 180.0))); } }); // cos systemDict.put("cos", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Double(Math.cos(data[0] * Math.PI / 180.0))); } }); // sqrt systemDict.put("sqrt", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Double(Math.sqrt(data[0]))); } }); // exch systemDict.put("exch", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); context.operands.push(data[1]); context.operands.push(data[0]); } }); // dup systemDict.put("dup", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); context.operands.push(data[0]); context.operands.push(data[0]); } }); // roll systemDict.put("roll", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; Object rollData[]; data = context.popOperands(2); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } int numberOfElements, numberOfPositions, i; numberOfElements = ( (Number) data[0]).intValue(); numberOfPositions = ( (Number) data[1]).intValue(); if (numberOfPositions == 0 || numberOfElements <= 0) { return; } rollData = context.popOperands(numberOfElements); if (numberOfPositions < 0) { numberOfPositions = -numberOfPositions; numberOfPositions = numberOfPositions % numberOfElements; // downward roll for (i = numberOfPositions; i < numberOfElements; i++) { context.operands.push(rollData[i]); } for (i = 0; i < numberOfPositions; i++) { context.operands.push(rollData[i]); } } else { numberOfPositions = numberOfPositions % numberOfElements; // upward roll for (i = numberOfElements - numberOfPositions; i < numberOfElements; i++) { context.operands.push(rollData[i]); } for (i = 0; i < numberOfElements - numberOfPositions; i++) { context.operands.push(rollData[i]); } } } }); // pop systemDict.put("pop", new PACommand() { public void execute(PAContext context) throws PainterException { context.popOperands(1); } }); // index systemDict.put("index", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } int index = ( (Number) data[0]).intValue(); try { context.operands.push(context.operands.elementAt(index)); } catch (ArrayIndexOutOfBoundsException e) { throw new PainterException(e.toString()); } } }); // mark systemDict.put("mark", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new PAToken(null, PAToken.MARK)); } }); // cleartomark systemDict.put("cleartomark", new PACommand() { public void execute(PAContext context) throws PainterException { Object data; boolean finished = false; while (!finished) { try { data = context.operands.pop(); if (data instanceof PAToken) { if ( ( (PAToken) data).type == PAToken.MARK) { finished = true; } } } catch (EmptyStackException e) { throw new PainterException(e.toString()); } } } }); // copy systemDict.put("copy", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); // decide if it's a simple copy or a composite object copy if ( (data[0] instanceof PAToken) && (data[1] instanceof PAToken)) { // composite object copy if ( ( (PAToken) data[0]).type == ( (PAToken) data[1]).type) { // our tokens are immutable so a copy is easy context.operands.push(data[0]); context.operands.push(data[0]); } else { throw new PainterException( "copy operation failed because composite objects on stack are not of same type"); } } else { // restore first arg, we're not interested in it in this simple case context.operands.push(data[0]); if (data[1] instanceof Number) { int index = ( (Number) data[1]).intValue(); int i, n; n = context.operands.size(); Object[] copyData = new Object[index]; for (i = n - index; i < n; i++) { try { copyData[i - n + index] = context.operands.elementAt(i); } catch (ArrayIndexOutOfBoundsException e) { throw new PainterException(e.toString()); } } for (i = 0; i < index; i++) { context.operands.push(copyData[i]); } } else { throw new PainterException("I expect a number on stack, dude"); } } } }); // setgray systemDict.put("setgray", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.pencil.graphics.setPaint(new Color( (float) data[0], (float) data[0], (float) data[0])); } }); // setrgbcolor systemDict.put("setrgbcolor", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(3); float[] fv = new float[3]; fv[0] = (float) Math.max(Math.min(data[0], 1.0d), 0.0d); fv[1] = (float) Math.max(Math.min(data[1], 1.0d), 0.0d); fv[2] = (float) Math.max(Math.min(data[2], 1.0d), 0.0d); context.pencil.graphics.setPaint(new Color(fv[0], fv[1], fv[2])); } }); // PENDING(uweh): color stuff still shaky // sethsbcolor systemDict.put("sethsbcolor", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(3); float[] fv = new float[3]; fv[0] = (float) Math.max(Math.min(data[0], 1.0d), 0.0d); fv[1] = (float) Math.max(Math.min(data[1], 1.0d), 0.0d); fv[2] = (float) Math.max(Math.min(data[2], 1.0d), 0.0d); context.pencil.graphics.setPaint(new Color(fv[0], fv[1], fv[2])); } }); // PENDING(uweh): I have to convert these puppies myself to rgb ? // setcmykcolor systemDict.put("setcmykcolor", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; int rd, gr, bl; data = context.popNumberOperands(4); float[] fv = new float[4]; fv[0] = (float) data[0]; fv[1] = (float) data[1]; fv[2] = (float) data[2]; fv[3] = (float) data[3]; rd = (int) (255 * Math.max(0, 1 - fv[0] - fv[3])); gr = (int) (255 * Math.max(0, 1 - fv[1] - fv[3])); bl = (int) (255 * Math.max(0, 1 - fv[2] - fv[3])); context.pencil.graphics.setPaint(new Color(rd, gr, bl)); } }); // setlinewidth systemDict.put("setlinewidth", new PACommand() { private double minLineWidth(double w, AffineTransform at) { double matrix[] = new double[4]; at.getMatrix(matrix); double scale = matrix[0] * matrix[3] - matrix[1] * matrix[2]; double minlw = .25 / Math.sqrt(Math.abs(scale)); if (w < minlw) { w = minlw; } return w; } public void execute(PAContext context) throws PainterException { double data[]; BasicStroke newStroke; Stroke oldStroke = context.pencil.graphics.getStroke(); data = context.popNumberOperands(1); data[0] = this.minLineWidth(data[0], context.pencil.graphics.getTransform()); if (oldStroke instanceof BasicStroke) { newStroke = new BasicStroke( (float) data[0], ( (BasicStroke) oldStroke).getEndCap(), ( (BasicStroke) oldStroke).getLineJoin(), ( (BasicStroke) oldStroke).getMiterLimit(), ( (BasicStroke) oldStroke).getDashArray(), ( (BasicStroke) oldStroke).getDashPhase()); } else { newStroke = new BasicStroke( (float) data[0], BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND); } context.pencil.graphics.setStroke(newStroke); } }); // setlinecap systemDict.put("setlinecap", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; BasicStroke newStroke; Stroke oldStroke = context.pencil.graphics.getStroke(); data = context.popNumberOperands(1); if (oldStroke instanceof BasicStroke) { newStroke = new BasicStroke( ( (BasicStroke) oldStroke).getLineWidth(), (int) data[0], ( (BasicStroke) oldStroke).getLineJoin(), ( (BasicStroke) oldStroke).getMiterLimit(), ( (BasicStroke) oldStroke).getDashArray(), ( (BasicStroke) oldStroke).getDashPhase()); } else { newStroke = new BasicStroke(1.0f, (int) data[0], BasicStroke.JOIN_ROUND); } context.pencil.graphics.setStroke(newStroke); } }); // setmiterlimit systemDict.put("setmiterlimit", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; BasicStroke newStroke; Stroke oldStroke = context.pencil.graphics.getStroke(); data = context.popNumberOperands(1); if (oldStroke instanceof BasicStroke) { newStroke = new BasicStroke( ( (BasicStroke) oldStroke).getLineWidth(), ( (BasicStroke) oldStroke).getEndCap(), ( (BasicStroke) oldStroke).getLineJoin(), (float) data[0], ( (BasicStroke) oldStroke).getDashArray(), ( (BasicStroke) oldStroke).getDashPhase()); } else { newStroke = new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, (float) data[0]); } context.pencil.graphics.setStroke(newStroke); } }); // setdash systemDict.put("setdash", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; BasicStroke newStroke; Stroke oldStroke = context.pencil.graphics.getStroke(); data = context.popOperands(2); if (! (data[0] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } ArrayList list = (ArrayList) data[0]; if (list.size() == 0) { return; } float[] dashpattern = new float[list.size()]; for (int i = 0; i < dashpattern.length; i++) { dashpattern[i] = ( (Number) list.get(i)).floatValue(); } float dashoffset = ( (Number) data[1]).floatValue(); if (oldStroke instanceof BasicStroke) { newStroke = new BasicStroke( ( (BasicStroke) oldStroke).getLineWidth(), ( (BasicStroke) oldStroke).getEndCap(), ( (BasicStroke) oldStroke).getLineJoin(), ( (BasicStroke) oldStroke).getMiterLimit(), dashpattern, dashoffset); } else { newStroke = new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f, dashpattern, dashoffset); } context.pencil.graphics.setStroke(newStroke); } }); // setlinejoin systemDict.put("setlinejoin", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; BasicStroke newStroke; Stroke oldStroke = context.pencil.graphics.getStroke(); data = context.popNumberOperands(1); if (oldStroke instanceof BasicStroke) { newStroke = new BasicStroke( ( (BasicStroke) oldStroke).getLineWidth(), ( (BasicStroke) oldStroke).getEndCap(), (int) data[0], ( (BasicStroke) oldStroke).getMiterLimit(), ( (BasicStroke) oldStroke).getDashArray(), ( (BasicStroke) oldStroke).getDashPhase()); } else { newStroke = new BasicStroke(1.0f, BasicStroke.CAP_ROUND, (int) data[0]); } context.pencil.graphics.setStroke(newStroke); } }); // dumpstack systemDict.put("dumpstack", new PACommand() { public void execute(PAContext context) throws PainterException { Enumeration enumx = context.operands.elements(); System.out.println("-------------Stack--------------"); while (enumx.hasMoreElements()) { System.out.println(enumx.nextElement()); } System.out.println("--------------------------------"); } }); // for systemDict.put("for", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(4); if (! (data[3] instanceof PAToken)) { throw new PainterException("wrong arguments"); } if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof Number)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[3]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } int i0, i1, i2; i0 = ( (Number) data[0]).intValue(); i1 = ( (Number) data[1]).intValue(); i2 = ( (Number) data[2]).intValue(); if (i1 > 0) { for (int i = i0; i <= i2; i += i1) { context.operands.push(new Integer(i)); context.engine.process(patoken); } } else { for (int i = i0; i >= i2; i -= i1) { context.operands.push(new Integer(i)); context.engine.process(patoken); } } } }); // repeat systemDict.put("repeat", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(2); if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } int n = ( (Number) data[0]).intValue(); for (int i = 0; i < n; i++) { context.engine.process(patoken); } } }); // true systemDict.put("true", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new Boolean(true)); } }); // false systemDict.put("false", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new Boolean(false)); } }); // lt systemDict.put("lt", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof Number) { if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } double d0, d1; d0 = ( (Number) data[0]).doubleValue(); d1 = ( (Number) data[1]).doubleValue(); if (d0 < d1) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } else { if (! (data[1] instanceof String)) { throw new PainterException("wrong arguments"); } String s0, s1; s0 = (String) data[0]; s1 = (String) data[1]; if (s0.compareTo(s1) < 0) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } } }); // gt systemDict.put("gt", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof Number) { if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } double d0, d1; d0 = ( (Number) data[0]).doubleValue(); d1 = ( (Number) data[1]).doubleValue(); if (d0 > d1) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } else { if (! (data[1] instanceof String)) { throw new PainterException("wrong arguments"); } String s0, s1; s0 = (String) data[0]; s1 = (String) data[1]; if (s0.compareTo(s1) > 0) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } } }); // ne systemDict.put("ne", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof Number) { if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } double d0, d1; d0 = ( (Number) data[0]).doubleValue(); d1 = ( (Number) data[1]).doubleValue(); if (d0 != d1) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } else { if (! (data[1] instanceof String)) { throw new PainterException("wrong arguments"); } String s0, s1; s0 = (String) data[0]; s1 = (String) data[1]; if (s0.equals(s1)) { context.operands.push(new Boolean(false)); } else { context.operands.push(new Boolean(true)); } } } }); // eq systemDict.put("eq", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof Number) { if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } double d0, d1; d0 = ( (Number) data[0]).doubleValue(); d1 = ( (Number) data[1]).doubleValue(); if (d0 == d1) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } else { if (! (data[1] instanceof String)) { throw new PainterException("wrong arguments"); } String s0, s1; s0 = (String) data[0]; s1 = (String) data[1]; if (s0.compareTo(s1) == 0) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } } }); // if systemDict.put("if", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(2); if (! (data[0] instanceof Boolean)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } if ( ( (Boolean) data[0]).booleanValue()) { context.engine.process(patoken); } } }); // ifelse systemDict.put("ifelse", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken1, patoken2; data = context.popOperands(3); if (! (data[0] instanceof Boolean)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken1 = (PAToken) data[1]; patoken2 = (PAToken) data[2]; if (! (patoken1.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } if (! (patoken2.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } if ( ( (Boolean) data[0]).booleanValue()) { context.engine.process(patoken1); } else { context.engine.process(patoken2); } } }); // dict systemDict.put("dict", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new HashMap()); } }); // userdict systemDict.put("userdict", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new HashMap()); } }); // put systemDict.put("put", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(3); if (! (data[0] instanceof HashMap)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } ( (HashMap) data[0]).put(patoken.value, data[2]); } }); // get systemDict.put("get", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(2); if (! (data[0] instanceof HashMap) && ! (data[0] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof HashMap) { if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } context.operands.push( ( (HashMap) data[0]).get(patoken.value)); } else if (data[0] instanceof ArrayList) { if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } context.operands.push( ( (ArrayList) data[0]).get( ( (Number) data[1]). intValue())); } } }); // load systemDict.put("load", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } context.operands.push(context.findIdentifier(patoken.value)); } }); // length systemDict.put("length", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; int size = 0; data = context.popOperands(1); if (data[0] instanceof PAToken) { patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } size = ( (String) patoken.value).length(); } else if (data[0] instanceof HashMap) { size = ( (HashMap) data[0]).size(); } else if (data[0] instanceof ArrayList) { size = ( (ArrayList) data[0]).size(); } else if (data[0] instanceof String) { size = ( (String) data[0]).length(); } else { throw new PainterException("wrong arguments"); } context.operands.push(new Integer(size)); } }); // begin systemDict.put("begin", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); if (! (data[0] instanceof HashMap)) { throw new PainterException("wrong arguments"); } context.dictionaries.push(data[0]); } }); // end systemDict.put("end", new PACommand() { public void execute(PAContext context) throws PainterException { try { context.dictionaries.pop(); } catch (EmptyStackException e) { throw new PainterException("Dictionary stack is empty"); } } }); // undef systemDict.put("undef", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(2); if (! (data[0] instanceof HashMap)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } // we don't do an actual undef because we don't care } }); // known systemDict.put("known", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[], foundObject; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } foundObject = context.findIdentifier(patoken.value); if (foundObject != null) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } }); // where systemDict.put("where", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[], foundObject; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } foundObject = context.findDictionary(patoken.value); if (foundObject != null) { context.operands.push(foundObject); context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } }); // aload systemDict.put("aload", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; ArrayList list; data = context.popOperands(1); if (! (data[0] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } list = (ArrayList) data[0]; Iterator iterator = list.iterator(); while (iterator.hasNext()) { context.operands.push(iterator.next()); } context.operands.push(data[0]); } }); // forall systemDict.put("forall", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; ArrayList list; PAToken patoken; data = context.popOperands(2); if (! (data[0] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } list = (ArrayList) data[0]; Iterator iterator = list.iterator(); while (iterator.hasNext()) { context.operands.push(iterator.next()); context.engine.process(patoken); } } }); // currentflat PENDING(uweh):placeholder for now systemDict.put("currentflat", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new Float(1.0f)); } }); // setflat PENDING(uweh):placeholder for now systemDict.put("setflat", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); } }); // round systemDict.put("round", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Long(Math.round(data[0]))); } }); // abs systemDict.put("abs", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Double(Math.abs(data[0]))); } }); // transform systemDict.put("transform", new PACommand() { public void execute(PAContext context) throws PainterException { if (context.peekOperand() instanceof Number) { double data[]; double[] transformedData = new double[2]; data = context.popNumberOperands(2); AffineTransform at = context.pencil.graphics.getTransform(); at.transform(data, 0, transformedData, 0, 1); context.operands.push(new Double(transformedData[0])); context.operands.push(new Double(transformedData[1])); } else { Object data[]; data = context.popOperands(3); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList array = (ArrayList) data[2]; double[] entries = new double[6]; if (! (array.size() == 6)) { throw new PainterException("wrong arguments"); } for (int i = 0; i < 6; i++) { entries[i] = ( (Number) array.get(i)).doubleValue(); } AffineTransform at = new AffineTransform(entries); double numberdata[] = new double[2]; numberdata[0] = ( (Number) data[0]).doubleValue(); numberdata[1] = ( (Number) data[0]).doubleValue(); double[] transformedData = new double[2]; at.transform(numberdata, 0, transformedData, 0, 1); context.operands.push(new Double(transformedData[0])); context.operands.push(new Double(transformedData[1])); } } }); // itransform systemDict.put("itransform", new PACommand() { public void execute(PAContext context) throws PainterException { if (context.peekOperand() instanceof Number) { double data[]; double[] transformedData = new double[2]; data = context.popNumberOperands(2); AffineTransform at = context.pencil.graphics.getTransform(); try { at.inverseTransform(data, 0, transformedData, 0, 1); } catch (NoninvertibleTransformException e) { throw new PainterException(e.toString()); } context.operands.push(new Double(transformedData[0])); context.operands.push(new Double(transformedData[1])); } else { Object data[]; data = context.popOperands(3); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList array = (ArrayList) data[2]; double[] entries = new double[6]; if (! (array.size() == 6)) { throw new PainterException("wrong arguments"); } for (int i = 0; i < 6; i++) { entries[i] = ( (Number) array.get(i)).doubleValue(); } AffineTransform at = new AffineTransform(entries); double numberdata[] = new double[2]; numberdata[0] = ( (Number) data[0]).doubleValue(); numberdata[1] = ( (Number) data[0]).doubleValue(); double[] transformedData = new double[2]; try { at.inverseTransform(numberdata, 0, transformedData, 0, 1); } catch (NoninvertibleTransformException e) { throw new PainterException(e.toString()); } context.operands.push(new Double(transformedData[0])); context.operands.push(new Double(transformedData[1])); } } }); // currentpoint // PENDING(uweh): what about CTM, same thing when you construct path // this is different than ps, might not work in a few instances systemDict.put("currentpoint", new PACommand() { public void execute(PAContext context) throws PainterException { Point2D currentPoint = context.pencil.state.path.getCurrentPoint(); context.operands.push(new Double(currentPoint.getX())); context.operands.push(new Double(currentPoint.getY())); } }); // clippath systemDict.put("clippath", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.clippath(); } }); // matrix systemDict.put("matrix", new PACommand() { public void execute(PAContext context) throws PainterException { ArrayList identityMatrix = new ArrayList(6); identityMatrix.add(new Double(1.0d)); identityMatrix.add(new Double(0.0d)); identityMatrix.add(new Double(0.0d)); identityMatrix.add(new Double(1.0d)); identityMatrix.add(new Double(0.0d)); identityMatrix.add(new Double(0.0d)); context.operands.push(identityMatrix); } }); // concatmatrix systemDict.put("concatmatrix", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(3); if (! (data[0] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList arrayOne, arrayTwo, arrayThree; AffineTransform atOne, atTwo; arrayOne = (ArrayList) data[0]; arrayTwo = (ArrayList) data[1]; arrayThree = (ArrayList) data[2]; double[] entries = new double[6]; if (! (arrayOne.size() == 6)) { throw new PainterException("wrong arguments"); } if (! (arrayTwo.size() == 6)) { throw new PainterException("wrong arguments"); } if (! (arrayThree.size() == 6)) { throw new PainterException("wrong arguments"); } for (int i = 0; i < 6; i++) { entries[i] = ( (Number) arrayOne.get(i)).doubleValue(); } atOne = new AffineTransform(entries); for (int i = 0; i < 6; i++) { entries[i] = ( (Number) arrayTwo.get(i)).doubleValue(); } atTwo = new AffineTransform(entries); atOne.concatenate(atTwo); atOne.getMatrix(entries); for (int i = 0; i < 6; i++) { arrayThree.set(i, new Double(entries[i])); } context.operands.push(arrayThree); } }); // pathbbox systemDict.put("pathbbox", new PACommand() { public void execute(PAContext context) throws PainterException { Rectangle2D pathBounds = context.pencil.state.path.getBounds2D(); context.operands.push(new Double(pathBounds.getMinX())); context.operands.push(new Double(pathBounds.getMinY())); context.operands.push(new Double(pathBounds.getMaxX())); context.operands.push(new Double(pathBounds.getMaxY())); } }); // truncate systemDict.put("truncate", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; double truncated; data = context.popNumberOperands(1); if (data[0] < 0) { truncated = Math.ceil(data[0]); } else { truncated = Math.floor(data[0]); } context.operands.push(new Double(truncated)); } }); // rand systemDict.put("rand", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new Integer(randomNumberGenerator.nextInt(231))); } }); // srand systemDict.put("srand", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); randomNumberGenerator = new Random(Math.round(data[0])); } }); // cvi systemDict.put("cvi", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof Number) { int d; d = ( (Number) data[0]).intValue(); context.operands.push(new Integer(d)); } else { String s; s = (String) data[0]; context.operands.push(new Integer(s)); } } }); // usertime systemDict.put("usertime", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new Long(System.currentTimeMillis())); } });// save systemDict.put("save", new PACommand() { public void execute(PAContext context) throws PainterException { // context.operands.push(new Long(System.currentTimeMillis())); } });// restore systemDict.put("restore", new PACommand() { public void execute(PAContext context) throws PainterException { // Object data[]; // data = context.popOperands(1); } });// clear systemDict.put("clear", new PACommand() { public void execute(PAContext context) throws PainterException { // Object data[]; // data = context.popOperands(1); } });// cleardictstack systemDict.put("cleardictstack", new PACommand() { public void execute(PAContext context) throws PainterException { // Object data[]; // data = context.popOperands(1); } }); // charpath systemDict.put("charpath", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Boolean)) { throw new PainterException("wrong arguments"); } context.pencil.charpath( (String) data[0], ( (Boolean) data[1]).booleanValue()); } }); // PENDING(uweh): we only support procedure right now and always push false on the stack // stopped systemDict.put("stopped", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } context.engine.process(patoken); context.operands.push(new Boolean(false)); } }); return systemDict; } | 4174 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4174/d2f614f1cabfa6f585b4e67b060a3e4e49a9f71e/PAContext.java/clean/src/com/lowagie/text/pdf/codec/postscript/PAContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
4317,
4872,
3163,
5014,
1435,
288,
565,
4317,
2619,
5014,
273,
394,
4317,
5621,
565,
368,
25094,
565,
2619,
5014,
18,
458,
2932,
2704,
803,
3113,
394,
15662,
2189,
1435,
288,
1377,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
4317,
4872,
3163,
5014,
1435,
288,
565,
4317,
2619,
5014,
273,
394,
4317,
5621,
565,
368,
25094,
565,
2619,
5014,
18,
458,
2932,
2704,
803,
3113,
394,
15662,
2189,
1435,
288,
1377,
... |
for (int i = 0; i < paths.length; i++) { Object[] nodes = paths[i].getPath(); | for (TreePath path : paths) { Object[] nodes = path.getPath(); | public InspectionTool getSelectedTool() { final TreePath[] paths = myTree.getSelectionPaths(); if (paths == null) return null; InspectionTool tool = null; for (int i = 0; i < paths.length; i++) { Object[] nodes = paths[i].getPath(); for (int j = nodes.length - 1; j >= 0; j--) { Object node = nodes[j]; if (node instanceof InspectionNode) { if (tool == null) { tool = ((InspectionNode)node).getTool(); } else if (tool != ((InspectionNode)node).getTool()) { return null; } break; } } } return tool; } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/44b1444ef611a7223c4ad1fa4fc69f6017017008/InspectionResultsView.java/buggy/source/com/intellij/codeInspection/ui/InspectionResultsView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
22085,
7017,
6364,
16625,
6364,
1435,
288,
565,
727,
4902,
743,
8526,
2953,
273,
3399,
2471,
18,
588,
6233,
4466,
5621,
565,
309,
261,
4481,
422,
446,
13,
327,
446,
31,
565,
22085,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22085,
7017,
6364,
16625,
6364,
1435,
288,
565,
727,
4902,
743,
8526,
2953,
273,
3399,
2471,
18,
588,
6233,
4466,
5621,
565,
309,
261,
4481,
422,
446,
13,
327,
446,
31,
565,
22085,
... |
popClass(); | public RubyObject yield0(RubyObject value, RubyObject self, RubyModule klass, boolean acheck) { RubyObject result = ruby.getNil(); if (!(isBlockGiven() || isFBlockGiven()) || (ruby_block == null)) { throw new RuntimeException("yield called out of block"); } RubyVarmap.push(ruby); // PUSH_CLASS(); BLOCK block = ruby_block; Frame frame = block.frame; frame.setPrev(rubyFrame); rubyFrame = frame; VALUE old_cref = ruby_cref; ruby_cref = (NODE)rubyFrame.getCbase(); RubyScope oldScope = ruby.rubyScope; ruby.rubyScope = block.scope; ruby_block = block.prev; if ((block.flags & BLOCK_D_SCOPE) != 0) { dynamicVars = new RubyVarmap(null, null, block.dyna_vars); } else { dynamicVars = block.dyna_vars; } ruby_class = (klass != null) ? klass : block.klass; if (klass == null) { self = (RubyObject)block.self; } NODE node = block.body; if (block.var != null) { // try { if (block.var == NODE.ONE) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray)value).length() != 0) { throw new RubyArgumentException("wrong # of arguments ("+ ((RubyArray)value).length() + " for 0)"); } } else { if (block.var.nd_type() == NODE_MASGN) { massign(self, block.var, value, acheck); } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray)value).length() == 1) { value = ((RubyArray)value).entry(0); } assign(self, block.var, value, acheck); } } // } catch () { // goto pop_state; // } } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray)value).length() == 1) { value = ((RubyArray)value).entry(0); } } rubyIter.push(block.iter); while (true) { try { if (node == null) { result = ruby.getNil(); } else if (node.nd_type() == NODE_CFUNC || node.nd_type() == NODE_IFUNC) { if (value == null) { value = RubyArray.m_newArray(ruby, 0); } result = ((RubyCallbackMethod)node.nd_cfnc()).execute(value, new RubyObject[] {(RubyObject)node.nd_tval(), self}, ruby); } else { result = eval(self, node); } break; } catch (RedoException rExcptn) { } catch (NextException nExcptn) { result = ruby.getNil(); break; } catch (BreakException bExcptn) { break; } catch (ReturnException rExcptn) { break; } } // pop_state: rubyIter.pop(); // POP_CLASS(); RubyVarmap.pop(ruby); ruby_block = block; rubyFrame = rubyFrame.getPrev(); ruby_cref = (NODE)old_cref; // if (ruby_scope->flag & SCOPE_DONT_RECYCLE) // scope_dup(old_scope); ruby.rubyScope = oldScope; /* * if (state) { * if (!block->tag) { * switch (state & TAG_MASK) { * case TAG_BREAK: * case TAG_RETURN: * jump_tag_but_local_jump(state & TAG_MASK); * break; * } * } * JUMP_TAG(state); * } */ return result; } | 45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RubyInterpreter.java/buggy/org/jruby/interpreter/RubyInterpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1843,
797,
5621,
1843,
797,
5621,
1843,
797,
5621,
1843,
797,
5621,
1071,
5120,
797,
5621,
19817,
921,
5120,
797,
5621,
2824,
20,
12,
54,
10340,
921,
5120,
797,
5621,
460,
16,
5120,
797,
5621,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1843,
797,
5621,
1843,
797,
5621,
1843,
797,
5621,
1843,
797,
5621,
1071,
5120,
797,
5621,
19817,
921,
5120,
797,
5621,
2824,
20,
12,
54,
10340,
921,
5120,
797,
5621,
460,
16,
5120,
797,
5621,... | |
public static boolean includeLibrary( ModuleHandle moduleHandle, LibraryHandle libraryHandle ) throws DesignFileException, SemanticException { if ( moduleHandle != libraryHandle && !moduleHandle.isInclude( libraryHandle ) ) { String defaultName = new File( libraryHandle.getFileName( ) ).getName( ) .split( File.separator + "." )[0]; if ( SessionHandleAdapter.getInstance( ) .getReportDesignHandle( ) .getLibrary( defaultName ) != null ) { ImportLibraryDialog dialog = new ImportLibraryDialog( defaultName ); if ( dialog.open( ) == Dialog.OK ) { moduleHandle.includeLibrary( DEUtil.getRelativedPath( moduleHandle.getFileName( ), libraryHandle.getFileName( ) ), (String) dialog.getResult( ) ); ExceptionHandler.openMessageBox( MSG_DIALOG_TITLE, MessageFormat.format( MSG_DIALOG_MSG, new String[]{ libraryHandle.getFileName( ) } ), SWT.ICON_INFORMATION ); return true; } return false; } moduleHandle.includeLibrary( DEUtil.getRelativedPath( moduleHandle.getFileName( ), libraryHandle.getFileName( ) ), defaultName ); ExceptionHandler.openMessageBox( MSG_DIALOG_TITLE, MessageFormat.format( MSG_DIALOG_MSG, new String[]{ libraryHandle.getFileName( ) } ), SWT.ICON_INFORMATION ); return true; } return true; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/c4093a03b7bd14d5811d9e04a09ced3a222e949a/UIUtil.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/util/UIUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3845,
6494,
6702,
9313,
12,
3120,
3259,
2978,
3259,
16,
1082,
202,
9313,
1144,
80,
30575,
3345,
3259,
13,
15069,
15478,
812,
503,
16,
1082,
202,
13185,
9941,
503,
202,
95,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3845,
6494,
6702,
9313,
12,
3120,
3259,
2978,
3259,
16,
1082,
202,
9313,
1144,
80,
30575,
3345,
3259,
13,
15069,
15478,
812,
503,
16,
1082,
202,
13185,
9941,
503,
202,
95,
202,
... | ||
return cloneObj; | cloneObj.attribValue = ((BaseObject) this.attribValue).clone(); return cloneObj; | public Object clone () throws CloneNotSupportedException{ XMLAttribute cloneObj = null; cloneObj = (XMLAttribute) super.clone(); // need to deep copy the fields here too cloneObj.attribType = new String(this.attribType); if (attribValue == null) { return cloneObj; } if (attribValue instanceof String ) { cloneObj.attribValue = new String((String) this.attribValue); return cloneObj; } if (attribValue instanceof Integer) { cloneObj.attribValue = new Integer(((Integer) this.attribValue).intValue()); return cloneObj; } if (attribValue instanceof Double) { cloneObj.attribValue = new Double(((Double) this.attribValue).doubleValue()); return cloneObj; } if (attribValue instanceof Axis) { cloneObj.attribValue =((Axis) this.attribValue).clone(); } if (attribValue instanceof List) { cloneObj.attribValue = Collections.synchronizedList(new ArrayList(((List) this.attribValue).size())); int stop = ((List)this.attribValue).size(); for (int i = 0; i < stop; i ++) { Object obj = ((List)this.attribValue).get(i); if (obj instanceof Axis) { ((List)cloneObj.attribValue).add(((Axis) obj).clone()); } else { if (obj instanceof Field) { ((List)cloneObj.attribValue).add(((Field) obj).clone()); } else { if (obj instanceof FieldAxis) { ((List)cloneObj.attribValue).add(((FieldAxis) obj).clone()); } else { if (obj instanceof Note) { ((List)cloneObj.attribValue).add(((Note) obj).clone()); } else { if (obj instanceof Value) { ((List)cloneObj.attribValue).add(((Value) obj).clone()); } } } } } } } return cloneObj; } | 4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/bd6135a4290d810c774315df2987d73c7cf5437d/XMLAttribute.java/clean/src/gov/nasa/gsfc/adc/xdf/XMLAttribute.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
3236,
1832,
1216,
12758,
25482,
95,
1377,
3167,
1499,
3236,
2675,
273,
446,
31,
1377,
3236,
2675,
273,
261,
4201,
1499,
13,
2240,
18,
14056,
5621,
1377,
368,
1608,
358,
4608,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3236,
1832,
1216,
12758,
25482,
95,
1377,
3167,
1499,
3236,
2675,
273,
446,
31,
1377,
3236,
2675,
273,
261,
4201,
1499,
13,
2240,
18,
14056,
5621,
1377,
368,
1608,
358,
4608,
... |
int endIndex = name.lastIndexOf( "Impl" ); | int endIndex = name.lastIndexOf("Impl"); | protected AccessibleEditPart getAccessibleEditPart() { if( accessibleEP == null ) { accessibleEP = new AccessibleGraphicalEditPart() { private String getSemanticName() { EObject semanticElement = resolveSemanticElement(); if( semanticElement != null ) { String name = semanticElement.getClass().getName(); int startIndex = name.lastIndexOf('.') + 1; int endIndex = name.lastIndexOf( "Impl" ); //$NON-NLS-1$ return name.substring(startIndex, endIndex); } return PresentationResourceManager.getInstance().getString( "Accessible.Connection.Label" ); //$NON-NLS-1$ } public void getName(AccessibleEvent e) { StringBuffer msg = new StringBuffer(); EditPart sourceEP = getSource(); EditPart targetEP = getTarget(); // Get the Connection Name msg.append( getSemanticName() ); // Get the Source Name if (sourceEP != null) { AccessibleEditPart aEP = (AccessibleEditPart)sourceEP.getAdapter(AccessibleEditPart.class); AccessibleEvent event = new AccessibleEvent(this); aEP.getName( event ); msg.append( " " ); //$NON-NLS-1$ msg.append( PresentationResourceManager.getInstance().getString( "Accessible.Connection.From" ) ); //$NON-NLS-1$ msg.append( " " ); //$NON-NLS-1$ msg.append( event.result ); } // Get the Target Name if (targetEP != null) { AccessibleEditPart aEP = (AccessibleEditPart)targetEP.getAdapter(AccessibleEditPart.class); AccessibleEvent event = new AccessibleEvent(this); aEP.getName( event ); msg.append( " " ); //$NON-NLS-1$ msg.append( PresentationResourceManager.getInstance().getString( "Accessible.Connection.To" ) ); //$NON-NLS-1$ msg.append( " " ); //$NON-NLS-1$ msg.append( event.result ); } e.result = msg.toString(); } }; } return accessibleEP; } | 1758 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1758/8cde65fc058a9faaf847d04bf9b28594ea600f8f/ConnectionEditPart.java/buggy/org.eclipse.gmf.runtime/plugins/org.eclipse.gmf.runtime.diagram.ui/src/org/eclipse/gmf/runtime/diagram/ui/editparts/ConnectionEditPart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
5016,
1523,
4666,
1988,
336,
10451,
4666,
1988,
1435,
288,
202,
202,
430,
12,
12718,
10541,
422,
446,
262,
288,
1082,
202,
26037,
10541,
273,
394,
5016,
1523,
4137,
1706,
4666,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5016,
1523,
4666,
1988,
336,
10451,
4666,
1988,
1435,
288,
202,
202,
430,
12,
12718,
10541,
422,
446,
262,
288,
1082,
202,
26037,
10541,
273,
394,
5016,
1523,
4137,
1706,
4666,
... |
String className = outerRt.name(); while (field == null) { | Field outerThis = outerRt.fieldByName("this$0"); while ((field == null) && (outerThis != null)) { outer = (ObjectReference) outer.getValue(outerThis); outerRt = outer.referenceType(); field = outerRt.fieldByName(currName); if (field == null) { outerThis = outerRt.fieldByName("this$0"); } } if (field != null) { currWatch.setValue(_getValue(outer.getValue(field))); try { currWatch.setType(field.type()); } catch (ClassNotLoadedException cnle) { currWatch.setType(null); } } /* | private void _updateWatches() throws DebugException { _ensureReady(); if (_suspendedThreads.size() <= 0) { throw new IllegalStateException("Cannot update watches if there " + "are no suspended threads."); } try { int stackIndex = 0; StackFrame currFrame = null; List frames = null; ThreadReference thread = _suspendedThreads.peek(); if (thread.frameCount() <= 0 ) { printMessage("Could not update watch values. The current thread " + "had no stack frames."); return; } frames = thread.frames(); currFrame = (StackFrame) frames.get(stackIndex); stackIndex++; Location location = currFrame.location(); ReferenceType rt = location.declaringType(); for (int i = 0; i < _watches.size(); i++) { DebugWatchData currWatch = _watches.elementAt(i); String currName = currWatch.getName(); String currValue = currWatch.getValue(); // check for "this" if (currName.equals("this")) { ObjectReference obj = currFrame.thisObject(); if (obj != null) { currWatch.setValue(_getValue(obj)); currWatch.setType(obj.type()); } else { currWatch.setValue(DebugWatchUndefinedValue.ONLY); currWatch.setType(null); } continue; } //List frames = null; LocalVariable localVar = null; try { localVar = currFrame.visibleVariableByName(currName); } catch (AbsentInformationException aie) { } ReferenceType outerRt = rt; // if the variable being watched is not a local variable, check if it's a field if (localVar == null) { Field field = outerRt.fieldByName(currName); // if the variable is not a field either, it's not defined in this // ReferenceType's scope, keep going further out in scope. String className = outerRt.name(); while (field == null) { // crop off the $ if there is one and anything after it int indexOfDollar = className.lastIndexOf('$'); if (indexOfDollar > -1) { className = className.substring(0, indexOfDollar); } else { // There is no $ in the className, we're at the outermost class and the // field still was not found break; } outerRt = (ReferenceType)_vm.classesByName(className).get(0); if (outerRt == null) { break; } field = outerRt.fieldByName(currName); } if (field != null) { // check if the field is static if (field.isStatic()) { currWatch.setValue(_getValue(outerRt.getValue(field))); try { currWatch.setType(field.type()); } catch (ClassNotLoadedException cnle) { currWatch.setType(null); } } else { StackFrame outerFrame = currFrame; // the field is not static // Check if the frame represents a native or static method and // keep going down the stack frame looking for the frame that // has the same ReferenceType that we found the Field in. // This is a hack, remove it to slightly improve performance but // at the loss of ever being able to watch outer instance // fields. If unremoved, this will work sometimes, but not always. while (outerFrame.thisObject() != null && !outerFrame.thisObject().referenceType().equals(outerRt) && stackIndex < frames.size()) { outerFrame = (StackFrame) frames.get(stackIndex); stackIndex++; } if (stackIndex < frames.size() && outerFrame.thisObject() != null) { // then we found the right stack frame currWatch.setValue(_getValue(outerFrame.thisObject().getValue(field))); try { currWatch.setType(field.type()); } catch (ClassNotLoadedException cnle) { currWatch.setType(null); } } else { currWatch.setValue(DebugWatchUndefinedValue.ONLY); currWatch.setType(null); } } } else { currWatch.setValue(DebugWatchUndefinedValue.ONLY); currWatch.setType(null); } } else { currWatch.setValue(_getValue(currFrame.getValue(localVar))); try { currWatch.setType(localVar.type()); } catch (ClassNotLoadedException cnle) { currWatch.setType(null); } } } } catch (IncompatibleThreadStateException itse) { _log("Exception updating watches.", itse); } catch (InvalidStackFrameException isfe) { _log("Exception updating watches.", isfe); } } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/1b1a2ff927caf38a8f2ba21780232fcbeb4319bb/JPDADebugger.java/buggy/drjava/src/edu/rice/cs/drjava/model/debug/JPDADebugger.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
389,
2725,
5234,
281,
1435,
1216,
4015,
503,
288,
565,
389,
15735,
8367,
5621,
565,
309,
261,
67,
87,
22942,
13233,
18,
1467,
1435,
1648,
374,
13,
288,
1377,
604,
394,
5477,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
2725,
5234,
281,
1435,
1216,
4015,
503,
288,
565,
389,
15735,
8367,
5621,
565,
309,
261,
67,
87,
22942,
13233,
18,
1467,
1435,
1648,
374,
13,
288,
1377,
604,
394,
5477,
... |
RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", other); return RubyBoolean.newBoolean(ruby, fn.getValue() < 0); | return RubyNumeric.fix2int(recv.funcall("<=>", other)) < 0 ? ruby.getTrue() : ruby.getFalse(); | public static RubyBoolean op_lt(Ruby ruby, RubyObject recv, RubyObject other) { RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", other); return RubyBoolean.newBoolean(ruby, fn.getValue() < 0); } | 48072 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48072/786cea08c1dd2092a02d1254b49fbee371ace5f9/RubyComparable.java/buggy/org/jruby/RubyComparable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
5507,
1061,
67,
5618,
12,
54,
10340,
22155,
16,
19817,
921,
10665,
16,
19817,
921,
1308,
13,
288,
3639,
19817,
8585,
2107,
2295,
273,
261,
54,
10340,
8585,
2107,
13,
106... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
5507,
1061,
67,
5618,
12,
54,
10340,
22155,
16,
19817,
921,
10665,
16,
19817,
921,
1308,
13,
288,
3639,
19817,
8585,
2107,
2295,
273,
261,
54,
10340,
8585,
2107,
13,
106... |
in.seek(in.getFilePointer() + size); | in.skipBytes(size); | protected void initFile(String id) throws FormatException, IOException { super.initFile(id); in = new RandomAccessFile(id, "r"); offsets = new Vector(); byte[] list = new byte[4]; String listString; type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); if (type.equals("RIFF")) { bigChunkSize = size; if (!fcc.equals("AVI ")) { whine("Sorry, AVI RIFF format not found."); } } else { whine("Not an AVI file"); } while (in.read(list) == 4) { in.seek(in.getFilePointer() - 4); listString = new String(list); if (listString.equals("JUNK")) { type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("JUNK")) { in.seek(in.getFilePointer() + size); } } else if (listString.equals("LIST")) { type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); in.seek(in.getFilePointer() - 12); if (fcc.equals("hdrl")) { type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); if (type.equals("LIST")) { if (fcc.equals("hdrl")) { type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("avih")) { pos = in.getFilePointer(); dwMicroSecPerFrame = DataTools.read4SignedBytes(in, little); dwMaxBytesPerSec = DataTools.read4SignedBytes(in, little); dwReserved1 = DataTools.read4SignedBytes(in, little); dwFlags = DataTools.read4SignedBytes(in, little); dwTotalFrames = DataTools.read4SignedBytes(in, little); dwInitialFrames = DataTools.read4SignedBytes(in, little); dwStreams = DataTools.read4SignedBytes(in, little); dwSuggestedBufferSize = DataTools.read4SignedBytes(in, little); dwWidth = DataTools.read4SignedBytes(in, little); dwHeight = DataTools.read4SignedBytes(in, little); dwScale = DataTools.read4SignedBytes(in, little); dwRate = DataTools.read4SignedBytes(in, little); dwStart = DataTools.read4SignedBytes(in, little); dwLength = DataTools.read4SignedBytes(in, little); metadata.put("Microseconds per frame", new Integer(dwMicroSecPerFrame)); metadata.put("Max. bytes per second", new Integer(dwMaxBytesPerSec)); metadata.put("Total frames", new Integer(dwTotalFrames)); metadata.put("Initial frames", new Integer(dwInitialFrames)); metadata.put("Frame width", new Integer(dwWidth)); metadata.put("Frame height", new Integer(dwHeight)); metadata.put("Scale factor", new Integer(dwScale)); metadata.put("Frame rate", new Integer(dwRate)); metadata.put("Start time", new Integer(dwStart)); metadata.put("Length", new Integer(dwLength)); in.seek(pos + size); } } } } else if (fcc.equals("strl")) { long startPos = in.getFilePointer(); long streamSize = size; type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); if (type.equals("LIST")) { if (fcc.equals("strl")) { type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("strh")) { pos = in.getFilePointer(); String fccStreamTypeOld = fccStreamType; fccStreamType = readStringBytes(); if (!fccStreamType.equals("vids")) { fccStreamType = fccStreamTypeOld; } fccStreamHandler = readStringBytes(); dwStreamFlags = DataTools.read4SignedBytes(in, little); dwStreamReserved1 = DataTools.read4SignedBytes(in, little); dwStreamInitialFrames = DataTools.read4SignedBytes(in, little); dwStreamScale = DataTools.read4SignedBytes(in, little); dwStreamRate = DataTools.read4SignedBytes(in, little); dwStreamStart = DataTools.read4SignedBytes(in, little); dwStreamLength = DataTools.read4SignedBytes(in, little); dwStreamSuggestedBufferSize = DataTools.read4SignedBytes(in, little); dwStreamQuality = DataTools.read4SignedBytes(in, little); dwStreamSampleSize = DataTools.read4SignedBytes(in, little); metadata.put("Stream quality", new Integer(dwStreamQuality)); metadata.put("Stream sample size", new Integer(dwStreamSampleSize)); in.seek(pos + size); } type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("strf")) { pos = in.getFilePointer(); bmpSize = DataTools.read4SignedBytes(in, little); bmpWidth = DataTools.read4SignedBytes(in, little); bmpHeight = DataTools.read4SignedBytes(in, little); bmpPlanes = DataTools.read2SignedBytes(in, little); bmpBitsPerPixel = DataTools.read2SignedBytes(in, little); bmpCompression = DataTools.read4SignedBytes(in, little); bmpSizeOfBitmap = DataTools.read4SignedBytes(in, little); bmpHorzResolution = DataTools.read4SignedBytes(in, little); bmpVertResolution = DataTools.read4SignedBytes(in, little); bmpColorsUsed = DataTools.read4SignedBytes(in, little); bmpColorsImportant = DataTools.read4SignedBytes(in, little); bmpTopDown = (bmpHeight < 0); bmpNoOfPixels = bmpWidth * bmpHeight; metadata.put("Bitmap compression value", new Integer(bmpCompression)); metadata.put("Horizontal resolution", new Integer(bmpHorzResolution)); metadata.put("Vertical resolution", new Integer(bmpVertResolution)); metadata.put("Number of colors used", new Integer(bmpColorsUsed)); metadata.put("Bits per pixel", new Integer(bmpBitsPerPixel)); // scan line is padded with zeros to be a multiple of 4 bytes int npad = bmpWidth % 4; if (npad > 0) npad = 4 - npad; bmpScanLineSize = (bmpWidth + npad) * (bmpBitsPerPixel / 8); if (bmpSizeOfBitmap != 0) { bmpActualSize = bmpSizeOfBitmap; } else { // a value of 0 doesn't mean 0 -- it means we have // to calculate it bmpActualSize = bmpScanLineSize * bmpHeight; } if (bmpColorsUsed != 0) { bmpActualColorsUsed = bmpColorsUsed; } else { // a value of 0 means we determine this based on the // bits per pixel if (bmpBitsPerPixel < 16) { bmpActualColorsUsed = 1 << bmpBitsPerPixel; } else { // no palette bmpActualColorsUsed = 0; } } if (bmpCompression != 0) { whine("Sorry, compressed AVI files not supported."); } if (!(bmpBitsPerPixel == 8 || bmpBitsPerPixel == 24 || bmpBitsPerPixel == 32)) { whine("Sorry, " + bmpBitsPerPixel + " bits per pixel not " + "supported"); } if (bmpActualColorsUsed != 0) { // read the palette long pos1 = in.getFilePointer(); pr = new byte[bmpColorsUsed]; pg = new byte[bmpColorsUsed]; pb = new byte[bmpColorsUsed]; for (int i=0; i<bmpColorsUsed; i++) { pb[i] = (byte) in.read(); pg[i] = (byte) in.read(); pr[i] = (byte) in.read(); in.read(); } } in.seek(pos + size); } } type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("strd")) { in.seek(in.getFilePointer() + size); } else { in.seek(in.getFilePointer() - 8); } type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("strn")) { in.seek(in.getFilePointer() + size); } else { in.seek(in.getFilePointer() - 8); } } in.seek(startPos + 8 + streamSize); } else if (fcc.equals("movi")) { type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); if (type.equals("LIST")) { if (fcc.equals("movi")) { type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); if (!(type.equals("LIST") && fcc.equals("rec "))) { in.seek(in.getFilePointer() - 12); } type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); long startPos = in.getFilePointer(); while (type.substring(2).equals("db") || type.substring(2).equals("dc") || type.substring(2).equals("wb")) { pos = in.getFilePointer(); if (type.substring(2).equals("db") || type.substring(2).equals("dc")) { offsets.add(new Long(in.getFilePointer())); in.skipBytes(bmpHeight * bmpScanLineSize); } type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("JUNK")) { in.seek(in.getFilePointer() + size); type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); } } in.seek(in.getFilePointer() - 8); } } } else { // skipping unknown block in.seek(in.getFilePointer() + 8 + size); } } else { // skipping unknown block type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); in.seek(in.getFilePointer() + size); } } numImages = offsets.size(); initOMEMetadata(); } | 11426 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11426/91859a26506b8a1d312b398da2c3ecd94e02fa60/AVIReader.java/buggy/loci/formats/AVIReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1208,
812,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
2240,
18,
2738,
812,
12,
350,
1769,
565,
316,
273,
394,
8072,
26933,
12,
350,
16,
315,
86,
8863,
565,
8738... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1208,
812,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
2240,
18,
2738,
812,
12,
350,
1769,
565,
316,
273,
394,
8072,
26933,
12,
350,
16,
315,
86,
8863,
565,
8738... |
sb.append("Sent messages: ").append(printSentMsgs()); | sb.append("\nSent messages: ").append(printSentMsgs()); | void handleXmitReq(Address xmit_requester, long first_seqno, long last_seqno, Address original_sender) { Message m, tmp; LinkedList list; long size=0, marker=first_seqno, len; NakReceiverWindow win=null; if(log.isTraceEnabled()) { StringBuffer sb=new StringBuffer(); sb.append(local_addr).append(": received xmit request from ").append(xmit_requester).append(" for "); sb.append(original_sender).append(" [").append(first_seqno).append(" - ").append(last_seqno).append("]"); log.trace(sb.toString()); } if(first_seqno > last_seqno) { if(log.isErrorEnabled()) log.error("first_seqno (" + first_seqno + ") > last_seqno (" + last_seqno + "): not able to retransmit"); return; } if(!local_addr.equals(original_sender)) { // retransmit from received messages table win=(NakReceiverWindow)received_msgs.get(original_sender); } else { // retransmit from sent messages table } list=new LinkedList(); for(long i=first_seqno; i <= last_seqno; i++) { if(win != null) m=win.get(i); else m=(Message)sent_msgs.get(new Long(i)); // no need to synchronize if(m == null) { if(log.isErrorEnabled()) { StringBuffer sb=new StringBuffer(); sb.append("(requester=").append(xmit_requester).append(", local_addr=").append(this.local_addr); sb.append(") message ").append(original_sender).append("::").append(i); sb.append(" not found in ").append((win == null? "sent" : "received")).append(" msgs. "); if(win != null) { sb.append("Received messages: ").append(win.toString()); } else { sb.append("Sent messages: ").append(printSentMsgs()); } log.error(sb.toString()); } continue; } len=m.size(); size+=len; if(size > max_xmit_size && list.size() > 0) { // changed from >= to > (yaron-r, bug #943709) // yaronr: added &&listSize()>0 since protocols between FRAG and NAKACK add headers, and message exceeds size. // size has reached max_xmit_size. go ahead and send message (excluding the current message) if(log.isTraceEnabled()) log.trace("xmitting msgs [" + marker + '-' + (i - 1) + "] to " + xmit_requester); sendXmitRsp(xmit_requester, (LinkedList)list.clone(), marker, i - 1); marker=i; list.clear(); // fixed Dec 15 2003 (bela, patch from Joel Dice (dicej)), see explanantion under // bug report #854887 size=len; } if(Global.copy) { tmp=m.copy(); } else { tmp=m; } tmp.setDest(xmit_requester); tmp.setSrc(local_addr); list.add(tmp); } if(list.size() > 0) { if(log.isTraceEnabled()) log.trace("xmitting msgs [" + marker + '-' + last_seqno + "] to " + xmit_requester); sendXmitRsp(xmit_requester, (LinkedList)list.clone(), marker, last_seqno); list.clear(); } } | 49475 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49475/b85e2de5b1f645881680c96fb57e604eb54bd500/NAKACK.java/clean/src/org/jgroups/protocols/pbcast/NAKACK.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1640,
60,
1938,
6113,
12,
1887,
619,
1938,
67,
26192,
16,
1525,
1122,
67,
5436,
2135,
16,
1525,
1142,
67,
5436,
2135,
16,
5267,
2282,
67,
15330,
13,
288,
3639,
2350,
312,
16,
1853,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1640,
60,
1938,
6113,
12,
1887,
619,
1938,
67,
26192,
16,
1525,
1122,
67,
5436,
2135,
16,
1525,
1142,
67,
5436,
2135,
16,
5267,
2282,
67,
15330,
13,
288,
3639,
2350,
312,
16,
1853,... |
public SoapMethod(String methodName, List params) throws ClassNotFoundException { this((QName)converter.convert(QName.class, methodName), params); | public SoapMethod(String methodName, String paramsString) throws ClassNotFoundException { this((QName)converter.convert(QName.class, methodName), paramsString); | public SoapMethod(String methodName, List params) throws ClassNotFoundException { this((QName)converter.convert(QName.class, methodName), params); } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/56dee329ad70d8b0a201c8a00152bdc5e308bab0/SoapMethod.java/buggy/providers/soap/src/java/org/mule/providers/soap/SoapMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
21789,
1305,
12,
780,
4918,
16,
987,
859,
13,
1216,
10403,
565,
288,
540,
333,
12443,
13688,
13,
15747,
18,
6283,
12,
13688,
18,
1106,
16,
4918,
3631,
859,
1769,
565,
289,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
21789,
1305,
12,
780,
4918,
16,
987,
859,
13,
1216,
10403,
565,
288,
540,
333,
12443,
13688,
13,
15747,
18,
6283,
12,
13688,
18,
1106,
16,
4918,
3631,
859,
1769,
565,
289,
2,
-100... |
private void populateColumn(Column col, int columnType, String columnName, int dispSize, int bufLength, boolean nullable, boolean autoIncrement, boolean writable, boolean caseSensitive, String tableName, int precision, int scale) { | private static void populateColumn( final Column col, final int columnType, final String columnName, int dispSize, final int bufLength, final boolean nullable, final boolean autoIncrement, final boolean writable, final boolean caseSensitive, String tableName, int precision, final int scale) { | private void populateColumn(Column col, int columnType, String columnName, int dispSize, int bufLength, boolean nullable, boolean autoIncrement, boolean writable, boolean caseSensitive, String tableName, int precision, int scale) { if (columnName != null) { col.setName(columnName); col.setLabel(columnName); } col.setType(columnType); col.setBufferSize(bufLength); col.setNullable(nullable ? ResultSetMetaData.columnNullable : ResultSetMetaData.columnNoNulls); col.setAutoIncrement(autoIncrement); col.setReadOnly(!writable); col.setCaseSensitive(caseSensitive); // Set table name (and catalog and schema, if available) if (tableName != null) { int pos = tableName.lastIndexOf('.'); col.setTableName(tableName.substring(pos + 1)); pos = pos == -1 ? 0 : pos; tableName = tableName.substring(0, pos); if (pos > 0) { pos = tableName.lastIndexOf('.'); col.setSchema(tableName.substring(pos + 1)); pos = pos == -1 ? 0 : pos; tableName = tableName.substring(0, pos); } if (pos > 0) { col.setCatalog(tableName); } } // Set scale switch (columnType) { case SYBMONEY: case SYBMONEYN: case SYBMONEY4: case SYBSMALLMONEY: col.setScale(4); break; case SYBDATETIME: col.setScale(3); break; case SYBDATETIMN: if (bufLength == 8) col.setScale(3); else col.setScale(0); break; default: col.setScale(scale < 0 ? 0 : scale); } // Set precision and display size switch (columnType) { case SYBBINARY: case SYBIMAGE: case SYBVARBINARY: dispSize = 2 * (precision = bufLength); break; case SYBCHAR: case SYBTEXT: case SYBVARCHAR: dispSize = precision = bufLength; break; case SYBNCHAR: case SYBNTEXT: case SYBNVARCHAR: dispSize = precision = bufLength >> 1; break; case SYBBIT: dispSize = precision = 1; break; case SYBUNIQUEID: dispSize = precision = 36; break; case SYBDATETIME: dispSize = precision = 23; break; case SYBDATETIME4: dispSize = 3 + (precision = 16); break; case SYBDATETIMN: if (bufLength == 8) dispSize = precision = 23; else dispSize = 3 + (precision = 16); break; case SYBDECIMAL: case SYBNUMERIC: dispSize = (bufLength == scale ? 3 : 2) + precision; break; case SYBFLT8: dispSize = 9 + (precision = 15); break; case SYBREAL: dispSize = 7 + (precision = 7); break; case SYBFLTN: if (bufLength == 8) dispSize = 9 + (precision = 15); else dispSize = 7 + (precision = 7); break; case SYBINT4: dispSize = 1 + (precision = 10); break; case SYBINT2: dispSize = 1 + (precision = 5); break; case SYBINT1: dispSize = 1 + (precision = 2); break; case SYBINTN: if (bufLength == 4) dispSize = 1 + (precision = 10); else if (bufLength == 2) dispSize = 1 + (precision = 5); else dispSize = 1 + (precision = 2); break; case SYBMONEY: dispSize = 2 + (precision = 19); break; case SYBMONEY4: case SYBSMALLMONEY: dispSize = 2 + (precision = 10); break; case SYBMONEYN: if (bufLength == 8) dispSize = 2 + (precision = 19); else dispSize = 2 + (precision = 10); break; } col.setDisplaySize(dispSize); col.setPrecision(precision); } | 439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/d40d3f03f21e7087ea2cd7d2b5b43625542770cc/Tds.java/buggy/trunk/jtds/src/main/net/sourceforge/jtds/jdbc/Tds.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
6490,
1494,
12,
1494,
645,
16,
509,
27280,
16,
514,
7578,
16,
27573,
509,
16232,
1225,
16,
509,
1681,
1782,
16,
1250,
8413,
16,
1250,
3656,
10798,
16,
27573,
1250,
9691,
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,
918,
6490,
1494,
12,
1494,
645,
16,
509,
27280,
16,
514,
7578,
16,
27573,
509,
16232,
1225,
16,
509,
1681,
1782,
16,
1250,
8413,
16,
1250,
3656,
10798,
16,
27573,
1250,
9691,
16,
... |
int l_elen = stream.ReceiveIntegerR(4); errorMessage.append(conn.getEncoding().decode(stream.Receive(l_elen-4))); | if (error != null) { error.setNextException(l_error); } else { error = l_error; } | private Object fastpathV3(int fnid, boolean resulttype, FastpathArg[] args) throws SQLException { // added Oct 7 1998 to give us thread safety synchronized (stream) { // send the function call try { int l_msgLen = 0; l_msgLen += 16; for (int i=0;i < args.length;i++) l_msgLen += args[i].sendSize(); stream.SendChar('F'); stream.SendInteger(l_msgLen,4); stream.SendInteger(fnid, 4); stream.SendInteger(1,2); stream.SendInteger(1,2); stream.SendInteger(args.length,2); for (int i = 0;i < args.length;i++) args[i].send(stream); stream.SendInteger(1,2); // This is needed, otherwise data can be lost stream.flush(); } catch (IOException ioe) { throw new PSQLException("postgresql.fp.send", new Integer(fnid), ioe); } // Now handle the result // Now loop, reading the results Object result = null; // our result StringBuffer errorMessage = null; int c; boolean l_endQuery = false; while (!l_endQuery) { c = stream.ReceiveChar(); switch (c) { case 'A': // Asynchronous Notify int pid = stream.ReceiveInteger(4); String msg = stream.ReceiveString(conn.getEncoding()); conn.addNotification(new org.postgresql.core.Notification(msg, pid)); break; //------------------------------ // Error message returned case 'E': if ( errorMessage == null ) errorMessage = new StringBuffer(); int l_elen = stream.ReceiveIntegerR(4); errorMessage.append(conn.getEncoding().decode(stream.Receive(l_elen-4))); break; //------------------------------ // Notice from backend case 'N': int l_nlen = stream.ReceiveIntegerR(4); conn.addWarning(conn.getEncoding().decode(stream.Receive(l_nlen-4))); break; case 'V': int l_msgLen = stream.ReceiveIntegerR(4); int l_valueLen = stream.ReceiveIntegerR(4); if (l_valueLen == -1) { //null value } else if (l_valueLen == 0) { result = new byte[0]; } else { // Return an Integer if if (resulttype) result = new Integer(stream.ReceiveIntegerR(l_valueLen)); else { byte buf[] = new byte[l_valueLen]; stream.Receive(buf, 0, l_valueLen); result = buf; } } break; case 'Z': //TODO: use size better if (stream.ReceiveIntegerR(4) != 5) throw new PSQLException("postgresql.con.setup"); //TODO: handle transaction status char l_tStatus = (char)stream.ReceiveChar(); l_endQuery = true; break; default: throw new PSQLException("postgresql.fp.protocol", new Character((char)c)); } } if ( errorMessage != null ) throw new PSQLException("postgresql.fp.error", errorMessage.toString()); return result; } } | 47293 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47293/0378a269f3ab3c44e67b14f96414b6ca95263263/Fastpath.java/clean/src/interfaces/jdbc/org/postgresql/fastpath/Fastpath.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1033,
14469,
58,
23,
12,
474,
2295,
350,
16,
1250,
563,
723,
16,
9545,
803,
4117,
8526,
833,
13,
1216,
6483,
202,
95,
202,
202,
759,
3096,
29482,
2371,
23673,
28,
358,
8492,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
14469,
58,
23,
12,
474,
2295,
350,
16,
1250,
563,
723,
16,
9545,
803,
4117,
8526,
833,
13,
1216,
6483,
202,
95,
202,
202,
759,
3096,
29482,
2371,
23673,
28,
358,
8492,
... |
if (log.isDebugEnabled()) log.debug("updateInterface: interface " + ifaddr.getHostAddress() + " is added to node: " + node.getNodeId() + " by reparenting from existing node: " + existingNodeId); dbIpIfEntry = DbIpInterfaceEntry.get(dbc, node.getNodeId(), ifaddr); | if (log.isDebugEnabled()) { log.debug("updateInterface: interface " + ifaddr.getHostAddress() + " is added to node: " + node.getNodeId() + " by reparenting from existing " + "node: " + existingNodeId); } dbIpIfEntry = DbIpInterfaceEntry.get(dbc, node.getNodeId(), ifaddr); | private void updateInterface(Connection dbc, Date now, DbNodeEntry node, InetAddress target, InetAddress ifaddr, List protocols, IfSnmpCollector snmpc, boolean doesSnmp) throws SQLException { /* * Reparenting * * This sub-interface was not previously associated with this node. If * the sub-interface is already associated with another node we must do * one of the following: * * 1. If the target interface (the one being rescanned) appears to be an * interface alias all of the interfaces under the sub-interface's node * will be reparented under the nodeid of the target interface. * * 2. If however the interface is not an alias, only the sub-interface * will be reparented under the nodeid of the interface being rescanned. * * In the reparenting process, the database ipinterface, snmpinterface * and ifservices table entries associated with the reparented interface * will be "updated" to reflect the new nodeid. If the old node has * no remaining interfaces following the reparenting it will be marked * as deleted. */ /* * Special case: Need to skip interface reparenting for '0.0.0.0' * interfaces as well as loopback interfaces ('127.*.*.*'). */ Category log = ThreadCategory.getInstance(getClass()); if (log.isDebugEnabled()) { log.debug("updateInterface: updating interface " + ifaddr.getHostAddress() + "(targetIf=" + target.getHostAddress() + ")"); if (doesSnmp) { log.debug("updateInterface: the snmp collection passed in is collected via" + snmpc.getCollectorTargetAddress().getHostAddress()); } } boolean reparentFlag = false; boolean newIpIfEntry = false; int ifIndex = -1; DbIpInterfaceEntry dbIpIfEntry = DbIpInterfaceEntry.get(dbc, node.getNodeId(), ifaddr); if (doesSnmp && snmpc.hasIpAddrTable()) { // Attempt to load IP Interface entry from the database ifIndex = snmpc.getIfIndex(ifaddr); if (log.isDebugEnabled()) log.debug("updateInterface: interface = " + ifaddr.getHostAddress() + " ifIndex = " + ifIndex + ". Checking for this address on other nodes."); /* * the updating interface may have already existed in the * ipinterface table with different * nodeIds. If it exist in a different node, verify if all the * interfaces on that node * are contained in the snmpc of the updating interface. If they * are, reparent all * the interfaces on that node to the node of the updating * interface, otherwise, just add * the interface to the updating node. */ // Verify that SNMP collection contains ipAddrTable entries IpAddrTable ipAddrTable = null; ipAddrTable = snmpc.getIpAddrTable(); if (ipAddrTable == null) { log.error("updateInterface: null ipAddrTable in the snmp collection"); } else { if (ifaddr.getHostAddress().equals("0.0.0.0") || ifaddr.getHostAddress().startsWith("127.")) { if (log.isDebugEnabled()) { log.debug("updateInterface: Skipping address from snmpc ipAddrTable " + ifaddr.getHostAddress()); } } else { if (log.isDebugEnabled()) { log.debug("updateInterface: Checking address from snmpc ipAddrTable " + ifaddr.getHostAddress()); } PreparedStatement stmt = null; try { stmt = dbc.prepareStatement(SQL_DB_RETRIEVE_OTHER_NODES); stmt.setString(1, ifaddr.getHostAddress()); stmt.setInt(2, node.getNodeId()); ResultSet rs = stmt.executeQuery(); while (rs.next()) { int existingNodeId = rs.getInt(1); if (log.isDebugEnabled()) { log.debug("updateInterface: ckecking for " + ifaddr.getHostAddress() + " on existing nodeid " + existingNodeId); } DbNodeEntry suspectNodeEntry = DbNodeEntry.get(dbc, existingNodeId); if (suspectNodeEntry == null) { // This can happen if a node has been deleted. continue; } // Retrieve list of interfaces associated with the old // node DbIpInterfaceEntry[] tmpIfArray = suspectNodeEntry.getInterfaces(dbc); // Verify if the suspectNodeEntry is a duplicate node if (areDbInterfacesInSnmpCollection(tmpIfArray, snmpc)) { // Reparent each interface under the targets' nodeid for (int i = 0; i < tmpIfArray.length; i++) { InetAddress addr = tmpIfArray[i].getIfAddress(); int index = snmpc.getIfIndex(addr); // Skip non-IP or loopback interfaces if (addr.getHostAddress().equals("0.0.0.0") || addr.getHostAddress().startsWith("127.")) { continue; } if (log.isDebugEnabled()) log.debug("updateInterface: reparenting interface " + addr.getHostAddress() + " under node: " + node.getNodeId() + " from existing node: " + existingNodeId); reparentInterface(dbc, addr, index, node.getNodeId(), existingNodeId); // Create interfaceReparented event createInterfaceReparentedEvent(node, existingNodeId, addr); } if (log.isDebugEnabled()) log.debug("updateInterface: interface " + ifaddr.getHostAddress() + " is added to node: " + node.getNodeId() + " by reparenting from existing node: " + existingNodeId); dbIpIfEntry = DbIpInterfaceEntry.get(dbc, node.getNodeId(), ifaddr); reparentFlag = true; // delete duplicate node after reparenting. deleteDuplicateNode(dbc, suspectNodeEntry); createDuplicateNodeDeletedEvent(suspectNodeEntry); } } } catch (SQLException sqlE) { log.error("SQLException while updating interface: " + ifaddr.getHostAddress() + " on nodeid: " + node.getNodeId()); throw sqlE; } finally { try { stmt.close(); } catch (SQLException e) { } } } } } /* * if no reparenting occured on the updating interface, add it to the * updating node. */ if (dbIpIfEntry == null) { /* * Interface not found with this nodeId so create new interface * entry */ if (log.isDebugEnabled()) { log.debug("updateInterface: interface " + ifaddr + " ifIndex " + ifIndex + " not in database under nodeid " + node.getNodeId() + ", creating new interface object."); } if (ifIndex == -1 && !doesSnmp) { dbIpIfEntry = DbIpInterfaceEntry.create(node.getNodeId(), ifaddr); } else { dbIpIfEntry = DbIpInterfaceEntry.create(node.getNodeId(), ifaddr, ifIndex); // This wasn't getting done for some reason, so do it explicitly dbIpIfEntry.setIfIndex(ifIndex); } if (isDuplicateInterface(dbc, ifaddr, node.getNodeId())) { createDuplicateIpAddressEvent(dbIpIfEntry); } newIpIfEntry = true; } // update ipinterface for the updating interface updateInterfaceInfo(dbc, now, node, dbIpIfEntry, snmpc, newIpIfEntry, reparentFlag, doesSnmp); if (doesSnmp) { // update SNMP info if available updateSnmpInfo(dbc, node, dbIpIfEntry, snmpc); } // update IfServices for the updating interface updateServiceInfo(dbc, node, dbIpIfEntry, newIpIfEntry, protocols); } | 11849 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11849/8a6576d66e6ad3849723ebfbdc7af8419591da4a/RescanProcessor.java/clean/opennms-services/src/main/java/org/opennms/netmgt/capsd/RescanProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
1358,
12,
1952,
9881,
16,
2167,
2037,
16,
8408,
907,
1622,
756,
16,
14218,
1018,
16,
14218,
309,
4793,
16,
987,
16534,
16,
971,
10461,
1291,
7134,
15366,
71,
16,
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,
377,
3238,
918,
1089,
1358,
12,
1952,
9881,
16,
2167,
2037,
16,
8408,
907,
1622,
756,
16,
14218,
1018,
16,
14218,
309,
4793,
16,
987,
16534,
16,
971,
10461,
1291,
7134,
15366,
71,
16,
1250,
... |
else { max = rng.randomDoubleBetween(0, 10.0); for (int k = 0; k<6; k++){ randomSuggestions[i][k] = max - 0.5 + rng.randomDoubleBetween(0, 2.0); } if (i % 2 == 0){ if (randomSuggestions[i][3]> randomSuggestions[i][1]) randomSuggestions[i][3] = rng.randomDoubleBetween(MesquiteDouble.maximum(randomSuggestions[i][1]-1.0, 0), randomSuggestions[i][1] ); if (randomSuggestions[i][4]> randomSuggestions[i][2]) randomSuggestions[i][4] = rng.randomDoubleBetween(MesquiteDouble.maximum(randomSuggestions[2][1]-1.0, 0), randomSuggestions[2][1] ); } } } for (int i = 0; i< useIterations; i++){ if (evaluate(randomSuggestions[i], bundle) < 1e99){ logln("Sp/Ext Categ Char: random suggestions " + i + " :" + DoubleArray.toString(randomSuggestions[i])); double nLL = opt.optimize(randomSuggestions[i], bundle); stepCount = 1000; nLL = evaluate(randomSuggestions[i], bundle); stepCount = 100; logln("Sp/Ext Categ Char: random attempt " + i + " neg. Log Likelihood:" + nLL + " : " + DoubleArray.toString(randomSuggestions[i])); if (nLL < bestL){ bestS = i; bestL = nLL; attemptName = "random attempt " + i ; } } else logln("Sp/Ext Categ Char: random attempt " + i + " failed because starting position had undefined likleihood"); } if (bestS>=0) suggestions = randomSuggestions[bestS]; if (suggestions == null){ logln("Sp/Ext Categ Char: Estimating parameters failed"); } else { logln("Sp/Ext Categ Char: Estimating parameters, phase 2: step count 100; best so far " + evaluate(suggestions, bundle)); stepCount = 1000; logln("Sp/Ext Categ Char: Estimating parameters, phase 2: step count 1000; best so far " + evaluate(suggestions, bundle)); logln("Sp/Ext Categ Char: Estimating parameters, phase 2: step count 1000 starting from results of preliminary " + attemptName); negLogLikelihood = opt.optimize(suggestions, bundle); logln("Sp/Ext Categ Char: neg. Log Likelihood final attempt:" + negLogLikelihood); speciesModel.setParamValuesUsingConstraints(suggestions); modelString = speciesModel.toString() + " [est.]"; } } else if (speciesModel.numberEffectiveParameters() > 1) { Optimizer opt = new Optimizer(this); Object[] bundle = new Object[] {tree, observedStates, speciesModel}; stepCount = 100; int numParams = speciesModel.numberEffectiveParameters(); double[] suggestions1 = new double[numParams]; logln("Sp/Ext Categ Char: Tree " + tree.getName() + " and character " + obsStates.getName()); logln("Sp/Ext Categ Char: Estimating " + numParams + " free parameters"); for (int i=0; i < suggestions1.length; i++) suggestions1[i] = 0.1*(i+1); logln("Sp/Ext Categ Char: Estimating parameters, phase 1: step count 100"); double bestL = MesquiteDouble.unassigned; int bestS = -1; String attemptName = "random attempt"; double[][] randomSuggestions = new double[iterations][numParams]; for (int i = 0; i< iterations; i++){ double max = 1.0; if (i< iterations/2){ max = 1.0; for (int k = 0; k<numParams; k++){ randomSuggestions[i][k] = rng.randomDoubleBetween(0, max); } } else { for (int k = 0; k<numParams; k++){ max = rng.randomDoubleBetween(0, 10.0); } } } for (int i = 0; i< iterations; i++){ if (evaluate(randomSuggestions[i], bundle) < 1e99){ logln("Sp/Ext Categ Char: random suggestions " + i + " :" + DoubleArray.toString(randomSuggestions[i])); double nLL = opt.optimize(randomSuggestions[i], bundle); stepCount = 1000; nLL = evaluate(randomSuggestions[i], bundle); stepCount = 100; logln("Sp/Ext Categ Char: attempt " + i + " neg. Log Likelihood:" + nLL + " : " + DoubleArray.toString(randomSuggestions[i])); if (nLL < bestL || MesquiteDouble.isUnassigned(bestL)){ bestS = i; bestL = nLL; attemptName = "random attempt " + i ; } } else logln("Sp/Ext Categ Char: random attempt " + i + " failed because starting position had undefined likleihood"); } if (bestS>=0){ double[] suggestions = randomSuggestions[bestS]; logln("Sp/Ext Categ Char: Estimating parameters, phase 2: step count 100; best so far " + evaluate(suggestions, bundle)); stepCount = 1000; logln("Sp/Ext Categ Char: Estimating parameters, phase 2: step count 1000; best so far " + evaluate(suggestions, bundle)); logln("Sp/Ext Categ Char: Estimating parameters, phase 2: step count 1000 starting from results of preliminary " + attemptName); negLogLikelihood = opt.optimize(suggestions, bundle); logln("Sp/Ext Categ Char: neg. Log Likelihood final attempt:" + negLogLikelihood); speciesModel.setParamValuesUsingConstraints(suggestions); modelString = speciesModel.toString() + " [est.]"; } else logln("Sp/Ext Categ Char: Estimating parameters failed"); } else { Optimizer opt = new Optimizer(this); Object[] bundle = new Object[] {tree, observedStates, speciesModel}; stepCount = 100; logln("Sp/Ext Categ Char: Tree " + tree.getName() + " and character " + obsStates.getName()); logln("Sp/Ext Categ Char: Estimating one free parameter"); logln("Sp/Ext Categ Char: Estimating parameter, phase 1: step count 100"); MesquiteDouble suggestion = new MesquiteDouble(1); negLogLikelihood = opt.optimize(suggestion, 0, 100, bundle); logln("Sp/Ext Categ Char: neg. Log Likelihood first attempt:" + negLogLikelihood); double bestL = negLogLikelihood; double bestP = suggestion.getValue(); negLogLikelihood = opt.optimize(suggestion, 0.0, 10, bundle); logln("Sp/Ext Categ Char: neg. Log Likelihood second attempt:" + negLogLikelihood); if (bestL < negLogLikelihood) suggestion.setValue(bestP); else{ bestP = suggestion.getValue(); bestL = negLogLikelihood; } negLogLikelihood = opt.optimize(suggestion, 0.0, 1, bundle); logln("Sp/Ext Categ Char: neg. Log Likelihood third attempt:" + negLogLikelihood); if (bestL < negLogLikelihood) suggestion.setValue(bestP); else{ bestP = suggestion.getValue(); bestL = negLogLikelihood; } stepCount = 1000; logln("Sp/Ext Categ Char: Estimating parameters, phase 2: step count 1000"); negLogLikelihood = opt.optimize(suggestion, suggestion.getValue() * 0.6, suggestion.getValue() * 1.4, bundle); logln("Sp/Ext Categ Char: neg. Log Likelihood final attempt:" + negLogLikelihood); oneParam[0] = suggestion.getValue(); speciesModel.setParamValuesUsingConstraints(oneParam); modelString = speciesModel.toString() + " [est.]"; | public void calculateLogProbability(Tree tree, CharacterDistribution obsStates, MesquiteParameter[] params, MesquiteNumber prob, MesquiteString resultString, CommandRecord commandRec) { if (speciesModel==null || obsStates==null || prob == null) return; lastTree = tree; lastCharDistribution = obsStates; prob.setToUnassigned(); if (suspended) return; CategoricalDistribution observedStates = (CategoricalDistribution)obsStates; int workingMaxState; if (observedStates.getMaxState() <= 0){ MesquiteMessage.warnProgrammer("Character Distribution appears to be constant; cannot calculated likelihood of tree and character"); return; } else workingMaxState = observedStates.getMaxState()+1; lastMaxState = workingMaxState; speciesModel.getParams(previousParams); speciesModel.setParams(params); double currentStep = stepCount; double negLogLikelihood = 0; String modelString = ""; if (speciesModel.isFullySpecified()){ negLogLikelihood = logLike(tree, observedStates, speciesModel); modelString = speciesModel.toString(); } //========================== all 6 parameters unspecified ============================== else if (speciesModel.numberSpecified() ==0 && speciesModel.numberEffectiveParameters() == 6){ //all unspecified //some or all parameters are unassigned, and thus need to be estimated //First, we need to go through the parameters array to construct a mapping between our local free parameters and the original Optimizer opt = new Optimizer(this); Object[] bundle = new Object[] {tree, observedStates, speciesModel}; stepCount = 100; double useIterations = iterations; double[] suggestions1 = new double[]{1, 0.5, 0.5, 0.2, 0.1, 0.05}; double[] suggestions2 = new double[]{0.5, 1, 0.2, 0.5, 0.05, 0.1}; double bestL = 1e101; double[] suggestions = null; int bestS = -1; String attemptName = ""; if (evaluate(suggestions1, bundle) < 1e99 && evaluate(suggestions2, bundle) < 1e99){ logln("Sp/Ext Categ Char: Tree " + tree.getName() + " and character " + obsStates.getName()); logln("Sp/Ext Categ Char: Estimating all 6 parameters, phase 1: step count 100"); double negLogLikelihood1 = opt.optimize(suggestions1, bundle); logln("Sp/Ext Categ Char: neg. Log Likelihood first attempt:" + negLogLikelihood1); double negLogLikelihood2 = opt.optimize(suggestions2, bundle); logln("Sp/Ext Categ Char: neg. Log Likelihood second attempt:" + negLogLikelihood2); if (negLogLikelihood1 < negLogLikelihood2) { suggestions = suggestions1; bestS = -1; bestL = negLogLikelihood1; attemptName = " first attempt" ; } else { suggestions = suggestions2; bestS = -2; bestL = negLogLikelihood2; attemptName = " second attempt" ; } } else useIterations = iterations + 2; double[][] randomSuggestions = new double[iterations][6]; for (int i = 0; i< useIterations; i++){ double max = 1.0; if (i< useIterations/2){ max = 1.0; for (int k = 0; k<6; k++){ randomSuggestions[i][k] = rng.randomDoubleBetween(0, max); } if (i % 2 == 0){ //every other one enforce e < s randomSuggestions[i][3] = rng.randomDoubleBetween(0, randomSuggestions[i][1] ); randomSuggestions[i][4] = rng.randomDoubleBetween(0, randomSuggestions[i][2] ); } } else { //0 to 1 first then 0 to 10.0 max = rng.randomDoubleBetween(0, 10.0); for (int k = 0; k<6; k++){ randomSuggestions[i][k] = max - 0.5 + rng.randomDoubleBetween(0, 2.0); } if (i % 2 == 0){ //every other one enforce e < s if (randomSuggestions[i][3]> randomSuggestions[i][1]) randomSuggestions[i][3] = rng.randomDoubleBetween(MesquiteDouble.maximum(randomSuggestions[i][1]-1.0, 0), randomSuggestions[i][1] ); if (randomSuggestions[i][4]> randomSuggestions[i][2]) randomSuggestions[i][4] = rng.randomDoubleBetween(MesquiteDouble.maximum(randomSuggestions[2][1]-1.0, 0), randomSuggestions[2][1] ); } } } for (int i = 0; i< useIterations; i++){ // 0 to 10 if (evaluate(randomSuggestions[i], bundle) < 1e99){ //don't start if it hits surface in NaN-land logln("Sp/Ext Categ Char: random suggestions " + i + " :" + DoubleArray.toString(randomSuggestions[i])); double nLL = opt.optimize(randomSuggestions[i], bundle); stepCount = 1000; nLL = evaluate(randomSuggestions[i], bundle); stepCount = 100; logln("Sp/Ext Categ Char: random attempt " + i + " neg. Log Likelihood:" + nLL + " : " + DoubleArray.toString(randomSuggestions[i])); if (nLL < bestL){ bestS = i; bestL = nLL; attemptName = "random attempt " + i ; } } else logln("Sp/Ext Categ Char: random attempt " + i + " failed because starting position had undefined likleihood"); } if (bestS>=0) suggestions = randomSuggestions[bestS]; if (suggestions == null){ logln("Sp/Ext Categ Char: Estimating parameters failed"); } else { logln("Sp/Ext Categ Char: Estimating parameters, phase 2: step count 100; best so far " + evaluate(suggestions, bundle)); stepCount = 1000; logln("Sp/Ext Categ Char: Estimating parameters, phase 2: step count 1000; best so far " + evaluate(suggestions, bundle)); logln("Sp/Ext Categ Char: Estimating parameters, phase 2: step count 1000 starting from results of preliminary " + attemptName); negLogLikelihood = opt.optimize(suggestions, bundle); logln("Sp/Ext Categ Char: neg. Log Likelihood final attempt:" + negLogLikelihood); speciesModel.setParamValuesUsingConstraints(suggestions); modelString = speciesModel.toString() + " [est.]"; } } //========================== 2 - 5 parameters unspecified ============================== else if (speciesModel.numberEffectiveParameters() > 1) { //2 to 5 parameters unassigned; should have separate for 1! //some parameters are unassigned, and thus need to be estimated //First, we need to go through the parameters array to construct a mapping between our local free parameters and the original Optimizer opt = new Optimizer(this); Object[] bundle = new Object[] {tree, observedStates, speciesModel}; stepCount = 100; int numParams = speciesModel.numberEffectiveParameters(); double[] suggestions1 = new double[numParams]; logln("Sp/Ext Categ Char: Tree " + tree.getName() + " and character " + obsStates.getName()); logln("Sp/Ext Categ Char: Estimating " + numParams + " free parameters"); for (int i=0; i < suggestions1.length; i++) suggestions1[i] = 0.1*(i+1); logln("Sp/Ext Categ Char: Estimating parameters, phase 1: step count 100"); double bestL = MesquiteDouble.unassigned; int bestS = -1; String attemptName = "random attempt"; double[][] randomSuggestions = new double[iterations][numParams]; for (int i = 0; i< iterations; i++){ double max = 1.0; if (i< iterations/2){ max = 1.0; for (int k = 0; k<numParams; k++){ randomSuggestions[i][k] = rng.randomDoubleBetween(0, max); } } else { //0 to 1 first then 0 to 10.0 for (int k = 0; k<numParams; k++){ max = rng.randomDoubleBetween(0, 10.0); //randomSuggestions[i][k] = max - 0.5 + rng.randomDoubleBetween(0, 2.0); } } } for (int i = 0; i< iterations; i++){ // 0 to 10 if (evaluate(randomSuggestions[i], bundle) < 1e99){ //don't start if it hits surface in NaN-land logln("Sp/Ext Categ Char: random suggestions " + i + " :" + DoubleArray.toString(randomSuggestions[i])); double nLL = opt.optimize(randomSuggestions[i], bundle); stepCount = 1000; nLL = evaluate(randomSuggestions[i], bundle); stepCount = 100; logln("Sp/Ext Categ Char: attempt " + i + " neg. Log Likelihood:" + nLL + " : " + DoubleArray.toString(randomSuggestions[i])); if (nLL < bestL || MesquiteDouble.isUnassigned(bestL)){ bestS = i; bestL = nLL; attemptName = "random attempt " + i ; } } else logln("Sp/Ext Categ Char: random attempt " + i + " failed because starting position had undefined likleihood"); } if (bestS>=0){ double[] suggestions = randomSuggestions[bestS]; logln("Sp/Ext Categ Char: Estimating parameters, phase 2: step count 100; best so far " + evaluate(suggestions, bundle)); stepCount = 1000; logln("Sp/Ext Categ Char: Estimating parameters, phase 2: step count 1000; best so far " + evaluate(suggestions, bundle)); logln("Sp/Ext Categ Char: Estimating parameters, phase 2: step count 1000 starting from results of preliminary " + attemptName); negLogLikelihood = opt.optimize(suggestions, bundle); logln("Sp/Ext Categ Char: neg. Log Likelihood final attempt:" + negLogLikelihood); speciesModel.setParamValuesUsingConstraints(suggestions); modelString = speciesModel.toString() + " [est.]"; } else logln("Sp/Ext Categ Char: Estimating parameters failed"); } //========================== 1 parameter unspecified ============================== else { //1 parametersunassigned; Optimizer opt = new Optimizer(this); Object[] bundle = new Object[] {tree, observedStates, speciesModel}; stepCount = 100; logln("Sp/Ext Categ Char: Tree " + tree.getName() + " and character " + obsStates.getName()); logln("Sp/Ext Categ Char: Estimating one free parameter"); logln("Sp/Ext Categ Char: Estimating parameter, phase 1: step count 100"); MesquiteDouble suggestion = new MesquiteDouble(1); negLogLikelihood = opt.optimize(suggestion, 0, 100, bundle); logln("Sp/Ext Categ Char: neg. Log Likelihood first attempt:" + negLogLikelihood); double bestL = negLogLikelihood; double bestP = suggestion.getValue(); negLogLikelihood = opt.optimize(suggestion, 0.0, 10, bundle); logln("Sp/Ext Categ Char: neg. Log Likelihood second attempt:" + negLogLikelihood); if (bestL < negLogLikelihood) suggestion.setValue(bestP); else{ bestP = suggestion.getValue(); bestL = negLogLikelihood; } negLogLikelihood = opt.optimize(suggestion, 0.0, 1, bundle); logln("Sp/Ext Categ Char: neg. Log Likelihood third attempt:" + negLogLikelihood); if (bestL < negLogLikelihood) suggestion.setValue(bestP); else{ bestP = suggestion.getValue(); bestL = negLogLikelihood; } stepCount = 1000; logln("Sp/Ext Categ Char: Estimating parameters, phase 2: step count 1000"); negLogLikelihood = opt.optimize(suggestion, suggestion.getValue() * 0.6, suggestion.getValue() * 1.4, bundle); logln("Sp/Ext Categ Char: neg. Log Likelihood final attempt:" + negLogLikelihood); oneParam[0] = suggestion.getValue(); speciesModel.setParamValuesUsingConstraints(oneParam); modelString = speciesModel.toString() + " [est.]"; } stepCount = currentStep; if (prob!=null) prob.setValue(negLogLikelihood); double likelihood = Math.exp(-negLogLikelihood); if (MesquiteDouble.isUnassigned(negLogLikelihood)) likelihood = MesquiteDouble.unassigned; if (resultString!=null) { String s = "Sp/Ext Likelihood (Char. dep.) " + modelString + "; -log L.:"+ MesquiteDouble.toString(negLogLikelihood) + " [L. "+ MesquiteDouble.toString(likelihood) + "]"; s += " " + getParameters(); resultString.setValue(s); } lastResultString = tree.getName() + "\t" + obsStates.getName() +"\t" + speciesModel.toStringForAnalysis() + "\t" + MesquiteDouble.toString(negLogLikelihood); speciesModel.setParams(previousParams); } | 57538 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57538/6b7bf0f115d0e1b3cf52bf3c91c2954d57e1f8d9/SpExtCategCharMLCalculator.java/buggy/trunk/Mesquite Project/Source/mesquite/diverse/SpExtCategCharMLCalculator/SpExtCategCharMLCalculator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4604,
1343,
25598,
12,
2471,
2151,
16,
6577,
9003,
7160,
7629,
16,
490,
281,
372,
1137,
1662,
8526,
859,
16,
490,
281,
372,
1137,
1854,
3137,
16,
490,
281,
372,
1137,
780... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4604,
1343,
25598,
12,
2471,
2151,
16,
6577,
9003,
7160,
7629,
16,
490,
281,
372,
1137,
1662,
8526,
859,
16,
490,
281,
372,
1137,
1854,
3137,
16,
490,
281,
372,
1137,
780... | |
(short) (2147483647 - samples[channelNum][ndx]); | (short) (Integer.MAX_VALUE - samples[channelNum][ndx]); | public static void planarUnpack(short[][] samples, int startIndex, byte[] bytes, int[] bitsPerSample, int photoInterp, boolean littleEndian, int strip, int numStrips) throws FormatException { int numChannels = bitsPerSample.length; // this should always be 3 // determine which channel the strip belongs to int channelNum = strip % numChannels; if (channelNum > 0) { startIndex = (strip % numChannels) * (strip / numChannels) * bytes.length / numChannels; } int index = 0; int counter = 0; for (int j=0; j<bytes.length; j++) { int numBytes = bitsPerSample[0] / 8; if (bitsPerSample[0] % 8 != 0) { // bits per sample is not a multiple of 8 // // while images in this category are not in violation of baseline TIFF // specs, it's a bad idea to write bits per sample values that aren't // divisible by 8 // -- MELISSA TODO -- improve this as time permits if (index == bytes.length) { //throw new FormatException("bad index : i = " + i + ", j = " + j); index--; } short b = bytes[index]; index++; int offset = (bitsPerSample[0] * (samples.length*j + channelNum)) % 8; if (offset <= (8 - (bitsPerSample[0] % 8))) { index--; } if (channelNum == 0) counter++; if (counter % 4 == 0 && channelNum == 0) { index++; } int ndx = startIndex + j; if (ndx >= samples[channelNum].length) { ndx = samples[channelNum].length - 1; } samples[channelNum][ndx] = (short) (b < 0 ? 256 + b : b); if (photoInterp == WHITE_IS_ZERO || photoInterp == CMYK) { samples[channelNum][ndx] = (short) (2147483647 - samples[channelNum][ndx]); } } else if (numBytes == 1) { float b = bytes[index]; index++; int ndx = startIndex + j; samples[channelNum][ndx] = (short) (b < 0 ? 256 + b : b); if (photoInterp == WHITE_IS_ZERO) { // invert color value samples[channelNum][ndx] = (short) (2147483647 - samples[channelNum][ndx]); } else if (photoInterp == CMYK) { samples[channelNum][ndx] = (short) (2147483647 - samples[channelNum][ndx]); } } else { byte[] b = new byte[numBytes]; if (numBytes + index < bytes.length) { System.arraycopy(bytes, index, b, 0, numBytes); } else { System.arraycopy(bytes, bytes.length - numBytes, b, 0, numBytes); } index += numBytes; int ndx = startIndex + j; if (ndx >= samples[0].length) ndx = samples[0].length - 1; samples[channelNum][ndx] = (short) DataTools.bytesToLong(b, !littleEndian); if (photoInterp == WHITE_IS_ZERO) { // invert color value long max = 1; for (int q=0; q<numBytes; q++) max *= 8; samples[channelNum][ndx] = (short) (max - samples[channelNum][ndx]); } else if (photoInterp == CMYK) { samples[channelNum][ndx] = (short) (2147483647 - samples[channelNum][ndx]); } } } } | 49800 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49800/3dfd59718bd357815b599f69b2fb792dc8c85b62/TiffTools.java/buggy/loci/formats/TiffTools.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
4995,
297,
23649,
12,
6620,
63,
6362,
65,
5216,
16,
509,
10588,
16,
565,
1160,
8526,
1731,
16,
509,
8526,
4125,
2173,
8504,
16,
509,
10701,
2465,
84,
16,
1250,
328,
1060... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4995,
297,
23649,
12,
6620,
63,
6362,
65,
5216,
16,
509,
10588,
16,
565,
1160,
8526,
1731,
16,
509,
8526,
4125,
2173,
8504,
16,
509,
10701,
2465,
84,
16,
1250,
328,
1060... |
runTests(new TestDescriptor[]{ new TestDescriptor(TEST1, "calling public method from constructor", 1, rule), new TestDescriptor(TEST2, "calling protected method from constructor", 1, rule), new TestDescriptor(TEST3, "calling package private method from constructor", 1, rule), new TestDescriptor(TEST4, "calling private method, ok", 0, rule), new TestDescriptor(TEST5, "overloaded constructors, calling public method", 1, rule), new TestDescriptor(TEST6, "calling method on literal bug", 0, rule), new TestDescriptor(TEST7, "method in anonymous inner class is ok", 0, rule), new TestDescriptor(TEST8, "bug report 975407", 0, rule), new TestDescriptor(TEST9, "ignore abstract methods", 0, rule), }); } | runTests(rule); } | public void testAll() { runTests(new TestDescriptor[]{ new TestDescriptor(TEST1, "calling public method from constructor", 1, rule), new TestDescriptor(TEST2, "calling protected method from constructor", 1, rule), new TestDescriptor(TEST3, "calling package private method from constructor", 1, rule), new TestDescriptor(TEST4, "calling private method, ok", 0, rule), new TestDescriptor(TEST5, "overloaded constructors, calling public method", 1, rule), new TestDescriptor(TEST6, "calling method on literal bug", 0, rule), new TestDescriptor(TEST7, "method in anonymous inner class is ok", 0, rule), new TestDescriptor(TEST8, "bug report 975407", 0, rule), new TestDescriptor(TEST9, "ignore abstract methods", 0, rule), //FIXME new TestDescriptor(BUG_985989, "bug report 985989, ", 1, rule), }); } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/4e45de9075eeb015245ff09f8f8c58cf0f98bbf3/ConstructorCallsOverridableMethodTest.java/buggy/pmd/regress/test/net/sourceforge/pmd/rules/ConstructorCallsOverridableMethodTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1595,
1435,
288,
3639,
1086,
14650,
12,
2704,
7766,
3187,
63,
7073,
5411,
394,
7766,
3187,
12,
16961,
21,
16,
315,
31623,
1071,
707,
628,
3885,
3113,
404,
16,
1720,
3631,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1595,
1435,
288,
3639,
1086,
14650,
12,
2704,
7766,
3187,
63,
7073,
5411,
394,
7766,
3187,
12,
16961,
21,
16,
315,
31623,
1071,
707,
628,
3885,
3113,
404,
16,
1720,
3631,... |
parentModule.setConstant(name, newModule); | ((RubyModule)parentCRef.getValue()).setConstant(name, newModule); | public RubyModule defineModuleUnder(String name, RubyModule parentModule) { RubyModule newModule = RubyModule.newModule(this, name, parentModule); parentModule.setConstant(name, newModule); return newModule; } | 47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Ruby.java/buggy/src/org/jruby/Ruby.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
3120,
4426,
3120,
14655,
12,
780,
508,
16,
19817,
3120,
982,
3120,
13,
288,
3639,
19817,
3120,
394,
3120,
273,
19817,
3120,
18,
2704,
3120,
12,
2211,
16,
508,
16,
982,
3120,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19817,
3120,
4426,
3120,
14655,
12,
780,
508,
16,
19817,
3120,
982,
3120,
13,
288,
3639,
19817,
3120,
394,
3120,
273,
19817,
3120,
18,
2704,
3120,
12,
2211,
16,
508,
16,
982,
3120,
... |
private void copyBitMap(int extramapindex, int index) { | private void copyBitMap(int extramapindex, int index) { | private void copyBitMap(int extramapindex, int index) { if (VM.TraceStkMaps) { VM.sysWrite(" copyBitMap from map index = "); VM.sysWrite( index); VM.sysWrite(" copyBitMap from value = "); VM.sysWrite( unusualReferenceMaps[index]); VM.sysWrite("\n"); } // copy the map over to the extra map for (int i = 0; i < bytesPerMap; i++) unusualReferenceMaps[extramapindex + i] = unusualReferenceMaps[index + i]; if (VM.TraceStkMaps) { VM.sysWrite(" extraUnusualBitMap index = "); VM.sysWrite( extramapindex); VM.sysWrite(" extraunusualBitMap value = "); VM.sysWrite( unusualReferenceMaps[extramapindex]); VM.sysWrite("\n"); } } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/01d318a2ca2371456252cf870d524ff8f858d4f5/VM_ReferenceMaps.java/buggy/rvm/src/vm/compilers/baseline/GCMap/VM_ReferenceMaps.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1610,
5775,
863,
12,
474,
7582,
301,
438,
1615,
16,
509,
770,
13,
225,
288,
565,
309,
261,
7397,
18,
3448,
510,
79,
8903,
13,
288,
1377,
8251,
18,
9499,
3067,
2932,
1610,
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,
282,
3238,
918,
1610,
5775,
863,
12,
474,
7582,
301,
438,
1615,
16,
509,
770,
13,
225,
288,
565,
309,
261,
7397,
18,
3448,
510,
79,
8903,
13,
288,
1377,
8251,
18,
9499,
3067,
2932,
1610,
5... |
public org.quickfix.field.MaturityMonthYear getMaturityMonthYear() throws FieldNotFound { org.quickfix.field.MaturityMonthYear value = new org.quickfix.field.MaturityMonthYear(); | public quickfix.field.MaturityMonthYear getMaturityMonthYear() throws FieldNotFound { quickfix.field.MaturityMonthYear value = new quickfix.field.MaturityMonthYear(); | public org.quickfix.field.MaturityMonthYear getMaturityMonthYear() throws FieldNotFound { org.quickfix.field.MaturityMonthYear value = new org.quickfix.field.MaturityMonthYear(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/IndicationOfInterest.java/clean/src/java/src/quickfix/fix43/IndicationOfInterest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
15947,
2336,
5445,
5593,
2108,
270,
2336,
5445,
5593,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
15947,
2336,
5445,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
15947,
2336,
5445,
5593,
2108,
270,
2336,
5445,
5593,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
15947,
2336,
5445,
55... |
assertTrue(((RubyFixnum) lLoadA.nitems()).getValue() == 2); | assertTrue(RubyNumeric.num2long(lLoadA.nitems()) == 2); | public void testInitLoad() { ArrayList list = new ArrayList(); //check without a RubyHome and with one parameter System.setProperty("jruby.home", ""); list.add("toto"); ruby.initLoad(list); //check that the global vars are correctly valuated RubyObject lCol = ruby.getGlobalVar("$:"); RubyObject lI = ruby.getGlobalVar("$-I"); RubyObject lLoad = ruby.getGlobalVar("$LOAD_PATH"); assertTrue(lCol == lI && lI == lLoad && lLoad != null); RubyArray lLoadA = (RubyArray) lLoad; //check that we have 2 non null element assertTrue(((RubyFixnum) lLoadA.nitems()).getValue() == 2); //check that it is what we expect, a RubyString of the correct type assertTrue(new RubyString(ruby, "toto").equal(lLoadA.shift())); assertTrue(new RubyString(ruby, ".").equal(lLoadA.shift())); //check the case when RubyHome is valuated System.setProperty("jruby.home", "RubyHome"); //MRI result /* C:\dev\jruby>ruby -e "puts $:" /cygdrive/d/ruby/lib/ruby/site_ruby/1.6 /cygdrive/d/ruby/lib/ruby/site_ruby/1.6/i386-cygwin /cygdrive/d/ruby/lib/ruby/site_ruby /cygdrive/d/ruby/lib/ruby/1.6 /cygdrive/d/ruby/lib/ruby/1.6/i386-cygwin . */ ruby.initLoad(new ArrayList()); String wanted; if (File.separatorChar == '/') { wanted = "RubyHome/lib/ruby/site_ruby/1.6" + "RubyHome/lib/ruby/site_ruby/1.6/JAVA" + "RubyHome/lib/ruby/site_ruby" + "RubyHome/lib/ruby/1.6" + "RubyHome/lib/ruby/1.6/JAVA" + "."; } else { wanted = "RubyHome\\lib\\ruby\\site_ruby\\1.6" + "RubyHome\\lib\\ruby\\site_ruby\\1.6\\JAVA" + "RubyHome\\lib\\ruby\\site_ruby" + "RubyHome\\lib\\ruby\\1.6" + "RubyHome\\lib\\ruby\\1.6\\JAVA" + "."; } assertEquals(wanted, eval("puts $:")); } | 1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/786cea08c1dd2092a02d1254b49fbee371ace5f9/TestRuby.java/buggy/org/jruby/test/TestRuby.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2570,
2563,
1435,
288,
3639,
2407,
666,
273,
394,
2407,
5621,
3639,
368,
1893,
2887,
279,
19817,
8684,
471,
598,
1245,
1569,
3639,
2332,
18,
542,
1396,
2932,
78,
27768,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2570,
2563,
1435,
288,
3639,
2407,
666,
273,
394,
2407,
5621,
3639,
368,
1893,
2887,
279,
19817,
8684,
471,
598,
1245,
1569,
3639,
2332,
18,
542,
1396,
2932,
78,
27768,
1... |
if (jj_scan_token(ORASSIGN)) return true; | if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true; | final private boolean jj_3R_235() { if (jj_scan_token(ORASSIGN)) return true; return false; } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/b068fe5a79db07a544f081402e946a51a0f553c2/JavaParser.java/clean/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
30803,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
54,
21049,
23191,
23289,
3719,
327,
638,
31,
565,
327,
629,
31,
225,
289,
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,
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,
727,
3238,
1250,
10684,
67,
23,
54,
67,
30803,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
54,
21049,
23191,
23289,
3719,
327,
638,
31,
565,
327,
629,
31,
225,
289,
2,
... |
public abstract List getGateways(); | public abstract List<Gateway> getGateways(); | public abstract List getGateways(); | 12962 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12962/0d47f162d795a234cdc393508013d9b075b20084/IDialingRule.java/buggy/sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/admin/dialplan/IDialingRule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8770,
987,
7162,
340,
3052,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8770,
987,
7162,
340,
3052,
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,
-1... |
} | } | private Object writeReplace() { return new GappedAlphabetOPH(child); } | 50397 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50397/03c909243749f8f661f1babd4b607cc929bdf4c5/AlphabetManager.java/buggy/src/org/biojava/bio/seq/tools/AlphabetManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1033,
1045,
5729,
1435,
288,
202,
565,
327,
394,
611,
438,
1845,
27316,
3665,
44,
12,
3624,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1033,
1045,
5729,
1435,
288,
202,
565,
327,
394,
611,
438,
1845,
27316,
3665,
44,
12,
3624,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (file != null && !file.isWritable()) { | if (file != null && !file.isWritable() && isLocal(file)) { | private FileInfo[] createFileInfos(VirtualFile[] files) { List<FileInfo> fileInfos = new ArrayList<FileInfo>(); for (int i = 0; i < files.length; i++) { final VirtualFile file = files[i]; if (file != null && !file.isWritable()) { fileInfos.add(new FileInfo(file, myProject)); } } return fileInfos.toArray(new FileInfo[fileInfos.size()]); } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/3950838b00aa1b5b2e1528f357bf958fb036577b/ReadonlyStatusHandlerImpl.java/buggy/source/com/intellij/openapi/vcs/readOnlyHandler/ReadonlyStatusHandlerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
14236,
8526,
21266,
7655,
12,
6466,
812,
8526,
1390,
13,
288,
565,
987,
32,
11995,
34,
585,
7655,
273,
394,
2407,
32,
11995,
34,
5621,
565,
364,
261,
474,
277,
273,
374,
31,
277,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
14236,
8526,
21266,
7655,
12,
6466,
812,
8526,
1390,
13,
288,
565,
987,
32,
11995,
34,
585,
7655,
273,
394,
2407,
32,
11995,
34,
5621,
565,
364,
261,
474,
277,
273,
374,
31,
277,
... |
private void execute() { try { int buildcounter = 0; while (true) { Date startTime = new Date(); startLog(); loadProperties(); //Set the security manager to one which will prevent // the Ant Main class from killing the VM. SecurityManager oldSecMgr = System.getSecurityManager(); System.setSecurityManager(new NoExitSecurityManager()); try { Main.main(getCommandLine(buildcounter)); } catch (ExitException ee) { //Ignoring the exit exception from Main. } finally { //Reset the SecurityManager to the old one. System.setSecurityManager(oldSecMgr); } if (!_buildNotNecessary) { buildcounter++; Set emails = getEmails(_userList); if (_lastBuildSuccessful) { emailReport(emails, _projectName + " Build " + _label + " Successful"); incrementLabel(); writeBuildInfo(); } else { emailReport(emails, _projectName + " Build Failed"); } } long timeToSleep = getSleepTime(startTime); endLog(timeToSleep); Thread.sleep(timeToSleep); } } catch (InterruptedException e) { log("Exception trying to sleep"); e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } | 55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/619c0b3432fa13d6a3431dd96f8cd3fbce69fd87/MasterBuild.java/buggy/main/src/net/sourceforge/cruisecontrol/MasterBuild.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
90,
11359,
561,
557,
624,
1435,
95,
698,
95,
474,
3510,
7476,
33,
20,
31,
17523,
12,
3767,
15329,
5139,
27893,
950,
33,
2704,
1626,
5621,
1937,
1343,
5621,
945,
2297,
5621,
759,
694,
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,
3238,
90,
11359,
561,
557,
624,
1435,
95,
698,
95,
474,
3510,
7476,
33,
20,
31,
17523,
12,
3767,
15329,
5139,
27893,
950,
33,
2704,
1626,
5621,
1937,
1343,
5621,
945,
2297,
5621,
759,
694,
7... | ||
public void testChildrenRetrievalWithDetach() throws Exception {// soapEnvelope = getOMBuilder(new ByteArrayInputStream(sampleSOAPMessage.getBytes())).getSOAPEnvelope();// SOAPHeader soapHeader = soapEnvelope.getHeader();//// OMChildrenWithSpecificAttributeIterator iter = new OMChildrenWithSpecificAttributeIterator(soapHeader.getFirstChild(), new QName(SOAP_ENVELOPE_NAMESPACE_URI, ATTR_MUSTUNDERSTAND), "0", true);// if (iter.hasNext()) {// SOAPHeaderBlock soapHeaderBlock = (SOAPHeaderBlock) iter.next();// assertEquals("Header Block with mustUnderstand=\")0\" has not been retrieved properly", soapHeaderBlock.getLocalName(), AddressingConstants.WSA_TO);// }//// Iterator soapHeaderChildrenIter = soapHeader.getChildren();// int childrenCount = 0;// while (soapHeaderChildrenIter.hasNext()) {// Object o = soapHeaderChildrenIter.next();// childrenCount++;// }//// assertEquals("OMChildrenWithSpecificAttributeIterator with detach true, not working properly", childrenCount, 6); // here this 6 includes white spaces as OMText } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/af7717d39bf334b9910718812650d5561f1cbe1c/OMChildrenWithSpecificAttributeIteratorTest.java/buggy/modules/om/src/test/org/apache/axis/om/impl/traverse/OMChildrenWithSpecificAttributeIteratorTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4212,
27356,
1190,
17650,
1435,
1216,
1185,
288,
759,
3639,
9930,
10862,
273,
336,
1872,
1263,
12,
2704,
16180,
12,
6358,
27952,
1079,
18,
588,
2160,
10756,
2934,
588,
2795... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4212,
27356,
1190,
17650,
1435,
1216,
1185,
288,
759,
3639,
9930,
10862,
273,
336,
1872,
1263,
12,
2704,
16180,
12,
6358,
27952,
1079,
18,
588,
2160,
10756,
2934,
588,
2795... | ||
final Object value = literalConstraint.getField(); this.hashKey.setIndex( index ); this.hashKey.setValue( value ); | final Object value = literalConstraint.getField().getValue(); if (this.hashableSinks == null) { this.hashableSinks = new ObjectSinkNodeList(); } | public void unHashSinks(final FieldIndex fieldIndex) { final int index = fieldIndex.getIndex(); for ( ObjectSinkNode sink = this.hashableSinks.getFirst(); sink != null; sink = sink.getNextObjectSinkNode() ) { final AlphaNode alphaNode = (AlphaNode) sink; final AlphaNodeFieldConstraint fieldConstraint = alphaNode.getConstraint(); final LiteralConstraint literalConstraint = (LiteralConstraint) fieldConstraint; final Evaluator evaluator = literalConstraint.getEvaluator(); if ( evaluator.getOperator() == Operator.EQUAL && index == literalConstraint.getFieldExtractor().getIndex() ) { final Object value = literalConstraint.getField(); this.hashKey.setIndex( index ); this.hashKey.setValue( value ); this.hashableSinks.add( sink ); this.hashedSinkMap.remove( this.hashKey ); } } if ( this.hashedSinkMap.isEmpty() ) { this.hashedSinkMap = null; } fieldIndex.setHashed( false ); } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/d5d2c631633265ed09bebb175b19091e773d994b/CompositeObjectSinkAdapter.java/clean/drools-core/src/main/java/org/drools/reteoo/CompositeObjectSinkAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
640,
2310,
11326,
87,
12,
6385,
2286,
1016,
31762,
13,
288,
3639,
727,
509,
770,
273,
31762,
18,
588,
1016,
5621,
2398,
364,
261,
1033,
11326,
907,
9049,
273,
333,
18,
2816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
640,
2310,
11326,
87,
12,
6385,
2286,
1016,
31762,
13,
288,
3639,
727,
509,
770,
273,
31762,
18,
588,
1016,
5621,
2398,
364,
261,
1033,
11326,
907,
9049,
273,
333,
18,
2816,
... |
long start = System.currentTimeMillis(); | public void testSuspendPollingResumeService() { long start = System.currentTimeMillis(); MockService svc = m_network.getService(1, "192.168.1.2", "SMTP"); startDaemons(); sleep(2000); assertTrue(0 < svc.getPollCount()); m_eventMgr.sendEventToListeners(MockUtil.createSuspendPollingServiceEvent("Test", svc)); svc.resetPollCount(); sleep(5000); assertEquals(0, svc.getPollCount()); m_eventMgr.sendEventToListeners(MockUtil.createResumePollingServiceEvent("Test", svc)); sleep(2000); assertTrue(0 < svc.getPollCount()); } | 48885 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48885/74db4437847f4602ce6caa9e95f1a332e17b0eba/PollerTest.java/clean/src/services/org/opennms/netmgt/poller/PollerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
55,
18815,
24767,
20911,
1179,
1435,
288,
9079,
7867,
1179,
7538,
273,
312,
67,
5185,
18,
588,
1179,
12,
21,
16,
315,
15561,
18,
23329,
18,
21,
18,
22,
3113,
315,
55,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
55,
18815,
24767,
20911,
1179,
1435,
288,
9079,
7867,
1179,
7538,
273,
312,
67,
5185,
18,
588,
1179,
12,
21,
16,
315,
15561,
18,
23329,
18,
21,
18,
22,
3113,
315,
55,
... | |
EOModelEditorInput input = (EOModelEditorInput) myEntitiesTableEditor.getEditorInput(); | public void run() { IWorkbenchPage[] pages = getSite().getWorkbenchWindow().getPages(); for (int pageNum = 0; pageNum < pages.length; pageNum++) { EOModelEditorInput input = (EOModelEditorInput) myEntitiesTableEditor.getEditorInput(); if (input.getFile().getProject().equals(_event.getResource())) { IEditorPart editorPart = pages[pageNum].findEditor(input); pages[pageNum].closeEditor(editorPart, true); } } } | 50596 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50596/7b8e2a977acbc867813917275995f613b061ec47/EOModelEditor.java/clean/wolips/plugins/org.objectstyle.wolips.eomodeler/java/org/objectstyle/wolips/eomodeler/editors/EOModelEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1086,
1435,
288,
1850,
467,
2421,
22144,
1964,
8526,
4689,
273,
11021,
7675,
588,
2421,
22144,
3829,
7675,
588,
5716,
5621,
1850,
364,
261,
474,
13883,
273,
374,
31,
13883,
411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1086,
1435,
288,
1850,
467,
2421,
22144,
1964,
8526,
4689,
273,
11021,
7675,
588,
2421,
22144,
3829,
7675,
588,
5716,
5621,
1850,
364,
261,
474,
13883,
273,
374,
31,
13883,
411,
... | |
private String createNewVarName(Project project, PsiForStatement scope, PsiType type) { final CodeStyleManager codeStyleManager = CodeStyleManager.getInstance(project); | private String createNewVarName(Project project, PsiForStatement scope, PsiType type){ final CodeStyleManager codeStyleManager = CodeStyleManager.getInstance(project); | private String createNewVarName(Project project, PsiForStatement scope, PsiType type) { final CodeStyleManager codeStyleManager = CodeStyleManager.getInstance(project); final SuggestedNameInfo suggestions = codeStyleManager.suggestVariableName(VariableKind.LOCAL_VARIABLE, null, null, type); final String[] names = suggestions.names; final String baseName; if (names != null && names.length > 0) { baseName = names[0]; } else { baseName = "value"; } return codeStyleManager.suggestUniqueVariableName(baseName, scope, true); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/dba8b183fc1b08e7ad664812bfc0c64d1e4abd3c/ForCanBeForeachInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/verbose/ForCanBeForeachInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
514,
15291,
18129,
12,
4109,
1984,
16,
453,
7722,
1290,
3406,
2146,
16,
453,
7722,
559,
618,
13,
288,
5411,
727,
3356,
2885,
1318,
981,
2885,
1318,
273,
3356,
2885,
1318,
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,
540,
3238,
514,
15291,
18129,
12,
4109,
1984,
16,
453,
7722,
1290,
3406,
2146,
16,
453,
7722,
559,
618,
13,
288,
5411,
727,
3356,
2885,
1318,
981,
2885,
1318,
273,
3356,
2885,
1318,
18,
588,
... |
throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR); | return DTM.NULL != dtm.getFirstAttribute(node); | public boolean hasAttributes() { throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR); } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/dbf6dbd3dafe7db46d53b2b9767cb9893f6bb113/DTMNodeProxy.java/buggy/src/org/apache/xml/dtm/ref/DTMNodeProxy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
711,
2498,
1435,
225,
288,
565,
327,
19854,
18,
8560,
480,
31281,
18,
588,
3759,
1499,
12,
2159,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
711,
2498,
1435,
225,
288,
565,
327,
19854,
18,
8560,
480,
31281,
18,
588,
3759,
1499,
12,
2159,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
if (curr == sig[1]) { | if ( curr == sig[ 1 ] ) { | private void positionAtCentralDirectory() throws IOException { long off = archive.length() - MIN_EOCD_SIZE; archive.seek(off); byte[] sig = ZipOutputStream.EOCD_SIG.getBytes(); int curr = archive.read(); boolean found = false; while (curr != -1) { if (curr == sig[0]) { curr = archive.read(); if (curr == sig[1]) { curr = archive.read(); if (curr == sig[2]) { curr = archive.read(); if (curr == sig[3]) { found = true; break; } } } } archive.seek(--off); curr = archive.read(); } if (!found) { throw new ZipException("archive is not a ZIP archive"); } archive.seek(off + CFD_LOCATOR_OFFSET); byte[] cfdOffset = new byte[4]; archive.readFully(cfdOffset); archive.seek((new ZipLong(cfdOffset)).getValue()); } | 55907 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55907/4da7a225ba9c01ca94805923e06e3fb2d46bf201/ZipFile.java/buggy/plexus-archiver/src/main/java/org/codehaus/plexus/archiver/zip/ZipFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1754,
861,
39,
12839,
2853,
1435,
3639,
1216,
1860,
288,
3639,
1525,
3397,
273,
5052,
18,
2469,
1435,
300,
6989,
67,
41,
51,
10160,
67,
4574,
31,
3639,
5052,
18,
16508,
12,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1754,
861,
39,
12839,
2853,
1435,
3639,
1216,
1860,
288,
3639,
1525,
3397,
273,
5052,
18,
2469,
1435,
300,
6989,
67,
41,
51,
10160,
67,
4574,
31,
3639,
5052,
18,
16508,
12,
3... |
public boolean isEmpty() { return size() == 0; | public boolean isEmpty( ) { return size( ) == 0; | public boolean isEmpty() { return size() == 0; } | 47032 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47032/f63e1142cae73862c9c4f7b6ce46225b40f3ef86/AbstractHeap.java/buggy/src/org/_3pq/jgrapht/experimental/heap/AbstractHeap.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
2709,
1435,
288,
3639,
327,
963,
1435,
422,
374,
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,
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,
1250,
2709,
1435,
288,
3639,
327,
963,
1435,
422,
374,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
} else { | } else{ | private void replaceArrayAccess(PsiElement element, String contentVariableName, String arrayName, String indexName, PsiElement childToSkip, StringBuffer out) { if (isArrayLookup(element, indexName, arrayName)) { out.append(contentVariableName); } else { final PsiElement[] children = element.getChildren(); if (children.length == 0) { out.append(element.getText()); } else { boolean skippingWhiteSpace = false; for (int i = 0; i < children.length; i++) { final PsiElement child = children[i]; if (child.equals(childToSkip)) { skippingWhiteSpace = true; } else if (child instanceof PsiWhiteSpace && skippingWhiteSpace) { //don't do anything } else { skippingWhiteSpace = false; replaceArrayAccess(child, contentVariableName, arrayName, indexName, childToSkip, out); } } } } } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/dba8b183fc1b08e7ad664812bfc0c64d1e4abd3c/ForCanBeForeachInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/verbose/ForCanBeForeachInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
918,
1453,
1076,
1862,
12,
52,
7722,
1046,
930,
16,
514,
913,
21519,
16,
514,
526,
461,
16,
514,
12753,
16,
4766,
3639,
453,
7722,
1046,
1151,
774,
6368,
16,
6674,
596,
13,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
918,
1453,
1076,
1862,
12,
52,
7722,
1046,
930,
16,
514,
913,
21519,
16,
514,
526,
461,
16,
514,
12753,
16,
4766,
3639,
453,
7722,
1046,
1151,
774,
6368,
16,
6674,
596,
13,
288,
... |
switch ( n.getNodeType() ) | switch (n.getNodeType()) | void loadNode ( Node n, LoadContext context ) { switch ( n.getNodeType() ) { case Node.DOCUMENT_NODE : case Node.DOCUMENT_FRAGMENT_NODE : case Node.ENTITY_REFERENCE_NODE : { loadNodeChildren( n, context ); break; } case Node.ELEMENT_NODE : { context.startElement( makeQualifiedQName( n.getNamespaceURI(), n.getNodeName() ) ); NamedNodeMap attrs = n.getAttributes(); for ( int i = 0 ; i < attrs.getLength() ; i++ ) { Node a = attrs.item( i ); String attrName = a.getNodeName(); String attrValue = a.getNodeValue(); if (attrName.toLowerCase().startsWith( "xmlns" )) { if (attrName.length() == 5) context.xmlns( null, attrValue ); else context.xmlns( attrName.substring( 6 ), attrValue ); } else context.attr( makeQualifiedQName( a.getNamespaceURI(), attrName ), attrValue ); } loadNodeChildren( n, context ); context.endElement(); break; } case Node.TEXT_NODE : case Node.CDATA_SECTION_NODE : { context.text( n.getNodeValue() ); break; } case Node.COMMENT_NODE : { context.comment( n.getNodeValue() ); break; } case Node.PROCESSING_INSTRUCTION_NODE : { context.procInst( n.getNodeName(), n.getNodeValue() ); break; } case Node.DOCUMENT_TYPE_NODE : case Node.ENTITY_NODE : case Node.NOTATION_NODE : case Node.ATTRIBUTE_NODE : { throw new RuntimeException( "Unexpected node" ); } } } | 3520 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3520/6a1584bb1ad8f163dc69272874712dc74f03660e/Locale.java/buggy/src/store/org/apache/xmlbeans/impl/store/Locale.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1377,
918,
1262,
907,
261,
2029,
290,
16,
4444,
1042,
819,
262,
565,
288,
3639,
1620,
261,
82,
18,
588,
15101,
10756,
3639,
288,
3639,
648,
2029,
18,
18450,
67,
8744,
294,
3639,
648,
2029,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1377,
918,
1262,
907,
261,
2029,
290,
16,
4444,
1042,
819,
262,
565,
288,
3639,
1620,
261,
82,
18,
588,
15101,
10756,
3639,
288,
3639,
648,
2029,
18,
18450,
67,
8744,
294,
3639,
648,
2029,
1... |
try { reg = LocateRegistry.getRegistry(hostName, hostPort); } catch (Exception e) { System.out.println( "Unable to contact "+ hostName+":"+hostPort); throw e; } | reg = LocateRegistry.getRegistry(hostName, hostPort); | public HostServesClient getHost( String hostName, int hostPort) throws Exception { // could cache this... // locate the registry at <hostname, port> Registry reg; try { reg = LocateRegistry.getRegistry(hostName, hostPort); } catch (Exception e) { System.out.println( "Unable to contact "+ hostName+":"+hostPort); throw e; } // get the remote implementation ServerHostController shc; try { shc = (ServerHostController)reg.lookup("ServerHook"); } catch (Exception e) { System.out.println( "Unable to find AppServer on "+ hostName+":"+hostPort); throw e; } // return a host controller return new ClientHostController(shc); } | 7982 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7982/bb2b25600baa640b68b664e27a69b7b71ca761e3/ClientCommunityController.java/clean/server/src/org/cougaar/tools/server/rmi/ClientCommunityController.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
4893,
827,
3324,
1227,
8580,
12,
1377,
514,
19266,
16,
4202,
509,
30400,
13,
1216,
1185,
288,
565,
368,
3377,
1247,
333,
2777,
565,
368,
10627,
326,
4023,
622,
411,
10358,
16,
1756,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4893,
827,
3324,
1227,
8580,
12,
1377,
514,
19266,
16,
4202,
509,
30400,
13,
1216,
1185,
288,
565,
368,
3377,
1247,
333,
2777,
565,
368,
10627,
326,
4023,
622,
411,
10358,
16,
1756,... |
System.out.println("Open file name:" + name + " - path:" + location); | void jMenuFileOpen_actionPerformed(ActionEvent e) { int option = jFileChooser1.showOpenDialog(this); if(option == jFileChooser1.APPROVE_OPTION || jFileChooser1.getSelectedFile() != null) { name = jFileChooser1.getSelectedFile().getName(); location = jFileChooser1.getSelectedFile().getParent(); System.out.println("Open file name:" + name + " - path:" + location); edp = new EditableDefinablePlugin(); edp.loadMap(location, name); // update the table inspectorModel.setPluginData(edp); } } | 8150 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8150/1733ca02d83f4b7ed910ce10502701ee122f408a/PluginDefiner.java/clean/test/src/org/lockss/devtools/plugindef/PluginDefiner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
525,
4599,
812,
3678,
67,
1128,
13889,
12,
1803,
1133,
425,
13,
288,
565,
509,
1456,
273,
525,
812,
17324,
21,
18,
4500,
3678,
6353,
12,
2211,
1769,
565,
309,
12,
3482,
422,
525,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
525,
4599,
812,
3678,
67,
1128,
13889,
12,
1803,
1133,
425,
13,
288,
565,
509,
1456,
273,
525,
812,
17324,
21,
18,
4500,
3678,
6353,
12,
2211,
1769,
565,
309,
12,
3482,
422,
525,
... | |
if (myLayout == null) return; | if (myLayout == null || myShowing) return; | private void updateSpec() { if (myLayout == null) return; mySaving = true; try { Size size = getSelectedSize(); final SpinnerNumberModel model = (SpinnerNumberModel) myGrowSpinner.getModel(); double resizeWeight = myGrowCheckBox.isSelected() ? model.getNumber().doubleValue() : 0.0; FormSpec.DefaultAlignment alignment = getSelectedAlignment(); if (myIsRow) { myLayout.setRowSpec(myIndex, new RowSpec(alignment, size, resizeWeight)); } else { myLayout.setColumnSpec(myIndex, new ColumnSpec(alignment, size, resizeWeight)); } for(ChangeListener listener: myListeners) { listener.stateChanged(new ChangeEvent(this)); } } finally { mySaving = false; } } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/dc127cc79c09d0a14ea95e7efb4c4b4bc2d1bc5e/FormLayoutColumnProperties.java/buggy/ui-designer/impl/com/intellij/uiDesigner/radComponents/FormLayoutColumnProperties.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1089,
1990,
1435,
288,
565,
309,
261,
4811,
3744,
422,
446,
747,
3399,
5706,
310,
13,
327,
31,
565,
3399,
24660,
273,
638,
31,
565,
775,
288,
1377,
6321,
963,
273,
16625,
122... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
1990,
1435,
288,
565,
309,
261,
4811,
3744,
422,
446,
747,
3399,
5706,
310,
13,
327,
31,
565,
3399,
24660,
273,
638,
31,
565,
775,
288,
1377,
6321,
963,
273,
16625,
122... |
following.push(FOLLOW_lhs_and_in_lhs_or2174); | following.push(FOLLOW_lhs_and_in_lhs_or2224); | public PatternDescr lhs_or() throws RecognitionException { PatternDescr d; PatternDescr left = null; PatternDescr right = null; d = null; try { // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:643:17: (left= lhs_and ( ('or'|'||')right= lhs_and )* ) // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:643:17: left= lhs_and ( ('or'|'||')right= lhs_and )* { OrDescr or = null; following.push(FOLLOW_lhs_and_in_lhs_or2153); left=lhs_and(); following.pop(); d = left; // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:645:17: ( ('or'|'||')right= lhs_and )* loop54: do { int alt54=2; int LA54_0 = input.LA(1); if ( LA54_0==39||LA54_0==50 ) { alt54=1; } switch (alt54) { case 1 : // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:645:25: ('or'|'||')right= lhs_and { if ( input.LA(1)==39||input.LA(1)==50 ) { input.consume(); errorRecovery=false; } else { MismatchedSetException mse = new MismatchedSetException(null,input); recoverFromMismatchedSet(input,mse,FOLLOW_set_in_lhs_or2163); throw mse; } following.push(FOLLOW_lhs_and_in_lhs_or2174); right=lhs_and(); following.pop(); if ( or == null ) { or = new OrDescr(); or.addDescr( left ); d = or; } or.addDescr( right ); } break; default : break loop54; } } while (true); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return d; } | 5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/9c6423b7a31fdc4a1317e71a6d2850c94e2140e0/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6830,
16198,
8499,
67,
280,
1435,
1216,
9539,
288,
6647,
6830,
16198,
302,
31,
3639,
6830,
16198,
2002,
273,
446,
31,
3639,
6830,
16198,
2145,
273,
446,
31,
1171,
202,
202,
72,
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,
6830,
16198,
8499,
67,
280,
1435,
1216,
9539,
288,
6647,
6830,
16198,
302,
31,
3639,
6830,
16198,
2002,
273,
446,
31,
3639,
6830,
16198,
2145,
273,
446,
31,
1171,
202,
202,
72,
273,... |
SVNErrorManager.error(FSErrors.errorNotFound(rootNode, path)); | SVNErrorManager.error(FSErrors.errorNotFound(root, path)); | public static FSNodeHistory getNodeHistory(File reposRootDir, FSRevisionNode root, String path) throws SVNException{ FSRoot rootNode = FSRoot.createRevisionRoot(root.getId().getRevision(), root); if(rootNode.isTxnRoot()){ SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_REVISION_ROOT); SVNErrorManager.error(err); } /*And we require that the path exist in the root*/ SVNNodeKind kind = FSReader.checkNodeKind(path, rootNode.getRootRevisionNode(), reposRootDir); if(kind == SVNNodeKind.NONE){ SVNErrorManager.error(FSErrors.errorNotFound(rootNode, path)); } return new FSNodeHistory(new SVNLocationEntry(rootNode.getRootRevisionNode().getId().getRevision(), path), false, new SVNLocationEntry(FSConstants.SVN_INVALID_REVNUM, null)); } | 2776 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2776/3de4e7e298b05186659154d8fdb3899509e55875/FSNodeHistory.java/buggy/javasvn/src/org/tmatesoft/svn/core/internal/io/fs/FSNodeHistory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
9247,
907,
5623,
5973,
5623,
12,
812,
13686,
27322,
16,
9247,
7939,
907,
1365,
16,
514,
589,
13,
1216,
29537,
50,
503,
95,
3639,
9247,
2375,
10181,
273,
9247,
2375,
18,
2640,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9247,
907,
5623,
5973,
5623,
12,
812,
13686,
27322,
16,
9247,
7939,
907,
1365,
16,
514,
589,
13,
1216,
29537,
50,
503,
95,
3639,
9247,
2375,
10181,
273,
9247,
2375,
18,
2640,
... |
getSipxProcessContext().manageServices(getServiceLocation(), services, operation); | private void manageServices(Collection services, SipxProcessContext.Command operation) { if (services == null) { // nothing to do return; } getSipxProcessContext().manageServices(getServiceLocation(), services, operation); } | 12962 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12962/bb07b34b0635425e85aa81452408000e9acbc389/Services.java/clean/sipXconfig/web/src/org/sipfoundry/sipxconfig/site/admin/commserver/Services.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
10680,
5676,
12,
2532,
4028,
16,
13475,
92,
2227,
1042,
18,
2189,
1674,
13,
288,
3639,
309,
261,
8387,
422,
446,
13,
288,
5411,
368,
5083,
358,
741,
5411,
327,
31,
3639,
289,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
10680,
5676,
12,
2532,
4028,
16,
13475,
92,
2227,
1042,
18,
2189,
1674,
13,
288,
3639,
309,
261,
8387,
422,
446,
13,
288,
5411,
368,
5083,
358,
741,
5411,
327,
31,
3639,
289,... | |
throw new CruiseControlWebAppException("Could not parse log file name " + logFileName | throw new CruiseControlWebAppException("Could not parse log file name " + file.getName() | public static BuildInfoSummary loadFromDir(File logDir) throws CruiseControlWebAppException { String [] logFileNames = logDir.list(new CruiseControlLogFileFilter()); if (logFileNames == null) { throw new CruiseControlWebAppException("Could not access the directory " + logDir.getAbsolutePath()); } else if (logFileNames.length == 0) { throw new CruiseControlWebAppException("Configuration problem? No logs found in logDir: " + logDir.getAbsolutePath()); } List buildInfoList = new ArrayList(logFileNames.length); for (int i = 0; i < logFileNames.length; i++) { String logFileName = logFileNames[i]; try { buildInfoList.add(new BuildInfo(logFileName)); } catch (ParseException e) { throw new CruiseControlWebAppException("Could not parse log file name " + logFileName + ". Is the filter broken?", e); } } Collections.sort(buildInfoList); return new BuildInfoSummary(buildInfoList); } | 52149 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52149/4e441cea928ae01f5124df26833b3e10022370fd/BuildInfo.java/buggy/reporting/jsp/src/net/sourceforge/cruisecontrol/BuildInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
3998,
966,
4733,
24935,
1621,
12,
812,
31101,
13,
1216,
385,
8653,
784,
3367,
4079,
3371,
503,
288,
3639,
514,
5378,
20169,
1557,
273,
31101,
18,
1098,
12,
2704,
385,
8653,
784... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3998,
966,
4733,
24935,
1621,
12,
812,
31101,
13,
1216,
385,
8653,
784,
3367,
4079,
3371,
503,
288,
3639,
514,
5378,
20169,
1557,
273,
31101,
18,
1098,
12,
2704,
385,
8653,
784... |
return new MicroSecondTimeRange(beginTime.add(shift), endTime.add(shift)); } | return new MicroSecondTimeRange(beginTime.add(shift), endTime.add(shift)); } | public MicroSecondTimeRange shift(TimeInterval shift){ return new MicroSecondTimeRange(beginTime.add(shift), endTime.add(shift)); } | 52623 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52623/e992a4863a946cc9f0fe2418e73c02139523a49d/MicroSecondTimeRange.java/clean/src/edu/sc/seis/fissuresUtil/display/MicroSecondTimeRange.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
18284,
8211,
950,
2655,
4654,
12,
950,
4006,
4654,
15329,
202,
202,
2463,
394,
18284,
8211,
950,
2655,
12,
10086,
950,
18,
1289,
12,
4012,
3631,
6862,
25083,
202,
409,
950,
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,
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,
18284,
8211,
950,
2655,
4654,
12,
950,
4006,
4654,
15329,
202,
202,
2463,
394,
18284,
8211,
950,
2655,
12,
10086,
950,
18,
1289,
12,
4012,
3631,
6862,
25083,
202,
409,
950,
18,
... |
public ObjectStreamField (String name, Class type) | ObjectStreamField (Field field) | public ObjectStreamField (String name, Class type) { this (name, type, false); } | 13625 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13625/126d7770c7bb5b9c74598afb0864a336d457fd92/ObjectStreamField.java/buggy/libjava/java/io/ObjectStreamField.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1033,
1228,
974,
261,
974,
652,
13,
225,
288,
565,
333,
261,
529,
16,
618,
16,
629,
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,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1033,
1228,
974,
261,
974,
652,
13,
225,
288,
565,
333,
261,
529,
16,
618,
16,
629,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
org.exist.xquery.parser.XQueryAST tmp161_AST = null; tmp161_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp161_AST); match(LITERAL_eq); break; } case LITERAL_ne: { | public final void comparisonExpr() throws RecognitionException, TokenStreamException, XPathException { returnAST = null; ASTPair currentAST = new ASTPair(); org.exist.xquery.parser.XQueryAST comparisonExpr_AST = null; rangeExpr(); astFactory.addASTChild(currentAST, returnAST); { switch ( LA(1)) { case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: { { { switch ( LA(1)) { case LITERAL_eq: { org.exist.xquery.parser.XQueryAST tmp161_AST = null; tmp161_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp161_AST); match(LITERAL_eq); break; } case LITERAL_ne: { org.exist.xquery.parser.XQueryAST tmp162_AST = null; tmp162_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp162_AST); match(LITERAL_ne); break; } case LITERAL_lt: { org.exist.xquery.parser.XQueryAST tmp163_AST = null; tmp163_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp163_AST); match(LITERAL_lt); break; } case LITERAL_le: { org.exist.xquery.parser.XQueryAST tmp164_AST = null; tmp164_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp164_AST); match(LITERAL_le); break; } case LITERAL_gt: { org.exist.xquery.parser.XQueryAST tmp165_AST = null; tmp165_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp165_AST); match(LITERAL_gt); break; } case LITERAL_ge: { org.exist.xquery.parser.XQueryAST tmp166_AST = null; tmp166_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp166_AST); match(LITERAL_ge); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } rangeExpr(); astFactory.addASTChild(currentAST, returnAST); } break; } case LITERAL_is: case LITERAL_isnot: { { { switch ( LA(1)) { case LITERAL_is: { org.exist.xquery.parser.XQueryAST tmp167_AST = null; tmp167_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp167_AST); match(LITERAL_is); break; } case LITERAL_isnot: { org.exist.xquery.parser.XQueryAST tmp168_AST = null; tmp168_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp168_AST); match(LITERAL_isnot); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } rangeExpr(); astFactory.addASTChild(currentAST, returnAST); } break; } case ANDEQ: case OREQ: { { { switch ( LA(1)) { case ANDEQ: { org.exist.xquery.parser.XQueryAST tmp169_AST = null; tmp169_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp169_AST); match(ANDEQ); break; } case OREQ: { org.exist.xquery.parser.XQueryAST tmp170_AST = null; tmp170_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp170_AST); match(OREQ); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } rangeExpr(); astFactory.addASTChild(currentAST, returnAST); } break; } case EOF: case RPAREN: case LITERAL_default: case LITERAL_collation: case RCURLY: case COMMA: case LITERAL_empty: case LITERAL_for: case LITERAL_let: case LITERAL_where: case LITERAL_return: case LITERAL_order: case LITERAL_ascending: case LITERAL_descending: case LITERAL_satisfies: case LITERAL_case: case LITERAL_else: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case RPPAREN: { break; } default: boolean synPredMatched146 = false; if (((LA(1)==LT))) { int _m146 = mark(); synPredMatched146 = true; inputState.guessing++; try { { match(LT); match(LT); } } catch (RecognitionException pe) { synPredMatched146 = false; } rewind(_m146); inputState.guessing--; } if ( synPredMatched146 ) { match(LT); match(LT); rangeExpr(); astFactory.addASTChild(currentAST, returnAST); if ( inputState.guessing==0 ) { comparisonExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; comparisonExpr_AST = (org.exist.xquery.parser.XQueryAST)astFactory.make( (new ASTArray(2)).add((org.exist.xquery.parser.XQueryAST)astFactory.create(BEFORE,"<<")).add(comparisonExpr_AST)); currentAST.root = comparisonExpr_AST; currentAST.child = comparisonExpr_AST!=null &&comparisonExpr_AST.getFirstChild()!=null ? comparisonExpr_AST.getFirstChild() : comparisonExpr_AST; currentAST.advanceChildToEnd(); } } else { boolean synPredMatched148 = false; if (((LA(1)==GT))) { int _m148 = mark(); synPredMatched148 = true; inputState.guessing++; try { { match(GT); match(GT); } } catch (RecognitionException pe) { synPredMatched148 = false; } rewind(_m148); inputState.guessing--; } if ( synPredMatched148 ) { match(GT); match(GT); rangeExpr(); astFactory.addASTChild(currentAST, returnAST); if ( inputState.guessing==0 ) { comparisonExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; comparisonExpr_AST = (org.exist.xquery.parser.XQueryAST)astFactory.make( (new ASTArray(2)).add((org.exist.xquery.parser.XQueryAST)astFactory.create(AFTER,">>")).add(comparisonExpr_AST)); currentAST.root = comparisonExpr_AST; currentAST.child = comparisonExpr_AST!=null &&comparisonExpr_AST.getFirstChild()!=null ? comparisonExpr_AST.getFirstChild() : comparisonExpr_AST; currentAST.advanceChildToEnd(); } } else if ((_tokenSet_4.member(LA(1)))) { { { switch ( LA(1)) { case EQ: { org.exist.xquery.parser.XQueryAST tmp175_AST = null; tmp175_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp175_AST); match(EQ); break; } case NEQ: { org.exist.xquery.parser.XQueryAST tmp176_AST = null; tmp176_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp176_AST); match(NEQ); break; } case GT: { org.exist.xquery.parser.XQueryAST tmp177_AST = null; tmp177_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp177_AST); match(GT); break; } case GTEQ: { org.exist.xquery.parser.XQueryAST tmp178_AST = null; tmp178_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp178_AST); match(GTEQ); break; } case LT: { org.exist.xquery.parser.XQueryAST tmp179_AST = null; tmp179_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp179_AST); match(LT); break; } case LTEQ: { org.exist.xquery.parser.XQueryAST tmp180_AST = null; tmp180_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp180_AST); match(LTEQ); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } rangeExpr(); astFactory.addASTChild(currentAST, returnAST); } } else { throw new NoViableAltException(LT(1), getFilename()); } }} } comparisonExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; returnAST = comparisonExpr_AST; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/b1f955b7f1cec4172ad3be7bd2855bd3cca3e6f2/XQueryParser.java/clean/src/org/exist/xquery/parser/XQueryParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
5826,
4742,
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,
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,
918,
5826,
4742,
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,
5... | |
if (_address != null) { return _address; } else { InetAddress addr = getHandshakeAddress(); if( addr != null ) { this._address = addr; } return addr; } | return addr.getAddress(); | public InetAddress getAddress() { if (_address != null) { return _address; } else { InetAddress addr = getHandshakeAddress(); if( addr != null ) { this._address = addr; } return addr; } } | 52909 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52909/474d190c633c367c5c3ff7fbe0f75a1ea669294b/Peer.java/clean/src/freenet/io/comm/Peer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
14218,
14808,
1435,
288,
202,
202,
430,
261,
67,
2867,
480,
446,
13,
288,
1082,
202,
2463,
389,
2867,
31,
202,
202,
97,
469,
288,
1082,
3639,
14218,
3091,
273,
336,
14545,
188... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14218,
14808,
1435,
288,
202,
202,
430,
261,
67,
2867,
480,
446,
13,
288,
1082,
202,
2463,
389,
2867,
31,
202,
202,
97,
469,
288,
1082,
3639,
14218,
3091,
273,
336,
14545,
188... |
AffineTransform vTx = cgn.getViewingTransform(); if ((vTx != null) && !vTx.isIdentity()) { try { AffineTransform invVTx = vTx.createInverse(); Tx.concatenate(invVTx); } catch (NoninvertibleTransformException nite) { /* nothing */ | if (cgn != null) { AffineTransform vTx = cgn.getViewingTransform(); if ((vTx != null) && !vTx.isIdentity()) { try { AffineTransform invVTx = vTx.createInverse(); Tx.concatenate(invVTx); } catch (NoninvertibleTransformException nite) { /* nothing */ } | protected void updateThumbnailRenderingTransform() { SVGDocument svgDocument = svgCanvas.getSVGDocument(); if (svgDocument != null) { SVGSVGElement elt = svgDocument.getRootElement(); Dimension dim = svgThumbnailCanvas.getSize(); AffineTransform Tx = ViewBox.getViewTransform(null, elt, dim.width, dim.height); if (Tx.isIdentity()) { // no viewBox has been specified, create a scale transform Dimension2D docSize = svgCanvas.getSVGDocumentSize(); double sx = dim.width / docSize.getWidth(); double sy = dim.height / docSize.getHeight(); double s = Math.min(sx, sy); Tx = AffineTransform.getScaleInstance(s, s); } GraphicsNode gn = svgCanvas.getGraphicsNode(); CanvasGraphicsNode cgn = getCanvasGraphicsNode(gn); AffineTransform vTx = cgn.getViewingTransform(); if ((vTx != null) && !vTx.isIdentity()) { try { AffineTransform invVTx = vTx.createInverse(); Tx.concatenate(invVTx); } catch (NoninvertibleTransformException nite) { /* nothing */ } } svgThumbnailCanvas.setRenderingTransform(Tx); overlay.synchronizeAreaOfInterest(); } } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/c82cbaaf77be4cbd547cfdcbd4a829e0f59bf778/ThumbnailDialog.java/clean/sources/org/apache/batik/apps/svgbrowser/ThumbnailDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1089,
16270,
14261,
4059,
1435,
288,
3639,
11281,
2519,
9804,
2519,
273,
9804,
12971,
18,
588,
26531,
2519,
5621,
3639,
309,
261,
11451,
2519,
480,
446,
13,
288,
5411,
11281,
265... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
16270,
14261,
4059,
1435,
288,
3639,
11281,
2519,
9804,
2519,
273,
9804,
12971,
18,
588,
26531,
2519,
5621,
3639,
309,
261,
11451,
2519,
480,
446,
13,
288,
5411,
11281,
265... |
message = MessageFormat.format( "[{0}] {1}", new Object[] { new Long( System.currentTimeMillis() ), message } ); | message = MessageFormat.format( "[{0}] {1}", new Object[] { new Long( System.currentTimeMillis() ), message } ); | public void debugLog(String message) { if (getDefault().isDebugging()) { // Time stamp message = MessageFormat.format( "[{0}] {1}", new Object[] { new Long( System.currentTimeMillis() ), message } ); // This is to verbose for a log file, better use the console. // getDefault().getLog().log(StatusUtil.newStatus(Status.ERROR, message, null)); // ALERT:FIXME: For example for big buffers say 4k length, // the console will simply blow taking down eclipse. // This seems only to happen in Eclipse-gtk and Eclipse-motif // on GNU/Linux, so it will be break in smaller chunks. while (message.length() > 100) { String partial = message.substring(0, 100); message = message.substring(100); System.err.println(partial + "\\"); } if (message.endsWith("\n")) { System.err.print(message); } else { System.err.println(message); } } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/f3a9fae6384fd8bb36474b1661bb6d0b65b38d5f/MIPlugin.java/clean/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIPlugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1198,
1343,
12,
780,
883,
13,
288,
202,
202,
430,
261,
588,
1868,
7675,
291,
2829,
1998,
10756,
288,
25083,
202,
759,
2647,
14429,
1082,
202,
2150,
273,
17377,
18,
2139,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1198,
1343,
12,
780,
883,
13,
288,
202,
202,
430,
261,
588,
1868,
7675,
291,
2829,
1998,
10756,
288,
25083,
202,
759,
2647,
14429,
1082,
202,
2150,
273,
17377,
18,
2139,
... |
debug=Messages.getString("Denormaliser.Debug.ProcessRow"); | debug="processRow"; | public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException { debug=Messages.getString("Denormaliser.Debug.ProcessRow"); //$NON-NLS-1$ Row r=getRow(); // get row! if (r==null) // no more input to be expected... { // Don't forget the last set of rows... if (data.previous!=null) { deNormalise(data.previous); buildResult(data.previous); putRow(data.previous); //System.out.println("Wrote row: "+data.previous); } setOutputDone(); return false; } if (first) { data.keyFieldNr = r.searchValueIndex(meta.getKeyField() ); if (data.keyFieldNr<0) { logError(Messages.getString("Denormaliser.Log.KeyFieldNotFound",meta.getKeyField())); //$NON-NLS-1$ //$NON-NLS-2$ setErrors(1); stopAll(); return false; } Hashtable subjects = new Hashtable(); data.fieldNameIndex = new int[meta.getDenormaliserTargetField().length]; for (int i=0;i<meta.getDenormaliserTargetField().length;i++) { DenormaliserTargetField field = meta.getDenormaliserTargetField()[i]; int idx = r.searchValueIndex(field.getFieldName()); if (idx<0) { logError(Messages.getString("Denormaliser.Log.UnpivotFieldNotFound",field.getFieldName())); //$NON-NLS-1$ //$NON-NLS-2$ setErrors(1); stopAll(); return false; } data.fieldNameIndex[i] = idx; subjects.put(new Integer(idx), new Integer(idx)); // Fill a hashtable with the key strings and the position of the field in the row to take. data.keyValue.put(field.getKeyValue(), new Integer(i)); } Set subjectSet = subjects.keySet(); data.fieldNrs = (Integer[])subjectSet.toArray(new Integer[subjectSet.size()]); data.groupnrs = new int[meta.getGroupField().length]; for (int i=0;i<meta.getGroupField().length;i++) { data.groupnrs[i] = r.searchValueIndex(meta.getGroupField()[i]); if (data.groupnrs[i]<0) { logError(Messages.getString("Denormaliser.Log.GroupingFieldNotFound",meta.getGroupField()[i])); //$NON-NLS-1$ //$NON-NLS-2$ setErrors(1); stopAll(); return false; } } ArrayList removeList = new ArrayList(); removeList.add(new Integer(data.keyFieldNr)); for (int i=0;i<data.fieldNrs.length;i++) { removeList.add(data.fieldNrs[i]); } Collections.sort(removeList); data.removeNrs = new int[removeList.size()]; for (int i=0;i<removeList.size();i++) data.removeNrs[i] = ((Integer)removeList.get(i)).intValue(); data.previous=new Row(r); // copy the row to previous newGroup(); // Create a new result row (init) first=false; } // System.out.println("Check for same group..."); if (!sameGroup(data.previous, r)) { debug=Messages.getString("Denormaliser.Debg.DifferentGroup"); //$NON-NLS-1$ // System.out.println("Different group!"); buildResult(data.previous); putRow(data.previous); // copy row to possible alternate rowset(s). //System.out.println("Wrote row: "+data.previous); newGroup(); // Create a new group aggregate (init) deNormalise(r); } else { debug=Messages.getString("Denormaliser.Debug.UnPivot"); //$NON-NLS-1$ deNormalise(r); } data.previous=new Row(r); if ((linesRead>0) && (linesRead%Const.ROWS_UPDATE)==0) logBasic(Messages.getString("Denormaliser.Log.LineNumber")+linesRead); //$NON-NLS-1$ return true; } | 58146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58146/1c9f988ead5d84cf346b30237442c0deea9cb347/Denormaliser.java/buggy/kettle/src/be/ibridge/kettle/trans/step/denormaliser/Denormaliser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1207,
1999,
12,
4160,
2781,
1358,
3029,
77,
16,
8693,
751,
1358,
272,
3211,
13,
1216,
1475,
278,
5929,
503,
202,
95,
202,
202,
4148,
1546,
2567,
1999,
14432,
4329,
3993,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1207,
1999,
12,
4160,
2781,
1358,
3029,
77,
16,
8693,
751,
1358,
272,
3211,
13,
1216,
1475,
278,
5929,
503,
202,
95,
202,
202,
4148,
1546,
2567,
1999,
14432,
4329,
3993,
... |
if (uris.indexOf(systemId) != -1) { | if (dtdids.indexOf(publicId) != -1) { | public InputSource resolveEntity(String publicId, String systemId) throws SAXException { try { if (uris == null) { ResourceBundle rb; rb = ResourceBundle.getBundle(DTDS, Locale.getDefault()); uris = rb.getString("uris"); } if (uris.indexOf(systemId) != -1) { return new InputSource (getClass().getResource ("resources/svg10.dtd").toString()); } } catch (MissingResourceException e) { throw new SAXException(e); } // Let the SAX parser find the entity. return null; } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/5955476cb2b14ba1e9de4e34f6f4e250ce817efa/SAXSVGDocumentFactory.java/clean/sources/org/apache/batik/dom/svg/SAXSVGDocumentFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
23699,
2245,
1943,
12,
780,
1071,
548,
16,
514,
30083,
13,
3639,
1216,
14366,
288,
3639,
775,
288,
5411,
309,
261,
23510,
422,
446,
13,
288,
7734,
19198,
7138,
31,
7734,
7138,
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,
23699,
2245,
1943,
12,
780,
1071,
548,
16,
514,
30083,
13,
3639,
1216,
14366,
288,
3639,
775,
288,
5411,
309,
261,
23510,
422,
446,
13,
288,
7734,
19198,
7138,
31,
7734,
7138,
273,
... |
if(e.getComponent() == this && | if (e.getComponent() == this && | public void mouseClicked(MouseEvent e) { if(e.getComponent() == this && (e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0) { int x = e.getX(); int y = e.getY(); Font font = fileWindow.textArea.getFont(); FontMetrics metrics = getFontMetrics(font); int h = metrics.getHeight(); int line = y/h; fileWindow.toggleBreakPoint(line + 1); } } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/b9766e81693411fa600b26b9a0763dcf621b2770/Main.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
7644,
27633,
12,
9186,
1133,
425,
13,
288,
3639,
309,
261,
73,
18,
588,
1841,
1435,
422,
333,
597,
1850,
261,
73,
18,
588,
11948,
1435,
473,
17013,
1133,
18,
20068,
21,
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,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
7644,
27633,
12,
9186,
1133,
425,
13,
288,
3639,
309,
261,
73,
18,
588,
1841,
1435,
422,
333,
597,
1850,
261,
73,
18,
588,
11948,
1435,
473,
17013,
1133,
18,
20068,
21,
67,
... |
public MemoryBlock(Target target, String exp, int wordSize, MIDataReadMemoryInfo info) { | public MemoryBlock(Target target, String exp, int wordSize, boolean isLittle, MIDataReadMemoryInfo info) { | public MemoryBlock(Target target, String exp, int wordSize, MIDataReadMemoryInfo info) { super(target); expression = exp; fWordSize = wordSize; frozen = true; setMIDataReadMemoryInfo(info); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/28ea0386703035f99cb52c53a105fb4be4a6a174/MemoryBlock.java/buggy/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MemoryBlock.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
9251,
1768,
12,
2326,
1018,
16,
514,
1329,
16,
509,
2076,
1225,
16,
490,
734,
396,
1994,
6031,
966,
1123,
13,
288,
202,
202,
9565,
12,
3299,
1769,
202,
202,
8692,
273,
1329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9251,
1768,
12,
2326,
1018,
16,
514,
1329,
16,
509,
2076,
1225,
16,
490,
734,
396,
1994,
6031,
966,
1123,
13,
288,
202,
202,
9565,
12,
3299,
1769,
202,
202,
8692,
273,
1329,
... |
boolean checkCurrentState(PollState lastOrCurrentPoll, Tallier results, NodeState nodeState, boolean reportOnly) throws IOException { logger.debug2("Checking node: "+nodeState.getCachedUrlSet().getUrl()); logger.debug2("State: "+nodeState.getStateString()); switch (nodeState.getState()) { case NodeState.NEEDS_POLL: case NodeState.NEEDS_REPLAY_POLL: // call content poll if (!reportOnly) { logger.debug2("calling content poll"); callContentPoll(new PollSpec(nodeState.getCachedUrlSet())); } return true; case NodeState.CONTENT_LOST: if (!reportOnly) { if ((results!=null) && (results.getCachedUrlSet().getSpec().isRangeRestricted())) { // if ranged, we know the names are accurate from the previous // name poll, so continue as if it had won logger.debug2("sub-dividing under lost ranged content poll"); callContentPollsOnSubNodes(nodeState, results.getCachedUrlSet()); } else { // call name poll if not ranged or no results to use logger.debug2( "lost content poll, state = lost, calling name poll."); callNamePoll(new PollSpec(nodeState.getCachedUrlSet())); } } return true; case NodeState.UNREPAIRABLE_NAMES_NEEDS_POLL: // call name poll if (!reportOnly) { logger.debug2("calling name poll"); callNamePoll(new PollSpec(nodeState.getCachedUrlSet())); } return true; case NodeState.CONTENT_RUNNING: case NodeState.CONTENT_REPLAYING: case NodeState.NAME_RUNNING: case NodeState.NAME_REPLAYING: case NodeState.SNCUSS_POLL_RUNNING: case NodeState.SNCUSS_POLL_REPLAYING: // replay poll if mine and not active if (lastOrCurrentPoll instanceof PollHistory) { PollHistory lastHistory = (PollHistory)lastOrCurrentPoll; PollSpec lastPollSpec = new PollSpec(nodeState.getCachedUrlSet(), lastHistory.lwrBound, lastHistory.uprBound); if ((lastHistory.isOurPoll())) { // if should recall and is our incomplete poll if (!pollManager.isPollRunning(lastHistory.getType(), lastPollSpec)) { // if this poll should be running make sure it is running. if (restartNonexpiredPolls || ((lastHistory.startTime + lastHistory.duration) < TimeBase.nowMs())) { // only restart if it has expired, since other caches will still be // running it otherwise if (!reportOnly) { logger.debug("Re-calling last unfinished poll."); logger.debug2("lastHistory: " + lastHistory.getTypeString() + ", " + lastHistory.getStatusString() + ", " + sdf.format(new Date(lastHistory.startTime))); // set state appropriately for restart switch (nodeState.getState()) { case NodeState.CONTENT_RUNNING: case NodeState.CONTENT_REPLAYING: nodeState.setState(NodeState.NEEDS_POLL); break; case NodeState.NAME_RUNNING: case NodeState.NAME_REPLAYING: nodeState.setState(NodeState.CONTENT_LOST); break; case NodeState.SNCUSS_POLL_RUNNING: case NodeState.SNCUSS_POLL_REPLAYING: nodeState.setState(NodeState.POSSIBLE_DAMAGE_HERE); } callLastPoll(lastPollSpec, lastHistory); } return true; } else { logger.debug2("Unfinished poll's duration not elapsed, so not"+ " recalling."); } } else { logger.debug2("Unfinished poll already running, so not"+ " recalling."); } } else { logger.debug2("Unfinished poll not mine, so not recalling."); nodeState.setState(NodeState.INITIAL); } } return false; case NodeState.WRONG_NAMES: // go through names, fixing (if have list) // if not active, recall name poll if (!reportOnly) { logger.debug2("lost name poll, collecting repair info."); if (results!=null) { logger.debug2("repairing name list"); Iterator masterIt = results.getCorrectEntries(); List localList = createUrlListFromCusIterator(results.getLocalEntries()); boolean repairMarked = handleWrongNames(masterIt, localList, nodeState, results); if (!repairMarked) { lastOrCurrentPoll.status = PollState.REPAIRED; } } else { logger.debug2("no results found, so recalling name poll"); callNamePoll(new PollSpec(nodeState.getCachedUrlSet())); } } return true; case NodeState.DAMAGE_AT_OR_BELOW: // subdivide or recurse, plus SNCUSS if not ranged if (!reportOnly) { logger.debug2("won name poll (mine), calling content poll on subnodes."); // call a content poll for this node's content if we haven't started // sub-dividing yet (and not an AU url, since they never have content) if ((lastOrCurrentPoll.getLwrBound() == null) && (!nodeState.getCachedUrlSet().getSpec().isAU())) { logger.debug2("calling single node content poll on node's contents"); //XXX once we're checking the content bit in the name poll, // only call SNCP if has content nodeState.setState(NodeState.POSSIBLE_DAMAGE_HERE); callSingleNodeContentPoll(nodeState.getCachedUrlSet()); } else { // no damage here since ranged or top-level logger.debug2("setting to 'possible damage below'"); nodeState.setState(NodeState.POSSIBLE_DAMAGE_BELOW); } // call a content poll on this node's subnodes CachedUrlSet cusToUse = (results!=null ? results.getCachedUrlSet() : nodeState.getCachedUrlSet()); callContentPollsOnSubNodes(nodeState, cusToUse); } return true; case NodeState.POSSIBLE_DAMAGE_HERE: case NodeState.UNREPAIRABLE_SNCUSS_NEEDS_POLL: // call SNCUSS poll if (!reportOnly) { logger.debug2("calling sncuss content poll"); callSingleNodeContentPoll(nodeState.getCachedUrlSet()); } return true; case NodeState.NEEDS_REPAIR: //schedule repair, replay poll (if exists) if (!reportOnly) { logger.debug2("scheduling repair"); //XXX make new poll ahead of time? String pollKey = (results==null ? null : results.getPollKey()); markNodesForRepair(ListUtil.list(nodeState.getCachedUrlSet().getUrl()), pollKey); } return true; case NodeState.UNREPAIRABLE_SNCUSS: //XXX check times, and changed to 'UNREPAIRABLE_XXX_NEEDS_POLL" if long enough // if long enough since first damage, change to 'UNKNOWN' nodeState.setState(NodeState.UNREPAIRABLE_SNCUSS_NEEDS_POLL); return false; case NodeState.UNREPAIRABLE_NAMES: //XXX check times, and changed to 'UNREPAIRABLE_XXX_NEEDS_POLL" if long enough // if long enough since first damage, change to 'UNKNOWN' nodeState.setState(NodeState.UNREPAIRABLE_NAMES_NEEDS_POLL); return false; case NodeState.POSSIBLE_DAMAGE_BELOW: // waiting state // if no results, then in treewalk and should recall any necessary // ranged histories, or clear damage if (results == null) { if (lastOrCurrentPoll instanceof PollHistory) { // check through history to see if action needed on ranged polls PollHistory lastHistory = (PollHistory) lastOrCurrentPoll; if (lastHistory.getLwrBound() != null) { // if ranged, check to see if anything needed logger.debug2("ranged history found. Checking previous histories"); if (checkLastHistory(lastHistory, nodeState, reportOnly)) { // if action needed, stop here logger.debug2("action taken on histories"); return true; } } } // otherwise, recall poll to clear damage if (!reportOnly) { logger.debug2("re-calling content poll"); callContentPoll(nodeState.getCachedUrlSet(), null, null); } return true; } return false; case NodeState.INITIAL: case NodeState.OK: // check time, switch to NEEDS_POLL if necessary and call toplevel poll if (nodeState.getCachedUrlSet().getSpec().isAU()) { // query the AU if a top level poll should be started if (managedAu.shouldCallTopLevelPoll(auState)) { if (!reportOnly) { nodeState.setState(NodeState.NEEDS_POLL); callTopLevelPoll(); logger.debug("Requested top level poll..."); } return true; } } return false; } return false; } | 8150 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8150/0e98e2d631a7d7abecf443b04f8e7cf5c9580b2f/NodeManagerImpl.java/clean/src/org/lockss/state/NodeManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1250,
1893,
3935,
1119,
12,
19085,
5000,
292,
689,
1162,
3935,
19085,
16,
56,
454,
2453,
4717,
16,
907,
5000,
20680,
1119,
16,
6494,
6006,
3386,
13,
15069,
14106,
95,
4901,
18,
4148,
22,
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,
1250,
1893,
3935,
1119,
12,
19085,
5000,
292,
689,
1162,
3935,
19085,
16,
56,
454,
2453,
4717,
16,
907,
5000,
20680,
1119,
16,
6494,
6006,
3386,
13,
15069,
14106,
95,
4901,
18,
4148,
22,
2932,... | ||
try { Thread.sleep(msecs); } catch(Exception ex) { System.err.println("InterruptTest.sleep(): " + ex); } | try { Thread.sleep(msecs); } catch(Exception ex) { System.err.println("InterruptTest.sleep(): " + ex); } | void sleep(long msecs) { try { Thread.sleep(msecs); } catch(Exception ex) { System.err.println("InterruptTest.sleep(): " + ex); } } | 47927 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47927/dd6282cd73f50a476093653aab3a8de52fc1c5c4/InterruptTest.java/buggy/tests/junit/org/jgroups/tests/InterruptTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
5329,
12,
5748,
18689,
2143,
13,
288,
202,
698,
288,
202,
565,
4884,
18,
19607,
12,
81,
21317,
1769,
202,
97,
202,
14683,
12,
503,
431,
13,
288,
202,
565,
2332,
18,
370,
18,
8222... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
5329,
12,
5748,
18689,
2143,
13,
288,
202,
698,
288,
202,
565,
4884,
18,
19607,
12,
81,
21317,
1769,
202,
97,
202,
14683,
12,
503,
431,
13,
288,
202,
565,
2332,
18,
370,
18,
8222... |
) && !(PsiTreeUtil.findCommonParent(nextSibling,element) instanceof PsiFile) | ) && psiElement != null && !(psiElement instanceof PsiFile) | private static boolean filterJspErrors(final PsiErrorElement element) { PsiElement nextSibling = element.getNextSibling(); if (nextSibling == null) { final PsiFile containingFile = element.getContainingFile(); if (PsiUtil.isInJspFile(containingFile)) { final JspxFileViewProvider viewProvider = (JspxFileViewProvider)containingFile.getViewProvider(); nextSibling = viewProvider.findElementAt(element.getTextOffset() + 1, viewProvider.getTemplateDataLanguage()); } } while (nextSibling instanceof PsiWhiteSpace) { nextSibling = nextSibling.getNextSibling(); } if ((nextSibling instanceof OuterLanguageElement || nextSibling instanceof JspExpression || nextSibling instanceof ELExpressionHolder ) && !(PsiTreeUtil.findCommonParent(nextSibling,element) instanceof PsiFile) // error is not inside jsp text ) { return true; } final XmlAttributeValue parentOfType = PsiTreeUtil.getParentOfType(element, XmlAttributeValue.class); if(parentOfType != null && parentOfType.getUserData(DO_NOT_VALIDATE_KEY) != null) { return true; } final ASTNode astNode = TreeUtil.prevLeaf(element.getNode()); if (astNode != null && astNode.getPsi() instanceof OuterLanguageElement) { return true; } return element.getParent().getUserData(DO_NOT_VALIDATE_KEY) != null; } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/e9bc9eb530c83b46bfdfd38accec819ef71b0f14/HighlightVisitorImpl.java/buggy/codeInsight/impl/com/intellij/codeInsight/daemon/impl/analysis/HighlightVisitorImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
1250,
1034,
21796,
4229,
12,
6385,
453,
7722,
668,
1046,
930,
13,
288,
565,
453,
7722,
1046,
19419,
273,
930,
18,
588,
2134,
10291,
5621,
565,
309,
261,
4285,
10291,
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,
3238,
760,
1250,
1034,
21796,
4229,
12,
6385,
453,
7722,
668,
1046,
930,
13,
288,
565,
453,
7722,
1046,
19419,
273,
930,
18,
588,
2134,
10291,
5621,
565,
309,
261,
4285,
10291,
422,
446,
... |
ICDISharedLibraryManager mgr = session.getSharedLibraryManager(); if (mgr instanceof SharedLibraryManager) { boolean autolib = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IMILaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT); | SharedLibraryManager mgr = session.getSharedLibraryManager(); boolean autolib = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IMILaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT); List p = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, new ArrayList(1)); ICDITarget[] dtargets = session.getTargets(); for (int i = 0; i < dtargets.length; ++i) { Target target = (Target)dtargets[i]; | void initializeLibraries(ILaunchConfiguration config, Session session) throws CDIException { try { ICDISharedLibraryManager mgr = session.getSharedLibraryManager(); if (mgr instanceof SharedLibraryManager) { boolean autolib = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IMILaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT); try { ((SharedLibraryManager)mgr).setAutoLoadSymbols(autolib); } catch (CDIException e) { // ignore this one, cause problems for many gdb. } } List p = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, new ArrayList(1)); if (p.size() > 0) { String[] paths = (String[])p.toArray(new String[0]); mgr.setSharedLibraryPaths(paths); } } catch (CoreException e) { throw new CDIException(MIPlugin.getResourceString("src.GDBServerDebugger.Error_initializing") + e.getMessage()); //$NON-NLS-1$ } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/35a28e136d38016dc2f2f4071f45c4e423b8fc85/GDBServerDebugger.java/clean/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
4046,
31909,
12,
2627,
4760,
1750,
642,
16,
3877,
1339,
13,
1216,
385,
2565,
503,
288,
202,
202,
698,
288,
1082,
202,
2871,
2565,
7887,
9313,
1318,
13333,
273,
1339,
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,
225,
202,
6459,
4046,
31909,
12,
2627,
4760,
1750,
642,
16,
3877,
1339,
13,
1216,
385,
2565,
503,
288,
202,
202,
698,
288,
1082,
202,
2871,
2565,
7887,
9313,
1318,
13333,
273,
1339,
18,
588,
... |
getSingletonClass().defineMethod(name, method); } | getSingletonClass().defineMethod(name, method); } | public void defineSingletonMethod(String name, RubyCallbackMethod method) { getSingletonClass().defineMethod(name, method); } | 48072 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48072/addcb75d5d86d9b1fd628d84d22b74cfc41f078e/RubyObject.java/buggy/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4426,
19571,
1305,
12,
780,
508,
16,
19817,
2428,
1305,
707,
13,
288,
3639,
31662,
797,
7675,
11255,
1305,
12,
529,
16,
707,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4426,
19571,
1305,
12,
780,
508,
16,
19817,
2428,
1305,
707,
13,
288,
3639,
31662,
797,
7675,
11255,
1305,
12,
529,
16,
707,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
... |
} | private void cleanup() throws IOException { //Iterate through the temp files and delete them all, except the one representing this filemanager. String[] files = managerRoot.list(); for (int i = 0; i < files.length; i++) { if (files[i].endsWith(".instance") && instanceFile!= null && !files[i].equalsIgnoreCase(instanceFile.getName())) { //$NON-NLS-1$ Locker tmpLocker = BasicLocation.createLocker(new File(managerRoot, files[i]), lockMode); if (tmpLocker.lock()) { //If I can lock it is a file that has been left behind by a crash new File(managerRoot, files[i]).delete(); tmpLocker.release(); } else { tmpLocker.release(); return; //The file is still being locked by somebody else } } } //If we are here it is because we are the last instance running. After locking the table and getting its latest content, remove all the backup files and change the table //If the exception comes from lock, another instance may have been started after we cleaned up, therefore we abort if (! lock()) throw new IOException(EclipseAdaptorMsg.formatter.getString("fileManager.cannotLock")); //$NON-NLS-1$ try { updateTable(); Collection managedFiles = table.entrySet(); for (Iterator iter = managedFiles.iterator(); iter.hasNext();) { Map.Entry fileEntry = (Map.Entry) iter.next(); String fileName = (String) fileEntry.getKey(); Entry info = (Entry) fileEntry.getValue(); //Because we are cleaning up, we are giving up the values from our table, and we must delete all the files that are not referenced by the table String readId = Integer.toString(info.getWriteId() - 1); deleteCopies(fileName, readId); } } catch (IOException e) { //If the exception comes from the updateTable(), there has been a problem in reading the file. //If an exception occured in the save, then the table won't be up to date! throw e; } finally { release(); } } | 2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/fdca13c8d88b4572353e79e9d1610bcdd85f13cf/FileManager.java/clean/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/osgi/service/datalocation/FileManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
6686,
1435,
1216,
1860,
288,
202,
202,
759,
14916,
3059,
326,
1906,
1390,
471,
1430,
2182,
777,
16,
1335,
326,
1245,
5123,
333,
585,
4181,
18,
202,
202,
780,
8526,
1390,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
6686,
1435,
1216,
1860,
288,
202,
202,
759,
14916,
3059,
326,
1906,
1390,
471,
1430,
2182,
777,
16,
1335,
326,
1245,
5123,
333,
585,
4181,
18,
202,
202,
780,
8526,
1390,
... | |
while (ancestorClass != null) { if (!visitedClasses.add(ancestorClass)) { | while(ancestorClass != null){ if(!visitedClasses.add(ancestorClass)){ | public void visitMethod(@NotNull PsiMethod method) { final PsiClass aClass = method.getContainingClass(); if (aClass == null) { return; } final String methodName = method.getName(); final PsiParameterList parameterList = method.getParameterList(); if (parameterList == null) { return; } final PsiParameter[] parameters = parameterList.getParameters(); if (parameters == null) { return; } final int numParameters = parameters.length; PsiClass ancestorClass = aClass.getSuperClass(); final Set<PsiClass> visitedClasses = new HashSet<PsiClass>(); while (ancestorClass != null) { if (!visitedClasses.add(ancestorClass)) { return; } final PsiMethod overridingMethod = ancestorClass.findMethodBySignature(method, false); if (overridingMethod == null) { //don't trigger if there's a method in that class final PsiMethod[] methods = ancestorClass.findMethodsByName(methodName, false); if (methods != null) { for(final PsiMethod testMethod : methods){ final PsiParameterList testParametersList = testMethod.getParameterList(); if(testParametersList == null){ continue; } final int numTestParameters = testParametersList.getParameters().length; if(numParameters != numTestParameters){ continue; } if(testMethod.hasModifierProperty(PsiModifier.PRIVATE)){ registerMethodError(method); return; } } } } ancestorClass = ancestorClass.getSuperClass(); } } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/d6e7604c0e820eb6080db33dc4f7b731664f07e9/MethodOverridesPrivateMethodInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/visibility/MethodOverridesPrivateMethodInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
25138,
26964,
5962,
453,
7722,
1305,
707,
13,
288,
5411,
727,
453,
7722,
797,
20148,
273,
707,
18,
588,
24344,
797,
5621,
5411,
309,
261,
69,
797,
422,
446,
13,
288,
7734,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
25138,
26964,
5962,
453,
7722,
1305,
707,
13,
288,
5411,
727,
453,
7722,
797,
20148,
273,
707,
18,
588,
24344,
797,
5621,
5411,
309,
261,
69,
797,
422,
446,
13,
288,
7734,
32... |
public void testCumulativeProbability001() { | public void testCumulativeProbability001() throws Exception { | public void testCumulativeProbability001() { testProbability(0.005003, .001); } | 9305 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9305/6c07bd13a84d27f6df35a9bf00c46e63b5b17639/ExponentialDistributionTest.java/clean/src/test/org/apache/commons/math/distribution/ExponentialDistributionTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
39,
11276,
25598,
11664,
1435,
1216,
1185,
288,
3639,
1842,
25598,
12,
20,
18,
713,
12483,
23,
16,
263,
11664,
1769,
565,
289,
2,
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,
377,
1071,
918,
1842,
39,
11276,
25598,
11664,
1435,
1216,
1185,
288,
3639,
1842,
25598,
12,
20,
18,
713,
12483,
23,
16,
263,
11664,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
return tmp; } | return tmp; } | public static final String getDefaultType(){ String tmp; //Security reads every property in java.security so it //will return this property if it exists. tmp = Security.getProperty( "keystore.type" ); if( tmp == null) tmp = "jks"; return tmp;} | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/929d12f9c1cf27322f4228118023127504d9e8ac/KeyStore.java/buggy/java/security/KeyStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
760,
727,
514,
4829,
559,
1435,
95,
202,
780,
1853,
31,
202,
759,
4368,
6838,
3614,
1272,
316,
2252,
18,
7462,
1427,
518,
225,
202,
759,
20194,
327,
333,
1272,
309,
518,
1704,
18,
225,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
760,
727,
514,
4829,
559,
1435,
95,
202,
780,
1853,
31,
202,
759,
4368,
6838,
3614,
1272,
316,
2252,
18,
7462,
1427,
518,
225,
202,
759,
20194,
327,
333,
1272,
309,
518,
1704,
18,
225,... |
private String getTemplateClassName(String elementName, CmsXmlTemplateFile doc, Hashtable parameters) throws CmsException { | protected String getTemplateClassName(String elementName, CmsXmlTemplateFile doc, Hashtable parameters) throws CmsException { | private String getTemplateClassName(String elementName, CmsXmlTemplateFile doc, Hashtable parameters) throws CmsException { if(parameters.containsKey(elementName + "._CLASS_")) { return (String)parameters.get(elementName + "._CLASS_"); } else { return doc.getSubtemplateClass(elementName); } } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/26399b3bf259491f66515b46dfd684b0d94f650c/CmsXmlTemplate.java/buggy/src/com/opencms/template/CmsXmlTemplate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
10646,
3834,
12,
780,
14453,
16,
16084,
2283,
812,
997,
16,
18559,
1472,
13,
1216,
11228,
288,
3639,
309,
12,
3977,
18,
12298,
653,
12,
2956,
461,
397,
3552,
67,
5237,
9548,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
10646,
3834,
12,
780,
14453,
16,
16084,
2283,
812,
997,
16,
18559,
1472,
13,
1216,
11228,
288,
3639,
309,
12,
3977,
18,
12298,
653,
12,
2956,
461,
397,
3552,
67,
5237,
9548,
... |
|| referenceMeasurement > 2500) | || referenceMeasurement > 2500) { System.out.println("ERROR in parameters while constructing start-of-auth packet!"); | public boolean startAuthenticationWith(int remoteRelateId, byte[] nonce, byte[] rfMessage, int rounds, int bitsPerRound, int referenceMeasurement) { if (nonce.length != 16 || rfMessage.length != 16 || rounds < 2 || rounds > 255 || remoteRelateId < 0 || remoteRelateId > 255 || bitsPerRound < 1 || referenceMeasurement > 2500) // TODO: this should actually be an exception, since this is a sanity check for something that shouldn't happen return false; byte msg[] = new byte[37]; msg[0] = AUTHENTICATION_START_SIGN; msg[1] = (byte) remoteRelateId; System.arraycopy(nonce, 0, msg, 2, nonce.length); System.arraycopy(rfMessage, 0, msg, 2+nonce.length, rfMessage.length); msg[2+nonce.length+rfMessage.length] = (byte) rounds; msg[3+nonce.length+rfMessage.length] = (byte) bitsPerRound; msg[3+nonce.length+rfMessage.length] = (byte) (referenceMeasurement >> 8); msg[4+nonce.length+rfMessage.length] = (byte) (referenceMeasurement & 0xff); try { return commHelper.sendMessage(msg, 100*msg.length); } catch (PortInUseException e) { return false; } catch (IOException e) { return false; } } | 14316 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14316/deea45298659a1a1ca7bc9893aa0e9cfc4503794/SerialConnector.java/clean/src/uk/ac/lancs/relate/SerialConnector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
787,
6492,
1190,
12,
474,
2632,
1971,
340,
548,
16,
1160,
8526,
7448,
16,
1160,
8526,
9075,
1079,
16,
509,
21196,
16,
509,
4125,
2173,
11066,
16,
509,
2114,
17933,
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,
225,
202,
482,
1250,
787,
6492,
1190,
12,
474,
2632,
1971,
340,
548,
16,
1160,
8526,
7448,
16,
1160,
8526,
9075,
1079,
16,
509,
21196,
16,
509,
4125,
2173,
11066,
16,
509,
2114,
17933,
13,
2... |
} String keywords = rd.getKeywords(); if (keywords != null) { if (appendchar.equals("&")) newXML.append("&keywords=" + keywords); else newXML.append(keywords); } else { Enumeration e=rd.getParameterNames (); if (e!=null) { while (e.hasMoreElements ()) { String pName = (String) e.nextElement (); if ( !pName.startsWith("cw_") && !pName.startsWith("upc_") && !pName.trim().equals("")) { String[] value_array = rd.getParameterValues(pName); int i = 0; while ( i < value_array.length ) { newXML.append(appendchar); appendchar = "&"; newXML.append(pName); newXML.append("="); newXML.append(URLEncoder.encode(value_array[i++])); } } } | public void setRuntimeData (ChannelRuntimeData rd, String uid) { ChannelState state = (ChannelState)stateTable.get(uid); if (state == null) LogService.log(LogService.ERROR,"CWebProxy:setRuntimeData() : attempting to access a non-established channel! setStaticData() hasn't been called on uid=\""+uid+"\""); else { state.runtimeData = rd; if ( rd.isEmpty() && (state.refresh != -1) ) { // A refresh-- State remains the same. if ( state.buttonxmlUri != null ) { state.key = state.buttonxmlUri; state.fullxmlUri = state.buttonxmlUri; state.refresh = 0; } else { if ( state.refresh == 0 ) state.key = state.fullxmlUri; state.fullxmlUri = state.xmlUri; state.refresh = 1; } } else { state.refresh = 0; String xmlUri = state.runtimeData.getParameter("cw_xml"); if (xmlUri != null) { state.xmlUri = xmlUri; // don't need an explicit reset if a new URI is provided. state.buttonxmlUri = null; } String sslUri = state.runtimeData.getParameter("cw_ssl"); if (sslUri != null) state.sslUri = sslUri; String xslTitle = state.runtimeData.getParameter("cw_xslTitle"); if (xslTitle != null) state.xslTitle = xslTitle; String xslUri = state.runtimeData.getParameter("cw_xsl"); if (xslUri != null) state.xslUri = xslUri; String passThrough = state.runtimeData.getParameter("cw_passThrough"); if (passThrough != null) state.passThrough = passThrough; String person = state.runtimeData.getParameter("cw_person"); if (person == null) person = state.person; String tidy = state.runtimeData.getParameter("cw_tidy"); if (tidy != null) state.tidy = tidy; String infoUri = state.runtimeData.getParameter("cw_info"); if (infoUri != null) state.infoUri = infoUri; String editUri = state.runtimeData.getParameter("cw_edit"); if (editUri != null) state.editUri = editUri; String helpUri = state.runtimeData.getParameter("cw_help"); if (helpUri != null) state.helpUri = helpUri; String cacheTimeout = state.runtimeData.getParameter("cw_cacheDefaultTimeout"); if (cacheTimeout != null) state.cacheDefaultTimeout = Long.parseLong(cacheTimeout); cacheTimeout = state.runtimeData.getParameter("cw_cacheTimeout"); if (cacheTimeout != null) state.cacheTimeout = Long.parseLong(cacheTimeout); else state.cacheTimeout = state.cacheDefaultTimeout; String cacheDefaultMode = state.runtimeData.getParameter("cw_cacheDefaultMode"); if (cacheDefaultMode != null) { state.cacheDefaultMode = cacheDefaultMode; } String cacheMode = state.runtimeData.getParameter("cw_cacheMode"); if (cacheMode != null) { state.cacheMode = cacheMode; } else state.cacheMode = state.cacheDefaultMode; // reset is a one-time thing. String reset = state.runtimeData.getParameter("cw_reset"); if (reset != null) { if (reset.equalsIgnoreCase("return")) { state.buttonxmlUri = null; } } if ( state.buttonxmlUri != null ) // shouldn't happen here, but... state.fullxmlUri = state.buttonxmlUri; else { // Is this a case where we need to pass request parameters to the xmlURI? if ( state.passThrough != null && !state.passThrough.equalsIgnoreCase("none") && ( state.passThrough.equalsIgnoreCase("all") || state.passThrough.equalsIgnoreCase("application") || rd.getParameter("cw_inChannelLink") != null ) ) { //LogService.log(LogService.DEBUG, "CWebProxy: xmlUri is " + state.xmlUri); StringBuffer newXML = new StringBuffer(); String appendchar = ""; // here add in attributes according to cw_person if (person != null && state.personAllow_set != null) { StringTokenizer st = new StringTokenizer(person,","); if (st != null) { while (st.hasMoreElements ()) { String pName = st.nextToken(); if ((pName!=null)&&(!pName.trim().equals(""))) { if ( state.personAllow.trim().equals("*") || state.personAllow_set.contains(pName) ) { newXML.append(appendchar); appendchar = "&"; newXML.append(pName); newXML.append("="); // note, this only gets the first one if it's a // java.util.Vector. Should check String pVal = (String)state.iperson.getAttribute(pName); if (pVal != null) newXML.append(URLEncoder.encode(pVal)); } else { LogService.log(LogService.INFO, "CWebProxy: request to pass " + pName + " denied."); } } } } } // end cw_person code // keyword and parameter processing // NOTE: if both exist, only keywords are appended String keywords = rd.getKeywords(); if (keywords != null) { if (appendchar.equals("&")) newXML.append("&keywords=" + keywords); else newXML.append(keywords); } else { // want all runtime parameters not specific to WebProxy Enumeration e=rd.getParameterNames (); if (e!=null) { while (e.hasMoreElements ()) { String pName = (String) e.nextElement (); if ( !pName.startsWith("cw_") && !pName.startsWith("upc_") && !pName.trim().equals("")) { String[] value_array = rd.getParameterValues(pName); int i = 0; while ( i < value_array.length ) { newXML.append(appendchar); appendchar = "&"; newXML.append(pName); newXML.append("="); newXML.append(URLEncoder.encode(value_array[i++])); } } } } } state.reqParameters = newXML.toString(); state.fullxmlUri = state.xmlUri; if (!state.runtimeData.getHttpRequestMethod().equals("POST")){ if ((state.reqParameters!=null) && (!state.reqParameters.trim().equals(""))){ appendchar = (state.xmlUri.indexOf('?') == -1) ? "?" : "&"; state.fullxmlUri = state.fullxmlUri+appendchar+state.reqParameters; } state.reqParameters = null; } //LogService.log(LogService.DEBUG, "CWebProxy: fullxmlUri now: " + state.fullxmlUri); } } state.key = state.fullxmlUri; } } } | 24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/0bebac4cde4f5d625f6d5906816cf47a4d4abbb3/CWebProxy.java/clean/source/org/jasig/portal/channels/webproxy/CWebProxy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
5576,
751,
261,
2909,
5576,
751,
9437,
16,
514,
4555,
13,
225,
288,
377,
5307,
1119,
919,
273,
261,
2909,
1119,
13,
2019,
1388,
18,
588,
12,
1911,
1769,
377,
309,
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,
1071,
918,
444,
5576,
751,
261,
2909,
5576,
751,
9437,
16,
514,
4555,
13,
225,
288,
377,
5307,
1119,
919,
273,
261,
2909,
1119,
13,
2019,
1388,
18,
588,
12,
1911,
1769,
377,
309,
261,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.