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 |
|---|---|---|---|---|---|---|
menuItem.setOpaque(true); | protected void installDefaults() { LookAndFeel.installBorder(menuItem, "Menu.border"); LookAndFeel.installColorsAndFont(menuItem, "Menu.background", "Menu.foreground", "Menu.font"); menuItem.setMargin(UIManager.getInsets("Menu.margin")); acceleratorFont = UIManager.getFont("Menu.acceleratorFont"); acceleratorForeground = UIManager.getColor("Menu.acceleratorForeground"); acceleratorSelectionForeground = UIManager.getColor("Menu.acceleratorSelectionForeground"); selectionBackground = UIManager.getColor("Menu.selectionBackground"); selectionForeground = UIManager.getColor("Menu.selectionForeground"); arrowIcon = UIManager.getIcon("Menu.arrowIcon"); oldBorderPainted = UIManager.getBoolean("Menu.borderPainted"); menuItem.setOpaque(true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/badba23052f905d992da7c32124c28f4339931fc/BasicMenuUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
3799,
7019,
1435,
225,
288,
565,
10176,
1876,
2954,
292,
18,
5425,
8107,
12,
5414,
1180,
16,
315,
4599,
18,
8815,
8863,
565,
10176,
1876,
2954,
292,
18,
5425,
12570,
1876,
5711... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3799,
7019,
1435,
225,
288,
565,
10176,
1876,
2954,
292,
18,
5425,
8107,
12,
5414,
1180,
16,
315,
4599,
18,
8815,
8863,
565,
10176,
1876,
2954,
292,
18,
5425,
12570,
1876,
5711... | |
if(sender_win != null) sender_win.stop(); } | if(sender_win != null) sender_win.stop(); } | void stop() { if(sender_win != null) sender_win.stop(); } | 3550 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3550/3a7a5d6ef9a8f574da3e45b696950d0b4bb12acc/NAKACK.java/clean/src/org/jgroups/protocols/NAKACK.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
2132,
1435,
288,
202,
565,
309,
12,
15330,
67,
8082,
480,
446,
13,
202,
202,
15330,
67,
8082,
18,
5681,
5621,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
2132,
1435,
288,
202,
565,
309,
12,
15330,
67,
8082,
480,
446,
13,
202,
202,
15330,
67,
8082,
18,
5681,
5621,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if (shouldFilterPurple()) { | if (count == 1 && shouldFilterPurple()) { | final boolean collectCycles(boolean time) { collectedCycles = false; if (shouldFilterPurple()) { long filterStart = VM_Interface.cycles(); long finishTarget = Plan.getTimeCap(); long remaining = finishTarget - filterStart; long targetTime = filterStart+(remaining/FILTER_TIME_FRACTION); long gcTimeCap = VM_Interface.millisToCycles(Options.gcTimeCap); if (remaining > gcTimeCap/FILTER_TIME_FRACTION) { filterPurpleBufs(targetTime); processFreeBufs(); if (shouldCollectCycles()) { if (Options.verbose > 0) { Log.write("(CD "); Log.flush(); } long cycleStart = VM_Interface.cycles(); remaining = finishTarget - cycleStart; boolean abort = false; while (maturePurplePool.enqueuedPages()> 0 && !abort && remaining > gcTimeCap/CYCLE_TIME_FRACTION) { abort = collectSomeCycles(time, finishTarget); remaining = finishTarget - VM_Interface.cycles(); } flushFilteredPurpleBufs(); if (Options.verbose > 0) { Log.write(VM_Interface.cyclesToMillis(VM_Interface.cycles() - cycleStart)); Log.write(" ms)"); } } } } lastPurplePages = Plan.getMetaDataPagesUsed(); return collectedCycles; } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/bf52d2bec7c1cae6546b5cf46366a9175b0b74c5/TrialDeletion.java/buggy/rvm/src/vm/memoryManagers/JMTk/utility/TrialDeletion.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1250,
3274,
17992,
9558,
12,
6494,
813,
13,
288,
565,
12230,
17992,
9558,
273,
629,
31,
565,
309,
261,
1883,
422,
404,
597,
1410,
1586,
10262,
1802,
10756,
288,
1377,
1525,
1034,
168... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1250,
3274,
17992,
9558,
12,
6494,
813,
13,
288,
565,
12230,
17992,
9558,
273,
629,
31,
565,
309,
261,
1883,
422,
404,
597,
1410,
1586,
10262,
1802,
10756,
288,
1377,
1525,
1034,
168... |
lexState = LexState.EXPR_END; if(lDyn) { if (token.getLength() > 0) { list.add(new StrNode(token.getPosition(), token.getToken())); } list.setOptions(options | kcode); list.setOnce(once); yaccValue = list; return Token.tDREGEXP; } /* StringBuffer buffer = new StringBuffer(); Iterator iter = list.iterator(); while (iter.hasNext()) { Object next = iter.next(); if (next instanceof StrNode) { buffer.append(((StrNode) next).getValue()); } else { list.setOptions(options | kcode); list.setOnce(once); yaccValue = list; return Token.tDREGEXP; } } yaccValue = new RegexpNode(position, buffer.toString(), options | kcode); */ yaccValue = new RegexpNode(position, token.getToken(), options | kcode); return Token.tREGEXP; } | lexState = LexState.EXPR_END; if (lDyn) { if (token.getLength() > 0) { list.add(new StrNode(token.getPosition(), token.getToken())); } list.setOptions(options | kcode); list.setOnce(once); yaccValue = list; return Token.tDREGEXP; } /* StringBuffer buffer = new StringBuffer(); Iterator iter = list.iterator(); while (iter.hasNext()) { Object next = iter.next(); if (next instanceof StrNode) { buffer.append(((StrNode) next).getValue()); } else { list.setOptions(options | kcode); list.setOnce(once); yaccValue = list; return Token.tDREGEXP; } } yaccValue = new RegexpNode(position, buffer.toString(), options | kcode); */ yaccValue = new RegexpNode(position, token.getToken(), options | kcode); return Token.tREGEXP; } | private int parseRegexp(char closeQuote, char openQuote) { ISourcePosition position = support.getPosition(); DRegexpNode list = new DRegexpNode(position); StringToken token = new StringToken(support, errorHandler, position); int nest = 0; boolean lDyn = false; for (char c = support.read(); c != '\0' && (c != closeQuote || nest != 0); c = support.read()) { switch (c) { case '#' : try { lDyn = parseExpressionString(list, closeQuote, token) || lDyn; } catch (EOFException e) { errorHandler.handleError(IErrors.COMPILE_ERROR, position, Messages.getString("unterminated_regexp")); //$NON-NLS-1$ return 0; } continue; case '\\' : try { token.appendEscape(closeQuote); } catch (EOFException e) { return 0; } continue; case '\0' : errorHandler.handleError(IErrors.COMPILE_ERROR, position, Messages.getString("unterminated_regexp")); //$NON-NLS-1$ return 0; default : if (openQuote != '\0') { if (c == openQuote) { nest++; } else if (c == closeQuote) { nest--; } } } token.append(c); } int options = 0; boolean once = false; byte kcode = 0; for (char c = support.read();; c = support.read()) { switch (c) { case 'i' : options |= ReOptions.RE_OPTION_IGNORECASE; continue; case 'x' : options |= ReOptions.RE_OPTION_EXTENDED; continue; case 'p' : // /p is obsolete errorHandler.handleError(IErrors.WARN, position, Messages.getString("opsolete_slash_p_option")); //$NON-NLS-1$ options |= ReOptions.RE_OPTION_POSIXLINE; continue; case 'm' : options |= ReOptions.RE_OPTION_MULTILINE; continue; case 'o' : once = true; break; case 'n' : kcode = 16; continue; case 'e' : kcode = 32; continue; case 's' : kcode = 48; continue; case 'u' : kcode = 64; continue; default : support.unread(); } break; } lexState = LexState.EXPR_END; if(lDyn) { if (token.getLength() > 0) { list.add(new StrNode(token.getPosition(), token.getToken())); } list.setOptions(options | kcode); list.setOnce(once); yaccValue = list; return Token.tDREGEXP; } //Benoit: this is not needed, I think that if we arrive here //(if the string is not dynamic) there is only one element in the list //and it is the content of token /* StringBuffer buffer = new StringBuffer(); Iterator iter = list.iterator(); while (iter.hasNext()) { Object next = iter.next(); if (next instanceof StrNode) { buffer.append(((StrNode) next).getValue()); } else { list.setOptions(options | kcode); list.setOnce(once); yaccValue = list; return Token.tDREGEXP; } } yaccValue = new RegexpNode(position, buffer.toString(), options | kcode); */ yaccValue = new RegexpNode(position, token.getToken(), options | kcode); return Token.tREGEXP; } | 47984 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47984/af104711597d4d5b2089320e2517b95b8df14492/RubyYaccLexer.java/clean/org/jruby/lexer/yacc/RubyYaccLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
509,
1109,
14621,
12,
3001,
1746,
10257,
16,
1149,
1696,
10257,
13,
288,
202,
202,
45,
1830,
2555,
1754,
273,
2865,
18,
588,
2555,
5621,
202,
202,
40,
14621,
907,
666,
273,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
509,
1109,
14621,
12,
3001,
1746,
10257,
16,
1149,
1696,
10257,
13,
288,
202,
202,
45,
1830,
2555,
1754,
273,
2865,
18,
588,
2555,
5621,
202,
202,
40,
14621,
907,
666,
273,
3... |
this.getRegExp(pos, mRegExp,mText); | this.getRegExp(pos, mRegExp, mText); | private boolean isBreakPointReached() { IP_Position pos = getCurrent_IP_Position(); PerlBreakpoint bp = mActiveBreakpoints.getBreakpointForLocation( pos.get_IP_Path(), pos.get_IP_Line()); if (bp != null) { if (bp instanceof PerlRegExpBreakpoint) { mRegExp = new StringBuffer(); mText = new StringBuffer(); this.getRegExp(pos, mRegExp,mText); // show view Shell shell = PerlDebugPlugin.getActiveWorkbenchShell(); if (shell != null) { shell.getDisplay().syncExec(new Runnable() { public void run() { RegExpView view = null; IWorkbenchPage activePage = PerlDebugPlugin .getWorkbenchWindow() .getActivePage(); try { view = (RegExpView) activePage.showView( "org.epic.regexp.views.RegExpView"); } catch (PartInitException e) { // TODO Auto-generated catch block e.printStackTrace(); } view.setRegExpText(mRegExp.toString()); view.setMatchText(mText.toString()); } }); } } return true; } return false; } | 48756 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48756/4f81787a2d23f94f26be1df973be28848897fde6/PerlDB.java/clean/org.epic.debug/src/org/epic/debug/PerlDB.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
353,
7634,
2148,
23646,
1435,
202,
95,
202,
202,
2579,
67,
2555,
949,
273,
5175,
67,
2579,
67,
2555,
5621,
202,
202,
2173,
80,
20552,
9107,
273,
1082,
202,
81,
3896,
76... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
353,
7634,
2148,
23646,
1435,
202,
95,
202,
202,
2579,
67,
2555,
949,
273,
5175,
67,
2579,
67,
2555,
5621,
202,
202,
2173,
80,
20552,
9107,
273,
1082,
202,
81,
3896,
76... |
ttm.setInitialDelay(100); | ttm.setInitialDelay(200); | public void mouseEntered(MouseEvent evt) { ToolTipManager ttm = ToolTipManager.sharedInstance(); toolTipInitialDelay = ttm.getInitialDelay(); toolTipReshowDelay = ttm.getReshowDelay(); ttm.setInitialDelay(100); ttm.setReshowDelay(0); } | 6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/6c0781f36556ba8818343e7a0f788e90ce59a7cd/HelpfulJTree.java/buggy/org/gjt/sp/jedit/browser/HelpfulJTree.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
7644,
10237,
329,
12,
9186,
1133,
6324,
13,
202,
95,
202,
202,
29250,
1318,
3574,
81,
273,
13288,
14189,
1318,
18,
11574,
1442,
5621,
202,
202,
6738,
14189,
4435,
6763,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
7644,
10237,
329,
12,
9186,
1133,
6324,
13,
202,
95,
202,
202,
29250,
1318,
3574,
81,
273,
13288,
14189,
1318,
18,
11574,
1442,
5621,
202,
202,
6738,
14189,
4435,
6763,
273... |
char[] buf = t.grabDumpBuffer(); | char[] buf = VM_Thread.grabDumpBuffer(); | private static void writeThreadIdToLog(VM_Thread t) { char[] buf = t.grabDumpBuffer(); int len = t.dump(buf); Log.write(buf, len); t.releaseDumpBuffer(); } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/b456534d9b99de463325c8cc3907b41fc605cb4c/Lock.java/buggy/rvm/src/vm/memoryManagers/JMTk/vmInterface/Lock.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
1045,
3830,
28803,
1343,
12,
7397,
67,
3830,
268,
13,
288,
565,
1149,
8526,
1681,
273,
8251,
67,
3830,
18,
2752,
70,
10628,
1892,
5621,
565,
509,
562,
273,
268,
18,
8481... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
1045,
3830,
28803,
1343,
12,
7397,
67,
3830,
268,
13,
288,
565,
1149,
8526,
1681,
273,
8251,
67,
3830,
18,
2752,
70,
10628,
1892,
5621,
565,
509,
562,
273,
268,
18,
8481... |
private PackedObjectReader last; | private PackedObjectReader last; | public Iterator iterator() { try { packStream.position(SIGNATURE.length + 2 * 4); } catch (IOException ioe) { throw new RuntimeException("Can't iterate entries.", ioe); } return new Iterator() { private long current = 0; private PackedObjectReader last; public boolean hasNext() { return current < objectCnt; } public Object next() { if (!hasNext()) { throw new IllegalStateException("No more items."); } try { // If the caller did not absorb the object data then we // must do so now otherwise we will try to parse zipped // data as though it were an object header. // if (last != null && last.getDataOffset() == packStream.position()) { final Inflater inf = new Inflater(); try { final byte[] input = new byte[1024]; final byte[] output = new byte[1024]; while (!inf.finished()) { if (inf.needsInput()) { packStream.mark(input.length); lastRead = packStream.read(input); inf.setInput(input, 0, lastRead); } inf.inflate(output); } unread(-1, inf.getRemaining()); } catch (DataFormatException dfe) { throw new RuntimeException("Cannot absorb packed" + " object data as the pack is corrupt.", dfe); } finally { inf.end(); } } current++; last = reader(); return last; } catch (IOException e) { throw new RuntimeException("Can't read next pack entry.", e); } } public void remove() { throw new UnsupportedOperationException("Remove pack entry."); } }; } | 45532 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45532/a4e486719ce78b8050373e6534dfaf4a1572b269/PackReader.java/clean/org.spearce.jgit/src/org/spearce/jgit/lib/PackReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4498,
2775,
1435,
565,
288,
3639,
775,
3639,
288,
5411,
2298,
1228,
18,
3276,
12,
26587,
18,
2469,
397,
576,
380,
1059,
1769,
3639,
289,
3639,
1044,
261,
14106,
10847,
13,
3639,
288... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4498,
2775,
1435,
565,
288,
3639,
775,
3639,
288,
5411,
2298,
1228,
18,
3276,
12,
26587,
18,
2469,
397,
576,
380,
1059,
1769,
3639,
289,
3639,
1044,
261,
14106,
10847,
13,
3639,
288... |
} catch (InterruptedException e) { | } catch (InterruptedException e) { | public boolean performFinish() { WorkspaceModifyOperation op= new WorkspaceModifyOperation() { protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException { finishPage(monitor); } }; try { getContainer().run(false, true, op); } catch (InvocationTargetException e) { return false; // TODO: should open error dialog and log } catch (InterruptedException e) { return false; // canceled } return true; } | 2719 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2719/a015df8aa2b9981ea3b42d009efd3ad9d12b83ae/NewProjectWizard.java/buggy/tools/eclipse/plugins/org.apache.forrest/src/org/apache/forrest/eclipse/wizards/NewProjectWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3073,
11641,
1435,
288,
202,
202,
8241,
11047,
2988,
1061,
33,
394,
14396,
11047,
2988,
1435,
288,
1082,
202,
1117,
918,
1836,
12,
45,
5491,
7187,
6438,
13,
1216,
30015,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3073,
11641,
1435,
288,
202,
202,
8241,
11047,
2988,
1061,
33,
394,
14396,
11047,
2988,
1435,
288,
1082,
202,
1117,
918,
1836,
12,
45,
5491,
7187,
6438,
13,
1216,
30015,
1... |
public Calendar getCollectionCalendar() throws DavException { if (!isCalendarCollection()) { | public Calendar getCollectionCalendar() throws DavException { if (! isCalendarCollection()) { | public Calendar getCollectionCalendar() throws DavException { if (!isCalendarCollection()) { return null; } try { return JcrCalendarMapper.nodeToCalendar(getNode()); } catch (RepositoryException e) { throw new JcrDavException(e); } } | 47226 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47226/145f0ab5de3ac56e09fd5f3c725e84fb703cf8eb/CosmoDavResourceImpl.java/buggy/src/main/java/org/osaf/cosmo/dav/impl/CosmoDavResourceImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5542,
12075,
7335,
1435,
1216,
463,
842,
503,
288,
3639,
309,
16051,
291,
7335,
2532,
10756,
288,
5411,
327,
446,
31,
3639,
289,
3639,
775,
288,
5411,
327,
22481,
7335,
4597,
18,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5542,
12075,
7335,
1435,
1216,
463,
842,
503,
288,
3639,
309,
16051,
291,
7335,
2532,
10756,
288,
5411,
327,
446,
31,
3639,
289,
3639,
775,
288,
5411,
327,
22481,
7335,
4597,
18,
21... |
protected void bindJndiBeanRefs(EnterpriseBeanInfo bean, IvmContext root){ /*TODO: Add better exception handling. This method doesn't throws any exceptions!! there is a lot of complex code here, I'm sure something could go wrong the user might want to know about. At the very least, log a warning or two. */ if(bean.jndiEnc == null || bean.jndiEnc.ejbReferences == null) return; EjbReferenceInfo reference = null; for (int i=0; i< bean.jndiEnc.ejbReferences.length; i++){ reference = bean.jndiEnc.ejbReferences[i]; Object ref = null; if (!reference.location.remote){ String jndiName = "java:openejb/ejb/"+reference.location.ejbDeploymentId; Reference ref2 = new IntraVmJndiReference( jndiName ); if(StatefulBeanInfo.class.isAssignableFrom(bean.getClass())) ref = new org.openejb.core.stateful.EncReference( ref2 ); else if(StatelessBeanInfo.class.isAssignableFrom(bean.getClass())) ref = new org.openejb.core.stateless.EncReference( ref2 ); else ref = new org.openejb.core.entity.EncReference( ref2 ); }else{ String openEjbSubContextName = "java:openejb/remote_jndi_contexts/"+reference.location.jndiContextId; String jndiName = reference.location.remoteRefName; Reference ref2 = new JndiReference( openEjbSubContextName, jndiName ); if(StatefulBeanInfo.class.isAssignableFrom(bean.getClass())) ref = new org.openejb.core.stateful.EncReference( ref2 ); else if(StatelessBeanInfo.class.isAssignableFrom(bean.getClass())) ref = new org.openejb.core.stateless.EncReference( ref2 ); else ref = new org.openejb.core.entity.EncReference( ref2 ); } if(ref!=null){ try{ root.bind(prefixForBinding(reference.referenceName), ref); }catch(Exception e){ // TODO: Something more constructive. e.printStackTrace();throw new RuntimeException(); } } } } | 47052 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47052/4f52760bc3704be4f698b6ed3a2b5ae33ca1fa83/AssemblerTool.java/buggy/openejb1/modules/core/src/java/org/openejb/alt/assembler/classic/AssemblerTool.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
225,
918,
1993,
46,
16564,
3381,
9837,
12,
30699,
3381,
966,
3931,
16,
467,
3489,
1042,
1365,
15329,
3639,
1748,
6241,
30,
1436,
7844,
1520,
5057,
18,
225,
1220,
707,
3302,
1404,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
225,
918,
1993,
46,
16564,
3381,
9837,
12,
30699,
3381,
966,
3931,
16,
467,
3489,
1042,
1365,
15329,
3639,
1748,
6241,
30,
1436,
7844,
1520,
5057,
18,
225,
1220,
707,
3302,
1404,
12... | ||
out.write(BUNDLEDATA_VERSION); | out.writeByte(BUNDLEDATA_VERSION); | public void saveMetaData() { File metadata = LocationManager.getConfigurationFile(LocationManager.BUNDLE_DATA_FILE); // the cache and the state match if (timeStamp == stateManager.getSystemState().getTimeStamp() && metadata.isFile()) return; try { DataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(metadata))); try { out.write(BUNDLEDATA_VERSION); out.writeLong(stateManager.getSystemState().getTimeStamp()); out.writeUTF(installURL); out.writeInt(initialBundleStartLevel); out.writeLong(nextId); Bundle[] bundles = context.getBundles(); out.writeInt(bundles.length); for (int i = 0; i < bundles.length; i++) { long id = bundles[i].getBundleId(); out.writeLong(id); if (id != 0) { BundleData data = ((org.eclipse.osgi.framework.internal.core.AbstractBundle) bundles[i]).getBundleData(); saveMetaDataFor(data, out); } } } finally { out.close(); } } catch (IOException e) { if (Debug.DEBUG && Debug.DEBUG_GENERAL) { Debug.println("Error writing framework metadata: " + e.getMessage()); //$NON-NLS-1$ Debug.printStackTrace(e); } } } | 2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/defba740f8e707c069a9eaaff8d09a121000d025/EclipseAdaptor.java/buggy/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseAdaptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1923,
6998,
1435,
288,
202,
202,
812,
1982,
273,
7050,
1318,
18,
588,
1750,
812,
12,
2735,
1318,
18,
30245,
67,
4883,
67,
3776,
1769,
202,
202,
759,
326,
1247,
471,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1923,
6998,
1435,
288,
202,
202,
812,
1982,
273,
7050,
1318,
18,
588,
1750,
812,
12,
2735,
1318,
18,
30245,
67,
4883,
67,
3776,
1769,
202,
202,
759,
326,
1247,
471,
326,
... |
{ PlaneDef def = new PlaneDef(PlaneDef.XY, t); def.setZ(z); RenderImage renderImage = new RenderImage(curPixelsID, def); registry.getEventBus().post(renderImage); } | { PlaneDef def = new PlaneDef(PlaneDef.XY, t); def.setZ(z); renderingControl.setDefaultZ(z); renderingControl.setDefaultT(t); RenderImage renderImage = new RenderImage(curPixelsID, def); registry.getEventBus().post(renderImage); } | void onPlaneSelected(int z, int t) { PlaneDef def = new PlaneDef(PlaneDef.XY, t); def.setZ(z); RenderImage renderImage = new RenderImage(curPixelsID, def); registry.getEventBus().post(renderImage); } | 55636 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55636/a81a5a58f8e54d006d057455465766c8d3d72998/Viewer.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/Viewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
603,
19505,
7416,
12,
474,
998,
16,
509,
268,
13,
202,
95,
202,
202,
19505,
3262,
1652,
273,
394,
3008,
8806,
3262,
12,
19505,
3262,
18,
8546,
16,
268,
1769,
202,
202,
536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
603,
19505,
7416,
12,
474,
998,
16,
509,
268,
13,
202,
95,
202,
202,
19505,
3262,
1652,
273,
394,
3008,
8806,
3262,
12,
19505,
3262,
18,
8546,
16,
268,
1769,
202,
202,
536,
... |
entryType = IIndexEncodingConstants.FWD_UNION; | if (name.isDeclaration()) { indexer.getOutput().addFwd_UnionDecl(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET); } else if (name.isReference()) { indexer.getOutput().addFwd_UnionRef(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET); } else if (name.isDeclaration()) { indexer.getOutput().addUnionDecl(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET); } else if (name.isReference()) { indexer.getOutput().addUnionRef(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET); } | private void processNameBinding(IASTName name, IBinding binding, IASTFileLocation loc, int fileNumber) throws DOMException { // determine type EntryType entryType = null; if (binding instanceof ICompositeType) { int compositeKey = ((ICompositeType) binding).getKey(); ASTNodeProperty prop = name.getPropertyInParent(); switch (compositeKey) { case ICompositeType.k_struct: entryType = IIndexEncodingConstants.STRUCT; if (name.isDeclaration() && prop == IASTElaboratedTypeSpecifier.TYPE_NAME) entryType = IIndexEncodingConstants.FWD_STRUCT; break; case ICompositeType.k_union: entryType = IIndexEncodingConstants.UNION; if (name.isDeclaration() && prop == IASTElaboratedTypeSpecifier.TYPE_NAME) entryType = IIndexEncodingConstants.FWD_UNION; break; } } else if (binding instanceof IEnumeration) entryType = IIndexEncodingConstants.ENUM; else if (binding instanceof ITypedef) entryType = IIndexEncodingConstants.TYPEDEF; else if (binding instanceof IEnumerator) entryType = IIndexEncodingConstants.ENUMERATOR; else if (binding instanceof IField) entryType = IIndexEncodingConstants.FIELD; else if (binding instanceof IParameter || binding instanceof IVariable) entryType = IIndexEncodingConstants.VAR; else if (binding instanceof IFunction) entryType = IIndexEncodingConstants.FUNCTION; if (entryType != null) { if (name.isDeclaration()) { indexer.getOutput().addRef(fileNumber,IndexEncoderUtil.encodeEntry( getFullyQualifiedName(name), entryType, ICSearchConstants.DECLARATIONS), loc.getNodeOffset(), loc.getNodeLength(), ICIndexStorageConstants.OFFSET); } else if (name.isReference()) { indexer.getOutput().addRef(fileNumber, IndexEncoderUtil.encodeEntry( getFullyQualifiedName(name), entryType, ICSearchConstants.REFERENCES), loc.getNodeOffset(), loc.getNodeLength(), ICIndexStorageConstants.OFFSET); } } } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/cf1d5bf0d12520585deffeb5e217fc8ff5159112/CGenerateIndexVisitor.java/clean/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/domsourceindexer/CGenerateIndexVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
461,
5250,
12,
45,
9053,
461,
508,
16,
467,
5250,
5085,
16,
467,
9053,
812,
2735,
1515,
16,
509,
585,
1854,
13,
1216,
4703,
503,
288,
3639,
368,
4199,
618,
3639,
3841,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
461,
5250,
12,
45,
9053,
461,
508,
16,
467,
5250,
5085,
16,
467,
9053,
812,
2735,
1515,
16,
509,
585,
1854,
13,
1216,
4703,
503,
288,
3639,
368,
4199,
618,
3639,
3841,
... |
XSLT xslt = XSLT.getTransformer(this, runtimeData.getLocales()); | XSLT xslt = XSLT.getTransformer(this, locales); | public void renderXML(ContentHandler out) throws PortalException { Document doc = DocumentFactory.getNewDocument(); Locale[] locales = lm.getLocales(); // <locales> Element localesE = doc.createElement("locales"); Locale[] portalLocales = lm.getPortalLocales(); for (int i = 0; i < portalLocales.length; i++) { Element locE = doc.createElement("locale"); locE.setAttribute("displayName", portalLocales[i].getDisplayName(locales[0])); locE.setAttribute("code", portalLocales[i].toString()); // Mark which locale is the user's preference if (userLocale != null && userLocale.equals(portalLocales[i])) { locE.setAttribute("selected", "true"); } // <language iso2="..." iso3="..." displayName="..."/> Element languageE = doc.createElement("language"); languageE.setAttribute("iso2", portalLocales[i].getLanguage()); languageE.setAttribute("iso3", portalLocales[i].getISO3Language()); languageE.setAttribute("displayName", portalLocales[i].getDisplayLanguage(locales[0])); locE.appendChild(languageE); // <country iso2="..." iso3="..." displayName="..."/> Element countryE = doc.createElement("country"); countryE.setAttribute("iso2", portalLocales[i].getCountry()); countryE.setAttribute("iso3", portalLocales[i].getISO3Country()); countryE.setAttribute("displayName", portalLocales[i].getDisplayCountry(locales[0])); locE.appendChild(countryE); // <variant code="..." displayName="..."/> Element variantE = doc.createElement("variant"); variantE.setAttribute("code", portalLocales[i].getVariant()); variantE.setAttribute("displayName", portalLocales[i].getDisplayVariant(locales[0])); locE.appendChild(variantE); localesE.appendChild(locE); } doc.appendChild(localesE); XSLT xslt = XSLT.getTransformer(this, runtimeData.getLocales()); xslt.setXML(doc); xslt.setXSL(sslUri, runtimeData.getBrowserInfo()); xslt.setTarget(out); xslt.setStylesheetParameter("baseActionURL", runtimeData.getBaseActionURL()); xslt.transform(); } | 1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/209e37f947a24973fc7451cd016db5daa967a57e/CUserLocalesSelector.java/clean/source/org/jasig/portal/layout/channels/locales/CUserLocalesSelector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1743,
4201,
12,
1350,
1503,
596,
13,
1216,
25478,
503,
288,
3639,
4319,
997,
273,
4319,
1733,
18,
588,
1908,
2519,
5621,
3639,
6458,
8526,
6922,
273,
14966,
18,
588,
13310,
562... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1743,
4201,
12,
1350,
1503,
596,
13,
1216,
25478,
503,
288,
3639,
4319,
997,
273,
4319,
1733,
18,
588,
1908,
2519,
5621,
3639,
6458,
8526,
6922,
273,
14966,
18,
588,
13310,
562... |
if (TypeUtil.couldBeMember(call.getArg(0).getType())) { final MemberCalc memberCalc = compiler.compileMember(call.getArg(0)); return new AbstractStringCalc(call, new Calc[] {memberCalc}) { public String evaluateString(Evaluator evaluator) { final Member member = memberCalc.evaluateMember(evaluator); if (member.isNull()) { return ""; } StringBuffer buf = new StringBuffer(); appendMember(buf, member); return buf.toString(); } }; } else { final TupleCalc tupleCalc = compiler.compileTuple(call.getArg(0)); return new AbstractStringCalc(call, new Calc[] {tupleCalc}) { public String evaluateString(Evaluator evaluator) { final Member[] members = tupleCalc.evaluateTuple(evaluator); if (members == null) { return ""; } StringBuffer buf = new StringBuffer(); appendTuple(buf, members); return buf.toString(); } }; } | final ListCalc listCalc = compiler.compileList(call.getArg(0)); return new AbstractStringCalc(call, new Calc[] {listCalc}) { public String evaluateString(Evaluator evaluator) { final List list = listCalc.evaluateList(evaluator); return strToSet(list); } }; | public Calc compileCall(FunCall call, ExpCompiler compiler) { if (TypeUtil.couldBeMember(call.getArg(0).getType())) { final MemberCalc memberCalc = compiler.compileMember(call.getArg(0)); return new AbstractStringCalc(call, new Calc[] {memberCalc}) { public String evaluateString(Evaluator evaluator) { final Member member = memberCalc.evaluateMember(evaluator); if (member.isNull()) { return ""; } StringBuffer buf = new StringBuffer(); appendMember(buf, member); return buf.toString(); } }; } else { final TupleCalc tupleCalc = compiler.compileTuple(call.getArg(0)); return new AbstractStringCalc(call, new Calc[] {tupleCalc}) { public String evaluateString(Evaluator evaluator) { final Member[] members = tupleCalc.evaluateTuple(evaluator); if (members == null) { return ""; } StringBuffer buf = new StringBuffer(); appendTuple(buf, members); return buf.toString(); } }; } } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/5aca340e1cdbb6179077d96383341db48f0997be/BuiltinFunTable.java/buggy/src/main/mondrian/olap/fun/BuiltinFunTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
29128,
4074,
1477,
12,
22783,
1477,
745,
16,
7784,
9213,
5274,
13,
288,
7734,
309,
261,
559,
1304,
18,
15195,
1919,
4419,
12,
1991,
18,
588,
4117,
12,
20,
2934,
588,
559,
1435,
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,
2398,
1071,
29128,
4074,
1477,
12,
22783,
1477,
745,
16,
7784,
9213,
5274,
13,
288,
7734,
309,
261,
559,
1304,
18,
15195,
1919,
4419,
12,
1991,
18,
588,
4117,
12,
20,
2934,
588,
559,
1435,
3... |
} catch (InterruptedException ie) { } din.close(); } catch (IOException ioe) { } | } catch (InterruptedException ignoredInterruptedException) {} dataStream.close(); } catch (IOException ignoredIOException) {} | public void run() { try { try { while (!endOfStream) { pumpStream(); sleep(SLEEP_TIME); } } catch (InterruptedException ie) { } din.close(); } catch (IOException ioe) { } } | 55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/74fc950b363d7f5835bb9f458f93b6624639923b/CVSElement.java/buggy/main/src/net/sourceforge/cruisecontrol/CVSElement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1086,
1435,
288,
5411,
775,
288,
7734,
775,
288,
10792,
1323,
16051,
409,
951,
1228,
13,
288,
13491,
293,
2801,
1228,
5621,
13491,
5329,
12,
55,
900,
10541,
67,
4684,
1769,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1086,
1435,
288,
5411,
775,
288,
7734,
775,
288,
10792,
1323,
16051,
409,
951,
1228,
13,
288,
13491,
293,
2801,
1228,
5621,
13491,
5329,
12,
55,
900,
10541,
67,
4684,
1769,
107... |
public org.quickfix.field.CreditRating getCreditRating() throws FieldNotFound { org.quickfix.field.CreditRating value = new org.quickfix.field.CreditRating(); | public quickfix.field.CreditRating getCreditRating() throws FieldNotFound { quickfix.field.CreditRating value = new quickfix.field.CreditRating(); | public org.quickfix.field.CreditRating getCreditRating() throws FieldNotFound { org.quickfix.field.CreditRating value = new org.quickfix.field.CreditRating(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/OrderMassStatusRequest.java/clean/src/java/src/quickfix/fix43/OrderMassStatusRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
16520,
20388,
1927,
10430,
20388,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
16520,
20388,
460,
273,
394,
2358,
18,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
16520,
20388,
1927,
10430,
20388,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
16520,
20388,
460,
273,
394,
2358,
18,
19... |
public HttpRequestWildcardFilter() { | public HttpRequestWildcardFilter() { | public HttpRequestWildcardFilter() { } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/707fed32d51a474687ad451aad7c0cd6a72f77f0/HttpRequestWildcardFilter.java/buggy/providers/http/src/java/org/mule/providers/http/filters/HttpRequestWildcardFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
14069,
12121,
1586,
1435,
565,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
14069,
12121,
1586,
1435,
565,
288,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
getTransaction() + "", | getTransactionExpr(), | private void evaluateExpressions() throws JspException { try { setAnchor((String) evalAttr("anchor", getAnchor(), String.class)); } catch (NullAttributeException ex) { setAnchor(null); } try { setForward((String) evalAttr("forward", getForward(), String.class)); } catch (NullAttributeException ex) { setForward(null); } try { setHref((String) evalAttr("href", getHref(), String.class)); } catch (NullAttributeException ex) { setHref(null); } try { setName((String) evalAttr("name", getName(), String.class)); } catch (NullAttributeException ex) { setName(null); } try { setPage((String) evalAttr("page", getPage(), String.class)); } catch (NullAttributeException ex) { setPage(null); } try { setParamName((String) evalAttr("paramName", getParamName(), String.class)); } catch (NullAttributeException ex) { setParamName(null); } try { setParamProperty((String) evalAttr("paramProperty", getParamProperty(), String.class)); } catch (NullAttributeException ex) { setParamProperty(null); } try { setParamScope((String) evalAttr("paramScope", getParamScope(), String.class)); } catch (NullAttributeException ex) { setParamScope(null); } try { setProperty((String) evalAttr("property", getProperty(), String.class)); } catch (NullAttributeException ex) { setProperty(null); } try { setScope((String) evalAttr("scope", getScope(), String.class)); } catch (NullAttributeException ex) { setScope(null); } try { setTransaction(((Boolean) evalAttr("transaction", getTransaction() + "", Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { setTransaction(false); } } | 8610 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8610/9afe74198ca6e84db6424f96d70e85264e1ef404/ELRedirectTag.java/buggy/struts-el/src/share/org/apache/strutsel/taglib/logic/ELRedirectTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
11605,
12443,
780,
13,
5302,
3843,
2932,
16215,
3113,
336,
11605,
9334,
514,
18,
1106,
10019,
3639,
289,
1044,
261,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
11605,
12443,
780,
13,
5302,
3843,
2932,
16215,
3113,
336,
11605,
9334,
514,
18,
1106,
10019,
3639,
289,
1044,
261,... |
instance.setValueForNode(currentNode, valueToSet); | XFormsInstance.setValueForNode(currentNode, valueToSet); | private void runAction(final PipelineContext pipelineContext, Element eventHandlerElement, EventContext eventContext) { String actionNamespaceURI = eventHandlerElement.getNamespaceURI(); if (!XFormsConstants.XFORMS_NAMESPACE_URI.equals(actionNamespaceURI)) { throw new OXFException("Invalid action namespace: " + actionNamespaceURI); } String actionEventName = eventHandlerElement.getName(); if (XFormsEvents.XFORMS_SETVALUE_ACTION.equals(actionEventName)) { // 10.1.9 The setvalue Element // xforms:setvalue // Set binding for current action element setBinding(pipelineContext, eventHandlerElement); final String value = eventHandlerElement.attributeValue("value"); final String content = eventHandlerElement.getStringValue(); final XFormsInstance instance = getCurrentInstance(); final String valueToSet; if (value != null) { // Value to set is computed with an XPath expression Map namespaceContext = Dom4jUtils.getNamespaceContext(eventHandlerElement); valueToSet = instance.evaluateXPath(pipelineContext, value, namespaceContext, null, functionLibrary, null); } else { // Value to set is static content valueToSet = content; } // Set value on current node Node currentNode = getCurrentSingleNode(); instance.setValueForNode(currentNode, valueToSet); } else if (XFormsEvents.XFORMS_TOGGLE_ACTION.equals(actionEventName)) { // 9.2.3 The toggle Element // xforms:toggle // Find case with that id and select it String caseId = eventHandlerElement.attributeValue("case"); eventContext.addDivToShow(caseId); // Deselect other cases in that switch { Map variables = new HashMap(); variables.put("case-id", caseId); PooledXPathExpression xpathExpression = XPathCache.getXPathExpression(pipelineContext, new DocumentWrapper(getControlsDocument(), null).wrap(getControlsDocument()), "/xxf:controls//xf:case[@id = $case-id]/ancestor::xf:switch[1]//xf:case[not(@id = $case-id)]", XFormsServer.XFORMS_NAMESPACES, variables); try { for (Iterator i = xpathExpression.evaluate().iterator(); i.hasNext();) { Element caseElement = (Element) i.next(); eventContext.addDivToHide(caseElement.attributeValue(new QName("id"))); } } catch (org.orbeon.saxon.xpath.XPathException e) { throw new OXFException(e); } finally { if (xpathExpression != null) xpathExpression.returnToPool(); } } // TODO: // 1. Dispatching an xforms-deselect event to the currently selected case. // 2. Dispatching an xform-select event to the case to be selected. } else if (XFormsEvents.XFORMS_ACTION_ACTION.equals(actionEventName)) { // 10.1.1 The action Element // xforms:action for (Iterator i = eventHandlerElement.elementIterator(); i.hasNext();) { Element embeddedActionElement = (Element) i.next(); runAction(pipelineContext, embeddedActionElement, eventContext); } } else { throw new OXFException("Invalid action requested: " + actionEventName); } } | 10097 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10097/ab51a9b1db56c7cc726ea1a397a8d236e39b9aa7/XFormsControls.java/clean/src/java/org/orbeon/oxf/xforms/XFormsControls.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1086,
1803,
12,
6385,
13671,
1042,
5873,
1042,
16,
3010,
30441,
1046,
16,
27573,
2587,
1042,
871,
1042,
13,
288,
3639,
514,
1301,
3402,
3098,
273,
30441,
1046,
18,
588,
3402,
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,
1086,
1803,
12,
6385,
13671,
1042,
5873,
1042,
16,
3010,
30441,
1046,
16,
27573,
2587,
1042,
871,
1042,
13,
288,
3639,
514,
1301,
3402,
3098,
273,
30441,
1046,
18,
588,
3402,
3... |
public void handleFiles(List files) { try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.newDocument(); Element overviewRoot = Util.addChildElement(doc, "overview-frame", null); doc = db.newDocument(); Element allTagsRoot = Util.addChildElement(doc, "all-tags", null); Iterator iter = files.iterator(); while (iter.hasNext()) { File file = (File) iter.next(); if (!file.exists() || !file.canRead()) { continue; } Document xmlDoc = handleFile(file); if (xmlDoc != null) { String shortname = Util.getElementValue( xmlDoc.getDocumentElement(), "body/taglib/shortname"); Util.addChildElement(overviewRoot, "shortname", shortname); List tags = Util.getElements( xmlDoc.getDocumentElement(), "body/taglib/tag"); Iterator tagIter = tags.iterator(); while (tagIter.hasNext()) { Element tag = (Element) tagIter.next(); String tagname = Util.getElementValue(tag, "name"); tag = Util.addChildElement(allTagsRoot, "tag", null); Util.addChildElement(tag, "name", tagname); Util.addChildElement(tag, "taglib", shortname); } } } Source xml = new DOMSource(overviewRoot); Source xsl = new StreamSource( this.getClass().getResourceAsStream( "/resources/taglibdoc/index.xsl")); Result out = new StreamResult(new File(destdir, "index.html")); TransformerFactory tf = TransformerFactory.newInstance(); Transformer t = tf.newTransformer(xsl); t.transform(xml, out); xsl = new StreamSource( this.getClass().getResourceAsStream( "/resources/taglibdoc/overview-frame.xsl")); out = new StreamResult(new File(destdir, "overview-frame.html")); t = tf.newTransformer(xsl); t.transform(xml, out); xml = new DOMSource(allTagsRoot); xsl = new StreamSource( this.getClass().getResourceAsStream( "/resources/taglibdoc/all-tags.xsl")); out = new StreamResult(new File(destdir, "all-tags.html")); t = tf.newTransformer(xsl); t.transform(xml, out); Util.copyFile( "/resources/taglibdoc/stylesheet.css", new File(destdir, "stylesheet.css")); } catch (Exception e) { e.printStackTrace(); } } | 48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/bcf54ee9560f4fd9a0ff083d3f0ea7c829a28aea/TaglibDoc.java/buggy/contrib/tag-doc/src/java/org/apache/struts/taskdefs/TaglibDoc.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6459,
4110,
2697,
12,
682,
2354,
15329,
202,
202,
698,
95,
1082,
202,
2519,
20692,
1966,
74,
33,
2519,
20692,
18,
2704,
1442,
5621,
1082,
202,
2519,
1263,
1966,
33,
1966,
74,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6459,
4110,
2697,
12,
682,
2354,
15329,
202,
202,
698,
95,
1082,
202,
2519,
20692,
1966,
74,
33,
2519,
20692,
18,
2704,
1442,
5621,
1082,
202,
2519,
1263,
1966,
33,
1966,
74,
... | ||
{ boolean useSaved = mGameTypeComboBox.getSelectedIndex() == 1; return useSaved; } | { boolean useSaved = mGameTypeComboBox.getSelectedIndex() == 1; return useSaved; } | private boolean gameTypeIsSaved() { boolean useSaved = mGameTypeComboBox.getSelectedIndex() == 1; return useSaved; } | 8909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8909/518e05f6810ecc58cc97982c87725586e38d63d4/GameTypePanel.java/clean/triplea/src/games/strategy/engine/framework/ui/GameTypePanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1250,
7920,
559,
2520,
16776,
1435,
225,
288,
565,
1250,
999,
16776,
273,
312,
12496,
559,
22199,
18,
588,
7416,
1016,
1435,
422,
404,
31,
565,
327,
999,
16776,
31,
225,
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,
282,
3238,
1250,
7920,
559,
2520,
16776,
1435,
225,
288,
565,
1250,
999,
16776,
273,
312,
12496,
559,
22199,
18,
588,
7416,
1016,
1435,
422,
404,
31,
565,
327,
999,
16776,
31,
225,
289,
2,
-... |
(ColorDefinition) ((IStructuredSelection) colorList .getSelection()) | (ColorDefinition) ((IStructuredSelection) colorList.getSelection()) | private void hookListeners() { colorSelector.addListener(new IPropertyChangeListener() { /* (non-Javadoc) * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent) */ public void propertyChange(PropertyChangeEvent event) { ColorDefinition definition = (ColorDefinition) ((IStructuredSelection) colorList .getSelection()) .getFirstElement(); RGB newRGB = (RGB) event.getNewValue(); if (definition != null && newRGB != null) { valuesToSet.put(definition.getId(), newRGB); } updateControls(definition); } }); colorList.addSelectionChangedListener(new ISelectionChangedListener() { /* (non-Javadoc) * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent) */ public void selectionChanged(SelectionChangedEvent event) { if (event.getSelection().isEmpty()) { updateControls(null); } else { updateControls( (ColorDefinition) ((IStructuredSelection) event .getSelection()) .getFirstElement()); } } }); resetButton.addSelectionListener(new SelectionAdapter() { /* (non-Javadoc) * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetSelected(SelectionEvent e) { ColorDefinition definition = (ColorDefinition) ((IStructuredSelection) colorList .getSelection()) .getFirstElement(); if (resetColor(definition)) updateControls(definition); } }); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/176665a28eb41bc372c4bb74f61419489834aeb7/ColorsPreferencePage.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/colors/ColorsPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3953,
5583,
1435,
288,
202,
202,
3266,
4320,
18,
1289,
2223,
12,
2704,
467,
1396,
15744,
1435,
288,
1082,
202,
20308,
261,
5836,
17,
24060,
13,
9506,
380,
632,
5946,
2358,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3953,
5583,
1435,
288,
202,
202,
3266,
4320,
18,
1289,
2223,
12,
2704,
467,
1396,
15744,
1435,
288,
1082,
202,
20308,
261,
5836,
17,
24060,
13,
9506,
380,
632,
5946,
2358,... |
AbilityUtilities.modFeat(character, null, "Toughness", true, true); | AbilityUtilities.modFeat(character, null, "Toughness", true, false); | public void testModFeat() { final PlayerCharacter character = new PlayerCharacter(); character.setRace(human); character.incrementClassLevel(1, pcClass); SettingsHandler .setSingleChoicePreference(Constants.CHOOSER_SINGLECHOICEMETHOD_SELECTEXIT); ChooserFactory.setInterfaceClassname(SwingChooser.class.getName()); is((int) character.getRawFeats(true), eq(2), "Start with 2 feats"); try { AbilityUtilities.modFeat(character, null, "Toughness", true, true); is((int) character.getRawFeats(true), eq(1), "Only 1 feat used"); } catch(HeadlessException e) { Logging.debugPrint("Ignoring Headless exception."); } } | 48301 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48301/088c15261d01327bce6f44925516d0287dc266cb/PlayerCharacterTest.java/buggy/code/src/test/pcgen/core/PlayerCharacterTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1739,
11667,
1435,
202,
95,
202,
202,
6385,
19185,
7069,
3351,
273,
394,
19185,
7069,
5621,
202,
202,
11560,
18,
542,
54,
623,
12,
24270,
1769,
202,
202,
11560,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1739,
11667,
1435,
202,
95,
202,
202,
6385,
19185,
7069,
3351,
273,
394,
19185,
7069,
5621,
202,
202,
11560,
18,
542,
54,
623,
12,
24270,
1769,
202,
202,
11560,
18,
... |
catch (Exception e) { | catch (Throwable e) { | public void test() throws Throwable { selenium.setContext("Test Visiblity", "info"); /* Test Visiblity */ // open|./tests/html/test_visibility.html| selenium.open("./tests/html/test_visibility.html"); boolean sawThrow4 = false; try { // originally verifyVisible|visibleParagraph| selenium.assertVisible("visibleParagraph"); } catch (Exception e) { sawThrow4 = true; } verifyFalse(sawThrow4); boolean sawThrow5 = false; try { // originally verifyNotVisible|hiddenParagraph| selenium.assertNotVisible("hiddenParagraph"); } catch (Exception e) { sawThrow5 = true; } verifyFalse(sawThrow5); boolean sawThrow6 = false; try { // originally verifyNotVisible|suppressedParagraph| selenium.assertNotVisible("suppressedParagraph"); } catch (Exception e) { sawThrow6 = true; } verifyFalse(sawThrow6); boolean sawThrow7 = false; try { // originally verifyNotVisible|classSuppressedParagraph| selenium.assertNotVisible("classSuppressedParagraph"); } catch (Exception e) { sawThrow7 = true; } verifyFalse(sawThrow7); boolean sawThrow8 = false; try { // originally verifyNotVisible|jsClassSuppressedParagraph| selenium.assertNotVisible("jsClassSuppressedParagraph"); } catch (Exception e) { sawThrow8 = true; } verifyFalse(sawThrow8); boolean sawThrow9 = false; try { // originally verifyNotVisible|hiddenSubElement| selenium.assertNotVisible("hiddenSubElement"); } catch (Exception e) { sawThrow9 = true; } verifyFalse(sawThrow9); boolean sawThrow10 = false; try { // originally verifyVisible|visibleSubElement| selenium.assertVisible("visibleSubElement"); } catch (Exception e) { sawThrow10 = true; } verifyFalse(sawThrow10); boolean sawThrow11 = false; try { // originally verifyNotVisible|suppressedSubElement| selenium.assertNotVisible("suppressedSubElement"); } catch (Exception e) { sawThrow11 = true; } verifyFalse(sawThrow11); boolean sawThrow12 = false; try { // originally verifyNotVisible|jsHiddenParagraph| selenium.assertNotVisible("jsHiddenParagraph"); } catch (Exception e) { sawThrow12 = true; } verifyFalse(sawThrow12); boolean sawThrow13 = false; try { // originally verifyNotVisible|nonExistantElement| selenium.assertNotVisible("nonExistantElement"); } catch (Exception e) { sawThrow13 = true; } verifyFalse(sawThrow13); checkForVerificationErrors(); } | 50930 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50930/15660ffa40e3fe9cdf6de2752e79d93831571a27/TestVisibility.java/buggy/clients/java/src/test/java/com/thoughtworks/selenium/generated/TestVisibility.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1842,
1435,
1216,
4206,
288,
202,
202,
1786,
17327,
18,
542,
1042,
2932,
4709,
8077,
495,
80,
560,
3113,
315,
1376,
8863,
225,
1748,
7766,
8077,
495,
80,
560,
4202,
1195,
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,
565,
1071,
918,
1842,
1435,
1216,
4206,
288,
202,
202,
1786,
17327,
18,
542,
1042,
2932,
4709,
8077,
495,
80,
560,
3113,
315,
1376,
8863,
225,
1748,
7766,
8077,
495,
80,
560,
4202,
1195,
1082,... |
if (savedCref != null) { ruby.setCRef(savedCref); } } } | if (savedCref != null) { ruby.setCRef(savedCref); } } } | public RubyObject call(Ruby ruby, RubyObject recv, String id, RubyPointer args, boolean noSuper) { if (args == null) { args = new RubyPointer(); } CRefNode savedCref = null; // +++ = null; List valueList = null; ruby.getScope().push(); CRefNode lRefValue = getRefValue(); if (lRefValue != null) { savedCref = ruby.getCRef(); // s.a. ruby.setCRef(lRefValue); ruby.getRubyFrame().setCbase(lRefValue); } if (getTable() != null) { valueList = new ArrayList(Collections.nCopies(getTable().size(), ruby.getNil())); ruby.getScope().setLocalValues(valueList); ruby.getScope().setLocalNames(getTable()); } else { valueList = null; //ruby.getScope().getLocalValues(); ruby.getScope().setLocalValues(null); ruby.getScope().setLocalNames(null); } Node callBody = getNextNode(); Node callNode = null; if (callBody.getType() == Constants.NODE_ARGS) { callNode = callBody; callBody = null; } else if (callBody.getType() == Constants.NODE_BLOCK) { callNode = callBody.getHeadNode(); callBody = callBody.getNextNode(); } RubyVarmap.push(ruby); // PUSH_TAG(PROT_FUNC); try { if (callNode != null) { //if (call_node.getType() != Constants.NODE_ARGS) { // rb_bug("no argument-node"); //} int i = callNode.getCount(); if (i > (args != null ? args.size() : 0)) { int size = 0; if (args != null) size = args.size(); throw new RubyArgumentException(ruby, getFile() + ":" + getLine() +"wrong # of arguments(" + size + " for " + i + ")"); } if (callNode.getRest() == -1) { int opt = i; Node optNode = callNode.getOptNode(); while (optNode != null) { opt++; optNode = optNode.getNextNode(); } if (opt < (args != null ? args.size() : 0)) { throw new RubyArgumentException(ruby, "wrong # of arguments(" + args.size() + " for " + opt + ")"); } // +++ ruby.getRubyFrame().setArgs(valueList != null ? new DelegateList(valueList, 2, valueList.size()) : null); // --- } if (valueList != null) { if (i > 0) { for (int j = 0; j < i; j++) { valueList.set(j + 2, args.get(j)); } } args.inc(i); if (callNode.getOptNode() != null) { Node optNode = callNode.getOptNode(); while (optNode != null && args.size() != 0) { ((AssignableNode) optNode.getHeadNode()).assign(ruby, recv, args.getRuby(0), true); args.inc(1); optNode = optNode.getNextNode(); } recv.eval(optNode); } if (callNode.getRest() >= 0) { RubyArray array = null; if (args.size() > 0) { array = RubyArray.newArray(ruby, args); } else { array = RubyArray.newArray(ruby, 0); } valueList.set(callNode.getRest(), array); } } } return recv.eval(callBody); } catch (ReturnException rExcptn) { return rExcptn.getReturnValue(); } finally { RubyVarmap.pop(ruby); ruby.getScope().pop(); if (savedCref != null) { ruby.setCRef(savedCref); } } } | 45298 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45298/7798138390a306a202dcec9bde45928dae2e852e/ScopeNode.java/buggy/org/jruby/nodes/ScopeNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
745,
12,
54,
10340,
22155,
16,
19817,
921,
10665,
16,
514,
612,
16,
19817,
4926,
833,
16,
1250,
1158,
8051,
13,
288,
202,
202,
430,
261,
1968,
422,
446,
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,
225,
202,
482,
19817,
921,
745,
12,
54,
10340,
22155,
16,
19817,
921,
10665,
16,
514,
612,
16,
19817,
4926,
833,
16,
1250,
1158,
8051,
13,
288,
202,
202,
430,
261,
1968,
422,
446,
13,
288,
... |
own_index=members.indexOf(local_addr); if(own_index == -1) { if(Trace.trace) Trace.warn("NAKACK.computeMessageDigest()", "no own address in highest_seqnos"); return digest; } highest_seqno_received=digest.highest_seqnos[own_index]; highest_seqno_sent=getHighestSeqnoSent(); | own_index=members.indexOf(local_addr); if(own_index == -1) { if(Trace.trace) Trace.warn("NAKACK.computeMessageDigest()", "no own address in highest_seqnos"); return digest; } highest_seqno_received=digest.highest_seqnos[own_index]; highest_seqno_sent=getHighestSeqnoSent(); | Digest computeMessageDigest(long[] highest_seqnos) { Digest digest=highest_seqnos != null ? new Digest(highest_seqnos.length) : null; Address sender; NakReceiverWindow win; List unstable_msgs; int own_index; long highest_seqno_sent=-1, highest_seqno_received=-1; if(digest == null) { if(Trace.trace) Trace.warn("NAKACK.NAKer.computeMessageDigest()", "highest_seqnos is null, cannot compute digest !"); return null; } if(highest_seqnos.length != members.size()) { if(Trace.trace) Trace.warn("NAKACK.NAKer.computeMessageDigest()", "the mbrship size and the size " + "of the highest_seqnos array are not equal, cannot compute digest !"); return null; } for(int i=0; i < digest.highest_seqnos.length; i++) digest.highest_seqnos[i]=highest_seqnos[i]; for(int i=0; i < highest_seqnos.length; i++) { sender=(Address)members.elementAt(i); if(sender == null) continue; win=(NakReceiverWindow)received_msgs.get(sender); if(win == null) continue; digest.highest_seqnos[i]=win.getHighestReceived(); unstable_msgs=win.getMessagesHigherThan(highest_seqnos[i]); for(Enumeration e=unstable_msgs.elements(); e.hasMoreElements();) digest.msgs.add(e.nextElement()); } /** If our highest seqno <em>sent</em> is higher than the one <em>received</em>, we have to (a) set it in the digest and (b) add the corresponding messages **/ own_index=members.indexOf(local_addr); if(own_index == -1) { if(Trace.trace) Trace.warn("NAKACK.computeMessageDigest()", "no own address in highest_seqnos"); return digest; } highest_seqno_received=digest.highest_seqnos[own_index]; highest_seqno_sent=getHighestSeqnoSent(); if(highest_seqno_sent > highest_seqno_received) { // (a) Set highest seqno sent in digest digest.highest_seqnos[own_index]=highest_seqno_sent; // (b) Add messages between highest_seqno_received and highest_seqno_sent unstable_msgs=getSentMessagesHigherThan(highest_seqno_received); for(Enumeration e=unstable_msgs.elements(); e.hasMoreElements();) digest.msgs.add(e.nextElement()); } return digest; } | 50160 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50160/75359f4186603c5a949e15ffab51fb811f04ed8e/NAKACK.java/clean/src/org/jgroups/protocols/NAKACK.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
9568,
3671,
1079,
9568,
12,
5748,
8526,
9742,
67,
5436,
18050,
13,
288,
202,
565,
15864,
2398,
5403,
33,
8766,
395,
67,
5436,
18050,
480,
446,
692,
394,
15864,
12,
8766,
395,
67,
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,
9568,
3671,
1079,
9568,
12,
5748,
8526,
9742,
67,
5436,
18050,
13,
288,
202,
565,
15864,
2398,
5403,
33,
8766,
395,
67,
5436,
18050,
480,
446,
692,
394,
15864,
12,
8766,
395,
67,
5... |
if (fragment != null) | if (fragment != null && fragment.exists()) | public static IPackageFragment[] getPackageFragments( final String packageName, final ProcessorEnvImpl env) { IJavaProject project = env.getJavaProject(); List<IPackageFragment> packages = new ArrayList<IPackageFragment>(); try { IPackageFragmentRoot[] roots = project.getAllPackageFragmentRoots(); for (IPackageFragmentRoot root : roots) { IPackageFragment fragment = root.getPackageFragment(packageName); if (fragment != null) packages.add(fragment); } } catch (JavaModelException e) { return new IPackageFragment[0]; } return packages.toArray(new IPackageFragment[packages.size()]); } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/d4b66f5ebef72ea4a16ce3ed100131443db3e609/PackageUtil.java/buggy/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/util/PackageUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
467,
2261,
7456,
8526,
11506,
27588,
12,
1082,
202,
6385,
514,
9929,
16,
1875,
202,
6385,
15476,
3491,
2828,
1550,
13,
288,
9506,
202,
45,
5852,
4109,
1984,
273,
1550,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
467,
2261,
7456,
8526,
11506,
27588,
12,
1082,
202,
6385,
514,
9929,
16,
1875,
202,
6385,
15476,
3491,
2828,
1550,
13,
288,
9506,
202,
45,
5852,
4109,
1984,
273,
1550,
18,
... |
status = handler.execute(processingContext); if(status == Dispatcher.ERROR || status == Dispatcher.DONE) return status; | status = Status.OK; childProcessingContext = processingContextFactory.getProcessingContext(processingContext.getRequestContext(), processingContext.getResponseContext()); childProcessingContext.setAttribute(ProcessingContext.MATCHES_ATTRIBUTE, matches); for(Handler<S, T> handler : handlers) { status = handler.execute(childProcessingContext); if(status == Status.ERROR || status == Status.DONE) break; } return status; | public int execute(ProcessingContext<? extends S, ? extends T> processingContext) { for(Handler<S, T> handler : handlers) { int status; status = handler.execute(processingContext); if(status == Dispatcher.ERROR || status == Dispatcher.DONE) return status; } return Dispatcher.OK; } | 11074 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11074/7c69baf7747c8136ae8366ea04b63bf87a2033c7/AndFlowHandler.java/buggy/branches/0.3/src/main/java/org/iterx/miru/dispatcher/handler/flow/AndFlowHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
1836,
12,
7798,
1042,
12880,
3231,
348,
16,
692,
3231,
399,
34,
4929,
1042,
13,
288,
3639,
364,
12,
1503,
32,
55,
16,
399,
34,
1838,
294,
4919,
13,
288,
5411,
509,
1267,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
1836,
12,
7798,
1042,
12880,
3231,
348,
16,
692,
3231,
399,
34,
4929,
1042,
13,
288,
3639,
364,
12,
1503,
32,
55,
16,
399,
34,
1838,
294,
4919,
13,
288,
5411,
509,
1267,
31... |
if (hdr.getServerIPAddress().getAddress()[0] < IPv4Constants.NETWORK_CLASSA) { network_address = new IPv4Address(hdr.getServerIPAddress().getAddress()[0] + "." + hdr.getServerIPAddress().getAddress()[1] + "." + hdr.getServerIPAddress().getAddress()[2] + ".0"); } else if (hdr.getServerIPAddress().getAddress()[0] < IPv4Constants.NETWORK_CLASSB) { network_address = new IPv4Address(hdr.getServerIPAddress().getAddress()[0] + "." + hdr.getServerIPAddress().getAddress()[1] + ".0.0"); } else if (hdr.getServerIPAddress().getAddress()[0] < IPv4Constants.NETWORK_CLASSC) { network_address = new IPv4Address(hdr.getServerIPAddress().getAddress()[0] + ".0.0.0"); } else network_address = new IPv4Address(hdr.getServerIPAddress()); if (hdr.getGatewayIPAddress().isAnyLocalAddress()) { cfg.addRoute(network_address, null, device, false); } else { cfg.addRoute(network_address, new IPv4Address(hdr.getGatewayIPAddress()), device, false); } } | if (hdr.getGatewayIPAddress().isAnyLocalAddress()) { cfg.addRoute(serverAddr, null, device, false); cfg.addRoute(networkAddress, null, device, false); } else { cfg.addRoute(networkAddress, new IPv4Address(hdr .getGatewayIPAddress()), device, false); } } | protected void configureNetwork(Device device, BOOTPHeader hdr) throws NetworkException { log.info("Got Client IP address : " + hdr.getClientIPAddress()); log.info("Got Your IP address : " + hdr.getYourIPAddress()); log.info("Got Server IP address : " + hdr.getServerIPAddress()); log.info("Got Gateway IP address : " + hdr.getGatewayIPAddress()); final IPv4ConfigurationService cfg; try { cfg = (IPv4ConfigurationService) InitialNaming.lookup(IPv4ConfigurationService.NAME); } catch (NameNotFoundException ex) { throw new NetworkException(ex); } cfg.configureDeviceStatic(device, new IPv4Address(hdr.getYourIPAddress()), null, false); IPv4Address network_address; if (hdr.getServerIPAddress().getAddress()[0] < IPv4Constants.NETWORK_CLASSA) { network_address = new IPv4Address(hdr.getServerIPAddress().getAddress()[0] + "." + hdr.getServerIPAddress().getAddress()[1] + "." + hdr.getServerIPAddress().getAddress()[2] + ".0"); } else if (hdr.getServerIPAddress().getAddress()[0] < IPv4Constants.NETWORK_CLASSB) { network_address = new IPv4Address(hdr.getServerIPAddress().getAddress()[0] + "." + hdr.getServerIPAddress().getAddress()[1] + ".0.0"); } else if (hdr.getServerIPAddress().getAddress()[0] < IPv4Constants.NETWORK_CLASSC) { network_address = new IPv4Address(hdr.getServerIPAddress().getAddress()[0] + ".0.0.0"); } else network_address = new IPv4Address(hdr.getServerIPAddress()); if (hdr.getGatewayIPAddress().isAnyLocalAddress()) {// cfg.addRoute(new IPv4Address(hdr.getServerIPAddress()), null, device, false); cfg.addRoute(network_address, null, device, false); } else {// cfg.addRoute(new IPv4Address(hdr.getServerIPAddress()), new IPv4Address(hdr.getGatewayIPAddress()), device, false); cfg.addRoute(network_address, new IPv4Address(hdr.getGatewayIPAddress()), device, false); } } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/387bfe2dfd343773750929bcbfb4a63cf7fee6da/BOOTPClient.java/buggy/net/src/net/org/jnode/net/ipv4/bootp/BOOTPClient.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
5068,
3906,
12,
3654,
2346,
16,
9784,
25634,
1864,
7723,
13,
1377,
1216,
5128,
503,
225,
288,
565,
613,
18,
1376,
2932,
15617,
2445,
2971,
1758,
225,
294,
315,
397,
7723,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
5068,
3906,
12,
3654,
2346,
16,
9784,
25634,
1864,
7723,
13,
1377,
1216,
5128,
503,
225,
288,
565,
613,
18,
1376,
2932,
15617,
2445,
2971,
1758,
225,
294,
315,
397,
7723,
18,
... |
LogService.log( LogService.ERROR, | LogService.log( LogService.INFO, | private File getWellKnownDir() { Servlet servlet = PortalSessionManager.getInstance(); if ( servlet == null ) return null; ServletContext ctx = servlet.getServletConfig().getServletContext(); String carDirRealPath = ctx.getRealPath( WELL_KNOWN_DIR ); if ( carDirRealPath == null ) { LogService.log( LogService.ERROR, "Channel Archives will not be " + " loaded. Unable to aquire the real " + "path to '" + WELL_KNOWN_DIR + "'. This " + "can occur if the portal is deployed " + "as a WAR and directories can not be " + "created within its directory " + "structure. Alternatively, you can " + "specify a fully qualified path as " + "the value of a '" + CAR_DIR_PROP_NAME + "' property in portal.properties." ); return null; } File carDir = new File( carDirRealPath ); if ( ! carDir.exists() ) { LogService.log( LogService.ERROR, "Channel Archives can not be " + " loaded. CAR directory '" + carDirRealPath + "' does not exist." ); return null; } carDirExists = true; this.carDirPath = carDirRealPath; return carDir; } | 24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/167ad00800d1adc769535fdda7ae16abaf9decd9/CarResources.java/clean/source/org/jasig/portal/car/CarResources.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1387,
13876,
1165,
11925,
1621,
1435,
565,
288,
3639,
7971,
8100,
273,
25478,
2157,
1318,
18,
588,
1442,
5621,
7734,
309,
261,
8100,
422,
446,
262,
327,
446,
31,
7734,
22717,
1103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1387,
13876,
1165,
11925,
1621,
1435,
565,
288,
3639,
7971,
8100,
273,
25478,
2157,
1318,
18,
588,
1442,
5621,
7734,
309,
261,
8100,
422,
446,
262,
327,
446,
31,
7734,
22717,
1103,
... |
mDetails.load(new FileInputStream(aFileName)); | mDetails.load(new FileInputStream(fileName)); String cachedConfigHash = mDetails.getProperty(CONFIG_HASH_KEY); String currentConfigHash = getConfigHashCode(aCurrentConfig); | PropertyCacheFile(String aFileName) { boolean setInActive = true; if (aFileName != null) { try { mDetails.load(new FileInputStream(aFileName)); setInActive = false; } catch (FileNotFoundException e) { // Ignore, the cache does not exist setInActive = false; } catch (IOException e) { System.out.println("Unable to open cache file, ignoring."); e.printStackTrace(System.out); } } mDetailsFile = (setInActive) ? null : aFileName; } | 50482 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50482/fa0fcc0fd5a5f819bf8b6c378365c85225d7e94b/PropertyCacheFile.java/clean/src/checkstyle/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4276,
31371,
12,
780,
279,
4771,
13,
565,
288,
3639,
1250,
444,
382,
3896,
273,
638,
31,
3639,
309,
261,
69,
4771,
480,
446,
13,
288,
5411,
775,
288,
7734,
312,
3790,
18,
945,
12,
270... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4276,
31371,
12,
780,
279,
4771,
13,
565,
288,
3639,
1250,
444,
382,
3896,
273,
638,
31,
3639,
309,
261,
69,
4771,
480,
446,
13,
288,
5411,
775,
288,
7734,
312,
3790,
18,
945,
12,
270... |
if (!"global".equalsIgnoreCase(name) && !"root".equalsIgnoreCase(name)) { | /* if (!"global".equalsIgnoreCase(name) && !"root".equalsIgnoreCase(name)) { | synchronized void evaluatePrototype(Prototype prototype) { // System.err.println ("FESI EVALUATE PROTO "+prototype+" FOR "+this); Scriptable op = null; // get the prototype's prototype if possible and necessary Scriptable opp = null; Prototype parent = prototype.getParentPrototype(); if (parent != null) { // see if parent prototype is already registered. if not, register it opp = getPrototype(parent.getName()); if (opp == null) { evaluatePrototype(parent); opp = getPrototype(parent.getName()); } } String name = prototype.getName(); if (!"global".equalsIgnoreCase(name) && !"hopobject".equalsIgnoreCase(name) && (opp == null)) { if (app.isJavaPrototype(name)) { opp = getPrototype("__javaobject__"); } else { opp = getPrototype("hopobject"); } } // if prototype doesn't exist (i.e. is a standard prototype built by HopExtension), create it. op = getPrototype(name); if (op == null) { try { Context context = Context.getCurrentContext(); op = new HopObject(name); // context.newObject (global /*, "HopObject" */); op.setPrototype(opp); op.setParentScope(global); op.put("prototypename", op, name); } catch (Exception ignore) { System.err.println("Error creating prototype: " + ignore); ignore.printStackTrace(); } putPrototype(name, op); } else { // reset prototype to original state resetPrototype(op); // set parent prototype just in case it has been changed op.setPrototype(opp); } // Register a constructor for all types except global. // This will first create a new prototyped hopobject and then calls // the actual (scripted) constructor on it. if (!"global".equalsIgnoreCase(name) && !"root".equalsIgnoreCase(name)) { try { FunctionObject fp = new FunctionObject(name, HopObject.hopObjCtor, global); fp.addAsConstructor(global, op); } catch (Exception ignore) { System.err.println("Error adding ctor for " + name + ": " + ignore); ignore.printStackTrace(); } } for (Iterator it = prototype.getZippedCode().values().iterator(); it.hasNext();) { Object code = it.next(); evaluate(prototype, code); } for (Iterator it = prototype.getCode().values().iterator(); it.hasNext();) { Object code = it.next(); evaluate(prototype, code); } } | 46029 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46029/85a6afe8575d4ca5f0cc72a33e718f151e7bde72/RhinoCore.java/buggy/src/helma/scripting/rhino/RhinoCore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3852,
918,
5956,
15846,
12,
15846,
4409,
13,
288,
3639,
368,
2332,
18,
370,
18,
8222,
7566,
8090,
2320,
512,
2669,
57,
1777,
4629,
4296,
13773,
18541,
9078,
12108,
13773,
2211,
1769,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3852,
918,
5956,
15846,
12,
15846,
4409,
13,
288,
3639,
368,
2332,
18,
370,
18,
8222,
7566,
8090,
2320,
512,
2669,
57,
1777,
4629,
4296,
13773,
18541,
9078,
12108,
13773,
2211,
1769,
3639,
... |
ConceptEditorDeclaration editorDeclaration = new ConceptEditorDeclaration(editorModel); | ConceptEditorDeclaration editorDeclaration = (ConceptEditorDeclaration) SModelUtil.instantiateConceptDeclaration("jetbrains.mps.bootstrap.editorLanguage.structure.ConceptEditorDeclaration", editorModel, scope); | private ConceptEditorDeclaration createEditorDeclaration(ConceptDeclaration conceptDeclaration, SModelDescriptor editorModelDescriptor) { SModel editorModel = editorModelDescriptor.getSModel(); ConceptEditorDeclaration editorDeclaration = new ConceptEditorDeclaration(editorModel); editorDeclaration.setConceptDeclaration(conceptDeclaration); editorModel.addRoot(editorDeclaration); editorModelDescriptor.save(); SModelRepository.getInstance().markChanged(editorModelDescriptor, false); return editorDeclaration; } | 14939 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14939/fc8635caa41a021de60001978aa46cda655492cc/GoToConceptEditorDeclarationAction.java/buggy/source/jetbrains/mps/ide/actions/nodes/GoToConceptEditorDeclarationAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
27842,
6946,
6094,
752,
6946,
6094,
12,
15433,
6094,
12402,
6094,
16,
348,
1488,
3187,
4858,
1488,
3187,
13,
288,
565,
348,
1488,
4858,
1488,
273,
4858,
1488,
3187,
18,
588,
55,
148... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
27842,
6946,
6094,
752,
6946,
6094,
12,
15433,
6094,
12402,
6094,
16,
348,
1488,
3187,
4858,
1488,
3187,
13,
288,
565,
348,
1488,
4858,
1488,
273,
4858,
1488,
3187,
18,
588,
55,
148... |
this.pinnedSegments = pinnedSegments; | this.pinnedSegments = new HashSet(); | public FastBatchingCellReader(RolapCube cube, Set pinnedSegments) { this.cube = cube; this.pinnedSegments = pinnedSegments; } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/0cc18052c959f8014f772086b193e28d7a6dd66a/FastBatchingCellReader.java/buggy/src/main/mondrian/rolap/FastBatchingCellReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
9545,
4497,
310,
4020,
2514,
12,
4984,
438,
39,
4895,
18324,
16,
1000,
26193,
7946,
13,
288,
3639,
333,
18,
21186,
273,
18324,
31,
3639,
333,
18,
13097,
11748,
7946,
273,
394,
6847,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1071,
9545,
4497,
310,
4020,
2514,
12,
4984,
438,
39,
4895,
18324,
16,
1000,
26193,
7946,
13,
288,
3639,
333,
18,
21186,
273,
18324,
31,
3639,
333,
18,
13097,
11748,
7946,
273,
394,
6847,... |
String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.changetoouter.description", currType.getName()); | String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.changetoouter.description", getTypeSignature(currType)); | private static void addQualifierToOuterProposal(IInvocationContext context, MethodInvocation invocationNode, IMethodBinding binding, Collection proposals) throws CoreException { ITypeBinding declaringType= binding.getDeclaringClass(); ITypeBinding parentType= Bindings.getBindingOfParentType(invocationNode); ITypeBinding currType= parentType; boolean isInstanceMethod= !Modifier.isStatic(binding.getModifiers()); while (currType != null && !Bindings.isSuperType(declaringType, currType)) { if (isInstanceMethod && Modifier.isStatic(currType.getModifiers())) { return; } currType= currType.getDeclaringClass(); } if (currType == null || currType == parentType) { return; } ASTRewrite rewrite= ASTRewrite.create(invocationNode.getAST()); ImportRewrite imports= new ImportRewrite(context.getCompilationUnit()); AST ast= invocationNode.getAST(); String qualifier= imports.addImport(currType); Name name= ASTNodeFactory.newName(ast, qualifier); Expression newExpression; if (isInstanceMethod) { ThisExpression expr= ast.newThisExpression(); expr.setQualifier(name); newExpression= expr; } else { newExpression= name; } rewrite.set(invocationNode, MethodInvocation.EXPRESSION_PROPERTY, newExpression, null); String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.changetoouter.description", currType.getName()); //$NON-NLS-1$ Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE); ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 8, image); proposal.setImportRewrite(imports); proposals.add(proposal); } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/f557cd0fa0283655148684be3495f06cff08d703/UnresolvedElementsSubProcessor.java/clean/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
527,
16185,
774,
15040,
14592,
12,
45,
9267,
1042,
819,
16,
2985,
9267,
9495,
907,
16,
467,
1305,
5250,
5085,
16,
2200,
450,
22536,
13,
1216,
30015,
288,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
527,
16185,
774,
15040,
14592,
12,
45,
9267,
1042,
819,
16,
2985,
9267,
9495,
907,
16,
467,
1305,
5250,
5085,
16,
2200,
450,
22536,
13,
1216,
30015,
288,
202,
202,
... |
public int read() throws IOException | public int read(char[] buf, int offset, int count) throws IOException | public int read() throws IOException { synchronized (lock) { checkStatus(); if (pos >= limit && fill () <= 0) return -1; return buffer[pos++]; } } | 45163 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45163/1d57bc9181cb930cec4f8e4c8a527ab510250925/BufferedReader.java/buggy/libjava/java/io/BufferedReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
855,
12,
3001,
8526,
1681,
16,
509,
1384,
16,
509,
1056,
13,
1216,
1860,
225,
288,
565,
3852,
261,
739,
13,
1377,
288,
202,
1893,
1482,
5621,
202,
430,
261,
917,
1545,
1800,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
855,
12,
3001,
8526,
1681,
16,
509,
1384,
16,
509,
1056,
13,
1216,
1860,
225,
288,
565,
3852,
261,
739,
13,
1377,
288,
202,
1893,
1482,
5621,
202,
430,
261,
917,
1545,
1800,
... |
sb.append( "-keysize \"" ); sb.append( keysize ); sb.append( "\" " ); | cmd.createArg().setValue( "-keysize" ); cmd.createArg().setValue( "" + keysize ); | public void execute() throws TaskException { if( project.getJavaVersion().equals( Project.JAVA_1_1 ) ) { throw new TaskException( "The genkey task is only available on JDK" + " versions 1.2 or greater" ); } if( null == alias ) { throw new TaskException( "alias attribute must be set" ); } if( null == storepass ) { throw new TaskException( "storepass attribute must be set" ); } if( null == dname && null == expandedDname ) { throw new TaskException( "dname must be set" ); } final StringBuffer sb = new StringBuffer(); sb.append( "keytool -genkey " ); if( verbose ) { sb.append( "-v " ); } sb.append( "-alias \"" ); sb.append( alias ); sb.append( "\" " ); if( null != dname ) { sb.append( "-dname \"" ); sb.append( dname ); sb.append( "\" " ); } if( null != expandedDname ) { sb.append( "-dname \"" ); sb.append( expandedDname ); sb.append( "\" " ); } if( null != keystore ) { sb.append( "-keystore \"" ); sb.append( keystore ); sb.append( "\" " ); } if( null != storepass ) { sb.append( "-storepass \"" ); sb.append( storepass ); sb.append( "\" " ); } if( null != storetype ) { sb.append( "-storetype \"" ); sb.append( storetype ); sb.append( "\" " ); } sb.append( "-keypass \"" ); if( null != keypass ) { sb.append( keypass ); } else { sb.append( storepass ); } sb.append( "\" " ); if( null != sigalg ) { sb.append( "-sigalg \"" ); sb.append( sigalg ); sb.append( "\" " ); } if( null != keyalg ) { sb.append( "-keyalg \"" ); sb.append( keyalg ); sb.append( "\" " ); } if( 0 < keysize ) { sb.append( "-keysize \"" ); sb.append( keysize ); sb.append( "\" " ); } if( 0 < validity ) { sb.append( "-validity \"" ); sb.append( validity ); sb.append( "\" " ); } log( "Generating Key for " + alias ); final ExecTask cmd = (ExecTask)project.createTask( "exec" ); cmd.setCommand( new Commandline( sb.toString() ) ); cmd.setFailonerror( true ); cmd.execute(); } | 639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/89c618a4ba5166ec11651fd7dc29807eb861650e/GenerateKey.java/buggy/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/GenerateKey.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1836,
1435,
3639,
1216,
3837,
503,
565,
288,
3639,
309,
12,
1984,
18,
588,
5852,
1444,
7675,
14963,
12,
5420,
18,
27264,
67,
21,
67,
21,
262,
262,
3639,
288,
5411,
604,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1836,
1435,
3639,
1216,
3837,
503,
565,
288,
3639,
309,
12,
1984,
18,
588,
5852,
1444,
7675,
14963,
12,
5420,
18,
27264,
67,
21,
67,
21,
262,
262,
3639,
288,
5411,
604,
394,
... |
viewer.setUseHashlookup(true); | void handleDetailsButtonSelect() { Shell shell = getShell(); Point shellSize = shell.getSize(); Composite composite = (Composite) getDialogArea(); if (viewer != null) { viewer.getControl().dispose(); viewer = null; composite.layout(); shell.setSize(shellSize.x, shellSize.y - viewerHeight); detailsButton.setText(ProgressMessages.ProgressMonitorJobsDialog_DetailsTitle); } else { //Abort if there are no jobs visible if (ProgressManager.getInstance().getRootElements(Policy.DEBUG_SHOW_SYSTEM_JOBS).length == 0) { detailsButton.setEnabled(false); return; } viewer = new NewProgressViewer(viewerComposite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); viewer.setUseHashlookup(true); viewer.setSorter(new ViewerSorter() { /* * (non-Javadoc) * * @see org.eclipse.jface.viewers.ViewerSorter#compare(org.eclipse.jface.viewers.Viewer, * java.lang.Object, java.lang.Object) */ public int compare(Viewer testViewer, Object e1, Object e2) { return ((Comparable) e1).compareTo(e2); } }); ProgressTreeContentProvider provider = new ProgressTreeContentProvider( viewer, true); viewer.setContentProvider(provider); viewer.setInput(provider); viewer.setLabelProvider(new ProgressLabelProvider()); GridData viewerData = new GridData(GridData.FILL_BOTH); viewer.getControl().setLayoutData(viewerData); GridData viewerCompositeData = (GridData) viewerComposite.getLayoutData(); viewerCompositeData.heightHint = convertHeightInCharsToPixels(10); viewerComposite.layout(true); viewer.getControl().setVisible(true); viewerHeight = viewerComposite.computeTrim(0, 0, 0, viewerCompositeData.heightHint).height; detailsButton.setText(ProgressMessages.ProgressMonitorJobsDialog_HideTitle); shell.setSize(shellSize.x, shellSize.y + viewerHeight); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/852f4fa051527b55d573274f8d387f43109b3ff6/ProgressMonitorJobsDialog.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressMonitorJobsDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1640,
3790,
3616,
3391,
1435,
288,
3639,
19433,
5972,
273,
7932,
1165,
5621,
3639,
4686,
5972,
1225,
273,
5972,
18,
588,
1225,
5621,
3639,
14728,
9635,
273,
261,
9400,
13,
31774,
5484,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3790,
3616,
3391,
1435,
288,
3639,
19433,
5972,
273,
7932,
1165,
5621,
3639,
4686,
5972,
1225,
273,
5972,
18,
588,
1225,
5621,
3639,
14728,
9635,
273,
261,
9400,
13,
31774,
5484,... | |
super( value, name ); | super( value, name, literal ); | private Direction( int value, String name ) { super( value, name ); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/036e8c78765730b146e5854b9d6c397a296fed86/Direction.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/Direction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
15280,
12,
509,
460,
16,
514,
508,
262,
202,
95,
202,
202,
9565,
12,
460,
16,
508,
11272,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
15280,
12,
509,
460,
16,
514,
508,
262,
202,
95,
202,
202,
9565,
12,
460,
16,
508,
11272,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
throw ExceptionFactory.makeWebServiceException("As per WS-I compliance, Multi part WSDL not allowed for Doc/Lit NON Wrapped request, Method invoked has multiple input parameter"); | if (log.isDebugEnabled()) { log.debug("As per WS-I compliance, Multi part WSDL not allowed for Doc/Lit NON Wrapped request, Method invoked has multiple input parameter"); } throw ExceptionFactory.makeWebServiceException(Messages.getMessage("DocLitProxyHandlerErr1")); | private MessageContext createDocLitNONWrappedRequest(Method method, Object[] objects) throws JAXBException, MessageException, XMLStreamException{ JAXBContext ctx = null; Object requestObject = null; ArrayList<String> names = getParamNames(objects); Map<String, Object> values = getParamValues(objects, names); if(names.size()> SIZE || values.size() > SIZE){ throw ExceptionFactory.makeWebServiceException("As per WS-I compliance, Multi part WSDL not allowed for Doc/Lit NON Wrapped request, Method invoked has multiple input parameter"); } for(String name:names){ requestObject = values.get(name); if(requestObject == null){ throw ExceptionFactory.makeWebServiceException("Method Input parameter for NON Wrapped Request cannot be null"); } } ctx = JAXBContext.newInstance(new Class[]{requestObject.getClass()}); Block reqBlock = createJAXBBlock(requestObject, ctx); MessageContext requestCtx = initializeRequest(reqBlock); return requestCtx; } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/c813da232b97ab742ef07e0f4acc1c25dcd70617/DocLitProxyHandler.java/buggy/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/DocLitProxyHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
2350,
1042,
752,
1759,
23707,
3993,
17665,
691,
12,
1305,
707,
16,
1033,
8526,
2184,
13,
1216,
7661,
503,
16,
2350,
503,
16,
21526,
95,
202,
202,
17368,
38,
1042,
1103,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
2350,
1042,
752,
1759,
23707,
3993,
17665,
691,
12,
1305,
707,
16,
1033,
8526,
2184,
13,
1216,
7661,
503,
16,
2350,
503,
16,
21526,
95,
202,
202,
17368,
38,
1042,
1103,
273,
... |
if (offs <= 0) | if (offs < 0) | protected synchronized void computeTime() { int millisInDay = 0; int era = fields[ERA]; int year = fields[YEAR]; int month = fields[MONTH]; int day = fields[DAY_OF_MONTH]; int minute = fields[MINUTE]; int second = fields[SECOND]; int millis = fields[MILLISECOND]; int[] month_days = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int[] dayCount = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }; int hour = 0; if (! isLenient()) nonLeniencyCheck(); if (! isSet[MONTH] && (! isSet[DAY_OF_WEEK] || isSet[WEEK_OF_YEAR])) { // 5: YEAR + DAY_OF_WEEK + WEEK_OF_YEAR if (isSet[WEEK_OF_YEAR]) { int first = getFirstDayOfMonth(year, 0); int offs = 1; int daysInFirstWeek = getFirstDayOfWeek() - first; if (daysInFirstWeek <= 0) daysInFirstWeek += 7; if (daysInFirstWeek < getMinimalDaysInFirstWeek()) offs += daysInFirstWeek; else offs -= 7 - daysInFirstWeek; month = 0; day = offs + 7 * (fields[WEEK_OF_YEAR] - 1); offs = fields[DAY_OF_WEEK] - getFirstDayOfWeek(); if (offs < 0) offs += 7; day += offs; } else { // 4: YEAR + DAY_OF_YEAR month = 0; day = fields[DAY_OF_YEAR]; } } else { if (isSet[DAY_OF_WEEK]) { int first = getFirstDayOfMonth(year, month); // 3: YEAR + MONTH + DAY_OF_WEEK_IN_MONTH + DAY_OF_WEEK if (isSet[DAY_OF_WEEK_IN_MONTH]) { if (fields[DAY_OF_WEEK_IN_MONTH] < 0) { month++; first = getFirstDayOfMonth(year, month); day = 1 + 7 * (fields[DAY_OF_WEEK_IN_MONTH]); } else day = 1 + 7 * (fields[DAY_OF_WEEK_IN_MONTH] - 1); int offs = fields[DAY_OF_WEEK] - first; if (offs < 0) offs += 7; day += offs; } else { // 2: YEAR + MONTH + WEEK_OF_MONTH + DAY_OF_WEEK int offs = 1; int daysInFirstWeek = getFirstDayOfWeek() - first; if (daysInFirstWeek <= 0) daysInFirstWeek += 7; if (daysInFirstWeek < getMinimalDaysInFirstWeek()) offs += daysInFirstWeek; else offs -= 7 - daysInFirstWeek; day = offs + 7 * (fields[WEEK_OF_MONTH] - 1); offs = fields[DAY_OF_WEEK] - getFirstDayOfWeek(); if (offs <= 0) offs += 7; day += offs; } } // 1: YEAR + MONTH + DAY_OF_MONTH } if (era == BC && year > 0) year = 1 - year; // rest of code assumes day/month/year set // should negative BC years be AD? // get the hour (but no check for validity) if (isSet[HOUR]) { hour = fields[HOUR]; if (fields[AM_PM] == PM) hour += 12; } else hour = fields[HOUR_OF_DAY]; // Read the era,year,month,day fields and convert as appropriate. // Calculate number of milliseconds into the day // This takes care of both h, m, s, ms over/underflows. long allMillis = (((hour * 60L) + minute) * 60L + second) * 1000L + millis; day += allMillis / (24 * 60 * 60 * 1000L); millisInDay = (int) (allMillis % (24 * 60 * 60 * 1000L)); if (month < 0) { year += (int) month / 12; month = month % 12; if (month < 0) { month += 12; year--; } } if (month > 11) { year += (month / 12); month = month % 12; } month_days[1] = isLeapYear(year) ? 29 : 28; while (day <= 0) { if (month == 0) { year--; month_days[1] = isLeapYear(year) ? 29 : 28; } month = (month + 11) % 12; day += month_days[month]; } while (day > month_days[month]) { day -= (month_days[month]); month = (month + 1) % 12; if (month == 0) { year++; month_days[1] = isLeapYear(year) ? 29 : 28; } } // ok, by here we have valid day,month,year,era and millisinday int dayOfYear = dayCount[month] + day - 1; // (day starts on 1) if (isLeapYear(year) && month > 1) dayOfYear++; int relativeDay = (year - 1) * 365 + ((year - 1) >> 2) + dayOfYear - EPOCH_DAYS; // gregorian days from 1 to epoch. int gregFactor = (int) Math.floor((double) (year - 1) / 400.) - (int) Math.floor((double) (year - 1) / 100.); if ((relativeDay + gregFactor) * 60L * 60L * 24L * 1000L >= gregorianCutover) relativeDay += gregFactor; else relativeDay -= 2; time = relativeDay * (24 * 60 * 60 * 1000L) + millisInDay; // the epoch was a Thursday. int weekday = (int) (relativeDay + THURSDAY) % 7; if (weekday <= 0) weekday += 7; fields[DAY_OF_WEEK] = weekday; // Time zone corrections. TimeZone zone = getTimeZone(); int rawOffset = isSet[ZONE_OFFSET] ? fields[ZONE_OFFSET] : zone.getRawOffset(); int dstOffset = isSet[DST_OFFSET] ? fields[DST_OFFSET] : (zone.getOffset((year < 0) ? BC : AD, (year < 0) ? 1 - year : year, month, day, weekday, millisInDay) - zone.getRawOffset()); time -= rawOffset + dstOffset; isTimeSet = true; } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/ab9dc3bbbe7479e7129a75f6523afbafe316dc51/GregorianCalendar.java/clean/java/util/GregorianCalendar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
3852,
918,
3671,
950,
1435,
225,
288,
565,
509,
14833,
382,
4245,
273,
374,
31,
565,
509,
25120,
273,
1466,
63,
654,
37,
15533,
565,
509,
3286,
273,
1466,
63,
15137,
15533,
565,
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,
4750,
3852,
918,
3671,
950,
1435,
225,
288,
565,
509,
14833,
382,
4245,
273,
374,
31,
565,
509,
25120,
273,
1466,
63,
654,
37,
15533,
565,
509,
3286,
273,
1466,
63,
15137,
15533,
565,
5... |
min_mult = histogram[threadCount/10]; | System.out.println("[bestMult] [DWS] 0th-precentile: "+histogram[threadCount-1]); | public static int bestMult(int data_cache1, int data_cache2) { int threadCount = NodeEnumerator.getNumberOfNodes(); int min_mult;// = cache_size; int histogram[] = new int[threadCount]; for (int t = 0; t < threadCount; t++) { SIROperator oper = NodeEnumerator.getOperator(t); int dws = DataEstimate.estimateDWS(oper); int io = DataEstimate.estimateIOSize(oper); int avail = 0; // if dws < .8 * data_cahce1 if (dws / 8 * 10 < data_cache1) { avail = data_cache1 - dws; } else { avail = data_cache2 - dws; } if (io == 0) io = 1; int mult = avail / io; //System.out.println("DWS: "+dws+" Avail: "+avail+" IO: "+io+" Mult: "+mult); histogram[t] = mult; //if (mult < min_mult) { min_mult = mult; } } Arrays.sort(histogram); System.out.println("[bestMult] min: "+histogram[0]+" max: "+histogram[threadCount-1]+" 10th-precentile: "+histogram[threadCount/10]); min_mult = histogram[threadCount/10]; if (min_mult > 100) min_mult = 100; if (min_mult < 0) min_mult = 1; System.out.println("[bestMult] returning multiplicity : "+min_mult); return min_mult; } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/27a6931eed80e22f34097df73528fdc32def5326/FusionCode.java/clean/streams/src/at/dms/kjc/cluster/FusionCode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
509,
3796,
5049,
12,
474,
501,
67,
2493,
21,
16,
509,
501,
67,
2493,
22,
13,
288,
202,
474,
2650,
1380,
273,
2029,
3572,
7385,
18,
588,
9226,
3205,
5621,
202,
474,
1131,
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,
760,
509,
3796,
5049,
12,
474,
501,
67,
2493,
21,
16,
509,
501,
67,
2493,
22,
13,
288,
202,
474,
2650,
1380,
273,
2029,
3572,
7385,
18,
588,
9226,
3205,
5621,
202,
474,
1131,
67... |
return nameType; | return unParse(this); | public String toString() { return nameType; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/8c89e95337dbd26b80a9eed80801d2f5f6d8b1c2/GDBTypeParser.java/buggy/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
514,
1762,
1435,
288,
1082,
202,
2463,
508,
559,
31,
202,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
3196,
202,
482,
514,
1762,
1435,
288,
1082,
202,
2463,
508,
559,
31,
202,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
RubyObject result = null; result = getNextNode() != null ? getNextNode().eval(ruby, ruby.getRubyClass()) : ruby.getNil(); ruby.getCRef().pop(); RubyVarmap.pop(ruby); ruby.getScope().pop(); ruby.popClass(); ruby.getRubyFrame().tmpPop(); return result; } | try { return ruby.getRubyClass().eval(getNextNode()); } finally { ruby.getCRef().pop(); RubyVarmap.pop(ruby); ruby.getScope().pop(); ruby.popClass(); ruby.getRubyFrame().tmpPop(); } } | public RubyObject setupModule(Ruby ruby, RubyModule module) { // Node node = n; String file = ruby.getSourceFile(); int line = ruby.getSourceLine(); // TMP_PROTECT; ruby.getRubyFrame().tmpPush(); ruby.pushClass(); ruby.setRubyClass(module); ruby.setCBase(module); //CHAD ruby.getScope().push(); RubyVarmap.push(ruby); if (getTable() != null) { ruby.getScope().setLocalValues(new ArrayList(Collections.nCopies(getTable().size(), ruby.getNil()))); ruby.getScope().setLocalNames(getTable()); } else { ruby.getScope().setLocalValues(null); ruby.getScope().setLocalNames(null); } // +++ // if (ruby.getCRef() != null) { ruby.getCRef().push(module); // } else { // ruby.setCRef(new CRefNode(module, null)); // } // --- ruby.getRubyFrame().setCbase(ruby.getCRef()); // PUSH_TAG(PROT_NONE); RubyObject result = null; // if (( state = EXEC_TAG()) == 0 ) { // if (trace_func) { // call_trace_func("class", file, line, ruby_class, // ruby_frame->last_func, ruby_frame->last_class ); // } result = getNextNode() != null ? getNextNode().eval(ruby, ruby.getRubyClass()) : ruby.getNil(); // } // POP_TAG(); ruby.getCRef().pop(); RubyVarmap.pop(ruby); ruby.getScope().pop(); ruby.popClass(); ruby.getRubyFrame().tmpPop(); // if (trace_func){ // call_trace_func("end", file, line, 0, ruby_frame->last_func, ruby_frame->last_class ); // } // if (state != 0){ // JUMP_TAG(state); // } return result; } | 47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/7798138390a306a202dcec9bde45928dae2e852e/ScopeNode.java/buggy/org/jruby/nodes/ScopeNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
3875,
3120,
12,
54,
10340,
22155,
16,
19817,
3120,
1605,
13,
288,
202,
202,
759,
2029,
756,
273,
290,
31,
202,
202,
780,
585,
273,
22155,
18,
588,
31150,
5621,
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,
19817,
921,
3875,
3120,
12,
54,
10340,
22155,
16,
19817,
3120,
1605,
13,
288,
202,
202,
759,
2029,
756,
273,
290,
31,
202,
202,
780,
585,
273,
22155,
18,
588,
31150,
5621,
202... |
if (c != '[') exception ("illegal: <"+c); result = CDSECT; req = "CDATA["; term = ']'; } | exception ("illegal: <"+c); return -1; } | private final int parseLegacy (boolean push) throws IOException, XmlPullParserException { String req = ""; int term; int result; read (); // < int c = read (); if (c == '?') { term = '?'; result = PROCESSING_INSTRUCTION; } else if (c == '!') { if (peek (0) == '-') { result = COMMENT; req = "--"; term = '-'; } else { result = DOCDECL; req = "DOCTYPE"; term = -1; } } else { if (c != '[') exception ("illegal: <"+c); result = CDSECT; req = "CDATA["; term = ']'; } for (int i = 0; i < req.length (); i++) read (req.charAt (i)); if (result == DOCDECL) parseDoctype (push); else { while (true) { c = read (); if (c == -1) exception (UNEXPECTED_EOF); if (push) push (c); if ((term == '?' || c == term) && peek (0) == term && peek (1) == '>') break; } read (); read (); if (push && term != '?') txtPos--; } return result; } | 4761 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4761/e3528de7f2daca3d6b03a8271d8cbab09579cf55/KXmlParser.java/buggy/src/org/kxml2/io/KXmlParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
727,
509,
1109,
12235,
261,
6494,
1817,
13,
1216,
1860,
16,
5714,
9629,
25746,
288,
202,
202,
780,
1111,
273,
1408,
31,
202,
474,
2481,
31,
202,
474,
563,
31,
202,
896,
261,
1769,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
727,
509,
1109,
12235,
261,
6494,
1817,
13,
1216,
1860,
16,
5714,
9629,
25746,
288,
202,
202,
780,
1111,
273,
1408,
31,
202,
474,
2481,
31,
202,
474,
563,
31,
202,
896,
261,
1769,... |
public List getRowExpressions( Chart cm, IActionEvaluator iae ) throws ChartException | public List getRowExpressions( Chart cm ) throws ChartException | public List getRowExpressions( Chart cm, IActionEvaluator iae ) throws ChartException { return DataProcessor.getRowExpressions( cm, iae ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/2d47e9f9b9a87f022fdb5d7aa8da7054e061aac0/Generator.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/factory/Generator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
11835,
8927,
12,
14804,
5003,
16,
467,
1803,
15876,
30905,
262,
1082,
202,
15069,
14804,
503,
202,
95,
202,
202,
2463,
1910,
5164,
18,
588,
1999,
8927,
12,
5003,
16,
30905,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
202,
482,
987,
11835,
8927,
12,
14804,
5003,
16,
467,
1803,
15876,
30905,
262,
1082,
202,
15069,
14804,
503,
202,
95,
202,
202,
2463,
1910,
5164,
18,
588,
1999,
8927,
12,
5003,
16,
30905,... |
throw new ContinuumException( "Error while updating the project.", e ); | throw logAndCreateException( "Error while updating the project.", e ); | private void updateProject( ContinuumProject project ) throws ContinuumException { try { store.updateProject( project.getId(), project.getName(), project.getScmUrl(), project.getNagEmailAddress(), project.getVersion() ); } catch ( ContinuumStoreException e ) { throw new ContinuumException( "Error while updating the project.", e ); } } | 48499 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48499/a0328638c62e71b24f025680c11e7e243d950ac6/DefaultContinuum.java/clean/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
4109,
12,
1816,
6860,
379,
4109,
1984,
262,
3639,
1216,
1816,
6860,
379,
503,
565,
288,
3639,
775,
3639,
288,
5411,
1707,
18,
2725,
4109,
12,
1984,
18,
26321,
9334,
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,
3238,
918,
1089,
4109,
12,
1816,
6860,
379,
4109,
1984,
262,
3639,
1216,
1816,
6860,
379,
503,
565,
288,
3639,
775,
3639,
288,
5411,
1707,
18,
2725,
4109,
12,
1984,
18,
26321,
9334,
4766,... |
private Object writeReplace() throws ObjectStreamException { return new InetAddress(addr, hostName); } | private Object writeReplace() throws ObjectStreamException { return new InetAddress(addr, hostName, null); } | private Object writeReplace() throws ObjectStreamException { return new InetAddress(addr, hostName); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/e3f7218be7244f0de74b2230a33469c2bf32546b/Inet4Address.java/buggy/core/src/classpath/java/java/net/Inet4Address.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1033,
1045,
5729,
1435,
1216,
1033,
1228,
503,
288,
202,
202,
2463,
394,
14218,
12,
4793,
16,
19266,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1033,
1045,
5729,
1435,
1216,
1033,
1228,
503,
288,
202,
202,
2463,
394,
14218,
12,
4793,
16,
19266,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
public abstract Category browse(String catId) throws IOException, SAXException, FlickrException; | public Category browse(String catId) throws IOException, SAXException, FlickrException { List subcategories = new ArrayList(); List groups = new ArrayList(); List parameters = new ArrayList(); parameters.add(new Parameter("method", METHOD_BROWSE)); parameters.add(new Parameter("api_key", apiKey)); if (catId != null) { parameters.add(new Parameter("cat_id", catId)); } Response response = transportAPI.get("/services/rest/", parameters); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element categoryElement = response.getPayload(); Category category = new Category(); category.setName(categoryElement.getAttribute("name")); category.setPath(categoryElement.getAttribute("path")); category.setPathIds(categoryElement.getAttribute("pathids")); NodeList subcatNodes = categoryElement.getElementsByTagName("subcat"); for (int i = 0; i < subcatNodes.getLength(); i++) { Element node = (Element) subcatNodes.item(i); Subcategory subcategory = new Subcategory(); subcategory.setId(Integer.parseInt(node.getAttribute("id"))); subcategory.setName(node.getAttribute("name")); subcategory.setCount(Integer.parseInt(node.getAttribute("count"))); subcategories.add(subcategory); } NodeList groupNodes = categoryElement.getElementsByTagName("group"); for (int i = 0; i < groupNodes.getLength(); i++) { Element node = (Element) groupNodes.item(i); Group group = new Group(); group.setId(node.getAttribute("nsid")); group.setName(node.getAttribute("name")); group.setMembers(node.getAttribute("members")); group.setOnline(node.getAttribute("online")); group.setChatId(node.getAttribute("chatnsid")); group.setInChat(node.getAttribute("inchat")); groups.add(group); } category.setGroups(groups); category.setSubcategories(subcategories); return category; } | public abstract Category browse(String catId) throws IOException, SAXException, FlickrException; | 5074 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5074/ec4da2808f85d9301a1bbf9deec78f08b03a2311/GroupsInterface.java/buggy/src/com/aetrion/flickr/groups/GroupsInterface.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8770,
9856,
21670,
12,
780,
6573,
548,
13,
1216,
1860,
16,
14366,
16,
29458,
503,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8770,
9856,
21670,
12,
780,
6573,
548,
13,
1216,
1860,
16,
14366,
16,
29458,
503,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
public Connection $connect() { Connection conn = $getNamingContext().getConnectionPool().get(_protocol, $getEndpoint(), this); conn.beforeInvoke(); return conn; | public Connection $connect() { try { Connection conn = $getNamingContext().getConnectionPool().get(_protocol, $getEndpoint(), this); conn.beforeInvoke(); return conn; } catch (RuntimeException ex) { throw ex; } | public Connection $connect() { Connection conn = $getNamingContext().getConnectionPool().get(_protocol, $getEndpoint(), this); conn.beforeInvoke(); return conn; } | 12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/5c788225030ea2bb15cb5f3f9696c52b755b6d54/ObjectRef.java/clean/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/ObjectRef.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4050,
271,
3612,
1435,
288,
3639,
4050,
1487,
273,
271,
588,
24102,
1042,
7675,
588,
1952,
2864,
7675,
588,
24899,
8373,
16,
271,
588,
3293,
9334,
333,
1769,
3639,
1487,
18,
5771,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4050,
271,
3612,
1435,
288,
3639,
4050,
1487,
273,
271,
588,
24102,
1042,
7675,
588,
1952,
2864,
7675,
588,
24899,
8373,
16,
271,
588,
3293,
9334,
333,
1769,
3639,
1487,
18,
5771,
1... |
stack[stackTop] = ScriptRuntime.nameIncrDecr(scope, varName, type); | stack[stackTop] = ScriptRuntime.nameIncrDecr(scope, varName, incrDecrMask); | static Object interpret(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, double[] argsDbl, int argShift, int argCount, NativeFunction fnOrScript, InterpreterData idata) throws JavaScriptException { if (cx.interpreterSecurityDomain != idata.securityDomain) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); } SecurityController sc = idata.securityController; Object savedDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = idata.securityDomain; try { return sc.callWithDomain(idata.securityDomain, cx, fnOrScript, scope, thisObj, args); } finally { cx.interpreterSecurityDomain = savedDomain; } } final Object DBL_MRK = Interpreter.DBL_MRK; final Scriptable undefined = Undefined.instance; final int LOCAL_SHFT = idata.itsMaxVars; final int STACK_SHFT = LOCAL_SHFT + idata.itsMaxLocals;// stack[0 <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_STACK_SHFT]: used for local temporaries// stack[STACK_SHFT <= i < STACK_SHFT + idata.itsMaxStack]: stack data// sDbl[i]: if stack[i] is DBL_MRK, sDbl[i] holds the number value int maxFrameArray = idata.itsMaxFrameArray; if (maxFrameArray != STACK_SHFT + idata.itsMaxStack) Kit.codeBug(); Object[] stack = new Object[maxFrameArray]; double[] sDbl = new double[maxFrameArray]; int stackTop = STACK_SHFT - 1; int withDepth = 0; int definedArgs = fnOrScript.argCount; if (definedArgs > argCount) { definedArgs = argCount; } for (int i = 0; i != definedArgs; ++i) { Object arg = args[argShift + i]; stack[i] = arg; if (arg == DBL_MRK) { sDbl[i] = argsDbl[argShift + i]; } } for (int i = definedArgs; i != idata.itsMaxVars; ++i) { stack[i] = undefined; } DebugFrame debuggerFrame = null; if (cx.debugger != null) { debuggerFrame = cx.debugger.getFrame(cx, idata); } if (idata.itsFunctionType != 0) { InterpretedFunction f = (InterpretedFunction)fnOrScript; if (!idata.useDynamicScope) { scope = fnOrScript.getParentScope(); } if (idata.itsCheckThis) { thisObj = ScriptRuntime.getThis(thisObj); } if (idata.itsNeedsActivation) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } } else { ScriptRuntime.initScript(cx, scope, fnOrScript, thisObj, idata.itsFromEvalCode); } if (idata.itsNestedFunctions != null) { if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) Kit.codeBug(); for (int i = 0; i < idata.itsNestedFunctions.length; i++) { InterpreterData fdata = idata.itsNestedFunctions[i]; if (fdata.itsFunctionType == FunctionNode.FUNCTION_STATEMENT) { createFunction(cx, scope, fdata, idata.itsFromEvalCode); } } } // Wrapped regexps for functions are stored in InterpretedFunction // but for script which should not contain references to scope // the regexps re-wrapped during each script execution Scriptable[] scriptRegExps = null; boolean useActivationVars = false; if (debuggerFrame != null) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) { useActivationVars = true; scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } debuggerFrame.onEnter(cx, scope, thisObj, args); } InterpreterData savedData = cx.interpreterData; cx.interpreterData = idata; cx.interpreterLineIndex = idata.firstLinePC; Object result = undefined; // If javaException != null on exit, it will be throw instead of // normal return Throwable javaException = null; int exceptionPC = -1; byte[] iCode = idata.itsICode; int pc = 0; int pcPrevBranch = 0; final boolean instructionCounting = (cx.instructionThreshold != 0); // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; String[] strings = idata.itsStringTable; String stringReg = null; int indexReg = 0; Loop: for (;;) { try { int op = iCode[pc++]; // Back indent to ease imlementation readingswitch (op) { case Icode_CATCH: { // The following code should be executed inside try/catch inside main // loop, not in the loop catch block itself to deal with exceptions // from observeInstructionCount. A special bytecode is used only to // simplify logic. if (javaException == null) Kit.codeBug(); pc = -1; boolean doCatch = false; int handlerOffset = getExceptionHandler(idata.itsExceptionTable, exceptionPC); if (handlerOffset >= 0) { final int SCRIPT_CAN_CATCH = 0, ONLY_FINALLY = 1, OTHER = 2; int exType; if (javaException instanceof JavaScriptException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof EcmaError) { // an offical ECMA error object, exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof EvaluatorException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof RuntimeException) { exType = ONLY_FINALLY; } else { // Error instance exType = OTHER; } if (exType != OTHER) { // Do not allow for JS to interfere with Error instances // (exType == OTHER), as they can be used to terminate // long running script if (exType == SCRIPT_CAN_CATCH) { // Allow JS to catch only JavaScriptException and // EcmaError pc = idata.itsExceptionTable[handlerOffset + EXCEPTION_CATCH_SLOT]; if (pc >= 0) { // Has catch block doCatch = true; } } if (pc < 0) { pc = idata.itsExceptionTable[handlerOffset + EXCEPTION_FINALLY_SLOT]; } } } if (debuggerFrame != null && !(javaException instanceof Error)) { debuggerFrame.onExceptionThrown(cx, javaException); } if (pc < 0) { break Loop; } // We caught an exception // restore scope at try point int tryWithDepth = idata.itsExceptionTable[ handlerOffset + EXCEPTION_WITH_DEPTH_SLOT]; while (tryWithDepth != withDepth) { if (scope == null) Kit.codeBug(); scope = ScriptRuntime.leaveWith(scope); --withDepth; } if (doCatch) { stackTop = STACK_SHFT - 1; int exLocal = idata.itsExceptionTable[ handlerOffset + EXCEPTION_LOCAL_SLOT]; stack[LOCAL_SHFT + exLocal] = ScriptRuntime.getCatchObject( cx, scope, javaException); } else { stackTop = STACK_SHFT; // Call finally handler with javaException on stack top to // distinguish from normal invocation through GOSUB // which would contain DBL_MRK on the stack stack[stackTop] = javaException; } // clear exception javaException = null; if (instructionCounting) { // 500: catch cost cx.addInstructionCount(500); pcPrevBranch = pc; } continue Loop; } case Token.THROW: { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); --stackTop; int sourceLine = getShort(iCode, pc); throw new JavaScriptException(value, idata.itsSourceFile, sourceLine); } case Token.GE : case Token.LE : case Token.GT : case Token.LT : stackTop = do_cmp(stack, sDbl, stackTop, op); continue Loop; case Token.IN : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.in(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; continue Loop; } case Token.INSTANCEOF : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.instanceOf(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; continue Loop; } case Token.EQ : case Token.NE : stackTop = do_eq(stack, sDbl, stackTop, op); continue Loop; case Token.SHEQ : case Token.SHNE : stackTop = do_sheq(stack, sDbl, stackTop, op); continue Loop; case Token.IFNE : if (stack_boolean(stack, sDbl, stackTop--)) { pc += 2; continue Loop; } break; case Token.IFEQ : if (!stack_boolean(stack, sDbl, stackTop--)) { pc += 2; continue Loop; } break; case Icode_IFEQ_POP : if (!stack_boolean(stack, sDbl, stackTop--)) { pc += 2; continue Loop; } stack[stackTop--] = null; break; case Token.GOTO : break; case Icode_GOSUB : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = pc + 2; break; case Icode_RETSUB : { // indexReg: local to store return address if (instructionCounting) { cx.addInstructionCount(pc - pcPrevBranch); } Object value = stack[LOCAL_SHFT + indexReg]; if (value != DBL_MRK) { // Invocation from exception handler, restore object to rethrow javaException = (Throwable)value; exceptionPC = pc - 1; pc = getJavaCatchPC(iCode); } else { // Normal return from GOSUB pc = (int)sDbl[LOCAL_SHFT + indexReg]; pcPrevBranch = pc; } continue Loop; } case Token.POP : stack[stackTop] = null; stackTop--; continue Loop; case Icode_DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; continue Loop; case Icode_DUP2 : stack[stackTop + 1] = stack[stackTop - 1]; sDbl[stackTop + 1] = sDbl[stackTop - 1]; stack[stackTop + 2] = stack[stackTop]; sDbl[stackTop + 2] = sDbl[stackTop]; stackTop += 2; continue Loop; case Icode_SWAP : { Object o = stack[stackTop]; stack[stackTop] = stack[stackTop - 1]; stack[stackTop - 1] = o; double d = sDbl[stackTop]; sDbl[stackTop] = sDbl[stackTop - 1]; sDbl[stackTop - 1] = d; continue Loop; } case Token.POPV : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); stack[stackTop] = null; --stackTop; continue Loop; case Token.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break Loop; case Token.RETURN_POPV : break Loop; case Icode_RETUNDEF : result = undefined; break Loop; case Token.BITNOT : { int rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; continue Loop; } case Token.BITAND : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; continue Loop; } case Token.BITOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; continue Loop; } case Token.BITXOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; continue Loop; } case Token.LSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; continue Loop; } case Token.RSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; continue Loop; } case Token.URSH : { int rIntValue = stack_int32(stack, sDbl, stackTop) & 0x1F; --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ScriptRuntime.toUint32(lDbl) >>> rIntValue; continue Loop; } case Token.NEG : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; continue Loop; } case Token.POS : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; continue Loop; } case Token.ADD : stackTop = do_add(stack, sDbl, stackTop); continue Loop; case Token.SUB : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; continue Loop; } case Token.MUL : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; continue Loop; } case Token.DIV : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; // Detect the divide by zero or let Java do it ? sDbl[stackTop] = lDbl / rDbl; continue Loop; } case Token.MOD : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; continue Loop; } case Token.NOT : stack[stackTop] = stack_boolean(stack, sDbl, stackTop) ? Boolean.FALSE : Boolean.TRUE; continue Loop; case Token.BINDNAME : stack[++stackTop] = ScriptRuntime.bind(scope, stringReg); continue Loop; case Token.SETNAME : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Scriptable lhs = (Scriptable)stack[stackTop]; stack[stackTop] = ScriptRuntime.setName(lhs, rhs, scope, stringReg); continue Loop; } case Token.DELPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.delete(cx, scope, lhs, rhs); continue Loop; } case Token.GETPROP : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, stringReg, scope); continue Loop; } case Token.SETPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProp(lhs, stringReg, rhs, scope); continue Loop; } case Icode_PROP_INC_DEC : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.propIncrDecr(lhs, stringReg, scope, iCode[pc]); ++pc; continue Loop; } case Token.GETELEM : stackTop = do_getElem(stack, sDbl, stackTop, cx, scope); continue Loop; case Token.SETELEM : stackTop = do_setElem(stack, sDbl, stackTop, cx, scope); continue Loop; case Icode_ELEM_INC_DEC: { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.elemIncrDecr(lhs, rhs, scope, iCode[pc]); ++pc; continue Loop; } case Token.GET_REF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getReference(lhs); continue Loop; } case Token.SET_REF : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); ScriptRuntime.setReference(lhs, rhs); stack[stackTop] = rhs; continue Loop; } case Icode_REF_INC_DEC : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.referenceIncrDecr(lhs, iCode[pc]); ++pc; continue Loop; } case Token.LOCAL_SAVE : stack[LOCAL_SHFT + indexReg] = stack[stackTop]; sDbl[LOCAL_SHFT + indexReg] = sDbl[stackTop]; --stackTop; continue Loop; case Token.LOCAL_LOAD : ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + indexReg]; sDbl[stackTop] = sDbl[LOCAL_SHFT + indexReg]; continue Loop; case Icode_CALLSPECIAL : { if (instructionCounting) { cx.instructionCount += INVOCATION_COST; } // indexReg: number of arguments int callType = iCode[pc] & 0xFF; boolean isNew = (iCode[pc + 1] != 0); int sourceLine = getShort(iCode, pc + 2); stackTop -= indexReg; Object[] outArgs = getArgsArray(stack, sDbl, stackTop + 1, indexReg); Object functionThis; if (isNew) { functionThis = null; } else { functionThis = stack[stackTop]; if (functionThis == DBL_MRK) { functionThis = doubleWrap(sDbl[stackTop]); } --stackTop; } Object function = stack[stackTop]; if (function == DBL_MRK) function = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.callSpecial( cx, function, isNew, functionThis, outArgs, scope, thisObj, callType, idata.itsSourceFile, sourceLine); pc += 4; continue Loop; } case Token.CALL : { if (instructionCounting) { cx.instructionCount += INVOCATION_COST; } // indexReg: number of arguments stackTop -= indexReg; int calleeArgShft = stackTop + 1; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; Scriptable calleeScope = scope; if (idata.itsNeedsActivation) { calleeScope = ScriptableObject.getTopLevelScope(scope); } Scriptable calleeThis; if (rhs instanceof Scriptable || rhs == null) { calleeThis = (Scriptable)rhs; } else { calleeThis = ScriptRuntime.toObject(cx, calleeScope, rhs); } if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.call not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; stack[stackTop] = interpret(cx, calleeScope, calleeThis, stack, sDbl, calleeArgShft, indexReg, f, f.itsData); } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, indexReg); stack[stackTop] = f.call(cx, calleeScope, calleeThis, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); throw notAFunction(lhs, idata, pc); } pc += 2; continue Loop; } case Token.NEW : { if (instructionCounting) { cx.instructionCount += INVOCATION_COST; } // indexReg: number of arguments stackTop -= indexReg; int calleeArgShft = stackTop + 1; Object lhs = stack[stackTop]; if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.construct not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; Scriptable newInstance = f.createObject(cx, scope); Object callResult = interpret(cx, scope, newInstance, stack, sDbl, calleeArgShft, indexReg, f, f.itsData); if (callResult instanceof Scriptable && callResult != undefined) { stack[stackTop] = callResult; } else { stack[stackTop] = newInstance; } } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, indexReg); stack[stackTop] = f.construct(cx, scope, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); throw notAFunction(lhs, idata, pc); } pc += 2; continue Loop; } case Token.TYPEOF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); continue Loop; } case Icode_TYPEOFNAME : stack[++stackTop] = ScriptRuntime.typeofName(scope, stringReg); continue Loop; case Icode_NAME_FAST_THIS : case Icode_NAME_SLOW_THIS : stackTop = do_nameAndThis(stack, stackTop, scope, stringReg, op); continue Loop; case Token.STRING : stack[++stackTop] = stringReg; continue Loop; case Icode_SHORTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc); pc += 2; continue Loop; case Icode_INTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc); pc += 4; continue Loop; case Token.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = idata.itsDoubleTable[indexReg]; continue Loop; case Token.NAME : stack[++stackTop] = ScriptRuntime.name(scope, stringReg); continue Loop; case Icode_NAME_INC_DEC : stack[++stackTop] = ScriptRuntime.nameIncrDecr(scope, stringReg, iCode[pc]); ++pc; continue Loop; case Icode_SETVAR1: indexReg = iCode[pc++]; // fallthrough case Token.SETVAR : if (!useActivationVars) { stack[indexReg] = stack[stackTop]; sDbl[indexReg] = sDbl[stackTop]; } else { Object val = stack[stackTop]; if (val == DBL_MRK) val = doubleWrap(sDbl[stackTop]); activationPut(fnOrScript, scope, indexReg, val); } continue Loop; case Icode_GETVAR1: indexReg = iCode[pc++]; // fallthrough case Token.GETVAR : ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[indexReg]; sDbl[stackTop] = sDbl[indexReg]; } else { stack[stackTop] = activationGet(fnOrScript, scope, indexReg); } continue Loop; case Icode_VAR_INC_DEC : { // indexReg : varindex ++stackTop; int type = iCode[pc]; if (!useActivationVars) { stack[stackTop] = DBL_MRK; Object varValue = stack[indexReg]; double d; if (varValue == DBL_MRK) { d = sDbl[indexReg]; } else { d = ScriptRuntime.toNumber(varValue); stack[indexReg] = DBL_MRK; } double d2 = (type == Node.PRE_INC || type == Node.POST_INC) ? d + 1.0 : d - 1.0; sDbl[indexReg] = d2; sDbl[stackTop] = (type == Node.POST_INC || type == Node.POST_DEC) ? d : d2; } else { String varName = fnOrScript.argNames[indexReg]; stack[stackTop] = ScriptRuntime.nameIncrDecr(scope, varName, type); } ++pc; continue Loop; } case Token.ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; continue Loop; case Token.ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; continue Loop; case Token.NULL : stack[++stackTop] = null; continue Loop; case Token.THIS : stack[++stackTop] = thisObj; continue Loop; case Token.THISFN : stack[++stackTop] = fnOrScript; continue Loop; case Token.FALSE : stack[++stackTop] = Boolean.FALSE; continue Loop; case Token.TRUE : stack[++stackTop] = Boolean.TRUE; continue Loop; case Token.UNDEFINED : stack[++stackTop] = Undefined.instance; continue Loop; case Token.ENTERWITH : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); ++withDepth; continue Loop; } case Token.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); --withDepth; continue Loop; case Token.CATCH_SCOPE : stack[stackTop] = ScriptRuntime.newCatchScope(stringReg, stack[stackTop]); continue Loop; case Token.ENUM_INIT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + indexReg] = ScriptRuntime.enumInit(lhs, scope); continue Loop; } case Token.ENUM_NEXT : case Token.ENUM_ID : { Object val = stack[LOCAL_SHFT + indexReg]; ++stackTop; stack[stackTop] = (op == Token.ENUM_NEXT) ? (Object)ScriptRuntime.enumNext(val) : (Object)ScriptRuntime.enumId(val); continue Loop; } case Icode_PUSH_PARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[++stackTop] = ScriptRuntime.getParent(lhs); continue Loop; } case Icode_SPECIAL_REF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.specialReference(lhs, scope, iCode[pc]); ++pc; continue Loop; } case Icode_SCOPE : stack[++stackTop] = scope; continue Loop; case Icode_CLOSURE : { InterpreterData closureData = idata.itsNestedFunctions[indexReg]; stack[++stackTop] = createFunction(cx, scope, closureData, idata.itsFromEvalCode); continue Loop; } case Token.REGEXP : { Scriptable regexp; if (idata.itsFunctionType != 0) { regexp = ((InterpretedFunction)fnOrScript).itsRegExps[indexReg]; } else { if (scriptRegExps == null) { scriptRegExps = wrapRegExps(cx, scope, idata); } regexp = scriptRegExps[indexReg]; } stack[++stackTop] = regexp; continue Loop; } case Icode_LITERAL_NEW : // indexReg: number of values in the literal ++stackTop; stack[stackTop] = new Object[indexReg]; sDbl[stackTop] = 0; continue Loop; case Icode_LITERAL_SET : { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); --stackTop; int i = (int)sDbl[stackTop]; ((Object[])stack[stackTop])[i] = value; sDbl[stackTop] = i + 1; continue Loop; } case Token.ARRAYLIT : case Icode_SPARE_ARRAYLIT : case Token.OBJECTLIT : { Object[] data = (Object[])stack[stackTop]; Object val; if (op == Token.OBJECTLIT) { Object[] ids = (Object[])idata.literalIds[indexReg]; val = ScriptRuntime.newObjectLiteral(ids, data, cx, scope); } else { int[] skipIndexces = null; if (op == Icode_SPARE_ARRAYLIT) { skipIndexces = (int[])idata.literalIds[indexReg]; } val = ScriptRuntime.newArrayLiteral(data, skipIndexces, cx, scope); } stack[stackTop] = val; continue Loop; } case Icode_LINE : cx.interpreterLineIndex = pc; if (debuggerFrame != null) { int line = getShort(iCode, pc); debuggerFrame.onLineChange(cx, line); } pc += 2; continue Loop; case Icode_REG_IND_C0: indexReg = 0; continue Loop; case Icode_REG_IND_C1: indexReg = 1; continue Loop; case Icode_REG_IND_C2: indexReg = 2; continue Loop; case Icode_REG_IND_C3: indexReg = 3; continue Loop; case Icode_REG_IND_C4: indexReg = 4; continue Loop; case Icode_REG_IND_C5: indexReg = 5; continue Loop; case Icode_REG_IND1: indexReg = 0xFF & iCode[pc]; ++pc; continue Loop; case Icode_REG_IND2: indexReg = getIndex(iCode, pc); pc += 2; continue Loop; case Icode_REG_IND4: indexReg = getInt(iCode, pc); pc += 4; continue Loop; case Icode_REG_STR_C0: stringReg = strings[0]; continue Loop; case Icode_REG_STR_C1: stringReg = strings[1]; continue Loop; case Icode_REG_STR_C2: stringReg = strings[2]; continue Loop; case Icode_REG_STR_C3: stringReg = strings[3]; continue Loop; case Icode_REG_STR1: stringReg = strings[0xFF & iCode[pc]]; ++pc; continue Loop; case Icode_REG_STR2: stringReg = strings[getIndex(iCode, pc)]; pc += 2; continue Loop; case Icode_REG_STR4: stringReg = strings[getInt(iCode, pc)]; pc += 4; continue Loop; default : dumpICode(idata); throw new RuntimeException("Unknown icode : "+op+" @ pc : "+(pc-1));} // end of interpreter switch // This should be reachable only for jump implementation // when pc points to encoded target offset if (instructionCounting) { cx.addInstructionCount(pc + 2 - pcPrevBranch); } int offset = getShort(iCode, pc); if (offset != 0) { // -1 accounts for pc pointing to jump opcode + 1 pc += offset - 1; } else { pc = idata.longJumps.getExistingInt(pc); } pcPrevBranch = pc; continue Loop; } // end of interpreter try catch (Throwable ex) { if (instructionCounting) { // Can not call addInstructionCount as it may trigger // exception cx.instructionCount += pc - pcPrevBranch; } javaException = ex; exceptionPC = pc - 1; pc = getJavaCatchPC(iCode); continue Loop; } } // end of interpreter loop cx.interpreterData = savedData; if (debuggerFrame != null) { if (javaException != null) { debuggerFrame.onExit(cx, true, javaException); } else { debuggerFrame.onExit(cx, false, result); } } if (idata.itsNeedsActivation || debuggerFrame != null) { ScriptRuntime.popActivation(cx); } if (javaException != null) { if (javaException instanceof RuntimeException) { throw (RuntimeException)javaException; } else { // Must be instance of Error or code bug throw (Error)javaException; } } return result; } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/cb3a4fef51dd031baf4bc78bcf8cc452587ea3b7/Interpreter.java/buggy/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... |
} | private void handleVariablesButtonPressed() { int variableTypes = IResource.FOLDER; // allow selecting file and folder variables when creating a // linked file if (type == IResource.FILE) { variableTypes |= IResource.FILE; } PathVariableSelectionDialog dialog = new PathVariableSelectionDialog(linkTargetField.getShell(), variableTypes); if (dialog.open() == IDialogConstants.OK_ID) { String[] variableNames = (String[]) dialog.getResult(); if (variableNames != null && variableNames.length == 1) { linkTargetField.setText(variableNames[0]); } }} | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/1249a6d5d0d0b1943d05cb5937bcd35b679a88d7/CreateLinkedResourceGroup.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CreateLinkedResourceGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
1640,
6158,
3616,
24624,
1435,
288,
202,
474,
2190,
2016,
273,
467,
1420,
18,
17357,
31,
202,
202,
759,
1699,
24674,
585,
471,
3009,
3152,
1347,
4979,
279,
225,
202,
759,
8459,
585,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
1640,
6158,
3616,
24624,
1435,
288,
202,
474,
2190,
2016,
273,
467,
1420,
18,
17357,
31,
202,
202,
759,
1699,
24674,
585,
471,
3009,
3152,
1347,
4979,
279,
225,
202,
759,
8459,
585,... | |
Revision fromRevision = getAnnotatedRevision(); Revision toRevision = annotatedLine.revision; if (toRevision == fromRevision) { return; } int fromLineNumber = 1 + index; showAnnotationsForRevision(toRevision, fromRevision, fromLineNumber); revisionsList.setSelectedValue(toRevision, true); | Revision fromRevision = getAnnotatedRevision(); Revision toRevision = annotatedLine.revision; if (toRevision == fromRevision) { return; | private void doubleClick(AnnotatedLine annotatedLine) { Revision fromRevision = getAnnotatedRevision(); Revision toRevision = annotatedLine.revision; if (toRevision == fromRevision) { return; } int fromLineNumber = 1 + index; showAnnotationsForRevision(toRevision, fromRevision, fromLineNumber); revisionsList.setSelectedValue(toRevision, true); } | 10883 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10883/71d9680ee2518b128c24ef252dda3c02d1592d06/RevisionWindow.java/clean/trunk/src/e/scm/RevisionWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
3238,
918,
1645,
6563,
12,
17985,
1670,
10529,
1670,
13,
288,
7734,
13132,
628,
7939,
273,
336,
17985,
7939,
5621,
7734,
13132,
358,
7939,
273,
10529,
1670,
18,
13057,
31,
7734,
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,
2398,
3238,
918,
1645,
6563,
12,
17985,
1670,
10529,
1670,
13,
288,
7734,
13132,
628,
7939,
273,
336,
17985,
7939,
5621,
7734,
13132,
358,
7939,
273,
10529,
1670,
18,
13057,
31,
7734,
309,
261,
... |
final Text text = toolkit.createText(container, task.getNotes(), SWT.BORDER | SWT.MULTI); | notes = toolkit.createText(container, task.getNotes(), SWT.BORDER | SWT.MULTI); | private void createNotesSection(Composite parent, FormToolkit toolkit) { Section section = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR); section.setText("Notes"); section.setLayout(new TableWrapLayout()); section.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); section.addExpansionListener(new IExpansionListener() { public void expansionStateChanging(ExpansionEvent e) { sform.reflow(true); } public void expansionStateChanged(ExpansionEvent e) { sform.reflow(true); } }); Composite container = toolkit.createComposite(section); section.setClient(container); TableWrapLayout layout = new TableWrapLayout(); layout.numColumns = 2; container.setLayout(layout); final Text text = toolkit.createText(container, task.getNotes(), SWT.BORDER | SWT.MULTI); TableWrapData tablewrap = new TableWrapData(TableWrapData.FILL_GRAB); tablewrap.heightHint = 100; text.setLayoutData(tablewrap); text.addFocusListener(new FocusListener() { public void focusGained(FocusEvent e) { // don't care about focus gained } public void focusLost(FocusEvent e) { String notes = text.getText(); task.setNotes(notes); } }); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/f536d7f0bc58da13c15afc9facaf9be6de238e7e/TaskSummaryEditor.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskSummaryEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
18063,
5285,
12,
9400,
982,
16,
2748,
6364,
8691,
5226,
8691,
13,
288,
202,
202,
5285,
2442,
273,
5226,
8691,
18,
2640,
5285,
12,
2938,
16,
16429,
429,
9400,
18,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
18063,
5285,
12,
9400,
982,
16,
2748,
6364,
8691,
5226,
8691,
13,
288,
202,
202,
5285,
2442,
273,
5226,
8691,
18,
2640,
5285,
12,
2938,
16,
16429,
429,
9400,
18,
14... |
public Box layoutChildren( Context c, Box box ) { if ( isHiddenNode( box.getElement(), c ) ) { return box; } //u.p("InlineLayout.layoutChildren(: " + box); //u.dump_stack(); //u.p("parent box = " + c.parent_box); //u.p("placement point = " + c.placement_point); if ( !box.isAnonymous() ) { if ( isBlockLayout( box.getElement(), c ) ) { return super.layoutChildren( c, box ); } } int debug_counter = 0; int childcount = 0; BlockBox block = (BlockBox)box; // calculate the initial position and dimensions Rectangle bounds = new Rectangle(); bounds.width = c.getExtents().width; //u.p("initial bounds width = " + bounds.width); bounds.width -= box.margin.left + box.border.left + box.padding.left + box.padding.right + box.border.right + box.margin.right; //u.p("initial bounds width = " + bounds.width); bounds.x = 0; bounds.y = 0; bounds.height = 0; int remaining_width = bounds.width; // account for text-indent LineBox curr_line = new LineBox(); curr_line.x = bounds.x; //curr_line.width = remaining_width; curr_line.width = 0; Element elem = block.getElement(); remaining_width = InlineUtil.doTextIndent( c, elem, remaining_width, curr_line ); LineBox prev_line = new LineBox(); prev_line.y = bounds.y; prev_line.height = 0; InlineBox prev_inline = null; //boolean adjusted_left_tab = false; if ( c.getLeftTab().y > 0 ) { c.getLeftTab().y -= c.placement_point.y; } if ( c.getRightTab().y > 0 ) { c.getRightTab().y -= c.placement_point.y; } if ( c.getRightTab().y < 0 ) { c.getRightTab().y = 0; } if ( c.getLeftTab().y < 0 ) { c.getLeftTab().y = 0; } InlineBox prev_align_inline = null; List inline_node_list = null; if ( box.isAnonymous() ) { inline_node_list = ( (AnonymousBlockBox)box ).node_list; } else { inline_node_list = InlineUtil.getInlineNodeList( elem, elem, c ); } // loop until no more nodes Node current_node = InlineUtil.nextTextNode( inline_node_list ); TextUtil.stripWhitespace( c, current_node, elem ); // ajdust the first line for tabs remaining_width = adjustForTab( c, prev_line, remaining_width ); while ( current_node != null ) { // loop until no more text in this node while ( true ) { //u.p("loop start bounds width = " + bounds.width); //u.p("prev inline = " + prev_inline); //u.p("current node = " + current_node); if ( bounds.width < 0 ) { u.p( "bounds width = " + bounds.width ); System.exit( -1 ); } // test if there is no more text in the current text node // if there is a prev, and if the prev was part of this current node if ( prev_inline != null && prev_inline.node == current_node ) { //u.p("prev inline = " + prev_inline); //u.p("current text len = " + current_node.getNodeValue().length()); // replaced elements aren't split, so done with this one if ( isReplaced( current_node ) ) { //u.p("it's replaced. breaking"); break; } if ( isFloatedBlock( current_node, c ) ) { break; } if ( LayoutFactory.isBreak( current_node ) ) { break; } // if no more unused text in this node if ( prev_inline.end_index >= current_node.getNodeValue().length() ) { // then break //u.p("used up all of the text. breaking"); break; } } if ( bounds.width < 10 ) { u.p( "warning. width < 10 " + bounds.width ); } debug_counter++; final int limit = 140; if ( debug_counter > limit && bounds.width < 10 ) { u.on(); u.p( "previous inline = " + prev_inline ); u.p( "current line = " + curr_line ); u.p( "lines = " ); //u.p(block.boxes); u.p( "current node = " + current_node + " text= " + current_node.getNodeValue() ); u.p( "rem width = " + remaining_width + " width " + bounds.width ); } if ( debug_counter > limit + 3 && bounds.width < 10 ) { u.p( "element = " + elem ); org.xhtmlrenderer.util.x.p( elem ); u.p( "previous inline = " + prev_inline ); u.p( "current inline = " + curr_line ); u.p( "lines = " ); //u.p(block.boxes); u.p( "db 1 hit" ); System.exit( -1 ); throw new InfiniteLoopError( "Infinite loop detected in InlineLayout" ); } // look at current inline // break off the longest section that will fit //u.p("looking for another inline from the text: " + current_node.getNodeValue()); //u.p("remaining width = " + remaining_width + " bounds.width = " + bounds.width); InlineBox new_inline = this.calculateInline( c, current_node, remaining_width, bounds.width, curr_line, prev_inline, elem, prev_align_inline ); //u.p("new inline box: " + new_inline); // if this inline needs to be on a new line if ( new_inline.break_before && !new_inline.floated ) { // finish up the current line //u.p("is break before and not floated"); remaining_width = bounds.width; saveLine( curr_line, prev_line, elem, bounds.width, bounds.x, c, block ); bounds.height += curr_line.height; prev_line = curr_line; curr_line = new LineBox(); curr_line.x = bounds.x; // adjust remaining width for floats //u.p("left tab = " + left_tab + " right tab = " + c.getRightTab()); //if(c.getLeftTab().y > 0) { remaining_width = adjustForTab( c, prev_line, remaining_width ); //curr_line.width = remaining_width; curr_line.width = 0; } // save the new inline to the list curr_line.addChild( new_inline ); //u.p("added new_inline: " + new_inline); // calc new height of the line // don't count the inline towards the line height and //line baseline if it's a floating inline. if ( !isFloated( new_inline, c ) ) { if ( !this.isFloatedBlock( new_inline.node, c ) ) { //u.p("calcing new height of line"); if ( new_inline.height + new_inline.y > curr_line.height ) { curr_line.height = new_inline.height + new_inline.y; } if ( new_inline.baseline > curr_line.baseline ) { curr_line.baseline = new_inline.baseline; } } } InlineUtil.handleFloated( c, new_inline, curr_line, bounds.width, elem ); // calc new width of the line curr_line.width += new_inline.width; // reduce the available width remaining_width = remaining_width - new_inline.width; // if the last inline was at the end of a line, then go to next line if ( new_inline.break_after ) { //u.p("is break after. doing a new line"); // then remaining_width = max_width //u.p("remaining width = " + remaining_width); remaining_width = bounds.width; //u.p("remaining width = " + remaining_width); //u.p("width = " + width); // save the line //u.p("curr line = " + curr_line); saveLine( curr_line, prev_line, elem, bounds.width, bounds.x, c, block ); // increase bounds height to account for the new line bounds.height += curr_line.height; //u.p("saved line: " + curr_line); prev_line = curr_line; curr_line = new LineBox(); curr_line.x = bounds.x; // adjust remaining width for floats //u.p("rem width = " + remaining_width); //if(c.getLeftTab().y > 0) { remaining_width = adjustForTab( c, prev_line, remaining_width ); //u.p("remaining width = " + remaining_width); //curr_line.width = remaining_width; curr_line.width = 0; //u.p("now rem width = " + remaining_width); } // set the inline to use for left alignment if ( !isFloated( new_inline, c ) ) { prev_align_inline = new_inline; } else { prev_align_inline = prev_inline; } prev_inline = new_inline; } current_node = InlineUtil.nextTextNode( inline_node_list ); TextUtil.stripWhitespace( c, current_node, elem ); } saveLine( curr_line, prev_line, elem, bounds.width, bounds.x, c, block ); //u.p("saving line 2: " + curr_line); bounds.height += curr_line.height; block.width = bounds.width; block.height = bounds.height; block.x = 0; block.y = 0; //u.p("returning final block of: " + box); //u.p("last tab = " + c.getLeftTab()); //if(adjusted_left_tab) { c.getLeftTab().y += c.placement_point.y; c.getRightTab().y += c.placement_point.y; //} //c.setLeftTab(old_left_tab); //u.p("final tabl = " + c.getLeftTab()); //u.p("debug counter = " + debug_counter); return block; } | 8125 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8125/e9e9b7415d0c9f95929fe7f916ecfda176764b59/InlineLayout.java/buggy/src/java/org/xhtmlrenderer/layout/InlineLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
3514,
6741,
4212,
12,
1042,
71,
16,
3514,
2147,
15329,
430,
12,
291,
9345,
907,
12,
2147,
18,
21336,
9334,
71,
3719,
95,
2463,
2147,
31,
97,
759,
89,
18,
84,
2932,
10870,
3744,
18,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
3514,
6741,
4212,
12,
1042,
71,
16,
3514,
2147,
15329,
430,
12,
291,
9345,
907,
12,
2147,
18,
21336,
9334,
71,
3719,
95,
2463,
2147,
31,
97,
759,
89,
18,
84,
2932,
10870,
3744,
18,
6... | ||
finally{ | finally { | public void reparseRoots(final Set<Language> rootsToReparse) { for (final Language lang : rootsToReparse) { final PsiFile cachedRoot = myRoots.get(lang); if(cachedRoot != null){ if(myRootsInUpdate.contains(cachedRoot)) continue; try { myRootsInUpdate.add(cachedRoot); reparseRoot(lang, cachedRoot); } finally{ myRootsInUpdate.remove(cachedRoot); } } } } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/332b4449ff3189cc9c7a994ccf5fd11ed10e9da5/CompositeLanguageFileViewProvider.java/clean/source/com/intellij/psi/CompositeLanguageFileViewProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
283,
2670,
17540,
12,
6385,
1000,
32,
3779,
34,
1365,
11634,
426,
2670,
13,
288,
565,
364,
261,
6385,
9889,
3303,
294,
1365,
11634,
426,
2670,
13,
288,
1377,
727,
453,
7722,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
283,
2670,
17540,
12,
6385,
1000,
32,
3779,
34,
1365,
11634,
426,
2670,
13,
288,
565,
364,
261,
6385,
9889,
3303,
294,
1365,
11634,
426,
2670,
13,
288,
1377,
727,
453,
7722,
... |
private boolean hasPrivilegedToken( IObject obj ) { | private boolean hasPrivilegedToken(IObject obj) { | private boolean hasPrivilegedToken( IObject obj ) { GraphHolder gh = obj.getGraphHolder(); // most objects will not have a token if ( gh.hasToken() ) { // check if truly secure. if (gh.tokenMatches(token)) return true; // oh well, now see if this object has a one-time token. Token t = oneTimeTokens.find(gh); if ( t != null ) { // it does have the token, so it is privileged for one action // set token to null for future checks. gh.setToken(t,null); oneTimeTokens.remove(t); return true; } } return false; } | 55636 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55636/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/clean/components/server/src/ome/security/BasicSecuritySystem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
711,
18845,
1345,
12,
467,
921,
1081,
262,
202,
95,
202,
202,
4137,
6064,
21409,
273,
1081,
18,
588,
4137,
6064,
5621,
9506,
202,
759,
4486,
2184,
903,
486,
1240,
279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
711,
18845,
1345,
12,
467,
921,
1081,
262,
202,
95,
202,
202,
4137,
6064,
21409,
273,
1081,
18,
588,
4137,
6064,
5621,
9506,
202,
759,
4486,
2184,
903,
486,
1240,
279,
... |
theWeaponProfs.add( wp ); | theWeaponProfs.add(wp); | public void addWeaponProf(final String aProfKey) { final WeaponProf wp = Globals.getWeaponProfKeyed(aProfKey); if (wp != null) {// weaponProfList.add(wp); if ( theWeaponProfs == null ) { theWeaponProfs = new TreeSet<WeaponProf>(); } theWeaponProfs.add( wp ); setDirty(true); } } | 48301 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48301/376816acf8bf134fa77bd6ea5c602dbe9af9bfbd/PlayerCharacter.java/clean/code/src/java/pcgen/core/PlayerCharacter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
527,
3218,
28629,
27012,
12,
6385,
514,
279,
27012,
653,
13,
202,
95,
202,
202,
6385,
1660,
28629,
27012,
6357,
273,
18901,
1031,
18,
588,
3218,
28629,
27012,
653,
329,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
527,
3218,
28629,
27012,
12,
6385,
514,
279,
27012,
653,
13,
202,
95,
202,
202,
6385,
1660,
28629,
27012,
6357,
273,
18901,
1031,
18,
588,
3218,
28629,
27012,
653,
329,
12,... |
try { setMultiple((String) evalAttr("multiple", getMultipleExpr(), String.class)); } catch (NullAttributeException ex) { } | if ((bool = EvalHelper.evalBoolean("indexed", getIndexedExpr(), this, pageContext)) != null) setIndexed(bool.booleanValue()); | private void evaluateExpressions() throws JspException { try { setAlt((String) evalAttr("alt", getAltExpr(), String.class)); } catch (NullAttributeException ex) { } try { setAltKey((String) evalAttr("altKey", getAltKeyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { } try { setIndexed(((Boolean) evalAttr("indexed", getIndexedExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { } try { setMultiple((String) evalAttr("multiple", getMultipleExpr(), String.class)); } catch (NullAttributeException ex) { } try { setName((String) evalAttr("name", getNameExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnblur((String) evalAttr("onblur", getOnblurExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnchange((String) evalAttr("onchange", getOnchangeExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnclick((String) evalAttr("onclick", getOnclickExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOndblclick((String) evalAttr("ondblclick", getOndblclickExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnfocus((String) evalAttr("onfocus", getOnfocusExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeydown((String) evalAttr("onkeydown", getOnkeydownExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeypress((String) evalAttr("onkeypress", getOnkeypressExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeyup((String) evalAttr("onkeyup", getOnkeyupExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmousedown((String) evalAttr("onmousedown", getOnmousedownExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmousemove((String) evalAttr("onmousemove", getOnmousemoveExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseout((String) evalAttr("onmouseout", getOnmouseoutExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseover((String) evalAttr("onmouseover", getOnmouseoverExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseup((String) evalAttr("onmouseup", getOnmouseupExpr(), String.class)); } catch (NullAttributeException ex) { } try { setProperty((String) evalAttr("property", getPropertyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setSize((String) evalAttr("size", getSizeExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyle((String) evalAttr("style", getStyleExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyleClass((String) evalAttr("styleClass", getStyleClassExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyleId((String) evalAttr("styleId", getStyleIdExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTabindex((String) evalAttr("tabindex", getTabindexExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTitle((String) evalAttr("title", getTitleExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTitleKey((String) evalAttr("titleKey", getTitleKeyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setValue((String) evalAttr("value", getValueExpr(), String.class)); } catch (NullAttributeException ex) { } } | 2722 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2722/022bd23c954cf673e53731849d562b3c295473f1/ELSelectTag.java/clean/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELSelectTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
10655,
12443,
780,
13,
5302,
3843,
2932,
2390,
3113,
336,
10655,
4742,
9334,
514,
18,
1106,
10019,
3639,
289,
1044,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
10655,
12443,
780,
13,
5302,
3843,
2932,
2390,
3113,
336,
10655,
4742,
9334,
514,
18,
1106,
10019,
3639,
289,
1044,... |
if (session.runtimeData.getParameter("prmCommand") != null) { IPermissionCommand pc = CommandFactory.get(session.runtimeData.getParameter("prmCommand")); | String prmCommand = session.runtimeData.getParameter("prmCommand"); if (prmCommand != null) { IPermissionCommand pc = CommandFactory.get(prmCommand); | public void setRuntimeData (org.jasig.portal.ChannelRuntimeData rD) { session.startRD = Calendar.getInstance().getTime().getTime(); session.runtimeData = rD; log.debug("PermissionsManager - setting runtime data"); // test if servant exists and has finished if (session.servant != null){ try { ((IChannel) session.servant).setRuntimeData(rD); if (session.servant.isFinished()) { getGroupServantResults(session); } } catch (Exception e){ log.error(e); } } if (session.runtimeData.getParameter("prmCommand") != null) { IPermissionCommand pc = CommandFactory.get(session.runtimeData.getParameter("prmCommand")); if (pc != null) { try{ pc.execute(session); } catch(Exception e){ log.error(e); session.runtimeData.setParameter("commandResponse","Error executing command "+session.runtimeData.getParameter("prmCommand")+": "+e.getMessage()); } } } if ((!session.gotOwners)) { session.view="Select Owners"; } if ((session.gotOwners) && (!session.gotActivities)) { PermissionsXML.autoSelectSingleChoice(session,"activity"); session.view="Select Activities"; } if (session.gotActivities && !session.gotTargets) { PermissionsXML.autoSelectSingleChoice(session,"target"); session.view="Select Targets"; } if (session.gotTargets && (session.principals == null)) { log.debug("PermissionsManager - Checking Servant"); prepServant(session); } if (session.principals != null){ if (session.staticData.getParameter("prmView") != null) { session.view=session.staticData.getParameter("prmView"); session.staticData.remove("prmView"); } else if (session.runtimeData.getParameter("prmView") != null) { session.view=session.runtimeData.getParameter("prmView"); } else if (!session.view.startsWith("Assign")){ session.view="Assign By Principal"; } } } | 1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/91b8da9ab72177c3ce0ef40b03241f21a91d0d11/CPermissionsManager.java/buggy/source/org/jasig/portal/channels/permissionsmanager/CPermissionsManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
5576,
751,
261,
3341,
18,
78,
345,
360,
18,
24386,
18,
2909,
5576,
751,
436,
40,
13,
288,
3639,
1339,
18,
1937,
20403,
273,
5542,
18,
588,
1442,
7675,
588,
950,
7675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
5576,
751,
261,
3341,
18,
78,
345,
360,
18,
24386,
18,
2909,
5576,
751,
436,
40,
13,
288,
3639,
1339,
18,
1937,
20403,
273,
5542,
18,
588,
1442,
7675,
588,
950,
7675,
... |
return "function " + js_getName() + | return "function " + jsGet_name() + | public String decompile(int indent, boolean toplevel, boolean justbody) { if (source == null) return "function " + js_getName() + "() {\n\t[native code]\n}\n"; // Spew tokens in source, for debugging. // as TYPE number char if (printSource) { System.err.println("length:" + source.length()); for (int i = 0; i < source.length(); i++) { // Note that tokenToName will fail unless Context.printTrees // is true. String tokenname = TokenStream.tokenToName(source.charAt(i)); if (tokenname == null) tokenname = "---"; String pad = tokenname.length() > 7 ? "\t" : "\t\t"; System.err.println (tokenname + pad + (int)source.charAt(i) + "\t'" + ScriptRuntime.escapeString (source.substring(i, i+1)) + "'"); } System.err.println(); } StringBuffer result = new StringBuffer(); int i = 0; if (source.length() > 0) { /* special-case FUNCTION as the first token; if it is, * (and it's not followed by a NAME or LP) then we're * decompiling a function (and not the toplevel script.) * FUNCTION appearing elsewhere is an escape that means we'll * need to call toString of the given function (object). * If not at the top level, don't add an initial indent; * let the caller do it, so functions as expressions look * reasonable. */ if (toplevel) { // add an initial newline to exactly match js. if (!justbody) result.append('\n'); for (int j = 0; j < indent; j++) result.append(' '); } if (source.charAt(0) == TokenStream.FUNCTION // make sure it's not a script that begins with a // reference to a function definition. && source.length() > 1 && (source.charAt(1) == TokenStream.NAME || source.charAt(1) == TokenStream.LP)) { if (!justbody) { result.append("function "); /* version < 1.2 Function constructor behavior - if * there's no function name in the source info, and * the names[0] entry is the empty string, then it must * have been created by the Function constructor; * print 'anonymous' as the function name if the * version (under which the function was compiled) is * less than 1.2... or if it's greater than 1.2, because * we need to be closer to ECMA. (ToSource, please?) */ if (nextIs(i, TokenStream.LP) && this.version != Context.VERSION_1_2 && this.names != null && this.names[0].length() == 0) result.append("anonymous"); i++; } else { /* Skip past the entire function header to the next EOL. * Depends on how NAMEs are encoded. */ while (i < source.length() && (source.charAt(i) != TokenStream.EOL // the length char of a NAME sequence // can look like an EOL. || (i > 0 && source.charAt(i-1) == TokenStream.NAME))) { i++; } // Skip past the EOL, too. i++; } } } while (i < source.length()) { int stop; switch(source.charAt(i)) { case TokenStream.NAME: case TokenStream.OBJECT: // re-wrapped in '/'s in parser... /* NAMEs are encoded as NAME, (char) length, string... * Note that lookahead for detecting labels depends on * this encoding; change there if this changes. * Also change function-header skipping code above, * used when decompling under decompileFunctionBody. */ i++; stop = i + (int)source.charAt(i); result.append(source.substring(i + 1, stop + 1)); i = stop; break; case TokenStream.NUMBER: i++; long lbits = 0; switch(source.charAt(i)) { case 'S': i++; result.append((int)source.charAt(i)); break; case 'J': i++; lbits |= (long)source.charAt(i++) << 48; lbits |= (long)source.charAt(i++) << 32; lbits |= (long)source.charAt(i++) << 16; lbits |= (long)source.charAt(i); result.append(lbits); break; case 'D': i++; lbits |= (long)source.charAt(i++) << 48; lbits |= (long)source.charAt(i++) << 32; lbits |= (long)source.charAt(i++) << 16; lbits |= (long)source.charAt(i); double dval = Double.longBitsToDouble(lbits); result.append(ScriptRuntime.numberToString(dval, 10)); break; } break; case TokenStream.STRING: i++; stop = i + (int)source.charAt(i); result.append('"'); result.append(ScriptRuntime.escapeString (source.substring(i + 1, stop + 1))); result.append('"'); i = stop; break; case TokenStream.PRIMARY: i++; switch(source.charAt(i)) { case TokenStream.TRUE: result.append("true"); break; case TokenStream.FALSE: result.append("false"); break; case TokenStream.NULL: result.append("null"); break; case TokenStream.THIS: result.append("this"); break; case TokenStream.TYPEOF: result.append("typeof"); break; case TokenStream.VOID: result.append("void"); break; case TokenStream.UNDEFINED: result.append("undefined"); break; } break; case TokenStream.FUNCTION: { /* decompile a FUNCTION token as an escape; call * toString on the nth enclosed nested function, * where n is given by the byte that follows. */ i++; int functionNumber = source.charAt(i); if (nestedFunctions == null || functionNumber > nestedFunctions.length) { String message; if (names != null && names.length > 0 && names[0].length() > 0) { Object[] errArgs = { new Integer((int)source.charAt(i)), names[0] }; message = Context.getMessage ("msg.no.function.ref.found.in", errArgs); } else { Object[] errArgs = { new Integer((int)source.charAt(i)) }; message = Context.getMessage ("msg.no.function.ref.found", errArgs); } throw Context.reportRuntimeError(message); } result.append(nestedFunctions[functionNumber].decompile(indent, false, false)); break; } case TokenStream.COMMA: result.append(", "); break; case TokenStream.LC: if (nextIs(i, TokenStream.EOL)) indent += OFFSET; result.append("{"); break; case TokenStream.RC: /* don't print the closing RC if it closes the * toplevel function and we're called from * decompileFunctionBody. */ if (justbody && toplevel && i + 1 == source.length()) break; if (nextIs(i, TokenStream.EOL)) indent -= OFFSET; if (nextIs(i, TokenStream.WHILE) || nextIs(i, TokenStream.ELSE)) { indent -= OFFSET; result.append("} "); } else result.append('}'); break; case TokenStream.LP: result.append('('); break; case TokenStream.RP: if (nextIs(i, TokenStream.LC)) result.append(") "); else result.append(')'); break; case TokenStream.LB: result.append('['); break; case TokenStream.RB: result.append(']'); break; case TokenStream.EOL: result.append('\n'); /* add indent if any tokens remain, * less setback if next token is * a label, case or default. */ if (i + 1 < source.length()) { int less = 0; if (nextIs(i, TokenStream.CASE) || nextIs(i, TokenStream.DEFAULT)) less = SETBACK; else if (nextIs(i, TokenStream.RC)) less = OFFSET; /* elaborate check against label... skip past a * following inlined NAME and look for a COLON. * Depends on how NAME is encoded. */ else if (nextIs(i, TokenStream.NAME)) { int skip = source.charAt(i + 2); if (source.charAt(i + skip + 3) == TokenStream.COLON) less = OFFSET; } for (; less < indent; less++) result.append(' '); } break; case TokenStream.DOT: result.append('.'); break; case TokenStream.NEW: result.append("new "); break; case TokenStream.DELPROP: result.append("delete "); break; case TokenStream.IF: result.append("if "); break; case TokenStream.ELSE: result.append("else "); break; case TokenStream.FOR: result.append("for "); break; case TokenStream.IN: result.append(" in "); break; case TokenStream.WITH: result.append("with "); break; case TokenStream.WHILE: result.append("while "); break; case TokenStream.DO: result.append("do "); break; case TokenStream.TRY: result.append("try "); break; case TokenStream.CATCH: result.append("catch "); break; case TokenStream.FINALLY: result.append("finally "); break; case TokenStream.THROW: result.append("throw "); break; case TokenStream.SWITCH: result.append("switch "); break; case TokenStream.BREAK: if (nextIs(i, TokenStream.NAME)) result.append("break "); else result.append("break"); break; case TokenStream.CONTINUE: if (nextIs(i, TokenStream.NAME)) result.append("continue "); else result.append("continue"); break; case TokenStream.CASE: result.append("case "); break; case TokenStream.DEFAULT: result.append("default"); break; case TokenStream.RETURN: if (nextIs(i, TokenStream.SEMI)) result.append("return"); else result.append("return "); break; case TokenStream.VAR: result.append("var "); break; case TokenStream.SEMI: if (nextIs(i, TokenStream.EOL)) // statement termination result.append(";"); else // separators in FOR result.append("; "); break; case TokenStream.ASSIGN: i++; switch(source.charAt(i)) { case TokenStream.NOP: result.append(" = "); break; case TokenStream.ADD: result.append(" += "); break; case TokenStream.SUB: result.append(" -= "); break; case TokenStream.MUL: result.append(" *= "); break; case TokenStream.DIV: result.append(" /= "); break; case TokenStream.MOD: result.append(" %= "); break; case TokenStream.BITOR: result.append(" |= "); break; case TokenStream.BITXOR: result.append(" ^= "); break; case TokenStream.BITAND: result.append(" &= "); break; case TokenStream.LSH: result.append(" <<= "); break; case TokenStream.RSH: result.append(" >>= "); break; case TokenStream.URSH: result.append(" >>>= "); break; } break; case TokenStream.HOOK: result.append(" ? "); break; case TokenStream.OBJLIT: // pun OBJLIT to mean colon in objlit property initialization. // this needs to be distinct from COLON in the general case // to distinguish from the colon in a ternary... which needs // different spacing. result.append(':'); break; case TokenStream.COLON: if (nextIs(i, TokenStream.EOL)) // it's the end of a label result.append(":"); else // it's the middle part of a ternary result.append(" : "); break; case TokenStream.OR: result.append(" || "); break; case TokenStream.AND: result.append(" && "); break; case TokenStream.BITOR: result.append(" | "); break; case TokenStream.BITXOR: result.append(" ^ "); break; case TokenStream.BITAND: result.append(" & "); break; case TokenStream.EQOP: i++; switch(source.charAt(i)) { case TokenStream.SHEQ: /* * Emulate the C engine; if we're under version * 1.2, then the == operator behaves like the === * operator (and the source is generated by * decompiling a === opcode), so print the === * operator as ==. */ result.append(this.version == Context.VERSION_1_2 ? " == " : " === "); break; case TokenStream.SHNE: result.append(this.version == Context.VERSION_1_2 ? " != " : " !== "); break; case TokenStream.EQ: result.append(" == "); break; case TokenStream.NE: result.append(" != "); break; } break; case TokenStream.RELOP: i++; switch(source.charAt(i)) { case TokenStream.LE: result.append(" <= "); break; case TokenStream.LT: result.append(" < "); break; case TokenStream.GE: result.append(" >= "); break; case TokenStream.GT: result.append(" > "); break; case TokenStream.INSTANCEOF: result.append(" instanceof "); break; } break; case TokenStream.SHOP: i++; switch(source.charAt(i)) { case TokenStream.LSH: result.append(" << "); break; case TokenStream.RSH: result.append(" >> "); break; case TokenStream.URSH: result.append(" >>> "); break; } break; case TokenStream.UNARYOP: i++; switch(source.charAt(i)) { case TokenStream.TYPEOF: result.append("typeof "); break; case TokenStream.VOID: result.append("void "); break; case TokenStream.NOT: result.append('!'); break; case TokenStream.BITNOT: result.append('~'); break; case TokenStream.ADD: result.append('+'); break; case TokenStream.SUB: result.append('-'); break; } break; case TokenStream.INC: result.append("++"); break; case TokenStream.DEC: result.append("--"); break; case TokenStream.ADD: result.append(" + "); break; case TokenStream.SUB: result.append(" - "); break; case TokenStream.MUL: result.append(" * "); break; case TokenStream.DIV: result.append(" / "); break; case TokenStream.MOD: result.append(" % "); break; default: // If we don't know how to decompile it, raise an exception. throw new RuntimeException("Unknown token " + source.charAt(i)); } i++; } // add that trailing newline if it's an outermost function. if (toplevel && !justbody) result.append('\n'); return result.toString(); } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/75d18cd3322ae42f1bf6a1ed46bb0d9ff1286810/NativeFunction.java/clean/js/rhino/org/mozilla/javascript/NativeFunction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
443,
11100,
12,
474,
3504,
16,
1250,
28999,
16,
1250,
2537,
3432,
13,
288,
540,
309,
261,
3168,
422,
446,
13,
2398,
327,
315,
915,
315,
397,
3828,
967,
67,
529,
1435,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
443,
11100,
12,
474,
3504,
16,
1250,
28999,
16,
1250,
2537,
3432,
13,
288,
540,
309,
261,
3168,
422,
446,
13,
2398,
327,
315,
915,
315,
397,
3828,
967,
67,
529,
1435,
397,
... |
protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, HttpServletRequest request) { // set the dialog type setParamDialogtype(DIALOG_TYPE); // fill the parameter values in the get/set methods fillParamValues(request); if (CmsStringUtil.isEmptyOrWhitespaceOnly(getParamPage()) || !PAGE_LIST.contains(getParamPage())) { // ensure a valid page is set setParamPage(PAGE_ARRAY[0]); } // fill the widget map defineWidgets(); fillWidgetValues(request); // set the action for the JSP switch if (DIALOG_SAVE.equals(getParamAction())) { // ok button pressed setAction(ACTION_SAVE); List errors = commitWidgetValues(); if (errors.size() > 0) { Iterator i = errors.iterator(); while (i.hasNext()) { Exception e = (Exception)i.next(); System.err.println(e.getMessage()); if (e.getCause() != null) { System.err.println("Cause: " + e.getCause().getMessage()); } } setAction(ACTION_DEFAULT); } } else if (DIALOG_OK.equals(getParamAction())) { // ok button pressed setAction(ACTION_CANCEL); } else if (DIALOG_CANCEL.equals(getParamAction())) { // cancel button pressed setAction(ACTION_CANCEL); } else if (EDITOR_ACTION_ELEMENT_ADD.equals(getParamAction())) { setAction(ACTION_ELEMENT_ADD); actionToggleElement(); setAction(ACTION_DEFAULT); } else if (EDITOR_ACTION_ELEMENT_REMOVE.equals(getParamAction())) { setAction(ACTION_ELEMENT_REMOVE); actionToggleElement(); setAction(ACTION_DEFAULT); } else if (DIALOG_BACK.equals(getParamAction())) { setAction(ACTION_DEFAULT); List errors = commitWidgetValues(PAGE_ARRAY[1]); if (errors.size() > 0) { setAction(ACTION_ERROR); try { includeErrorpage(this, (Throwable)errors.get(0)); } catch (JspException e) { // ignore } return; } setParamPage(PAGE_ARRAY[0]); } else if (DIALOG_CONTINUE.equals(getParamAction())) { setAction(ACTION_DEFAULT); List errors = commitWidgetValues(PAGE_ARRAY[0]); if (errors.size() > 0) { setAction(ACTION_ERROR); try { includeErrorpage(this, (Throwable)errors.get(0)); } catch (JspException e) { // ignore } return; } setParamPage(PAGE_ARRAY[1]); } else { // set the default action setAction(ACTION_DEFAULT); } // save the current state of the job (may be changed because of the widget values) getSettings().setDialogObject(m_jobInfo); } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/41dcaa9d1a1b8f8fa6c1dd9a04fc8532eb83ebb7/CmsAdminWidgetDemo6.java/clean/src-modules/org/opencms/workplace/tools/widgetdemo/CmsAdminWidgetDemo6.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1208,
16514,
691,
1972,
12,
4747,
16514,
2628,
1947,
16,
9984,
590,
13,
288,
3639,
368,
444,
326,
6176,
618,
3639,
22911,
6353,
723,
12,
2565,
18683,
67,
2399,
1769,
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,
4750,
918,
1208,
16514,
691,
1972,
12,
4747,
16514,
2628,
1947,
16,
9984,
590,
13,
288,
3639,
368,
444,
326,
6176,
618,
3639,
22911,
6353,
723,
12,
2565,
18683,
67,
2399,
1769,
3639,
368,... | ||
subscription.setHasConsumer(true); | public ConsumerDelegate createConsumerDelegate(Destination jmsDestination, String selector, boolean noLocal, String subscriptionName) throws JMSException { // look-up destination DestinationManagerImpl dm = serverPeer.getDestinationManager(); AbstractDestination destination = dm.getCoreDestination(jmsDestination); // create the MessageConsumer dynamic proxy String stackName = "ConsumerStack"; AdviceStack stack = AspectManager.instance().getAdviceStack(stackName); // TODO why do I need to the advisor to create the interceptor stack? Interceptor[] interceptors = stack.createInterceptors(serverPeer.getSessionAdvisor(), null); JMSConsumerInvocationHandler h = new JMSConsumerInvocationHandler(interceptors); String consumerID = generateConsumerID(); SimpleMetaData metadata = new SimpleMetaData(); metadata.addMetaData(Dispatcher.DISPATCHER, Dispatcher.OID, serverPeer.getConsumerAdvisor().getName(), PayloadKey.AS_IS); metadata.addMetaData(InvokerInterceptor.REMOTING, InvokerInterceptor.INVOKER_LOCATOR, serverPeer.getLocator(), PayloadKey.AS_IS); metadata.addMetaData(InvokerInterceptor.REMOTING, InvokerInterceptor.SUBSYSTEM, "JMS", PayloadKey.AS_IS); // TODO: Is this really necessary? Can't I just use the consumerID? metadata.addMetaData(JMSAdvisor.JMS, JMSAdvisor.CONNECTION_ID, connectionEndpoint.getConnectionID(), PayloadKey.AS_IS); metadata.addMetaData(JMSAdvisor.JMS, JMSAdvisor.SESSION_ID, sessionID, PayloadKey.AS_IS); metadata.addMetaData(JMSAdvisor.JMS, JMSAdvisor.CONSUMER_ID, consumerID, PayloadKey.AS_IS); metadata.addMetaData(JMSAdvisor.JMS, JMSAdvisor.SELECTOR, selector, PayloadKey.AS_IS); metadata.addMetaData(JMSAdvisor.JMS, JMSAdvisor.DESTINATION, jmsDestination); h.getMetaData().mergeIn(metadata); // TODO ClassLoader loader = getClass().getClassLoader(); Class[] interfaces = new Class[] { ConsumerDelegate.class }; ConsumerDelegate delegate = (ConsumerDelegate)Proxy.newProxyInstance(loader, interfaces, h); if (callbackHandler == null) { throw new JMSException("null callback handler"); } DurableSubscriptionHolder subscription = null; if (subscriptionName != null) { String clientID = connectionEndpoint.getClientID(); if (clientID == null) { throw new JMSException("Cannot create durable subscriber without having set client ID"); } //It's a durable subscription - have we already got one with that name? ClientManager clientManager = serverPeer.getClientManager(); subscription = clientManager.getDurableSubscription(clientID, subscriptionName); // TODO - this makes MessageConsumerTest.testDurableSubscriptionOnlyOneConsumer() fail // if (subscription != null)// {// throw new javax.jms.IllegalStateException("There is already a '" + subscriptionName +// "' durable subscription!");// } //FIXME - race condition here - can result in multiple subscribers of same subscription if (subscription == null) { if (!(destination instanceof LocalTopic)) { throw new JMSException("Cannot only create a durable subscription on a topic"); } LocalTopic topic = (LocalTopic)destination; subscription = new DurableSubscriptionHolder(subscriptionName, topic, new LocalQueue(consumerID)); clientManager.addDurableSubscription(clientID, subscriptionName, subscription); //start it destination.add(subscription.getQueue()); } subscription.setHasConsumer(true); } ServerConsumerDelegate scd = new ServerConsumerDelegate(consumerID, subscriptionName == null ? destination : subscription.getQueue(), callbackHandler, this, selector, noLocal, subscription); //The connection may have already been started - so the consumer must be started if (this.connectionEndpoint.started) { scd.setStarted(true); } putConsumerDelegate(consumerID, scd); connectionEndpoint.receivers.put(consumerID, scd); if (log.isTraceEnabled()) log.trace("created consumer endpoint (destination=" + jmsDestination + ")"); return delegate; } | 3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/f7221d281ba7a07fb4ac87aab18e01ea4018e629/ServerSessionDelegate.java/buggy/src/main/org/jboss/jms/server/endpoint/ServerSessionDelegate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
9326,
9586,
752,
5869,
9586,
12,
5683,
23007,
5683,
16,
4766,
5375,
514,
3451,
16,
4766,
5375,
1250,
1158,
2042,
16,
4766,
5375,
514,
4915,
461,
13,
202,
202,
15069,
20343,
282,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9326,
9586,
752,
5869,
9586,
12,
5683,
23007,
5683,
16,
4766,
5375,
514,
3451,
16,
4766,
5375,
1250,
1158,
2042,
16,
4766,
5375,
514,
4915,
461,
13,
202,
202,
15069,
20343,
282,... | |
preferences.method_declaration_arguments_alignment = Alignment.M_INDENT_ON_COLUMN | Alignment.M_NEXT_PER_LINE_SPLIT; | public void test114() { DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getDefaultSettings()); preferences.use_tab = false; preferences.method_declaration_arguments_alignment = Alignment.M_INDENT_ON_COLUMN | Alignment.M_NEXT_PER_LINE_SPLIT; preferences.page_width = 57; DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); runTest(codeFormatter, "test114", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$ } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/2941812daedfecddb313ba4dd0685bac7c26b287/FormatterRegressionTests.java/clean/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
22214,
1435,
288,
202,
202,
1868,
1085,
5074,
1320,
12750,
273,
394,
2989,
1085,
5074,
1320,
12,
1868,
1085,
5074,
2918,
18,
588,
1868,
2628,
10663,
202,
202,
23219,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22214,
1435,
288,
202,
202,
1868,
1085,
5074,
1320,
12750,
273,
394,
2989,
1085,
5074,
1320,
12,
1868,
1085,
5074,
2918,
18,
588,
1868,
2628,
10663,
202,
202,
23219,
... | |
writer.write("'>"); | writer.write("' class='anchorpoint'>"); | public void execute(Writer writer, MacroParameter params) throws IllegalArgumentException, IOException { writer.write("<a name='"); char[] nameChars = params.get(0).toCharArray(); int end = 0; for (int i = 0; i < nameChars.length; i++) { if (Character.isLetterOrDigit(nameChars[i])) { nameChars[end++] = nameChars[i]; } } if (end > 0) { writer.write(nameChars, 0, end); } writer.write("'>"); if (params.getContent() != null) { writer.write(params.getContent()); } writer.write("</a>"); } | 47416 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47416/d155111f79304f461b9da0f95bd8c72887bb979c/AnchorMacro.java/clean/rwiki-impl/impl/src/java/uk/ac/cam/caret/sakai/rwiki/component/macros/AnchorMacro.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1836,
12,
2289,
2633,
16,
31203,
1662,
859,
13,
1082,
202,
15069,
2754,
16,
1860,
202,
95,
202,
202,
6299,
18,
2626,
2932,
32,
69,
508,
2218,
8863,
202,
202,
3001,
8526,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1836,
12,
2289,
2633,
16,
31203,
1662,
859,
13,
1082,
202,
15069,
2754,
16,
1860,
202,
95,
202,
202,
6299,
18,
2626,
2932,
32,
69,
508,
2218,
8863,
202,
202,
3001,
8526,
... |
return AS_PUSH_BUTTON; } | public int getStyle() { // Infer the style form the value field. if (value != null) { if (value == TOGGLE_BTN_ON || value == TOGGLE_BTN_OFF) return AS_CHECK_BOX; if (value == RADIO_BTN_ON || value == RADIO_BTN_OFF) return AS_RADIO_BUTTON; if (value instanceof IMenuCreator) return AS_DROP_DOWN_MENU; } return AS_PUSH_BUTTON;} | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/a803b1cab75d4557a59d39831eed86f5066a9020/Action.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/action/Action.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
509,
14210,
1435,
288,
202,
759,
657,
586,
326,
2154,
646,
326,
460,
652,
18,
202,
430,
261,
1132,
480,
446,
13,
288,
202,
202,
430,
261,
1132,
422,
8493,
19491,
900,
67,
38,
56,
50,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
14210,
1435,
288,
202,
759,
657,
586,
326,
2154,
646,
326,
460,
652,
18,
202,
430,
261,
1132,
480,
446,
13,
288,
202,
202,
430,
261,
1132,
422,
8493,
19491,
900,
67,
38,
56,
50,... | |
OpNumeric op = new OpNumeric(left, right, Constants.MOD); path.addPath(op); step = op; | OpNumeric op= new OpNumeric(left, right, Constants.MOD); path.addPath(op); step= op; | public final Expression numericExpr(AST _t, PathExpr path ) throws RecognitionException, PermissionDeniedException,EXistException { Expression step; AST numericExpr_AST_in = (AST)_t; step = null; PathExpr left = new PathExpr(); PathExpr right = new PathExpr(); if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case PLUS: { AST __t124 = _t; AST tmp29_AST_in = (AST)_t; match(_t,PLUS); _t = _t.getFirstChild(); expr(_t,left); _t = _retTree; expr(_t,right); _t = _retTree; _t = __t124; _t = _t.getNextSibling(); OpNumeric op = new OpNumeric(left, right, Constants.PLUS); path.addPath(op); step = op; break; } case MINUS: { AST __t125 = _t; AST tmp30_AST_in = (AST)_t; match(_t,MINUS); _t = _t.getFirstChild(); expr(_t,left); _t = _retTree; expr(_t,right); _t = _retTree; _t = __t125; _t = _t.getNextSibling(); OpNumeric op = new OpNumeric(left, right, Constants.MINUS); path.addPath(op); step = op; break; } case UNARY_MINUS: { AST __t126 = _t; AST tmp31_AST_in = (AST)_t; match(_t,UNARY_MINUS); _t = _t.getFirstChild(); expr(_t,left); _t = _retTree; _t = __t126; _t = _t.getNextSibling(); UnaryExpr unary = new UnaryExpr(Constants.MINUS); unary.add(left); path.addPath(unary); step = unary; break; } case UNARY_PLUS: { AST __t127 = _t; AST tmp32_AST_in = (AST)_t; match(_t,UNARY_PLUS); _t = _t.getFirstChild(); expr(_t,left); _t = _retTree; _t = __t127; _t = _t.getNextSibling(); UnaryExpr unary = new UnaryExpr(Constants.PLUS); unary.add(left); path.addPath(unary); step = unary; break; } case LITERAL_div: { AST __t128 = _t; AST tmp33_AST_in = (AST)_t; match(_t,LITERAL_div); _t = _t.getFirstChild(); expr(_t,left); _t = _retTree; expr(_t,right); _t = _retTree; _t = __t128; _t = _t.getNextSibling(); OpNumeric op = new OpNumeric(left, right, Constants.DIV); path.addPath(op); step = op; break; } case LITERAL_mod: { AST __t129 = _t; AST tmp34_AST_in = (AST)_t; match(_t,LITERAL_mod); _t = _t.getFirstChild(); expr(_t,left); _t = _retTree; expr(_t,right); _t = _retTree; _t = __t129; _t = _t.getNextSibling(); OpNumeric op = new OpNumeric(left, right, Constants.MOD); path.addPath(op); step = op; break; } case STAR: { AST __t130 = _t; AST tmp35_AST_in = (AST)_t; match(_t,STAR); _t = _t.getFirstChild(); expr(_t,left); _t = _retTree; expr(_t,right); _t = _retTree; _t = __t130; _t = _t.getNextSibling(); OpNumeric op = new OpNumeric(left, right, Constants.MULT); path.addPath(op); step = op; break; } default: { throw new NoViableAltException(_t); } } _retTree = _t; return step; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/ad9d55f515de2cb1fa50cf09c9e42150efc8374f/XPathTreeParser2.java/clean/src/org/exist/parser/XPathTreeParser2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
5371,
225,
6389,
4742,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
288,
202,
202,
2300,
2235,
31,
9506,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
5371,
225,
6389,
4742,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
288,
202,
202,
2300,
2235,
31,
9506,
2... |
if (RDBMServices.supportsTransactions) con.commit(); | if (RDBMServices.supportsTransactions) con.commit(); | public void removePortalUID(int uPortalUID) throws Exception { Connection con = RDBMServices.getConnection(); try { Statement stmt = con.createStatement(); if (RDBMServices.supportsTransactions) con.setAutoCommit(false); try { // START of Addition after bug declaration (bug id 1516) // Permissions delete // must be made before delete user in UP_USER ResultSet rs = stmt.executeQuery("SELECT USER_NAME FROM UP_USER WHERE USER_ID="+uPortalUID); String name = ""; if ( rs.next() ) name = rs.getString(1); rs.close(); rs = stmt.executeQuery("SELECT ENTITY_TYPE_ID FROM UP_ENTITY_TYPE WHERE ENTITY_TYPE_NAME = 'org.jasig.portal.security.IPerson'"); int type = -1; if ( rs.next() ) type = rs.getInt(1); rs.close(); String SQLDelete = "DELETE FROM UP_PERMISSION WHERE PRINCIPAL_KEY='"+name+"' AND PRINCIPAL_TYPE="+type; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); rs = stmt.executeQuery("SELECT M.GROUP_ID " + "FROM UP_GROUP_MEMBERSHIP M, UP_GROUP G, UP_ENTITY_TYPE E " + "WHERE M.GROUP_ID = G.GROUP_ID " + " AND G.ENTITY_TYPE_ID = E.ENTITY_TYPE_ID " + " AND E.ENTITY_TYPE_NAME = 'org.jasig.portal.security.IPerson'" + " AND M.MEMBER_KEY ='"+name+"' AND M.MEMBER_IS_GROUP = 'F'"); java.util.Vector groups = new java.util.Vector(); while ( rs.next() ) groups.add(rs.getString(1)); rs.close(); // Remove from local group // Delete from DeleteUser.java and place here // must be made before delete user in UP_USER java.sql.PreparedStatement ps = con.prepareStatement("DELETE FROM UP_GROUP_MEMBERSHIP WHERE MEMBER_KEY='"+name+"' AND GROUP_ID=?"); for ( int i = 0; i < groups.size(); i++ ) { String group = (String) groups.get(i); ps.setString(1,group); ps.executeUpdate(); } if ( ps != null ) ps.close(); // END of Addition after bug declaration (bug id 1516) SQLDelete = "DELETE FROM UP_USER WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); SQLDelete = "DELETE FROM UP_USER_LAYOUT WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); SQLDelete = "DELETE FROM UP_USER_PARAM WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); SQLDelete = "DELETE FROM UP_USER_PROFILE WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); SQLDelete = "DELETE FROM UP_USER_LAYOUT WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); SQLDelete = "DELETE FROM UP_SS_USER_ATTS WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); SQLDelete = "DELETE FROM UP_SS_USER_PARM WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); SQLDelete = "DELETE FROM UP_LAYOUT_PARAM WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); SQLDelete = "DELETE FROM UP_USER_UA_MAP WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); SQLDelete = "DELETE FROM UP_LAYOUT_STRUCT WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); // START of Addition after bug declaration (bug id 1516) SQLDelete = "DELETE FROM UP_USER_LOCALE WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); SQLDelete = "DELETE FROM UP_USER_PROFILE_MDATA WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); SQLDelete = "DELETE FROM UP_USER_PROFILE_LOCALE WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); SQLDelete = "DELETE FROM UP_USER_LAYOUT_AGGR WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); SQLDelete = "DELETE FROM UP_USER_LAYOUT_MDATA WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); SQLDelete = "DELETE FROM UP_LAYOUT_STRUCT_AGGR WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); SQLDelete = "DELETE FROM UP_LAYOUT_STRUCT_MDATA WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); SQLDelete = "DELETE FROM UP_LAYOUT_RESTRICTIONS WHERE USER_ID = " + uPortalUID; LogService.log(LogService.DEBUG, "RDBMUserIdentityStore::removePortalUID(): " + SQLDelete); stmt.executeUpdate(SQLDelete); // END of Addition after bug declaration (bug id 1516) if (RDBMServices.supportsTransactions) con.commit(); } finally { stmt.close(); } try { IPortletPreferencesStore portletPrefStore = PortletPreferencesStoreFactory.getPortletPreferencesStoreImpl(); portletPrefStore.deletePortletPreferencesByUser(uPortalUID); } catch (Exception e) { } } catch (SQLException se) { try { LogService.log(LogService.ERROR, "RDBMUserIdentityStore::removePortalUID(): " + se); if (RDBMServices.supportsTransactions) con.rollback(); } catch (SQLException e) { LogService.log(LogService.ERROR, "RDBMUserIdentityStore::removePortalUID(): " + e); } if (DEBUG>0) { System.err.println("SQLException: " + se.getMessage()); System.err.println("SQLState: " + se.getSQLState()); System.err.println("Message: " + se.getMessage()); System.err.println("Vendor: " + se.getErrorCode()); } throw se; } finally { RDBMServices.releaseConnection(con); } } | 24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/09dc8c80d161495463fc9d6c3c57215c4012fc94/RDBMUserIdentityStore.java/buggy/source/org/jasig/portal/RDBMUserIdentityStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1206,
24395,
3060,
12,
474,
582,
24395,
3060,
13,
1216,
1185,
288,
565,
4050,
356,
273,
534,
2290,
49,
5676,
18,
588,
1952,
5621,
565,
775,
288,
1377,
8056,
3480,
273,
356,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1206,
24395,
3060,
12,
474,
582,
24395,
3060,
13,
1216,
1185,
288,
565,
4050,
356,
273,
534,
2290,
49,
5676,
18,
588,
1952,
5621,
565,
775,
288,
1377,
8056,
3480,
273,
356,
1... |
public LuceneDictionary (IndexReader reader, String field) { this.reader=reader; this.field=field; } | public LuceneDictionary(IndexReader reader, String field) { this.reader = reader; this.field = field; } | public LuceneDictionary (IndexReader reader, String field) { this.reader=reader; this.field=field; } | 50125 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50125/ec522fc1c8e8da5188e5f4167e36c30932905db8/LuceneDictionary.java/clean/contrib/spellchecker/src/java/org/apache/lucene/search/spell/LuceneDictionary.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
511,
14152,
10905,
261,
1016,
2514,
2949,
16,
514,
652,
13,
288,
3639,
333,
18,
10530,
33,
10530,
31,
3639,
333,
18,
1518,
33,
1518,
31,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
511,
14152,
10905,
261,
1016,
2514,
2949,
16,
514,
652,
13,
288,
3639,
333,
18,
10530,
33,
10530,
31,
3639,
333,
18,
1518,
33,
1518,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,... |
return false; | return VMCompiler.compileClass(oneClass); | public static boolean compileClass(Class oneClass) { // Never succeed. return false; } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/c133414452f7d3f9607e77a80e3ae003b3b3fb91/Compiler.java/buggy/libraries/javalib/java/lang/Compiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1250,
4074,
797,
12,
797,
1245,
797,
13,
225,
288,
565,
368,
24496,
12897,
18,
282,
327,
8251,
9213,
18,
11100,
797,
12,
476,
797,
1769,
225,
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,
282,
1071,
760,
1250,
4074,
797,
12,
797,
1245,
797,
13,
225,
288,
565,
368,
24496,
12897,
18,
282,
327,
8251,
9213,
18,
11100,
797,
12,
476,
797,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
... |
return new AntJellyContext(project, this); } | return new AntJellyContext(project, this); } | protected JellyContext createChildContext() { return new AntJellyContext(project, this); } | 51800 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51800/ed885dee7d315dcab3e18c17a0ba9823bcce7968/AntJellyContext.java/clean/src/java/org/apache/commons/jelly/task/AntJellyContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
804,
292,
715,
1042,
752,
1763,
1042,
1435,
288,
202,
202,
2463,
394,
18830,
46,
292,
715,
1042,
12,
4406,
16,
333,
1769,
202,
97,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
804,
292,
715,
1042,
752,
1763,
1042,
1435,
288,
202,
202,
2463,
394,
18830,
46,
292,
715,
1042,
12,
4406,
16,
333,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
return SelectiobObject; | return selectiobObject; | protected List getSelectionObject( ) { return SelectiobObject; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/3488d00bfea49bb4fa0b226fc801b118d0333707/ReportMediator.java/clean/UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/core/util/mediator/ReportMediator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1117,
987,
23204,
921,
12,
262,
202,
202,
95,
1082,
202,
2463,
6766,
77,
947,
921,
31,
202,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1117,
987,
23204,
921,
12,
262,
202,
202,
95,
1082,
202,
2463,
6766,
77,
947,
921,
31,
202,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if (was_bol() && whole_match_p("__END__", false)) { | if (was_bol() && whole_match_p("_END__", false)) { | private int yylex() { char c; boolean spaceSeen = false; boolean commandState; if (lex_strterm != null) { if (lex_strterm instanceof HereDocNode) { int token = hereDocument(); if (token == Token.tSTRING_END) { lex_strterm = null; lex_state = LexState.EXPR_END; } return token; } else { int token = parseString(); if (token == Token.tSTRING_END || token == Token.tREGEXP_END) { lex_strterm = null; lex_state = LexState.EXPR_END; } return token; } } currentPos = support.getPosition(); commandState = commandStart; commandStart = false; retry: for(;;) { c = support.read(); switch(c) { case '\004': /* ^D */ case '\032': /* ^Z */ case 0: /* end of script. */ return 0; /* white spaces */ case ' ': case '\t': case '\f': case '\r': case '\13': /* '\v' */ spaceSeen = true; continue retry; case '#': /* it's a comment */ while ((c = support.read()) != '\n') { if (c == EOF) { return 0; } } /* fall through */ case '\n': if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT || lex_state == LexState.EXPR_CLASS) { continue retry; } commandStart = true; lex_state = LexState.EXPR_BEG; return '\n'; case '*': if ((c = support.read()) == '*') { if ((c = support.read()) == '=') { yaccValue = "**"; lex_state = LexState.EXPR_BEG; return Token.tOP_ASGN; } support.unread(); c = Token.tPOW; } else { if (c == '=') { yaccValue = "*"; lex_state = LexState.EXPR_BEG; return Token.tOP_ASGN; } support.unread(); if (lex_state.isArgument() && spaceSeen && !Character.isWhitespace(c)) { errorHandler.handleError(IErrors.WARNING, support.getPosition(), "`*' interpreted as argument prefix"); c = Token.tSTAR; } else if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { c = Token.tSTAR; } else { c = '*'; } } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } return c; case '!': lex_state = LexState.EXPR_BEG; if ((c = support.read()) == '=') { return Token.tNEQ; } if (c == '~') { return Token.tNMATCH; } support.unread(); return '!'; case '=': // Skip documentation nodes if (was_bol()) { /* skip embedded rd document */ if (support.isNextNoCase("begin")) { c = support.read(); if (Character.isWhitespace(c)) { // In case last next was the newline. support.unread(); for (;;) { support.readLine(); c = support.read(); if (c == EOF) { errorHandler.handleError(IErrors.COMPILE_ERROR, support.getPosition(), "embedded document meets end of file"); return 0; } if (c != '=') continue; if (support.isNextNoCase("end")) { if (support.isEOL()) { break; } c = support.read(); if (Character.isWhitespace(c)) { support.readLine(); break; } else { support.unread(); } } } continue retry; } else { support.unread(); } } } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } c = support.read(); if (c == '=') { c = support.read(); if (c == '=') { return Token.tEQQ; } support.unread(); return Token.tEQ; } if (c == '~') { return Token.tMATCH; } else if (c == '>') { return Token.tASSOC; } support.unread(); return '='; case '<': c = support.read(); if (c == '<' && lex_state != LexState.EXPR_END && lex_state != LexState.EXPR_DOT && lex_state != LexState.EXPR_ENDARG && lex_state != LexState.EXPR_CLASS && (!lex_state.isArgument() || spaceSeen)) { int token = hereDocumentIdentifier(); if (token != 0) return token; } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } if (c == '=') { if ((c = support.read()) == '>') { return Token.tCMP; } support.unread(); return Token.tLEQ; } if (c == '<') { if ((c = support.read()) == '=') { yaccValue = "<<"; lex_state = LexState.EXPR_BEG; return Token.tOP_ASGN; } support.unread(); return Token.tLSHFT; } support.unread(); return '<'; case '>': if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } if ((c = support.read()) == '=') { return Token.tGEQ; } if (c == '>') { if ((c = support.read()) == '=') { yaccValue = ">>"; lex_state = LexState.EXPR_BEG; return Token.tOP_ASGN; } support.unread(); return Token.tRSHFT; } support.unread(); return '>'; case '"': lex_strterm = new StrTermNode(support.getPosition(), str_dquote, '"', 0); return Token.tSTRING_BEG; case '`': if (lex_state == LexState.EXPR_FNAME) { lex_state = LexState.EXPR_END; return c; } if (lex_state == LexState.EXPR_DOT) { if (commandState) { lex_state = LexState.EXPR_CMDARG; } else { lex_state = LexState.EXPR_ARG; } return c; } lex_strterm = new StrTermNode(support.getPosition(), str_xquote, '`', 0); return Token.tXSTRING_BEG; case '\'': lex_strterm = new StrTermNode(support.getPosition(), str_squote, '\'', 0); return Token.tSTRING_BEG; case '?': if (lex_state == LexState.EXPR_END || lex_state == LexState.EXPR_ENDARG) { lex_state = LexState.EXPR_BEG; return '?'; } c = support.read(); if (c == EOF) { errorHandler.handleError(IErrors.COMPILE_ERROR, support.getPosition(), "incomplete character syntax"); return 0; } if (Character.isWhitespace(c)){ if (!lex_state.isArgument()){ int c2 = 0; switch (c) { case ' ': c2 = 's'; break; case '\n': c2 = 'n'; break; case '\t': c2 = 't'; break; /* What is \v in C? case '\v': c2 = 'v'; break; */ case '\r': c2 = 'r'; break; case '\f': c2 = 'f'; break; } if (c2 != 0) { rb_warn("invalid character syntax; use ?\\" + c2); } } support.unread(); lex_state = LexState.EXPR_BEG; return '?'; /*} else if (ismbchar(c)) { // ruby - we don't support them either? rb_warn("multibyte character literal not supported yet; use ?\\" + c); support.unread(); lexState = LexState.EXPR_BEG; return '?';*/ } else if ((Character.isLetterOrDigit(c) || c == '_') && support.isEOL() == false && isNext_identchar()) { support.unread(); lex_state = LexState.EXPR_BEG; return '?'; } else if (c == '\\') { c = (char)read_escape(); } c &= 0xff; lex_state = LexState.EXPR_END; yaccValue = new Long(c); return Token.tINTEGER; case '&': if ((c = support.read()) == '&') { lex_state = LexState.EXPR_BEG; if ((c = support.read()) == '=') { yaccValue = "&&"; lex_state = LexState.EXPR_BEG; return Token.tOP_ASGN; } support.unread(); return Token.tANDOP; } else if (c == '=') { yaccValue = "&"; lex_state = LexState.EXPR_BEG; return Token.tOP_ASGN; } support.unread(); if (lex_state.isArgument() && spaceSeen && !Character.isWhitespace(c)){ rb_warning("`&' interpreted as argument prefix"); c = Token.tAMPER; } else if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { c = Token.tAMPER; } else { c = '&'; } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } return c; case '|': if ((c = support.read()) == '|') { lex_state = LexState.EXPR_BEG; if ((c = support.read()) == '=') { yaccValue = "||"; lex_state = LexState.EXPR_BEG; return Token.tOP_ASGN; } support.unread(); return Token.tOROP; } if (c == '=') { yaccValue = "|"; lex_state = LexState.EXPR_BEG; return Token.tOP_ASGN; } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } support.unread(); return '|'; case '+': c = support.read(); if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; if (c == '@') { return Token.tUPLUS; } support.unread(); return '+'; } if (c == '=') { yaccValue = "+"; lex_state = LexState.EXPR_BEG; return Token.tOP_ASGN; } if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID || (lex_state.isArgument() && spaceSeen && !Character.isWhitespace(c))) { if (lex_state.isArgument()) arg_ambiguous(); lex_state = LexState.EXPR_BEG; support.unread(); if (Character.isDigit(c)) { c = '+'; return parseNumber(c); } return Token.tUPLUS; } lex_state = LexState.EXPR_BEG; support.unread(); return '+'; case '-': c = support.read(); if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; if (c == '@') { return Token.tUMINUS; } support.unread(); return '-'; } if (c == '=') { yaccValue = "-"; lex_state = LexState.EXPR_BEG; return Token.tOP_ASGN; } if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID || (lex_state.isArgument() && spaceSeen && !Character.isWhitespace(c))) { if (lex_state.isArgument()) arg_ambiguous(); lex_state = LexState.EXPR_BEG; support.unread(); if (Character.isDigit(c)) { return Token.tUMINUS_NUM; } return Token.tUMINUS; } lex_state = LexState.EXPR_BEG; support.unread(); return '-'; case '.': lex_state = LexState.EXPR_BEG; if ((c = support.read()) == '.') { if ((c = support.read()) == '.') { return Token.tDOT3; } support.unread(); return Token.tDOT2; } support.unread(); if (!Character.isDigit(c)) { lex_state = LexState.EXPR_DOT; return '.'; } c = '.'; // fall through //start_num: case '0' : case '1' : case '2' : case '3' : case '4' : case '5' : case '6' : case '7' : case '8' : case '9' : return parseNumber(c); case ']': case '}': case ')': conditionState.restart(); cmdArgumentState.restart(); lex_state = LexState.EXPR_END; return c; case ':': c = support.read(); if (c == ':') { if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID || lex_state == LexState.EXPR_CLASS || (lex_state.isArgument() && spaceSeen)) { lex_state = LexState.EXPR_BEG; return Token.tCOLON3; } lex_state = LexState.EXPR_DOT; return Token.tCOLON2; } if (lex_state == LexState.EXPR_END || lex_state == LexState.EXPR_ENDARG || Character.isWhitespace(c)) { support.unread(); lex_state = LexState.EXPR_BEG; return ':'; } switch (c) { case '\'': lex_strterm = new StrTermNode(support.getPosition(), str_ssym, c, 0); break; case '"': lex_strterm = new StrTermNode(support.getPosition(), str_dsym, c, 0); break; default: support.unread(); break; } lex_state = LexState.EXPR_FNAME; return Token.tSYMBEG; case '/': if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { lex_strterm = new StrTermNode(support.getPosition(), str_regexp, '/', 0); return Token.tREGEXP_BEG; } if ((c = support.read()) == '=') { yaccValue = "/"; lex_state = LexState.EXPR_BEG; return Token.tOP_ASGN; } support.unread(); if (lex_state.isArgument() && spaceSeen) { if (!Character.isWhitespace(c)) { arg_ambiguous(); lex_strterm = new StrTermNode(support.getPosition(), str_regexp, '/', 0); return Token.tREGEXP_BEG; } } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } return '/'; case '^': if ((c = support.read()) == '=') { yaccValue = "^"; lex_state = LexState.EXPR_BEG; return Token.tOP_ASGN; } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } support.unread(); return '^'; case ';': commandStart = true; case ',': lex_state = LexState.EXPR_BEG; return c; case '~': if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { if ((c = support.read()) != '@') { support.unread(); } } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } return '~'; case '(': commandStart = true; if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { c = Token.tLPAREN; } else if (spaceSeen) { if (lex_state == LexState.EXPR_CMDARG) { c = Token.tLPAREN_ARG; } else if (lex_state == LexState.EXPR_ARG) { rb_warn("don't put space before argument parentheses"); c = '('; } } conditionState.stop(); cmdArgumentState.stop(); lex_state = LexState.EXPR_BEG; return c; case '[': if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; if ((c = support.read()) == ']') { if ((c = support.read()) == '=') { return Token.tASET; } support.unread(); return Token.tAREF; } support.unread(); return '['; } else if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { c = Token.tLBRACK; } else if (lex_state.isArgument() && spaceSeen) { c = Token.tLBRACK; } lex_state = LexState.EXPR_BEG; conditionState.stop(); cmdArgumentState.stop(); return c; case '{': if (lex_state.isArgument() || lex_state == LexState.EXPR_END) { c = '{'; /* block (primary) */ } else if (lex_state == LexState.EXPR_ENDARG) { c = Token.tLBRACE_ARG; /* block (expr) */ } else { c = Token.tLBRACE; /* hash */ } conditionState.stop(); cmdArgumentState.stop(); lex_state = LexState.EXPR_BEG; return c; case '\\': c = support.read(); if (c == '\n') { spaceSeen = true; continue retry; /* skip \\n */ } support.unread(); return '\\'; case '%': if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { return parseQuote(support.read()); } if ((c = support.read()) == '=') { yaccValue = "%"; lex_state = LexState.EXPR_BEG; return Token.tOP_ASGN; } if (lex_state.isArgument() && spaceSeen && !Character.isWhitespace(c)) { return parseQuote(c); } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } support.unread(); return '%'; case '$': lex_state = LexState.EXPR_END; newToken(); c = support.read(); switch (c) { case '_': /* $_: last read line string */ c = support.read(); if (isIdentifierChar(c)) { tokadd('$'); tokadd('_'); break; } support.unread(); c = '_'; /* fall through */ case '~': /* $~: match-data */ // Enebo: We had following line replace line after that, // but it is commented out... //parserSupport.getLocalNames().getLocalIndex(String.valueOf(c)); //local_cnt(c); /* fall through */ case '*': /* $*: argv */ case '$': /* $$: pid */ case '?': /* $?: last status */ case '!': /* $!: error string */ case '@': /* $@: error position */ case '/': /* $/: input record separator */ case '\\': /* $\: output record separator */ case ';': /* $;: field separator */ case ',': /* $,: output field separator */ case '.': /* $.: last read line number */ case '=': /* $=: ignorecase */ case ':': /* $:: load path */ case '<': /* $<: reading filename */ case '>': /* $>: default output handle */ case '\"': /* $": already loaded files */ tokadd('$'); tokadd(c); yaccValue = tok(); return Token.tGVAR; case '-': tokadd('$'); tokadd(c); c = support.read(); tokadd(c); yaccValue = tok(); /* xxx shouldn't check if valid option variable */ return Token.tGVAR; case '&': /* $&: last match */ case '`': /* $`: string before last match */ case '\'': /* $': string after last match */ case '+': /* $+: string matches last paren. */ yaccValue = new BackRefNode(support.getPosition(), c); return Token.tBACK_REF; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': tokadd('$'); do { tokadd(c); c = support.read(); } while (Character.isDigit(c)); support.unread(); yaccValue = new NthRefNode(support.getPosition(), Integer.parseInt(tok().substring(1))); return Token.tNTH_REF; default: if (!isIdentifierChar(c)) { support.unread(); return '$'; } case '0': tokadd('$'); } break; case '@': c = support.read(); newToken(); tokadd('@'); if (c == '@') { tokadd('@'); c = support.read(); } if (Character.isDigit(c)) { if (toklen() == 1) { rb_compile_error("`@" + c + "' is not allowed as an instance variable name"); } else { rb_compile_error("`@@" + c + "' is not allowed as a class variable name"); } } if (!isIdentifierChar(c)) { support.unread(); return '@'; } break; case '_': if (was_bol() && whole_match_p("__END__", false)) { return 0; } newToken(); break; default: if (!isIdentifierChar(c)) { rb_compile_error("Invalid char `\\" + c + "' in expression"); continue retry; } newToken(); break; } do { tokadd(c); if (ismbchar(c)) { int i, len = mbclen(c)-1; for (i = 0; i < len; i++) { c = support.read(); tokadd(c); } } c = support.read(); } while (isIdentifierChar(c)); char peek = support.read(); if ((c == '!' || c == '?') && isIdentifierChar(tok().charAt(0)) && peek != '=') { support.unread(); // put peek back. tokadd(c); } else { support.unreadMany(2); // put peek back. } int result = 0; switch (tok().charAt(0)) { case '$': lex_state = LexState.EXPR_END; result = Token.tGVAR; break; case '@': lex_state = LexState.EXPR_END; if (tok().charAt(1) == '@') { result = Token.tCVAR; } else { result = Token.tIVAR; } break; default: if (toklast() == '!' || toklast() == '?') { result = Token.tFID; } else { if (lex_state == LexState.EXPR_FNAME) { if ((c = support.read()) == '=' && !peek('~') && !peek('>') && (!peek('=') || (support.isEOL() && support.getCharAt(1) == '>'))) { result = Token.tIDENTIFIER; tokadd(c); } else { support.unread(); } } if (result == 0 && ISUPPER(tok().charAt(0))) { result = Token.tCONSTANT; } else { result = Token.tIDENTIFIER; } } if (lex_state != LexState.EXPR_DOT) { /* See if it is a reserved word. */ Keyword keyword = getKeyword(tok(), toklen()); if (keyword != null) { // enum lex_state LexState state = lex_state; lex_state = keyword.state; if (state.isExprFName()) { yaccValue = keyword.name; } if (keyword.id0 == Token.kDO) { if (conditionState.isInState()) { return Token.kDO_COND; } if (cmdArgumentState.isInState() && state != LexState.EXPR_CMDARG) { return Token.kDO_BLOCK; } if (state == LexState.EXPR_ENDARG) { return Token.kDO_BLOCK; } return Token.kDO; } if (state == LexState.EXPR_BEG) { return keyword.id0; } else { if (keyword.id0 != keyword.id1) lex_state = LexState.EXPR_BEG; return keyword.id1; } } } if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID || lex_state == LexState.EXPR_DOT || lex_state == LexState.EXPR_ARG || lex_state == LexState.EXPR_CMDARG) { if (commandState) { lex_state = LexState.EXPR_CMDARG; } else { lex_state = LexState.EXPR_ARG; } } else { lex_state = LexState.EXPR_END; } } yaccValue = tok(); // Lame: parsing logic made it into lexer in ruby...So we // are emulating if (IdUtil.isLocal((String)yaccValue) && ((parserSupport.getBlockNames().isInBlock() && parserSupport.getBlockNames().isDefined((String) yaccValue)) || parserSupport.getLocalNames().isLocalRegistered((String) yaccValue))) { lex_state = LexState.EXPR_END; } return result; } } | 45827 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45827/8ce27f029c7dbaced0850b02dedc1e2c73a48589/RubyYaccLexer.java/clean/src/org/jruby/lexer/yacc/RubyYaccLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
677,
1362,
92,
1435,
288,
3639,
1149,
276,
31,
3639,
1250,
3476,
15160,
273,
629,
31,
3639,
1250,
1296,
1119,
31,
7734,
309,
261,
4149,
67,
701,
6408,
480,
446,
13,
288,
5411... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
677,
1362,
92,
1435,
288,
3639,
1149,
276,
31,
3639,
1250,
3476,
15160,
273,
629,
31,
3639,
1250,
1296,
1119,
31,
7734,
309,
261,
4149,
67,
701,
6408,
480,
446,
13,
288,
5411... |
for (Iterator it = items.iterator(); it.hasNext(); ) ((FileItem) it.next()).delete(); | for (FileItem fi : items) fi.delete(); | public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { int status = HttpServletResponse.SC_OK; List items = null; String attachmentId = null; String reqId = null; do { // file upload requires authentication AuthToken authToken = getAuthTokenFromCookie(req, resp, true); if (authToken == null) { status = HttpServletResponse.SC_UNAUTHORIZED; break; } try { // make sure we're on the right host; proxy if we're not... Provisioning prov = Provisioning.getInstance(); Account acct = prov.get(AccountBy.id, authToken.getAccountId()); if (!Provisioning.onLocalServer(acct)) { proxyServletRequest(req, resp, prov.getServer(acct), null); return; } } catch (ServiceException e) { throw new ServletException(e); } // file upload requires multipart enctype if (!FileUploadBase.isMultipartContent(req)) { status = HttpServletResponse.SC_BAD_REQUEST; break; } DiskFileUpload upload = getUploader(); try { items = upload.parseRequest(req); } catch (FileUploadBase.SizeLimitExceededException e) { // at least one file was over max allowed size status = HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE; mLog.info("Exceeded maximum upload size of " + upload.getSizeMax() + " bytes: " + e); break; } catch (FileUploadBase.InvalidContentTypeException e) { // at least one file was of a type not allowed status = HttpServletResponse.SC_UNSUPPORTED_MEDIA_TYPE; mLog.info("File upload failed", e); break; } catch (FileUploadException e) { // parse of request failed for some other reason status = HttpServletResponse.SC_INTERNAL_SERVER_ERROR; mLog.info("File upload failed", e); break; } // strip form fields out of the list of uploads... if (items != null) for (Iterator it = items.iterator(); it.hasNext(); ) { FileItem fi = (FileItem) it.next(); if (fi != null && fi.getFieldName().equals("requestId")) reqId = fi.getString(); if (fi == null || fi.isFormField() || fi.getName() == null || fi.getName().trim().equals("")) it.remove(); } // empty upload is not a "success" if (items == null || items.isEmpty()) { status = HttpServletResponse.SC_NO_CONTENT; break; } // cache the uploaded files in the hash and construct the list of upload IDs try { for (Iterator it = items.iterator(); it.hasNext(); ) { Upload up = new Upload(authToken.getAccountId(), (FileItem) it.next()); synchronized (mPending) { mLog.debug("doPost(): added " + up); mPending.put(up.uuid, up); } attachmentId = (attachmentId == null ? up.uuid : attachmentId + UPLOAD_DELIMITER + up.uuid); } } catch (ServiceException e) { status = HttpServletResponse.SC_INTERNAL_SERVER_ERROR; mLog.info("File upload failed", e); } } while (false); StringBuffer results = new StringBuffer(); results.append(status).append(",'").append(reqId != null ? reqId : "null").append('\''); if (status == HttpServletResponse.SC_OK) results.append(",'").append(attachmentId).append('\''); resp.setContentType("text/html"); PrintWriter out = resp.getWriter(); String fmt = req.getParameter(ContentServlet.PARAM_FORMAT); if (ContentServlet.FORMAT_RAW.equals(fmt)) out.println(results); else { out.println("<html><head></head><body onload=\"window.parent._uploadManager.loaded(" + results + ");\">"); out.println("</body></html>"); } out.close(); // handle failure by cleaning up the failed upload if (status != HttpServletResponse.SC_OK && items != null && items.size() > 0) for (Iterator it = items.iterator(); it.hasNext(); ) ((FileItem) it.next()).delete(); } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/68f14dd831a330a49fd1fbbaaad32109bd4d82f0/FileUploadServlet.java/clean/ZimbraServer/src/java/com/zimbra/cs/service/FileUploadServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
741,
3349,
12,
2940,
18572,
1111,
16,
12446,
1718,
13,
1216,
1860,
16,
16517,
288,
202,
202,
474,
1267,
273,
12446,
18,
2312,
67,
3141,
31,
3639,
987,
1516,
273,
446,
31,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
741,
3349,
12,
2940,
18572,
1111,
16,
12446,
1718,
13,
1216,
1860,
16,
16517,
288,
202,
202,
474,
1267,
273,
12446,
18,
2312,
67,
3141,
31,
3639,
987,
1516,
273,
446,
31,... |
floatClass.defineMethod("+", getMethodPlus()); floatClass.defineMethod("-", getMethodMinus()); floatClass.defineMethod("*", getMethodMul()); floatClass.defineMethod("/", getMethodDiv()); floatClass.defineMethod("%", getMethodMod()); floatClass.defineMethod("**", getMethodPow()); | floatClass.defineMethod("+", getMethod("op_plus", RubyNumeric.class)); floatClass.defineMethod("-", getMethod("op_minus", RubyNumeric.class)); floatClass.defineMethod("*", getMethod("op_mul", RubyNumeric.class)); floatClass.defineMethod("/", getMethod("op_div", RubyNumeric.class)); floatClass.defineMethod("%", getMethod("op_mod", RubyNumeric.class)); floatClass.defineMethod("**", getMethod("op_pow", RubyNumeric.class)); | public static RubyClass createFloat(Ruby ruby) { RubyClass floatClass = ruby.defineClass("Float", (RubyClass)ruby.getRubyClass("Numeric")); // floatClass.defineMethod("to_i", getMethodToI()); floatClass.defineMethod("to_s", getMethodToS()); floatClass.defineMethod("+", getMethodPlus()); floatClass.defineMethod("-", getMethodMinus()); floatClass.defineMethod("*", getMethodMul()); floatClass.defineMethod("/", getMethodDiv()); floatClass.defineMethod("%", getMethodMod()); floatClass.defineMethod("**", getMethodPow()); // floatClass.defineMethod("==", getMethodEqual()); floatClass.defineMethod("<=>", getMethodCmp()); floatClass.defineMethod(">", getMethodGt()); floatClass.defineMethod(">=", getMethodGe()); floatClass.defineMethod("<", getMethodLt()); floatClass.defineMethod("<=", getMethodLe()); return floatClass; } | 45298 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45298/a9420f23379e292698ea011ab08fb480b4decbcc/RbFloat.java/buggy/org/jruby/core/RbFloat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
752,
4723,
12,
54,
10340,
22155,
13,
288,
3639,
19817,
797,
1431,
797,
273,
22155,
18,
11255,
797,
2932,
4723,
3113,
261,
54,
10340,
797,
13,
27768,
18,
588,
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,
760,
19817,
797,
752,
4723,
12,
54,
10340,
22155,
13,
288,
3639,
19817,
797,
1431,
797,
273,
22155,
18,
11255,
797,
2932,
4723,
3113,
261,
54,
10340,
797,
13,
27768,
18,
588,
54,
... |
munitions.addElement( new MunitionMutator( "(Clan) Anti-TSM", | munitions.add( new MunitionMutator( "(Clan) Anti-TSM", | public static void initializeTypes() { // Save copies of the SRM and LRM ammos to use to create munitions. Vector srmAmmos = new Vector(11); Vector clanSrmAmmos = new Vector(); Vector baSrmAmmos = new Vector(); Vector baMrmAmmos = new Vector(); Vector clanBaLrmAmmos = new Vector(); Vector isBaLrmAmmos = new Vector(); Vector lrmAmmos = new Vector(26); Vector clanLrmAmmos = new Vector(); Vector acAmmos = new Vector(4); Vector arrowAmmos = new Vector(4); Vector clanArrowAmmos = new Vector(4); Vector thumperAmmos = new Vector(2); Vector artyAmmos = new Vector(6); Vector clanArtyAmmos = new Vector(6); Vector munitions = new Vector(); Enumeration baseTypes = null; Enumeration mutators = null; AmmoType base = null; MunitionMutator mutator = null; // all level 1 ammo EquipmentType.addType(createISVehicleFlamerAmmo()); EquipmentType.addType(createISMGAmmo()); EquipmentType.addType(createISMGAmmoHalf()); base = createISAC2Ammo(); acAmmos.addElement( base ); EquipmentType.addType( base ); base = createISAC5Ammo(); acAmmos.addElement( base ); EquipmentType.addType( base ); base = createISAC10Ammo(); acAmmos.addElement( base ); EquipmentType.addType( base ); base = createISAC20Ammo(); acAmmos.addElement( base ); EquipmentType.addType( base ); base = createISLRM5Ammo(); lrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISLRM10Ammo(); lrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISLRM15Ammo(); lrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISLRM20Ammo(); lrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISSRM2Ammo(); srmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISSRM4Ammo(); srmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISSRM6Ammo(); srmAmmos.addElement( base ); EquipmentType.addType( base ); // Level 3 Ammo // Note, some level 3 stuff is mixed into level 2. base = createISLAC2Ammo(); acAmmos.add(base); EquipmentType.addType(base); base = createISLAC5Ammo(); acAmmos.add(base); EquipmentType.addType(base); base = createISLAC10Ammo(); acAmmos.add(base); EquipmentType.addType(base); base = createISLAC20Ammo(); acAmmos.add(base); EquipmentType.addType(base); EquipmentType.addType(createISHeavyFlamerAmmo()); EquipmentType.addType(createCoolantPod()); EquipmentType.addType(createISRailGunAmmo()); EquipmentType.addType(createISMPodAmmo()); // Start of Level2 Ammo EquipmentType.addType(createISLB2XAmmo()); EquipmentType.addType(createISLB5XAmmo()); EquipmentType.addType(createISLB10XAmmo()); EquipmentType.addType(createISLB20XAmmo()); EquipmentType.addType(createISLB2XClusterAmmo()); EquipmentType.addType(createISLB5XClusterAmmo()); EquipmentType.addType(createISLB10XClusterAmmo()); EquipmentType.addType(createISLB20XClusterAmmo()); EquipmentType.addType(createISTHBLB2XAmmo()); EquipmentType.addType(createISTHBLB5XAmmo()); EquipmentType.addType(createISTHBLB20XAmmo()); EquipmentType.addType(createISTHBLB2XClusterAmmo()); EquipmentType.addType(createISTHBLB5XClusterAmmo()); EquipmentType.addType(createISTHBLB20XClusterAmmo()); EquipmentType.addType(createISUltra2Ammo()); EquipmentType.addType(createISUltra5Ammo()); EquipmentType.addType(createISUltra10Ammo()); EquipmentType.addType(createISUltra20Ammo()); EquipmentType.addType(createISTHBUltra2Ammo()); EquipmentType.addType(createISTHBUltra10Ammo()); EquipmentType.addType(createISTHBUltra20Ammo()); EquipmentType.addType(createISRotary2Ammo()); EquipmentType.addType(createISRotary5Ammo()); EquipmentType.addType(createISRotary10Ammo()); EquipmentType.addType(createISRotary20Ammo()); EquipmentType.addType(createISGaussAmmo()); EquipmentType.addType(createISLTGaussAmmo()); EquipmentType.addType(createISHVGaussAmmo()); EquipmentType.addType(createISStreakSRM2Ammo()); EquipmentType.addType(createISStreakSRM4Ammo()); EquipmentType.addType(createISStreakSRM6Ammo()); EquipmentType.addType(createISMRM10Ammo()); EquipmentType.addType(createISMRM20Ammo()); EquipmentType.addType(createISMRM30Ammo()); EquipmentType.addType(createISMRM40Ammo()); EquipmentType.addType(createISRL10Ammo()); EquipmentType.addType(createISRL15Ammo()); EquipmentType.addType(createISRL20Ammo()); EquipmentType.addType(createISAMSAmmo()); EquipmentType.addType(createISNarcAmmo()); EquipmentType.addType(createISNarcExplosiveAmmo()); EquipmentType.addType(createISiNarcAmmo()); EquipmentType.addType(createISiNarcECMAmmo()); EquipmentType.addType(createISiNarcExplosiveAmmo()); EquipmentType.addType(createISiNarcHaywireAmmo()); EquipmentType.addType(createISiNarcNemesisAmmo()); EquipmentType.addType(createISLRT5Ammo()); EquipmentType.addType(createISLRT10Ammo()); EquipmentType.addType(createISLRT15Ammo()); EquipmentType.addType(createISLRT20Ammo()); EquipmentType.addType(createISSRT2Ammo()); EquipmentType.addType(createISSRT4Ammo()); EquipmentType.addType(createISSRT6Ammo()); EquipmentType.addType(createISExtendedLRM5Ammo()); EquipmentType.addType(createISExtendedLRM10Ammo()); EquipmentType.addType(createISExtendedLRM15Ammo()); EquipmentType.addType(createISExtendedLRM20Ammo()); EquipmentType.addType(createISThunderbolt5Ammo()); EquipmentType.addType(createISThunderbolt10Ammo()); EquipmentType.addType(createISThunderbolt15Ammo()); EquipmentType.addType(createISThunderbolt20Ammo()); EquipmentType.addType(createISMagshotGRAmmo()); EquipmentType.addType(createISPXLRM5Ammo()); EquipmentType.addType(createISPXLRM10Ammo()); EquipmentType.addType(createISPXLRM15Ammo()); EquipmentType.addType(createISPXLRM20Ammo()); EquipmentType.addType(createISHawkSRM2Ammo()); EquipmentType.addType(createISHawkSRM4Ammo()); EquipmentType.addType(createISHawkSRM6Ammo()); EquipmentType.addType(createISStreakMRM10Ammo()); EquipmentType.addType(createISStreakMRM20Ammo()); EquipmentType.addType(createISStreakMRM30Ammo()); EquipmentType.addType(createISStreakMRM40Ammo()); EquipmentType.addType(createISHeavyMGAmmo()); EquipmentType.addType(createISHeavyMGAmmoHalf()); EquipmentType.addType(createISLightMGAmmo()); EquipmentType.addType(createISLightMGAmmoHalf()); base = createISMML3LRMAmmo(); lrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISMML3SRMAmmo(); srmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISMML5LRMAmmo(); lrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISMML5SRMAmmo(); srmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISMML7LRMAmmo(); lrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISMML7SRMAmmo(); srmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISMML9LRMAmmo(); lrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISMML9SRMAmmo(); srmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISLongTomAmmo(); artyAmmos.addElement( base ); EquipmentType.addType( base ); base = createISSniperAmmo(); artyAmmos.addElement( base ); EquipmentType.addType( base ); base = createISThumperAmmo(); thumperAmmos.addElement( base ); EquipmentType.addType( base ); base = createISArrowIVAmmo(); arrowAmmos.addElement( base ); EquipmentType.addType( base ); EquipmentType.addType(createCLLB2XAmmo()); EquipmentType.addType(createCLLB5XAmmo()); EquipmentType.addType(createCLLB10XAmmo()); EquipmentType.addType(createCLLB20XAmmo()); EquipmentType.addType(createCLLB2XClusterAmmo()); EquipmentType.addType(createCLLB5XClusterAmmo()); EquipmentType.addType(createCLLB10XClusterAmmo()); EquipmentType.addType(createCLLB20XClusterAmmo()); EquipmentType.addType(createCLUltra2Ammo()); EquipmentType.addType(createCLUltra5Ammo()); EquipmentType.addType(createCLUltra10Ammo()); EquipmentType.addType(createCLUltra20Ammo()); EquipmentType.addType(createCLRotary2Ammo()); EquipmentType.addType(createCLRotary5Ammo()); EquipmentType.addType(createCLRotary10Ammo()); EquipmentType.addType(createCLRotary20Ammo()); EquipmentType.addType(createCLGaussAmmo()); EquipmentType.addType(createCLStreakSRM1Ammo()); EquipmentType.addType(createCLStreakSRM2Ammo()); EquipmentType.addType(createCLStreakSRM3Ammo()); EquipmentType.addType(createCLStreakSRM4Ammo()); EquipmentType.addType(createCLStreakSRM5Ammo()); EquipmentType.addType(createCLStreakSRM6Ammo()); EquipmentType.addType(createCLVehicleFlamerAmmo()); EquipmentType.addType(createCLMGAmmo()); EquipmentType.addType(createCLMGAmmoHalf()); EquipmentType.addType(createCLHeavyMGAmmo()); EquipmentType.addType(createCLHeavyMGAmmoHalf()); EquipmentType.addType(createCLLightMGAmmo()); EquipmentType.addType(createCLLightMGAmmoHalf()); EquipmentType.addType(createCLAMSAmmo()); EquipmentType.addType(createCLNarcAmmo()); EquipmentType.addType(createCLNarcExplosiveAmmo()); EquipmentType.addType(createCLATM3Ammo()); EquipmentType.addType(createCLATM3ERAmmo()); EquipmentType.addType(createCLATM3HEAmmo()); EquipmentType.addType(createCLATM6Ammo()); EquipmentType.addType(createCLATM6ERAmmo()); EquipmentType.addType(createCLATM6HEAmmo()); EquipmentType.addType(createCLATM9Ammo()); EquipmentType.addType(createCLATM9ERAmmo()); EquipmentType.addType(createCLATM9HEAmmo()); EquipmentType.addType(createCLATM12Ammo()); EquipmentType.addType(createCLATM12ERAmmo()); EquipmentType.addType(createCLATM12HEAmmo()); EquipmentType.addType(createCLStreakLRM5Ammo()); EquipmentType.addType(createCLStreakLRM10Ammo()); EquipmentType.addType(createCLStreakLRM15Ammo()); EquipmentType.addType(createCLStreakLRM20Ammo()); EquipmentType.addType(createCLSRT1Ammo()); EquipmentType.addType(createCLSRT2Ammo()); EquipmentType.addType(createCLSRT3Ammo()); EquipmentType.addType(createCLSRT4Ammo()); EquipmentType.addType(createCLSRT5Ammo()); EquipmentType.addType(createCLSRT6Ammo()); EquipmentType.addType(createCLLRT1Ammo()); EquipmentType.addType(createCLLRT2Ammo()); EquipmentType.addType(createCLLRT3Ammo()); EquipmentType.addType(createCLLRT4Ammo()); EquipmentType.addType(createCLLRT5Ammo()); EquipmentType.addType(createCLLRT6Ammo()); EquipmentType.addType(createCLLRT7Ammo()); EquipmentType.addType(createCLLRT8Ammo()); EquipmentType.addType(createCLLRT9Ammo()); EquipmentType.addType(createCLLRT10Ammo()); EquipmentType.addType(createCLLRT11Ammo()); EquipmentType.addType(createCLLRT12Ammo()); EquipmentType.addType(createCLLRT13Ammo()); EquipmentType.addType(createCLLRT14Ammo()); EquipmentType.addType(createCLLRT15Ammo()); EquipmentType.addType(createCLLRT16Ammo()); EquipmentType.addType(createCLLRT17Ammo()); EquipmentType.addType(createCLLRT18Ammo()); EquipmentType.addType(createCLLRT19Ammo()); EquipmentType.addType(createCLLRT20Ammo()); EquipmentType.addType(createCLMagshotGRAmmo()); EquipmentType.addType(createCLMPodAmmo()); EquipmentType.addType(createCLHAG20Ammo()); EquipmentType.addType(createCLHAG30Ammo()); EquipmentType.addType(createCLHAG40Ammo()); base = createCLLongTomAmmo(); clanArtyAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLSniperAmmo(); clanArtyAmmos.addElement( base ); base = createCLThumperAmmo(); EquipmentType.addType( base ); clanArtyAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLArrowIVAmmo(); clanArrowAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLSRM1Ammo(); clanSrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLSRM2Ammo(); clanSrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLSRM3Ammo(); clanSrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLSRM4Ammo(); clanSrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLSRM5Ammo(); clanSrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLSRM6Ammo(); clanSrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM1Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM2Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM3Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM4Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM5Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM6Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM7Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM8Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM9Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM10Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM11Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM12Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM13Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM14Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM15Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM16Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM17Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM18Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM19Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM20Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); // Start of BattleArmor ammo// EquipmentType.addType( createBAInfernoSRMAmmo() ); EquipmentType.addType( createBAMicroBombAmmo() ); EquipmentType.addType( createCLTorpedoLRM5Ammo() );// EquipmentType.addType( createFenrirSRM4Ammo() ); EquipmentType.addType( createBACompactNarcAmmo() ); EquipmentType.addType( createBAMineLauncherAmmo() ); EquipmentType.addType( createBALRM5Ammo() );// EquipmentType.addType( createPhalanxSRM4Ammo() );// EquipmentType.addType( createGrenadierSRM4Ammo() );// EquipmentType.addType( createBAInfernoSRMAmmo() ); EquipmentType.addType( createAdvancedSRM1Ammo() ); EquipmentType.addType( createAdvancedSRM2Ammo() ); EquipmentType.addType( createAdvancedSRM3Ammo() ); EquipmentType.addType( createAdvancedSRM4Ammo() ); EquipmentType.addType( createAdvancedSRM5Ammo() ); EquipmentType.addType( createAdvancedSRM6Ammo() ); EquipmentType.addType( createBARL1Ammo() ); EquipmentType.addType( createBARL2Ammo() ); EquipmentType.addType( createBARL3Ammo() ); EquipmentType.addType( createBARL4Ammo() ); EquipmentType.addType( createBARL5Ammo() ); base = createISMRM1Ammo(); baMrmAmmos.add(base); EquipmentType.addType( base ); base = createISMRM2Ammo(); baMrmAmmos.add(base); EquipmentType.addType( base ); base = createISMRM3Ammo(); baMrmAmmos.add(base); EquipmentType.addType( base ); base = createISMRM4Ammo(); baMrmAmmos.add(base); EquipmentType.addType( base ); base = createISMRM5Ammo(); baMrmAmmos.add(base); EquipmentType.addType( base ); base = createBAISLRM1Ammo(); isBaLrmAmmos.add(base); EquipmentType.addType( base ); base = createBAISLRM2Ammo(); isBaLrmAmmos.add(base); EquipmentType.addType( base ); base = createBAISLRM3Ammo(); isBaLrmAmmos.add(base); EquipmentType.addType( base ); base = createBAISLRM4Ammo(); isBaLrmAmmos.add(base); EquipmentType.addType( base ); base = createBAISLRM5Ammo(); clanBaLrmAmmos.add(base); EquipmentType.addType( base ); base = createBACLLRM1Ammo(); clanBaLrmAmmos.add(base); EquipmentType.addType( base ); base = createBACLLRM2Ammo(); clanBaLrmAmmos.add(base); EquipmentType.addType( base ); base = createBACLLRM3Ammo(); clanBaLrmAmmos.add(base); EquipmentType.addType( base ); base = createBACLLRM4Ammo(); clanBaLrmAmmos.add(base); EquipmentType.addType( base ); base = createBACLLRM5Ammo(); clanBaLrmAmmos.add(base); EquipmentType.addType( base ); base = createBASRM1Ammo(); baSrmAmmos.add(base); EquipmentType.addType( base ); base = createBASRM2Ammo(); baSrmAmmos.add(base); EquipmentType.addType( base ); base = createBASRM3Ammo(); baSrmAmmos.add(base); EquipmentType.addType( base ); base = createBASRM4Ammo(); baSrmAmmos.add(base); EquipmentType.addType( base ); base = createBASRM5Ammo(); baSrmAmmos.add(base); EquipmentType.addType( base ); base = createBASRM6Ammo(); baSrmAmmos.add(base); EquipmentType.addType( base ); base = createBASRM2OSAmmo(); baSrmAmmos.add(base); EquipmentType.addType( base ); // Protomech-specific ammo EquipmentType.addType(createCLPROHeavyMGAmmo()); EquipmentType.addType(createCLPROMGAmmo()); EquipmentType.addType(createCLPROLightMGAmmo()); // Create the munition types for IS SRM launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Inferno", 1, M_INFERNO, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Fragmentation", 1, M_FRAGMENTATION, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Narc-capable", 1, M_NARC_CAPABLE, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Artemis-capable", 1, M_ARTEMIS_CAPABLE, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Listen-Kill", 1, M_LISTEN_KILL, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Anti-TSM", 1, M_ANTI_TSM, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Acid", 1, M_AX_HEAD, TechConstants.T_IS_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = srmAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for Clan SRM launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "(Clan) Inferno", 1, M_INFERNO, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Fragmentation", 1, M_FRAGMENTATION, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Narc-capable", 1, M_NARC_CAPABLE, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Artemis-capable", 1, M_ARTEMIS_CAPABLE, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Listen-Kill", 1, M_LISTEN_KILL, TechConstants.T_CLAN_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "(Clan) Anti-TSM", 1, M_ANTI_TSM, TechConstants.T_CLAN_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "(Clan) Acid", 1, M_AX_HEAD, TechConstants.T_CLAN_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = clanSrmAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for BA SRM launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Inferno", 1, M_INFERNO, TechConstants.T_ALLOWED_ALL ) ); munitions.addElement( new MunitionMutator( "Torpedo", 1, M_TORPEDO, TechConstants.T_ALLOWED_ALL ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = baSrmAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for BA MRM launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Torpedo", 1, M_TORPEDO, TechConstants.T_IS_LEVEL_2 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = baMrmAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for IS BA LRM launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Torpedo", 1, M_TORPEDO, TechConstants.T_IS_LEVEL_2 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = isBaLrmAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for clan BA LRM launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Multi-Purpose", 1, M_MULTI_PURPOSE, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Torpedo", 1, M_TORPEDO, TechConstants.T_CLAN_LEVEL_2 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = clanBaLrmAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for IS LRM launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Flare", 1, M_FLARE, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Fragmentation", 1, M_FRAGMENTATION, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder", 1, M_THUNDER, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder-Augmented", 2, M_THUNDER_AUGMENTED, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder-Inferno", 2, M_THUNDER_INFERNO, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder-Active", 2, M_THUNDER_ACTIVE, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder-Vibrabomb", 2, M_THUNDER_VIBRABOMB, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Narc-capable", 1, M_NARC_CAPABLE, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Artemis-capable", 1, M_ARTEMIS_CAPABLE, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Semi-guided", 1, M_SEMIGUIDED, TechConstants.T_IS_LEVEL_2) ); munitions.addElement( new MunitionMutator( "Swarm", 1, M_SWARM, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Swarm-I", 1, M_SWARM_I, TechConstants.T_IS_LEVEL_2) ); munitions.addElement( new MunitionMutator( "Listen-Kill", 1, M_LISTEN_KILL, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Anti-TSM", 1, M_ANTI_TSM, TechConstants.T_IS_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = lrmAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for Clan LRM launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "(Clan) Flare", 1, M_FLARE, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Fragmentation", 1, M_FRAGMENTATION, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Thunder", 1, M_THUNDER, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Thunder-Augmented", 2, M_THUNDER_AUGMENTED, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Thunder-Inferno", 2, M_THUNDER_INFERNO, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Thunder-Active", 2, M_THUNDER_ACTIVE, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Thunder-Vibrabomb", 2, M_THUNDER_VIBRABOMB, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Narc-capable", 1, M_NARC_CAPABLE, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Artemis-capable", 1, M_ARTEMIS_CAPABLE, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Semi-guided", 1, M_SEMIGUIDED, TechConstants.T_CLAN_LEVEL_2) ); munitions.addElement( new MunitionMutator( "(Clan) Swarm", 1, M_SWARM, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "(Clan) Swarm-I", 1, M_SWARM_I, TechConstants.T_CLAN_LEVEL_2) ); munitions.addElement( new MunitionMutator( "(Clan) Listen-Kill", 1, M_LISTEN_KILL, TechConstants.T_CLAN_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "(Clan) Anti-TSM", 1, M_ANTI_TSM, TechConstants.T_CLAN_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = clanLrmAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for AC rounds. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Precision", 2, M_PRECISION, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Armor-Piercing", 2, M_ARMOR_PIERCING, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Flechette", 1, M_FLECHETTE, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Incendiary", 1, M_INCENDIARY_AC, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Tracer", 1, M_TRACER, TechConstants.T_IS_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = acAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for IS Arrow IV launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Homing", 1, M_HOMING, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "FASCAM", 1, M_FASCAM, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Inferno-IV", 1, M_INFERNO_IV, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Vibrabomb-IV", 1, M_VIBRABOMB_IV, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Illumination", 1, M_FLARE, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Cluster", 1, M_CLUSTER, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Davy Crockett-M", 5, M_DAVY_CROCKETT_M, TechConstants.T_IS_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = arrowAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for clan Arrow IV launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Homing", 1, M_HOMING, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "FASCAM", 1, M_FASCAM, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Inferno-IV", 1, M_INFERNO_IV, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Vibrabomb-IV", 1, M_VIBRABOMB_IV, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Davy Crockett-M", 5, M_DAVY_CROCKETT_M, TechConstants.T_CLAN_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Illumination", 1, M_FLARE, TechConstants.T_CLAN_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Cluster", 1, M_CLUSTER, TechConstants.T_CLAN_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = clanArrowAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for Artillery launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Smoke", 1, M_SMOKE, TechConstants.T_IS_LEVEL_2 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = thumperAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // extra level 3 ammo for sniper & long tom but not thumper munitions.addElement( new MunitionMutator( "Copperhead", 1, M_HOMING, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Illumination", 1, M_FLARE, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Cluster", 1, M_CLUSTER, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Flechette", 1, M_FLECHETTE, TechConstants.T_IS_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = artyAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Make Davy Crockett-Ms for Long Toms, but not Thumper or Sniper. base = createISLongTomAmmo(); mutator = new MunitionMutator( "Davy Crockett-M", 5, M_DAVY_CROCKETT_M, TechConstants.T_IS_LEVEL_3 ); EquipmentType.addType( mutator.createMunitionType( base ) ); // Create the munition types for Clan Artillery launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "(Clan) Smoke", 1, M_SMOKE, TechConstants.T_CLAN_LEVEL_2 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = clanArtyAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // cache types that share a launcher for loadout purposes for (Enumeration e = EquipmentType.getAllTypes(); e.hasMoreElements(); ) { EquipmentType et = (EquipmentType)e.nextElement(); if (! (et instanceof AmmoType)) { continue; } AmmoType at = (AmmoType)et; int nType = at.getAmmoType(); if (m_vaMunitions[nType] == null) { m_vaMunitions[nType] = new Vector(); } m_vaMunitions[nType].addElement(at); } } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/b5ae19f500a0028bb6f5abe1719f7d2bb21a4992/AmmoType.java/buggy/megamek/src/megamek/common/AmmoType.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
4046,
2016,
1435,
288,
3639,
368,
7074,
13200,
434,
326,
348,
8717,
471,
511,
8717,
2125,
26719,
358,
999,
358,
752,
312,
318,
5029,
18,
3639,
5589,
272,
8864,
37,
7020,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
4046,
2016,
1435,
288,
3639,
368,
7074,
13200,
434,
326,
348,
8717,
471,
511,
8717,
2125,
26719,
358,
999,
358,
752,
312,
318,
5029,
18,
3639,
5589,
272,
8864,
37,
7020,
... |
PsiType unwrappedType = type; | private void createClassObjectAccessSynthetics(PsiType type){ if(!classObjectAccessExpression){ final MemberSignature syntheticMethod = MemberSignature.getClassAccessMethodMemberSignature(); nonPrivateMethods.add(syntheticMethod); } final StringBuffer fieldNameBuffer; PsiType unwrappedType = type; if(type instanceof PsiArrayType){ fieldNameBuffer = new StringBuffer("array"); while(unwrappedType instanceof PsiArrayType){ final PsiArrayType arrayType = (PsiArrayType) unwrappedType; unwrappedType = arrayType.getComponentType(); fieldNameBuffer.append("$"); } } else{ fieldNameBuffer = new StringBuffer(CLASS_ACCESS_METHOD_PREFIX); } if(unwrappedType instanceof PsiPrimitiveType){ final PsiPrimitiveType primitiveType = (PsiPrimitiveType) unwrappedType; fieldNameBuffer.append(MemberSignature.createPrimitiveType(primitiveType)); } else{ final String text = unwrappedType.getCanonicalText().replace('.', '$'); fieldNameBuffer.append(text); } final String fieldName = fieldNameBuffer.toString(); final MemberSignature memberSignature = new MemberSignature(fieldName, Modifier.STATIC, "Ljava/lang/Class;"); if(!nonPrivateFields.contains(memberSignature)){ nonPrivateFields.add(memberSignature); } classObjectAccessExpression = true; } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/fca4a2a7b3bb9b4ae2848f026d06eb262318948d/SerialVersionUIDBuilder.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/fixes/SerialVersionUIDBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
752,
797,
921,
1862,
10503,
451,
278,
2102,
12,
52,
7722,
559,
618,
15329,
3639,
309,
12,
5,
1106,
921,
1862,
2300,
15329,
5411,
727,
8596,
5374,
25535,
1305,
273,
10792,
8596,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
752,
797,
921,
1862,
10503,
451,
278,
2102,
12,
52,
7722,
559,
618,
15329,
3639,
309,
12,
5,
1106,
921,
1862,
2300,
15329,
5411,
727,
8596,
5374,
25535,
1305,
273,
10792,
8596,... | |
try { peek0 = reader.read (); peek1 = reader.read (); } catch (IOException e) { throw new XmlPullParserException (e.toString (), e); } eof = peek0 == -1; | srcPos = 0; srcCount = 0; peekCount = 0; depth = 0; | public void setInput (Reader reader) throws XmlPullParserException{ this.reader = reader; if (reader == null) return; try { peek0 = reader.read (); peek1 = reader.read (); } catch (IOException e) { throw new XmlPullParserException (e.toString (), e); } eof = peek0 == -1; entityMap = new Hashtable (); entityMap.put ("amp", "&"); entityMap.put ("apos", "'"); entityMap.put ("gt", ">"); entityMap.put ("lt", "<"); entityMap.put ("quot", "\""); line = 1; column = 1; } | 4761 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4761/beb5debaba5bf33c4928b9493eae5185a841de4d/KXmlParser.java/buggy/src/org/kxml2/io/KXmlParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
21687,
261,
2514,
2949,
13,
225,
1216,
5714,
9629,
25746,
95,
202,
2211,
18,
10530,
273,
2949,
31,
202,
202,
430,
261,
10530,
422,
446,
13,
327,
31,
202,
698,
288,
202,
565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21687,
261,
2514,
2949,
13,
225,
1216,
5714,
9629,
25746,
95,
202,
2211,
18,
10530,
273,
2949,
31,
202,
202,
430,
261,
10530,
422,
446,
13,
327,
31,
202,
698,
288,
202,
565,
... |
for (int i = 0; i < weights.length; i++) { if (sizes[i] == 0) totalWeight -= weights[i]; } | private void calcCellSizes (int[] sizes, double[] weights, int range) { int totalSize = sumIntArray (sizes); double totalWeight = sumDoubleArray (weights); // Rows or columns with size 0 should not be weighted in the calculation. for (int i = 0; i < weights.length; i++) { if (sizes[i] == 0) totalWeight -= weights[i]; } int diff = range - totalSize; if (diff == 0) return; for (int i = 0; i < sizes.length; i++) { // A row or column with zero size cannot all of a sudden gain size. if (sizes[i] != 0.0) { int newsize = (int) (sizes[i] + (((double) diff) * weights [i] / totalWeight )); if (newsize > 0) sizes[i] = newsize; } } } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/139673d1462e3b9367f1a44174c130c3ed3e4e7b/GridBagLayout.java/clean/libraries/javalib/java/awt/GridBagLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
7029,
4020,
11923,
261,
474,
8526,
8453,
16,
1645,
8526,
5376,
16,
509,
1048,
13,
565,
288,
1377,
509,
24611,
273,
2142,
1702,
1076,
261,
11914,
1769,
1377,
1645,
2078,
6544,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
7029,
4020,
11923,
261,
474,
8526,
8453,
16,
1645,
8526,
5376,
16,
509,
1048,
13,
565,
288,
1377,
509,
24611,
273,
2142,
1702,
1076,
261,
11914,
1769,
1377,
1645,
2078,
6544,
2... | |
if (_buffer.length > MAXIMUM_POOLED_BUFFER_LENGTH) { | if (_buffer.length > MAXIMUM_POOLED_BUFFER_LENGTH) { | public void reset() { _offset = 0; if (_buffer.length > MAXIMUM_POOLED_BUFFER_LENGTH) { _buffer = _pooledBuffer; _pooledBuffer = null; if (_buffer == null) { _buffer = new byte[DEFAULT_BUFFER_LENGTH]; } } _length = _buffer.length; } | 12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/9d2c39c906c6955e17daf4ac239b85d4727ddc83/CdrOutputStream.java/buggy/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/CdrOutputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2715,
1435,
288,
3639,
389,
3348,
273,
374,
31,
3639,
309,
261,
67,
4106,
18,
2469,
405,
4552,
18605,
67,
2419,
51,
6687,
67,
11302,
67,
7096,
13,
288,
5411,
389,
4106,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2715,
1435,
288,
3639,
389,
3348,
273,
374,
31,
3639,
309,
261,
67,
4106,
18,
2469,
405,
4552,
18605,
67,
2419,
51,
6687,
67,
11302,
67,
7096,
13,
288,
5411,
389,
4106,
273,
... |
} | } for ( int i = 0; i < columnList.size( ); i++ ) { if ( key.equals( DEUtil.getExpression( columnList.get( i ) ) ) ) { keyChooser.select( i ); return; } } | private void setKeyExpression( String key ) { keyChooser.deselectAll( ); if ( StringUtil.isBlank( key ) ) { keyChooser.setText( "" ); //$NON-NLS-1$ return; } keyChooser.setText( key ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/fe41084d7e073e09af087e2b25686d11b9d2e8a4/GroupDialog.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/GroupDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
16696,
2300,
12,
514,
498,
262,
202,
95,
202,
202,
856,
17324,
18,
5489,
13759,
1595,
12,
11272,
202,
202,
430,
261,
14205,
18,
291,
7796,
12,
498,
262,
262,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
16696,
2300,
12,
514,
498,
262,
202,
95,
202,
202,
856,
17324,
18,
5489,
13759,
1595,
12,
11272,
202,
202,
430,
261,
14205,
18,
291,
7796,
12,
498,
262,
262,
202,
202,
... |
private JMenu createViewMenu() { final JMenu viewMenu = new JMenu("View"); // View Menu JMenuItem cascadeItem = new JMenuItem("Cascade Windows"); cascadeItem.addActionListener(cascadeAction); cascadeItem.addPropertyChangeListener( new ActionButtonAssociation(cascadeAction,cascadeItem)); viewMenu.add(cascadeItem); JMenuItem tileWindowItem = new JMenuItem("Tile Windows"); tileWindowItem.addActionListener(tileWindowsAction); tileWindowItem.addPropertyChangeListener( new ActionButtonAssociation(tileWindowsAction,tileWindowItem)); viewMenu.add(tileWindowItem); JMenuItem reTileWindowItem = new JMenuItem("Re-Tile Windows"); reTileWindowItem.addActionListener(reTileWindowsAction); reTileWindowItem.addPropertyChangeListener( new ActionButtonAssociation(reTileWindowsAction,reTileWindowItem)); viewMenu.add(reTileWindowItem); viewMenu.addSeparator(); viewMenu.addMenuListener( new MenuListener() { public void menuCanceled(MenuEvent e) {} public void menuDeselected(MenuEvent e) { for(int i = viewMenu.getMenuComponentCount() - 1; i > 2; --i) { viewMenu.remove(i); } } public void menuSelected(MenuEvent e) { JInternalFrame[] frames = DesktopPane.getAllFrames(); for(int i = 0; i < frames.length; ++i) { JMenuItem menuItem = new JMenuItem(frames[i].getTitle()); menuItem.addActionListener(new WindowMenuListener(frames[i])); viewMenu.add(menuItem); } } }); viewMenu.setMnemonic('V'); //cascadeWindowItem.setMnemonic(KeyEvent.VK_C); tileWindowItem.setMnemonic(KeyEvent.VK_T); tileWindowItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T,Event.CTRL_MASK)); reTileWindowItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T,Event.CTRL_MASK | Event.SHIFT_MASK)); return viewMenu; } | 47007 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47007/1b1fc0d1cd3e331f011554311af91290afd09142/MainFrame.java/buggy/OldSoar/trunk/visualsoar/Source/edu/umich/visualsoar/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
46,
4599,
2640,
1767,
4599,
1435,
95,
202,
202,
6385,
46,
4599,
1945,
4599,
33,
2704,
46,
4599,
2932,
1767,
8863,
202,
202,
759,
1767,
4599,
202,
202,
46,
12958,
22277,
1180,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
46,
4599,
2640,
1767,
4599,
1435,
95,
202,
202,
6385,
46,
4599,
1945,
4599,
33,
2704,
46,
4599,
2932,
1767,
8863,
202,
202,
759,
1767,
4599,
202,
202,
46,
12958,
22277,
1180,
... | ||
public void saveFormToModel(Widget frmModel, JXPathContext jxpc) { JXPathContext subContext = jxpc.getRelativeContext(jxpc.getPointer(this.xpath)); | public void saveFormToModel(Widget frmModel, JXPathContext jxpc) throws BindingException { JXPathContext subContext = jxpc.getRelativeContext(jxpc.getPointer(this.xpath)); | public void saveFormToModel(Widget frmModel, JXPathContext jxpc) { JXPathContext subContext = jxpc.getRelativeContext(jxpc.getPointer(this.xpath)); super.saveFormToModel(frmModel, subContext); getLogger().debug("done saving " + toString()); } | 46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/001ca17e1056cac5b60923e7d75ec228a7332bfd/ContextJXPathBinding.java/clean/src/blocks/woody/java/org/apache/cocoon/woody/binding/ContextJXPathBinding.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1923,
1204,
774,
1488,
12,
4609,
31074,
1488,
16,
804,
14124,
1042,
525,
92,
2436,
13,
288,
3639,
804,
14124,
1042,
720,
1042,
273,
5411,
525,
92,
2436,
18,
588,
8574,
1042,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1923,
1204,
774,
1488,
12,
4609,
31074,
1488,
16,
804,
14124,
1042,
525,
92,
2436,
13,
288,
3639,
804,
14124,
1042,
720,
1042,
273,
5411,
525,
92,
2436,
18,
588,
8574,
1042,
... |
public static void setValue(IPreferenceStore store, String name, FontData[] value) { FontData[] oldValue = getFontDataArray(store, name); if(!Arrays.equals(oldValue, value)){ store.putValue(name, getStoredRepresentation(value)); JFaceResources.getFontRegistry().put(name,value); store.firePropertyChangeEvent(name, oldValue, value); } | public static void setValue(IPreferenceStore store, String name, FontData value) { FontData[] data = new FontData[1]; data[0] = value; setValue(store,name,data); | public static void setValue(IPreferenceStore store, String name, FontData[] value) { FontData[] oldValue = getFontDataArray(store, name); // see if the font has changed if(!Arrays.equals(oldValue, value)){ store.putValue(name, getStoredRepresentation(value)); JFaceResources.getFontRegistry().put(name,value); store.firePropertyChangeEvent(name, oldValue, value); }} | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/80cfecc0fb5392981e25acee0f567feb8ed55185/PreferenceConverter.java/buggy/bundles/org.eclipse.ui/Eclipse JFace/org/eclipse/jface/preference/PreferenceConverter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
760,
918,
5524,
12,
45,
9624,
2257,
1707,
16,
514,
508,
16,
10063,
751,
8526,
460,
13,
288,
202,
5711,
751,
8526,
11144,
273,
18776,
751,
1076,
12,
2233,
16,
508,
1769,
202,
759,
2621,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
5524,
12,
45,
9624,
2257,
1707,
16,
514,
508,
16,
10063,
751,
8526,
460,
13,
288,
202,
5711,
751,
8526,
11144,
273,
18776,
751,
1076,
12,
2233,
16,
508,
1769,
202,
759,
2621,... |
eNotify(new ENotificationImpl(this, Notification.UNSET, AttributePackage.BOUNDS__WIDTH, oldWidth, WIDTH_EDEFAULT, oldWidthESet)); | eNotify(new ENotificationImpl(this, Notification.UNSET, AttributePackage.BOUNDS__WIDTH, oldWidth, WIDTH_EDEFAULT, oldWidthESet)); | public void unsetWidth() { double oldWidth = width; boolean oldWidthESet = widthESet; width = WIDTH_EDEFAULT; widthESet = false; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.UNSET, AttributePackage.BOUNDS__WIDTH, oldWidth, WIDTH_EDEFAULT, oldWidthESet)); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/BoundsImpl.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/impl/BoundsImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2646,
2384,
1435,
565,
288,
3639,
1645,
1592,
2384,
273,
1835,
31,
3639,
1250,
1592,
2384,
41,
694,
273,
1835,
41,
694,
31,
3639,
1835,
273,
22631,
67,
11236,
31,
3639,
1835,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2646,
2384,
1435,
565,
288,
3639,
1645,
1592,
2384,
273,
1835,
31,
3639,
1250,
1592,
2384,
41,
694,
273,
1835,
41,
694,
31,
3639,
1835,
273,
22631,
67,
11236,
31,
3639,
1835,
... |
} catch (SecurityException e) { ErrorService.error(e); | public void run() { int tempPort = ConnectionSettings.PORT.getValue(); //0. Get local address. This must be done here because it can // block under certain conditions. // See the notes for _address. try { setAddress(InetAddress.getLocalHost()); } catch (UnknownHostException e) { } catch (SecurityException e) { } // Create the server socket, bind it to a port, and listen for // incoming connections. If there are problems, we can continue // onward. //1. Try suggested port. int oldPort = tempPort; Exception socketError = null; try { setListeningPort(tempPort); _port = tempPort; } catch (IOException e) { socketError = e; //2. Try 20 different ports. The first 10 tries increment //sequentially from 6346. The next 10 tries are random ports between //2000 and 52000 int numToTry = 20; Random gen = null; for (int i=0; i<numToTry; i++) { if(i < 10) tempPort = i+6346; else { if(gen==null) gen = new Random(); tempPort = gen.nextInt(50000); tempPort += 2000;//avoid the first 2000 ports } // do not try to bind to the multicast port. if (tempPort == ConnectionSettings.MULTICAST_PORT.getValue()) { numToTry++; continue; } try { setListeningPort(tempPort); _port = tempPort; break; } catch (IOException e2) { socketError = e2; } } // If we still don't have a socket, there's an error if(_socket == null) { MessageService.showError("ERROR_NO_PORTS_AVAILABLE"); } } socketError = null; if (_port!=oldPort) { ConnectionSettings.PORT.setValue(_port); SettingsHandler.save(); RouterService.addressChanged(); } while (true) { try { //Accept an incoming connection, make it into a //Connection object, handshake, and give it a thread //to service it. If not bound to a port, wait until //we are. If the port is changed while we are //waiting, IOException will be thrown, forcing us to //release the lock. Socket client=null; synchronized (SOCKET_LOCK) { if (_socket!=null) { try { client=_socket.accept(); } catch (IOException e) { continue; } } else { // When the socket lock is notified, the socket will // be available. So, just wait for that to happen and // go around the loop again. try { SOCKET_LOCK.wait(); } catch (InterruptedException e) { } continue; } } //Check if IP address of the incoming socket is in _badHosts InetAddress address = client.getInetAddress(); if (isBannedIP(address.getAddress())) { HTTPStat.BANNED_REQUESTS.incrementStat(); client.close(); continue; } // Set our IP address of the local address of this socket. InetAddress localAddress = client.getLocalAddress(); setAddress( localAddress ); // we have accepted an incoming socket -- only record // that we've accepted incoming if it's definitely // not from our local subnet and we aren't connected to // the host already. if(isOutsideConnection(address)) { synchronized (Acceptor.class) { _acceptedIncoming = true; ConnectionSettings.EVER_ACCEPTED_INCOMING.setValue( _acceptedIncoming); _lastIncomingTime = System.currentTimeMillis(); } } //Dispatch asynchronously. ConnectionDispatchRunner dispatcher = new ConnectionDispatchRunner(client); Thread dispatchThread = new ManagedThread(dispatcher, "ConnectionDispatchRunner"); dispatchThread.setDaemon(true); dispatchThread.start(); } catch (SecurityException e) { ErrorService.error(e); } catch (Throwable e) { ErrorService.error(e); } } } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/54f34db59f64c95e28e4c1bf671a90d07c526373/Acceptor.java/clean/components/gnutella-core/src/main/java/com/limegroup/gnutella/Acceptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
1082,
3639,
509,
1906,
2617,
273,
4050,
2628,
18,
6354,
18,
24805,
5621,
3639,
368,
20,
18,
968,
1191,
1758,
18,
225,
1220,
1297,
506,
2731,
2674,
2724,
518,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
1082,
3639,
509,
1906,
2617,
273,
4050,
2628,
18,
6354,
18,
24805,
5621,
3639,
368,
20,
18,
968,
1191,
1758,
18,
225,
1220,
1297,
506,
2731,
2674,
2724,
518,
... | |
new Pair( INTEGER_TYPE, "java.lang.Object"), new IdentityConverter(Integer.TYPE, Object.class)); | new Pair(INTEGER_TYPE, "java.lang.Object"), new IdentityConverter(Integer.TYPE, Object.class)); | private Map getConverterMap() { // using string-based lookup avoids loading of too many classes if (converterMap == null) { converterMap = new HashMap(); converterMap .put( new Pair("java.util.Date", "java.lang.String"), "org.eclipse.core.databinding.conversion.ConvertDate2String"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ converterMap .put( new Pair("java.lang.String", "java.math.BigDecimal"), "org.eclipse.core.databinding.conversion.ConvertString2BigDecimal"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ converterMap .put( new Pair("java.lang.String", "java.lang.Boolean"), "org.eclipse.core.databinding.conversion.ConvertString2Boolean"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ converterMap .put( new Pair("java.lang.String", "java.lang.Byte"), "org.eclipse.core.databinding.conversion.ConvertString2Byte"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ converterMap .put( new Pair("java.lang.String", "java.lang.Character"), "org.eclipse.core.databinding.conversion.ConvertString2Character"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ converterMap .put( new Pair("java.lang.String", "java.util.Date"), "org.eclipse.core.databinding.conversion.ConvertString2Date"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ converterMap .put( new Pair("java.lang.String", "java.lang.Double"), "org.eclipse.core.databinding.conversion.ConvertString2Double"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ converterMap .put( new Pair("java.lang.String", "java.lang.Float"), "org.eclipse.core.databinding.conversion.ConvertString2Float"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ converterMap .put( new Pair("java.lang.String", "java.lang.Integer"), "org.eclipse.core.databinding.conversion.ConvertString2Integer"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ converterMap .put( new Pair("java.lang.String", "java.lang.Long"), "org.eclipse.core.databinding.conversion.ConvertString2Long"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ converterMap .put( new Pair("java.lang.String", "java.lang.Short"), "org.eclipse.core.databinding.conversion.ConvertString2Short"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ converterMap .put( new Pair("java.lang.Object", "java.lang.String"), "org.eclipse.core.databinding.conversion.ToStringConverter"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ // Integer.TYPE converterMap .put( new Pair( "java.lang.String", INTEGER_TYPE), "org.eclipse.core.databinding.conversion.ConvertString2IntegerPrimitive"); //$NON-NLS-1$ //$NON-NLS-2$ converterMap .put( new Pair( INTEGER_TYPE, "java.lang.Integer"), new IdentityConverter(Integer.TYPE, Integer.class)); //$NON-NLS-1$ converterMap .put( new Pair( INTEGER_TYPE, "java.lang.String"), new ToStringConverter(Integer.TYPE)); //$NON-NLS-1$ converterMap .put( new Pair( INTEGER_TYPE, "java.lang.Object"), new IdentityConverter(Integer.TYPE, Object.class)); //$NON-NLS-1$ // Byte.TYPE converterMap .put( new Pair( "java.lang.String", BYTE_TYPE), "org.eclipse.core.databinding.conversion.ConvertString2BytePrimitive"); //$NON-NLS-1$ //$NON-NLS-2$ converterMap .put( new Pair( BYTE_TYPE, "java.lang.Byte"), new IdentityConverter(Byte.TYPE, Byte.class)); //$NON-NLS-1$ converterMap .put( new Pair( BYTE_TYPE, "java.lang.String"), new ToStringConverter(Byte.TYPE)); //$NON-NLS-1$ converterMap .put( new Pair( BYTE_TYPE, "java.lang.Object"), new IdentityConverter(Byte.TYPE, Object.class)); //$NON-NLS-1$ // Double.TYPE converterMap .put( new Pair( "java.lang.String", DOUBLE_TYPE), "org.eclipse.core.databinding.conversion.ConvertString2DoublePrimitive"); //$NON-NLS-1$ //$NON-NLS-2$ converterMap .put( new Pair( DOUBLE_TYPE, "java.lang.Double"), new IdentityConverter(Double.TYPE, Double.class)); //$NON-NLS-1$ converterMap .put( new Pair( DOUBLE_TYPE, "java.lang.String"), new ToStringConverter(Double.TYPE)); //$NON-NLS-1$ converterMap .put( new Pair( DOUBLE_TYPE, "java.lang.Object"), new IdentityConverter(Double.TYPE, Object.class)); //$NON-NLS-1$ // Boolean.TYPE converterMap .put( new Pair( "java.lang.String", BOOLEAN_TYPE), "org.eclipse.core.databinding.conversion.ConvertString2BooleanPrimitive"); //$NON-NLS-1$ //$NON-NLS-2$ converterMap .put( new Pair( BOOLEAN_TYPE, "java.lang.Boolean"), new IdentityConverter(Boolean.TYPE, Boolean.class)); //$NON-NLS-1$ converterMap .put( new Pair( BOOLEAN_TYPE, "java.lang.String"), new ToStringConverter(Boolean.TYPE)); //$NON-NLS-1$ converterMap .put( new Pair( BOOLEAN_TYPE, "java.lang.Object"), new IdentityConverter(Boolean.TYPE, Object.class)); //$NON-NLS-1$ // Float.TYPE converterMap .put( new Pair( "java.lang.String", FLOAT_TYPE), "org.eclipse.core.databinding.conversion.ConvertString2FloatPrimitive"); //$NON-NLS-1$ //$NON-NLS-2$ converterMap .put( new Pair( FLOAT_TYPE, "java.lang.Float"), new IdentityConverter(Float.TYPE, Float.class)); //$NON-NLS-1$ converterMap .put( new Pair( FLOAT_TYPE, "java.lang.String"), new ToStringConverter(Float.TYPE)); //$NON-NLS-1$ converterMap .put( new Pair( FLOAT_TYPE, "java.lang.Object"), new IdentityConverter(Float.TYPE, Object.class)); //$NON-NLS-1$ // Short.TYPE converterMap .put( new Pair( "java.lang.String", SHORT_TYPE), "org.eclipse.core.databinding.conversion.ConvertString2ShortPrimitive"); //$NON-NLS-1$ //$NON-NLS-2$ converterMap .put( new Pair( SHORT_TYPE, "java.lang.Short"), new IdentityConverter(Short.TYPE, Short.class)); //$NON-NLS-1$ converterMap .put( new Pair( SHORT_TYPE, "java.lang.String"), new ToStringConverter(Short.TYPE)); //$NON-NLS-1$ converterMap .put( new Pair( SHORT_TYPE, "java.lang.Object"), new IdentityConverter(Short.TYPE, Object.class)); //$NON-NLS-1$ // Long.TYPE converterMap .put( new Pair( "java.lang.String", LONG_TYPE), "org.eclipse.core.databinding.conversion.ConvertString2LongPrimitive"); //$NON-NLS-1$ //$NON-NLS-2$ converterMap .put( new Pair( LONG_TYPE, "java.lang.Long"), new IdentityConverter(Long.TYPE, Long.class)); //$NON-NLS-1$ converterMap .put( new Pair( LONG_TYPE, "java.lang.String"), new ToStringConverter(Long.TYPE)); //$NON-NLS-1$ converterMap .put( new Pair( LONG_TYPE, "java.lang.Object"), new IdentityConverter(Long.TYPE, Object.class)); //$NON-NLS-1$ } return converterMap; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/646de6c1228ca0820a97e225df84d75e3993e272/DefaultBindSupportFactory.java/buggy/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DefaultBindSupportFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1635,
31173,
863,
1435,
288,
202,
202,
759,
1450,
533,
17,
12261,
3689,
24192,
7153,
434,
4885,
4906,
3318,
202,
202,
430,
261,
15747,
863,
422,
446,
13,
288,
1082,
202,
15747,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1635,
31173,
863,
1435,
288,
202,
202,
759,
1450,
533,
17,
12261,
3689,
24192,
7153,
434,
4885,
4906,
3318,
202,
202,
430,
261,
15747,
863,
422,
446,
13,
288,
1082,
202,
15747,... |
public void addDest(int tile) { destinations.add(new Integer(tile)); | public void addDest(FlatNode to) { destinations.add(to); size++; | public void addDest(int tile) { destinations.add(new Integer(tile)); } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/bf3cd0b8b30c64241bebf719525dda92976ec634/SwitchScheduleNode.java/buggy/streams/src/at/dms/kjc/raw/SwitchScheduleNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
9378,
12,
474,
4769,
13,
288,
202,
10488,
10144,
18,
1289,
12,
2704,
2144,
12,
15368,
10019,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
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,
527,
9378,
12,
474,
4769,
13,
288,
202,
10488,
10144,
18,
1289,
12,
2704,
2144,
12,
15368,
10019,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Object o = jdkFieldAcc.get(null); | /* Consistency check. */ if (jdkFieldAcc == null) fail("internal inconistency: jdkFieldAcc == null"); int modifs = jdkFieldAcc.getModifiers(); /* This crash, realistically, should never occur. */ if (! Modifier.isStatic(modifs)) fail("Consistency failure: About to try to access an instance field (via jdkFieldAcc) as if it were a static one! The culprit is the field " + jdkFieldAcc.toString()); Object o; try { o = jdkFieldAcc.get(null); } catch (NullPointerException npe) { fail("Got a NullPointerException while using reflection to retrieve the value of the field " + jdkFieldAcc.toString() + ": " + npe.toString()); o = null; } | public static void createBootImageObjects(Vector typeNames, String bootImageTypeNamesFile) throws IllegalAccessException, ClassNotFoundException { VM_Callbacks.notifyBootImage(typeNames.elements()); long startTime = 0; long stopTime = 0; // // Create types. // if (verbose >= 1) say("loading"); if (profile) startTime = System.currentTimeMillis(); for (Enumeration e = typeNames.elements(); e.hasMoreElements(); ) { // // get type name // String typeName = (String) e.nextElement(); if (verbose >= 4) say("typeName:", typeName); // // create corresponding rvm type // VM_Type type; try { VM_TypeReference tRef = VM_TypeReference.findOrCreate(typeName); type = tRef.resolve(); } catch (NoClassDefFoundError ncdf) { ncdf.printStackTrace(); fail(bootImageTypeNamesFile + " contains a class named \"" + typeName + "\", but we can't find a class with that name: " + ncdf); return; // NOTREACHED } catch (IllegalArgumentException ila) { /* We should've caught any illegal type names at the data validation * stage, when we read these in. If not, though, * VM_TypeReference.findOrCreate() will do its own sanity check. */ ila.printStackTrace(); fail(bootImageTypeNamesFile + " is supposed to contain type names. It contains \"" + typeName + "\", which does not parse as a legal type name: " + ila); return; // NOTREACHED } type.markAsBootImageClass(); // // convert type name from internal form to external form // ie: Ljava/lang/Object; --> java.lang.Object // [Ljava/lang/Object; --> [Ljava.lang.Object; // // NOTE: duplicate functionality. There is a method that does the same. // typeName = typeName.replace('/','.'); if (typeName.startsWith("L")) typeName = typeName.substring(1, typeName.length() - 1); // // record name/type pair for later lookup by getRvmType() // bootImageTypes.put(typeName, type); } if (profile) { stopTime = System.currentTimeMillis(); System.out.println("PROF: \tloading types "+(stopTime-startTime)+" ms"); } if (verbose >= 1) say(String.valueOf(bootImageTypes.size()), " types"); // // Lay out fields and method tables. // if (profile) startTime = System.currentTimeMillis(); if (verbose >= 1) say("resolving"); for (Enumeration e = bootImageTypes.elements(); e.hasMoreElements(); ) { VM_Type type = (VM_Type) e.nextElement(); if (verbose >= 2) say("resolving " + type); // The resolution is supposed to be cached already. type.resolve(); } if (profile) { stopTime = System.currentTimeMillis(); System.out.println("PROF: \tresolving types "+(stopTime-startTime)+" ms"); } // Set tocRegister early so opt compiler can access it to // perform fixed_jtoc optimization (compile static addresses into code). // In the boot image, the bootrecord comes first followed by a VM_Address array and then the TOC. // To do this, we must fully simulate the alignment logic in the allocation code! VM_BootRecord bootRecord = VM_BootRecord.the_boot_record; VM_Class rvmBRType = getRvmType(bootRecord.getClass()).asClass(); VM_Array intArrayType = VM_Array.getPrimitiveArrayType(10); VM_Address bp = bootImageAddress.add(rvmBRType.getInstanceSize()); int align = VM_ObjectModel.getAlignment(intArrayType); int offset = VM_ObjectModel.getOffsetForAlignment(intArrayType); int mod = bp.add(offset).toInt() & (align-1); int delta = (align - mod) & (align-1); bootRecord.tocRegister = bp.add(delta).add(intArrayType.getInstanceSize(0)); // // Compile methods and populate jtoc with literals, TIBs, and machine code. // if (profile) startTime = System.currentTimeMillis(); if (verbose >= 1) say("instantiating"); if (PARALLELIZE < 1) { int count = 0; for (Enumeration e = bootImageTypes.elements(); e.hasMoreElements(); ) { VM_Type type = (VM_Type) e.nextElement(); count++; if (verbose >= 1) say(count + " instantiating " + type); long start2 = System.currentTimeMillis(); type.instantiate(); long stop2 = System.currentTimeMillis(); if (profile && stop2 - start2 > classCompileThreshold) System.out.println("PROF:\t\t"+type+" took "+((stop2 - start2+500)/1000)+" seconds to instantiate"); } } else { if (verbose >= 1) say("parallelizing with " + PARALLELIZE + " threads"); BootImageWorker.startup(bootImageTypes.elements()); BootImageWorker [] workers = new BootImageWorker[PARALLELIZE]; for (int i=0; i<workers.length; i++) { workers[i].id = i; workers[i].start(); } try { for (int i=0; i<workers.length; i++) workers[i].join(); } catch (InterruptedException ie) { say("InterruptedException while instantiating"); } } if (profile) { stopTime = System.currentTimeMillis(); System.out.println("PROF: \tinstantiating types "+(stopTime-startTime)+" ms"); } // Do the portion of JNIEnvironment initialization that can be done // at bootimage writing time. VM_CodeArray[] functionTable = BuildJNIFunctionTable.buildTable(); VM_JNIEnvironment.initFunctionTable(functionTable); // // Collect the VM class Field to JDK class Field correspondence // This will be needed when building the images of each object instance // and for processing the static fields of the boot image classes // if (verbose >= 1) say("field info gathering"); if (profile) startTime = System.currentTimeMillis(); bootImageTypeFields = new HashMap(bootImageTypes.size()); // First retrieve the jdk Field table for each class of interest for (Enumeration e = bootImageTypes.elements(); e.hasMoreElements(); ) { VM_Type rvmType = (VM_Type) e.nextElement(); FieldInfo fieldInfo; if (!rvmType.isClassType()) continue; // arrays and primitives have no static or instance fields Class jdkType = getJdkType(rvmType); if (jdkType == null) continue; // won't need the field info Key key = new Key(jdkType); fieldInfo = (FieldInfo)bootImageTypeFields.get(key); if (fieldInfo != null) { fieldInfo.rvmType = rvmType; } else { if (verbose >= 1) say("making fieldinfo for " + rvmType); fieldInfo = new FieldInfo(); fieldInfo.jdkFields = jdkType.getDeclaredFields(); fieldInfo.jdkType = jdkType; fieldInfo.rvmType = rvmType; bootImageTypeFields.put(key, fieldInfo); // Now do all the superclasses if they don't already exist // Can't add them in next loop as Iterator's don't allow updates to collection for (Class cls = jdkType.getSuperclass(); cls != null; cls = cls.getSuperclass()) { key = new Key(cls); fieldInfo = (FieldInfo)bootImageTypeFields.get(key); if (fieldInfo != null) { break; } else { if (verbose >= 1) say("making fieldinfo for " + jdkType); fieldInfo = new FieldInfo(); fieldInfo.jdkFields = cls.getDeclaredFields(); fieldInfo.jdkType = cls; fieldInfo.rvmType = null; bootImageTypeFields.put(key, fieldInfo); } } } } // Now build the one-to-one instance and static field maps for (Iterator iter = bootImageTypeFields.values().iterator(); iter.hasNext();) { FieldInfo fieldInfo = (FieldInfo)iter.next(); VM_Type rvmType = fieldInfo.rvmType; if (rvmType == null) { if (verbose >= 1) say("bootImageTypeField entry has no rvmType:"+fieldInfo.jdkType); continue; } Class jdkType = fieldInfo.jdkType; if (verbose >= 1) say("building static and instance fieldinfo for " + rvmType); // First the static fields // VM_Field rvmFields[] = rvmType.getStaticFields(); fieldInfo.jdkStaticFields = new Field[rvmFields.length]; for (int j = 0; j < rvmFields.length; j++) { String rvmName = rvmFields[j].getName().toString(); for (int k = 0; k < fieldInfo.jdkFields.length; k++) { Field f = fieldInfo.jdkFields[k]; if (f.getName().equals(rvmName)) { fieldInfo.jdkStaticFields[j] = f; f.setAccessible(true); break; } } } // Now the instance fields // rvmFields = rvmType.getInstanceFields(); fieldInfo.jdkInstanceFields = new Field[rvmFields.length]; for (int j = 0; j<rvmFields.length; j++) { String rvmName = rvmFields[j].getName().toString(); // We look only in the JDK type that corresponds to the // VM_Type of the field's declaring class. // This is the only way to correctly handle private fields. jdkType = getJdkType(rvmFields[j].getDeclaringClass()); if (jdkType == null) continue; FieldInfo jdkFieldInfo = (FieldInfo)bootImageTypeFields.get(new Key(jdkType)); if (jdkFieldInfo == null) continue; Field[] jdkFields = jdkFieldInfo.jdkFields; for (int k = 0; k <jdkFields.length; k++) { Field f = jdkFields[k]; if (f.getName().equals(rvmName)) { fieldInfo.jdkInstanceFields[j] = f; f.setAccessible(true); break; } } } } if (profile) { stopTime = System.currentTimeMillis(); System.out.println("PROF: \tcreating type mapping "+(stopTime-startTime)+" ms"); } // // Create stack, thread, and processor context in which rvm will begin // execution. // int initProc = VM_Scheduler.PRIMORDIAL_PROCESSOR_ID; VM_Thread startupThread = new VM_Thread(new byte[STACK_SIZE_BOOT]); VM_Scheduler.processors[initProc].activeThread = startupThread; // sanity check for bootstrap loader int idx = startupThread.stack.length - 1; if (VM.LittleEndian) { startupThread.stack[idx--] = (byte)0xde; startupThread.stack[idx--] = (byte)0xad; startupThread.stack[idx--] = (byte)0xba; startupThread.stack[idx--] = (byte)0xbe; } else { startupThread.stack[idx--] = (byte)0xbe; startupThread.stack[idx--] = (byte)0xba; startupThread.stack[idx--] = (byte)0xad; startupThread.stack[idx--] = (byte)0xde; } // // Tell rvm where to find itself at execution time. // This may not be the same place it was at build time, ie. if image is // moved to another machine with different directory structure. // VM_ClassLoader.setVmRepositories(bootImageRepositoriesAtExecutionTime); // // Finally, populate jtoc with static field values. // This is equivalent to the VM_Class.initialize() phase that would have // executed each class's static constructors at run time. We simulate // this by copying statics created in the host rvm into the appropriate // slots of the jtoc. // if (verbose >= 1) say("populating jtoc with static fields"); if (profile) startTime = System.currentTimeMillis(); for (Enumeration e = bootImageTypes.elements(); e.hasMoreElements(); ) { VM_Type rvmType = (VM_Type) e.nextElement(); if (verbose >= 1) say(" jtoc for ", rvmType.toString()); if (!rvmType.isClassType()) continue; // arrays and primitives have no static fields Class jdkType = getJdkType(rvmType); if (jdkType == null && verbose >= 1) { say("host has no class \"" + rvmType + "\""); } VM_Field rvmFields[] = rvmType.getStaticFields(); for (int j = 0; j < rvmFields.length; ++j) { VM_Field rvmField = rvmFields[j]; VM_TypeReference rvmFieldType = rvmField.getType(); int rvmFieldSlot = (rvmField.getOffset() >>> 2); String rvmFieldName = rvmField.getName().toString(); Field jdkFieldAcc = null; if (jdkType != null) jdkFieldAcc = getJdkFieldAccessor(jdkType, j, STATIC_FIELD); if (jdkFieldAcc == null) { if (jdkType != null) { if (verbose >= 2) traceContext.push(rvmFieldType.toString(), jdkType.getName(), rvmFieldName); if (verbose >= 2) traceContext.traceFieldNotInHostJdk(); if (verbose >= 2) traceContext.pop(); } VM_Statics.setSlotContents(rvmFieldSlot, 0); if (!VM.runningTool) bootImage.countNulledReference(); continue; } if (verbose >= 2) say(" populating jtoc slot ", String.valueOf(rvmFieldSlot), " with ", rvmField.toString()); if (rvmFieldType.isPrimitiveType()) { // field is logical or numeric type if (rvmFieldType.isBooleanType()) { VM_Statics.setSlotContents(rvmFieldSlot, jdkFieldAcc.getBoolean(null) ? 1 : 0); } else if (rvmFieldType.isByteType()) { VM_Statics.setSlotContents(rvmFieldSlot, jdkFieldAcc.getByte(null)); } else if (rvmFieldType.isCharType()) { VM_Statics.setSlotContents(rvmFieldSlot, jdkFieldAcc.getChar(null)); } else if (rvmFieldType.isShortType()) { VM_Statics.setSlotContents(rvmFieldSlot, jdkFieldAcc.getShort(null)); } else if (rvmFieldType.isIntType()) { try { VM_Statics.setSlotContents(rvmFieldSlot, jdkFieldAcc.getInt(null)); } catch (IllegalArgumentException ex) { System.err.println( "type " + rvmType + ", field " + rvmField); throw ex; } } else if (rvmFieldType.isLongType()) { // note: Endian issues handled in setSlotContents. VM_Statics.setSlotContents(rvmFieldSlot, jdkFieldAcc.getLong(null)); } else if (rvmFieldType.isFloatType()) { float f = jdkFieldAcc.getFloat(null); VM_Statics.setSlotContents(rvmFieldSlot, Float.floatToIntBits(f)); } else if (rvmFieldType.isDoubleType()) { double d = jdkFieldAcc.getDouble(null); // note: Endian issues handled in setSlotContents. VM_Statics.setSlotContents(rvmFieldSlot, Double.doubleToLongBits(d)); } else if (rvmFieldType.equals(VM_TypeReference.Address) || rvmFieldType.equals(VM_TypeReference.Word) || rvmFieldType.equals(VM_TypeReference.Extent) || rvmFieldType.equals(VM_TypeReference.Offset)){ Object o = jdkFieldAcc.get(null); String msg = " static field " + rvmField.toString(); boolean warn = rvmFieldType.equals(VM_TypeReference.Address); //-#if RVM_FOR_32_ADDR VM_Statics.setSlotContents(rvmFieldSlot, getWordValue(o, msg, warn).toInt()); //-#endif //-#if RVM_FOR_64_ADDR VM_Statics.setSlotContents(rvmFieldSlot, getWordValue(o, msg, warn).toLong()); //-#endif } else { fail("unexpected primitive field type: " + rvmFieldType); } } else { // field is reference type Object o = jdkFieldAcc.get(null); if (verbose >= 3) say(" setting with ", String.valueOf(VM_Magic.objectAsAddress(o).toInt())); VM_Statics.setSlotContents(rvmFieldSlot, o); } } } if (profile) { stopTime = System.currentTimeMillis(); System.out.println("PROF: \tinitializing jtoc "+(stopTime-startTime)+" ms"); } } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/66d09e021b8b01b440bc6f720f9799cfc911bbdb/BootImageWriter.java/buggy/rvm/src/tools/bootImageWriter/BootImageWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
752,
15817,
2040,
4710,
12,
5018,
618,
1557,
16,
4766,
5411,
514,
4835,
2040,
559,
1557,
812,
13,
377,
1216,
11900,
16,
10403,
288,
1850,
8251,
67,
10617,
18,
12336,
15817... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
752,
15817,
2040,
4710,
12,
5018,
618,
1557,
16,
4766,
5411,
514,
4835,
2040,
559,
1557,
812,
13,
377,
1216,
11900,
16,
10403,
288,
1850,
8251,
67,
10617,
18,
12336,
15817... |
logger.debug("getting the parameter "+name); | System.out.println("getting the parameter"); | public Object getParameter(String name) { //ChannelProxy channelProxy = new ChannelProxy(); //ChannelId[] channelIds = getChannelIds(); //channelProxy.retrieve_grouping(channelIds, channelIds[0]); ///************************************************ if (parameterCache.containsKey(name)) { return parameterCache.get(name); } // end of if (parameterCache.containsKey(name)) NodeList nList = evalNodeList(config, "parameter[name/text()="+ dquote+name+dquote+"]"); if (nList != null && nList.getLength() != 0) { logger.debug("getting the parameter "+name); Node n = nList.item(0); if (n instanceof Element) { return XMLParameter.getParameter((Element)n); //System.out.println("THe tag name is "+((Element)n).getTagName()); // parameterCache.put(name, n); // return (Element)n; } } else { logger.debug("THE NODE LIST IS NULL for parameter "+name); } // not a parameter, try parameterRef nList = evalNodeList(config, "parameterRef[text()="+dquote+name+dquote+"]"); if (nList != null && nList.getLength() != 0) { Node n = nList.item(0); if (n instanceof Element) { SimpleXLink sl = new SimpleXLink(docBuilder, (Element)n); try { Element e = sl.retrieve(); parameterCache.put(name, e); return e; } catch (Exception e) { logger.error("can't get paramterRef for "+name, e); } // end of try-catch } } logger.warn("can't find paramter for "+name); //can't find that name??? return null; } | 52623 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52623/469bff7031871539a68babac308f6eb2d0d7c019/XMLDataSet.java/clean/src/edu/sc/seis/fissuresUtil/xml/XMLDataSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
5575,
12,
780,
508,
13,
288,
202,
759,
2909,
3886,
1904,
3886,
273,
394,
5307,
3886,
5621,
202,
759,
2909,
548,
8526,
1904,
2673,
273,
16454,
2673,
5621,
225,
202,
759,
4327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5575,
12,
780,
508,
13,
288,
202,
759,
2909,
3886,
1904,
3886,
273,
394,
5307,
3886,
5621,
202,
759,
2909,
548,
8526,
1904,
2673,
273,
16454,
2673,
5621,
225,
202,
759,
4327,
... |
public void writeContent (HttpServletRequest req, HttpServletResponse res, java.io.PrintWriter out) { try { // instantiate user layout manager and check to see if the profile mapping has been established if (p_browserMapper != null) { p_browserMapper.prepare(req); } if (uLayoutManager==null || uLayoutManager.isUserAgentUnmapped()) { uLayoutManager = new UserLayoutManager(req, this.getPerson()); } else { // p_browserMapper is no longer needed p_browserMapper = null; } if (uLayoutManager.isUserAgentUnmapped()) { // unmapped browser if (p_browserMapper== null) { p_browserMapper = new org.jasig.portal.channels.CSelectSystemProfile(); p_browserMapper.initialize(new Hashtable(), "CSelectSystemProfile", true, true, false, 10000, getPerson()); } try { p_browserMapper.render(req, res); } catch (Exception e) { // something went wrong trying to show CSelectSystemProfileChannel Logger.log(Logger.ERROR,"UserInstance::writeContent() : unable caught an exception while trying to display CSelectSystemProfileChannel! Exception:"+e); } // don't go any further! return; } // if we got to this point, we can proceed with the rendering if (channelManager == null) { channelManager = new ChannelManager(uLayoutManager); p_rendering_lock=new Object(); } renderState (req, res, out, this.channelManager, uLayoutManager,p_rendering_lock); } catch (Exception e) { StringWriter sw=new StringWriter(); e.printStackTrace(new PrintWriter(sw)); sw.flush(); Logger.log(Logger.ERROR,"UserInstance::writeContent() : an unknown exception occurred : "+sw.toString()); } } | 1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/f0febd387be9673ffaf974329eeadab894c5d23d/UserInstance.java/clean/source/org/jasig/portal/UserInstance.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1045,
1350,
261,
2940,
18572,
1111,
16,
12446,
400,
16,
2252,
18,
1594,
18,
5108,
2289,
596,
13,
288,
3639,
775,
288,
5411,
368,
10275,
729,
3511,
3301,
471,
866,
358,
2621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1045,
1350,
261,
2940,
18572,
1111,
16,
12446,
400,
16,
2252,
18,
1594,
18,
5108,
2289,
596,
13,
288,
3639,
775,
288,
5411,
368,
10275,
729,
3511,
3301,
471,
866,
358,
2621,
... | ||
} catch (Exception e) { return; | public static void saveBuildInfo(IProject project) { // Create document Document doc = new DocumentImpl(); Element rootElement = doc.createElement(ROOT_ELEM_NAME); doc.appendChild(rootElement); // Save the build info ManagedBuildInfo buildInfo = (ManagedBuildInfo) getBuildInfo(project); if (buildInfo != null) buildInfo.serialize(doc, rootElement); // Save the document ByteArrayOutputStream s = new ByteArrayOutputStream(); OutputFormat format = new OutputFormat(); format.setIndenting(true); format.setLineSeparator(System.getProperty("line.separator")); //$NON-NLS-1$ String xml = null; try { Serializer serializer = SerializerFactory.getSerializerFactory(Method.XML).makeSerializer(new OutputStreamWriter(s, "UTF8"), format); //$NON-NLS-1$ serializer.asDOMSerializer().serialize(doc); xml = s.toString("UTF8"); //$NON-NLS-1$ IFile rscFile = project.getFile(FILE_NAME); InputStream inputStream = new ByteArrayInputStream(xml.getBytes()); // update the resource content if (rscFile.exists()) { rscFile.setContents(inputStream, IResource.FORCE, null); } else { rscFile.create(inputStream, IResource.FORCE, null); } } catch (Exception e) { return; } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/1661bb802280c66eb06adca1ff4d5b1bdbabccc2/ManagedBuildManager.java/clean/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
1923,
3116,
966,
12,
45,
4109,
1984,
13,
288,
202,
202,
759,
1788,
1668,
202,
202,
2519,
997,
273,
394,
4319,
2828,
5621,
202,
202,
1046,
27575,
273,
997,
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,
225,
202,
482,
760,
918,
1923,
3116,
966,
12,
45,
4109,
1984,
13,
288,
202,
202,
759,
1788,
1668,
202,
202,
2519,
997,
273,
394,
4319,
2828,
5621,
202,
202,
1046,
27575,
273,
997,
18,
2640,
... | |
System.out.println("==>endDTD()"); | System.out.println ("==>endDTD()"); | public void endDTD(Augmentations augs) throws XNIException { if (DEBUG_EVENTS) { System.out.println("==>endDTD()"); } fInDTD = false; if (!fBaseURIStack.isEmpty()) { fBaseURIStack.pop(); } String internalSubset = fInternalSubset != null && fInternalSubset.length() > 0 ? fInternalSubset.toString() : null; if (fDeferNodeExpansion) { if (internalSubset != null) { fDeferredDocumentImpl.setInternalSubset(fDocumentTypeIndex, internalSubset); } } else if (fDocumentImpl != null) { if (internalSubset != null) { ((DocumentTypeImpl)fDocumentType).setInternalSubset(internalSubset); } } } // endDTD() | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/9d1dbf89c75cf6f564facc2b605dd9f2cf2dac4d/AbstractDOMParser.java/clean/src/org/apache/xerces/parsers/AbstractDOMParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
679,
25728,
12,
37,
14870,
1012,
279,
9024,
13,
1216,
1139,
50,
45,
503,
288,
3639,
309,
261,
9394,
67,
29221,
13,
288,
5411,
2332,
18,
659,
18,
8222,
7566,
631,
34,
409,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
679,
25728,
12,
37,
14870,
1012,
279,
9024,
13,
1216,
1139,
50,
45,
503,
288,
3639,
309,
261,
9394,
67,
29221,
13,
288,
5411,
2332,
18,
659,
18,
8222,
7566,
631,
34,
409,
2... |
public void paintFixed(Context c, BlockBox block) { int xoff = 0; int yoff = 0; xoff = c.canvas.getWidth(); yoff = c.canvas.getHeight(); if (block.right_set) { xoff = xoff - block.width; } if (block.bottom_set) { //joshy: this should really be block.height instead of bnds.y // need to fix the setting of block.height //joshy: need to do horizontal calcs too, inc scrolling //joshy: need to make the body paint the whole canvas. // start at the bottom of the viewport yoff = c.viewport.getHeight(); // account for the width of the box yoff = yoff - block.height; // - bnds.y // account for the current y offset of the box yoff = yoff - c.getExtents().y; //orig.y; // account for the scrolling of the viewport yoff = yoff - c.canvas.getLocation().y; } c.translate(xoff, yoff); paintNormal(c,block); c.translate(-xoff, -yoff); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/07ab625b03cad242caa27ac48e830592130b24a1/BoxLayout.java/clean/src/java/org/joshy/html/BoxLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
84,
1598,
7505,
12,
1042,
71,
16,
1768,
3514,
2629,
15329,
474,
92,
3674,
33,
20,
31,
474,
93,
3674,
33,
20,
31,
92,
3674,
33,
71,
18,
15424,
18,
588,
2384,
5621,
93,
3674,
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,
1071,
6459,
84,
1598,
7505,
12,
1042,
71,
16,
1768,
3514,
2629,
15329,
474,
92,
3674,
33,
20,
31,
474,
93,
3674,
33,
20,
31,
92,
3674,
33,
71,
18,
15424,
18,
588,
2384,
5621,
93,
3674,
3... | ||
case CDATA_SECTION_NODE: { newnode = (NodeImpl)createCDATASection(source.getNodeValue()); break; | case CDATA_SECTION_NODE: { newnode = createCDATASection(source.getNodeValue()); break; | public Node importNode(Node source, boolean deep) throws DOMException { NodeImpl newnode=null; // Sigh. This doesn't work; too many nodes have private data that // would have to be manually tweaked. May be able to add local // shortcuts to each nodetype. Consider ????? // if(source instanceof NodeImpl && // !(source instanceof DocumentImpl)) // { // // Can't clone DocumentImpl since it invokes us... // newnode=(NodeImpl)source.cloneNode(false); // newnode.ownerDocument=this; //} //else int type = source.getNodeType(); switch (type) { case ELEMENT_NODE: { Element newelement = createElement(source.getNodeName()); NamedNodeMap srcattr = source.getAttributes(); if (srcattr != null) { for(int i = 0; i < srcattr.getLength(); i++) { newelement.setAttributeNode( (AttrImpl)importNode(srcattr.item(i), true)); } } newnode = (NodeImpl)newelement; break; } case ATTRIBUTE_NODE: { newnode = (NodeImpl)createAttribute(source.getNodeName()); // Kids carry value break; } case TEXT_NODE: { newnode = (NodeImpl)createTextNode(source.getNodeValue()); break; } case CDATA_SECTION_NODE: { newnode = (NodeImpl)createCDATASection(source.getNodeValue()); break; } case ENTITY_REFERENCE_NODE: { newnode = (NodeImpl)createEntityReference(source.getNodeName()); deep = false; // ????? Right Thing? // Value implied by doctype, so we should not copy it // -- instead, refer to local doctype, if any. break; } case ENTITY_NODE: { Entity srcentity = (Entity)source; EntityImpl newentity = (EntityImpl)createEntity(source.getNodeName()); newentity.setPublicId(srcentity.getPublicId()); newentity.setSystemId(srcentity.getSystemId()); newentity.setNotationName(srcentity.getNotationName()); // Kids carry additional value newnode = newentity; break; } case PROCESSING_INSTRUCTION_NODE: { newnode = (ProcessingInstructionImpl)createProcessingInstruction(source.getNodeName(), source.getNodeValue()); break; } case COMMENT_NODE: { newnode = (NodeImpl)createComment(source.getNodeValue()); break; } case DOCUMENT_TYPE_NODE: { DocumentTypeImpl doctype = (DocumentTypeImpl)source; DocumentTypeImpl newdoctype = (DocumentTypeImpl)createDocumentType( doctype.getNodeName(), doctype.getPublicId(), doctype.getSystemId() ); // Values are on NamedNodeMaps NamedNodeMap smap = ((DocumentType)source).getEntities(); NamedNodeMap tmap = newdoctype.getEntities(); if(smap != null) { for(int i = 0; i < smap.getLength(); i++) { tmap.setNamedItem((EntityImpl)importNode(smap.item(i), true)); } } smap = ((DocumentType)source).getNotations(); tmap = newdoctype.getNotations(); if (smap != null) { for(int i = 0; i < smap.getLength(); i++) { tmap.setNamedItem((NotationImpl)importNode(smap.item(i), true)); } } // NOTE: At this time, the DOM definition of DocumentType // doesn't cover Elements and their Attributes. domimpl's // extentions in that area will not be preserved, even if // copying from domimpl to domimpl. We could special-case // that here. Arguably we should. Consider. ????? newnode = newdoctype; break; } case DOCUMENT_FRAGMENT_NODE: { newnode = (NodeImpl)createDocumentFragment(); // No name, kids carry value break; } case NOTATION_NODE: { Notation srcnotation = (Notation)source; NotationImpl newnotation = (NotationImpl)createNotation(source.getNodeName()); newnotation.setPublicId(srcnotation.getPublicId()); newnotation.setSystemId(srcnotation.getSystemId()); // Kids carry additional value newnode = newnotation; // No name, no value break; } case DOCUMENT_NODE : // Document can't be child of Document default: { // Unknown node type throw new DOMExceptionImpl(DOMException.HIERARCHY_REQUEST_ERR, "DOM006 Hierarchy request error"); } } // If deep, replicate and attach the kids. if (deep) { for (Node srckid = source.getFirstChild(); srckid != null; srckid = srckid.getNextSibling()) { newnode.appendChild(importNode(srckid, true)); } } return newnode; } // importNode(Node,boolean):Node | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/fd788f496dd24d0d34e5ecb1936da8999ed6c269/DocumentImpl.java/clean/src/org/apache/xerces/dom/DocumentImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2029,
1930,
907,
12,
907,
1084,
16,
1250,
4608,
13,
3639,
1216,
4703,
503,
288,
377,
202,
907,
2828,
29267,
33,
2011,
31,
377,
202,
759,
348,
2031,
18,
1220,
3302,
1404,
1440,
31,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2029,
1930,
907,
12,
907,
1084,
16,
1250,
4608,
13,
3639,
1216,
4703,
503,
288,
377,
202,
907,
2828,
29267,
33,
2011,
31,
377,
202,
759,
348,
2031,
18,
1220,
3302,
1404,
1440,
31,... |
public org.quickfix.field.DeliveryType getDeliveryType() throws FieldNotFound { org.quickfix.field.DeliveryType value = new org.quickfix.field.DeliveryType(); | public quickfix.field.DeliveryType getDeliveryType() throws FieldNotFound { quickfix.field.DeliveryType value = new quickfix.field.DeliveryType(); | public org.quickfix.field.DeliveryType getDeliveryType() throws FieldNotFound { org.quickfix.field.DeliveryType value = new org.quickfix.field.DeliveryType(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/OrderStatusRequest.java/clean/src/java/src/quickfix/fix44/OrderStatusRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8909,
559,
31518,
559,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8909,
559,
460,
273,
394,
2358,
18,
19525,
904,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8909,
559,
31518,
559,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8909,
559,
460,
273,
394,
2358,
18,
19525,
904,
18... |
out.println( "<?xml version=\"1.0\" encoding=\"" | out.print( "<?xml version=\"1.0\" encoding=\"" | private void init( String signature ) { writeUTFSignature( signature ); out.println( "<?xml version=\"1.0\" encoding=\"" //$NON-NLS-1$ + OUTPUT_ENCODING + "\"?>" ); //$NON-NLS-1$ } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/d22a06594445ba842195c89463335719924a0245/XMLWriter.java/buggy/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/util/XMLWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1208,
12,
514,
3372,
262,
202,
95,
202,
202,
2626,
5159,
5374,
12,
3372,
11272,
202,
202,
659,
18,
1188,
12,
20410,
2902,
1177,
5189,
21,
18,
20,
2412,
2688,
13186,
4329... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
12,
514,
3372,
262,
202,
95,
202,
202,
2626,
5159,
5374,
12,
3372,
11272,
202,
202,
659,
18,
1188,
12,
20410,
2902,
1177,
5189,
21,
18,
20,
2412,
2688,
13186,
4329... |
protected final boolean process ( ) { assert _locale.entered(); if (_cur == null) return false; if (_version != _locale.version()) throw new ConcurrentModificationException( "Document changed during save" ); switch ( _cur.kind() ) { case ROOT : { processRoot(); break; } case ELEM : { processElement(); break; } case - ELEM : { processFinish (); break; } case TEXT : { emitText ( _cur ); break; } case COMMENT : { emitComment ( _cur ); _cur.toEnd(); break; } case PROCINST : { emitProcinst ( _cur ); _cur.toEnd(); break; } case - ROOT : { _cur.release(); _cur = null; return false; } default : throw new RuntimeException( "Unexpected kind" ); } _cur.next(); return true; } | 3520 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3520/c2050878358a3543cf38c8b9bf0a37703cce78e1/Saver.java/clean/src/store/org/apache/xmlbeans/impl/store/Saver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
727,
1250,
1207,
261,
262,
565,
288,
3639,
1815,
389,
6339,
18,
2328,
329,
5621,
3639,
309,
261,
67,
1397,
422,
446,
13,
5411,
327,
629,
31,
7734,
309,
261,
67,
1589,
480,
389,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
727,
1250,
1207,
261,
262,
565,
288,
3639,
1815,
389,
6339,
18,
2328,
329,
5621,
3639,
309,
261,
67,
1397,
422,
446,
13,
5411,
327,
629,
31,
7734,
309,
261,
67,
1589,
480,
389,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.