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 |
|---|---|---|---|---|---|---|
if (jj_3R_288()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_323()) { jj_scanpos = xsp; break; } } | if (jj_scan_token(EQ)) return true; | final private boolean jj_3R_283() { if (jj_3R_288()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_323()) { jj_scanpos = xsp; break; } } return false; } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/a180e9b19197c7613f1e73c6ec8a574a17011e5e/JavaParser.java/clean/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
6030,
23,
1435,
288,
565,
309,
261,
78,
78,
67,
23,
54,
67,
22,
5482,
10756,
327,
638,
31,
565,
3155,
619,
1752,
31,
565,
1323,
261,
3767,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
6030,
23,
1435,
288,
565,
309,
261,
78,
78,
67,
23,
54,
67,
22,
5482,
10756,
327,
638,
31,
565,
3155,
619,
1752,
31,
565,
1323,
261,
3767,
13... |
return sessions.size(); | synchronized (sessions) { return sessions.size(); } | public static int numSessions() { return sessions.size(); } | 52526 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52526/0b33d8d694f45067a21706b035ee0f75b956f305/Session.java/buggy/core/src/main/java/quickfix/Session.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
509,
818,
13566,
1435,
288,
3639,
3852,
261,
16794,
13,
288,
327,
8856,
18,
1467,
5621,
289,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
509,
818,
13566,
1435,
288,
3639,
3852,
261,
16794,
13,
288,
327,
8856,
18,
1467,
5621,
289,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
try { if (callNode != null) { | try { if (callNode != null) { | 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); } } } | 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,
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,
... |
final ErrorInfo errorInfo = new ErrorInfo(prop == null ? null : prop.getName(), errorMessage, | final ErrorInfo errorInfo = new ErrorInfo(myComponent, prop == null ? null : prop.getName(), errorMessage, | public void addError(final String inspectionId, @Nullable IProperty prop, @NotNull String errorMessage, @Nullable EditorQuickFixProvider editorQuickFixProvider) { if (myResults == null) { myResults = new ArrayList<ErrorInfo>(); } QuickFix[] quickFixes = QuickFix.EMPTY_ARRAY; if (editorQuickFixProvider != null) { quickFixes = new QuickFix[1]; quickFixes [0] = editorQuickFixProvider.createQuickFix(myEditor, myComponent); } final ErrorInfo errorInfo = new ErrorInfo(prop == null ? null : prop.getName(), errorMessage, myProfile.getErrorLevel(HighlightDisplayKey.find(inspectionId)), quickFixes); errorInfo.setInspectionId(inspectionId); myResults.add(errorInfo); } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/6a384c23ca74b732817b78c9169186710a7d1d75/FormEditorErrorCollector.java/clean/ui-designer/impl/com/intellij/uiDesigner/inspections/FormEditorErrorCollector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
9501,
12,
6385,
514,
2763,
7017,
548,
16,
15604,
632,
13349,
467,
1396,
2270,
16,
15604,
632,
5962,
514,
9324,
16,
15604,
632,
13349,
18451,
13663,
8585,
2249,
4858,
13663,
8585,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9501,
12,
6385,
514,
2763,
7017,
548,
16,
15604,
632,
13349,
467,
1396,
2270,
16,
15604,
632,
5962,
514,
9324,
16,
15604,
632,
13349,
18451,
13663,
8585,
2249,
4858,
13663,
8585,... |
Logger.trace("Troll::Troll","D","Created Troll: "+this.toString()); | logger.debug("Created Troll: "+this); | public Troll() throws AttributeNotFoundException { super(); put("class","troll"); put("x",0); put("y",0); setATK(ATK); setDEF(DEF); setXP(XP); setbaseHP(HP); setLevel(Level.getLevel(getXP())); stop(); Logger.trace("Troll::Troll","D","Created Troll: "+this.toString()); } | 4438 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4438/5032255cbc6322ed19134d0417d2ef3bbb056e19/Troll.java/buggy/src/games/stendhal/server/entity/creature/Troll.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
399,
2693,
1435,
1216,
3601,
3990,
565,
288,
565,
2240,
5621,
565,
1378,
2932,
1106,
15937,
88,
2693,
8863,
565,
1378,
2932,
92,
3113,
20,
1769,
565,
1378,
2932,
93,
3113,
20,
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,
282,
1071,
399,
2693,
1435,
1216,
3601,
3990,
565,
288,
565,
2240,
5621,
565,
1378,
2932,
1106,
15937,
88,
2693,
8863,
565,
1378,
2932,
92,
3113,
20,
1769,
565,
1378,
2932,
93,
3113,
20,
1769,... |
backupFolderText = new Text(group, SWT.BORDER); | backupFolderText = new Text(topGroup, SWT.BORDER); | private void createTaskBackupScheduleGroup(Composite container) { Group group = new Group(container, SWT.SHADOW_ETCHED_IN); group.setText(GROUP_LABEL_BACKUP); group.setLayout(new GridLayout(3, false)); group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Composite backupTop = new Composite(group, SWT.NONE); backupTop.setLayout(new GridLayout(3, false)); GridData archiveData = new GridData(); archiveData.horizontalSpan = 3; backupTop.setLayoutData(archiveData); backupAutomaticallyButton = new Button(backupTop, SWT.CHECK); backupAutomaticallyButton.setText("Automatically backup tasks every"); backupAutomaticallyButton.setSelection(getPreferenceStore().getBoolean( TaskListPreferenceConstants.BACKUP_AUTOMATICALLY)); backupAutomaticallyButton.addSelectionListener(new SelectionListener() { public void widgetSelected(SelectionEvent e) { updateRefreshGroupEnablements(); } public void widgetDefaultSelected(SelectionEvent e) { } }); { backkupScheduleTimeText = new Text(backupTop, SWT.BORDER | SWT.RIGHT); final GridData gridData_1 = new GridData(); gridData_1.widthHint = 15; backkupScheduleTimeText.setLayoutData(gridData_1); backkupScheduleTimeText.setText("" + getPreferenceStore().getInt(TaskListPreferenceConstants.BACKUP_SCHEDULE)); backkupScheduleTimeText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { updateRefreshGroupEnablements(); } }); } Label label = new Label(backupTop, SWT.NONE); label.setText("days"); label = new Label(group, SWT.LEFT); label.setText("to"); String backupDirectory = getPreferenceStore().getString(TaskListPreferenceConstants.BACKUP_FOLDER); backupDirectory = backupDirectory.replaceAll(BACKSLASH_MULTI, FORWARDSLASH); backupFolderText = new Text(group, SWT.BORDER); backupFolderText.setText(backupDirectory); backupFolderText.setEditable(false); backupFolderText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); browse = new Button(group, SWT.TRAIL); browse.setText("Browse..."); browse.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { DirectoryDialog dialog = new DirectoryDialog(getShell()); dialog.setText(TITLE_FOLDER_SELECTION); dialog.setMessage("Specify the backup output folder"); String dir = backupFolderText.getText(); dir = dir.replaceAll(BACKSLASH_MULTI, FORWARDSLASH); dialog.setFilterPath(dir); dir = dialog.open(); if (dir == null || dir.equals("")) return; backupFolderText.setText(dir); updateRefreshGroupEnablements(); } }); Composite extrasComp = new Composite(group, SWT.NONE); extrasComp.setLayout(new GridLayout(4, false)); GridData extrasGD = new GridData(GridData.HORIZONTAL_ALIGN_FILL); extrasGD.horizontalSpan = 3; extrasComp.setLayoutData(extrasGD); final Label maxFiles = new Label(extrasComp, SWT.NONE); maxFiles.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); maxFiles.setText("Max Backups"); maxFilesSpinner = new Spinner(extrasComp, SWT.NONE); maxFilesSpinner.setIncrement(1); maxFilesSpinner.setMinimum(SPINNER_MIN_BACKUPS); maxFilesSpinner.setMaximum(SPINNER_MAX_BACKUPS); maxFilesSpinner.setPageIncrement(1); maxFilesSpinner.setSelection(getPreferenceStore().getInt(TaskListPreferenceConstants.BACKUP_MAXFILES)); // 3.2 only: // maxFilesSpinner.setValues(getPreferenceStore().getInt(TaskListPreferenceConstants.BACKUP_MAXFILES), // SPINNER_MIN_BACKUPS, SPINNER_MAX_BACKUPS, 0, 1, 1); lastUpdate = new Label(extrasComp, SWT.NONE); lastUpdate.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); setLastBackup(); backupNow = new Button(extrasComp, SWT.NONE); backupNow.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); backupNow.setText("Backup Now"); backupNow.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { // try { getPreferenceStore().setValue(TaskListPreferenceConstants.BACKUP_FOLDER, backupFolderText.getText()); MylarTaskListPlugin.getDefault().getBackupManager().backupNow(true); setLastBackup(); // } catch (InvocationTargetException ex) { // MessageDialog.openError(getShell(), LABEL_BACKUP_ERROR, // TaskListBackupManager.BACKUP_FAILURE_MESSAGE + // ex.getCause().getMessage()); // } catch (IOException ex) { // MessageDialog.openError(getShell(), LABEL_BACKUP_ERROR, // TaskListBackupManager.BACKUP_FAILURE_MESSAGE + // ex.getCause().getMessage()); // } } }); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/89db1d12a45ab2b6e8abf850c2019acf847a3786/MylarTaskListPreferencePage.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/preferences/MylarTaskListPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
2174,
6248,
6061,
1114,
12,
9400,
1478,
13,
288,
202,
202,
1114,
1041,
273,
394,
3756,
12,
3782,
16,
348,
8588,
18,
2664,
1880,
7306,
67,
9235,
2056,
67,
706,
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,
225,
202,
1152,
918,
752,
2174,
6248,
6061,
1114,
12,
9400,
1478,
13,
288,
202,
202,
1114,
1041,
273,
394,
3756,
12,
3782,
16,
348,
8588,
18,
2664,
1880,
7306,
67,
9235,
2056,
67,
706,
1769,... |
_loop129: | _loop635: | public final void relativePathExpr() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST relativePathExpr_AST = null; stepExpr(); astFactory.addASTChild(currentAST, returnAST); { _loop129: do { if ((LA(1)==SLASH||LA(1)==DSLASH)) { { switch ( LA(1)) { case SLASH: { AST tmp228_AST = null; tmp228_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp228_AST); match(SLASH); break; } case DSLASH: { AST tmp229_AST = null; tmp229_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp229_AST); match(DSLASH); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } stepExpr(); astFactory.addASTChild(currentAST, returnAST); } else { break _loop129; } } while (true); } relativePathExpr_AST = (AST)currentAST.root; returnAST = relativePathExpr_AST; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/78bd70965f202738e2ca56dacfd71f5d58c0db69/XPathParser2.java/buggy/src/org/exist/parser/XPathParser2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
12820,
4742,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5621,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
12820,
4742,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5621,
202,
202,
... |
case TokenStream.ELEMDEC : rhs = stack[stackTop]; | } case TokenStream.ELEMDEC : { Object rhs = stack[stackTop]; | public static Object interpret(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, NativeFunction fnOrScript, InterpreterData theData) throws JavaScriptException { if (cx.interpreterSecurityDomain != theData.securityDomain) { // If securityDomain is different, update domain in Cotext // and call self under new domain Object savedDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = theData.securityDomain; try { return interpret(cx, scope, thisObj, args, fnOrScript, theData); } finally { cx.interpreterSecurityDomain = savedDomain; } } int i; Object lhs; final int maxStack = theData.itsMaxStack; final int maxVars = (fnOrScript.argNames == null) ? 0 : fnOrScript.argNames.length; final int maxLocals = theData.itsMaxLocals; final int maxTryDepth = theData.itsMaxTryDepth; final int VAR_SHFT = maxStack; final int LOCAL_SHFT = VAR_SHFT + maxVars; final int TRY_SCOPE_SHFT = LOCAL_SHFT + maxLocals;// stack[0 <= i < VAR_SHFT]: stack data// stack[VAR_SHFT <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_SCOPE_SHFT]: used for newtemp/usetemp// stack[TRY_SCOPE_SHFT <= i]: try scopes// when 0 <= i < LOCAL_SHFT and stack[x] == DBL_MRK,// sDbl[i] gives the number value final Object DBL_MRK = Interpreter.DBL_MRK; Object[] stack = new Object[TRY_SCOPE_SHFT + maxTryDepth]; double[] sDbl = new double[TRY_SCOPE_SHFT]; int stackTop = -1; byte[] iCode = theData.itsICode; String[] strings = theData.itsStringTable; int pc = 0; int iCodeLength = theData.itsICodeTop; final Scriptable undefined = Undefined.instance; if (maxVars != 0) { int definedArgs = fnOrScript.argCount; if (definedArgs != 0) { if (definedArgs > args.length) { definedArgs = args.length; } for (i = 0; i != definedArgs; ++i) { stack[VAR_SHFT + i] = args[i]; } } for (i = definedArgs; i != maxVars; ++i) { stack[VAR_SHFT + i] = undefined; } } if (theData.itsNestedFunctions != null) { for (i = 0; i < theData.itsNestedFunctions.length; i++) createFunctionObject(theData.itsNestedFunctions[i], scope); } Object id; Object rhs, val; double valDbl; boolean valBln; int count; int slot; String name = null; Object[] outArgs; int lIntValue; double lDbl; int rIntValue; double rDbl;// tryStack[2 * i]: starting pc of catch block// tryStack[2 * i + 1]: starting pc of finally block int[] tryStack = null; int tryStackTop = 0; InterpreterFrame frame = null; if (cx.debugger != null) { frame = new InterpreterFrame(scope, theData, fnOrScript); cx.pushFrame(frame); } Object result = undefined; int pcPrevBranch = pc; final int instructionThreshold = cx.instructionThreshold; // During function call this will be set to -1 so catch can properly // adjust it int instructionCount = cx.instructionCount; // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; while (pc < iCodeLength) { try { switch (iCode[pc] & 0xff) { case TokenStream.ENDTRY : tryStackTop--; break; case TokenStream.TRY : if (tryStackTop == 0) { tryStack = new int[maxTryDepth * 2]; } i = getTarget(iCode, pc + 1); if (i == pc) i = 0; tryStack[tryStackTop * 2] = i; i = getTarget(iCode, pc + 3); if (i == (pc + 2)) i = 0; tryStack[tryStackTop * 2 + 1] = i; stack[TRY_SCOPE_SHFT + tryStackTop] = scope; ++tryStackTop; pc += 4; break; case TokenStream.GE : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl <= lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.LE : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl <= rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.GT : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl < lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.LT : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl < rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.IN : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); valBln = ScriptRuntime.in(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.INSTANCEOF : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); valBln = ScriptRuntime.instanceOf(scope, lhs, rhs); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.EQ : --stackTop; valBln = do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.NE : --stackTop; valBln = !do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.SHEQ : --stackTop; valBln = do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.SHNE : --stackTop; valBln = !do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.IFNE : val = stack[stackTop]; if (val != DBL_MRK) { valBln = !ScriptRuntime.toBoolean(val); } else { valDbl = sDbl[stackTop]; valBln = !(valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount (instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.IFEQ : val = stack[stackTop]; if (val != DBL_MRK) { valBln = ScriptRuntime.toBoolean(val); } else { valDbl = sDbl[stackTop]; valBln = (valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount (instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.GOTO : if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.GOSUB : sDbl[++stackTop] = pc + 3; if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.RETSUB : slot = (iCode[pc + 1] & 0xFF); if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = (int)sDbl[LOCAL_SHFT + slot]; continue; case TokenStream.POP : stackTop--; break; case TokenStream.DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; break; case TokenStream.POPV : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break; case TokenStream.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; pc = getTarget(iCode, pc + 1); break; case TokenStream.BITNOT : rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; break; case TokenStream.BITAND : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; break; case TokenStream.BITOR : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; break; case TokenStream.BITXOR : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; break; case TokenStream.LSH : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; break; case TokenStream.RSH : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; break; case TokenStream.URSH : rIntValue = stack_int32(stack, sDbl, stackTop) & 0x1F; --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ScriptRuntime.toUint32(lDbl) >>> rIntValue; break; case TokenStream.ADD : --stackTop; do_add(stack, sDbl, stackTop); break; case TokenStream.SUB : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; break; case TokenStream.NEG : rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; break; case TokenStream.POS : rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; break; case TokenStream.MUL : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; break; case TokenStream.DIV : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; // Detect the divide by zero or let Java do it ? sDbl[stackTop] = lDbl / rDbl; break; case TokenStream.MOD : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; break; case TokenStream.BINDNAME : name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.bind(scope, name); pc += 2; break; case TokenStream.GETBASE : name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.getBase(scope, name); pc += 2; break; case TokenStream.SETNAME : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; // what about class cast exception here for lhs? stack[stackTop] = ScriptRuntime.setName ((Scriptable)lhs, rhs, scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.DELPROP : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.delete(lhs, rhs); break; case TokenStream.GETPROP : name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; case TokenStream.SETPROP : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; case TokenStream.GETELEM : do_getElem(cx, stack, sDbl, stackTop, scope); --stackTop; break; case TokenStream.SETELEM : do_setElem(cx, stack, sDbl, stackTop, scope); stackTop -= 2; break; case TokenStream.PROPINC : name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrement(lhs, name, scope); break; case TokenStream.PROPDEC : name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrement(lhs, name, scope); break; case TokenStream.ELEMINC : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrementElem(lhs, rhs, scope); break; case TokenStream.ELEMDEC : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrementElem(lhs, rhs, scope); break; case TokenStream.GETTHIS : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getThis((Scriptable)lhs); break; case TokenStream.NEWTEMP : slot = (iCode[++pc] & 0xFF); stack[LOCAL_SHFT + slot] = stack[stackTop]; sDbl[LOCAL_SHFT + slot] = sDbl[stackTop]; break; case TokenStream.USETEMP : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + slot]; sDbl[stackTop] = sDbl[LOCAL_SHFT + slot]; break; case TokenStream.CALLSPECIAL : if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int lineNum = getShort(iCode, pc + 1); name = strings[getShort(iCode, pc + 3)]; count = getShort(iCode, pc + 5); outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.callSpecial( cx, lhs, rhs, outArgs, thisObj, scope, name, lineNum); pc += 6; instructionCount = cx.instructionCount; break; case TokenStream.CALL : if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } cx.instructionCount = instructionCount; count = getShort(iCode, pc + 3); outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); if (lhs == undefined) { i = getShort(iCode, pc + 1); if (i != -1) lhs = strings[i]; } Scriptable calleeScope = scope; if (theData.itsNeedsActivation) { calleeScope = ScriptableObject. getTopLevelScope(scope); } stack[stackTop] = ScriptRuntime.call(cx, lhs, rhs, outArgs, calleeScope); pc += 4; instructionCount = cx.instructionCount; break; case TokenStream.NEW : if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } count = getShort(iCode, pc + 3); outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); if (lhs == undefined && getShort(iCode, pc + 1) != -1) { // special code for better error message for call // to undefined lhs = strings[getShort(iCode, pc + 1)]; } stack[stackTop] = ScriptRuntime.newObject(cx, lhs, outArgs, scope); pc += 4; instructionCount = cx.instructionCount; break; case TokenStream.TYPEOF : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); break; case TokenStream.TYPEOFNAME : name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; case TokenStream.STRING : stack[++stackTop] = strings[getShort(iCode, pc + 1)]; pc += 2; break; case SHORTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc + 1); pc += 2; break; case INTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc + 1); pc += 4; break; case TokenStream.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = theData. itsDoubleTable[getShort(iCode, pc + 1)]; pc += 2; break; case TokenStream.NAME : stack[++stackTop] = ScriptRuntime.name (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.NAMEINC : stack[++stackTop] = ScriptRuntime.postIncrement (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.NAMEDEC : stack[++stackTop] = ScriptRuntime.postDecrement (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.SETVAR : slot = (iCode[++pc] & 0xFF); stack[VAR_SHFT + slot] = stack[stackTop]; sDbl[VAR_SHFT + slot] = sDbl[stackTop]; break; case TokenStream.GETVAR : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; break; case TokenStream.VARINC : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) + 1.0; break; case TokenStream.VARDEC : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) - 1.0; break; case TokenStream.ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; break; case TokenStream.ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; break; case TokenStream.NULL : stack[++stackTop] = null; break; case TokenStream.THIS : stack[++stackTop] = thisObj; break; case TokenStream.THISFN : stack[++stackTop] = fnOrScript; break; case TokenStream.FALSE : stack[++stackTop] = Boolean.FALSE; break; case TokenStream.TRUE : stack[++stackTop] = Boolean.TRUE; break; case TokenStream.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case TokenStream.THROW : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; throw new JavaScriptException(result); case TokenStream.JTHROW : result = stack[stackTop]; // No need to check for DBL_MRK: result is Exception --stackTop; if (result instanceof JavaScriptException) throw (JavaScriptException)result; else throw (RuntimeException)result; case TokenStream.ENTERWITH : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); break; case TokenStream.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); break; case TokenStream.NEWSCOPE : stack[++stackTop] = ScriptRuntime.newScope(); break; case TokenStream.ENUMINIT : slot = (iCode[++pc] & 0xFF); lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + slot] = ScriptRuntime.initEnum(lhs, scope); break; case TokenStream.ENUMNEXT : slot = (iCode[++pc] & 0xFF); val = stack[LOCAL_SHFT + slot]; ++stackTop; stack[stackTop] = ScriptRuntime. nextEnum((Enumeration)val); break; case TokenStream.GETPROTO : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProto(lhs, scope); break; case TokenStream.GETPARENT : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs); break; case TokenStream.GETSCOPEPARENT : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs, scope); break; case TokenStream.SETPROTO : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProto(lhs, rhs, scope); break; case TokenStream.SETPARENT : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setParent(lhs, rhs, scope); break; case TokenStream.SCOPE : stack[++stackTop] = scope; break; case TokenStream.CLOSURE : i = getShort(iCode, pc + 1); stack[++stackTop] = new InterpretedFunction( theData.itsNestedFunctions[i], scope, cx); createFunctionObject( (InterpretedFunction)stack[stackTop], scope); pc += 2; break; case TokenStream.OBJECT : i = getShort(iCode, pc + 1); stack[++stackTop] = theData.itsRegExpLiterals[i]; pc += 2; break; case SOURCEFILE_ICODE : cx.interpreterSourceFile = theData.itsSourceFile; break; case LINE_ICODE : case BREAKPOINT_ICODE : i = getShort(iCode, pc + 1); cx.interpreterLine = i; if (frame != null) frame.setLineNumber(i); if ((iCode[pc] & 0xff) == BREAKPOINT_ICODE || cx.inLineStepMode) { cx.getDebuggableEngine(). getDebugger().handleBreakpointHit(cx); } pc += 2; break; default : dumpICode(theData); throw new RuntimeException("Unknown icode : " + (iCode[pc] & 0xff) + " @ pc : " + pc); } pc++; } catch (Throwable ex) { if (instructionThreshold != 0) { if (instructionCount < 0) { // throw during function call instructionCount = cx.instructionCount; } else { // throw during any other operation instructionCount += pc - pcPrevBranch; cx.instructionCount = instructionCount; } } final int SCRIPT_THROW = 0, ECMA = 1, RUNTIME = 2, OTHER = 3; int exType; Object errObj; // Object seen by catch for (;;) { if (ex instanceof JavaScriptException) { errObj = ScriptRuntime. unwrapJavaScriptException((JavaScriptException)ex); exType = SCRIPT_THROW; } else if (ex instanceof EcmaError) { // an offical ECMA error object, errObj = ((EcmaError)ex).getErrorObject(); exType = ECMA; } else if (ex instanceof WrappedException) { Object w = ((WrappedException) ex).unwrap(); if (w instanceof Throwable) { ex = (Throwable) w; continue; } errObj = ex; exType = RUNTIME; } else if (ex instanceof RuntimeException) { errObj = ex; exType = RUNTIME; } else { errObj = ex; // Error instance exType = OTHER; } break; } if (exType != OTHER && cx.debugger != null) { cx.debugger.handleExceptionThrown(cx, errObj); } boolean rethrow = true; if (exType != OTHER && tryStackTop > 0) { --tryStackTop; if (exType == SCRIPT_THROW || exType == ECMA) { // Check for catch only for // JavaScriptException and EcmaError pc = tryStack[tryStackTop * 2]; if (pc != 0) { // Has catch block rethrow = false; } } if (rethrow) { pc = tryStack[tryStackTop * 2 + 1]; if (pc != 0) { // has finally block rethrow = false; errObj = ex; } } } if (rethrow) { if (frame != null) cx.popFrame(); if (exType == SCRIPT_THROW) throw (JavaScriptException)ex; if (exType == ECMA || exType == RUNTIME) throw (RuntimeException)ex; throw (Error)ex; } // We caught an exception, // Notify instruction observer if necessary // and point pcPrevBranch to start of catch/finally block if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { // Note: this can throw Error cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc; // prepare stack and restore this function's security domain. scope = (Scriptable)stack[TRY_SCOPE_SHFT + tryStackTop]; stackTop = 0; stack[0] = errObj; } } if (frame != null) cx.popFrame(); if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } cx.instructionCount = instructionCount; } return result; } | 19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/7ab2eb958bc5d5b8575262b37554c7e600ccf6e9/Interpreter.java/buggy/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
4766,
282,
22780,
15261,
16,
1033,
8526,
833,
16,
4766,
282,
16717,
2083,
2295,
1162,
3651,
16,
4766,
282,
5294,
11599,
751,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
4766,
282,
22780,
15261,
16,
1033,
8526,
833,
16,
4766,
282,
16717,
2083,
2295,
1162,
3651,
16,
4766,
282,
5294,
11599,
751,
3... |
this.m_Quiet=quiet; | this.m_Quiet = quiet; | public final void setQuiet (boolean quiet) { this.m_Quiet=quiet; } | 17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/0dab862ee09d706c3f373fc18bedbf17caf427b9/MSVSSCREATE.java/buggy/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCREATE.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
918,
444,
16457,
261,
6494,
10902,
13,
288,
3639,
333,
18,
81,
67,
16457,
273,
10902,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
918,
444,
16457,
261,
6494,
10902,
13,
288,
3639,
333,
18,
81,
67,
16457,
273,
10902,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (superClass != null) { return superClass.getOSList(); | if (getSuperClass() != null) { return getSuperClass().getOSList(); | public String[] getOSList() { if (osList == null) { // Ask superClass for its list if (superClass != null) { return superClass.getOSList(); } else { // I have no superClass and no defined filter list return new String[] {"all"}; //$NON-NLS-1$ } } return (String[]) osList.toArray(new String[osList.size()]); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/0119b876950a205bdddabaad5e05a45b2a4dc387/ToolChain.java/buggy/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
8526,
336,
4618,
682,
1435,
288,
202,
202,
430,
261,
538,
682,
422,
446,
13,
288,
1082,
202,
759,
25747,
18846,
364,
2097,
666,
1082,
202,
430,
261,
9565,
797,
480,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
8526,
336,
4618,
682,
1435,
288,
202,
202,
430,
261,
538,
682,
422,
446,
13,
288,
1082,
202,
759,
25747,
18846,
364,
2097,
666,
1082,
202,
430,
261,
9565,
797,
480,
446,
... |
for (; list != null && i < ((RubyArray)val).getLength(); i++) { ((AssignableNode)list.getHeadNode()).assign(ruby, self, ((RubyArray)val).entry(i), check); | for (; list != null && i < ((RubyArray) val).getLength(); i++) { ((AssignableNode) list.getHeadNode()).assign(ruby, self, ((RubyArray) val).entry(i), check); | public RubyObject massign(Ruby ruby, RubyObject self, RubyObject val, boolean check) { if (val == null) { val = RubyArray.newArray(ruby); } else if (!(val instanceof RubyArray)) { // if ( rb_respond_to( val, to_ary ) ) { // val.funcall(getRuby().intern("to_a")); // } else { val = RubyArray.newArray(ruby, val); // } } Node list = getHeadNode(); int i = 0; for (; list != null && i < ((RubyArray)val).getLength(); i++) { ((AssignableNode)list.getHeadNode()).assign(ruby, self, ((RubyArray)val).entry(i), check); list = list.getNextNode(); } if (check && list != null) { // error } if (getArgsNode() != null) { if (getArgsNode() == MINUS_ONE) { } else if (list == null && i < ((RubyArray)val).getLength()) { ((AssignableNode)getArgsNode()).assign(ruby, self, ((RubyArray)val).subseq(((RubyArray)val).getLength() - i, i), check); } else { ((AssignableNode)getArgsNode()).assign(ruby, self, RubyArray.newArray(ruby), check); } } else if (check && i < ((RubyArray)val).getLength()) { // error } while (list != null) { i++; ((AssignableNode)list.getHeadNode()).assign(ruby, self, ruby.getNil(), check); list = list.getNextNode(); } return val; } | 49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/8140cac1b7c2375c549787852e38fa6c52b199df/MAsgnNode.java/buggy/org/jruby/nodes/MAsgnNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
921,
312,
6145,
12,
54,
10340,
22155,
16,
19817,
921,
365,
16,
19817,
921,
1244,
16,
1250,
866,
13,
288,
3639,
309,
261,
1125,
422,
446,
13,
288,
5411,
1244,
273,
19817,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
921,
312,
6145,
12,
54,
10340,
22155,
16,
19817,
921,
365,
16,
19817,
921,
1244,
16,
1250,
866,
13,
288,
3639,
309,
261,
1125,
422,
446,
13,
288,
5411,
1244,
273,
19817,
10... |
public static void main(String[] args) { try { verbosity = Integer.parseInt(System.getProperty(VERBOSITY_PROP, VERBOSITY_DEFAULT)); } catch (Exception ignored) { } version = readVersion(); bootText = "Knopflerfish OSGi framework, version " + version + "\n" + "Copyright 2003-2005 Knopflerfish. All Rights Reserved.\n\n" + "See http://www.knopflerfish.org for more information."; System.out.println(bootText); // Check if framework is started with no args at all. // This typically happens when starting with "java -jar framework.jar" // or similar (e.g by double-clicking on framework.jar) bZeroArgs = (args.length == 0); // Check if there is a default xargs file // Uses "init" variant if fwdir exists, otherwise // uses "restart" variant. String xargsPath = getDefaultXArgs(args); if(xargsPath != null) { if(bZeroArgs) { args = new String[] {"-xargs", xargsPath}; } else if(args.length == 1 && "-init".equals(args[0])) { args = new String[] {"-init", "-xargs", xargsPath}; } } // expand all -xargs options args = expandArgs(args); if(verbosity > 5) { for(int i = 0; i < args.length; i++) { println("argv[" + i + "]=" + args[i], 5); } } // redo this since it might have changed try { verbosity = Integer.parseInt(System.getProperty(VERBOSITY_PROP, VERBOSITY_DEFAULT)); } catch (Exception ignored) { } if(bZeroArgs) { // Make sure we have a minimal setup of args args = sanityArgs(args); } // Set default values to something reasonable if not supplied // on the command line (or in xargs) setDefaultSysProps(); String[] base = getJarBase(); // Handle -init option before we create the FW, otherwise // we might shoot ourself in the foot. Hard. for(int i = 0; i < args.length; i++) { if("-init".equals(args[i])) { doInit(); } } try { framework = new Framework(new Main()); } catch (Exception e) { e.printStackTrace(); error("New Framework failed!"); } // Save these for possible restart() initArgs = args; initOffset = 0; initBase = base; handleArgs(args, initOffset, base); } | 13251 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13251/17ae88b3f7b2b6dd3c0f3c451b2a40ec7c30404f/Main.java/buggy/osgi/framework/src/org/knopflerfish/framework/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
565,
775,
288,
4202,
11561,
273,
540,
2144,
18,
2670,
1702,
12,
3163,
18,
588,
1396,
12,
2204,
25400,
67,
15811,
16,
26884,
67,
5280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
565,
775,
288,
4202,
11561,
273,
540,
2144,
18,
2670,
1702,
12,
3163,
18,
588,
1396,
12,
2204,
25400,
67,
15811,
16,
26884,
67,
5280,
... | ||
try { position++; bCodeStream[classFileOffset++] = OPC_ishr; } catch (IndexOutOfBoundsException e) { resizeByteArray(OPC_ishr); | if (classFileOffset >= bCodeStream.length) { resizeByteArray(); | final public void ishr() { if (DEBUG) System.out.println(position + "\t\tishr"); //$NON-NLS-1$ countLabels = 0; stackDepth--; try { position++; bCodeStream[classFileOffset++] = OPC_ishr; } catch (IndexOutOfBoundsException e) { resizeByteArray(OPC_ishr); }} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/3a562aaf09f9f323b583086b80b4683378886606/CodeStream.java/buggy/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
727,
1071,
918,
353,
7256,
1435,
288,
202,
430,
261,
9394,
13,
2332,
18,
659,
18,
8222,
12,
3276,
397,
1548,
88,
64,
88,
1468,
86,
8863,
4329,
3993,
17,
5106,
17,
21,
8,
202,
1883,
5888,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
727,
1071,
918,
353,
7256,
1435,
288,
202,
430,
261,
9394,
13,
2332,
18,
659,
18,
8222,
12,
3276,
397,
1548,
88,
64,
88,
1468,
86,
8863,
4329,
3993,
17,
5106,
17,
21,
8,
202,
1883,
5888,
... |
persp.removeFastViewHack(ref); | persp.removeFastView(ref, false); | public void setTrimState(int newTrimState) { if (newTrimState == getTrimState()) return; // Remember the new state int oldTrimState = getTrimState(); // set the new one super.setTrimState(newTrimState); WorkbenchWindow wbw = (WorkbenchWindow) getWorkbenchWindow(); if (wbw == null) return; // Access workbench context Perspective persp = page.getActivePerspective(); ITrimManager tbm = wbw.getTrimManager(); ViewStackTrimPart viewStackTrim = (ViewStackTrimPart) tbm.getTrim(getID()); // Are we moving the View Stack -to- the trim? if (oldTrimState == LayoutPart.TRIMSTATE_NORMAL) { // Remove the real stack from the presentation ContainerPlaceholder ph = null; ph = new ContainerPlaceholder(getID()); ph.setRealContainer(this); getContainer().replace(this, ph); page.refreshActiveView(); // Is it already in the trim? if (viewStackTrim == null) { // If it's not already in the trim...create it int side = SWT.BOTTOM; if (persp != null) side = persp.calcStackSide(getBounds()); viewStackTrim = new ViewStackTrimPart(wbw, ph); viewStackTrim.dock(side); tbm.addTrim(side, viewStackTrim); } // Refresh the trim's state and show it viewStackTrim.setPlaceholder(ph); viewStackTrim.refresh(); // Make the views 'fast' if (persp != null) { List refs = viewStackTrim.getViewRefs(); for (Iterator refIter = refs.iterator(); refIter .hasNext();) { IViewReference ref = (IViewReference) refIter.next(); persp.addFastViewHack(ref); } } tbm.setTrimVisible(viewStackTrim, true); } // Are we restoring the View Stack -from- the trim? if (newTrimState == LayoutPart.TRIMSTATE_NORMAL) { if (viewStackTrim == null) return; // Make the views un-'fast' if (persp != null) { List refs = viewStackTrim.getViewRefs(); for (Iterator refIter = refs.iterator(); refIter .hasNext();) { IViewReference ref = (IViewReference) refIter.next(); persp.removeFastViewHack(ref); } } // hide the trim widget tbm.setTrimVisible(viewStackTrim, false); // Restore the real container ContainerPlaceholder ph = viewStackTrim.getPlaceholder(); ILayoutContainer container = ph.getContainer(); LayoutPart ps = ph.getRealContainer(); ph.setRealContainer(null); container.replace(ph, ps); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/0d98e0705c30cdb00b452b4fac8f914fa706e643/ViewStack.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewStack.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
14795,
1119,
12,
474,
394,
14795,
1119,
13,
288,
377,
202,
430,
261,
2704,
14795,
1119,
422,
336,
14795,
1119,
10756,
377,
202,
202,
2463,
31,
377,
202,
759,
23133,
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,
377,
1071,
918,
444,
14795,
1119,
12,
474,
394,
14795,
1119,
13,
288,
377,
202,
430,
261,
2704,
14795,
1119,
422,
336,
14795,
1119,
10756,
377,
202,
202,
2463,
31,
377,
202,
759,
23133,
326,
... |
asUnsignedByte(code[handled-2]) << 8 | asUnsignedByte(code[handled-1]); | getUnsignedShort(code,handled-2); if (DEBUG) System.out.println("offset before = " + offsetBefore); | public void visit(Code obj) { CodeException [] exp = obj.getExceptionTable(); if (exp == null) return; byte [] code = obj.getCode(); for(int i = 0; i < exp.length; i++) { int handled = exp[i].getHandlerPC(); int start = exp[i].getStartPC(); int end = exp[i].getEndPC(); int cause = exp[i].getCatchType(); boolean exitInTryBlock = false; for(int j = start; j <= end;) { int opcode = asUnsignedByte(code[j]); if (opcode >= IRETURN && opcode <= RETURN || opcode >=IFEQ && opcode <= GOTO && (opcode != GOTO || j < end) ) { exitInTryBlock = true; break; /* System.out.println(" exit: " + opcode + " in " + betterMethodName); */ } if (NO_OF_OPERANDS[opcode] < 0) { exitInTryBlock = true; break; } j += 1+NO_OF_OPERANDS[opcode]; } if (exitInTryBlock) continue; String c ; if (cause == 0) c = "Throwable"; else { c = Utility.compactClassName( constant_pool.getConstantString(cause, CONSTANT_Class), false); if (!isChecked(c)) continue; } if (handled < 5) continue; /* if ( (0xff&code[handled]) == POP) { System.out.println( "DE: " + betterMethodName + " might ignore " + c + " (" + (0xff&code[handled] ) + "," + (0xff&code[handled+1] ) +")" ); } else */ int opcode = asUnsignedByte(code[handled]); // System.out.println( "DE: opcode is " + opcode + ", " + asUnsignedByte(code[handled+1])); boolean drops = false; if ( opcode >= ASTORE_0 && opcode <= ASTORE_3 && asUnsignedByte(code[handled+1]) == RETURN) { if (DEBUG) System.out.println("Drop 1"); drops = true; } if (handled+2 < code.length &&opcode == ASTORE && asUnsignedByte(code[handled+2]) == RETURN) { drops = true; if (DEBUG) System.out.println("Drop 2"); } if (handled+3 < code.length && !exitInTryBlock) { if ( opcode >= ASTORE_0 && opcode <= ASTORE_3 && asUnsignedByte(code[handled-3]) == GOTO) { int offsetBefore = asUnsignedByte(code[handled-2]) << 8 | asUnsignedByte(code[handled-1]); if (offsetBefore == 4) { drops = true; if (DEBUG) System.out.println("Drop 3"); } } if ( opcode == ASTORE && asUnsignedByte(code[handled-3]) == GOTO) { int offsetBefore = asUnsignedByte(code[handled-2]) << 8 | asUnsignedByte(code[handled-1]); if (offsetBefore == 5) { drops = true; if (DEBUG) System.out.println("Drop 4"); } } if ( opcode >= ASTORE_0 && opcode <= ASTORE_3 && asUnsignedByte(code[handled+1]) == GOTO && asUnsignedByte(code[handled-3]) == GOTO) { int offsetBefore = asUnsignedByte(code[handled-2]) << 8 | asUnsignedByte(code[handled-1]); int offsetAfter = asUnsignedByte(code[handled+2]) << 8 | asUnsignedByte(code[handled+3]); if (offsetAfter > 0 && offsetAfter+4 == offsetBefore) { drops = true; if (DEBUG) System.out.println("Drop 5"); } } if ( opcode == ASTORE && asUnsignedByte(code[handled+2]) == GOTO && asUnsignedByte(code[handled-3]) == GOTO) { int offsetBefore = asUnsignedByte(code[handled-2]) << 8 | asUnsignedByte(code[handled-1]); int offsetAfter = asUnsignedByte(code[handled+3]) << 8 | asUnsignedByte(code[handled+4]); if (offsetAfter > 0 && offsetAfter+5 == offsetBefore) { drops = true; if (DEBUG) System.out.println("Drop 6"); } } } if (end-start >= 5 && drops && !c.equals("java.lang.InterruptedException") && !c.equals("java.lang.CloneNotSupportedException")) { String key = (exitInTryBlock ? "mightDrop," : "mightIgnore,") + betterMethodName + "," + c; if (reported.add(key)) { BugInstance bugInstance = new BugInstance(exitInTryBlock ? "DE_MIGHT_DROP" : "DE_MIGHT_IGNORE", NORMAL_PRIORITY) .addClassAndMethod(this); SourceLineAnnotation srcLine = bugInstance.addSourceLine(this, handled).getPrimarySourceLineAnnotation(); if (srcLine == null || !catchBlockHasComment(srcLine)) { bugInstance.addClass(c).describe("CLASS_EXCEPTION"); bugReporter.reportBug(bugInstance); } } } }} | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/a77320a7b4a7a5046f31488586fb3e21748ced69/DroppedException.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/detect/DroppedException.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
12,
1085,
1081,
13,
288,
225,
202,
1085,
503,
5378,
1329,
273,
1081,
18,
588,
503,
1388,
5621,
202,
430,
261,
2749,
422,
446,
13,
327,
31,
202,
7229,
5378,
981,
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,
3757,
12,
1085,
1081,
13,
288,
225,
202,
1085,
503,
5378,
1329,
273,
1081,
18,
588,
503,
1388,
5621,
202,
430,
261,
2749,
422,
446,
13,
327,
31,
202,
7229,
5378,
981,
273,
... |
protected abstract void sendNotifcations( ); | protected abstract void sendNotifcations( boolean transactionStarted ); | protected abstract void sendNotifcations( ); | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/41b899c36b1386d90a6f328413dee35f0ae93e5e/ActivityRecord.java/buggy/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/activity/ActivityRecord.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
8770,
918,
1366,
1248,
430,
71,
1012,
12,
11272,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
8770,
918,
1366,
1248,
430,
71,
1012,
12,
11272,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
toggle( saHighlighted.getShape( ) ); saHighlighted = null; bFound = false; | public void mouseMoved( MouseEvent e ) { final Point p = e.getPoint( ); // 1. CHECK FOR MOUSE-CLICK TRIGGERS List al = getActionsForConditions( new TriggerCondition[]{ TriggerCondition.MOUSE_CLICK_LITERAL, TriggerCondition.ONCLICK_LITERAL } ); if ( al != null ) { ShapedAction sa; Shape sh; // POLL EACH EVENT REGISTERED FOR MOUSE CLICKS boolean bFound = false; for ( int i = 0; i < al.size( ); i++ ) { sa = (ShapedAction) al.get( i ); sh = sa.getShape( ); if ( sh.contains( p ) ) { if ( sa != saHighlighted ) { if ( saHighlighted != null ) { toggle( saHighlighted.getShape( ) ); } ( (JComponent) iun.peerInstance( ) ).setCursor( Cursor.getPredefinedCursor( Cursor.HAND_CURSOR ) ); toggle( sh ); } saHighlighted = sa; bFound = true; break; } } if ( !bFound && saHighlighted != null ) { ( (JComponent) iun.peerInstance( ) ).setCursor( Cursor.getDefaultCursor( ) ); toggle( saHighlighted.getShape( ) ); saHighlighted = null; bFound = false; } } // 2. CHECK FOR MOUSE-HOVER CONDITION al = getActionsForConditions( new TriggerCondition[]{ TriggerCondition.MOUSE_HOVER_LITERAL, TriggerCondition.ONMOUSEMOVE_LITERAL, TriggerCondition.ONMOUSEOVER_LITERAL } ); if ( al != null ) { ShapedAction sa; Shape sh; // POLL EACH EVENT REGISTERED FOR MOUSE CLICKS boolean bFound = false; for ( int i = 0; i < al.size( ); i++ ) { sa = (ShapedAction) al.get( i ); sh = sa.getShape( ); if ( sh.contains( p ) ) { if ( sa != saTooltip ) { hideTooltip( ); } saTooltip = sa; bFound = true; showTooltip( saTooltip ); break; } } if ( !bFound && saTooltip != null ) { hideTooltip( ); saTooltip = null; bFound = false; } } } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/11599909231737b3f7f4a772c392835d2f7852d4/SwingEventHandler.java/clean/chart/org.eclipse.birt.chart.device.extension/src/org/eclipse/birt/chart/device/swing/SwingEventHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
7644,
25317,
12,
17013,
1133,
425,
262,
202,
95,
202,
202,
6385,
4686,
293,
273,
425,
18,
588,
2148,
12,
11272,
202,
202,
759,
404,
18,
14565,
12108,
16070,
8001,
17,
769... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
25317,
12,
17013,
1133,
425,
262,
202,
95,
202,
202,
6385,
4686,
293,
273,
425,
18,
588,
2148,
12,
11272,
202,
202,
759,
404,
18,
14565,
12108,
16070,
8001,
17,
769... | |
tableCaption( "Declared Dependencies" ); | tableCaption( "The following is a list of dependencies for this project. These dependencies " + "are required to compile and run the application:" ); | public void renderBody() { startSection( getTitle() ); startTable(); tableCaption( "Declared Dependencies" ); tableHeader( new String[]{"GroupId", "ArtifactId", "Version"} ); for ( Iterator i = model.getDependencies().iterator(); i.hasNext(); ) { Dependency d = (Dependency) i.next(); tableRow( new String[]{d.getGroupId(), d.getArtifactId(), d.getVersion()} ); } endTable(); endSection(); } | 47160 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47160/f3fa32eebe285e13a42c344d73a4af2d4651cae6/DependenciesReport.java/buggy/sandbox/maven-reports/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1743,
2250,
1435,
3639,
288,
5411,
787,
5285,
12,
10786,
1435,
11272,
5411,
787,
1388,
5621,
5411,
1014,
21158,
12,
315,
1986,
3751,
353,
279,
666,
434,
5030,
364,
333,
1984,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1743,
2250,
1435,
3639,
288,
5411,
787,
5285,
12,
10786,
1435,
11272,
5411,
787,
1388,
5621,
5411,
1014,
21158,
12,
315,
1986,
3751,
353,
279,
666,
434,
5030,
364,
333,
1984,
1... |
int setSize = theSet.size(); | System.err.println(" evaluateSetNumber() " ); int setSize = theSet.size(); | protected Object evaluateSetNumber(List theSet, Number theNum, boolean reverse, Navigator nav) { int setSize = theSet.size(); Comparable setElement = null; for ( int i = 0 ; i < setSize ; ++i ) { setElement = (Comparable) NumberFunction.evaluate( theSet.get( i ), nav ); if ( reverse && ( setElement.compareTo( theNum ) > 0 ) ) { return Boolean.TRUE; } else if ( setElement.compareTo( theNum ) < 0 ) { return Boolean.TRUE; } } return Boolean.FALSE; } | 47970 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47970/7d145599ef4cb3d572d68f0cfc5dd88eb2bac5cf/DefaultLessThanExpr.java/clean/src/java/main/org/jaxen/expr/DefaultLessThanExpr.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1033,
5956,
694,
1854,
12,
682,
326,
694,
16,
4766,
4202,
3588,
326,
2578,
16,
4766,
4202,
1250,
4219,
16,
4766,
4202,
423,
13061,
8775,
13,
565,
288,
3639,
2332,
18,
370,
18,
822... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
5956,
694,
1854,
12,
682,
326,
694,
16,
4766,
4202,
3588,
326,
2578,
16,
4766,
4202,
1250,
4219,
16,
4766,
4202,
423,
13061,
8775,
13,
565,
288,
3639,
2332,
18,
370,
18,
822... |
FeeBO periodicFee = TestObjectFactory.createPeriodicAmountFee("Periodic Fee", FeeCategory.LOAN, "100", MeetingFrequency.MONTHLY, Short .valueOf("1")); | FeeBO periodicFee = TestObjectFactory.createPeriodicAmountFee( "Periodic Fee", FeeCategory.LOAN, "100", MeetingFrequency.MONTHLY, Short.valueOf("1")); | public void testDisburseLoanWithAllTypeOfFees() throws NumberFormatException, InvalidUserException, PropertyNotFoundException, SystemException, ApplicationException { Short dayOfMonth = (short)1; MeetingBO meeting = TestObjectFactory.getMeetingHelper(2,2,4); meeting.setMeetingStartDate(Calendar.getInstance()); meeting.getMeetingDetails().getMeetingRecurrence().setDayNumber(dayOfMonth); TestObjectFactory.createMeeting(meeting); center = TestObjectFactory.createCenter("Center", Short.valueOf("13"), "1.1", meeting, new Date(System.currentTimeMillis())); group = TestObjectFactory.createGroup("Group", Short.valueOf("9"), "1.1.1", center, new Date(System.currentTimeMillis())); LoanOfferingBO loanOffering = TestObjectFactory.createLoanOffering( "Loan", Short.valueOf("2"), new Date(System.currentTimeMillis()), Short.valueOf("1"), 300.0, 1.2, Short.valueOf("3"), Short.valueOf("1"), Short .valueOf("3"), Short.valueOf("1"), Short.valueOf("0"), Short.valueOf("1"), center.getCustomerMeeting().getMeeting()); Calendar disbursementDate = new GregorianCalendar(); int year = disbursementDate.get(Calendar.YEAR); int month = disbursementDate.get(Calendar.MONTH); int day = disbursementDate.get(0); if(disbursementDate.get(Calendar.DAY_OF_MONTH) == dayOfMonth.intValue()) disbursementDate = new GregorianCalendar(year, month,day); else disbursementDate = new GregorianCalendar(year, month+1,day); List<FeeView> feeViewList=new ArrayList<FeeView>(); FeeBO upfrontFee = TestObjectFactory.createOneTimeRateFee("Upfront Fee", FeeCategory.LOAN, Double.valueOf("20"),FeeFormula.AMOUNT, FeePayment.UPFRONT); feeViewList.add(new FeeView(upfrontFee)); FeeBO disbursementFee = TestObjectFactory.createOneTimeRateFee("Disbursment Fee", FeeCategory.LOAN,Double.valueOf("30"), FeeFormula.AMOUNT_AND_INTEREST,FeePayment.TIME_OF_DISBURSMENT); feeViewList.add(new FeeView(disbursementFee)); FeeBO firstRepaymentFee = TestObjectFactory.createOneTimeRateFee("First Repayment Fee", FeeCategory.LOAN,Double.valueOf("40"),FeeFormula.INTEREST, FeePayment.TIME_OF_FIRSTLOANREPAYMENT); feeViewList.add(new FeeView(firstRepaymentFee)); FeeBO periodicFee = TestObjectFactory.createPeriodicAmountFee("Periodic Fee", FeeCategory.LOAN, "100", MeetingFrequency.MONTHLY, Short .valueOf("1")); feeViewList.add(new FeeView(periodicFee)); accountBO=new LoanBO(TestObjectFactory.getUserContext(), loanOffering, group, AccountState.getStatus(Short.valueOf("5")), new Money("300.0"), Short.valueOf("6"),disbursementDate.getTime(),false,1.2,(short) 0, new Fund(),feeViewList); new TestObjectPersistence().persist(accountBO); disbursementDate = new GregorianCalendar(); year = disbursementDate.get(Calendar.YEAR); month = disbursementDate.get(Calendar.MONTH); day = disbursementDate.get(0); if(disbursementDate.get(Calendar.DAY_OF_MONTH) == dayOfMonth.intValue()) disbursementDate = new GregorianCalendar(year, month+2,day); else disbursementDate = new GregorianCalendar(year, month+3,day); ((LoanBO) accountBO).disburseLoan("1234", disbursementDate.getTime(), Short.valueOf("1"), accountBO.getPersonnel(), disbursementDate.getTime(), Short .valueOf("1")); Session session = HibernateUtil.getSessionTL(); HibernateUtil.startTransaction(); session.save(accountBO); HibernateUtil.getTransaction().commit(); } | 45468 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45468/8b7a0cdb79f363f8ac3f82d8f06e16d5166a08ed/TestLoanBO.java/clean/mifos/test/org/mifos/application/accounts/loan/business/TestLoanBO.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1669,
70,
295,
307,
1504,
304,
1190,
1595,
559,
951,
2954,
281,
1435,
1216,
12100,
16,
1962,
1299,
503,
16,
4276,
3990,
16,
26731,
16,
28816,
288,
202,
202,
4897,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1669,
70,
295,
307,
1504,
304,
1190,
1595,
559,
951,
2954,
281,
1435,
1216,
12100,
16,
1962,
1299,
503,
16,
4276,
3990,
16,
26731,
16,
28816,
288,
202,
202,
4897,
2... |
return processSocket(socket,false); | try { if (executor == null) { getWorkerThread().assign(socket); } else { executor.execute(new SocketProcessor(socket)); } } catch (Throwable t) { log.error(sm.getString("endpoint.process.fail"), t); return false; } return true; | protected boolean processSocket(SocketChannel socket) { return processSocket(socket,false); } | 46196 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46196/b85225634e2e33292e552e0f63256b46e6684cdc/NioEndpoint.java/buggy/java/org/apache/tomcat/util/net/NioEndpoint.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1250,
1207,
4534,
12,
4534,
2909,
2987,
13,
288,
3639,
775,
288,
309,
261,
21097,
422,
446,
13,
288,
336,
6671,
3830,
7675,
6145,
12,
7814,
1769,
289,
225,
469,
288,
6601,
18,
883... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1250,
1207,
4534,
12,
4534,
2909,
2987,
13,
288,
3639,
775,
288,
309,
261,
21097,
422,
446,
13,
288,
336,
6671,
3830,
7675,
6145,
12,
7814,
1769,
289,
225,
469,
288,
6601,
18,
883... |
new CompLister(output, ucd, 4).print(); | new CompLister(output, 4).print(); | public static void generateCompExclusions(String version) throws IOException { PrintWriter output = Utility.openPrintWriter("DerivedData/CompositionExclusions" + getFileSuffix(true)); generateBat("DerivedData/", "CompositionExclusions", getFileSuffix(true)); output.println("# CompositionExclusions" + getFileSuffix(false)); output.println("#"); output.println("# Composition Exclusions"); output.println("# This file lists the characters from the UAX #15 Composition Exclusion Table."); output.println("#"); output.println("# For more information, see"); output.println("# http://www.unicode.org/unicode/reports/tr15/#Primary Exclusion List Table"); output.println("# Generated: " + new Date() + ", MD"); output.println(HORIZONTAL_LINE); output.println(); output.println("# (1) Script Specifics"); output.println("# This list of characters cannot be derived from the UnicodeData file."); output.println(HORIZONTAL_LINE); output.println(); new CompLister(output, ucd, 1).print(); output.println(HORIZONTAL_LINE); output.println("# (2) Post Composition Version precomposed characters"); output.println("# These characters can be derived from a post-3.0.0 UnicodeData file"); output.println("# by comparison to the 3.0.0 UnicodeData file."); output.println(HORIZONTAL_LINE); output.println(); new CompLister(output, ucd, 2).print(); output.println(HORIZONTAL_LINE); output.println("# (3) Singleton Decompositions"); output.println("# These characters can be derived from the UnicodeData file"); output.println("# by including all characters whose canonical decomposition"); output.println("# consists of a single character."); output.println("# These characters are simply quoted here for reference."); output.println(HORIZONTAL_LINE); output.println(); new CompLister(output, ucd, 3).print(); output.println(HORIZONTAL_LINE); output.println("# (4) Non-Starter Decompositions"); output.println("# These characters can be derived from the UnicodeData file"); output.println("# by including all characters whose canonical decomposition consists"); output.println("# of a sequence of characters, the first of which has a non-zero"); output.println("# combining class."); output.println("# These characters are simply quoted here for reference."); output.println(HORIZONTAL_LINE); output.println(); new CompLister(output, ucd, 4).print(); output.close(); } | 5620 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5620/a903b84867c303be450a264f036e46ffde646df7/GenerateData.java/clean/tools/unicodetools/com/ibm/text/UCD/GenerateData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2103,
2945,
424,
25364,
12,
780,
1177,
13,
1216,
1860,
288,
3639,
14071,
876,
273,
13134,
18,
3190,
5108,
2289,
2932,
21007,
751,
19,
28940,
424,
25364,
6,
397,
6034,
5791... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2103,
2945,
424,
25364,
12,
780,
1177,
13,
1216,
1860,
288,
3639,
14071,
876,
273,
13134,
18,
3190,
5108,
2289,
2932,
21007,
751,
19,
28940,
424,
25364,
6,
397,
6034,
5791... |
release(); | public int doEndTag() throws JspException { // Check role if(role != null && !((HttpServletRequest)pageContext.getRequest()).isUserInRole(role) ) { return EVAL_PAGE; } // end if // Get context ComponentContext compContext = (ComponentContext)pageContext.getAttribute( ComponentConstants.COMPONENT_CONTEXT, pageContext.REQUEST_SCOPE); if( compContext == null ) throw new JspException ( "Error - tag.getAsString : component context is not defined. Check tag syntax" ); Object value = compContext.getAttribute(attribute); if( value == null) { // no value : throw error or fail silently according to ignore if(isErrorIgnored == false ) throw new JspException ( "Error - tag.getAsString : attribute '"+ attribute + "' not found in context. Check tag syntax" ); else return EVAL_PAGE; } // end if try { pageContext.getOut().print( value ); } catch( IOException ex ) { ex.printStackTrace(); throw new JspException ( "Error - tag.getProperty : IOException "); } release(); return EVAL_PAGE; } | 48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/9b2ad740df563248054f1b3b061889d78c8cbf19/GetAttributeTag.java/buggy/src/share/org/apache/struts/taglib/tiles/GetAttributeTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
741,
25633,
1435,
1216,
27485,
288,
1377,
368,
2073,
2478,
565,
309,
12,
4615,
480,
446,
597,
401,
12443,
2940,
18572,
13,
2433,
1042,
18,
588,
691,
1435,
2934,
291,
1299,
382,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
25633,
1435,
1216,
27485,
288,
1377,
368,
2073,
2478,
565,
309,
12,
4615,
480,
446,
597,
401,
12443,
2940,
18572,
13,
2433,
1042,
18,
588,
691,
1435,
2934,
291,
1299,
382,... | |
FTPFileEntryParser parser) | FTPFileEntryParser parser, String encoding) | public static FTPFileList create(InputStream stream, FTPFileEntryParser parser) throws IOException { FTPFileList list = new FTPFileList(parser); list.readStream(stream); parser.preParse(list.lines); return list; } | 50121 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50121/69e6aa7bc544094738945fe169700afe768db853/FTPFileList.java/buggy/src/java/org/apache/commons/net/ftp/FTPFileList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19324,
26098,
752,
12,
4348,
1407,
16,
4766,
1377,
19324,
20110,
2678,
2082,
16,
514,
2688,
13,
5411,
1216,
1860,
565,
288,
3639,
19324,
26098,
666,
273,
394,
19324,
26098,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19324,
26098,
752,
12,
4348,
1407,
16,
4766,
1377,
19324,
20110,
2678,
2082,
16,
514,
2688,
13,
5411,
1216,
1860,
565,
288,
3639,
19324,
26098,
666,
273,
394,
19324,
26098,
12,
... |
{ JFileChooser fileChooser = new JFileChooser(XmlFile.prefsDir()); int retVal = fileChooser.showOpenDialog(null); if (retVal != JFileChooser.APPROVE_OPTION) { return; } if (ThrottleFrameManager.instance().getThrottleFrames().hasNext()) { Object[] possibleValues = {"Merge", "Replace", "Cancel"}; int selectedValue = JOptionPane.showOptionDialog(null, "Throttles are currently open.\nDo you wish to Merge " + "saved throttles with open throttles or\n" + "Replace open throttles", "Loading Throttles", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE, null, possibleValues, possibleValues[0]); if (selectedValue == JOptionPane.NO_OPTION) { ThrottleFrameManager.instance().requestAllThrottleFramesDestroyed(); } } loadThrottles(fileChooser.getSelectedFile()); } | { JFileChooser fileChooser = new JFileChooser(XmlFile.prefsDir()); int retVal = fileChooser.showOpenDialog(null); if (retVal != JFileChooser.APPROVE_OPTION) { return; } if (ThrottleFrameManager.instance().getThrottleFrames().hasNext()) { Object[] possibleValues = {"Merge", "Replace", "Cancel"}; int selectedValue = JOptionPane.showOptionDialog(null, "Throttles are currently open.\nDo you wish to Merge " + "saved throttles with open throttles or\n" + "Replace open throttles", "Loading Throttles", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE, null, possibleValues, possibleValues[0]); if (selectedValue == JOptionPane.NO_OPTION) { ThrottleFrameManager.instance().requestAllThrottleFramesDestroyed(); } } loadThrottles(fileChooser.getSelectedFile()); } | public void actionPerformed(ActionEvent e) { JFileChooser fileChooser = new JFileChooser(XmlFile.prefsDir()); int retVal = fileChooser.showOpenDialog(null); if (retVal != JFileChooser.APPROVE_OPTION) { return; // give up if no file selected } // if exising frames are open ask to destroy those or merge. if (ThrottleFrameManager.instance().getThrottleFrames().hasNext()) { Object[] possibleValues = {"Merge", "Replace", "Cancel"}; int selectedValue = JOptionPane.showOptionDialog(null, "Throttles are currently open.\nDo you wish to Merge " + "saved throttles with open throttles or\n" + "Replace open throttles", "Loading Throttles", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE, null, possibleValues, possibleValues[0]); if (selectedValue == JOptionPane.NO_OPTION) { // replace chosen - close all then load ThrottleFrameManager.instance().requestAllThrottleFramesDestroyed(); } } loadThrottles(fileChooser.getSelectedFile()); } | 213 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/213/7824e5694ccf4add1e9e632b280368f5b6f70447/LoadXmlThrottleAction.java/clean/jmri/jmrit/throttle/LoadXmlThrottleAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
26100,
12,
1803,
1133,
425,
13,
202,
95,
202,
202,
46,
812,
17324,
585,
17324,
273,
394,
804,
812,
17324,
12,
4432,
812,
18,
1484,
2556,
1621,
10663,
202,
202,
474,
12197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26100,
12,
1803,
1133,
425,
13,
202,
95,
202,
202,
46,
812,
17324,
585,
17324,
273,
394,
804,
812,
17324,
12,
4432,
812,
18,
1484,
2556,
1621,
10663,
202,
202,
474,
12197... |
public void accept(NodeVisitor iVisitor) { iVisitor.visitDefinedNode(this); } | public void accept(NodeVisitor iVisitor) { iVisitor.visitDefinedNode(this); } | public void accept(NodeVisitor iVisitor) { iVisitor.visitDefinedNode(this); } | 52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/6f48980923c4b06bac2890165c858310895f9a14/DefinedNode.java/buggy/org/jruby/nodes/DefinedNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2791,
12,
907,
7413,
277,
7413,
13,
202,
202,
95,
202,
202,
77,
7413,
18,
11658,
8116,
907,
12,
2211,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2791,
12,
907,
7413,
277,
7413,
13,
202,
202,
95,
202,
202,
77,
7413,
18,
11658,
8116,
907,
12,
2211,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
this.groupCalculationUtil.getResultSetCache( ) ); | this.groupCalculationUtil.getResultSetCache( ).getCount( ) ); | private GroupBoundaryInfo getGroupBoundaryInfo( int groupLevel, int groupIndex ) throws DataException { // j is the group index, is 0-based int startIdx = GroupUtil.getGroupFirstRowIndex( groupLevel, groupIndex, groups, this.groupCalculationUtil.getResultSetCache( ) ); int endIdx = this.groupCalculationUtil.getResultSetCache( ).getCount( ) - 1; if ( groupIndex < groups[groupLevel - 1].size( ) - 1 ) { endIdx = GroupUtil.getGroupFirstRowIndex( groupLevel, groupIndex + 1, groups, this.groupCalculationUtil.getResultSetCache( ) ) - 1; } assert startIdx >= 0; assert endIdx >= 0; GroupBoundaryInfo result = new GroupBoundaryInfo( startIdx, endIdx ); return result; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/5ec5d7f41b491569b61310c9e9a0a719aa271a7c/GroupInformationUtil.java/buggy/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/transform/group/GroupInformationUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
3756,
11941,
966,
11751,
11941,
966,
12,
509,
1041,
2355,
16,
1082,
202,
474,
1041,
1016,
262,
1216,
1910,
503,
202,
95,
202,
202,
759,
525,
353,
326,
1041,
770,
16,
353,
374... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
3756,
11941,
966,
11751,
11941,
966,
12,
509,
1041,
2355,
16,
1082,
202,
474,
1041,
1016,
262,
1216,
1910,
503,
202,
95,
202,
202,
759,
525,
353,
326,
1041,
770,
16,
353,
374... |
classFile.add(ByteCode.GETSTATIC, classFile.fullyQualifiedForm(this.name), constantName, constantType); | classFile.add( ByteCode.GETSTATIC, classFile.fullyQualifiedForm(generatedClassName), constantName, constantType); | private void visitLiteral(Node node) { if (node.getType() == TokenStream.STRING) { // just load the string constant push(node.getString()); } else { double num = node.getDouble(); if (node.getIntProp(Node.ISNUMBER_PROP, -1) != -1) { push(num); } else if (itsConstantListSize >= 2000) { // There appears to be a limit in the JVM on either the number // of static fields in a class or the size of the class // initializer. Either way, we can't have any more than 2000 // statically init'd constants. pushAsWrapperObject(num); } else { if (num != num) { // Add NaN object classFile.add(ByteCode.GETSTATIC, "org/mozilla/javascript/ScriptRuntime", "NaNobj", "Ljava/lang/Double;"); } else { String constantName = "jsK_" + addNumberConstant(num); String constantType = getStaticConstantWrapperType(num); classFile.add(ByteCode.GETSTATIC, classFile.fullyQualifiedForm(this.name), constantName, constantType); } } } } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/e741d0cb339d08bcfa9cb588bcb30951ac0436be/Codegen.java/buggy/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3757,
6177,
12,
907,
756,
13,
288,
3639,
309,
261,
2159,
18,
588,
559,
1435,
422,
3155,
1228,
18,
5804,
13,
288,
5411,
368,
2537,
1262,
326,
533,
5381,
5411,
1817,
12,
2159,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3757,
6177,
12,
907,
756,
13,
288,
3639,
309,
261,
2159,
18,
588,
559,
1435,
422,
3155,
1228,
18,
5804,
13,
288,
5411,
368,
2537,
1262,
326,
533,
5381,
5411,
1817,
12,
2159,
... |
s.checkWrite(safeCanonicalPath()); | s.checkWrite(sname); s.checkWrite(dname); | public boolean renameTo (File dest) { SecurityManager s = System.getSecurityManager(); if (s != null) { // FIXME: JCL doesn't specify which path to check. We check the // source since we can canonicalize it. s.checkWrite(safeCanonicalPath()); } return performRenameTo (dest); } | 1043 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1043/13487a5ef4e62b2ad9a1836e7826c648d61b26b3/File.java/clean/libjava/java/io/File.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
6472,
774,
261,
812,
1570,
13,
225,
288,
565,
6036,
1318,
272,
273,
2332,
18,
588,
4368,
1318,
5621,
565,
309,
261,
87,
480,
446,
13,
1377,
288,
202,
759,
9852,
30,
804,
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,
1071,
1250,
6472,
774,
261,
812,
1570,
13,
225,
288,
565,
6036,
1318,
272,
273,
2332,
18,
588,
4368,
1318,
5621,
565,
309,
261,
87,
480,
446,
13,
1377,
288,
202,
759,
9852,
30,
804,
5... |
for (int i=0;i<attributes.length;i++) if (missing[i]) | for (int i=0;i<attributes.length;i++) { if (missing[i]) { | public int hashCode() { int hv = 0; if (key != -999) return key; for (int i=0;i<attributes.length;i++) if (missing[i]) hv += (i*13); else hv += (i * 5 * (attributes[i]+1)); if (key == -999) key = hv; return hv; } | 6866 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6866/f6f62667723170f4030ae82f079e537cd6065be3/DecisionTable.java/clean/classifiers/DecisionTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
13374,
1435,
565,
288,
1377,
509,
366,
90,
273,
374,
31,
1377,
309,
261,
856,
480,
300,
11984,
13,
202,
2463,
498,
31,
1377,
364,
261,
474,
277,
33,
20,
31,
77,
32,
4350,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13374,
1435,
565,
288,
1377,
509,
366,
90,
273,
374,
31,
1377,
309,
261,
856,
480,
300,
11984,
13,
202,
2463,
498,
31,
1377,
364,
261,
474,
277,
33,
20,
31,
77,
32,
4350,
... |
match(input,25,FOLLOW_25_in_curly_chunk2149); | match(input,25,FOLLOW_25_in_curly_chunk2152); | public String curly_chunk() throws RecognitionException { String text; Token any=null; String c = null; text = null; try { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:747:17: ( ( options {greedy=false; } : '{' c= curly_chunk '}' | any= . )* ) // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:747:17: ( options {greedy=false; } : '{' c= curly_chunk '}' | any= . )* { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:747:17: ( options {greedy=false; } : '{' c= curly_chunk '}' | any= . )* loop53: do { int alt53=3; switch ( input.LA(1) ) { case 25: alt53=3; break; case 24: alt53=1; break; case EOL: case ID: case INT: case BOOL: case STRING: case FLOAT: case MISC: case WS: case SH_STYLE_SINGLE_LINE_COMMENT: case C_STYLE_SINGLE_LINE_COMMENT: case MULTI_LINE_COMMENT: case 15: case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 26: case 27: case 28: case 29: case 30: case 31: case 32: case 33: case 34: case 35: case 36: case 37: case 38: case 39: case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: case 48: case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: alt53=2; break; } switch (alt53) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:748:25: '{' c= curly_chunk '}' { match(input,24,FOLLOW_24_in_curly_chunk2143); following.push(FOLLOW_curly_chunk_in_curly_chunk2147); c=curly_chunk(); following.pop(); match(input,25,FOLLOW_25_in_curly_chunk2149); //System.err.println( "chunk [" + c + "]" ); if ( c == null ) { c = ""; } if ( text == null ) { text = "{ " + c + " }"; } else { text = text + " { " + c + " }"; } } break; case 2 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:760:19: any= . { any=(Token)input.LT(1); matchAny(input); //System.err.println( "any [" + any.getText() + "]" ); if ( text == null ) { text = any.getText(); } else { text = text + " " + any.getText(); } } break; default : break loop53; } } while (true); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return text; } | 5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/bf3305a89ef5e916acbab744c38aaaec83bf67ff/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
29270,
67,
6551,
1435,
1216,
9539,
288,
6647,
514,
977,
31,
3639,
3155,
1281,
33,
2011,
31,
3639,
514,
276,
273,
446,
31,
1171,
202,
202,
955,
273,
446,
31,
540,
202,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
29270,
67,
6551,
1435,
1216,
9539,
288,
6647,
514,
977,
31,
3639,
3155,
1281,
33,
2011,
31,
3639,
514,
276,
273,
446,
31,
1171,
202,
202,
955,
273,
446,
31,
540,
202,
3639,
... |
if (!fEntityScanner.skipString(fElementQName.rawname)) { reportFatalError("ETagRequired", new Object[]{fElementQName.rawname}); } | if (!fEntityScanner.skipString(fElementQName.rawname)) { reportFatalError( "ETagRequired", new Object[] { fElementQName.rawname }); } | protected int scanEndElement() throws IOException, XNIException { if (DEBUG_CONTENT_SCANNING) System.out.println(">>> scanEndElement()"); // pop context fElementStack.popElement(fElementQName) ; // Take advantage of the fact that next string _should_ be "fElementQName.rawName", //In scanners most of the time is consumed on checks done for XML characters, we can // optimize on it and avoid the checks done for endElement, //we will also avoid symbol table lookup - neeraj.bajaj@sun.com // this should work both for namespace processing true or false... //REVISIT: if the string is not the same as expected.. we need to do better error handling.. //We can skip this for now... In any case if the string doesn't match -- document is not well formed. if (!fEntityScanner.skipString(fElementQName.rawname)) { reportFatalError("ETagRequired", new Object[]{fElementQName.rawname}); } // end fEntityScanner.skipSpaces(); if (!fEntityScanner.skipChar('>')) { reportFatalError("ETagUnterminated", new Object[]{fElementQName.rawname}); } fMarkupDepth--; //we have increased the depth for two markup "<" characters fMarkupDepth--; // check that this element was opened in the same entity if (fMarkupDepth < fEntityStack[fEntityDepth - 1]) { reportFatalError("ElementEntityMismatch", new Object[]{fCurrentElement.rawname}); } // call handler if (fDocumentHandler != null ) { fDocumentHandler.endElement(fElementQName, null); if (fBindNamespaces) { fNamespaceContext.popContext(); } } return fMarkupDepth; } // scanEndElement():int | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/d954abe66b7b1e4cc31b4a4cd05201210fc8aa4a/XML11NSDocumentScannerImpl.java/buggy/src/org/apache/xerces/impl/XML11NSDocumentScannerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
509,
4135,
1638,
1046,
1435,
1216,
1860,
16,
1139,
50,
45,
503,
288,
202,
202,
430,
261,
9394,
67,
9689,
67,
2312,
11489,
1360,
13,
2332,
18,
659,
18,
8222,
2932,
23012,
4135... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
509,
4135,
1638,
1046,
1435,
1216,
1860,
16,
1139,
50,
45,
503,
288,
202,
202,
430,
261,
9394,
67,
9689,
67,
2312,
11489,
1360,
13,
2332,
18,
659,
18,
8222,
2932,
23012,
4135... |
ITask cat = new Task(MylarTasksPlugin.getTaskListManager().genUniqueTaskId(), "Testing Category"); t.addRootTask(cat); | Category cat = new Category("Testing Category"); t.addCategory(cat); | public void testLocalBugUnqual() throws InterruptedException { lists.clear(); String bugPrefix = "Bugzilla-"; TaskList t = MylarTasksPlugin.getTaskListManager().createNewTaskList(); MylarTasksPlugin.getTaskListManager().setTaskList(t); ITask cat = new Task(MylarTasksPlugin.getTaskListManager().genUniqueTaskId(), "Testing Category"); t.addRootTask(cat); BugzillaTask bugTask1 = new BugzillaTask(bugPrefix +94185, "<bugzilla info>"); cat.addSubtask(bugTask1); while(bugTask1.getState() != BugTaskState.FREE){ Thread.sleep(500); } BugzillaTask bugTask2 = new BugzillaTask(bugPrefix + 3692, "<bugzilla info>"); bugTask1.addSubtask(bugTask2); while(bugTask2.getState() != BugTaskState.FREE){ Thread.sleep(500); } BugzillaTask bugTask3 = new BugzillaTask(bugPrefix + 3693, "<bugzilla info>"); cat.addSubtask(bugTask3); while(bugTask3.getState() != BugTaskState.FREE){ Thread.sleep(500); } BugzillaTask bugTask4 = new BugzillaTask(bugPrefix + 9583, "<bugzilla info>"); bugTask3.addSubtask(bugTask4); while(bugTask4.getState() != BugTaskState.FREE){ Thread.sleep(500); } BugzillaMylarSearch s = new BugzillaMylarSearch(BugzillaMylarSearch.LOCAL_UNQUAL, astNodeType); IActiveSearchListener l = new IActiveSearchListener() { private boolean gathered = false; public void searchCompleted(List<?> results) { lists.add(results); gathered = true; } public boolean resultsGathered() { return gathered; } }; // perform the search SearchPluginTestHelper.search(s, l);// System.err.println("Search Took About " + time + " seconds"); // do an inital search assertTrue("No collectors returned", lists.size() != 0); List<?> c = lists.get(0); assertEquals("Results not the right size", 3, c.size()); MylarTasksPlugin.getBridge().removeFromLandmarksHash(astNodeType); MylarTasksPlugin.getTaskListManager().deleteTask(cat); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/bfd6c75025dd41ab813783fc0743c23cfe1c2fc2/BugzillaSearchPluginTest.java/buggy/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/bugzilla/tests/BugzillaSearchPluginTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
2042,
19865,
984,
3369,
1435,
1216,
7558,
288,
202,
202,
9772,
18,
8507,
5621,
202,
202,
780,
7934,
2244,
273,
315,
19865,
15990,
10951,
31,
9506,
202,
2174,
682,
268... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
2042,
19865,
984,
3369,
1435,
1216,
7558,
288,
202,
202,
9772,
18,
8507,
5621,
202,
202,
780,
7934,
2244,
273,
315,
19865,
15990,
10951,
31,
9506,
202,
2174,
682,
268... |
if ( !seenPlatforms.contains( platform.getGeoAccession() ) ) { results.add( convertPlatform( platform ) ); seenPlatforms.add( platform.getGeoAccession() ); } | if ( seenPlatforms.containsKey( platform.getGeoAccession() ) ) continue; log.info( "Converting " + platform ); ArrayDesign arrayDesign = convertPlatform( platform ); results.add( arrayDesign ); seenPlatforms.put( platform.getGeoAccession(), arrayDesign ); bioAssay.getArrayDesignsUsed().add( arrayDesign ); | private BioAssay convertSample( GeoSample sample ) { if ( sample == null ) { log.warn( "Null sample" ); return null; } if ( sample.getGeoAccession() == null || sample.getGeoAccession().length() == 0 ) { log.error( "No GEO accession for sample" ); return null; } log.debug( "Converting sample: " + sample.getGeoAccession() ); BioAssay bioAssay = BioAssay.Factory.newInstance(); String title = sample.getTitle(); if ( StringUtils.isBlank( title ) ) { throw new IllegalArgumentException( "Title cannot be blank for sample " + sample ); // log.warn( "Blank title for sample " + sample ); } bioAssay.setName( sample.getTitle() ); bioAssay.setDescription( sample.getDescription() ); // FIXME: use the ones from the ExperimentalFactor. for ( GeoReplication replication : sample.getReplicates() ) { bioAssay.getFactorValues().add( convertReplicationToFactorValue( replication ) ); } // FIXME: use the ones from the ExperimentalFactor. for ( GeoVariable variable : sample.getVariables() ) { bioAssay.getFactorValues().add( convertVariableToFactorValue( variable ) ); } for ( GeoChannel channel : sample.getChannels() ) { BioMaterial bioMaterial = convertChannel( sample, channel ); bioAssay.getSamplesUsed().add( bioMaterial ); } for ( GeoPlatform platform : sample.getPlatforms() ) { if ( !seenPlatforms.contains( platform.getGeoAccession() ) ) { results.add( convertPlatform( platform ) ); seenPlatforms.add( platform.getGeoAccession() ); } } return bioAssay; } | 4335 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4335/f3cb7f2e3dc2f5ea976d99e3c05701036375abee/GeoConverter.java/clean/src/impl/edu/columbia/gemma/loader/expression/geo/GeoConverter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
21209,
2610,
528,
1765,
8504,
12,
9385,
8504,
3296,
262,
288,
3639,
309,
261,
3296,
422,
446,
262,
288,
5411,
613,
18,
8935,
12,
315,
2041,
3296,
6,
11272,
5411,
327,
446,
31,
363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21209,
2610,
528,
1765,
8504,
12,
9385,
8504,
3296,
262,
288,
3639,
309,
261,
3296,
422,
446,
262,
288,
5411,
613,
18,
8935,
12,
315,
2041,
3296,
6,
11272,
5411,
327,
446,
31,
363... |
action.execute(myObject); | action.execute(object); | public void execute(boolean disposeTree, ObjectTreeAction action) { if (myTree.getExecutedObjects().contains(this)) { return; } myTree.getExecutedObjects().add(this); if (myChildren != null) { final ObjectNode[] children = myChildren.toArray(new ObjectNode[myChildren.size()]); for (int i = children.length - 1; i >= 0; i--) { children[i].execute(disposeTree, action); } } if (disposeTree) { myChildren = null; } try { action.execute(myObject); } catch (Throwable e) { LOG.error(e); } if (disposeTree) { myTree.getObject2NodeMap().remove(myObject); if (myParent != null) { myParent.removeChild(this); } else { myTree.getRootObjects().remove(myObject); } } myTree.getExecutedObjects().remove(this); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/a1b18024366443cdf2c460037633a1ceb1550e67/ObjectNode.java/buggy/util/src/com/intellij/openapi/util/objectTree/ObjectNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1836,
12,
6494,
15825,
2471,
16,
1033,
2471,
1803,
1301,
13,
288,
565,
309,
261,
4811,
2471,
18,
588,
23839,
4710,
7675,
12298,
12,
2211,
3719,
288,
1377,
327,
31,
565,
289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1836,
12,
6494,
15825,
2471,
16,
1033,
2471,
1803,
1301,
13,
288,
565,
309,
261,
4811,
2471,
18,
588,
23839,
4710,
7675,
12298,
12,
2211,
3719,
288,
1377,
327,
31,
565,
289,
... |
protected void substituteScaffoldingCells(Scaffolding scaffolding, Map guidanceMap, Map formsMap, Map styleMap) { | protected void substituteScaffoldingCells(Scaffolding scaffolding, Map guidanceMap, Map formsMap, Map styleMap, String siteId) { | protected void substituteScaffoldingCells(Scaffolding scaffolding, Map guidanceMap, Map formsMap, Map styleMap) { Set sCells = new HashSet(); for (Iterator iter=scaffolding.getScaffoldingCells().iterator(); iter.hasNext();) { ScaffoldingCell scaffoldingCell = (ScaffoldingCell) iter.next(); scaffoldingCell.setId(null); WizardPageDefinition wpd = scaffoldingCell.getWizardPageDefinition(); wpd.setId(null); if (wpd.getGuidance() != null) { if (guidanceMap != null) { wpd.setGuidance((Guidance) guidanceMap.get(wpd.getGuidance().getId().getValue())); } else { wpd.getGuidance().setId(null); } } if (wpd.getStyle() != null) { if (styleMap != null) { wpd.setStyle((Style) styleMap.get(wpd.getStyle().getId().getValue())); } else { wpd.getStyle().setId(null); } } fixPageForms(wpd, formsMap); Set newWorkflows = new HashSet(); for (Iterator jiter=wpd.getEvalWorkflows().iterator(); jiter.hasNext();) { Workflow w = (Workflow)jiter.next(); w.setId(null); Set newItems = new HashSet(); for (Iterator kiter=w.getItems().iterator(); kiter.hasNext();) { WorkflowItem wfi = (WorkflowItem)kiter.next(); wfi.setId(null); newItems.add(wfi); } newWorkflows.add(w); } //scaffoldingCell.getCells().clear(); scaffoldingCell.setCells(new HashSet()); sCells.add(scaffoldingCell); //scaffoldingCell.setScaffolding(scaffolding); } scaffolding.setScaffoldingCells(sCells); } | 48996 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48996/53ab13f925a26749a55d16e2689ed7ba5d5bcc81/HibernateMatrixManagerImpl.java/buggy/matrix/api-impl/src/java/org/theospi/portfolio/matrix/HibernateMatrixManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
918,
14811,
1541,
14847,
310,
10505,
12,
1541,
14847,
310,
20992,
310,
16,
1635,
9875,
1359,
863,
16,
1635,
10138,
863,
16,
1635,
2154,
863,
16,
514,
17749,
13,
288,
1377,
1000,
272... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4750,
918,
14811,
1541,
14847,
310,
10505,
12,
1541,
14847,
310,
20992,
310,
16,
1635,
9875,
1359,
863,
16,
1635,
10138,
863,
16,
1635,
2154,
863,
16,
514,
17749,
13,
288,
1377,
1000,
272... |
gComponent2.translate((size.width - pref.width) / 2, (size.height - pref.height) / 2); | if (!(markersLoaded)){ gComponent2.translate((size.width - pref.width) / 2, (size.height - pref.height) / 2); } else { gComponent2.translate((size.width - pref.width) / 2, 0); } | public void paintComponent(Graphics gComponent){ Dimension size = getSize(); Dimension pref = getPreferredSize(); if (!(alreadyPainted)){ buffIm = new BufferedImage(pref.width, pref.height, BufferedImage.TYPE_3BYTE_BGR); Graphics g = buffIm.getGraphics(); FontMetrics boxFontMetrics = g.getFontMetrics(boxFont); int diamondX[] = new int[4]; int diamondY[] = new int[4]; Polygon diamond; int left = H_BORDER; int top = V_BORDER; FontMetrics metrics; int ascent; Graphics2D g2 = (Graphics2D) g; g2.setColor(this.getBackground()); g2.fillRect(0,0,pref.width,pref.height); g2.setColor(Color.BLACK); if (markersLoaded) { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); //// draw the marker locations BasicStroke thickerStroke = new BasicStroke(1); BasicStroke thinnerStroke = new BasicStroke(0.25f); int wide = dPrimeTable.length * BOX_SIZE; int lineLeft = wide / 4; int lineSpan = wide / 2; long minpos = ((SNP)markers.elementAt(0)).getPosition(); long maxpos = ((SNP)markers.elementAt(markers.size()-1)).getPosition(); double spanpos = maxpos - minpos; g2.setStroke(thinnerStroke); g2.setColor(Color.white); g2.fillRect(left + lineLeft, 5, lineSpan, TICK_HEIGHT); g2.setColor(Color.black); g2.drawRect(left + lineLeft, 5, lineSpan, TICK_HEIGHT); for (int i = 0; i < markers.size(); i++) { double pos = (((SNP)markers.elementAt(i)).getPosition() - minpos) / spanpos; int xx = (int) (left + lineLeft + lineSpan*pos); g2.setStroke(thickerStroke); g.drawLine(xx, 5, xx, 5 + TICK_HEIGHT); g2.setStroke(thinnerStroke); g.drawLine(xx, 5 + TICK_HEIGHT, left + i*BOX_SIZE, TICK_BOTTOM); } top += TICK_BOTTOM; //// draw the marker names g.setFont(markerNameFont); metrics = g.getFontMetrics(); ascent = metrics.getAscent(); widestMarkerName = metrics.stringWidth(((SNP)markers.elementAt(0)).getName()); for (int x = 1; x < dPrimeTable.length; x++) { int thiswide = metrics.stringWidth(((SNP)markers.elementAt(x)).getName()); if (thiswide > widestMarkerName) widestMarkerName = thiswide; } //System.out.println(widest); g2.translate(left, top + widestMarkerName); g2.rotate(-Math.PI / 2.0); TextLayout markerNameTL; for (int x = 0; x < dPrimeTable.length; x++) { g2.drawString(((SNP)markers.elementAt(x)).getName(),TEXT_NUMBER_GAP, x*BOX_SIZE + ascent/3); } g2.rotate(Math.PI / 2.0); g2.translate(-left, -(top + widestMarkerName)); // move everybody down top += widestMarkerName + TEXT_NUMBER_GAP; g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); } //// draw the marker numbers g.setFont(markerNumFont); metrics = g.getFontMetrics(); ascent = metrics.getAscent(); for (int x = 0; x < dPrimeTable.length; x++) { String mark = String.valueOf(x + 1); g.drawString(mark, left + x*BOX_SIZE - metrics.stringWidth(mark)/2, top + ascent); } top += BOX_RADIUS/2; // give a little space between numbers and boxes // draw table column by column for (int x = 0; x < dPrimeTable.length-1; x++) { for (int y = x + 1; y < dPrimeTable.length; y++) { double d = dPrimeTable[x][y].getDPrime(); double l = dPrimeTable[x][y].getLOD(); Color boxColor = dPrimeTable[x][y].getColor(); // draw markers above int rt2 = (int) (Math.sqrt(2) * (double)BOX_SIZE); //int rt2half = (int) (0.5 * Math.sqrt(2) * (double)BOX_SIZE); int rt2half = rt2 / 2; //System.out.println(rt2 + " " + rt2half); //int xx = left + x*BOX_SIZE + (int) (y*Math.sqrt(4)*BOX_SIZE*0.5); int xx = left + (x + y) * BOX_SIZE / 2; //int yy = top + (x - y) * BOX_SIZE; //int xx = left + x*BOX_SIZE; //int yy = top + y*BOX_SIZE - (int) (x*Math.sqrt(4)*BOX_SIZE*0.5); int yy = top + (y - x) * BOX_SIZE / 2; diamondX[0] = xx; diamondY[0] = yy - BOX_RADIUS; diamondX[1] = xx + BOX_RADIUS; diamondY[1] = yy; diamondX[2] = xx; diamondY[2] = yy + BOX_RADIUS; diamondX[3] = xx - BOX_RADIUS; diamondY[3] = yy; diamond = new Polygon(diamondX, diamondY, 4); g.setColor(boxColor); g.fillPolygon(diamond); if (boxColor == Color.white) { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g.setColor(Color.lightGray); g.drawPolygon(diamond); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); } g.setFont(boxFont); ascent = boxFontMetrics.getAscent(); int val = (int) (d * 100); g.setColor((val < 50) ? Color.gray : Color.black); if (val != 100) { String valu = String.valueOf(val); int widf = boxFontMetrics.stringWidth(valu); g.drawString(valu, xx - widf/2, yy + ascent/2); } } } alreadyPainted=true; } Graphics2D gComponent2 = (Graphics2D)gComponent; gComponent2.translate((size.width - pref.width) / 2, (size.height - pref.height) / 2); gComponent2.drawImage(buffIm,0,0,this); } | 51222 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51222/8f959eea66c2edcdec22156a5c7a5138f0f3baa3/DPrimeDisplay.java/clean/edu/mit/wi/haploview/DPrimeDisplay.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
12574,
1841,
12,
17558,
314,
1841,
15329,
3639,
13037,
963,
273,
9950,
5621,
3639,
13037,
11307,
273,
12822,
4193,
1225,
5621,
3639,
309,
16051,
12,
17583,
12699,
329,
3719,
95,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
12574,
1841,
12,
17558,
314,
1841,
15329,
3639,
13037,
963,
273,
9950,
5621,
3639,
13037,
11307,
273,
12822,
4193,
1225,
5621,
3639,
309,
16051,
12,
17583,
12699,
329,
3719,
95,
... |
protected void parseConfigVars( HttpServletRequest request, List parameterList ) { this.configMap = new HashMap( ); // get report config filename String reportConfigName = ParameterAccessor .getConfigFileName( this.reportDesignName ); if ( reportConfigName == null ) return; // Generate the session handle SessionHandle sessionHandle = DesignEngine.newSession( ULocale.US ); ReportDesignHandle handle = null; try { // Open report config file handle = sessionHandle.openDesign( reportConfigName ); // initial config map if ( handle != null ) { String displayTextParam = null; Iterator configVars = handle.configVariablesIterator( ); while ( configVars != null && configVars.hasNext( ) ) { ConfigVariableHandle configVar = (ConfigVariableHandle) configVars .next( ); if ( configVar != null && configVar.getName( ) != null ) { String paramName = configVar.getName( ); Object paramValue = configVar.getValue( ); // check if null parameter if ( paramName.toLowerCase( ).startsWith( ParameterAccessor.PARAM_ISNULL ) && paramValue != null ) { String nullParamName = getParameterName( (String) paramValue, parameterList ); if ( nullParamName != null ) this.configMap.put( nullParamName, null ); continue; } // check if display text of select parameter else if ( ( displayTextParam = ParameterAccessor .isDisplayText( paramName ) ) != null ) { paramName = getParameterName( displayTextParam, parameterList ); if ( paramName != null ) { if ( this.displayTexts == null ) this.displayTexts = new HashMap( ); this.displayTexts.put( paramName, paramValue ); } continue; } // check the parameter whether exist or not paramName = getParameterName( paramName, parameterList ); ScalarParameterHandle parameter = (ScalarParameterHandle) findParameter( paramName ); // convert parameter from default locale to current // locale if ( paramValue != null && parameter != null ) { // find cached parameter type String typeVarName = configVar.getName( ) + "_" + IBirtConstants.PROP_TYPE; //$NON-NLS-1$ ConfigVariable typeVar = handle .findConfigVariable( typeVarName ); // get cached parameter type String dataType = parameter.getDataType( ); String cachedDateType = null; if ( typeVar != null ) cachedDateType = typeVar.getValue( ); // if null or data type changed, skip it if ( cachedDateType == null || !cachedDateType .equalsIgnoreCase( dataType ) ) { continue; } try { // if parameter type isn't String ,convert it if ( !DesignChoiceConstants.PARAM_TYPE_STRING .equalsIgnoreCase( dataType ) ) { String pattern = parameter.getPattern( ); Object paramValueObj = ParameterValidationUtil .validate( dataType, pattern, (String) paramValue, ULocale.US ); // if DateTime type,return Date Object if ( DesignChoiceConstants.PARAM_TYPE_DATETIME .equalsIgnoreCase( dataType ) ) paramValue = paramValueObj; else paramValue = ParameterValidationUtil .getDisplayValue( dataType, pattern, paramValueObj, locale ); } } catch ( Exception err ) { paramValue = configVar.getValue( ); } this.configMap.put( paramName, paramValue ); } } } handle.close( ); } } catch ( Exception e ) { // do nothing } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/e67b6a4506a01d4fbb741a982d76ef6cb9dba851/ViewerAttributeBean.java/clean/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/context/ViewerAttributeBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
6459,
2670,
809,
5555,
12,
2940,
18572,
2293,
16,
1082,
202,
682,
6775,
682,
13,
202,
95,
202,
202,
2211,
18,
1425,
863,
33,
2704,
8658,
5621,
202,
202,
759,
588,
6006,
1425,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
6459,
2670,
809,
5555,
12,
2940,
18572,
2293,
16,
1082,
202,
682,
6775,
682,
13,
202,
95,
202,
202,
2211,
18,
1425,
863,
33,
2704,
8658,
5621,
202,
202,
759,
588,
6006,
1425,... | ||
private JavacGJCompiler() { | protected JavacGJCompiler() { | private JavacGJCompiler() { } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/ed15f1e3933f222801a436b129bc84e5a740d057/JavacGJCompiler.java/buggy/drjava/src/edu/rice/cs/drjava/model/compiler/JavacGJCompiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
804,
842,
1077,
43,
46,
9213,
1435,
288,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
804,
842,
1077,
43,
46,
9213,
1435,
288,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
public List getCurrentlyExecutingJobs() throws SchedulerException; | List getCurrentlyExecutingJobs() throws SchedulerException; | public List getCurrentlyExecutingJobs() throws SchedulerException; | 55677 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55677/cf7f5f77ce5bb6364145230d302b86f1cdadea88/Scheduler.java/clean/src/java/org/quartz/Scheduler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
5175,
715,
22134,
7276,
1435,
1216,
12620,
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,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
5175,
715,
22134,
7276,
1435,
1216,
12620,
503,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
ruby.getBlock().pop(); | ruby.getBlockStack().pop(); | public void visitIterNode(IterNode iVisited) { ruby.getBlock().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode()), self.toRubyObject()); ruby.getIterStack().push(Iter.ITER_PRE); try { while (true) { try { result = eval(iVisited.getIterNode()); return; } catch (RetryException rExcptn) { } } } catch (ReturnException rExcptn) { result = rExcptn.getReturnValue(); } catch (BreakJump bExcptn) { result = ruby.getNil(); } finally { ruby.getIterStack().pop(); ruby.getBlock().pop(); } } | 49476 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49476/8db42974495981011f558bcce15e2dfc28681a76/EvaluateVisitor.java/clean/org/jruby/evaluator/EvaluateVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
2360,
907,
12,
2360,
907,
277,
30019,
13,
288,
3639,
22155,
18,
588,
1768,
7675,
6206,
12,
77,
30019,
18,
588,
1537,
907,
9334,
394,
18176,
1305,
12,
77,
30019,
18,
588... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
2360,
907,
12,
2360,
907,
277,
30019,
13,
288,
3639,
22155,
18,
588,
1768,
7675,
6206,
12,
77,
30019,
18,
588,
1537,
907,
9334,
394,
18176,
1305,
12,
77,
30019,
18,
588... |
runtime.defineGlobalConstant("ENV", RubyHash.newHash(runtime, envs, null)); | runtime.defineGlobalConstant("ENV", RubyHash.newHash(runtime, envs, runtime.getNil())); | public static void createGlobals(IRuby runtime) { // Version information: IRubyObject version = runtime.newString(Constants.RUBY_VERSION).freeze(); IRubyObject release = runtime.newString(Constants.COMPILE_DATE).freeze(); IRubyObject platform = runtime.newString(Constants.PLATFORM).freeze(); runtime.defineGlobalConstant("RUBY_VERSION", version); runtime.defineGlobalConstant("RUBY_RELEASE_DATE", release); runtime.defineGlobalConstant("RUBY_PLATFORM", platform); runtime.defineGlobalConstant("VERSION", version); runtime.defineGlobalConstant("RELEASE_DATE", release); runtime.defineGlobalConstant("PLATFORM", platform); // FIXME: ENV Not really a RubyHash (but close) // FIXME: ENV Should not copy system properties, but should reference them instead HashMap envs = new HashMap(); envs.put(runtime.newString("HOME"), runtime.newString(System.getProperty("user.home"))); runtime.defineGlobalConstant("ENV", RubyHash.newHash(runtime, envs, null)); runtime.defineVariable(new StringGlobalVariable(runtime, "$KCODE", runtime.newString("UTF8"))); runtime.defineVariable(new StringGlobalVariable(runtime, "$/", runtime.newString("\n"))); runtime.defineVariable(new StringGlobalVariable(runtime, "$\\", runtime.getNil())); runtime.defineVariable(new StringGlobalVariable(runtime, "$,", runtime.getNil())); runtime.defineVariable(new LineNumberGlobalVariable(runtime, "$.", RubyFixnum.one(runtime))); runtime.defineVariable(new LastlineGlobalVariable(runtime, "$_")); runtime.defineVariable(new ErrorInfoGlobalVariable(runtime, "$!", runtime.getNil())); runtime.defineVariable(new SafeGlobalVariable(runtime, "$SAFE")); runtime.defineVariable(new BacktraceGlobalVariable(runtime, "$@")); IRubyObject stdin = RubyIO.fdOpen(runtime, RubyIO.STDIN); IRubyObject stdout = RubyIO.fdOpen(runtime, RubyIO.STDOUT); IRubyObject stderr = RubyIO.fdOpen(runtime, RubyIO.STDERR); runtime.defineVariable(new InputGlobalVariable(runtime, "$stdin", stdin)); runtime.defineVariable(new OutputGlobalVariable(runtime, "$stdout", stdout)); runtime.defineVariable(new OutputGlobalVariable(runtime, "$stderr", stderr)); runtime.defineVariable(new OutputGlobalVariable(runtime, "$>", stdout)); runtime.defineVariable(new OutputGlobalVariable(runtime, "$defout", stdout)); runtime.defineVariable(new OutputGlobalVariable(runtime, "$deferr", stderr)); runtime.defineGlobalConstant("STDIN", stdin); runtime.defineGlobalConstant("STDOUT", stdout); runtime.defineGlobalConstant("STDERR", stderr); runtime.defineVariable(new LoadedFeatures(runtime, "$\"")); runtime.defineVariable(new LoadPath(runtime, "$:")); runtime.defineVariable(new LoadPath(runtime, "$-I")); runtime.defineVariable(new LoadPath(runtime, "$LOAD_PATH")); // ARGF, $< object RubyArgsFile argsFile = new RubyArgsFile(runtime); argsFile.initArgsFile(); } | 47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/ebc655285fa55c939b42b33be335d9f4b2040047/RubyGlobal.java/clean/src/org/jruby/RubyGlobal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
752,
19834,
12,
7937,
10340,
3099,
13,
288,
3639,
368,
4049,
1779,
30,
3639,
15908,
10340,
921,
1177,
273,
3099,
18,
2704,
780,
12,
2918,
18,
54,
3457,
61,
67,
5757,
293... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
752,
19834,
12,
7937,
10340,
3099,
13,
288,
3639,
368,
4049,
1779,
30,
3639,
15908,
10340,
921,
1177,
273,
3099,
18,
2704,
780,
12,
2918,
18,
54,
3457,
61,
67,
5757,
293... |
position = position + currentSymbol.length(); } else { throw new InvalidSmilesException(message); | position = position + currentSymbol.length() + 2; } else if (mychar == '/' || mychar == '\\') { logger.warn("Ignoring stereo information for double bond"); position++; } else if (mychar == '@') { if (position < smiles.length()-1 && smiles.charAt(position+1) == '@') { position++; } logger.warn("Ignoring stereo information for atom"); position++; } else { throw new InvalidSmilesException("Unexpected character found: " + mychar); | public Molecule parseSmiles(String smiles) throws InvalidSmilesException { Bond bond = null; boolean aromaticAtom = false; nodeCounter = 0; bondStatus = 0; thisRing = -1; currentSymbol = null; molecule = new Molecule(); position = 0; // we don't want more than 1024 rings rings = new Atom[1024]; ringbonds = new double[1024]; for (int f = 0; f < 1024; f++) { rings[f] = null; ringbonds[f] = -1; } char mychar; char[] chars = new char[1]; Atom lastNode = null; Atom thisNode = null; Stack atomStack = new Stack(); Stack bondStack = new Stack(); Atom atom = null; Atom partner = null; do { try { mychar = smiles.charAt(position); logger.debug(""); logger.debug("Processing: " + mychar); if (lastNode != null) { logger.debug("Lastnode: " + lastNode.hashCode()); } if ((mychar >= 'A' && mychar <= 'Z') || (mychar >= 'a' && mychar <= 'z')) { currentSymbol = getElementSymbol(smiles, position); if (bondStatus == CDKConstants.BONDORDER_AROMATIC && !(mychar == 'c' || mychar == 'n' || mychar == 's' || mychar == 'o')) { bondStatus = CDKConstants.BONDORDER_SINGLE; } atom = new Atom(currentSymbol); if (currentSymbol.length() == 1) { if (!(currentSymbol.toUpperCase()).equals(currentSymbol)) { atom.flags[CDKConstants.ISAROMATIC] = true; atom.setSymbol(currentSymbol.toUpperCase()); } } molecule.addAtom(atom); logger.debug("Adding atom " + atom.hashCode()); if (lastNode != null) { bond = new Bond(atom, lastNode, bondStatus); bond.flags[CDKConstants.ISAROMATIC] = true; molecule.addBond(bond); } bondStatus = CDKConstants.BONDORDER_SINGLE; if (mychar == 'c' || mychar == 'n' || mychar == 's' || mychar == 'o') { bondStatus = CDKConstants.BONDORDER_AROMATIC; } lastNode = atom; nodeCounter++; position = position + currentSymbol.length(); } else if (mychar == '=') { bondStatus = CDKConstants.BONDORDER_DOUBLE; position++; } else if (mychar == '#') { bondStatus = CDKConstants.BONDORDER_TRIPLE; position++; } else if (mychar == '(') { atomStack.push(lastNode); logger.debug("Stack:"); Enumeration ses = atomStack.elements(); while (ses.hasMoreElements()) { Atom a = (Atom) ses.nextElement(); logger.debug("" + a.hashCode()); } logger.debug("------"); bondStack.push(new Double(bondStatus)); position++; } else if (mychar == ')') { lastNode = (Atom) atomStack.pop(); logger.debug("Stack:"); Enumeration ses = atomStack.elements(); while (ses.hasMoreElements()) { Atom a = (Atom) ses.nextElement(); logger.debug("" + a.hashCode()); } logger.debug("------"); bondStatus = ((Double) bondStack.pop()).doubleValue(); position++; } else if (mychar >= '0' && mychar <= '9') { chars[0] = mychar; currentSymbol = new String(chars); thisRing = (new Integer(new String(chars))).intValue(); handleRing(lastNode); position++; } else if (mychar == '%') { currentSymbol = getRingNumber(smiles, position); thisRing = (new Integer(currentSymbol)).intValue(); handleRing(lastNode); position += currentSymbol.length() + 1; } else if (mychar == '[') { currentSymbol = getAtomString(smiles, position); atom = assembleAtom(currentSymbol, nodeCounter); molecule.addAtom(atom); if (lastNode != null) { bond = new Bond(atom, lastNode, bondStatus); bond.flags[CDKConstants.ISAROMATIC] = true; molecule.addBond(new Bond(atom, lastNode, bondStatus)); } bondStatus = CDKConstants.BONDORDER_SINGLE; if (mychar == 'c' || mychar == 'n' || mychar == 's' || mychar == 'o') { bondStatus = CDKConstants.BONDORDER_AROMATIC; } lastNode = atom; nodeCounter++; position = position + currentSymbol.length(); } else { throw new InvalidSmilesException(message); } } catch (Exception exc) { exc.printStackTrace(); throw new InvalidSmilesException(message); } } while (position < smiles.length()); return molecule; } | 1306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1306/27650f91da1f3d9711317f9d0b01d22f259a5ae8/SmilesParser.java/clean/src/org/openscience/cdk/smiles/SmilesParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
490,
10545,
1109,
9552,
1449,
12,
780,
3029,
1449,
13,
1216,
1962,
9552,
1449,
503,
202,
95,
202,
202,
9807,
8427,
273,
446,
31,
202,
202,
6494,
279,
27468,
3641,
273,
629,
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,
490,
10545,
1109,
9552,
1449,
12,
780,
3029,
1449,
13,
1216,
1962,
9552,
1449,
503,
202,
95,
202,
202,
9807,
8427,
273,
446,
31,
202,
202,
6494,
279,
27468,
3641,
273,
629,
31... |
PointSet.setAttrImp(nodeLock, vertexAttributes, dls, dls.getListLength() != vertexAttributes.getListLength()); | startWriter(); try { PointSet.setAttrImp(vertexAttributes, dls, dls.getListLength() != vertexAttributes.getListLength()); | public void setVertexAttributes(DataListSet dls) { PointSet.setAttrImp(nodeLock, vertexAttributes, dls, dls.getListLength() != vertexAttributes.getListLength()); fireGeometryChanged(dls.storedAttributes(), null, null, null); } | 25560 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25560/7acbd60d07777835349ce98e64cfb84c95cd0ac1/IndexedFaceSet.java/buggy/src-proxies/de/jreality/scene/proxy/scene/IndexedFaceSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
6475,
2498,
12,
24274,
694,
302,
3251,
13,
288,
3639,
787,
2289,
5621,
775,
288,
4686,
694,
18,
542,
3843,
22683,
12,
15281,
2498,
16,
302,
3251,
16,
302,
3251,
18,
588,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
6475,
2498,
12,
24274,
694,
302,
3251,
13,
288,
3639,
787,
2289,
5621,
775,
288,
4686,
694,
18,
542,
3843,
22683,
12,
15281,
2498,
16,
302,
3251,
16,
302,
3251,
18,
588,... |
itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LineStyle_lineColor_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LineStyle_lineColor_feature", "_UI_LineStyle_type"), NotationPackage.eINSTANCE.getLineStyle_LineColor(), true, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } | itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LineStyle_lineColor_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LineStyle_lineColor_feature", "_UI_LineStyle_type"), NotationPackage.Literals.LINE_STYLE__LINE_COLOR, true, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } | protected void addLineColorPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LineStyle_lineColor_feature"), //$NON-NLS-1$ getString("_UI_PropertyDescriptor_description", "_UI_LineStyle_lineColor_feature", "_UI_LineStyle_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ NotationPackage.eINSTANCE.getLineStyle_LineColor(), true, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } | 1758 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1758/1d1e28c0f7853dd16bd3fe819770773ed4e61d20/ShapeStyleItemProvider.java/buggy/org.eclipse.gmf.notation/plugins/org.eclipse.gmf.runtime.notation.edit/src/org/eclipse/gmf/runtime/notation/provider/ShapeStyleItemProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
26772,
2957,
1396,
3187,
12,
921,
733,
13,
288,
202,
202,
1726,
1396,
12705,
18,
1289,
1082,
202,
12,
2640,
1180,
1396,
3187,
9506,
202,
12443,
12,
22375,
429,
4216,
1733,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
26772,
2957,
1396,
3187,
12,
921,
733,
13,
288,
202,
202,
1726,
1396,
12705,
18,
1289,
1082,
202,
12,
2640,
1180,
1396,
3187,
9506,
202,
12443,
12,
22375,
429,
4216,
1733,... |
context.preDefMethodInternalCall(implementationClass, recv, name, args, noSuper); | context.preDefMethodInternalCall(recv, name, args, noSuper, cref); | public void preMethod(IRuby runtime, RubyModule implementationClass, IRubyObject recv, String name, IRubyObject[] args, boolean noSuper) { ThreadContext context = runtime.getCurrentContext(); context.preDefMethodInternalCall(implementationClass, recv, name, args, noSuper); } | 45827 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45827/a1b8fc1d456e3d5c6e01579b88773383068aa85c/DefaultMethod.java/clean/src/org/jruby/internal/runtime/methods/DefaultMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
675,
1305,
12,
7937,
10340,
3099,
16,
19817,
3120,
4471,
797,
16,
15908,
10340,
921,
10665,
16,
514,
508,
16,
15908,
10340,
921,
8526,
833,
16,
1250,
1158,
8051,
13,
288,
3639,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
675,
1305,
12,
7937,
10340,
3099,
16,
19817,
3120,
4471,
797,
16,
15908,
10340,
921,
10665,
16,
514,
508,
16,
15908,
10340,
921,
8526,
833,
16,
1250,
1158,
8051,
13,
288,
3639,... |
public static File rotate(String filename, int angle, boolean flip, boolean resetExifOrientation) { File r = null; if (!GalleryFileFilter.canManipulateJpeg(filename)) { Log.log(Log.LEVEL_TRACE, MODULE, "jpegtran doesn't support rotating anything but jpeg"); return new File(filename); } if (useJpegtran) { File orig = null; File dest = null; try { if (GalleryRemote.IS_MAC_OS_X) { orig = new File(filename); dest = deterministicTempFile("tmp" , "." + GalleryFileFilter.getExtension(filename), tmpDir, filename + angle + flip); orig.renameTo(dest); filename = dest.getPath(); } if (flip) { r = jpegtranExec(filename, "-flip", "horizontal", false); filename = r.getPath(); } if (angle != 0) { r = jpegtranExec(filename, "-rotate", "" + (angle * 90), false); } /*if (resetExifOrientation) { resetExifOrientation(filename); }*/ } finally { if (orig != null && dest != null) { dest.renameTo(orig); } } } if (!useJpegtran && r == null) { throw new UnsupportedOperationException("jpegtran must be installed for this operation"); } return r; } | 9402 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9402/5eaee01c449188cf087fc4850700732caebcd03f/ImageUtils.java/clean/com/gallery/GalleryRemote/util/ImageUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3845,
42,
2895,
352,
340,
12,
780,
3459,
16,
474,
4341,
16,
6494,
12357,
16,
6494,
6208,
424,
430,
14097,
15329,
202,
202,
42,
2895,
33,
2011,
31,
202,
202,
430,
12,
5,
1851... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3845,
42,
2895,
352,
340,
12,
780,
3459,
16,
474,
4341,
16,
6494,
12357,
16,
6494,
6208,
424,
430,
14097,
15329,
202,
202,
42,
2895,
33,
2011,
31,
202,
202,
430,
12,
5,
1851... | ||
null, "setDynamicJavascript"); | null, "setDynamicJavascriptExpr"); | public PropertyDescriptor[] getPropertyDescriptors() { PropertyDescriptor[] result = new PropertyDescriptor[8]; try { result[0] = new PropertyDescriptor("cdata", ELJavascriptValidatorTag.class, null, "setCdata"); result[1] = new PropertyDescriptor("dynamicJavascript", ELJavascriptValidatorTag.class, null, "setDynamicJavascript"); result[2] = new PropertyDescriptor("formName", ELJavascriptValidatorTag.class, null, "setFormName"); result[3] = new PropertyDescriptor("method", ELJavascriptValidatorTag.class, null, "setMethod"); result[4] = new PropertyDescriptor("page", ELJavascriptValidatorTag.class, null, "setPageExpr"); result[5] = new PropertyDescriptor("src", ELJavascriptValidatorTag.class, null, "setSrc"); result[6] = new PropertyDescriptor("staticJavascript", ELJavascriptValidatorTag.class, null, "setStaticJavascript"); result[7] = new PropertyDescriptor("htmlComment", ELJavascriptValidatorTag.class, null, "setHtmlComment"); } catch (IntrospectionException ex) { ex.printStackTrace(); } return (result); } | 54704 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54704/db064e19656421b94aaf753550935d95f44bd5f9/ELJavascriptValidatorTagBeanInfo.java/clean/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELJavascriptValidatorTagBeanInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
225,
26761,
8526,
3911,
12705,
1435,
565,
288,
3639,
26761,
8526,
225,
563,
282,
273,
394,
26761,
63,
28,
15533,
3639,
775,
288,
5411,
563,
63,
20,
65,
273,
394,
26761,
2932,
71,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
225,
26761,
8526,
3911,
12705,
1435,
565,
288,
3639,
26761,
8526,
225,
563,
282,
273,
394,
26761,
63,
28,
15533,
3639,
775,
288,
5411,
563,
63,
20,
65,
273,
394,
26761,
2932,
71,
... |
public void setBankNum (int bankNum) { try { PatchEdit.MidiOut.writeShortMessage (port,(byte)(0xB0+(channel-1)),(byte)0x00,(byte)(bankNum/128)); PatchEdit.MidiOut.writeShortMessage (port,(byte)(0xB0+(channel-1)),(byte)0x20,(byte)(bankNum%128)); } catch (Exception e) {}; | public void setBankNum(int bankNum) { try { PatchEdit.MidiOut.writeShortMessage(port, (byte) (0xB0 + (channel - 1)), (byte) 0x00, (byte) (bankNum / 128)); PatchEdit.MidiOut.writeShortMessage(port, (byte) (0xB0 + (channel - 1)), (byte) 0x20, (byte) (bankNum % 128)); } catch (Exception e) { | public void setBankNum (int bankNum) { try { PatchEdit.MidiOut.writeShortMessage (port,(byte)(0xB0+(channel-1)),(byte)0x00,(byte)(bankNum/128)); PatchEdit.MidiOut.writeShortMessage (port,(byte)(0xB0+(channel-1)),(byte)0x20,(byte)(bankNum%128)); } catch (Exception e) {}; } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/e7311a9aa2ac478953975abaa1c0c14e8201c062/Driver.java/clean/JSynthLib/core/Driver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
15268,
2304,
2578,
261,
474,
11218,
2578,
13,
565,
288,
3639,
775,
3639,
288,
5411,
12042,
4666,
18,
20711,
77,
1182,
18,
2626,
4897,
1079,
261,
655,
16,
12,
7229,
21433,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
15268,
2304,
2578,
261,
474,
11218,
2578,
13,
565,
288,
3639,
775,
3639,
288,
5411,
12042,
4666,
18,
20711,
77,
1182,
18,
2626,
4897,
1079,
261,
655,
16,
12,
7229,
21433,
20,
... |
public static Result runClasses(Class... classes) { | public static Result runClasses(Class<?>... classes) { | public static Result runClasses(Class... classes) { return new JUnitCore().run(classes); } | 48762 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48762/0cdf29715af64edd05229c400f214417fecdef89/JUnitCore.java/clean/org/junit/runner/JUnitCore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
3438,
1086,
4818,
12,
797,
2777,
3318,
13,
288,
202,
202,
2463,
394,
804,
2802,
4670,
7675,
2681,
12,
4701,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
3438,
1086,
4818,
12,
797,
2777,
3318,
13,
288,
202,
202,
2463,
394,
804,
2802,
4670,
7675,
2681,
12,
4701,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
} else{ | } else{ | public void parse(final WorkBookGenerationHandler wbgh, final InputStream is) throws IOException, XML2XLSFatalException{ this.wbgh = wbgh; Document doc = getDocument(is); Element root = doc.getRootElement(); if(!"workbook".equals(root.getName())){ throw new XMLSyntaxException("Root element should be <workbook>"); } WorkBookEntity workBook = new WorkBookEntity(); wbgh.createWorkBook(workBook); List<Element> l = root.getChildren(); for(Element e: l){ String name = e.getName(); if("sheet".equals(name)){ SheetEntity sheet = new SheetEntity(); String namea = e.getAttributeValue("name"); if(namea!=null && !"".equals(namea)){ Map<String, String> m = new HashMap<String, String>(); m.put("name", namea); sheet.setAttributes(m); wbgh.createSheet(sheet); } else{ wbgh.createSheet(sheet); } processSheet(e); } else{ throw new XMLInvalidNestedElementException("workbook", name); } } } | 58507 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58507/5f7a69a4e14a6887fc9e0c3ece2046718de046d0/XML2XLSGenerator.java/clean/trunk/src/main/java/org/wiztools/xml2spreadsheet/XML2XLSGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1109,
12,
6385,
4147,
9084,
13842,
1503,
341,
12370,
76,
16,
727,
5037,
353,
13,
7682,
1216,
1860,
16,
3167,
22,
60,
3045,
19593,
503,
95,
3639,
333,
18,
9464,
17680,
273,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
12,
6385,
4147,
9084,
13842,
1503,
341,
12370,
76,
16,
727,
5037,
353,
13,
7682,
1216,
1860,
16,
3167,
22,
60,
3045,
19593,
503,
95,
3639,
333,
18,
9464,
17680,
273,
34... |
ObjectReference target = ObjectModel.getReferenceWhenCopiedTo(current, allocCursor); | ObjectReference target = ObjectModel.getReferenceWhenCopiedTo( current, allocCursor); | public void calculateForwardingPointers() { /* Has this allocator ever allocated anything? */ if (initialRegion.isZero()) return; /* Loop through active regions or until the last region */ Address start = initialRegion; Address allocStart = initialRegion; Address allocDataEnd = initialRegion.plus(DATA_END_OFFSET).loadAddress(); Address allocLimit = (allocDataEnd.isZero() ? cursor : allocDataEnd); Address allocCursor = start.plus(DATA_START_OFFSET); while(!start.isZero()) { /* Get the end of this region */ Address dataEnd = start.plus(DATA_END_OFFSET).loadAddress(); /* dataEnd = zero represents the current region. */ Address currentLimit = (dataEnd.isZero() ? cursor : dataEnd); ObjectReference current = ObjectModel.getObjectFromStartAddress(start.plus(DATA_START_OFFSET)); while (ObjectModel.refToAddress(current).LT(currentLimit) && !current.isNull()) { ObjectReference next = ObjectModel.getNextObject(current); if (MarkCompactSpace.toBeCompacted(current)) { if (Assert.VERIFY_ASSERTIONS) { Assert._assert(MarkCompactSpace.getForwardingPointer(current).isNull()); } // Fake - allocate it. int size = ObjectModel.getSizeWhenCopied(current); int align = ObjectModel.getAlignWhenCopied(current); int offset = ObjectModel.getAlignOffsetWhenCopied(current); allocCursor = Allocator.alignAllocationNoFill(allocCursor, align, offset); boolean sameRegion = allocStart.EQ(start); if (!sameRegion && allocCursor.plus(size).GT(allocLimit)) { allocStart = allocStart.plus(NEXT_REGION_OFFSET).loadAddress(); allocDataEnd = allocStart.plus(DATA_END_OFFSET).loadAddress(); allocLimit = (allocDataEnd.isZero() ? cursor : allocDataEnd); allocCursor = Allocator.alignAllocationNoFill(allocStart.plus(DATA_START_OFFSET), align, offset); } ObjectReference target = ObjectModel.getReferenceWhenCopiedTo(current, allocCursor); if (sameRegion && target.toAddress().GE(current.toAddress())) { MarkCompactSpace.setForwardingPointer(current, current); allocCursor = ObjectModel.getObjectEndAddress(current); } else { MarkCompactSpace.setForwardingPointer(current, target); allocCursor = allocCursor.plus(size); } } current = next; } if (dataEnd.isZero()) { break; } start = start.plus(NEXT_REGION_OFFSET).loadAddress(); // Move on to next } } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/30524c62fa391922d51289c03075f714c772951c/MarkCompactLocal.java/buggy/MMTk/src/org/mmtk/policy/MarkCompactLocal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
4604,
21487,
27452,
1435,
288,
565,
1748,
4393,
333,
26673,
14103,
11977,
6967,
35,
1195,
565,
309,
261,
6769,
5165,
18,
291,
7170,
10756,
327,
31,
565,
1748,
9720,
3059,
2695,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4604,
21487,
27452,
1435,
288,
565,
1748,
4393,
333,
26673,
14103,
11977,
6967,
35,
1195,
565,
309,
261,
6769,
5165,
18,
291,
7170,
10756,
327,
31,
565,
1748,
9720,
3059,
2695,
... |
switch ( value.charAt(value.length()-1) ) { case '1': requestSelection = true; ++eventCount; break; case '0': requestSelection = false; ++eventCount; break; | switch (value.charAt(value.length() - 1)) { case '1': requestSelection = true; ++eventCount; break; case '0': requestSelection = false; ++eventCount; break; | public void processLowLevelEvent(String action, String[] values) { boolean requestSelection = isSelected(); int eventCount = 0; if ( buttonGroup!=null ) { // button group prefix is shared, so maybe more than one value is // delivered in a form for ( int i=0; i<values.length; i++ ) { // with button group the value has a special encoding... // this is because in a form the name of a parameter for // buttons in a buttongroup must be the same... String value = values[i]; // illegal format if ( value.length() < 3 ) { continue; } // no uid DIVIDER // value.charAt(value.length()-2)!=UID_DIVIDER ) { break; } // not for me if ( !value.startsWith(super.getLowLevelEventId()) ) { continue; } // last character is indicator, if button should be // selected or not switch ( value.charAt(value.length()-1) ) { case '1': requestSelection = true; ++eventCount; break; case '0': requestSelection = false; ++eventCount; break; } } } else { for ( int i=0; i<values.length; i++ ) { requestSelection = parseSelectionToggle(values[0]); ++eventCount; } } /* * Checkboxes in HTML-forms write two form components: * one hidden input, containing the deselect-command (value='0'), * and one <input type="checkbox".. value="1">. * This is, because browsers send the checkbox-variable * only if it is set, not if it is not set. * So, if we get two events with the same name, then the checkbox * actually got selected; if we only got one event (from the hidden * input), then it was a deselect-event (select event value = '1', * deselect value = '0'). * This is just in case, the browser sends the both events * in the wrong order (select and then deselect). */ if ( eventCount==2 ) { requestSelection = true; } if ( isSelected()!=requestSelection ) { delayEvents(true); if ( buttonGroup!=null ) { buttonGroup.setDelayEvents(true); setSelected(requestSelection); buttonGroup.setDelayEvents(false); } else { setSelected(requestSelection); } SForm.addArmedComponent(this); } } | 3911 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3911/af8b8aa87eae2661dd36de035cfafa99b9471fea/SAbstractButton.java/clean/wings/src/org/wings/SAbstractButton.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1207,
10520,
2355,
1133,
12,
780,
1301,
16,
514,
8526,
924,
13,
288,
5411,
1250,
590,
6233,
273,
20956,
5621,
5411,
509,
871,
1380,
273,
374,
31,
5411,
309,
261,
3568,
1114,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1207,
10520,
2355,
1133,
12,
780,
1301,
16,
514,
8526,
924,
13,
288,
5411,
1250,
590,
6233,
273,
20956,
5621,
5411,
509,
871,
1380,
273,
374,
31,
5411,
309,
261,
3568,
1114,
... |
new NewLocalTaskAction(TaskListView.getFromActivePerspective()).run(); | new NewLocalTaskAction().run(); | public boolean performFinish() { new NewLocalTaskAction(TaskListView.getFromActivePerspective()).run(); return true; } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/c9209f299a1415c4f78dbf0371a6b6e21881f686/NewLocalTaskWizard.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/wizards/NewLocalTaskWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3073,
11641,
1435,
288,
202,
202,
2704,
1166,
2042,
2174,
1803,
12,
2174,
682,
1767,
18,
588,
1265,
3896,
14781,
16772,
1435,
2934,
2681,
5621,
202,
202,
2463,
638,
31,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3073,
11641,
1435,
288,
202,
202,
2704,
1166,
2042,
2174,
1803,
12,
2174,
682,
1767,
18,
588,
1265,
3896,
14781,
16772,
1435,
2934,
2681,
5621,
202,
202,
2463,
638,
31,
20... |
pmd.processFile( reader, set, ctx ); | try { pmd.processFile( reader, set, ctx ); } catch( PMDException e ) { Fault fault = new Fault( 1, name, e.getMessage() ); list.add( fault ); FaultRegistry.getInstance().registerFault( fault, dataobject ); } | private List checkCookies( List dataobjects ) throws IOException, PMDException { RuleSet set = constructRuleSets(); PMD pmd = new PMD(); ArrayList list = new ArrayList( 100 ); for( int i = 0; i < dataobjects.size(); i++ ) { DataObject dataobject = ( DataObject )dataobjects.get( i ); SourceCookie cookie = ( SourceCookie )dataobject.getCookie( SourceCookie.class ); //The file is not a java file if( cookie == null ) { continue; } Reader reader = getSourceReader( dataobject ); String name = cookie.getSource().getClasses()[0].getName().getFullName(); RuleContext ctx = new RuleContext(); Report report = new Report(); ctx.setReport( report ); ctx.setSourceCodeFilename( name ); pmd.processFile( reader, set, ctx ); Iterator iterator = ctx.getReport().iterator(); while( iterator.hasNext() ) { RuleViolation violation = ( RuleViolation )iterator.next(); StringBuffer buffer = new StringBuffer(); buffer.append( violation.getRule().getName() ).append( ", " ); buffer.append( violation.getDescription() ); Fault fault = new Fault( violation.getLine(), violation.getPackageName()+"."+violation.getClassName(), buffer.toString() ); list.add( fault ); FaultRegistry.getInstance().registerFault( fault, dataobject ); } } Collections.sort( list ); return list; } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/cc23426f51be96e366323b2fc776e2e1e897f106/RunPMDAction.java/buggy/pmd-netbeans/src/pmd/RunPMDAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
987,
866,
16089,
12,
987,
501,
6911,
262,
1082,
1216,
1860,
16,
453,
6188,
503,
225,
202,
95,
202,
202,
21474,
444,
273,
4872,
2175,
2785,
5621,
202,
202,
52,
6188,
293,
1264... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
866,
16089,
12,
987,
501,
6911,
262,
1082,
1216,
1860,
16,
453,
6188,
503,
225,
202,
95,
202,
202,
21474,
444,
273,
4872,
2175,
2785,
5621,
202,
202,
52,
6188,
293,
1264... |
page.add(getErrBlock()); | layoutErrorBlock(page); | private void displayReactivateAu(AuProxy au) throws IOException { Page page = newPage(); addJavaScript(page); fetchAuConfig(au); if (plugin == null) { errMsg = "Unknown plugin: " + au.getPluginId() + "<br>Cannot reactivate: " + encodeText(au.getName()); displayAuSummary(); return; } page.add(getErrBlock()); layoutExplanationBlock(page, "Reactivating: " + encodedAuName(au)); java.util.List actions = ListUtil.list(submitButton("Reactivate", "DoReactivate"), submitButton("Delete", "Delete")); Form frm = createAuEditForm(actions, au, true); frm.add("<input type=hidden name=\"" + ACTION_TAG + "\">"); page.add(frm); endPage(page); } | 8150 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8150/eca892806a66cd2b37b1b902e434f580705c4b73/AuConfig.java/buggy/src/org/lockss/servlet/AuConfig.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
2562,
426,
10014,
37,
89,
12,
37,
89,
3886,
20309,
13,
1216,
1860,
288,
565,
3460,
1363,
273,
394,
1964,
5621,
565,
527,
16634,
12,
2433,
1769,
565,
2158,
37,
89,
809,
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,
282,
3238,
918,
2562,
426,
10014,
37,
89,
12,
37,
89,
3886,
20309,
13,
1216,
1860,
288,
565,
3460,
1363,
273,
394,
1964,
5621,
565,
527,
16634,
12,
2433,
1769,
565,
2158,
37,
89,
809,
12,
... |
try { getDefaultFolder(); return super.getFolder(); } catch (MessagingException e) { e.printStackTrace(); return null; | try { getDefaultFolder(); return super.getFolder(); } catch (MessagingException e) { e.printStackTrace(); return null; } | public Folder getFolder() { try { getDefaultFolder(); return super.getFolder(); } catch (MessagingException e) { e.printStackTrace(); return null; } } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/b13c667b376deb4a8f2c235ffd847b57616d23c4/ViewedStoreBase.java/buggy/grendel/sources/grendel/view/ViewedStoreBase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
12623,
29001,
1435,
288,
565,
775,
288,
1377,
4829,
3899,
5621,
1377,
327,
2240,
18,
588,
3899,
5621,
565,
289,
1044,
261,
23389,
503,
425,
13,
288,
1377,
425,
18,
1188,
6332,
5621,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
12623,
29001,
1435,
288,
565,
775,
288,
1377,
4829,
3899,
5621,
1377,
327,
2240,
18,
588,
3899,
5621,
565,
289,
1044,
261,
23389,
503,
425,
13,
288,
1377,
425,
18,
1188,
6332,
5621,... |
result.append(ScriptRuntime.toString(elem)); | result.append(s); | private static String toStringHelper(Context cx, Scriptable thisObj, boolean toSource, boolean toLocale) throws JavaScriptException { /* It's probably redundant to handle long lengths in this * function; StringBuffers are limited to 2^31 in java. */ long length = (long)getLengthProperty(thisObj); StringBuffer result = new StringBuffer(); if (cx.iterating == null) cx.iterating = new Hashtable(31); boolean iterating = cx.iterating.get(thisObj) == Boolean.TRUE; // whether to return '4,unquoted,5' or '[4, "quoted", 5]' String separator; if (toSource) { result.append('['); separator = ", "; } else { separator = ","; } boolean haslast = false; long i = 0; if (!iterating) { for (i = 0; i < length; i++) { if (i > 0) result.append(separator); Object elem = getElem(thisObj, i); if (elem == null || elem == Undefined.instance) { haslast = false; continue; } haslast = true; if (elem instanceof String) { if (toSource) { result.append('\"'); result.append(ScriptRuntime.escapeString (ScriptRuntime.toString(elem))); result.append('\"'); } else { result.append(ScriptRuntime.toString(elem)); } } else { /* wrap changes to cx.iterating in a try/finally * so that the reference always gets removed, and * we don't leak memory. Good place for weak * references, if we had them. */ try { // stop recursion. cx.iterating.put(thisObj, Boolean.TRUE); if (toLocale && elem != Undefined.instance && elem != null) { Scriptable obj = cx.toObject(elem, thisObj); Object tls = ScriptRuntime.getProp(obj, "toLocaleString", thisObj); elem = ScriptRuntime.call(cx, tls, elem, ScriptRuntime.emptyArgs); } result.append(ScriptRuntime.toString(elem)); } finally { cx.iterating.remove(thisObj); } } } } if (toSource) { //for [,,].length behavior; we want toString to be symmetric. if (!haslast && i > 0) result.append(", ]"); else result.append(']'); } return result.toString(); } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/250051383e715d3a12c06e9b723efe99f534b8f7/NativeArray.java/clean/js/rhino/src/org/mozilla/javascript/NativeArray.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
1762,
2276,
12,
1042,
9494,
16,
22780,
15261,
16,
29159,
1250,
358,
1830,
16,
1250,
358,
3916,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
1748,
2597,
1807,
8656,
19530,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
1762,
2276,
12,
1042,
9494,
16,
22780,
15261,
16,
29159,
1250,
358,
1830,
16,
1250,
358,
3916,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
1748,
2597,
1807,
8656,
19530,
3... |
break; | private String setGoAnnotation(Annotation ann, HitInfo hit, String go_id, String goLine) { String go_ann = new String("/GO=\"GOid=GO:"+go_id+ "; with="+hit.getDB()+":"+hit.getAcc()+ "; "+goLine+"\""); String prog = DataCollectionPane.class.getResource("/etc/go_associations.pl").getPath(); String cmd[] = { prog, "-assoc", hit.getAcc() }; ExternalApplication app = new ExternalApplication(cmd, null,null); String res = app.getProcessStdout(); boolean found = false; try { String line; BufferedReader buffRead = new BufferedReader(new StringReader(res)); while((line = buffRead.readLine()) != null) { if(line.indexOf(go_id) > -1) {// see http://intweb.sanger.ac.uk/help/wiki/html/Intweb/PSUEukaryoticQualifiers.html int ref = line.indexOf("db_xref="); String db_xref = null; if(ref > -1) { db_xref = line.substring(ref); line = line.substring(0,ref); } // build GO line StringBuffer goBuff = new StringBuffer(); if(go_ann.startsWith("/GO_component")) goBuff.append("/GO=\"aspect=component; "); else if(go_ann.startsWith("/GO_process")) goBuff.append("/GO=\"aspect=process; "); else goBuff.append("/GO=\"aspect=function; "); goBuff.append("GOid=GO:"+go_id+"; "); int ind1 = line.indexOf("("); int ind2 = line.indexOf(")")+1; if(ind1 > -1 && ind2 > -1) goBuff.append("term="+line.substring(ind1,ind2)+"; "); ind1 = ind2+1; ind2 = line.indexOf(";",ind1); if(ind1 > -1 && ind2 > -1) goBuff.append("evidence="+line.substring(ind1,ind2)+"; "); if(db_xref != null) goBuff.append(db_xref+"; "); goBuff.append("with="+hit.getDB()+":"+hit.getAcc()+"; "); go_ann = line + "\"<br>" + goBuff.toString() +"\""; found = true; break; } } } catch(IOException ioe) { ioe.printStackTrace(); } if(!found) // try SRS { String env[] = { "PATH=/usr/local/pubseq/bin/" }; String cmd2[] = { "getz", "-f", "dbxref", "[uniprot:"+hit.getAcc()+"]" }; app = new ExternalApplication(cmd2,env,null); res = app.getProcessStdout(); try { String line; BufferedReader buffRead = new BufferedReader(new StringReader(res)); while((line = buffRead.readLine()) != null) { if(line.indexOf(go_id) > -1) { line = line.substring(3).trim(); String aspect = null; String term = null; String evidence = null; int ind1 = -1; int ind2 = -1; if((ind1 = line.indexOf(" F:"))> -1) { aspect = "function"; ind2 = line.indexOf(";",ind1+4); } else if((ind1 = line.indexOf(" P:"))> -1) { aspect = "process"; ind2 = line.indexOf(";",ind1+4); } else if((ind1 = line.indexOf(" C:"))> -1) { aspect = "component"; ind2 = line.indexOf(";",ind1+4); } if(ind1 > -1 && ind2 > -1) term = line.substring(ind1+3,ind2); if(ind2 > -1) evidence = line.substring(ind2+1).trim(); StringBuffer goBuff = new StringBuffer(); goBuff.append("/GO_"+aspect); goBuff.append("=\"GO:"+go_id+"; "); goBuff.append(evidence+"; "); goBuff.append(hit.getDB()+":"+hit.getAcc()+";\"<br>"); goBuff.append("/GO=\"aspect=function; "); goBuff.append("GOid=GO:"+go_id+"; "); goBuff.append("term="+term+"; "); goBuff.append("evidence="+evidence+"; "); goBuff.append("db_xref= ;"); goBuff.append("with="+hit.getDB()+":"+hit.getAcc()+";\""); go_ann = goBuff.toString();// go_ann = new String("/GO=\""+line.substring(3).trim()+"\""); found = true; break; } } } catch(IOException ioe) { ioe.printStackTrace(); } } ann.insert(go_ann,false); return go_ann; } | 10874 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10874/9a3ceb36ff986632b2b51521e0e445bcab012831/DataCollectionPane.java/clean/uk/ac/sanger/artemis/editor/DataCollectionPane.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
514,
444,
5741,
3257,
12,
3257,
8226,
16,
670,
305,
966,
6800,
16,
21394,
514,
1960,
67,
350,
16,
514,
1960,
1670,
13,
225,
288,
565,
514,
1960,
67,
1072,
273,
394,
514,
2932,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
514,
444,
5741,
3257,
12,
3257,
8226,
16,
670,
305,
966,
6800,
16,
21394,
514,
1960,
67,
350,
16,
514,
1960,
1670,
13,
225,
288,
565,
514,
1960,
67,
1072,
273,
394,
514,
2932,
1... | |
return IName.EMPTY_NAME_ARRAY; | return IIndexFragmentName.EMPTY_NAME_ARRAY; | public IName[] getReferences(IBinding binding) throws CoreException { if (binding instanceof PDOMBinding) { List names = new ArrayList(); for (PDOMName name = ((PDOMBinding)binding).getFirstReference(); name != null; name = name.getNextInBinding()) names.add(name); return (IName[])names.toArray(new IName[names.size()]); } return IName.EMPTY_NAME_ARRAY; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/f5a4ba1d7638b16bde80c2f1086c78aa03af1f90/PDOM.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
461,
8526,
5561,
2980,
12,
45,
5250,
5085,
13,
1216,
30015,
288,
202,
202,
430,
261,
7374,
1276,
453,
8168,
5250,
13,
288,
1082,
202,
682,
1257,
273,
394,
2407,
5621,
108... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
461,
8526,
5561,
2980,
12,
45,
5250,
5085,
13,
1216,
30015,
288,
202,
202,
430,
261,
7374,
1276,
453,
8168,
5250,
13,
288,
1082,
202,
682,
1257,
273,
394,
2407,
5621,
108... |
int len = block.length < MAGIC_NUMBER.length ? block.length : | int len = block.length < MAGIC_NUMBER.length ? block.length : | public static boolean isOLE(byte[] block) { if (block == null) return false; int len = block.length < MAGIC_NUMBER.length ? block.length : MAGIC_NUMBER.length; for (int i=0; i<len; i++) if (block[i] != MAGIC_NUMBER[i]) return false; return true; } | 49800 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49800/e1c1aa6cc0c7d00068e668cc26f365c20679cd01/OLEParser.java/buggy/loci/formats/OLEParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1250,
353,
51,
900,
12,
7229,
8526,
1203,
13,
288,
565,
309,
261,
2629,
422,
446,
13,
327,
629,
31,
565,
509,
562,
273,
1203,
18,
2469,
411,
490,
22247,
67,
9931,
18,
2469,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
353,
51,
900,
12,
7229,
8526,
1203,
13,
288,
565,
309,
261,
2629,
422,
446,
13,
327,
629,
31,
565,
509,
562,
273,
1203,
18,
2469,
411,
490,
22247,
67,
9931,
18,
2469,... |
TimestampMapping foundM = index.locate(newTS, IndexTimestampSelector.DATA, Lifetime.DISCRETE); | TimestampMapping foundM = index.locate(newTS, IndexTimestampSelector.DATA, Lifetime.DISCRETE); | public static void main(String [] args) { /* * Handle broken pipes properly */ final Signal sigpipe = new Signal("PIPE"); SignalHandler handler = new SignalHandler () { public void handle(Signal sig) { System.exit(sigpipe.hashCode()); } }; Signal.handle(sigpipe, handler); TimeIndexFactory factory = new TimeIndexFactory(); Properties properties = new Properties(); if (args.length == 1) { // have tifile name, properties.setProperty("filename", args[0]); } else if (args.length == 0) { // use default from Test5 properties.setProperty("filename", "/tmp/test5"); } else { ; } Timestamp t0 = Clock.time.asMillis(); //IndexView index = factory.open(new File(properties.getProperty("filename"))); IndexView index = factory.open(properties); Timestamp t1 = Clock.time.asMillis(); System.out.print("t0: " + t0 + " "); System.out.print("t1: " + t1 + " "); System.out.print("time: " + TimeCalculator.elapsedSince(t0) + " "); System.out.print("Length: " + index.getLength() + " items, "); System.out.println(); Random rseq = new Random(System.currentTimeMillis()); // range 0 to indexLength-1 int rand = rseq.nextInt((int)index.getLength()-1); System.err.println("rand = " + rand); IndexItem randomItem = null; randomItem = index.getItem((long)rand); //randomItem = index.getItem(index.getLength()-20); //randomItem = index.getItem(index.getLength() / 2); Timestamp ts = randomItem.getDataTimestamp(); // add 5 minutes to the timestamp Timestamp elapsed = new ElapsedSecondTimestamp(5 * 60); Timestamp newTS = ts; //TimeCalculator.addTimestamp(ts, elapsed); System.err.println("ts = " + ts + " elapsed = " + elapsed + " asMicros = " + TimeCalculator.toMicros((ElapsedSecondTimestamp)elapsed) + " newTS = " + newTS); TimestampMapping foundM = index.locate(newTS, IndexTimestampSelector.DATA, Lifetime.DISCRETE); if (foundM == null) { System.err.println("Position not in index"); System.exit(0); } System.err.println(" position = " + foundM); if (foundM.position() == Position.TOO_LOW || foundM.position() == Position.TOO_HIGH) { System.err.println("Found Position out of index"); System.exit(0); } Position foundP = foundM.position(); Interval interval1 = new MidPointInterval(new AbsolutePosition(foundP), new RelativeCount(-4), new RelativeCount(+4)); Index narrow1 = index.select(interval1, IndexTimestampSelector.DATA, Overlap.FREE, Lifetime.DISCRETE); if (narrow1 == null) { System.err.println("Didn't do selection narrow 1 properly"); } else { System.err.println("Interval1 = " + interval1); printIndex(narrow1); } Interval interval2 = new EndPointInterval(new AbsolutePosition(foundP), (Position)new AbsoluteAdjustablePosition(foundP).adjust(9)); Index narrow2 = index.select(interval2, IndexTimestampSelector.DATA, Overlap.FREE, Lifetime.DISCRETE); if (narrow2 == null) { System.err.println("Didn't do selection narrow 2 properly"); } else { System.err.println("Interval2 = " + interval2); printIndex(narrow2); } // add 1 hour Interval interval3 = new EndPointInterval(new AbsolutePosition(foundP), new ElapsedSecondTimestamp(1 * 60 * 60)); Index narrow3 = index.select(interval3, IndexTimestampSelector.DATA, Overlap.FREE, Lifetime.DISCRETE); if (narrow3 == null) { System.err.println("Didn't do selection narrow 3 properly"); } else { System.err.println("Interval3 = " + interval3); printIndex(narrow3); } // foundP , - 1hour, + 1 hour Interval interval4 = new MidPointInterval(new AbsolutePosition(foundP), new ElapsedSecondTimestamp(-1 * 60 * 60), new ElapsedSecondTimestamp(1 * 60 * 60)); Index narrow4 = index.select(interval4, IndexTimestampSelector.DATA, Overlap.FREE, Lifetime.DISCRETE); if (narrow4 == null) { System.err.println("Didn't do selection narrow 4 properly"); } else { System.err.println("Interval4 = " + interval4); printIndex(narrow4); } factory.close(index); } | 8679 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8679/d00ccf8a44ed142be850d3e37f41ba078b1c31d1/TestLoca1.java/clean/timeindexing/uk/ti/TestLoca1.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
5378,
833,
13,
288,
202,
20308,
202,
380,
5004,
12933,
16062,
8214,
202,
1195,
202,
6385,
12032,
3553,
14772,
273,
394,
12032,
2932,
27602,
8863,
202,
11208,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2774,
12,
780,
5378,
833,
13,
288,
202,
20308,
202,
380,
5004,
12933,
16062,
8214,
202,
1195,
202,
6385,
12032,
3553,
14772,
273,
394,
12032,
2932,
27602,
8863,
202,
11208,
... |
if (containEmptyName(ref.tokens)) return; | if (isRecoveredName(ref.tokens)) return; | public void unresolvableReference(NameReference nameRef, Binding binding) {/* also need to check that the searchedType is the receiver type if (binding instanceof ProblemBinding) { ProblemBinding problem = (ProblemBinding) binding; if (problem.searchType != null && problem.searchType.isHierarchyInconsistent()) severity = SecondaryError; }*/ String[] arguments = new String[] {new String(binding.readableName())}; int end = nameRef.sourceEnd; if (nameRef instanceof QualifiedNameReference) { QualifiedNameReference ref = (QualifiedNameReference) nameRef; if (containEmptyName(ref.tokens)) return; if (ref.indexOfFirstFieldBinding >= 1) end = (int) ref.sourcePositions[ref.indexOfFirstFieldBinding - 1]; } else { SingleNameReference ref = (SingleNameReference) nameRef; if (ref.token != null && ref.token.length == 0) return; } this.handle( IProblem.UndefinedName, arguments, arguments, nameRef.sourceStart, end);} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/b62ba1f827cf4ea86ca5f1a1ddb9504a62920662/ProblemReporter.java/buggy/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
640,
7818,
16845,
2404,
12,
461,
2404,
508,
1957,
16,
15689,
5085,
13,
288,
20308,
2546,
1608,
358,
866,
716,
326,
19242,
559,
353,
326,
5971,
618,
202,
430,
261,
7374,
1276,
21685,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
640,
7818,
16845,
2404,
12,
461,
2404,
508,
1957,
16,
15689,
5085,
13,
288,
20308,
2546,
1608,
358,
866,
716,
326,
19242,
559,
353,
326,
5971,
618,
202,
430,
261,
7374,
1276,
21685,... |
synchronized(this) { | synchronized (this) { | public void run() { synchronized(this) { // Just in case this object is reused in the future finished = false; } final byte[] buf = new byte[SIZE]; int length; try { while ((length = is.read(buf)) > 0) { os.write(buf, 0, length); try { Thread.sleep(SLEEP); } catch (InterruptedException e) {} } } catch(IOException e) { } finally { synchronized(this) { finished = true; notify(); } } } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/c6c232893c39257745a8f7a618bcdb5c59791cae/StreamPumper.java/buggy/src/main/org/apache/tools/ant/taskdefs/StreamPumper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
3639,
3852,
261,
2211,
13,
288,
5411,
368,
12526,
316,
648,
333,
733,
353,
23312,
316,
326,
3563,
5411,
6708,
273,
629,
31,
3639,
289,
3639,
727,
1160,
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,
377,
1071,
918,
1086,
1435,
288,
3639,
3852,
261,
2211,
13,
288,
5411,
368,
12526,
316,
648,
333,
733,
353,
23312,
316,
326,
3563,
5411,
6708,
273,
629,
31,
3639,
289,
3639,
727,
1160,
8526,
... |
return NativeError.make(cx, scope, function, args); | return NativeError.make(cx, scope, f, args); | public Object execMethod(int methodId, IdFunction function, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { if (scopeSlaveFlag) { switch (methodId) { case Id_decodeURI: case Id_decodeURIComponent: { String str = ScriptRuntime.toString(args, 0); return decode(cx, str, methodId == Id_decodeURI); } case Id_encodeURI: case Id_encodeURIComponent: { String str = ScriptRuntime.toString(args, 0); return encode(cx, str, methodId == Id_encodeURI); } case Id_escape: return js_escape(cx, args); case Id_eval: return js_eval(cx, scope, args); case Id_isFinite: { if (args.length < 1) return Boolean.FALSE; double d = ScriptRuntime.toNumber(args[0]); return (d != d || d == Double.POSITIVE_INFINITY || d == Double.NEGATIVE_INFINITY) ? Boolean.FALSE : Boolean.TRUE; } case Id_isNaN: { // The global method isNaN, as per ECMA-262 15.1.2.6. if (args.length < 1) return Boolean.TRUE; double d = ScriptRuntime.toNumber(args[0]); return (d != d) ? Boolean.TRUE : Boolean.FALSE; } case Id_parseFloat: return js_parseFloat(cx, args); case Id_parseInt: return js_parseInt(cx, args); case Id_unescape: return js_unescape(cx, args); case Id_uneval: { Object value = (args.length != 0) ? args[0] : Undefined.instance; return ScriptRuntime.uneval(cx, scope, value); } case Id_new_CommonError: // The implementation of all the ECMA error constructors // (SyntaxError, TypeError, etc.) return NativeError.make(cx, scope, function, args); } } throw IdFunction.onBadMethodId(this, methodId); } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/3526c0f6981dc6716171a07605c6bcc7b6b20cb3/NativeGlobal.java/clean/src/org/mozilla/javascript/NativeGlobal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
12,
474,
707,
548,
16,
3124,
2083,
445,
16,
1772,
9494,
16,
11794,
22780,
2146,
16,
22780,
15261,
16,
11794,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
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,
1033,
1196,
1305,
12,
474,
707,
548,
16,
3124,
2083,
445,
16,
1772,
9494,
16,
11794,
22780,
2146,
16,
22780,
15261,
16,
11794,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,... |
setFeature.invoke(parser, new Object[] {"http: new Boolean(false)}); | setFeature.invoke(parser, new Object[] {"http: new Boolean(true)}); | public Document getDocument(InputStream in, boolean validate) throws IOException { try { // Load the parser class Class parserClass = Class.forName("org.apache.xerces.parsers.DOMParser"); Object parser = parserClass.newInstance(); // Set validation Method setFeature = parserClass.getMethod("setFeature", new Class[] {java.lang.String.class, boolean.class}); setFeature.invoke(parser, new Object[] {"http://xml.org/sax/features/validation", new Boolean(validate)}); // Set namespaces setFeature.invoke(parser, new Object[] {"http://xml.org/sax/features/namespaces", new Boolean(false)}); // Set the error handler if (validate) { Method setErrorHandler = parserClass.getMethod("setErrorHandler", new Class[] {ErrorHandler.class}); setErrorHandler.invoke(parser, new Object[] {new XercesErrHandler()}); } // Parse the document Method parse = parserClass.getMethod("parse", new Class[] {org.xml.sax.InputSource.class}); parse.invoke(parser, new Object[]{new InputSource(in)}); // Get the Document object Method getDocument = parserClass.getMethod("getDocument", null); Document doc = (Document)getDocument.invoke(parser, null); return doc; } catch (InvocationTargetException e) { Throwable targetException = e.getTargetException(); if (targetException instanceof org.xml.sax.SAXParseException) { SAXParseException parseException = (SAXParseException)targetException; throw new IOException("Error on line " + parseException.getLineNumber() + " of XML document: " + parseException.getMessage()); } else { throw new IOException(targetException.getMessage()); } } catch (Exception e) { throw new IOException(e.getMessage()); } } | 49530 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49530/ef3703d41e18ab81326beaaaf428320bd2a69ac5/XercesDOMAdapter.java/clean/core/src/java/org/jdom/adapters/XercesDOMAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4319,
9956,
12,
4348,
316,
16,
1250,
1954,
13,
3639,
1216,
1860,
225,
288,
3639,
775,
288,
5411,
368,
4444,
326,
2082,
667,
5411,
1659,
2082,
797,
273,
1659,
18,
1884,
461,
2932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4319,
9956,
12,
4348,
316,
16,
1250,
1954,
13,
3639,
1216,
1860,
225,
288,
3639,
775,
288,
5411,
368,
4444,
326,
2082,
667,
5411,
1659,
2082,
797,
273,
1659,
18,
1884,
461,
2932,
... |
Driver.debug("supportsCatalogsInDataManipulation false"); | if (Driver.logDebug) Driver.debug("supportsCatalogsInDataManipulation false"); | public boolean supportsCatalogsInProcedureCalls() throws SQLException { Driver.debug("supportsCatalogsInDataManipulation false"); return false; } | 45672 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45672/b465f5307f9f5506beb1edbcc0fb56eed7c29c12/DatabaseMetaData.java/clean/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
6146,
39,
21836,
382,
17213,
10125,
1435,
1216,
6483,
202,
95,
202,
202,
4668,
18,
4148,
2932,
28064,
39,
21836,
382,
751,
19308,
6234,
629,
8863,
202,
202,
2463,
629,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
6146,
39,
21836,
382,
17213,
10125,
1435,
1216,
6483,
202,
95,
202,
202,
4668,
18,
4148,
2932,
28064,
39,
21836,
382,
751,
19308,
6234,
629,
8863,
202,
202,
2463,
629,
31,... |
weapon.flags |= F_LASER | F_DIRECT_FIRE; | weapon.flags |= F_LASER | F_DIRECT_FIRE | F_ENERGY; | public static WeaponType createISSmallPulseLaser() { WeaponType weapon = new WeaponType(); weapon.name = "Small Pulse Laser"; weapon.setInternalName("ISSmallPulseLaser"); weapon.addLookupName("IS Pulse Small Laser"); weapon.addLookupName("IS Small Pulse Laser"); weapon.heat = 2; weapon.damage = 3; weapon.toHitModifier = -2; weapon.ammoType = AmmoType.T_NA; weapon.minimumRange = WEAPON_NA; weapon.shortRange = 1; weapon.mediumRange = 2; weapon.longRange = 3; weapon.extremeRange = 4; weapon.waterShortRange = 1; weapon.waterMediumRange = 2; weapon.waterLongRange = 2; weapon.waterExtremeRange = 4; weapon.tonnage = 1.0f; weapon.criticals = 1; weapon.flags |= F_LASER | F_DIRECT_FIRE; weapon.bv = 12; return weapon; } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/3de8871e6895277c40058c53708655401dda40bd/WeaponType.java/buggy/megamek/src/megamek/common/WeaponType.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1660,
28629,
559,
752,
25689,
81,
454,
52,
24667,
48,
14558,
1435,
288,
3639,
1660,
28629,
559,
732,
28629,
273,
394,
1660,
28629,
559,
5621,
3639,
732,
28629,
18,
529,
273,
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,
760,
1660,
28629,
559,
752,
25689,
81,
454,
52,
24667,
48,
14558,
1435,
288,
3639,
1660,
28629,
559,
732,
28629,
273,
394,
1660,
28629,
559,
5621,
3639,
732,
28629,
18,
529,
273,
31... |
gdc.getSubClasses().add(domainClasses[i]); | if (gdc == null || gdc.getSubClasses()==null) break; gdc.getSubClasses().add(domainClasses[i]); | public static void configureDomainClassRelationships(GrailsDomainClass[] domainClasses, Map domainMap) { // configure super/sub class relationships // and configure how domain class properties reference each other for (int i = 0; i < domainClasses.length; i++) { if(!domainClasses[i].isRoot()) { Class superClass = domainClasses[i].getClazz().getSuperclass(); while(!superClass.equals(Object.class)&&!superClass.equals(GroovyObject.class)) { GrailsDomainClass gdc = (GrailsDomainClass)domainMap.get(superClass.getName()); gdc.getSubClasses().add(domainClasses[i]); superClass = superClass.getSuperclass(); } } GrailsDomainClassProperty[] props = domainClasses[i].getPersistantProperties(); for (int j = 0; j < props.length; j++) { if(props[j].isAssociation()) { GrailsDomainClassProperty prop = props[j]; GrailsDomainClass referencedGrailsDomainClass = (GrailsDomainClass)domainMap.get( props[j].getReferencedPropertyType().getName() ); prop.setReferencedDomainClass(referencedGrailsDomainClass); } } } // now configure so that the 'other side' of a property can be resolved by the property itself for (int i = 0; i < domainClasses.length; i++) { GrailsDomainClassProperty[] props = domainClasses[i].getPersistantProperties(); for (int j = 0; j < props.length; j++) { if(props[j].isAssociation()) { GrailsDomainClassProperty prop = props[j]; GrailsDomainClass referenced = prop.getReferencedDomainClass(); if(referenced != null) { GrailsDomainClassProperty[] referencedProperties = referenced.getPersistantProperties(); for (int k = 0; k < referencedProperties.length; k++) { // for circular dependencies we don't want the other side // to be equal to self if(prop.equals(referencedProperties[k])) continue; if(domainClasses[i].getClazz().equals(referencedProperties[k].getReferencedPropertyType())) { prop.setOtherSide(referencedProperties[k]); break; } } } } } } } | 47932 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47932/ff2e3be8ae20a5eff9f130e6b1fcd2b3d11750e7/GrailsDomainConfigurationUtil.java/clean/grails/src/persistence/org/codehaus/groovy/grails/orm/hibernate/cfg/GrailsDomainConfigurationUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
5068,
3748,
797,
17185,
12,
14571,
14573,
3748,
797,
8526,
2461,
4818,
16,
1635,
2461,
863,
13,
288,
377,
202,
759,
5068,
2240,
19,
1717,
667,
11499,
377,
202,
759,
471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5068,
3748,
797,
17185,
12,
14571,
14573,
3748,
797,
8526,
2461,
4818,
16,
1635,
2461,
863,
13,
288,
377,
202,
759,
5068,
2240,
19,
1717,
667,
11499,
377,
202,
759,
471,
... |
if (helper.needsWriteBarrier()) { final Register tmp = requestRegister(JvmType.INT, false); | if (!inf.isPrimitive() && helper.needsWriteBarrier()) { final Register tmp = L1AHelper.requestRegister(eContext, JvmType.INT, false); | public final void visit_putfield(VmConstFieldRef fieldRef) { fieldRef.resolve(loader); final VmField field = fieldRef.getResolvedVmField(); if (field.isStatic()) { throw new IncompatibleClassChangeError( "getfield called on static field " + fieldRef.getName()); } final VmInstanceField inf = (VmInstanceField) field; final int offset = inf.getOffset(); final boolean wide = fieldRef.isWide(); // Get operands final Item val = vstack.pop(); assertCondition(val.getCategory() == ((wide) ? 2 : 1), "category mismatch"); final RefItem ref = vstack.popRef(); // Load value & ref val.load(eContext); ref.load(eContext); final Register refr = ref.getRegister(); if (!wide) { final WordItem wval = (WordItem) val; final Register valr = wval.getRegister(); // Store field os.writeMOV(INTSIZE, refr, offset, valr); // Writebarrier if (helper.needsWriteBarrier()) { final Register tmp = requestRegister(JvmType.INT, false); helper.writePutfieldWriteBarrier(inf, refr, valr, tmp); releaseRegister(tmp); } } else { final DoubleWordItem dval = (DoubleWordItem) val; os.writeMOV(INTSIZE, refr, offset + MSB, dval.getMsbRegister()); os.writeMOV(INTSIZE, refr, offset + LSB, dval.getLsbRegister()); } // Release val.release(eContext); ref.release(eContext); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7f3f443c80552e30cb144c1a1ce760d89fa35f2b/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
3757,
67,
458,
1518,
12,
22143,
9661,
974,
1957,
652,
1957,
13,
288,
202,
202,
1518,
1957,
18,
10828,
12,
6714,
1769,
202,
202,
6385,
776,
81,
974,
652,
273,
652,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
3757,
67,
458,
1518,
12,
22143,
9661,
974,
1957,
652,
1957,
13,
288,
202,
202,
1518,
1957,
18,
10828,
12,
6714,
1769,
202,
202,
6385,
776,
81,
974,
652,
273,
652,
... |
case ENCODING_EXTERNAL: case ENCODING_UTF_8: inputEncoding = "UTF-8"; break; case ENCODING_ISO_8859_1: inputEncoding = "ISO-8859-1"; break; case ENCODING_UCS_2_12: inputEncoding = "UTF-16BE"; break; case ENCODING_UCS_2_21: inputEncoding = "UTF-16LE"; break; | handler.warn("expected XML version 1.0, not: " + version); xmlVersion = XML_11; | private String parseXMLDecl (boolean ignoreEncoding) throws SAXException, IOException { String version; String encodingName = null; String standalone = null; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; String inputEncoding = null; switch (this.encoding) { case ENCODING_EXTERNAL: case ENCODING_UTF_8: inputEncoding = "UTF-8"; break; case ENCODING_ISO_8859_1: inputEncoding = "ISO-8859-1"; break; case ENCODING_UCS_2_12: inputEncoding = "UTF-16BE"; break; case ENCODING_UCS_2_21: inputEncoding = "UTF-16LE"; break; } // Read the version. require ("version"); parseEq (); checkLegalVersion (version = readLiteral (flags)); if (!version.equals ("1.0")){ if(version.equals ("1.1")){ handler.warn ("expected XML version 1.0, not: " + version); xmlVersion = XML_11; }else { error("illegal XML version", version, "1.0 or 1.1"); } } else xmlVersion = XML_10; // Try reading an encoding declaration. boolean white = tryWhitespace (); if (tryRead ("encoding")) { if (!white) error ("whitespace required before 'encoding='"); parseEq (); encodingName = readLiteral (flags); if (!ignoreEncoding) setupDecoding (encodingName); } // Try reading a standalone declaration if (encodingName != null) white = tryWhitespace (); if (tryRead ("standalone")) { if (!white) error ("whitespace required before 'standalone='"); parseEq (); standalone = readLiteral (flags); if ("yes".equals (standalone)) docIsStandalone = true; else if (!"no".equals (standalone)) error ("standalone flag must be 'yes' or 'no'"); } skipWhitespace (); require ("?>"); if (inputEncoding == null) { inputEncoding = encodingName; } handler.xmlDecl(version, encodingName, "yes".equals(standalone), inputEncoding); return encodingName; } | 1739 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1739/7fb7568e63c3fe14af521de4699cb37898923ca7/XmlParser.java/buggy/libjava/gnu/xml/aelfred2/XmlParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
1109,
4201,
3456,
261,
6494,
2305,
4705,
13,
565,
1216,
14366,
16,
1860,
565,
288,
202,
780,
202,
1589,
31,
202,
780,
202,
5999,
461,
273,
446,
31,
202,
780,
202,
10145,
1245... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
1109,
4201,
3456,
261,
6494,
2305,
4705,
13,
565,
1216,
14366,
16,
1860,
565,
288,
202,
780,
202,
1589,
31,
202,
780,
202,
5999,
461,
273,
446,
31,
202,
780,
202,
10145,
1245... |
type = col_type; | type = columnType; | public void parseColumnType(String col_type) throws Exception { int start, end; String type, size = null; start = col_type.indexOf('('); end = col_type.indexOf(')'); if (start != -1 && end != -1) { type = col_type.substring(0, start); size = col_type.substring(start + 1, end).replaceAll(",\\d+", ""); } else { type = col_type; } this.setType(normalizeColumnType(type, size != null)); if (size != null) { this.setSize(Integer.parseInt(size)); } else { this.setSize(columnTypeSize(this.getType())); } } | 25465 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25465/35d86a9c00181d3e1fd4b77dbc3dd0ccbd8fa6cd/Column.java/buggy/opennms-install/src/main/java/org/opennms/install/Column.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1109,
28149,
12,
780,
645,
67,
723,
13,
1216,
1185,
288,
3639,
509,
787,
16,
679,
31,
3639,
514,
618,
16,
963,
273,
446,
31,
3639,
787,
273,
645,
67,
723,
18,
31806,
2668,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
28149,
12,
780,
645,
67,
723,
13,
1216,
1185,
288,
3639,
509,
787,
16,
679,
31,
3639,
514,
618,
16,
963,
273,
446,
31,
3639,
787,
273,
645,
67,
723,
18,
31806,
2668,
... |
SessionFactory sf = (SessionFactory)getObject(); if(sf != null) { Configuration c = getConfiguration(); if(c instanceof GrailsDomainConfiguration) { GrailsDomainConfiguration gc = (GrailsDomainConfiguration)c; gc.configureDynamicMethods(sf); } | if(this.applicationContext!= null) { GrailsDomainConfigurationUtil.configureDynamicMethods(applicationContext,this.grailsApplication); | public void afterPropertiesSet() throws Exception { ClassLoader originalClassLoader = null; if (this.classLoader != null) { originalClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(this.classLoader); } super.afterPropertiesSet(); SessionFactory sf = (SessionFactory)getObject(); if(sf != null) { Configuration c = getConfiguration(); if(c instanceof GrailsDomainConfiguration) { GrailsDomainConfiguration gc = (GrailsDomainConfiguration)c; gc.configureDynamicMethods(sf); } } if (originalClassLoader != null) { Thread.currentThread().setContextClassLoader(originalClassLoader); } } | 53275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53275/5fb3591a0b45d20963e3a5bee8bd500f45befe8d/ConfigurableLocalSessionFactoryBean.java/buggy/src/persistence/org/codehaus/groovy/grails/orm/hibernate/ConfigurableLocalSessionFactoryBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1839,
2297,
694,
1435,
1216,
1185,
288,
202,
202,
7805,
2282,
7805,
273,
446,
31,
202,
202,
430,
261,
2211,
18,
1106,
2886,
480,
446,
13,
288,
1082,
202,
8830,
7805,
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,
1839,
2297,
694,
1435,
1216,
1185,
288,
202,
202,
7805,
2282,
7805,
273,
446,
31,
202,
202,
430,
261,
2211,
18,
1106,
2886,
480,
446,
13,
288,
1082,
202,
8830,
7805,
273,... |
task1 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 1", true); task2 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 2", true); task3 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 3", true); task4 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 4", true); task5 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 5", true); | task1 = new Task(TasksUiPlugin.getTaskListManager().genUniqueTaskHandle(), "task 1", true); task2 = new Task(TasksUiPlugin.getTaskListManager().genUniqueTaskHandle(), "task 2", true); task3 = new Task(TasksUiPlugin.getTaskListManager().genUniqueTaskHandle(), "task 3", true); task4 = new Task(TasksUiPlugin.getTaskListManager().genUniqueTaskHandle(), "task 4", true); task5 = new Task(TasksUiPlugin.getTaskListManager().genUniqueTaskHandle(), "task 5", true); | protected void setUp() throws Exception { super.setUp(); try { MylarTaskListPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().showView( "org.eclipse.mylar.tasks.ui.views.TaskListView"); } catch (PartInitException e) { // TODO Auto-generated catch block e.printStackTrace(); fail("View not initialized"); } assertNotNull(TaskListView.getFromActivePerspective()); taskView = TaskListView.getFromActivePerspective(); resetHistory(); task1 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 1", true); task2 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 2", true); task3 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 3", true); task4 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 4", true); task5 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 5", true); manager.getTaskList().moveToRoot(task1); manager.getTaskList().moveToRoot(task2); manager.getTaskList().moveToRoot(task3); manager.getTaskList().moveToRoot(task4); manager.getTaskList().moveToRoot(task5); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/b23efbfef800ff6f85224f036d6a11e9fab7acba/TaskHistoryTest.java/buggy/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/TaskHistoryTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
24292,
1435,
1216,
1185,
288,
202,
202,
9565,
18,
542,
1211,
5621,
202,
202,
698,
288,
1082,
202,
12062,
7901,
2174,
682,
3773,
18,
588,
1868,
7675,
588,
2421,
22144,
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,
225,
202,
1117,
918,
24292,
1435,
1216,
1185,
288,
202,
202,
9565,
18,
542,
1211,
5621,
202,
202,
698,
288,
1082,
202,
12062,
7901,
2174,
682,
3773,
18,
588,
1868,
7675,
588,
2421,
22144,
7675... |
os.writeCALL(initializer); os.setObjectRef(done); | public final void writeClassInitialize(Label curInstrLabel, GPR classReg, VmType< ? > cls) { if (!cls.isInitialized()) { // Create jump labels final Label doInit = new Label(curInstrLabel + "$$do-cinit-ex"); final Label done = new Label(curInstrLabel + "$$done-cinit-ex"); // Test declaringClass.modifiers os.writeTEST(BITS32, classReg, entryPoints.getVmTypeState() .getOffset(), VmTypeState.ST_INITIALIZED); // Jump when not initialized to diInit. // Branch predication expects this forward jump NOT // to be taken. os.writeJCC(doInit, X86Constants.JZ); // We don't have to initialize, so jump over the init-code. os.writeJMP(done); // Start initialize code os.setObjectRef(doInit); // Get label for class initialize code Label initializer = classInitLabels.get(cls); if (initializer == null) { // create one initializer = genLabel("$$init-" + cls.getName()); classInitLabels.put(cls, initializer); } // Setup call to class initializer code os.writeCALL(initializer); // Set the done label os.setObjectRef(done); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/67d1d0f88f78572e33917f59b692475fece9c7d9/X86CompilerHelper.java/clean/core/src/core/org/jnode/vm/x86/compiler/X86CompilerHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
918,
1045,
797,
7520,
12,
2224,
662,
382,
701,
2224,
16,
4948,
54,
667,
1617,
16,
5411,
776,
81,
559,
32,
692,
405,
2028,
13,
288,
3639,
309,
16051,
6429,
18,
291,
11459,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
918,
1045,
797,
7520,
12,
2224,
662,
382,
701,
2224,
16,
4948,
54,
667,
1617,
16,
5411,
776,
81,
559,
32,
692,
405,
2028,
13,
288,
3639,
309,
16051,
6429,
18,
291,
11459,
1... | |
byte[] bytes = cdptargetipaddress.getBytes(); | log.warn(" cdp address is " + cdptargetipaddress); log.warn(" cdp address is " + cdptargetipaddress); String hexDigits = cdptargetipaddress.trim().toLowerCase(); long ipAddr = Long.parseLong(hexDigits, 16); byte[] bytes = new byte[4]; bytes[0] = (byte) (ipAddr & 0xff); bytes[1] = (byte) ((ipAddr >> 8) & 0xff); bytes[2] = (byte) ((ipAddr >> 16) & 0xff); bytes[3] = (byte) ((ipAddr >> 24) & 0xff); | private void storeSnmpCollection(Connection dbConn, Timestamp now) throws SQLException, UnknownHostException { Category log = ThreadCategory.getInstance(getClass()); PreparedStatement stmt = null; ResultSet rs = null; Iterator ite = null; int nodeid = m_node.getNodeId(); if (m_snmpcoll.hasIpNetToMediaTable()) { ite = m_snmpcoll.getIpNetToMediaTable() .getEntries().iterator(); if (log.isDebugEnabled()) log .debug("store: saving IpNetToMediaTable to atinterface table in DB"); while (ite.hasNext()) { int atnodeid = -1; IpNetToMediaTableEntry ent = (IpNetToMediaTableEntry) ite .next(); int ifindex = ent .getInt32(IpNetToMediaTableEntry.INTM_INDEX); String physAddr = ent .getHexString(IpNetToMediaTableEntry.INTM_PHYSADDR); InetAddress ipaddress = ent .getIPAddress(IpNetToMediaTableEntry.INTM_NETADDR); if (log.isDebugEnabled()) log.debug("store: trying save info for ipaddr " + ipaddress.getHostName() + " mac address " + physAddr + " found on ifindex " + ifindex); try { stmt = dbConn.prepareStatement(SQL_GET_NODEID); stmt.setString(1, ipaddress.getHostAddress()); rs = stmt.executeQuery(); if (!rs.next()) { rs.close(); stmt.close(); if (log.isEnabledFor(Priority.WARN)) log.warn("store: no nodeid found for ipaddress " + ipaddress + "."); continue; } int ndx = 1; atnodeid = rs.getInt(ndx++); if (rs.wasNull()) { if (log.isEnabledFor(Priority.WARN)) log.warn("store: no nodeid find for ipaddress " + ipaddress + "."); continue; } } finally { if (rs != null) rs.close(); if (stmt != null) stmt.close(); } if (physAddr.equals("000000000000")) { log.warn("store: mac address " + physAddr + " is invalid for ipaddress " + ipaddress.getHostAddress()); continue; } DbAtInterfaceEntry atInterfaceEntry = DbAtInterfaceEntry.get( dbConn, atnodeid, ipaddress.getHostAddress()); if (atInterfaceEntry == null) { atInterfaceEntry = DbAtInterfaceEntry.create(atnodeid, ipaddress.getHostAddress()); } // update object atInterfaceEntry.updateAtPhysAddr(physAddr); atInterfaceEntry.updateSourceNodeId(nodeid); atInterfaceEntry.updateIfIndex(ifindex); atInterfaceEntry.updateStatus(DbAtInterfaceEntry.STATUS_ACTIVE); atInterfaceEntry.set_lastpolltime(now); // store object in database atInterfaceEntry.store(dbConn); } } if (m_snmpcoll.hasCdpCacheTable()) { java.util.List cdpInterfaces = new java.util.ArrayList(); ite = m_snmpcoll.getCdpCacheTable() .getEntries().iterator(); while (ite.hasNext()) { CdpCacheTableEntry cdpEntry = (CdpCacheTableEntry) ite.next(); int cdpAddrType = cdpEntry.getInt32(CdpCacheTableEntry.CDP_ADDRESS_TYPE); if (cdpAddrType != 1) continue; String cdptargetipaddress = cdpEntry.getHexString(CdpCacheTableEntry.CDP_ADDRESS); byte[] bytes = cdptargetipaddress.getBytes(); InetAddress cdpTargetIpAddr = InetAddress.getByAddress(bytes); int cdpIfIndex = cdpEntry.getInt32(CdpCacheTableEntry.CDP_IFINDEX); String cdpTargetDevicePort = cdpEntry.getHexString(CdpCacheTableEntry.CDP_DEVICEPORT); CdpInterface cdpIface = new CdpInterface(cdpIfIndex); int targetCdpNodeId = getNodeidFromIp(dbConn, cdpTargetIpAddr); cdpIface.setCdpTargetNodeId(targetCdpNodeId); cdpIface.setCdpTargetIpAddr(cdpTargetIpAddr); cdpIface.setCdpTargetIfIndex(getIfIndexFromSnmpInterfaceIfName( dbConn, targetCdpNodeId, cdpTargetDevicePort)); cdpInterfaces.add(cdpIface); } m_node.setCdpInterfaces(cdpInterfaces); } if (m_snmpcoll.hasRouteTable()) { java.util.List routeInterfaces = new java.util.ArrayList(); ite = m_snmpcoll.getIpRouteTable().getEntries() .iterator(); if (log.isDebugEnabled()) log .debug("store: saving ipRouteTable to iprouteinterface table in DB"); while (ite.hasNext()) { IpRouteTableEntry ent = (IpRouteTableEntry) ite.next(); InetAddress routedest = ent.getIPAddress(IpRouteTableEntry.IP_ROUTE_DEST); InetAddress routemask = ent.getIPAddress(IpRouteTableEntry.IP_ROUTE_MASK); InetAddress nexthop = ent.getIPAddress(IpRouteTableEntry.IP_ROUTE_NXTHOP); int ifindex = ent.getInt32(IpRouteTableEntry.IP_ROUTE_IFINDEX); int routemetric1 = ent.getInt32(IpRouteTableEntry.IP_ROUTE_METRIC1); int routemetric2 = ent.getInt32(IpRouteTableEntry.IP_ROUTE_METRIC2); int routemetric3 =ent.getInt32(IpRouteTableEntry.IP_ROUTE_METRIC3); int routemetric4 = ent.getInt32(IpRouteTableEntry.IP_ROUTE_METRIC4); int routemetric5 = ent.getInt32(IpRouteTableEntry.IP_ROUTE_METRIC5); int routetype = ent.getInt32(IpRouteTableEntry.IP_ROUTE_TYPE); int routeproto = ent.getInt32(IpRouteTableEntry.IP_ROUTE_PROTO); // info used for Discovery Link RouterInterface routeIface = new RouterInterface(ifindex); routeIface.setMetric(routemetric1); routeIface.setNextHop(nexthop); routeIface.setSnmpiftype(getSnmpIfType(dbConn, nodeid, ifindex)); routeIface.setNodeparentid(getNodeidFromIp(dbConn,nexthop)); routeInterfaces.add(routeIface); // save info to DB DbIpRouteInterfaceEntry iprouteInterfaceEntry = DbIpRouteInterfaceEntry .get(dbConn, nodeid, routedest.getHostAddress()); if (iprouteInterfaceEntry == null) { // Create a new entry iprouteInterfaceEntry = DbIpRouteInterfaceEntry.create( m_node.getNodeId(), routedest.getHostAddress()); } // update object iprouteInterfaceEntry.updateRouteMask(routemask.getHostAddress()); iprouteInterfaceEntry.updateRouteNextHop(nexthop.getHostAddress()); iprouteInterfaceEntry.updateIfIndex(ifindex); if (routemetric1 != -1) iprouteInterfaceEntry.updateRouteMetric1(routemetric1); if (routemetric2 != -1) iprouteInterfaceEntry.updateRouteMetric2(routemetric2); if (routemetric3 != -1) iprouteInterfaceEntry.updateRouteMetric3(routemetric3); if (routemetric4 != -1) iprouteInterfaceEntry.updateRouteMetric4(routemetric4); if (routemetric5 != -1) iprouteInterfaceEntry.updateRouteMetric5(routemetric5); if (routetype != -1) iprouteInterfaceEntry.updateRouteType(routetype); if (routeproto != -1) iprouteInterfaceEntry.updateRouteProto(routeproto); iprouteInterfaceEntry .updateStatus(DbAtInterfaceEntry.STATUS_ACTIVE); iprouteInterfaceEntry.set_lastpolltime(now); // store object in database iprouteInterfaceEntry.store(dbConn); } m_node.setRouteInterfaces(routeInterfaces); } // STARTS loop on vlans if (m_snmpcoll.hasVlanTable()) { ite = m_snmpcoll.getSnmpVlanCollections() .iterator(); while (ite.hasNext()) { SnmpVlanCollection snmpVlanColl = (SnmpVlanCollection) ite .next(); String vlanindex = snmpVlanColl.getVlanIndex(); int vlan = Integer.parseInt(vlanindex); String vlanname = snmpVlanColl.getVlanName(); if (log.isDebugEnabled()) log .debug("store: saving SnmpVlanCollection entries in DB for VLAN " + vlanname + " index " + vlanindex); if (snmpVlanColl.hasDot1dBase()) { if (log.isDebugEnabled()) log .debug("store: saving Dot1dBaseGroup in stpnode table in DB"); Dot1dBaseGroup dod1db = (Dot1dBaseGroup) snmpVlanColl.getDot1dBase(); String baseBridgeAddress = dod1db.getBridgeAddress(); int basenumports = dod1db.getNumberOfPorts(); int bridgetype = dod1db.getBridgeType(); if (baseBridgeAddress == "000000000000") { log.warn("store: base bridge address " + baseBridgeAddress + " is invalid for ipaddress " ); } else { m_node.addBridgeIdentifier(baseBridgeAddress,vlanindex); DbStpNodeEntry dbStpNodeEntry = DbStpNodeEntry.get(dbConn, m_node.getNodeId(), vlan); if (dbStpNodeEntry == null) { // Create a new entry dbStpNodeEntry = DbStpNodeEntry.create(m_node .getNodeId(), vlan); } // update object dbStpNodeEntry.updateBaseBridgeAddress(baseBridgeAddress); dbStpNodeEntry.updateBaseNumPorts(basenumports); dbStpNodeEntry.updateBaseType(bridgetype); dbStpNodeEntry.updateBaseVlanName(vlanname); if (snmpVlanColl.hasDot1dStp()) { if (log.isDebugEnabled()) log .debug("store: saving Dot1dStpGroup in stpnode table in DB"); Dot1dStpGroup dod1stp = (Dot1dStpGroup) snmpVlanColl .getDot1dStp(); int protospec = dod1stp.getStpProtocolSpecification(); int stppriority = dod1stp.getStpPriority(); String stpDesignatedRoot = dod1stp.getStpDesignatedRoot(); int stprootcost = dod1stp.getStpRootCost(); int stprootport = dod1stp.getStpRootPort(); if (stpDesignatedRoot != "0000000000000000") { m_node.setVlanStpRoot(vlanindex,stpDesignatedRoot); } dbStpNodeEntry.updateStpProtocolSpecification(protospec); dbStpNodeEntry.updateStpPriority(stppriority); dbStpNodeEntry.updateStpDesignatedRoot(stpDesignatedRoot); dbStpNodeEntry.updateStpRootCost(stprootcost); dbStpNodeEntry.updateStpRootPort(stprootport); } // store object in database dbStpNodeEntry.updateStatus(DbStpNodeEntry.STATUS_ACTIVE); dbStpNodeEntry.set_lastpolltime(now); dbStpNodeEntry.store(dbConn); if (snmpVlanColl.hasDot1dBasePortTable()) { Iterator sub_ite = snmpVlanColl.getDot1dBasePortTable() .getEntries().iterator(); if (log.isDebugEnabled()) log .debug("store: saving Dot1dBasePortTable in stpinterface table in DB"); while (sub_ite.hasNext()) { Dot1dBasePortTableEntry dot1dbaseptentry = (Dot1dBasePortTableEntry) sub_ite .next(); int baseport = dot1dbaseptentry.getInt32(Dot1dBasePortTableEntry.BASE_PORT); int ifindex = dot1dbaseptentry.getInt32(Dot1dBasePortTableEntry.BASE_IFINDEX); m_node.setIfIndexBridgePort(ifindex,baseport); DbStpInterfaceEntry dbStpIntEntry = DbStpInterfaceEntry .get(dbConn, m_node.getNodeId(), baseport, vlan); if (dbStpIntEntry == null) { // Create a new entry dbStpIntEntry = DbStpInterfaceEntry.create( m_node.getNodeId(), baseport, vlan); } dbStpIntEntry.updateIfIndex(ifindex); dbStpIntEntry .updateStatus(DbStpNodeEntry.STATUS_ACTIVE); dbStpIntEntry.set_lastpolltime(now); dbStpIntEntry.store(dbConn); } } if (snmpVlanColl.hasDot1dStpPortTable()) { if (log.isDebugEnabled()) log .debug(" store: saving Dot1dStpPortTable in stpinterface table in DB"); Iterator sub_ite = snmpVlanColl.getDot1dStpPortTable() .getEntries().iterator(); while (sub_ite.hasNext()) { Dot1dStpPortTableEntry dot1dstpptentry = (Dot1dStpPortTableEntry) sub_ite .next(); int stpport = dot1dstpptentry.getInt32(Dot1dStpPortTableEntry.STP_PORT); DbStpInterfaceEntry dbStpIntEntry = DbStpInterfaceEntry .get(dbConn, m_node.getNodeId(), stpport, vlan); if (dbStpIntEntry == null) { // Cannot create the object becouse must exists the dot1dbase // object!!!!! if (log.isEnabledFor(Priority.WARN)) log .warn("store StpInterface: when storing STP info" + " for bridge node with nodeid " + m_node.getNodeId() + " bridgeport number " + stpport + " and vlan index " + vlanindex + " info not found in database, ERROR skipping....."); } else { int stpportstate = dot1dstpptentry .getInt32(Dot1dStpPortTableEntry.STP_PORT_STATE); int stpportpathcost = dot1dstpptentry .getInt32(Dot1dStpPortTableEntry.STP_PORT_PATH_COST); String stpPortDesignatedBridge = dot1dstpptentry .getHexString(Dot1dStpPortTableEntry.STP_PORT_DESIGNATED_BRIDGE); String stpPortDesignatedRoot = dot1dstpptentry .getHexString(Dot1dStpPortTableEntry.STP_PORT_DESIGNATED_ROOT); int stpportdesignatedcost = dot1dstpptentry .getInt32(Dot1dStpPortTableEntry.STP_PORT_DESIGNATED_COST); String stpPortDesignatedPort = dot1dstpptentry .getHexString(Dot1dStpPortTableEntry.STP_PORT_DESIGNATED_PORT); if (stpPortDesignatedBridge.equals("0000000000000000")) { log.warn("storeSnmpCollection: designated bridge is invalid not adding to discoveryLink"); } else if (stpPortDesignatedPort.equals("0000")) { log.warn("storeSnmpCollection: designated port is invalid not adding to discoveryLink"); } else { BridgeStpInterface stpIface = new BridgeStpInterface(stpport,vlanindex); stpIface.setStpPortDesignatedBridge(stpPortDesignatedBridge); stpIface.setStpPortDesignatedPort(stpPortDesignatedPort); m_node.addStpInterface(stpIface); } dbStpIntEntry.updateStpPortState(stpportstate); dbStpIntEntry.updateStpPortPathCost(stpportpathcost); dbStpIntEntry.updateStpportDesignatedBridge(stpPortDesignatedBridge); dbStpIntEntry.updateStpportDesignatedRoot(stpPortDesignatedRoot); dbStpIntEntry.updateStpPortDesignatedCost(stpportdesignatedcost); dbStpIntEntry.updateStpportDesignatedPort(stpPortDesignatedPort); dbStpIntEntry.updateStatus(DbStpNodeEntry.STATUS_ACTIVE); dbStpIntEntry.set_lastpolltime(now); dbStpIntEntry.store(dbConn); } } } if (snmpVlanColl.hasDot1dTpFdbTable()) { Iterator subite = snmpVlanColl.getDot1dFdbTable() .getEntries().iterator(); while (subite.hasNext()) { Dot1dTpFdbTableEntry dot1dfdbentry = (Dot1dTpFdbTableEntry) subite .next(); String curMacAddress = dot1dfdbentry .getHexString(Dot1dTpFdbTableEntry.FDB_ADDRESS); int fdbport = dot1dfdbentry.getInt32(Dot1dTpFdbTableEntry.FDB_PORT); if (fdbport == 0) { if (log.isDebugEnabled()) log.debug("populateBridge: macaddress " + curMacAddress + " learned on invalid port " + fdbport + " . Skipping"); continue; } int curfdbstatus = dot1dfdbentry.getInt32(Dot1dTpFdbTableEntry.FDB_STATUS); if (curfdbstatus == SNMP_DOT1D_FDB_STATUS_LEARNED) { m_node.addMacAddress(fdbport, curMacAddress, vlanindex); if (log.isDebugEnabled()) log .debug("storeSnmpCollection: found learned mac address " + curMacAddress + " on bridge port " + fdbport + " for VLAN " + snmpVlanColl.getVlanIndex()); } if (curfdbstatus == SNMP_DOT1D_FDB_STATUS_SELF) { m_node.addBridgeIdentifier(curMacAddress); if (log.isDebugEnabled()) log .debug("storeSnmpCollection: found bridge identifier " + curMacAddress + " for VLAN " + snmpVlanColl.getVlanIndex() + " and bridge port " + fdbport); } if (curfdbstatus == SNMP_DOT1D_FDB_STATUS_INVALID) { if (log.isDebugEnabled()) log.debug("storeSnmpCollection: macaddress " + curMacAddress + " has INVALID status on port " + fdbport + " . Skipping"); continue; } if (curfdbstatus == SNMP_DOT1D_FDB_STATUS_MGMT) { if (log.isDebugEnabled()) log.debug("storeSnmpCollection: macaddress " + curMacAddress + " has MGMT status on port " + fdbport + " . Skipping"); continue; } if (curfdbstatus == SNMP_DOT1D_FDB_STATUS_OTHER) { if (log.isDebugEnabled()) log.debug("storeSnmpCollection: macaddress " + curMacAddress + " has OTHER status on port " + fdbport + " . Skipping"); continue; } } } //now adding bridge identifier mac addresses of switch from snmpinterface stmt = dbConn.prepareStatement(SQL_GET_SNMPPHYSADDR_SNMPINTERFACE); stmt.setInt(1, m_node.getNodeId()); rs = stmt.executeQuery(); while (rs.next()) { String macaddr = rs.getString("snmpphysaddr"); if (macaddr == null) continue; m_node.addBridgeIdentifier(macaddr); if (log.isDebugEnabled()) log .debug("storeSnmpCollection: found bridge identifier " + macaddr + " from snmpinterface db table"); } //now adding bridge identifier mac addresses of switch from snmpinterface stmt = dbConn.prepareStatement(SQL_GET_ATPHYSADDR_SNMPINTERFACE); stmt.setInt(1, m_node.getNodeId()); rs = stmt.executeQuery(); while (rs.next()) { String macaddr = rs.getString("atphysaddr"); if (macaddr == null) continue; m_node.addBridgeIdentifier(macaddr); if (log.isDebugEnabled()) log .debug("storeSnmpCollection: found bridge identifier " + macaddr + " from atinterface db table"); } } } } } int i = 0; stmt = dbConn.prepareStatement(SQL_UPDATE_ATINTERFACE); stmt.setInt(1, m_node.getNodeId()); stmt.setTimestamp(2, now); i = stmt.executeUpdate(); if (log.isDebugEnabled()) log.debug("store: SQL statement " + stmt.toString() + ". " + i + " rows UPDATED for nodeid " + m_node.getNodeId() + "."); stmt.close(); stmt = dbConn.prepareStatement(SQL_UPDATE_IPROUTEINTERFACE); stmt.setInt(1, m_node.getNodeId()); stmt.setTimestamp(2, now); i = stmt.executeUpdate(); if (log.isDebugEnabled()) log.debug("store: SQL statement " + stmt.toString() + ". " + i + " rows UPDATED for nodeid " + m_node.getNodeId() + "."); stmt.close(); stmt = dbConn.prepareStatement(SQL_UPDATE_STPNODE); stmt.setInt(1, m_node.getNodeId()); stmt.setTimestamp(2, now); i = stmt.executeUpdate(); if (log.isDebugEnabled()) log.debug("store: SQL statement " + stmt.toString() + ". " + i + " rows UPDATED for nodeid " + m_node.getNodeId() + "."); stmt.close(); stmt = dbConn.prepareStatement(SQL_UPDATE_STPINTERFACE); stmt.setInt(1, m_node.getNodeId()); stmt.setTimestamp(2, now); i = stmt.executeUpdate(); if (log.isDebugEnabled()) log.debug("store: SQL statement " + stmt.toString() + ". " + i + " rows UPDATED for nodeid " + m_node.getNodeId() + "."); stmt.close(); } | 48885 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48885/626f6afdcec567a4c044af0196f1215ed1878bb2/DbEventWriter.java/buggy/opennms-services/src/main/java/org/opennms/netmgt/linkd/DbEventWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1707,
10461,
1291,
2532,
12,
1952,
30795,
16,
8159,
2037,
13,
1216,
6483,
16,
1082,
202,
4874,
29776,
288,
202,
202,
4457,
613,
273,
4884,
4457,
18,
588,
1442,
12,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1707,
10461,
1291,
2532,
12,
1952,
30795,
16,
8159,
2037,
13,
1216,
6483,
16,
1082,
202,
4874,
29776,
288,
202,
202,
4457,
613,
273,
4884,
4457,
18,
588,
1442,
12,
588,
... |
} return super.getDefaultMonitor(); } | } return super.getDefaultMonitor(); } | public IProgressMonitor getDefaultMonitor() { //only need a default monitor for operations the UI thread //and only if there is a display Display display; if (PlatformUI.isWorkbenchRunning() && !((Workbench)PlatformUI.getWorkbench()).isStarting()) { display = PlatformUI.getWorkbench().getDisplay(); if (!display.isDisposed() && (display.getThread() == Thread.currentThread())) { return new EventLoopProgressMonitor(new NullProgressMonitor()); } } return super.getDefaultMonitor(); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/9f68fc05c49b144eebae1957b15f8f3671c54cac/ProgressManager.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
5491,
7187,
4829,
7187,
1435,
288,
3639,
368,
3700,
1608,
279,
805,
6438,
364,
5295,
326,
6484,
2650,
3639,
368,
464,
1338,
309,
1915,
353,
279,
2562,
3639,
9311,
2562,
31,
363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
467,
5491,
7187,
4829,
7187,
1435,
288,
3639,
368,
3700,
1608,
279,
805,
6438,
364,
5295,
326,
6484,
2650,
3639,
368,
464,
1338,
309,
1915,
353,
279,
2562,
3639,
9311,
2562,
31,
363... |
protected void onPress(InputEvent e, final MyActionButton button) { final AnAction action = new OpenProjectAction(); action.actionPerformed(new AnActionEvent(e, new DataContext() { public Object getData(String dataId) { if (DataConstants.PROJECT.equals(dataId)) { return null; } return button; } }, ActionPlaces.UNKNOWN, new PresentationFactory().getPresentation(action), actionManager, 0)); | protected void onPress(InputEvent e) { ProjectUtil.createNewProject(null); | protected void onPress(InputEvent e, final MyActionButton button) { final AnAction action = new OpenProjectAction(); action.actionPerformed(new AnActionEvent(e, new DataContext() { public Object getData(String dataId) { if (DataConstants.PROJECT.equals(dataId)) { return null; } return button; } }, ActionPlaces.UNKNOWN, new PresentationFactory().getPresentation(action), actionManager, 0)); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/057c1fc4eca73d8d659037771b3e5b73e8b81dd3/WelcomeScreen.java/clean/source/com/intellij/openapi/wm/impl/welcomeScreen/WelcomeScreen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
4750,
918,
603,
11840,
12,
1210,
1133,
425,
16,
727,
8005,
1803,
3616,
3568,
13,
288,
3639,
727,
1922,
1803,
1301,
273,
394,
3502,
4109,
1803,
5621,
3639,
1301,
18,
1128,
13889,
12,
2704... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
4750,
918,
603,
11840,
12,
1210,
1133,
425,
16,
727,
8005,
1803,
3616,
3568,
13,
288,
3639,
727,
1922,
1803,
1301,
273,
394,
3502,
4109,
1803,
5621,
3639,
1301,
18,
1128,
13889,
12,
2704... |
assertTrue( | assertNull( | public void test_synchronizedSortedMapLjava_util_SortedMap() { // Test for method java.util.SortedMap // java.util.Collections.synchronizedSortedMap(java.util.SortedMap) TreeMap smallMap = new TreeMap(); for (int i = 0; i < 50; i++) { smallMap.put(objArray[i], objArray[i]); } final int numberOfLoops = 200; Map synchMap = Collections.synchronizedMap(smallMap); // Replacing the previous line with the line below should cause the test // to fail--the list below isn't synchronized // Map synchMap = smallMap; SynchMapChecker normalSynchChecker = new SynchMapChecker(synchMap, false, numberOfLoops); SynchMapChecker offsetSynchChecker = new SynchMapChecker(synchMap, true, numberOfLoops); Thread normalThread = new Thread(normalSynchChecker); Thread offsetThread = new Thread(offsetSynchChecker); normalThread.start(); offsetThread.start(); while ((normalSynchChecker.getNumberOfChecks() < numberOfLoops) || (offsetSynchChecker.getNumberOfChecks() < numberOfLoops)) { try { Thread.sleep(10); } catch (InterruptedException e) { } } assertTrue("Returned map corrupted by multiple thread access", normalSynchChecker.getResult() && offsetSynchChecker.getResult()); try { normalThread.join(5000); offsetThread.join(5000); } catch (InterruptedException e) { fail("join() interrupted"); } smallMap = new TreeMap(); for (int i = 0; i < 100; i++) { smallMap.put(objArray[i].toString(), objArray[i]); } synchMap = Collections.synchronizedSortedMap(smallMap); new Support_UnmodifiableMapTest("", synchMap).runTest(); synchMap.keySet().remove(objArray[50].toString()); assertTrue( "Removing a key from the keySet of the synchronized map did not remove it from the synchronized map", synchMap.get(objArray[50].toString()) == null); assertTrue( "Removing a key from the keySet of the synchronized map did not remove it from the original map", smallMap.get(objArray[50].toString()) == null); } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/181e940cd92dfff67639d98e991206d375a987ea/CollectionsTest.java/buggy/modules/luni/src/test/java/tests/api/java/util/CollectionsTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
67,
22043,
11739,
863,
21159,
67,
1367,
67,
11739,
863,
1435,
288,
202,
202,
759,
7766,
364,
707,
2252,
18,
1367,
18,
11739,
863,
202,
202,
759,
2252,
18,
1367,
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,
67,
22043,
11739,
863,
21159,
67,
1367,
67,
11739,
863,
1435,
288,
202,
202,
759,
7766,
364,
707,
2252,
18,
1367,
18,
11739,
863,
202,
202,
759,
2252,
18,
1367,
18,... |
System.out.println("OBFUSCATOR: ADDING KEEP: " + keep.getClassName() ); | public void addConfiguredKeep( Keep keep ) { if (keep.getClassName() == null) { throw new BuildException("The <keep> element needs to define the attribute [class]. Please check your <obfuscator> setting."); } System.out.println("OBFUSCATOR: ADDING KEEP: " + keep.getClassName() ); this.keeps.add( keep ); } | 9804 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9804/766e8264a4d418a6a6fa7fe9760ddec134c49163/ObfuscatorSetting.java/clean/enough-polish-build/source/src/de/enough/polish/ant/build/ObfuscatorSetting.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
527,
15334,
11523,
12,
10498,
3455,
262,
288,
202,
202,
430,
261,
10102,
18,
588,
3834,
1435,
422,
446,
13,
288,
1082,
202,
12849,
394,
18463,
2932,
1986,
411,
10102,
34,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15334,
11523,
12,
10498,
3455,
262,
288,
202,
202,
430,
261,
10102,
18,
588,
3834,
1435,
422,
446,
13,
288,
1082,
202,
12849,
394,
18463,
2932,
1986,
411,
10102,
34,
... | |
protected void reset() | public boolean reset() | protected void reset() { // Initialize everything for a first/second run. _line = new StringBuffer( 80 ); _text = new StringBuffer( 20 ); _spaces = 0; _thisIndent = _nextIndent = 0; _exception = null; _elementStateCount = 0; _started = false; _dtdWriter = null; _docTypePublicId = _format.getDoctypePublic(); _docTypeSystemId = _format.getDoctypeSystem(); } | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/1e1ce544975980cfc9bc8941ab7c8166d350c04d/BaseMarkupSerializer.java/buggy/src/org/apache/xml/serialize/BaseMarkupSerializer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
2715,
1435,
565,
288,
3639,
368,
9190,
7756,
364,
279,
1122,
19,
8538,
1086,
18,
3639,
389,
1369,
273,
394,
6674,
12,
8958,
11272,
3639,
389,
955,
273,
394,
6674,
12,
4200,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
2715,
1435,
565,
288,
3639,
368,
9190,
7756,
364,
279,
1122,
19,
8538,
1086,
18,
3639,
389,
1369,
273,
394,
6674,
12,
8958,
11272,
3639,
389,
955,
273,
394,
6674,
12,
4200,
... |
closeLaunchBar(false); } | closeLaunchBar(false); } | public void run() { closeLaunchBar(false); } | 13822 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13822/1b18c4111a9bdd6d059092d4cb5971693a9544b2/IntroLaunchBar.java/clean/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/IntroLaunchBar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1086,
1435,
288,
9506,
202,
4412,
9569,
5190,
12,
5743,
1769,
1082,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1875,
202,
482,
918,
1086,
1435,
288,
9506,
202,
4412,
9569,
5190,
12,
5743,
1769,
1082,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
} else if( paramClass.equals( IvParameterSpec.class ) ) { byte[] iv = new byte[blockSize]; PK11SecureRandom rng = new PK11SecureRandom(); rng.nextBytes(iv); return new IvParameterSpec(iv); } else { throw new InvalidKeyException( "Unable to generate parameters of type " +paramClass.getName()); | } byte[] iv = new byte[blockSize]; try { SecureRandom random = SecureRandom.getInstance("pkcs11prng", "Mozilla-JSS"); random.nextBytes(iv); } catch (Exception e) { Assert.notReached(e.getMessage()); | generateAlgParams(Algorithm alg, int blockSize) throws InvalidKeyException { Class paramClass = alg.getParameterClass(); if( paramClass == null ) { // no parameters are needed return null; } else if( paramClass.equals( IvParameterSpec.class ) ) { // generate an IV byte[] iv = new byte[blockSize]; PK11SecureRandom rng = new PK11SecureRandom(); rng.nextBytes(iv); return new IvParameterSpec(iv); } else { // I don't know any other parameter types. throw new InvalidKeyException( "Unable to generate parameters of type " +paramClass.getName()); } } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/0afeff61103891a3e7d2e000be212b29859901ff/JSSCipherSpi.java/clean/security/jss/org/mozilla/jss/provider/javax/crypto/JSSCipherSpi.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
2103,
21883,
1370,
12,
6801,
11989,
16,
509,
13766,
13,
1216,
28885,
288,
3639,
1659,
579,
797,
273,
11989,
18,
588,
1662,
797,
5621,
3639,
309,
12,
579,
797,
422,
446,
262,
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,
2103,
21883,
1370,
12,
6801,
11989,
16,
509,
13766,
13,
1216,
28885,
288,
3639,
1659,
579,
797,
273,
11989,
18,
588,
1662,
797,
5621,
3639,
309,
12,
579,
797,
422,
446,
262,
288,
5411,
... |
/* default: NEW cannot change state to NEW -> false MODIFIED never applicable to session state -> false */ | /* default: NEW cannot change state to NEW -> false MODIFIED never applicable to session state -> false */ | public static boolean isValidStatusChange(int oldStatus, int newStatus, boolean isWorkspaceState) { if (oldStatus == newStatus) { return true; } boolean isValid = false; if (isWorkspaceState) { switch (newStatus) { case EXISTING: isValid = (oldStatus == MODIFIED); break; case MODIFIED: isValid = (oldStatus == EXISTING); break; case REMOVED: isValid = (oldStatus == EXISTING); break; // default: no other status possible : -> false } } else { switch (newStatus) { case EXISTING: switch (oldStatus) { case NEW: /* save */ case EXISTING_MODIFIED: /* save, revert */ case EXISTING_REMOVED: /* revert */ case STALE_MODIFIED: /* revert */ isValid = true; break; /* REMOVED, STALE_DESTROYED -> false */ } break; case EXISTING_MODIFIED: isValid = (oldStatus == EXISTING); break; case EXISTING_REMOVED: isValid = (oldStatus == EXISTING || oldStatus == EXISTING_MODIFIED); break; case STALE_MODIFIED: case STALE_DESTROYED: isValid = (oldStatus == EXISTING_MODIFIED); break; case REMOVED: isValid = (oldStatus == NEW || oldStatus == EXISTING || oldStatus == EXISTING_REMOVED); break; /* default: NEW cannot change state to NEW -> false MODIFIED never applicable to session state -> false */ } } return isValid; } | 48761 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48761/9ae8bbb5c63832a2db95f20a916c3c350f4f0681/Status.java/buggy/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/Status.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
4908,
1482,
3043,
12,
474,
1592,
1482,
16,
509,
394,
1482,
16,
4766,
2868,
1250,
353,
8241,
1119,
13,
288,
3639,
309,
261,
1673,
1482,
422,
394,
1482,
13,
288,
5411,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
4908,
1482,
3043,
12,
474,
1592,
1482,
16,
509,
394,
1482,
16,
4766,
2868,
1250,
353,
8241,
1119,
13,
288,
3639,
309,
261,
1673,
1482,
422,
394,
1482,
13,
288,
5411,
32... |
f[6] = new Field(connection, "TYPE_NAME", iVarcharOid, NAME_SIZE); | f[6] = new Field(connection, "TYPE_NAME", iVarcharOid, getMaxNameLength()); | public java.sql.ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException { if (procedureNamePattern == null) procedureNamePattern = "%"; if (columnNamePattern == null) columnNamePattern = "%"; // for now, this returns an empty result set. Field f[] = new Field[13]; ResultSet r; // ResultSet for the SQL query that we need to do Vector v = new Vector(); // The new ResultSet tuple stuff f[0] = new Field(connection, "PROCEDURE_CAT", iVarcharOid, NAME_SIZE); f[1] = new Field(connection, "PROCEDURE_SCHEM", iVarcharOid, NAME_SIZE); f[2] = new Field(connection, "PROCEDURE_NAME", iVarcharOid, NAME_SIZE); f[3] = new Field(connection, "COLUMN_NAME", iVarcharOid, NAME_SIZE); f[4] = new Field(connection, "COLUMN_TYPE", iInt2Oid, 2); f[5] = new Field(connection, "DATA_TYPE", iInt2Oid, 2); f[6] = new Field(connection, "TYPE_NAME", iVarcharOid, NAME_SIZE); f[7] = new Field(connection, "PRECISION", iInt4Oid, 4); f[8] = new Field(connection, "LENGTH", iInt4Oid, 4); f[9] = new Field(connection, "SCALE", iInt2Oid, 2); f[10] = new Field(connection, "RADIX", iInt2Oid, 2); f[11] = new Field(connection, "NULLABLE", iInt2Oid, 2); f[12] = new Field(connection, "REMARKS", iVarcharOid, NAME_SIZE); // add query loop here return connection.getResultSet(null, f, v, "OK", 1); } | 46563 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46563/7c553901d7ab010ad1cb5bf44f9ca2fdae83909a/AbstractJdbc1DatabaseMetaData.java/clean/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
3570,
8153,
3380,
12,
780,
6222,
16,
514,
1963,
3234,
16,
514,
12131,
461,
3234,
16,
514,
7578,
3234,
13,
1216,
6483,
202,
95,
202,
202,
430,
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,
225,
202,
482,
2252,
18,
4669,
18,
13198,
3570,
8153,
3380,
12,
780,
6222,
16,
514,
1963,
3234,
16,
514,
12131,
461,
3234,
16,
514,
7578,
3234,
13,
1216,
6483,
202,
95,
202,
202,
430,
261,
... |
public CachedPoolableObjetFactory(ObjectPool pool, PipelineContext pipelineContext, String staticStateString, String dynamicStateString, Element filesElement) { | public CachedPoolableObjetFactory(ObjectPool pool, String staticStateString, String dynamicStateString) { | public CachedPoolableObjetFactory(ObjectPool pool, PipelineContext pipelineContext, String staticStateString, String dynamicStateString, Element filesElement) { this.pool = pool; this.pipelineContext = pipelineContext; // TODO: this is bad, we should not store the PipelineContext! this.staticStateString = staticStateString; this.dynamicStateString = dynamicStateString; this.filesElement = filesElement; } | 54445 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54445/a6eb47de417fd6cf006fa4e9c8c250cb033f744f/XFormsServer.java/clean/src/java/org/orbeon/oxf/xforms/XFormsServer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
15771,
2864,
429,
2675,
278,
1733,
12,
921,
2864,
2845,
16,
514,
760,
1119,
780,
16,
514,
5976,
1119,
780,
13,
288,
5411,
333,
18,
6011,
273,
2845,
31,
5411,
333,
18,
14511,
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,
540,
1071,
15771,
2864,
429,
2675,
278,
1733,
12,
921,
2864,
2845,
16,
514,
760,
1119,
780,
16,
514,
5976,
1119,
780,
13,
288,
5411,
333,
18,
6011,
273,
2845,
31,
5411,
333,
18,
14511,
1042,... |
public void update(byte[] input) throws DigestException { update(input, 0, input.length); | public void update(byte input) throws DigestException { byte[] in = { input }; update(in, 0, 1); | public void update(byte[] input) throws DigestException { update(input, 0, input.length); } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/3634d4d94b208431471fe506f413f97d460c7602/JSSMessageDigest.java/buggy/security/jss/org/mozilla/jss/crypto/JSSMessageDigest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1089,
12,
7229,
8526,
810,
13,
1216,
15864,
503,
288,
3639,
1089,
12,
2630,
16,
374,
16,
810,
18,
2469,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1089,
12,
7229,
8526,
810,
13,
1216,
15864,
503,
288,
3639,
1089,
12,
2630,
16,
374,
16,
810,
18,
2469,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
return main( args, classWorld ); | int result = main( args, classWorld ); System.exit(result); | public static int main( String[] args ) { ClassWorld classWorld = new ClassWorld( "plexus.core", Thread.currentThread().getContextClassLoader() ); return main( args, classWorld ); } | 50542 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50542/9f8c68e04ac2ef782c441ecef74f79d1cad115ac/MavenCli.java/buggy/maven-cli/src/main/java/org/apache/maven/cli/MavenCli.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
509,
2774,
12,
514,
8526,
833,
262,
565,
288,
3639,
1659,
18071,
667,
18071,
273,
394,
1659,
18071,
12,
315,
7179,
407,
18,
3644,
3113,
4884,
18,
2972,
3830,
7675,
29120,
7805,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2774,
12,
514,
8526,
833,
262,
565,
288,
3639,
1659,
18071,
667,
18071,
273,
394,
1659,
18071,
12,
315,
7179,
407,
18,
3644,
3113,
4884,
18,
2972,
3830,
7675,
29120,
7805,... |
if (title != null) shell.setText(title); if (titleImage != null) shell.setImage(titleImage); | if (title != null) { shell.setText(title); } if (titleImage != null) { shell.setImage(titleImage); } | protected void configureShell(Shell shell) { super.configureShell(shell); if (title != null) shell.setText(title); if (titleImage != null) shell.setImage(titleImage); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/391f2606b4ea2c1fb5052d938ca90877ee7631f6/MessageDialog.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
5068,
13220,
12,
13220,
5972,
13,
288,
3639,
2240,
18,
14895,
13220,
12,
10304,
1769,
3639,
309,
261,
2649,
480,
446,
13,
5411,
5972,
18,
542,
1528,
12,
2649,
1769,
3639,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
5068,
13220,
12,
13220,
5972,
13,
288,
3639,
2240,
18,
14895,
13220,
12,
10304,
1769,
3639,
309,
261,
2649,
480,
446,
13,
5411,
5972,
18,
542,
1528,
12,
2649,
1769,
3639,
309,
... |
Adapter (DocumentHandler dh) { docHandler = dh; } | Adapter(DocumentHandler dh) { docHandler = dh; } | Adapter (DocumentHandler dh) { docHandler = dh; } | 27835 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27835/7fb7568e63c3fe14af521de4699cb37898923ca7/SAXDriver.java/buggy/libjava/gnu/xml/aelfred2/SAXDriver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
4216,
261,
2519,
1503,
11007,
13,
202,
565,
288,
997,
1503,
273,
11007,
31,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
4216,
261,
2519,
1503,
11007,
13,
202,
565,
288,
997,
1503,
273,
11007,
31,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
super.deleteDomainObject(); | removeRootDomainObject(); super.deleteDomainObject(); | public void delete() { for (Bin parent : this.getParents()) { ContentHierarchy.remove(this, parent); } ContentCreation.remove(this, this.getCreator()); for (Person owner : this.getOwners()) { ContentOwnership.remove(this, owner); if (owner.getCreatedContents().size() == 0 && owner.getOwnedContents().size() == 0) { Cms.CmsUsers.remove(this.getCms(), owner); } } super.deleteDomainObject(); } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/0925531387e8a6504ad767949ae0e098dd34b1cf/Content.java/buggy/src/net/sourceforge/fenixedu/domain/cms/Content.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1430,
1435,
202,
95,
202,
202,
1884,
261,
9913,
982,
294,
333,
18,
588,
13733,
10756,
202,
202,
95,
1082,
202,
1350,
12074,
18,
4479,
12,
2211,
16,
982,
1769,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1430,
1435,
202,
95,
202,
202,
1884,
261,
9913,
982,
294,
333,
18,
588,
13733,
10756,
202,
202,
95,
1082,
202,
1350,
12074,
18,
4479,
12,
2211,
16,
982,
1769,
202,
202,
... |
if ( currentEditPart == null || currentEditPart != null | if ( currentEditPart == null || currentEditPart != null | public static TableEditPart getTableEditPart( List editParts ) { if ( editParts == null || editParts.isEmpty( ) ) return null; int size = editParts.size( ); TableEditPart part = null; for ( int i = 0; i < size; i++ ) { Object obj = editParts.get( i ); TableEditPart currentEditPart = null; if ( obj instanceof TableEditPart ) { currentEditPart = (TableEditPart) obj; } else if ( obj instanceof TableCellEditPart ) { currentEditPart = (TableEditPart) ( (TableCellEditPart) obj ) .getParent( ); } else if ( obj instanceof DummyEditpart ) { continue; } if ( part == null ) { part = currentEditPart; } // Check if select only one table if ( currentEditPart == null || currentEditPart != null && part != currentEditPart ) { return null; } } // Only table permitted if ( part instanceof GridEditPart ) return null; return part; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/c01c8a33ec213bfa042060f4786e95042c1d530d/UIUtil.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/util/UIUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
3555,
4666,
1988,
5638,
4666,
1988,
12,
987,
3874,
4305,
262,
202,
95,
202,
202,
430,
261,
3874,
4305,
422,
446,
747,
3874,
4305,
18,
291,
1921,
12,
262,
262,
1082,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
3555,
4666,
1988,
5638,
4666,
1988,
12,
987,
3874,
4305,
262,
202,
95,
202,
202,
430,
261,
3874,
4305,
422,
446,
747,
3874,
4305,
18,
291,
1921,
12,
262,
262,
1082,
202,
... |
public AOObject(NodeObject parent, String name, UniqueID id, String jobID){ super(parent); if ( name == null) name = this.getClass().getName() ; this.name = name; Map<String, String> fullNames = getWorld().getRecordedFullNames(); String recordedName = fullNames.get(id.toString()); // If a name is already associated to this object if(recordedName!=null){ this.fullName = recordedName; } else{ this.fullName = name + "#" + counter(); fullNames.put(id.toString(), fullName); } this.id = id; this.jobID = jobID; this.requestQueueLength = -1; } | 50951 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50951/64a00b6d313fc2b3680346148d1257ba4095e408/AOObject.java/buggy/ic2d-plugins/org.objectweb.proactive.ic2d.monitoring/src/org/objectweb/proactive/ic2d/monitoring/data/AOObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
432,
51,
921,
12,
907,
921,
982,
16,
514,
508,
16,
14584,
734,
612,
16,
514,
28913,
15329,
202,
202,
9565,
12,
2938,
1769,
202,
202,
430,
261,
508,
422,
446,
13,
1875,
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,
432,
51,
921,
12,
907,
921,
982,
16,
514,
508,
16,
14584,
734,
612,
16,
514,
28913,
15329,
202,
202,
9565,
12,
2938,
1769,
202,
202,
430,
261,
508,
422,
446,
13,
1875,
202,
... | ||
public ValueSetterConstraint(ValueModel valueModel, String property, ValueChangeListener validator) { this.valueModel = valueModel; this.property = property; this.valueChangeValidator = validator; valueModel.addValueChangeListener(validator); } | public ValueSetterConstraint(ValueModel valueModel, String property, PropertyChangeListener validator) { this.valueModel = valueModel; this.property = property; this.valueChangeValidator = validator; valueModel.addValueChangeListener(validator); } | public ValueSetterConstraint(ValueModel valueModel, String property, ValueChangeListener validator) { this.valueModel = valueModel; this.property = property; this.valueChangeValidator = validator; valueModel.addValueChangeListener(validator); } | 55916 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55916/5ec19649d881a3bcff846f9ee381f25c8ee1943f/ValidatingFormModel.java/clean/src/org/springframework/binding/form/support/ValidatingFormModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1445,
8465,
5806,
12,
620,
1488,
460,
1488,
16,
514,
1272,
16,
1445,
15744,
4213,
13,
288,
1082,
202,
2211,
18,
1132,
1488,
273,
460,
1488,
31,
1082,
202,
2211,
18,
4468,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1445,
8465,
5806,
12,
620,
1488,
460,
1488,
16,
514,
1272,
16,
1445,
15744,
4213,
13,
288,
1082,
202,
2211,
18,
1132,
1488,
273,
460,
1488,
31,
1082,
202,
2211,
18,
4468,
273... |
return month; | returnValue = month; break; | public int getPart(int part) { switch(part) { case YEAR: return year; case MONTH: return month; case DAY: return day; case HOUR: return hour; case MINUTE: return minute; case SECOND: return second; case MILLISECOND: return millisecond; default: throw new IllegalArgumentException("Invalid argument to method getPart"); } } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/b8b569083fc4229b3c0b089a1de7c6752476ddf3/DurationValue.java/clean/src/org/exist/xquery/value/DurationValue.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
13657,
12,
474,
1087,
13,
288,
202,
202,
9610,
12,
2680,
13,
288,
1082,
202,
3593,
16145,
30,
9506,
202,
2463,
3286,
31,
1082,
202,
3593,
15813,
30,
9506,
202,
2463,
3138... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
13657,
12,
474,
1087,
13,
288,
202,
202,
9610,
12,
2680,
13,
288,
1082,
202,
3593,
16145,
30,
9506,
202,
2463,
3286,
31,
1082,
202,
3593,
15813,
30,
9506,
202,
2463,
3138... |
assertTrue ( true ); | assertTrue( true ); | public void testIndexerExceptions() throws Exception { RepositoryIndexingFactory factory = (RepositoryIndexingFactory) lookup( RepositoryIndexingFactory.ROLE ); Artifact artifact = getArtifact( "test", "test-artifactId", "1.0" ); artifact.setFile( new File( repository.getBasedir(), repository.pathOf( artifact ) ) ); try { String notIndexDir = new File( "pom.xml" ).getAbsolutePath(); ArtifactRepositoryIndex indexer = factory.createArtifactRepositoryIndex( notIndexDir, repository ); indexer.indexArtifact( artifact ); fail( "Must throw exception on non-directory index directory" ); } catch ( RepositoryIndexException e ) { assertTrue ( true ); } try { String notIndexDir = new File( "" ).getAbsolutePath(); ArtifactRepositoryIndex indexer = factory.createArtifactRepositoryIndex( notIndexDir, repository ); indexer.indexArtifact( artifact ); fail( "Must throw an exception on a non-index directory" ); } catch ( RepositoryIndexException e ) { assertTrue ( true ); } ArtifactRepositoryIndex indexer = factory.createArtifactRepositoryIndex( indexPath, repository ); try { indexer.isIndexed( new Object() ); fail( "Must throw exception on object not of type artifact." ); } catch ( RepositoryIndexException e ) { assertTrue ( true ); } } | 47019 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47019/05e7c800b0e3a3c8a950ed6af517f24cb6a58325/ArtifactRepositoryIndexingTest.java/clean/maven-repository-indexer/src/test/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexingTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
20877,
11416,
1435,
3639,
1216,
1185,
565,
288,
3639,
6281,
24465,
1733,
3272,
273,
261,
3305,
24465,
1733,
13,
3689,
12,
6281,
24465,
1733,
18,
16256,
11272,
3639,
14022,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
20877,
11416,
1435,
3639,
1216,
1185,
565,
288,
3639,
6281,
24465,
1733,
3272,
273,
261,
3305,
24465,
1733,
13,
3689,
12,
6281,
24465,
1733,
18,
16256,
11272,
3639,
14022,
... |
} | } | public Object invoke( Invocation invocation ) throws Throwable { throw new AssertionFailedError(errorMessage); } | 57371 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57371/4aaf60d8fa76687c3492c508dd98678fbbd3d935/TestFailureStub.java/buggy/jmock/core/src/org/jmock/core/stub/TestFailureStub.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
4356,
12,
11298,
9495,
262,
1216,
4206,
288,
202,
202,
12849,
394,
9067,
2925,
668,
12,
1636,
1079,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
4356,
12,
11298,
9495,
262,
1216,
4206,
288,
202,
202,
12849,
394,
9067,
2925,
668,
12,
1636,
1079,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
}else if (atom.getChemicalGroupConstant()!=-1 && atom.getFlag(CDKConstants.ISAROMATIC) && atom.getRingSize()==5){ | }else if (atomChemGroupConstant!=-1 && atom.getFlag(CDKConstants.ISAROMATIC) && atomRingSize==5){ | public AtomType findMatchingAtomType(AtomContainer atomContainer, Atom atomInterface) throws CDKException { org.openscience.cdk.Atom atom = (org.openscience.cdk.Atom)atomInterface; //System.out.println("****** Configure MMFF94 AtomType via findMatching ******"); //System.out.print(" Symbol:" + atom.getSymbol() +" HoseCode>" + atom.getSphericalMatcher() + " "); logger.debug(" Symbol:" + atom.getSymbol() +" HoseCode>" + atom.getSphericalMatcher() + " "); try { factory = AtomTypeFactory.getInstance("org/openscience/cdk/config/data/mmff94_atomtypes.xml"); } catch (Exception ex1) { logger.error(ex1.getMessage()); logger.debug(ex1); } if (atom instanceof PseudoAtom) { return factory.getAtomTypes("DU")[0]; } Pattern p1 = null; Pattern p2 = null; String ID = ""; boolean atomTypeFlag = false; Matcher mat1=null; Matcher mat2=null; double tmpMaxBondOrder = 0; maxBondOrder = atomContainer.getMaximumBondOrder(atom); for (int j = 0; j < atomTypeIds.length; j++){ tmpMaxBondOrder = factory.getAtomType(atomTypeIds[j]).getMaxBondOrder(); logger.debug(j + "ATOM TYPE "+ tmpMaxBondOrder + " " +factory.getAtomType(atomTypeIds[j]).getSphericalMatcher()); p1 =Pattern.compile(factory.getAtomType(atomTypeIds[j]).getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches()) { ID = atomTypeIds[j]; if (atomTypeIds[j].equals("C")) { if (atom.getChemicalGroupConstant()!=-1) {//in Ring if (maxBondOrder == 1){ if (atom.getRingSize() == 3) { ID = atomTypeIds[9];//sp3 3mem rings }else if (atom.getRingSize() == 4) { ID = atomTypeIds[8];//sp3 4mem rings } }else{//sp2 p1 =Pattern.compile(factory.getAtomType(atomTypeIds[13]).getSphericalMatcher());//C5B mat1 = p1.matcher(atom.getSphericalMatcher()); p2 =Pattern.compile(factory.getAtomType(atomTypeIds[12]).getSphericalMatcher());//C5A mat2 = p2.matcher(atom.getSphericalMatcher()); if (mat1.matches() && atom.getChemicalGroupConstant()%2==0 && atom.getFlag(CDKConstants.ISAROMATIC) && atom.getRingSize()==5){ ID = atomTypeIds[13]; }else if (mat2.matches() && atom.getChemicalGroupConstant()%2==0 && atom.getFlag(CDKConstants.ISAROMATIC) && atom.getRingSize()==5){ ID = atomTypeIds[12]; }else if (atom.getChemicalGroupConstant()%2==0 && atom.getFlag(CDKConstants.ISAROMATIC) && atom.getRingSize()==5) { ID = atomTypeIds[14];//C5 in het 5 ring }else if (atom.getFlag(CDKConstants.ISAROMATIC)) { ID = atomTypeIds[11];//Car in benzene, pyroll } } }else{//not in Ring p1 = Pattern.compile(factory.getAtomType(atomTypeIds[66]).getSphericalMatcher());//S=C mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches()){ ID = atomTypeIds[66];//S=C } } } else if (atomTypeIds[j].equals("Csp2")) { if (atom.getChemicalGroupConstant()%2==0 & atom.getRingSize()==4 & !atom.getFlag(CDKConstants.ISAROMATIC)) { ID = atomTypeIds[10];//CE4R } } else if (atomTypeIds[j].equals("C=")) { if (atom.getChemicalGroupConstant()%2==0 && atom.getFlag(CDKConstants.ISAROMATIC)) { ID = atomTypeIds[12];//C5A } } else if (atomTypeIds[j].equals("N")) { //Amid p1 = Pattern.compile(factory.getAtomType(atomTypeIds[48]).getSphericalMatcher());//NC=0 mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches() & atom.getChemicalGroupConstant()==-1) { ID = atomTypeIds[48];//NC=O } //nsp3 oxide p1 = Pattern.compile(factory.getAtomType(atomTypeIds[44]).getSphericalMatcher());//sp3 n-oxide mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches() && maxBondOrder==tmpMaxBondOrder){ ID = atomTypeIds[44]; } //ring sytems p1 = Pattern.compile(factory.getAtomType(atomTypeIds[56]).getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (atom.getChemicalGroupConstant()==10){ ID = atomTypeIds[56]; }else if (atom.getChemicalGroupConstant()==4){ ID = atomTypeIds[57]; }else if (atom.getChemicalGroupConstant()%2==0 & atom.getRingSize()==5 & atom.getFlag(CDKConstants.ISAROMATIC)){ ID=atomTypeIds[64]; } //Nsp2-Oxides p1 = Pattern.compile(factory.getAtomType(atomTypeIds[61]).getSphericalMatcher());//npox mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches() && maxBondOrder==tmpMaxBondOrder){ ID=atomTypeIds[43]; } if (atom.getFlag(CDKConstants.ISAROMATIC)){ if(mat1.matches()&& atom.getChemicalGroupConstant()==12){ ID = atomTypeIds[61]; }else if(mat1.matches()&& atom.getRingSize()==5){ ID = atomTypeIds[62]; } } //NC#N p1 = Pattern.compile(factory.getAtomType(atomTypeIds[45]).getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches()){ ID = atomTypeIds[45]; } }else if (atomTypeIds[j].equals("N=C")) { //n beta heteroaromatic ring p1 = Pattern.compile(factory.getAtomType(atomTypeIds[59]).getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (atom.getChemicalGroupConstant()!=-1) { if (mat1.matches() && atom.getChemicalGroupConstant()%2==0 && atom.getFlag(CDKConstants.ISAROMATIC) && atom.getRingSize()==5){ ID = atomTypeIds[59];//N5A }else if(atom.getChemicalGroupConstant()==10){//NPYD ID = atomTypeIds[56]; }else if(atom.getChemicalGroupConstant()==4){//NPYL ID = atomTypeIds[57]; } } //N2OX p1 = Pattern.compile(factory.getAtomType(atomTypeIds[43]).getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches()){ if (atom.getChemicalGroupConstant()==10){ ID = atomTypeIds[61];//npox }else if (atom.getFlag(CDKConstants.ISAROMATIC) && atom.getRingSize()==5){ ID = atomTypeIds[62];//n5ox }else { ID = atomTypeIds[43];//n2ox } } }else if (atomTypeIds[j].equals("N2OX")){ //NO3 p1 = Pattern.compile(factory.getAtomType(atomTypeIds[46]).getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches() && atom.getChemicalGroupConstant()==-1){ ID = atomTypeIds[46];//NO3 } if (atom.getChemicalGroupConstant()==12){ ID = atomTypeIds[61];//NPOX }else if (atom.getChemicalGroupConstant()!=-1 && atom.getFlag(CDKConstants.ISAROMATIC) && atom.getRingSize()==5){ ID = atomTypeIds[62];//N5OX } }else if (atomTypeIds[j].equals("=N=") || atomTypeIds[j].equals("NAZT")){ if (atom.getChemicalGroupConstant()!=-1 && atom.getFlag(CDKConstants.ISAROMATIC) && atom.getRingSize()==5){ ID = atomTypeIds[59];//aromatic N5A } }else if (atomTypeIds[j].equals("N+=")){ if (atom.getChemicalGroupConstant()!=-1 && atom.getFlag(CDKConstants.ISAROMATIC) && atom.getRingSize()==5){ ID = atomTypeIds[63];//n5+ }else if (atom.getChemicalGroupConstant()==12){ ID = atomTypeIds[58];//npd+ } }else if (atomTypeIds[j].equals("O")){ if (atom.getChemicalGroupConstant()==6){ ID = atomTypeIds[35];//Oar } }else if (atomTypeIds[j].equals("HO")){ p1 = Pattern.compile(factory.getAtomType(atomTypeIds[21]).getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches()){ ID = atomTypeIds[21];//HOCC } p1 = Pattern.compile(factory.getAtomType(atomTypeIds[18]).getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches()){ ID = atomTypeIds[18];//HOCO } }else if (atomTypeIds[j].equals("P")){ p1 = Pattern.compile(factory.getAtomType(atomTypeIds[75]).getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches()){ ID = atomTypeIds[75];//-P=C } }else if (atomTypeIds[j].equals("S")){ if (atom.getRingSize()==5 && atom.getFlag(CDKConstants.ISAROMATIC)){ ID = atomTypeIds[72];//Sthiophen } }else if (atomTypeIds[j].equals("HC")){ p1 = Pattern.compile(factory.getAtomType("HP").getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches()){ ID = "HP"; } } atomTypeFlag = true; // System.out.println(" MATCH AtomTypeID:"+j+ " " + ID); logger.debug(" MATCH AtomTypeID:"+j+ " " + ID); break; }//IF }//for end if (atomTypeFlag) { atomTypeFlag = false; return factory.getAtomType(ID); } else { //System.out.println("NoSuchAtomTypeException: Atom is unkown with Symbol:" + atom.getSymbol() + " does not MATCH AtomType. HoseCode:" + atom.getSphericalMatcher()); return factory.getAtomType("DU"); } } | 1306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1306/53b7038bf76a67276cd51466afb62126fb362c25/MMFF94AtomTypeMatcher.java/clean/src/org/openscience/cdk/atomtype/MMFF94AtomTypeMatcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
7149,
559,
1104,
9517,
3641,
559,
12,
3641,
2170,
22487,
16,
7149,
3179,
1358,
13,
1216,
24570,
288,
202,
202,
3341,
18,
20346,
71,
6254,
18,
71,
2883,
18,
3641,
3179,
273,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
7149,
559,
1104,
9517,
3641,
559,
12,
3641,
2170,
22487,
16,
7149,
3179,
1358,
13,
1216,
24570,
288,
202,
202,
3341,
18,
20346,
71,
6254,
18,
71,
2883,
18,
3641,
3179,
273,
26... |
jsFunction_setUTCMinutes(args)); | makeTime(args, 3, false)); | public Object execMethod (int methodId, IdFunction f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { if (prototypeFlag) { switch (methodId) { case ConstructorId_UTC: return wrap_double(jsStaticFunction_UTC(args)); case ConstructorId_parse: return wrap_double(jsStaticFunction_parse (ScriptRuntime.toString(args, 0))); case Id_constructor: return jsConstructor(args, thisObj == null); case Id_toString: return realThis(thisObj, f, true). jsFunction_toString(); case Id_toTimeString: return realThis(thisObj, f, true). jsFunction_toTimeString(); case Id_toDateString: return realThis(thisObj, f, true). jsFunction_toDateString(); case Id_toLocaleString: return realThis(thisObj, f, true). jsFunction_toLocaleString(); case Id_toLocaleTimeString: return realThis(thisObj, f, true). jsFunction_toLocaleTimeString(); case Id_toLocaleDateString: return realThis(thisObj, f, true). jsFunction_toLocaleDateString(); case Id_toGMTString: case Id_toUTCString: return realThis(thisObj, f, true). jsFunction_toUTCString(); case Id_valueOf: return wrap_double(realThis(thisObj, f, true). jsFunction_valueOf()); case Id_getTime: return wrap_double(realThis(thisObj, f, true). jsFunction_getTime()); case Id_getYear: return wrap_double(realThis(thisObj, f, true). jsFunction_getYear(cx)); case Id_getFullYear: return wrap_double(realThis(thisObj, f, true). jsFunction_getFullYear()); case Id_getUTCFullYear: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCFullYear()); case Id_getMonth: return wrap_double(realThis(thisObj, f, true). jsFunction_getMonth()); case Id_getUTCMonth: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCMonth()); case Id_getDate: return wrap_double(realThis(thisObj, f, true). jsFunction_getDate()); case Id_getUTCDate: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCDate()); case Id_getDay: return wrap_double(realThis(thisObj, f, true). jsFunction_getDay()); case Id_getUTCDay: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCDay()); case Id_getHours: return wrap_double(realThis(thisObj, f, true). jsFunction_getHours()); case Id_getUTCHours: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCHours()); case Id_getMinutes: return wrap_double(realThis(thisObj, f, true). jsFunction_getMinutes()); case Id_getUTCMinutes: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCMinutes()); case Id_getSeconds: return wrap_double(realThis(thisObj, f, true). jsFunction_getSeconds()); case Id_getUTCSeconds: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCSeconds()); case Id_getMilliseconds: return wrap_double(realThis(thisObj, f, true). jsFunction_getMilliseconds()); case Id_getUTCMilliseconds: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCMilliseconds()); case Id_getTimezoneOffset: return wrap_double(realThis(thisObj, f, true). jsFunction_getTimezoneOffset()); case Id_setTime: return wrap_double(realThis(thisObj, f, true). jsFunction_setTime(ScriptRuntime.toNumber(args, 0))); case Id_setMilliseconds: return wrap_double(realThis(thisObj, f, false). jsFunction_setMilliseconds(args)); case Id_setUTCMilliseconds: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCMilliseconds(args)); case Id_setSeconds: return wrap_double(realThis(thisObj, f, false). jsFunction_setSeconds(args)); case Id_setUTCSeconds: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCSeconds(args)); case Id_setMinutes: return wrap_double(realThis(thisObj, f, false). jsFunction_setMinutes(args)); case Id_setUTCMinutes: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCMinutes(args)); case Id_setHours: return wrap_double(realThis(thisObj, f, false). jsFunction_setHours(args)); case Id_setUTCHours: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCHours(args)); case Id_setDate: return wrap_double(realThis(thisObj, f, false). jsFunction_setDate(args)); case Id_setUTCDate: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCDate(args)); case Id_setMonth: return wrap_double(realThis(thisObj, f, false). jsFunction_setMonth(args)); case Id_setUTCMonth: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCMonth(args)); case Id_setFullYear: return wrap_double(realThis(thisObj, f, false). jsFunction_setFullYear(args)); case Id_setUTCFullYear: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCFullYear(args)); case Id_setYear: return wrap_double(realThis(thisObj, f, true). jsFunction_setYear(ScriptRuntime.toNumber(args, 0))); } } return super.execMethod(methodId, f, cx, scope, thisObj, args); } | 19042 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19042/dbefc5595ba41854ec04751abfc8db52f70a5796/NativeDate.java/buggy/src/org/mozilla/javascript/NativeDate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
3639,
261,
474,
707,
548,
16,
3124,
2083,
284,
16,
540,
1772,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
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,
1033,
1196,
1305,
3639,
261,
474,
707,
548,
16,
3124,
2083,
284,
16,
540,
1772,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
... |
getViewer().addDragSupport(DND.DROP_COPY | DND.DROP_MOVE, types, new TaskListDragSourceListener(this)); getViewer().addDropSupport(DND.DROP_COPY | DND.DROP_MOVE, types, new TaskListDropAdapter(getViewer())); | getViewer().addDragSupport(DND.DROP_COPY | DND.DROP_MOVE, dragTypes, new TaskListDragSourceListener(this)); getViewer().addDropSupport(DND.DROP_COPY | DND.DROP_MOVE, dropTypes, new TaskListDropAdapter(getViewer())); | private void initDragAndDrop(Composite parent) { Transfer[] types = new Transfer[] { TextTransfer.getInstance(), FileTransfer.getInstance(), PluginTransfer.getInstance(), RTFTransfer.getInstance() }; getViewer().addDragSupport(DND.DROP_COPY | DND.DROP_MOVE, types, new TaskListDragSourceListener(this)); getViewer().addDropSupport(DND.DROP_COPY | DND.DROP_MOVE, types, new TaskListDropAdapter(getViewer())); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/f028c1eb33841966a10b8afc00ffaf7bc8cf8b7f/TaskListView.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1208,
11728,
1876,
7544,
12,
9400,
982,
13,
288,
202,
202,
5912,
8526,
1953,
273,
394,
12279,
8526,
288,
3867,
5912,
18,
588,
1442,
9334,
1387,
5912,
18,
588,
1442,
9334,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11728,
1876,
7544,
12,
9400,
982,
13,
288,
202,
202,
5912,
8526,
1953,
273,
394,
12279,
8526,
288,
3867,
5912,
18,
588,
1442,
9334,
1387,
5912,
18,
588,
1442,
9334,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.