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 |
|---|---|---|---|---|---|---|
Iterator iterator = jobs.keySet().iterator(); | Job[] jobArray = new Job[jobs.size()]; jobs.keySet().toArray(jobArray); | public Object[] getJobs() { Iterator iterator = jobs.keySet().iterator(); Collection result = new ArrayList(); while (iterator.hasNext()) { Job next = (Job) iterator.next(); if (isNonDisplayableJob(next)) continue; result.add(jobs.get(next)); } return result.toArray(); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/60858ba132640dcf54506e5c3e5f5391a9aa0677/JobProgressManager.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobProgressManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
8526,
336,
7276,
1435,
288,
202,
202,
3198,
2775,
273,
6550,
18,
856,
694,
7675,
9838,
5621,
202,
202,
2532,
563,
273,
394,
2407,
5621,
202,
202,
17523,
261,
9838,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
8526,
336,
7276,
1435,
288,
202,
202,
3198,
2775,
273,
6550,
18,
856,
694,
7675,
9838,
5621,
202,
202,
2532,
563,
273,
394,
2407,
5621,
202,
202,
17523,
261,
9838,
18,
5... |
try { stmt.close(); } catch(SQLException e) { /* ignore close errors */ } | close(stmt); | public static void setClassPath(String schemaName, String path) throws SQLException { Connection conn = DriverManager.getConnection("jdbc:default:connection"); try { if(schemaName == null || schemaName.length() == 0) schemaName = "public"; if("public".equals(schemaName)) { if(!AclId.getSessionUser().isSuperuser()) throw new SQLException("Permission denied. Only a super user can set the classpath of the public schema"); } else { schemaName = schemaName.toLowerCase(); Oid schemaId = getSchemaId(conn, schemaName); if(schemaId == null) throw new SQLException("No such schema: " + schemaName); if(!AclId.getSessionUser().hasSchemaCreatePermission(schemaId)) throw new SQLException("Permission denied. User must have create permission on the target schema in order to set the classpath"); } PreparedStatement stmt; ArrayList entries = null; if(path != null && path.length() > 0) { // Collect and verify that all entries in the path represents a // valid jar // entries = new ArrayList(); stmt = conn.prepareStatement( "SELECT jarId FROM sqlj.jar_repository WHERE jarName = ?"); try { for(;;) { int colon = path.indexOf(':'); String jarName; if(colon >= 0) { jarName = path.substring(0, colon); path = path.substring(colon + 1); } else jarName = path; int jarId = getJarId(stmt, jarName, null); if(jarId < 0) throw new SQLException("No such jar: " + jarName); entries.add(new Integer(jarId)); if(colon < 0) break; } } finally { try { stmt.close(); } catch(SQLException e) { /* ignore close errors */ } } } // Delete the old classpath // stmt = conn.prepareStatement( "DELETE FROM sqlj.classpath_entry WHERE schemaName = ?"); try { stmt.setString(1, schemaName); stmt.executeUpdate(); } finally { try { stmt.close(); } catch(SQLException e) { /* ignore close errors */ } } if(entries != null) { // Insert the new path. // stmt = conn.prepareStatement( "INSERT INTO sqlj.classpath_entry(schemaName, ordinal, jarId) VALUES(?, ?, ?)"); try { int top = entries.size(); for(int idx = 0; idx < top; ++idx) { int jarId = ((Integer)entries.get(idx)).intValue(); stmt.setString(1, schemaName); stmt.setInt(2, idx + 1); stmt.setInt(3, jarId); stmt.executeUpdate(); } } finally { try { stmt.close(); } catch(SQLException e) { /* ignore close errors */ } } } Loader.clearSchemaLoaders(); } finally { try { conn.close(); } catch(SQLException e) { /* ignore close errors */ } } } | 1170 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1170/cf07f62f168268640de458a712f4cd46ef918dc9/Commands.java/buggy/src/java/pljava/org/postgresql/pljava/management/Commands.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
444,
22158,
12,
780,
21960,
16,
514,
589,
13,
202,
15069,
6483,
202,
95,
202,
202,
1952,
1487,
273,
9396,
1318,
18,
588,
1952,
2932,
24687,
30,
1886,
30,
4071,
8863,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
444,
22158,
12,
780,
21960,
16,
514,
589,
13,
202,
15069,
6483,
202,
95,
202,
202,
1952,
1487,
273,
9396,
1318,
18,
588,
1952,
2932,
24687,
30,
1886,
30,
4071,
8863,... |
case Id_setHours: return wrap_double(realThis(thisObj, f, false). jsFunction_setHours(args)); | case Id_setHours: return wrap_double(realThis(thisObj, f, false). jsFunction_setHours(args)); | public Object execMethod (int methodId, IdFunction f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { 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); } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/35caf7c2bb93872680ae16e34746d94fe1e533e3/NativeDate.java/buggy/js/rhino/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,
... |
setSeparator((LineAttributes)newValue); | setSeparator((LineAttributes) newValue); | public void eSet(EStructuralFeature eFeature, Object newValue) { switch (eDerivedStructuralFeatureID(eFeature)) { case LayoutPackage.LEGEND__CHILDREN: getChildren().clear(); getChildren().addAll((Collection)newValue); return; case LayoutPackage.LEGEND__BOUNDS: setBounds((Bounds)newValue); return; case LayoutPackage.LEGEND__ANCHOR: setAnchor((Anchor)newValue); return; case LayoutPackage.LEGEND__STRETCH: setStretch((Stretch)newValue); return; case LayoutPackage.LEGEND__INSETS: setInsets((Insets)newValue); return; case LayoutPackage.LEGEND__ROW: setRow(((Integer)newValue).intValue()); return; case LayoutPackage.LEGEND__COLUMN: setColumn(((Integer)newValue).intValue()); return; case LayoutPackage.LEGEND__ROWSPAN: setRowspan(((Integer)newValue).intValue()); return; case LayoutPackage.LEGEND__COLUMNSPAN: setColumnspan(((Integer)newValue).intValue()); return; case LayoutPackage.LEGEND__MIN_SIZE: setMinSize((Size)newValue); return; case LayoutPackage.LEGEND__OUTLINE: setOutline((LineAttributes)newValue); return; case LayoutPackage.LEGEND__BACKGROUND: setBackground((Fill)newValue); return; case LayoutPackage.LEGEND__VISIBLE: setVisible(((Boolean)newValue).booleanValue()); return; case LayoutPackage.LEGEND__TRIGGERS: getTriggers().clear(); getTriggers().addAll((Collection)newValue); return; case LayoutPackage.LEGEND__HORIZONTAL_SPACING: setHorizontalSpacing(((Integer)newValue).intValue()); return; case LayoutPackage.LEGEND__VERTICAL_SPACING: setVerticalSpacing(((Integer)newValue).intValue()); return; case LayoutPackage.LEGEND__CLIENT_AREA: setClientArea((ClientArea)newValue); return; case LayoutPackage.LEGEND__TEXT: setText((Text)newValue); return; case LayoutPackage.LEGEND__ORIENTATION: setOrientation((Orientation)newValue); return; case LayoutPackage.LEGEND__DIRECTION: setDirection((Direction)newValue); return; case LayoutPackage.LEGEND__SEPARATOR: setSeparator((LineAttributes)newValue); return; case LayoutPackage.LEGEND__POSITION: setPosition((Position)newValue); return; case LayoutPackage.LEGEND__ITEM_TYPE: setItemType((LegendItemType)newValue); return; } eDynamicSet(eFeature, newValue); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/LegendImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/layout/impl/LegendImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
20199,
12,
41,
14372,
4595,
425,
4595,
16,
1033,
6129,
13,
565,
288,
3639,
1620,
261,
73,
21007,
14372,
4595,
734,
12,
73,
4595,
3719,
3639,
288,
5411,
648,
9995,
2261,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
20199,
12,
41,
14372,
4595,
425,
4595,
16,
1033,
6129,
13,
565,
288,
3639,
1620,
261,
73,
21007,
14372,
4595,
734,
12,
73,
4595,
3719,
3639,
288,
5411,
648,
9995,
2261,
18,
1... |
return RubyFixnum.one(runtime); | return RubyFixnum.one(getRuntime()); | public RubyFixnum op_cmp(IRubyObject other) { long millis = getTimeInMillis(); if (other instanceof RubyFloat || other instanceof RubyBignum) { double time = millis / 1000.0; double time_other = ((RubyNumeric) other).getDoubleValue(); if (time > time_other) { return RubyFixnum.one(runtime); } else if (time < time_other) { return RubyFixnum.minus_one(runtime); } else { return RubyFixnum.zero(runtime); } } long millis_other = (other instanceof RubyTime) ? ((RubyTime) other).getTimeInMillis() : RubyNumeric.num2long(other) * 1000; if (millis > millis_other) { return RubyFixnum.one(runtime); } else if (millis < millis_other) { return RubyFixnum.minus_one(runtime); } else { return RubyFixnum.zero(runtime); } } | 46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyTime.java/clean/src/org/jruby/RubyTime.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
8585,
2107,
1061,
67,
9625,
12,
7937,
10340,
921,
1308,
13,
288,
3639,
1525,
14833,
273,
6135,
16620,
5621,
3639,
309,
261,
3011,
1276,
19817,
4723,
747,
1308,
1276,
19817,
38,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8585,
2107,
1061,
67,
9625,
12,
7937,
10340,
921,
1308,
13,
288,
3639,
1525,
14833,
273,
6135,
16620,
5621,
3639,
309,
261,
3011,
1276,
19817,
4723,
747,
1308,
1276,
19817,
38,... |
private void openDialog(WorkbenchPage page) { final int MAX_ITEMS = 22; selection = null; final Shell dialog = new Shell(getWorkbenchWindow().getShell(),SWT.MODELESS); Display display = dialog.getDisplay(); dialog.setLayout(new FillLayout()); final Table table = new Table(dialog,SWT.SINGLE | SWT.FULL_SELECTION); table.setHeaderVisible(true); table.setLinesVisible(true); TableColumn tc = new TableColumn(table,SWT.NONE); tc.setResizable(false); tc.setText(getTableHeader()); addItems(table,page); int tableItemCount = table.getItemCount(); switch (tableItemCount) { case 0: // do nothing; break; case 1: table.setSelection(0); break; default: table.setSelection(forward ? 1 : table.getItemCount() - 1); } tc.pack(); table.pack(); Rectangle tableBounds = table.getBounds(); tableBounds.height = Math.min(tableBounds.height, table.getItemHeight()*MAX_ITEMS); table.setBounds(tableBounds); dialog.pack(); tc.setWidth(table.getClientArea().width); table.setFocus(); table.addFocusListener(new FocusListener() { public void focusGained(FocusEvent e) { } public void focusLost(FocusEvent e) { cancel(dialog); } }); Rectangle dialogBounds = dialog.getBounds(); Rectangle displayBounds = display.getClientArea(); Rectangle parentBounds = dialog.getParent().getBounds(); //Place it in the center of its parent; dialogBounds.x = parentBounds.x + ((parentBounds.width - dialogBounds.width) / 2); dialogBounds.y = parentBounds.y + ((parentBounds.height - dialogBounds.height) / 2); if(!displayBounds.contains(dialogBounds.x,dialogBounds.y) || !displayBounds.contains(dialogBounds.x + dialogBounds.width,dialogBounds.y + dialogBounds.height)) { //Place it in the center of the display if it is not visible //when placed in the center of its parent; dialogBounds.x = (displayBounds.width - dialogBounds.width) / 2; dialogBounds.y = (displayBounds.height - dialogBounds.height) / 2; } dialogBounds.height = dialogBounds.height + 3 - table.getHorizontalBar().getSize().y; dialog.setBounds(dialogBounds); table.removeHelpListener(getHelpListener()); table.addHelpListener(new HelpListener() { public void helpRequested(HelpEvent event) { } }); // TODO Bold cast to Workbench final Workbench workbench = (Workbench) page.getWorkbenchWindow().getWorkbench(); try { dialog.open(); addMouseListener(table, dialog); workbench.disableKeyFilter(); addKeyListener(table, dialog); addTraverseListener(table); while (!dialog.isDisposed()) if (!display.readAndDispatch()) display.sleep(); } finally { if(!dialog.isDisposed()) cancel(dialog); workbench.enableKeyFilter(); } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/f4c7612b94bd3c858ff747bb4d43466101c13426/CyclePartAction.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CyclePartAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1696,
6353,
12,
2421,
22144,
1964,
1363,
13,
288,
202,
202,
6385,
509,
4552,
67,
29887,
273,
11201,
31,
9506,
202,
10705,
273,
446,
31,
202,
202,
6385,
19433,
6176,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1696,
6353,
12,
2421,
22144,
1964,
1363,
13,
288,
202,
202,
6385,
509,
4552,
67,
29887,
273,
11201,
31,
9506,
202,
10705,
273,
446,
31,
202,
202,
6385,
19433,
6176,
273,
... | ||
planes.initalizePlanes(); | planes.initalizePlanes(); | protected void clearScreen() { planes.initalizePlanes(); dirtyScreen.setBounds(0,lenScreen - 1,0,0); oia.clearScreen(); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
2424,
7956,
1435,
288,
1377,
31634,
18,
2738,
287,
554,
5365,
281,
5621,
1377,
9603,
7956,
18,
542,
5694,
12,
20,
16,
1897,
7956,
300,
404,
16,
20,
16,
20,
1769,
1377,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
2424,
7956,
1435,
288,
1377,
31634,
18,
2738,
287,
554,
5365,
281,
5621,
1377,
9603,
7956,
18,
542,
5694,
12,
20,
16,
1897,
7956,
300,
404,
16,
20,
16,
20,
1769,
1377,
... |
if (singleton) childMem.putInteger(IWorkbenchConstants.TAG_SINGLETON, 1); | if (singleton) { childMem.putInteger(IWorkbenchConstants.TAG_SINGLETON, 1); } | public IStatus saveState(IMemento memento) { IMemento childMem = memento .createChild(IWorkbenchConstants.TAG_DESCRIPTOR); childMem.putString(IWorkbenchConstants.TAG_ID, getId()); if (originalId != null) childMem.putString(IWorkbenchConstants.TAG_DESCRIPTOR, originalId); childMem.putString(IWorkbenchConstants.TAG_LABEL, getLabel()); childMem.putString(IWorkbenchConstants.TAG_CLASS, getClassName()); if (singleton) childMem.putInteger(IWorkbenchConstants.TAG_SINGLETON, 1); return new Status(IStatus.OK, PlatformUI.PLUGIN_ID, 0, "", null); //$NON-NLS-1$ } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/PerspectiveDescriptor.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
1482,
1923,
1119,
12,
3445,
820,
83,
312,
820,
83,
13,
288,
3639,
6246,
820,
83,
1151,
3545,
273,
312,
820,
83,
7734,
263,
2640,
1763,
12,
45,
2421,
22144,
2918,
18,
7927,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1482,
1923,
1119,
12,
3445,
820,
83,
312,
820,
83,
13,
288,
3639,
6246,
820,
83,
1151,
3545,
273,
312,
820,
83,
7734,
263,
2640,
1763,
12,
45,
2421,
22144,
2918,
18,
7927,
... |
processElsif(startPos, bufferPos[bufferStackPos], false); | processElsif(startPos, end, false); | protected void skipOverConditionalCode(boolean checkelse) { char[] buffer = bufferStack[bufferStackPos]; int limit = bufferLimit[bufferStackPos]; int nesting = 0; while (bufferPos[bufferStackPos] < limit) { skipOverWhiteSpace(); if (++bufferPos[bufferStackPos] >= limit) return; char c = buffer[bufferPos[bufferStackPos]]; if (c == '#') { int startPos = bufferPos[bufferStackPos]; skipOverWhiteSpace(); // find the directive int start = ++bufferPos[bufferStackPos]; // if new line or end of buffer, we're done if (start >= limit || buffer[start] == '\n') continue; c = buffer[start]; if ((c >= 'a' && c <= 'z')) { while (++bufferPos[bufferStackPos] < limit) { c = buffer[bufferPos[bufferStackPos]]; if ((c >= 'a' && c <= 'z')) continue; break; } --bufferPos[bufferStackPos]; int len = bufferPos[bufferStackPos] - start + 1; int type = ppKeywords.get(buffer, start, len); if (type != ppKeywords.undefined) { switch (type) { case ppIfdef: case ppIfndef: case ppIf: ++nesting; branchState(BRANCH_IF); skipToNewLine(); if (type == ppIfdef) processIfdef(startPos, bufferPos[bufferStackPos], true, false); else if (type == ppIfndef) processIfdef(startPos, bufferPos[bufferStackPos], false, false); else processIf(startPos, bufferPos[bufferStackPos], false); break; case ppElse: if (branchState(BRANCH_ELSE)) { skipToNewLine(); if (checkelse && nesting == 0) { processElse(startPos, bufferPos[bufferStackPos], true); return; } processElse(startPos, bufferPos[bufferStackPos], false); } else { //problem, ignore this one. handleProblem( IProblem.PREPROCESSOR_UNBALANCE_CONDITION, start, ppKeywords.findKey(buffer, start, len)); skipToNewLine(); } break; case ppElif: if (branchState(BRANCH_ELIF)) { if (checkelse && nesting == 0) { // check the condition start = bufferPos[bufferStackPos] + 1; skipToNewLine(); len = bufferPos[bufferStackPos] - start; if (expressionEvaluator .evaluate( buffer, start, len, definitions, getLineNumber(bufferPos[bufferStackPos]), getCurrentFilename()) != 0) { // condition passed, we're good processElsif(startPos, bufferPos[bufferStackPos], true); return; } processElsif(startPos, bufferPos[bufferStackPos], false); } else { skipToNewLine(); processElsif(startPos, bufferPos[bufferStackPos], false); } } else { //problem, ignore this one. handleProblem( IProblem.PREPROCESSOR_UNBALANCE_CONDITION, start, ppKeywords.findKey(buffer, start, len)); skipToNewLine(); } break; case ppEndif: if (branchState(BRANCH_END)) { processEndif(startPos, bufferPos[bufferStackPos] + 1); if (nesting > 0) { --nesting; } else { skipToNewLine(); return; } } else { //problem, ignore this one. handleProblem( IProblem.PREPROCESSOR_UNBALANCE_CONDITION, start, ppKeywords.findKey(buffer, start, len)); skipToNewLine(); } break; } } } } else if (c != '\n') skipToNewLine(); } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/fdabd9645c02460b6cbe435e46247c1b6cd0db21/BaseScanner.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner2/BaseScanner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
2488,
4851,
14132,
1085,
12,
6494,
866,
12107,
13,
288,
3639,
1149,
8526,
1613,
273,
1613,
2624,
63,
4106,
2624,
1616,
15533,
3639,
509,
1800,
273,
1613,
3039,
63,
4106,
2624,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
2488,
4851,
14132,
1085,
12,
6494,
866,
12107,
13,
288,
3639,
1149,
8526,
1613,
273,
1613,
2624,
63,
4106,
2624,
1616,
15533,
3639,
509,
1800,
273,
1613,
3039,
63,
4106,
2624,
... |
_editing = editing; } | _editing = editing; } | public void setEditing(boolean editing) { _editing = editing; } | 810 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/810/7898f8de6d0b1a6fd8a05ef68f1a522cb6dca80a/AjaxInPlace.java/buggy/Wonder/Ajax/Ajax/Sources/er/ajax/AjaxInPlace.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
28029,
12,
6494,
15755,
13,
288,
202,
67,
4619,
310,
273,
15755,
31,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
28029,
12,
6494,
15755,
13,
288,
202,
67,
4619,
310,
273,
15755,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
REProgState state; | executeREBytecode(REGlobalData gData, char[] chars, int end) { int pc = 0; byte program[] = gData.regexp.program; int op = program[pc++]; int currentContinuation_op; int currentContinuation_pc; boolean result = false; currentContinuation_pc = 0; currentContinuation_op = REOP_END;if (debug) {System.out.println("Input = \"" + new String(chars) + "\", start at " + gData.cp);} for (;;) {if (debug) {System.out.println("Testing at " + gData.cp + ", op = " + op);} switch (op) { case REOP_EMPTY: result = true; break; case REOP_BOL: if (gData.cp != 0) { if (gData.multiline || ((gData.regexp.flags & JSREG_MULTILINE) != 0)) { if (!isLineTerm(chars[gData.cp - 1])) { result = false; break; } } else { result = false; break; } } result = true; break; case REOP_EOL: if (gData.cp != end) { if (gData.multiline || ((gData.regexp.flags & JSREG_MULTILINE) != 0)) { if (!isLineTerm(chars[gData.cp])) { result = false; break; } } else { result = false; break; } } result = true; break; case REOP_WBDRY: result = ((gData.cp == 0 || !isWord(chars[gData.cp - 1])) ^ !((gData.cp < end) && isWord(chars[gData.cp]))); break; case REOP_WNONBDRY: result = ((gData.cp == 0 || !isWord(chars[gData.cp - 1])) ^ ((gData.cp < end) && isWord(chars[gData.cp]))); break; case REOP_DOT: result = (gData.cp != end && !isLineTerm(chars[gData.cp])); if (result) { gData.cp++; } break; case REOP_DIGIT: result = (gData.cp != end && isDigit(chars[gData.cp])); if (result) { gData.cp++; } break; case REOP_NONDIGIT: result = (gData.cp != end && !isDigit(chars[gData.cp])); if (result) { gData.cp++; } break; case REOP_SPACE: result = (gData.cp != end && isREWhiteSpace(chars[gData.cp])); if (result) { gData.cp++; } break; case REOP_NONSPACE: result = (gData.cp != end && !isREWhiteSpace(chars[gData.cp])); if (result) { gData.cp++; } break; case REOP_ALNUM: result = (gData.cp != end && isWord(chars[gData.cp])); if (result) { gData.cp++; } break; case REOP_NONALNUM: result = (gData.cp != end && !isWord(chars[gData.cp])); if (result) { gData.cp++; } break; case REOP_FLAT: { int offset = GET_ARG(program, pc); pc += ARG_LEN; int length = GET_ARG(program, pc); pc += ARG_LEN; result = flatNMatcher(gData, offset, length, chars, end); } break; case REOP_FLATi: { int offset = GET_ARG(program, pc); pc += ARG_LEN; int length = GET_ARG(program, pc); pc += ARG_LEN; result = flatNIMatcher(gData, offset, length, chars, end); } break; case REOP_FLAT1: { char matchCh = (char)(program[pc++] & 0xFF); result = (gData.cp != end && chars[gData.cp] == matchCh); if (result) { gData.cp++; } } break; case REOP_FLAT1i: { char matchCh = (char)(program[pc++] & 0xFF); result = (gData.cp != end && upcase(chars[gData.cp]) == upcase(matchCh)); if (result) { gData.cp++; } } break; case REOP_UCFLAT1: { char matchCh = (char)GET_ARG(program, pc); pc += ARG_LEN; result = (gData.cp != end && chars[gData.cp] == matchCh); if (result) { gData.cp++; } } break; case REOP_UCFLAT1i: { char matchCh = (char)GET_ARG(program, pc); pc += ARG_LEN; result = (gData.cp != end && upcase(chars[gData.cp]) == upcase(matchCh)); if (result) { gData.cp++; } } break; case REOP_ALT: { int nextpc; byte nextop; REProgState state; state = gData.stateStack[gData.stateStackTop]; state.continuation_pc = currentContinuation_pc; state.continuation_op = currentContinuation_op; ++gData.stateStackTop; nextpc = pc + GET_OFFSET(program, pc); nextop = program[nextpc++]; pushBackTrackState(gData, nextop, nextpc); pc += ARG_LEN; op = program[pc++]; } continue; case REOP_JUMP: { int offset; REProgState state; --gData.stateStackTop; state = gData.stateStack[gData.stateStackTop]; currentContinuation_pc = state.continuation_pc; currentContinuation_op = state.continuation_op; offset = GET_OFFSET(program, pc); pc += offset; op = program[pc++]; } continue; case REOP_LPAREN: { int parenIndex = GET_ARG(program, pc); pc += ARG_LEN; gData.set_parens(parenIndex, gData.cp, 0); op = program[pc++]; } continue; case REOP_RPAREN: { int cap_index; int parenIndex = GET_ARG(program, pc); pc += ARG_LEN; cap_index = gData.parens_index(parenIndex); gData.set_parens(parenIndex, cap_index, gData.cp - cap_index); if (parenIndex > gData.lastParen) gData.lastParen = parenIndex; op = program[pc++]; } continue; case REOP_BACKREF: { int parenIndex = GET_ARG(program, pc); pc += ARG_LEN; result = backrefMatcher(gData, parenIndex, chars, end); } break; case REOP_CLASS: { int index = GET_ARG(program, pc); pc += ARG_LEN; if (gData.cp != end) { if (classMatcher(gData, gData.regexp.classList[index], chars[gData.cp])) { gData.cp++; result = true; break; } } result = false; } break; case REOP_ASSERT: case REOP_ASSERT_NOT: { byte testOp; REProgState state; if (op == REOP_ASSERT) { testOp = REOP_ASSERTTEST; } else { testOp = REOP_ASSERTNOTTEST; } state = gData.stateStack[gData.stateStackTop]; state.continuation_pc = currentContinuation_pc; state.continuation_op = currentContinuation_op; state.savedBackTrackLast = gData.backTrackLast; state.index = gData.cp; ++gData.stateStackTop; pushBackTrackState(gData, testOp, pc + GET_OFFSET(program, pc)); pc += ARG_LEN; op = program[pc++]; } continue; case REOP_ASSERTTEST: case REOP_ASSERTNOTTEST: { REProgState state; --gData.stateStackTop; state = gData.stateStack[gData.stateStackTop]; gData.cp = state.index; gData.backTrackLast = state.savedBackTrackLast; currentContinuation_pc = state.continuation_pc; currentContinuation_op = state.continuation_op; if (result) { if (op == REOP_ASSERTTEST) { result = true; } else { result = false; } } else { if (op == REOP_ASSERTTEST) { // Do nothing } else { result = true; } } } break; case REOP_STAR: case REOP_PLUS: case REOP_OPT: case REOP_QUANT: case REOP_MINIMALSTAR: case REOP_MINIMALPLUS: case REOP_MINIMALOPT: case REOP_MINIMALQUANT: { REProgState state; int min, max; boolean greedy = false; switch (op) { case REOP_STAR: greedy = true; // fallthrough case REOP_MINIMALSTAR: min = 0; max = -1; break; case REOP_PLUS: greedy = true; // fallthrough case REOP_MINIMALPLUS: min = 1; max = -1; break; case REOP_OPT: greedy = true; // fallthrough case REOP_MINIMALOPT: min = 0; max = 1; break; case REOP_QUANT: greedy = true; // fallthrough case REOP_MINIMALQUANT: min = GET_ARG(program, pc); pc += ARG_LEN; max = GET_ARG(program, pc); pc += ARG_LEN; break; default: throw Kit.codeBug(); } state = gData.stateStack[gData.stateStackTop]; state.min = min; state.max = max; state.index = gData.cp; state.continuation_pc = currentContinuation_pc; state.continuation_op = currentContinuation_op; ++gData.stateStackTop; if (greedy) { currentContinuation_op = REOP_REPEAT; currentContinuation_pc = pc; pushBackTrackState(gData, REOP_REPEAT, pc); /* Step over <parencount>, <parenindex> & <next> */ pc += 3 * ARG_LEN; op = program[pc++]; } else { if (min != 0) { currentContinuation_op = REOP_MINIMALREPEAT; currentContinuation_pc = pc; /* <parencount> <parenindex> & <next> */ pc += 3 * ARG_LEN; op = program[pc++]; } else { pushBackTrackState(gData, REOP_MINIMALREPEAT, pc); --gData.stateStackTop; pc += 2 * ARG_LEN; // <parencount> & <parenindex> pc = pc + GET_OFFSET(program, pc); op = program[pc++]; } } } continue; case REOP_ENDCHILD: pc = currentContinuation_pc; op = currentContinuation_op; continue; case REOP_REPEAT: { REProgState state; --gData.stateStackTop; state = gData.stateStack[gData.stateStackTop]; if (!result) { // // There's been a failure, see if we have enough // children. // if (state.min == 0) result = true; currentContinuation_pc = state.continuation_pc; currentContinuation_op = state.continuation_op; pc += 2 * ARG_LEN; /* <parencount> & <parenindex> */ pc = pc + GET_OFFSET(program, pc); break; } else { if (state.min == 0 && gData.cp == state.index) { // matched an empty string, that'll get us nowhere result = false; currentContinuation_pc = state.continuation_pc; currentContinuation_op = state.continuation_op; pc += 2 * ARG_LEN; pc = pc + GET_OFFSET(program, pc); break; } if (state.min != 0) state.min--; if (state.max != -1) state.max--; if (state.max == 0) { result = true; currentContinuation_pc = state.continuation_pc; currentContinuation_op = state.continuation_op; pc += 2 * ARG_LEN; pc = pc + GET_OFFSET(program, pc); break; } state.index = gData.cp; ++gData.stateStackTop; currentContinuation_op = REOP_REPEAT; currentContinuation_pc = pc; pushBackTrackState(gData, REOP_REPEAT, pc); int parenCount = GET_ARG(program, pc); pc += ARG_LEN; int parenIndex = GET_ARG(program, pc); pc += 2 * ARG_LEN; op = program[pc++]; for (int k = 0; k < parenCount; k++) { gData.set_parens(parenIndex + k, -1, 0); } } } continue; case REOP_MINIMALREPEAT: { REProgState state; --gData.stateStackTop; state = gData.stateStack[gData.stateStackTop]; if (!result) { // // Non-greedy failure - try to consume another child. // if (state.max == -1 || state.max > 0) { state.index = gData.cp; currentContinuation_op = REOP_MINIMALREPEAT; currentContinuation_pc = pc; int parenCount = GET_ARG(program, pc); pc += ARG_LEN; int parenIndex = GET_ARG(program, pc); pc += 2 * ARG_LEN; for (int k = 0; k < parenCount; k++) { gData.set_parens(parenIndex + k, -1, 0); } ++gData.stateStackTop; op = program[pc++]; continue; } else { // Don't need to adjust pc since we're going to pop. currentContinuation_pc = state.continuation_pc; currentContinuation_op = state.continuation_op; break; } } else { if (state.min == 0 && gData.cp == state.index) { // Matched an empty string, that'll get us nowhere. result = false; currentContinuation_pc = state.continuation_pc; currentContinuation_op = state.continuation_op; break; } if (state.min != 0) state.min--; if (state.max != -1) state.max--; if (state.min != 0) { currentContinuation_op = REOP_MINIMALREPEAT; currentContinuation_pc = pc; int parenCount = GET_ARG(program, pc); pc += ARG_LEN; int parenIndex = GET_ARG(program, pc); pc += 2 * ARG_LEN; for (int k = 0; k < parenCount; k++) { gData.set_parens(parenIndex + k, -1, 0); } state.index = gData.cp; ++gData.stateStackTop; op = program[pc++]; } else { currentContinuation_pc = state.continuation_pc; currentContinuation_op = state.continuation_op; state.index = gData.cp; ++gData.stateStackTop; pushBackTrackState(gData, REOP_MINIMALREPEAT, pc); --gData.stateStackTop; pc += 2 * ARG_LEN; pc = pc + GET_OFFSET(program, pc); op = program[pc++]; } continue; } } case REOP_END: return true; default: throw Kit.codeBug(); } /* * If the match failed and there's a backtrack option, take it. * Otherwise this is a complete and utter failure. */ if (!result) { REBackTrackData backTrackData = gData.backTrackLast; if (backTrackData != null) { gData.backTrackLast = backTrackData.previous; gData.lastParen = backTrackData.lastParen; // XXX: If backTrackData will no longer be used, then // there is no need to clone backTrackData.parens if (backTrackData.parens != null) { gData.parens = (long[])backTrackData.parens.clone(); } gData.cp = backTrackData.cp; for (int k = 0; k < backTrackData.precedingStateTop; k++) gData.stateStack[k] = backTrackData.precedingState[k]; gData.stateStackTop = backTrackData.precedingStateTop + 1; gData.stateStack[gData.stateStackTop - 1] = backTrackData.currentState; currentContinuation_op = gData.stateStack[gData.stateStackTop - 1].continuation_op; currentContinuation_pc = gData.stateStack[gData.stateStackTop - 1].continuation_pc; pc = backTrackData.continuation_pc; op = backTrackData.continuation_op; continue; } else return false; } /* * Continue with the expression. If this the end of the child, use * the current continuation. */ op = program[pc++]; if (op == REOP_ENDCHILD) { pc = currentContinuation_pc; op = currentContinuation_op; } } } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/bfc17d4124cf8110e97525c9b240855202f5ac65/NativeRegExp.java/buggy/js/rhino/src/org/mozilla/javascript/regexp/NativeRegExp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1836,
862,
858,
16651,
12,
862,
5160,
751,
314,
751,
16,
1149,
8526,
5230,
16,
509,
679,
13,
565,
288,
3639,
509,
6125,
273,
374,
31,
3639,
1160,
5402,
8526,
273,
314,
751,
18,
17745,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1836,
862,
858,
16651,
12,
862,
5160,
751,
314,
751,
16,
1149,
8526,
5230,
16,
509,
679,
13,
565,
288,
3639,
509,
6125,
273,
374,
31,
3639,
1160,
5402,
8526,
273,
314,
751,
18,
17745,
... | |
assertTrue("Expected no result set", !rs2.next()); | assertTrue("Expected no result", !rs2.next()); pstmt.close(); | public void testEmptyResults0013() throws Exception { Connection cx = getConnection(); dropTable("#t0013"); Statement stmt = cx.createStatement(); stmt.executeUpdate("create table #t0013 " + " (mytime datetime not null, " + " mytime2 datetime null )"); ResultSet rs1 = stmt.executeQuery("select mytime, mytime2 from #t0013"); assertNotNull(rs1); assertTrue("Expected no result set", !rs1.next()); PreparedStatement pStmt = cx.prepareStatement( "select mytime, mytime2 from #t0013"); ResultSet rs2 = pStmt.executeQuery(); assertNotNull(rs2); assertTrue("Expected no result set", !rs2.next()); } | 439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/c54f5373d7fcd2b3aa2393d9b738e801d4a2f7b2/TimestampTest.java/buggy/trunk/jtds/src/test/net/sourceforge/jtds/test/TimestampTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1921,
3447,
713,
3437,
1435,
1216,
1185,
288,
3639,
4050,
9494,
273,
6742,
5621,
3639,
3640,
1388,
2932,
7,
88,
713,
3437,
8863,
3639,
8056,
3480,
273,
9494,
18,
2640,
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,
1842,
1921,
3447,
713,
3437,
1435,
1216,
1185,
288,
3639,
4050,
9494,
273,
6742,
5621,
3639,
3640,
1388,
2932,
7,
88,
713,
3437,
8863,
3639,
8056,
3480,
273,
9494,
18,
2640,
34... |
if (kind > 52) kind = 52; | if (kind > 55) kind = 55; | private final int jjMoveNfa_4(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 30; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 3: if ((0x3ff000000000000L & l) != 0L) { if (kind > 49) kind = 49; jjCheckNAdd(5); } else if (curChar == 36) { if (kind > 10) kind = 10; jjCheckNAddTwoStates(13, 14); } else if (curChar == 45) jjCheckNAdd(5); else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 2; break; case 30: if ((0x3ff000000000000L & l) != 0L) { if (kind > 52) kind = 52; jjCheckNAdd(7); } else if ((0x2400L & l) != 0L) { if (kind > 46) kind = 46; } else if ((0x100000200L & l) != 0L) jjCheckNAddStates(34, 36); if (curChar == 13) jjstateSet[jjnewStateCnt++] = 26; break; case 22: case 7: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 52) kind = 52; jjCheckNAdd(7); break; case 28: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 52) kind = 52; jjCheckNAdd(7); break; case 23: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 52) kind = 52; jjCheckNAdd(7); break; case 0: if (curChar == 42) jjstateSet[jjnewStateCnt++] = 1; break; case 1: if ((0xfffffff7ffffffffL & l) != 0L && kind > 13) kind = 13; break; case 2: if (curChar == 42) jjstateSet[jjnewStateCnt++] = 0; break; case 4: if (curChar == 45) jjCheckNAdd(5); break; case 5: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 49) kind = 49; jjCheckNAdd(5); break; case 10: if (curChar == 36 && kind > 10) kind = 10; break; case 12: if (curChar == 36) jjCheckNAddTwoStates(13, 14); break; case 14: if (curChar == 33 && kind > 11) kind = 11; break; case 15: if (curChar != 36) break; if (kind > 10) kind = 10; jjCheckNAddTwoStates(13, 14); break; case 18: if ((0x100000200L & l) != 0L) jjAddStates(37, 39); break; case 19: if ((0x2400L & l) != 0L && kind > 43) kind = 43; break; case 20: if (curChar == 10 && kind > 43) kind = 43; break; case 21: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 20; break; case 24: if ((0x100000200L & l) != 0L) jjCheckNAddStates(34, 36); break; case 25: if ((0x2400L & l) != 0L && kind > 46) kind = 46; break; case 26: if (curChar == 10 && kind > 46) kind = 46; break; case 27: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 26; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 3: if ((0x7fffffe87fffffeL & l) != 0L) { if (kind > 52) kind = 52; jjCheckNAdd(7); } else if (curChar == 92) jjCheckNAddStates(40, 43); if (curChar == 101) jjAddStates(44, 45); break; case 30: case 7: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 52) kind = 52; jjCheckNAdd(7); break; case 22: if ((0x7fffffe87fffffeL & l) != 0L) { if (kind > 52) kind = 52; jjCheckNAdd(7); } if (curChar == 108) jjstateSet[jjnewStateCnt++] = 28; else if (curChar == 110) jjstateSet[jjnewStateCnt++] = 17; break; case 28: if ((0x7fffffe87fffffeL & l) != 0L) { if (kind > 52) kind = 52; jjCheckNAdd(7); } if (curChar == 115) jjstateSet[jjnewStateCnt++] = 23; break; case 23: if ((0x7fffffe87fffffeL & l) != 0L) { if (kind > 52) kind = 52; jjCheckNAdd(7); } if (curChar == 101) { if (kind > 46) kind = 46; jjAddStates(34, 36); } break; case 1: if (kind > 13) kind = 13; break; case 6: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 52) kind = 52; jjCheckNAdd(7); break; case 8: if (curChar == 92) jjCheckNAddStates(40, 43); break; case 9: if (curChar == 92) jjCheckNAddTwoStates(9, 10); break; case 11: if (curChar == 92) jjCheckNAddTwoStates(11, 12); break; case 13: if (curChar == 92) jjAddStates(46, 47); break; case 16: if (curChar == 101) jjAddStates(44, 45); break; case 17: if (curChar != 100) break; if (kind > 43) kind = 43; jjAddStates(37, 39); break; case 29: if (curChar == 108) jjstateSet[jjnewStateCnt++] = 28; break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 13) kind = 13; break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 30 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 9291 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9291/e128e4125429834f73621c8aa67036ca877e731e/ParserTokenManager.java/clean/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
727,
509,
10684,
7607,
50,
507,
67,
24,
12,
474,
787,
1119,
16,
509,
662,
1616,
15329,
282,
509,
8526,
1024,
7629,
31,
282,
509,
2542,
861,
273,
374,
31,
282,
10684,
2704,
1119,
11750,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
727,
509,
10684,
7607,
50,
507,
67,
24,
12,
474,
787,
1119,
16,
509,
662,
1616,
15329,
282,
509,
8526,
1024,
7629,
31,
282,
509,
2542,
861,
273,
374,
31,
282,
10684,
2704,
1119,
11750,... |
Object[] values = gstring.getValues(); | protected String asSql(GString gstring) { boolean nulls = false; String[] strings = gstring.getStrings(); if (strings.length <= 0) { throw new IllegalArgumentException("No SQL specified in GString: " + gstring); } Object[] values = gstring.getValues(); StringBuffer buffer = new StringBuffer(); for (int i = 0; i < strings.length; i++) { buffer.append(strings[i]); if (i < values.length) { if(values[i]!=null){ buffer.append("?"); }else{ nulls = true; buffer.append("?'\"?"); // will replace these with nullish values } } } String sql = buffer.toString(); if(nulls){ sql = nullify(sql); } return sql; } | 6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/1ce8bf79447f0f0fb500a9a74e1b5bc26e417d6e/Sql.java/buggy/src/main/groovy/sql/Sql.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
487,
5101,
12,
43,
780,
314,
1080,
13,
288,
377,
202,
6494,
27778,
273,
629,
31,
3639,
514,
8526,
2064,
273,
314,
1080,
18,
588,
7957,
5621,
3639,
309,
261,
10219,
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,
377,
4750,
514,
487,
5101,
12,
43,
780,
314,
1080,
13,
288,
377,
202,
6494,
27778,
273,
629,
31,
3639,
514,
8526,
2064,
273,
314,
1080,
18,
588,
7957,
5621,
3639,
309,
261,
10219,
18,
2469,
... | |
protected UIBean getBean() { | protected Component getBean() { | protected UIBean getBean() { return new Label(stack, req, res); } | 22725 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/22725/7043ff728a4e7f565213be22ecab23cb4d6d639a/LabelModel.java/clean/src/java/com/opensymphony/webwork/views/freemarker/tags/LabelModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
5435,
16485,
1435,
288,
3639,
327,
394,
5287,
12,
3772,
16,
1111,
16,
400,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
5435,
16485,
1435,
288,
3639,
327,
394,
5287,
12,
3772,
16,
1111,
16,
400,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
System.out.println( "Enter Rss Channel Action" ); | if(debug) System.out.println( "Enter Rss Channel Action" ); | public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { System.out.println( "Enter Rss Channel Action" ); // Try to retrieve tile context ComponentContext context = ComponentContext.getContext( request ); if( context == null ) { throw new ServletException( "This action must be called by a Tile, not directly" ); } ActionErrors errors = new ActionErrors(); org.apache.commons.digester.rss.Channel channel = null; // -- Retrieve parameters -- // Urls can come from a list, or from a single attribute. List channels = (List)context.getAttribute( CHANNEL_URLS_KEY ); if( channels == null ) { Object url = context.getAttribute( CHANNEL_URL_KEY ); channels = new ArrayList(1); channels.add(url); } //channels.add("http://www.newsforge.com/newsforge.rss"); //channels.add("http://xmlhack.com/rss.php"); //channels.add("http://lwn.net/headlines/rss"); // channels.trimToSize(); System.out.println( "urls count" + channels.size() ) ; // -- Loop through channels -- ArrayList channelBeans = new ArrayList(channels.size()); try { for (int i=0; i<channels.size(); i++) { RSSDigester digester = new RSSDigester(); Channel obj = (Channel)digester.parse((String)channels.get(i)); System.out.println( "Channel:" + obj) ; //System.out.println( "Channel.items:" + obj.getI) ; channelBeans.add(obj); } } catch (Throwable t) { errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("rss.access.error")); servlet.log(t.toString()); } // -- Handle Errors --- if (!errors.empty()) { saveErrors(request, errors); if (mapping.getInput()!=null) return (new ActionForward(mapping.getInput())); // If no input page, use error forwarding System.out.println( "Exit Rss Channel Action : error" ); return (mapping.findForward("error")); } // -- Save Bean, and Continue --- System.out.println( "Exit Rss Channel Action" ); //request.setAttribute(CHANNELS_KEY,channelBeans); // Use Tile context to pass channels context.putAttribute( CHANNELS_KEY,channelBeans); return (mapping.findForward("continue")); } // ---- End perform ---- | 48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/ad0ba80061ed446db8b99b2a69e6936c68541dc4/Channels.java/clean/contrib/tiles/src/tutorial/org/apache/struts/example/tiles/rssChannel/Channels.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4382,
8514,
3073,
12,
1803,
3233,
2874,
16,
4766,
4382,
1204,
646,
16,
4766,
9984,
590,
16,
4766,
12446,
766,
13,
3639,
1216,
1860,
16,
16517,
288,
565,
309,
12,
4148,
13,
2332,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4382,
8514,
3073,
12,
1803,
3233,
2874,
16,
4766,
4382,
1204,
646,
16,
4766,
9984,
590,
16,
4766,
12446,
766,
13,
3639,
1216,
1860,
16,
16517,
288,
565,
309,
12,
4148,
13,
2332,
1... |
break; | return EOL; | public int getToken() throws IOException { int c; tokenno++; // Check for pushed-back token if (this.pushbackToken != EOF) { int result = this.pushbackToken; this.pushbackToken = EOF; return result; } retry: for (;;) { // Eat whitespace, possibly sensitive to newlines. for (;;) { c = getChar(); if (c == EOF_CHAR) { return EOF; } else if (c == '\n') { flags &= ~TSF_DIRTYLINE; if ((flags & TSF_NEWLINES) != 0) { break; } } else if (!isJSSpace(c)) { if (c != '-') { flags |= TSF_DIRTYLINE; } break; } } // identifier/keyword/instanceof? // watch out for starting with a <backslash> boolean identifierStart; boolean isUnicodeEscapeStart = false; if (c == '\\') { c = getChar(); if (c == 'u') { identifierStart = true; isUnicodeEscapeStart = true; stringBufferTop = 0; } else { identifierStart = false; ungetChar(c); c = '\\'; } } else { identifierStart = Character.isJavaIdentifierStart((char)c); if (identifierStart) { stringBufferTop = 0; addToString(c); } } if (identifierStart) { boolean containsEscape = isUnicodeEscapeStart; for (;;) { if (isUnicodeEscapeStart) { // strictly speaking we should probably push-back // all the bad characters if the <backslash>uXXXX // sequence is malformed. But since there isn't a // correct context(is there?) for a bad Unicode // escape sequence in an identifier, we can report // an error here. int escapeVal = 0; for (int i = 0; i != 4; ++i) { c = getChar(); escapeVal = (escapeVal << 4) | xDigitToInt(c); // Next check takes care about c < 0 and bad escape if (escapeVal < 0) { break; } } if (escapeVal < 0) { reportSyntaxError("msg.invalid.escape", null); return ERROR; } addToString(escapeVal); isUnicodeEscapeStart = false; } else { c = getChar(); if (c == '\\') { c = getChar(); if (c == 'u') { isUnicodeEscapeStart = true; containsEscape = true; } else { reportSyntaxError("msg.illegal.character", null); return ERROR; } } else { if (c == EOF_CHAR || !Character.isJavaIdentifierPart((char)c)) { break; } addToString(c); } } } ungetChar(c); String str = getStringFromBuffer(); if (!containsEscape) { // OPT we shouldn't have to make a string (object!) to // check if it's a keyword. // Return the corresponding token if it's a keyword int result = stringToKeyword(str); if (result != EOF) { if (result != RESERVED) { return result; } else if (!Context.getContext().hasFeature( Context.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER)) { return result; } else { // If implementation permits to use future reserved // keywords in violation with the EcmaScript standard, // treat it as name but issue warning Object[] errArgs = { str }; reportSyntaxWarning("msg.reserved.keyword", errArgs); } } } this.string = (String)allStrings.intern(str); return NAME; } // is it a number? if (isDigit(c) || (c == '.' && isDigit(peekChar()))) { stringBufferTop = 0; int base = 10; if (c == '0') { c = getChar(); if (c == 'x' || c == 'X') { base = 16; c = getChar(); } else if (isDigit(c)) { base = 8; } else { addToString('0'); } } if (base == 16) { while (0 <= xDigitToInt(c)) { addToString(c); c = getChar(); } } else { while ('0' <= c && c <= '9') { /* * We permit 08 and 09 as decimal numbers, which * makes our behavior a superset of the ECMA * numeric grammar. We might not always be so * permissive, so we warn about it. */ if (base == 8 && c >= '8') { Object[] errArgs = { c == '8' ? "8" : "9" }; reportSyntaxWarning("msg.bad.octal.literal", errArgs); base = 10; } addToString(c); c = getChar(); } } boolean isInteger = true; if (base == 10 && (c == '.' || c == 'e' || c == 'E')) { isInteger = false; if (c == '.') { do { addToString(c); c = getChar(); } while (isDigit(c)); } if (c == 'e' || c == 'E') { addToString(c); c = getChar(); if (c == '+' || c == '-') { addToString(c); c = getChar(); } if (!isDigit(c)) { reportSyntaxError("msg.missing.exponent", null); return ERROR; } do { addToString(c); c = getChar(); } while (isDigit(c)); } } ungetChar(c); String numString = getStringFromBuffer(); double dval; if (base == 10 && !isInteger) { try { // Use Java conversion to number from string... dval = (Double.valueOf(numString)).doubleValue(); } catch (NumberFormatException ex) { Object[] errArgs = { ex.getMessage() }; reportSyntaxError("msg.caught.nfe", errArgs); return ERROR; } } else { dval = ScriptRuntime.stringToNumber(numString, 0, base); } this.number = dval; return NUMBER; } // is it a string? if (c == '"' || c == '\'') { // We attempt to accumulate a string the fast way, by // building it directly out of the reader. But if there // are any escaped characters in the string, we revert to // building it out of a StringBuffer. int quoteChar = c; stringBufferTop = 0; c = getChar(); strLoop: while (c != quoteChar) { if (c == '\n' || c == EOF_CHAR) { ungetChar(c); reportSyntaxError("msg.unterminated.string.lit", null); return ERROR; } if (c == '\\') { // We've hit an escaped character int escapeVal; c = getChar(); switch (c) { case 'b': c = '\b'; break; case 'f': c = '\f'; break; case 'n': c = '\n'; break; case 'r': c = '\r'; break; case 't': c = '\t'; break; // \v a late addition to the ECMA spec, // it is not in Java, so use 0xb case 'v': c = 0xb; break; case 'u': // Get 4 hex digits; if the u escape is not // followed by 4 hex digits, use 'u' + the // literal character sequence that follows. int escapeStart = stringBufferTop; addToString('u'); escapeVal = 0; for (int i = 0; i != 4; ++i) { c = getChar(); escapeVal = (escapeVal << 4) | xDigitToInt(c); if (escapeVal < 0) { continue strLoop; } addToString(c); } // prepare for replace of stored 'u' sequence // by escape value stringBufferTop = escapeStart; c = escapeVal; break; case 'x': // Get 2 hex digits, defaulting to 'x'+literal // sequence, as above. c = getChar(); escapeVal = xDigitToInt(c); if (escapeVal < 0) { addToString('x'); continue strLoop; } else { int c1 = c; c = getChar(); escapeVal = (escapeVal << 4) | xDigitToInt(c); if (escapeVal < 0) { addToString('x'); addToString(c1); continue strLoop; } else { // got 2 hex digits c = escapeVal; } } break; default: if ('0' <= c && c < '8') { int val = c - '0'; c = getChar(); if ('0' <= c && c < '8') { val = 8 * val + c - '0'; c = getChar(); if ('0' <= c && c < '8' && val <= 037) { // c is 3rd char of octal sequence only // if the resulting val <= 0377 val = 8 * val + c - '0'; c = getChar(); } } ungetChar(c); c = val; } } } addToString(c); c = getChar(); } String str = getStringFromBuffer(); this.string = (String)allStrings.intern(str); return STRING; } switch (c) { case '\n': return EOL; case ';': return SEMI; case '[': return LB; case ']': return RB; case '{': return LC; case '}': return RC; case '(': return LP; case ')': return RP; case ',': return COMMA; case '?': return HOOK; case ':': return COLON; case '.': return DOT; case '|': if (matchChar('|')) { return OR; } else if (matchChar('=')) { this.op = BITOR; return ASSIGN; } else { return BITOR; } case '^': if (matchChar('=')) { this.op = BITXOR; return ASSIGN; } else { return BITXOR; } case '&': if (matchChar('&')) { return AND; } else if (matchChar('=')) { this.op = BITAND; return ASSIGN; } else { return BITAND; } case '=': if (matchChar('=')) { if (matchChar('=')) this.op = SHEQ; else this.op = EQ; return EQOP; } else { this.op = NOP; return ASSIGN; } case '!': if (matchChar('=')) { if (matchChar('=')) this.op = SHNE; else this.op = NE; return EQOP; } else { this.op = NOT; return UNARYOP; } case '<': /* NB:treat HTML begin-comment as comment-till-eol */ if (matchChar('!')) { if (matchChar('-')) { if (matchChar('-')) { skipLine(); continue retry; } ungetChar('-'); } ungetChar('!'); } if (matchChar('<')) { if (matchChar('=')) { this.op = LSH; return ASSIGN; } else { this.op = LSH; return SHOP; } } else { if (matchChar('=')) { this.op = LE; return RELOP; } else { this.op = LT; return RELOP; } } case '>': if (matchChar('>')) { if (matchChar('>')) { if (matchChar('=')) { this.op = URSH; return ASSIGN; } else { this.op = URSH; return SHOP; } } else { if (matchChar('=')) { this.op = RSH; return ASSIGN; } else { this.op = RSH; return SHOP; } } } else { if (matchChar('=')) { this.op = GE; return RELOP; } else { this.op = GT; return RELOP; } } case '*': if (matchChar('=')) { this.op = MUL; return ASSIGN; } else { return MUL; } case '/': // is it a // comment? if (matchChar('/')) { skipLine(); continue retry; } if (matchChar('*')) { boolean lookForSlash = false; for (;;) { c = getChar(); if (c == EOF_CHAR) { reportSyntaxError("msg.unterminated.comment", null); return ERROR; } else if (c == '*') { lookForSlash = true; } else if (c == '/') { if (lookForSlash) { continue retry; } } else { lookForSlash = false; } } } // is it a regexp? if ((flags & TSF_REGEXP) != 0) { stringBufferTop = 0; while ((c = getChar()) != '/') { if (c == '\n' || c == EOF_CHAR) { ungetChar(c); reportSyntaxError("msg.unterminated.re.lit", null); return ERROR; } if (c == '\\') { addToString(c); c = getChar(); } addToString(c); } int reEnd = stringBufferTop; while (true) { if (matchChar('g')) addToString('g'); else if (matchChar('i')) addToString('i'); else if (matchChar('m')) addToString('m'); else break; } if (isAlpha(peekChar())) { reportSyntaxError("msg.invalid.re.flag", null); return ERROR; } this.string = new String(stringBuffer, 0, reEnd); this.regExpFlags = new String(stringBuffer, reEnd, stringBufferTop - reEnd); return REGEXP; } if (matchChar('=')) { this.op = DIV; return ASSIGN; } else { return DIV; } case '%': this.op = MOD; if (matchChar('=')) { return ASSIGN; } else { return MOD; } case '~': this.op = BITNOT; return UNARYOP; case '+': if (matchChar('=')) { this.op = ADD; return ASSIGN; } else if (matchChar('+')) { return INC; } else { return ADD; } case '-': if (matchChar('=')) { this.op = SUB; c = ASSIGN; } else if (matchChar('-')) { if (0 == (flags & TSF_DIRTYLINE)) { // treat HTML end-comment after possible whitespace // after line start as comment-utill-eol if (matchChar('>')) { skipLine(); continue retry; } } c = DEC; } else { c = SUB; } flags |= TSF_DIRTYLINE; return c; default: reportSyntaxError("msg.illegal.character", null); return ERROR; } } } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/cb9350e1a2eb151e87843cfcd75986fa06c9fdeb/TokenStream.java/buggy/src/org/mozilla/javascript/TokenStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
9162,
1435,
1216,
1860,
288,
3639,
509,
276,
31,
3639,
1147,
2135,
9904,
31,
3639,
368,
2073,
364,
18543,
17,
823,
1147,
3639,
309,
261,
2211,
18,
6206,
823,
1345,
480,
6431,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
9162,
1435,
1216,
1860,
288,
3639,
509,
276,
31,
3639,
1147,
2135,
9904,
31,
3639,
368,
2073,
364,
18543,
17,
823,
1147,
3639,
309,
261,
2211,
18,
6206,
823,
1345,
480,
6431,
... |
" AND eperson_group_id = " + groupID + ";"; | " AND eperson_group_id = " + groupID; | public static void remove(Context context, int wsItemID, int groupID) throws SQLException, AuthorizeException { // get the workspace item and the group from the request values WorkspaceItem wsItem = WorkspaceItem.find(context, wsItemID); Group group = Group.find(context, groupID); // remove the link from the supervisory database String query = "DELETE FROM epersongroup2workspaceitem " + "WHERE workspace_item_id = " + wsItemID + " AND eperson_group_id = " + groupID + ";"; DatabaseManager.updateQuery(context, query); // get the item and have it remove the policies for the group Item item = wsItem.getItem(); item.removeGroupPolicies(group); } | 49711 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49711/38435cd8629ae347e69538db46e8b1f8b7084575/Supervisor.java/buggy/dspace/src/org/dspace/eperson/Supervisor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1206,
12,
1042,
819,
16,
509,
4945,
1180,
734,
16,
509,
30365,
13,
3639,
1216,
6483,
16,
23859,
503,
565,
288,
3639,
368,
336,
326,
6003,
761,
471,
326,
1041,
628,
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,
760,
918,
1206,
12,
1042,
819,
16,
509,
4945,
1180,
734,
16,
509,
30365,
13,
3639,
1216,
6483,
16,
23859,
503,
565,
288,
3639,
368,
336,
326,
6003,
761,
471,
326,
1041,
628,
326,
... |
this.attributes = attributes; | attributes = new HashMap(); char n_attributes = (char) in.readUnsignedShort(); for (int i = 0; i < n_attributes; ++i) { char attribute_name_index = (char) in.readUnsignedShort(); if (clazz.getCPtag(attribute_name_index) != CONSTANT_Utf8) throw new ClassFormatError("constant pool entry " + attribute_name_index + ", referred to by attribute " + i + ", is wrong type tag (expected=" + CONSTANT_Utf8 + ", actual=" + clazz.getCPtag(attribute_name_index)); Utf8 attribute_desc = clazz.getCPasUtf8(attribute_name_index); int attribute_length = in.readInt(); byte[] attribute_data = new byte[attribute_length]; in.readFully(attribute_data); attributes.put(attribute_desc, attribute_data); } | public void load(char access_flags, Map attributes) { this.access_flags = access_flags; this.attributes = attributes; state = STATE_LOADING2; } | 3029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3029/00a532e6f2ba445338d1d9c981b5171cdc044fd4/jq_Member.java/buggy/joeq_core/joeq/Class/jq_Member.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1262,
12,
3001,
2006,
67,
7133,
16,
1635,
1677,
13,
288,
3639,
333,
18,
3860,
67,
7133,
273,
2006,
67,
7133,
31,
3639,
1677,
273,
394,
4317,
5621,
1149,
290,
67,
4350,
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,
1262,
12,
3001,
2006,
67,
7133,
16,
1635,
1677,
13,
288,
3639,
333,
18,
3860,
67,
7133,
273,
2006,
67,
7133,
31,
3639,
1677,
273,
394,
4317,
5621,
1149,
290,
67,
4350,
273,
... |
else { f = checkConstructor(name); } if (f != IdFunction.WAS_OVERWRITTEN) { return true; } | public boolean has(String name, Scriptable start) { if (prototypeFunctionPool != null) { IdFunction f; int id = mapNameToMethodId(name); if (id != 0) { f = prototypeFunctionPool[id]; } else { f = checkConstructor(name); } if (f != IdFunction.WAS_OVERWRITTEN) { return true; } } return super.has(name, start); } | 12564 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12564/b631b3e8574543a4d24a0048cc710f305deb8ff5/IdScriptable.java/buggy/src/org/mozilla/javascript/IdScriptable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
711,
12,
780,
508,
16,
22780,
787,
13,
288,
3639,
309,
261,
18541,
2083,
2864,
480,
446,
13,
288,
5411,
3124,
2083,
284,
31,
5411,
509,
612,
273,
852,
28455,
30793,
12,
529,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
711,
12,
780,
508,
16,
22780,
787,
13,
288,
3639,
309,
261,
18541,
2083,
2864,
480,
446,
13,
288,
5411,
3124,
2083,
284,
31,
5411,
509,
612,
273,
852,
28455,
30793,
12,
529,... | |
StringBuffer strBuf = new StringBuffer("'"); strBuf.append(df.format(x)).append('.').append(decimal).append("+00'"); set(parameterIndex, strBuf.toString()); | public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException { if (null == x) { setNull(parameterIndex, Types.OTHER); } else { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); df.setTimeZone(TimeZone.getTimeZone("GMT")); // Make decimal from nanos. StringBuffer decimal = new StringBuffer("000000000"); // max nanos length String nanos = String.valueOf(x.getNanos()); decimal.setLength(decimal.length() - nanos.length()); decimal.append(nanos); if (! connection.haveMinimumServerVersion("7.2")) { // Because 7.1 include bug that "hh:mm:59.999" becomes "hh:mm:60.00". decimal.setLength(2); } StringBuffer strBuf = new StringBuffer("'"); strBuf.append(df.format(x)).append('.').append(decimal).append("+00'"); set(parameterIndex, strBuf.toString()); } } | 2413 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2413/10b88e836fcd516090366438a0079b35b0a8626b/PreparedStatement.java/buggy/org/postgresql/jdbc1/PreparedStatement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
25251,
12,
474,
25412,
16,
8159,
619,
13,
1216,
6483,
202,
95,
202,
202,
430,
261,
2011,
422,
619,
13,
202,
202,
95,
1082,
202,
542,
2041,
12,
6775,
1016,
16,
7658,
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,
25251,
12,
474,
25412,
16,
8159,
619,
13,
1216,
6483,
202,
95,
202,
202,
430,
261,
2011,
422,
619,
13,
202,
202,
95,
1082,
202,
542,
2041,
12,
6775,
1016,
16,
7658,
18,... | |
ch = ch | ((data[in++] & 0x7f) << 12); ch = ch | ((data[in++] & 0x7f) << 6); | ch = ((ch & 0x0f) << 12); ch = ch | ((data[in++] & 0x3f) << 6); ch = ch | (data[in++] & 0x3f); | private synchronized String decodeUTF8(byte[] data, int offset, int length) throws IOException { char[] cdata = decoderArray; if (cdata.length < length) cdata = decoderArray = new char[length]; int in = offset; int out = 0; int end = length + offset; try { while (in < end) { int ch = data[in++] & 0xff; if (ch < 0x80) { // Length 1: \u00000 .. \u0007f } else if (ch < 0xe0) { // Length 2: \u00080 .. \u007ff ch = ch | ((data[in++] & 0x7f) << 6); } else { // Length 3: \u00800 .. \u0ffff ch = ch | ((data[in++] & 0x7f) << 12); ch = ch | ((data[in++] & 0x7f) << 6); } cdata[out++] = (char)ch; } } catch (ArrayIndexOutOfBoundsException a) { throw new IOException("UTF-8 string representation was truncated"); } // Check if we ran past the end without seeing an exception. if (in > end) throw new IOException("UTF-8 string representation was truncated"); return new String(cdata, 0, out); } | 49868 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49868/82067330ba1d5cdf0bfe1902a16d412f3a08d7d2/Encoding.java/clean/org/postgresql/core/Encoding.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
3852,
514,
2495,
5159,
28,
12,
7229,
8526,
501,
16,
509,
1384,
16,
509,
769,
13,
1216,
1860,
288,
202,
202,
3001,
8526,
20712,
273,
8320,
1076,
31,
202,
202,
430,
261,
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,
225,
202,
1152,
3852,
514,
2495,
5159,
28,
12,
7229,
8526,
501,
16,
509,
1384,
16,
509,
769,
13,
1216,
1860,
288,
202,
202,
3001,
8526,
20712,
273,
8320,
1076,
31,
202,
202,
430,
261,
71,
... |
private void getDefaultRepeatIndexes(final ControlsState controlsState) { visitAllControlStatic(new ControlElementVisitorListener() { private Stack repeatStack = new Stack(); public boolean startVisitControl(Element controlElement, String effectiveControlId) { if (controlElement.getName().equals("repeat")) { // Create control without parent, just to hold iterations final RepeatControlInfo repeatControlInfo = new RepeatControlInfo(null, controlElement, controlElement.getName(), effectiveControlId); // Set initial index controlsState.setDefaultRepeatIndex(repeatControlInfo.getRepeatId(), repeatControlInfo.getStartIndex()); // Keep control on stack repeatStack.push(repeatControlInfo); } return true; } public boolean endVisitControl(Element controlElement, String effectiveControlId) {// if (controlElement.getName().equals("repeat")) {// final RepeatControlInfo repeatControlInfo = (RepeatControlInfo) repeatStack.pop();// final List children = repeatControlInfo.getChildren();// if (children == null || children.size() == 0) {// // Update repeat index to 0 if there was no iteration// result.updateRepeatIndex(effectiveControlId, 0);// // Current index is 0// result.setRepeatIterations(effectiveControlId, 0);// } else {// // Number of iterations is number of children// result.setRepeatIterations(effectiveControlId, children.size());// }// } return true; } public void startRepeatIteration(int iteration) { // One more iteration in current repeat final RepeatControlInfo repeatControlInfo = (RepeatControlInfo) repeatStack.peek(); repeatControlInfo.addChild(new RepeatIterationInfo(repeatControlInfo, iteration)); } public void endRepeatIteration(int iteration) { } }); } | 57229 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57229/502ac014788f17d34ed9102cdc4dc5bd4c8b4ed8/XFormsControls.java/buggy/src/java/org/orbeon/oxf/xforms/XFormsControls.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4829,
16750,
8639,
12,
6385,
8888,
87,
1119,
11022,
1119,
13,
288,
3639,
3757,
1595,
3367,
5788,
12,
2704,
8888,
1046,
7413,
2223,
1435,
288,
5411,
3238,
7283,
7666,
2624,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4829,
16750,
8639,
12,
6385,
8888,
87,
1119,
11022,
1119,
13,
288,
3639,
3757,
1595,
3367,
5788,
12,
2704,
8888,
1046,
7413,
2223,
1435,
288,
5411,
3238,
7283,
7666,
2624,
273,
... | ||
private void traverseIdentityConstraintsFor(int elementIndex, Vector identityConstraints) throws Exception { // iterate over identity constraints for this element int size = identityConstraints != null ? identityConstraints.size() : 0; if (size > 0) { // REVISIT: Use cached copy. -Ac XMLElementDecl edecl = new XMLElementDecl(); fSchemaGrammar.getElementDecl(elementIndex, edecl); for (int i = 0; i < size; i++) { Element ic = (Element)identityConstraints.elementAt(i); String icName = ic.getLocalName(); if ( icName.equals(SchemaSymbols.ELT_KEY) ) { traverseKey(ic, edecl); } else if ( icName.equals(SchemaSymbols.ELT_KEYREF) ) { traverseKeyRef(ic, edecl); } else if ( icName.equals(SchemaSymbols.ELT_UNIQUE) ) { traverseUnique(ic, edecl); } else { // should never get here throw new RuntimeException("identity constraint must be one of "+ "\""+SchemaSymbols.ELT_UNIQUE+"\", "+ "\""+SchemaSymbols.ELT_KEY+"\", or "+ "\""+SchemaSymbols.ELT_KEYREF+'"'); } fSchemaGrammar.setElementDecl(elementIndex, edecl); } // loop over vector elements } // if size > 0 } // traverseIdentityConstraints(Vector) | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/0b4ad3e7d139e7d62454d4004aa98607b9fba713/TraverseSchema.java/clean/src/org/apache/xerces/validators/schema/TraverseSchema.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
6459,
2033,
2476,
4334,
4878,
1290,
12,
474,
2956,
1016,
16,
5018,
10781,
4878,
13,
15069,
503,
95,
759,
18793,
1643,
10781,
11967,
1884,
2211,
2956,
474,
1467,
33,
10781,
4878,
5,
33,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
6459,
2033,
2476,
4334,
4878,
1290,
12,
474,
2956,
1016,
16,
5018,
10781,
4878,
13,
15069,
503,
95,
759,
18793,
1643,
10781,
11967,
1884,
2211,
2956,
474,
1467,
33,
10781,
4878,
5,
33,
2... | ||
super("GCSpy Wait", "Should the VM wait for the visualiser to connect?", false); | super("GCSpy Wait", "Should the VM wait for the visualiser to connect?", false); | public GCspyWait() { super("GCSpy Wait", "Should the VM wait for the visualiser to connect?", false); } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/30524c62fa391922d51289c03075f714c772951c/GCspyWait.java/buggy/MMTk/src/org/mmtk/utility/options/GCspyWait.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
15085,
30884,
5480,
1435,
288,
565,
2240,
2932,
43,
4596,
2074,
5838,
3113,
1850,
315,
14309,
326,
8251,
2529,
364,
326,
11623,
15914,
358,
3077,
35,
3113,
1850,
629,
1769,
225,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
15085,
30884,
5480,
1435,
288,
565,
2240,
2932,
43,
4596,
2074,
5838,
3113,
1850,
315,
14309,
326,
8251,
2529,
364,
326,
11623,
15914,
358,
3077,
35,
3113,
1850,
629,
1769,
225,
289,
... |
sbuf.append("("); | sbuf.append('('); | public final static String memFormat(final long mem) { int gb = (int) ((mem >> 30) & 0x3FF); int mb = (int) ((mem >> 20) & 0x3FF); int kb = (int) ((mem >> 10) & 0x3FF); int bytes = (int) (mem & 0x3FF); StringBuffer sbuf = new StringBuffer(30); if (gb > 0) { sbuf.append(gb); sbuf.append("GB "); } if (mb > 0 || gb > 0) { sbuf.append(mb); sbuf.append("MB "); } if (kb > 0 || mb > 0 || gb > 0) { sbuf.append(kb); sbuf.append("KB "); } if (bytes > 0 || kb > 0 || mb > 0 || gb > 0) { sbuf.append(bytes); sbuf.append("bytes "); } sbuf.append("("); sbuf.append(mem); sbuf.append("bytes)"); return sbuf.toString(); } | 392 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/392/c9bad74802d7477af9340fc65a56d9aa56fd42d3/ASMMemTest.java/clean/test/perf/org/objectweb/asm/ASMMemTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
760,
514,
1663,
1630,
12,
6385,
1525,
1663,
13,
288,
3639,
509,
21649,
273,
261,
474,
13,
14015,
3917,
1671,
5196,
13,
473,
374,
92,
23,
2246,
1769,
3639,
509,
4903,
273,
261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
760,
514,
1663,
1630,
12,
6385,
1525,
1663,
13,
288,
3639,
509,
21649,
273,
261,
474,
13,
14015,
3917,
1671,
5196,
13,
473,
374,
92,
23,
2246,
1769,
3639,
509,
4903,
273,
261... |
formats.put("latex", new Format("LATEX", null, false, 10240)); | protected TestSuite() { super("GraphicsIO Test Suite"); formats = new TreeMap(); formats.put("cgm", new Format("CGM", null, false, 10230)); formats.put("emf", new Format("EMF", null, false, 10231)); formats.put("gif", new Format("GIF", "tests", true, 10241)); formats.put("java", new Format("JAVA", null, false, 10238)); formats.put("jpg", new Format("JPG", "tests", true, 10241)); formats.put("latex", new Format("LATEX", null, false, 10240)); formats.put("pdf", new Format("PDF", null, true, 10235)); formats.put("png", new Format("PNG", "tests", true, 10241)); formats.put("ps", new Format("PS", null, true, 10232)); formats.put("svg", new Format("SVG", null, true, 10236)); formats.put("swf", new Format("SWF", null, true, 10237)); // FVG-241, TestCustomStrokes [3] disabled for MacOS X if (System.getProperty("os.name").equals("Mac OS X") && System.getProperty("java.version").startsWith("1.5")) { testDisabled[3 /* TestCustomStrokes */] = true; } // FVG-197, TestResolution not very useful yet. testDisabled[15] = true; os = System.getProperty("os.name", "OS"); if (os.equals("Mac OS X")) { os = "MacOSX"; } else if (os.startsWith("Windows")) { os = "Windows"; } jdk = System.getProperty("java.version", "0.0"); int dot; if ((dot = jdk.indexOf('.')) > 0) { if ((dot = jdk.indexOf('.', dot + 1)) > 0) { jdk = jdk.substring(0, dot); } } jdk = "JDK-" + jdk; testOutDir = testDir + os + "/" + jdk + "/"; } | 57341 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57341/e750b80bcd4635be319fb2bc789625ce4bd59d86/TestSuite.java/clean/freehep-graphicsio-tests/src/main/java/org/freehep/graphicsio/test/TestSuite.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
7766,
13587,
1435,
288,
202,
202,
9565,
2932,
17558,
4294,
7766,
348,
9519,
8863,
9506,
202,
11962,
273,
394,
16381,
5621,
202,
202,
11962,
18,
458,
2932,
71,
23336,
3113,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
7766,
13587,
1435,
288,
202,
202,
9565,
2932,
17558,
4294,
7766,
348,
9519,
8863,
9506,
202,
11962,
273,
394,
16381,
5621,
202,
202,
11962,
18,
458,
2932,
71,
23336,
3113,
394,
... | |
OldLogFile olf = new OldLogFile(currentFilename, startTime, thisTime, length); | OldLogFile olf = new OldLogFile(currentFilename, startTime, lastTime, length); lastTime = thisTime; | public void run() { File currentFilename = null; Object o = null; long thisTime = System.currentTimeMillis(); long startTime = -1; long nextHour = -1; GregorianCalendar gc = null; String filename = null; if (baseFilename != null) { latestFilename = new File(baseFilename+"-latest.log"); previousFilename = new File(baseFilename+"-previous.log"); findOldLogFiles(); gc = new GregorianCalendar(); switch (INTERVAL) { case Calendar.YEAR : gc.set(Calendar.MONTH, 0); case Calendar.MONTH : gc.set(Calendar.DAY_OF_MONTH, 0); case Calendar.WEEK_OF_YEAR : if (INTERVAL == Calendar.WEEK_OF_YEAR) gc.set(Calendar.DAY_OF_WEEK, 0); case Calendar.DAY_OF_MONTH : gc.set(Calendar.HOUR, 0); case Calendar.HOUR : gc.set(Calendar.MINUTE, 0); case Calendar.MINUTE : gc.set(Calendar.SECOND, 0); gc.set(Calendar.MILLISECOND, 0); } if(INTERVAL_MULTIPLIER > 1) { int x = gc.get(INTERVAL); gc.set(INTERVAL, (x / INTERVAL_MULTIPLIER) * INTERVAL_MULTIPLIER); } filename = getHourLogName(gc, true); currentFilename = new File(filename); logStream = openNewLogFile(currentFilename, true); if(latestFilename != null) { altLogStream = openNewLogFile(latestFilename, false); } System.err.println("Created log files"); startTime = gc.getTimeInMillis(); gc.add(INTERVAL, INTERVAL_MULTIPLIER); nextHour = gc.getTimeInMillis(); } while (true) { try { thisTime = System.currentTimeMillis(); if (baseFilename != null) { if (thisTime > nextHour) { // Switch logs try { logStream.flush(); if(altLogStream != null) altLogStream.flush(); } catch (IOException e) { System.err.println( "Flushing on change caught " + e); } String oldFilename = filename; long length = currentFilename.length(); OldLogFile olf = new OldLogFile(currentFilename, startTime, thisTime, length); synchronized(logFiles) { logFiles.addLast(olf); } oldLogFilesDiskSpaceUsage += length; trimOldLogFiles(); try { logStream.close(); } catch (IOException e) { System.err.println( "Closing on change caught " + e); } // Rotate primary log stream filename = getHourLogName(gc, true); logStream = openNewLogFile(new File(filename), true); if(latestFilename != null) { try { altLogStream.close(); } catch (IOException e) { System.err.println( "Closing alt on change caught " + e); } if(previousFilename != null) { previousFilename.delete(); latestFilename.renameTo(previousFilename); latestFilename.delete(); } else { latestFilename.delete(); } altLogStream = openNewLogFile(latestFilename, false); } System.err.println("Rotated log files: "+filename); //System.err.println("Almost rotated"); gc.add(INTERVAL, INTERVAL_MULTIPLIER); nextHour = gc.getTimeInMillis(); //System.err.println("Rotated"); } } if(list.size() == 0) { myWrite(logStream, null); if(altLogStream != null) myWrite(altLogStream, null); } synchronized (list) { while (list.size() == 0) { if (closed) { return; } try { list.wait(500); } catch (InterruptedException e) { // Ignored. } } o = list.removeFirst(); listBytes -= (((byte[]) o).length + 16); } myWrite(logStream, ((byte[]) o)); if(altLogStream != null) myWrite(altLogStream, (byte[]) o); } catch (OutOfMemoryError e) { // FIXME //freenet.node.Main.dumpInterestingObjects(); } catch (Throwable t) { System.err.println("FileLoggerHook log writer caught " + t); t.printStackTrace(System.err); } } } | 50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/2fff9afbc873d913def2ffba93ff754561699c64/FileLoggerHook.java/buggy/src/freenet/support/FileLoggerHook.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
1086,
1435,
288,
1082,
202,
812,
783,
5359,
273,
446,
31,
1082,
202,
921,
320,
273,
446,
31,
1082,
202,
5748,
333,
950,
273,
2332,
18,
2972,
28512,
5621,
1082,
202,
5748... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
1086,
1435,
288,
1082,
202,
812,
783,
5359,
273,
446,
31,
1082,
202,
921,
320,
273,
446,
31,
1082,
202,
5748,
333,
950,
273,
2332,
18,
2972,
28512,
5621,
1082,
202,
5748... |
cloneCount--; return; | return destroyClone(null,0); | public synchronized void destroyClone() { cloneCount--; return; } | 9947 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9947/e0e56ec15f3a68cf477652f4b04c182908443b30/Connection.java/clean/com/novell/ldap/client/Connection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
5546,
10930,
1435,
565,
288,
3639,
3236,
1380,
413,
31,
3639,
327,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
5546,
10930,
1435,
565,
288,
3639,
3236,
1380,
413,
31,
3639,
327,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
public org.quickfix.field.LegLastPx getLegLastPx() throws FieldNotFound { org.quickfix.field.LegLastPx value = new org.quickfix.field.LegLastPx(); | public quickfix.field.LegLastPx getLegLastPx() throws FieldNotFound { quickfix.field.LegLastPx value = new quickfix.field.LegLastPx(); | public org.quickfix.field.LegLastPx getLegLastPx() throws FieldNotFound { org.quickfix.field.LegLastPx value = new org.quickfix.field.LegLastPx(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/TradeCaptureReport.java/buggy/src/java/src/quickfix/fix44/TradeCaptureReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
3024,
21776,
336,
8329,
3024,
21776,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
3024,
21776,
460,
273,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
3024,
21776,
336,
8329,
3024,
21776,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
3024,
21776,
460,
273,
394... |
public Dimension getDevice( ) { | public Dimension getDevice() { | public Dimension getDevice( ) { return device; } | 57341 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57341/de061d5977b00047b242b52aea5bc47538b063c5/EMFHeader.java/buggy/freehep-graphicsio-emf/src/main/java/org/freehep/graphicsio/emf/EMFHeader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
13037,
19512,
1435,
288,
3639,
327,
2346,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
13037,
19512,
1435,
288,
3639,
327,
2346,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
" [server port] [bypass] [test cipher] [server host] "; | " [server host] [server port] [bypass] [test cipher] "; | public static void main(String[] args) { String certnick = "JSSCATestCert"; int testCipher = 0; String testhost = "localhost"; int testport = 29753; String certDbPath = null; String passwdFile = "passwords"; boolean bypass = false; String usage = "USAGE:\n" + "java org.mozilla.jss.tests.JSS_SSLClient" + " <cert db path> <password file>\n" + " [server port] [bypass] [test cipher] [server host] "; try { if ( ((String)args[0]).toLowerCase().equals("-h") || args.length < 2) { System.out.println(usage); System.exit(1); } if ( args.length >= 2 ) { certDbPath = (String)args[0]; passwdFile = (String)args[1]; } if ( certDbPath != null) setCertDbPath(certDbPath); if ( args.length >= 3) { testport = new Integer(args[2]).intValue(); System.out.println("using port: " + testport); } if ((args.length >= 4) && args[3].equalsIgnoreCase("bypass")== true) { bypass = true; } if ( args.length >= 5 ) { testCipher = new Integer(args[4]).intValue(); System.out.println("testCipher " + testCipher); } if ( args.length == 6 ) { testhost = (String)args[5]; System.out.println("testhost" + testhost); } Thread.sleep(5000); } catch (Exception e) { System.out.println("Exception caught " + e.toString()); e.printStackTrace(); } JSS_SSLClient jssTest = new JSS_SSLClient(); try { if ( !testhost.equals("localhost") ) jssTest.setHostName(testhost); if ( testport != 29753 ) jssTest.setPort(testport); jssTest.setBypass(bypass); jssTest.setTestCertCallback(true); jssTest.setClientCertNick(certnick); if ( passwdFile != null ) jssTest.setPasswordFile(passwdFile); if ( testCipher != 0 ) { try { jssTest.setCipher(testCipher); jssTest.setEOF(new Integer(testCipher).toString()); jssTest.doIt(); while (!jssTest.isHandshakeCompleted()) { // Put the main thread to sleep. In case we do not // get any response within 10 sec, then we shutdown. try { Thread.currentThread().sleep(1000); } catch (InterruptedException e) { System.out.println("Thread Interrupted ...\n"); } } jssTest.clearHandshakeCompleted(); } catch (Exception ex) { System.out.println("Exception caught " + ex.getMessage()); ex.printStackTrace(); System.exit(1); } // Set EOF to null to trigger server socket close jssTest.setCipher(testCipher); jssTest.setEOF("null"); jssTest.doIt(); while (!jssTest.isHandshakeCompleted()) { // Put the main thread to sleep. In case we do not // get any response within 10 sec, then we shutdown. try { Thread.currentThread().sleep(1000); } catch (InterruptedException e) { System.out.println("Thread Interrupted ...\n"); } } jssTest.clearHandshakeCompleted(); } else { for ( int i=0; i<Constants.jssCipherSuites.length; i++ ) { try { jssTest.setCipher(Constants.jssCipherSuites[i]); jssTest.setEOF(new Integer( Constants.jssCipherSuites[i]).toString()); jssTest.doIt(); while (!jssTest.isHandshakeCompleted()) { // Put the main thread to sleep. In case we do not // get any response within 10 sec, then we shutdown. try { Thread.currentThread().sleep(1000); } catch (InterruptedException e) { System.out.println("Thread Interrupted ...\n"); } } jssTest.clearHandshakeCompleted(); } catch (Exception ex) { } } // Set EOF to null to trigger server socket close jssTest.setCipher(1); jssTest.setEOF("null"); jssTest.doIt(); while (!jssTest.isHandshakeCompleted()) { //Do nothing } jssTest.clearHandshakeCompleted(); } } catch (Exception ex) { System.out.println(ex.getMessage()); ex.printStackTrace(); System.exit(1); } } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/509a25cea2e0a8b08b0acb656da604fd0b0d8181/JSS_SSLClient.java/buggy/security/jss/org/mozilla/jss/tests/JSS_SSLClient.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
7734,
514,
225,
3320,
17091,
282,
273,
315,
46,
1260,
14130,
395,
5461,
14432,
3639,
509,
377,
1842,
13896,
273,
374,
31,
3639,
514,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
7734,
514,
225,
3320,
17091,
282,
273,
315,
46,
1260,
14130,
395,
5461,
14432,
3639,
509,
377,
1842,
13896,
273,
374,
31,
3639,
514,
2... |
public void testGranularUndo() throws BadLocationException { DefinitionsPane definitions = _frame.getCurrentDefPane(); OpenDefinitionsDocument doc = definitions.getOpenDefDocument();// doc.addUndoableEditListener(doc.getUndoManager()); // 1 assertEquals("Should start out empty.", "", doc.getText(0, doc.getLength())); // Type in consecutive characters and see if they are all undone at once. // Type 'a' definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_PRESSED, (new Date()).getTime(), 0, KeyEvent.VK_A, KeyEvent.CHAR_UNDEFINED)); definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_TYPED, (new Date()).getTime(), 0, KeyEvent.VK_UNDEFINED, 'a')); definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_RELEASED, (new Date()).getTime(), 0, KeyEvent.VK_A, KeyEvent.CHAR_UNDEFINED)); definitions.setCaretPosition(doc.getLength()); // Type '!' definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_PRESSED, (new Date()).getTime(), 0, KeyEvent.VK_EXCLAMATION_MARK, KeyEvent.CHAR_UNDEFINED)); definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_TYPED, (new Date()).getTime(), 0, KeyEvent.VK_UNDEFINED, '!')); definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_RELEASED, (new Date()).getTime(), 0, KeyEvent.VK_EXCLAMATION_MARK, KeyEvent.CHAR_UNDEFINED)); definitions.setCaretPosition(doc.getLength()); // Type 'B' definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_PRESSED, (new Date()).getTime(), InputEvent.SHIFT_MASK, KeyEvent.VK_B, KeyEvent.CHAR_UNDEFINED)); definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_TYPED, (new Date()).getTime(), 0, KeyEvent.VK_UNDEFINED, 'B')); definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_RELEASED, (new Date()).getTime(), InputEvent.SHIFT_MASK, KeyEvent.VK_B, KeyEvent.CHAR_UNDEFINED)); definitions.setCaretPosition(doc.getLength()); // Type '9' definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_PRESSED, (new Date()).getTime(), 0, KeyEvent.VK_9, KeyEvent.CHAR_UNDEFINED)); definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_TYPED, (new Date()).getTime(), 0, KeyEvent.VK_UNDEFINED, '9')); definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_RELEASED, (new Date()).getTime(), 0, KeyEvent.VK_9, KeyEvent.CHAR_UNDEFINED)); definitions.setCaretPosition(doc.getLength()); assertEquals("The text should have been inserted", "a!B9", doc.getText(0, doc.getLength())); // Call the undoAction in MainFrame through the KeyBindingManager. final KeyStroke ks = DrJava.getConfig().getSetting(OptionConstants.KEY_UNDO); final Action a = KeyBindingManager.Singleton.get(ks); final KeyEvent e = new KeyEvent(definitions, KeyEvent.KEY_PRESSED, 0, ks.getModifiers(), ks.getKeyCode(), KeyEvent.CHAR_UNDEFINED); definitions.processKeyEvent(e);// ks.getKeyChar()); // Performs the action a// SwingUtilities.notifyAction(a, ks, e, e.getSource(), e.getModifiers());// doc.getUndoManager().undo(); assertEquals("Should have undone correctly.", "", doc.getText(0, doc.getLength())); // 2 /* Test bug #905405 Undo Alt+Anything Causes Exception */ // Type 'Alt-B' definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_PRESSED, (new Date()).getTime(), InputEvent.ALT_MASK, KeyEvent.VK_Q, KeyEvent.CHAR_UNDEFINED)); definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_TYPED, (new Date()).getTime(), InputEvent.ALT_MASK, KeyEvent.VK_UNDEFINED, 'Q')); definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_RELEASED, (new Date()).getTime(), InputEvent.ALT_MASK, KeyEvent.VK_Q, KeyEvent.CHAR_UNDEFINED)); /* * If the bug is not fixed in DefinitionsPane.processKeyEvent, this test * will not fail because the exception is thrown in another thread. * However, the stack trace will get printed onto the console. I don't * know how to fix this problem in case someone unfixes the bug. */ SwingUtilities.notifyAction(a, ks, e, e.getSource(), e.getModifiers());// definitions.setCaretPosition(doc.getLength()); // 2 /* This part doesn't work right now because by just calling processKeyEvent we * have to manually move the caret, and the UndoWithPosition is off by one. This * bites us since when the backspace is done, the backspace undo position is * still at position 1 which doesn't exist in the document anymore. * // Test undoing backspace. definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_PRESSED, (new Date()).getTime(), 0, KeyEvent.VK_UNDEFINED, KeyEvent.CHAR_UNDEFINED)); definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_TYPED, (new Date()).getTime(), 0, KeyEvent.VK_UNDEFINED, 'a')); definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_RELEASED, (new Date()).getTime(), 0, KeyEvent.VK_UNDEFINED, KeyEvent.CHAR_UNDEFINED)); definitions.setCaretPosition(doc.getLength()); assertEquals("The text should have been inserted", "a", doc.getText(0, doc.getLength())); definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_PRESSED, (new Date()).getTime(), 0, KeyEvent.VK_BACK_SPACE, KeyEvent.CHAR_UNDEFINED)); definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_TYPED, (new Date()).getTime(), 0, KeyEvent.VK_UNDEFINED, '\010')); definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_RELEASED, (new Date()).getTime(), 0, KeyEvent.VK_BACK_SPACE, KeyEvent.CHAR_UNDEFINED)); System.out.println(definitions.getCaretPosition()); definitions.setCaretPosition(doc.getLength()); assertEquals("The text should have been deleted", "", doc.getText(0, doc.getLength())); // Call the undoAction in MainFrame through the KeyBindingManager.// KeyStroke ks = DrJava.getConfig().getSetting(OptionConstants.KEY_UNDO);// Action a = KeyBindingManager.Singleton.get(ks);// KeyEvent e = new KeyEvent(definitions,// KeyEvent.KEY_PRESSED,// 0,// ks.getModifiers(),// ks.getKeyCode(),// ks.getKeyChar()); // Performs the action a definitions.processKeyEvent(new KeyEvent(definitions, KeyEvent.KEY_PRESSED, (new Date()).getTime(), ks.getModifiers(), ks.getKeyCode(), KeyEvent.CHAR_UNDEFINED));// doc.getUndoManager().undo(); assertEquals("Should have undone correctly.", "a", doc.getText(0, doc.getLength()));*/ } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/b5c763bf27a5267e7ff6eb7560dbde820d19b063/DefinitionsPaneTest.java/buggy/drjava/src/edu/rice/cs/drjava/ui/DefinitionsPaneTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
43,
2450,
2490,
31224,
1435,
1216,
6107,
2735,
503,
288,
565,
10849,
87,
8485,
6377,
273,
389,
3789,
18,
588,
3935,
3262,
8485,
5621,
565,
3502,
7130,
2519,
997,
273,
637... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
43,
2450,
2490,
31224,
1435,
1216,
6107,
2735,
503,
288,
565,
10849,
87,
8485,
6377,
273,
389,
3789,
18,
588,
3935,
3262,
8485,
5621,
565,
3502,
7130,
2519,
997,
273,
637... | ||
public Verb(String v) { | protected Verb(String v) { | public Verb(String v) { if (v == null) throw new IllegalArgumentException(); name = v.intern(); } | 10687 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10687/ded7e47e2caf0c0fb711c265e211997bacf9047e/Verb.java/buggy/planning/src/org/cougaar/planning/ldm/plan/Verb.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
26524,
12,
780,
331,
13,
288,
565,
309,
261,
90,
422,
446,
13,
604,
394,
2754,
5621,
565,
508,
273,
331,
18,
267,
798,
5621,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
26524,
12,
780,
331,
13,
288,
565,
309,
261,
90,
422,
446,
13,
604,
394,
2754,
5621,
565,
508,
273,
331,
18,
267,
798,
5621,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
public SVGOMTextElement(String prefix, AbstractDocument owner) { super(prefix, owner); | protected SVGOMTextElement() { | public SVGOMTextElement(String prefix, AbstractDocument owner) { super(prefix, owner); } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/6cd7a6a45cf75920b5149201c434a76d795b3b89/SVGOMTextElement.java/buggy/sources/org/apache/batik/dom/svg/SVGOMTextElement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
11281,
1872,
1528,
1046,
12,
780,
1633,
16,
4115,
2519,
3410,
13,
288,
3639,
2240,
12,
3239,
16,
3410,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
11281,
1872,
1528,
1046,
12,
780,
1633,
16,
4115,
2519,
3410,
13,
288,
3639,
2240,
12,
3239,
16,
3410,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
if (e.doit) item.dispose(); | if (e.doit) { item.dispose(); CTabItem nextItem = getItem(new Point(event.x, event.y)); if (nextItem != null) { if (nextItem.closeRect.contains(event.x, event.y)) { if (nextItem.closeImageState != SELECTED && nextItem.closeImageState != HOT) { nextItem.closeImageState = HOT; redraw(nextItem.closeRect.x, nextItem.closeRect.y, nextItem.closeRect.width, nextItem.closeRect.height, false); } } else { if (nextItem.closeImageState != NORMAL) { nextItem.closeImageState = NORMAL; redraw(nextItem.closeRect.x, nextItem.closeRect.y, nextItem.closeRect.width, nextItem.closeRect.height, false); } } } } | void onMouse(Event event) { int x = event.x, y = event.y; switch (event.type) { case SWT.MouseExit: { if (minImageState != NORMAL) { minImageState = NORMAL; redraw(minRect.x, minRect.y, minRect.width, minRect.height, false); } if (maxImageState != NORMAL) { maxImageState = NORMAL; redraw(maxRect.x, maxRect.y, maxRect.width, maxRect.height, false); } if (chevronImageState != NORMAL) { chevronImageState = NORMAL; redraw(chevronRect.x, chevronRect.y, chevronRect.width, chevronRect.height, false); } for (int i=0; i<items.length; i++) { CTabItem item = items[i]; if (i != selectedIndex && item.closeImageState != NONE) { item.closeImageState = NONE; redraw(item.closeRect.x, item.closeRect.y, item.closeRect.width, item.closeRect.height, false); } if (i == selectedIndex && item.closeImageState != NORMAL) { item.closeImageState = NORMAL; redraw(item.closeRect.x, item.closeRect.y, item.closeRect.width, item.closeRect.height, false); } } break; } case SWT.MouseDown: { if (minRect.contains(x, y)) { if (event.button != 1) return; minImageState = SELECTED; redraw(minRect.x, minRect.y, minRect.width, minRect.height, false); update(); return; } if (maxRect.contains(x, y)) { if (event.button != 1) return; maxImageState = SELECTED; redraw(maxRect.x, maxRect.y, maxRect.width, maxRect.height, false); update(); return; } if (chevronRect.contains(x, y)) { if (event.button != 1) return; if (chevronImageState != HOT) { chevronImageState = HOT; } else { chevronImageState = SELECTED; } redraw(chevronRect.x, chevronRect.y, chevronRect.width, chevronRect.height, false); update(); return; } CTabItem item = null; if (single) { if (selectedIndex != -1) { Rectangle bounds = items[selectedIndex].getBounds(); if (bounds.contains(x, y)){ item = items[selectedIndex]; } } } else { for (int i=0; i<items.length; i++) { Rectangle bounds = items[i].getBounds(); if (bounds.contains(x, y)){ item = items[i]; } } } if (item != null) { if (item.closeRect.contains(x,y)){ if (event.button != 1) return; item.closeImageState = SELECTED; redraw(item.closeRect.x, item.closeRect.y, item.closeRect.width, item.closeRect.height, false); update(); return; } int index = indexOf(item); if (item.isShowing()){ setSelection(index, true); } return; } break; } case SWT.MouseMove: { boolean close = false, minimize = false, maximize = false, chevron = false; if (minRect.contains(x, y)) { minimize = true; if (minImageState != SELECTED && minImageState != HOT) { minImageState = HOT; redraw(minRect.x, minRect.y, minRect.width, minRect.height, false); } } if (maxRect.contains(x, y)) { maximize = true; if (maxImageState != SELECTED && maxImageState != HOT) { maxImageState = HOT; redraw(maxRect.x, maxRect.y, maxRect.width, maxRect.height, false); } } if (chevronRect.contains(x, y)) { chevron = true; if (chevronImageState != SELECTED && chevronImageState != HOT) { chevronImageState = HOT; redraw(chevronRect.x, chevronRect.y, chevronRect.width, chevronRect.height, false); } } if (minImageState != NORMAL && !minimize) { minImageState = NORMAL; redraw(minRect.x, minRect.y, minRect.width, minRect.height, false); } if (maxImageState != NORMAL && !maximize) { maxImageState = NORMAL; redraw(maxRect.x, maxRect.y, maxRect.width, maxRect.height, false); } if (chevronImageState != NORMAL && !chevron) { chevronImageState = NORMAL; redraw(chevronRect.x, chevronRect.y, chevronRect.width, chevronRect.height, false); } for (int i=0; i<items.length; i++) { CTabItem item = items[i]; close = false; if (item.getBounds().contains(x, y)) { close = true; if (item.closeRect.contains(x, y)) { if (item.closeImageState != SELECTED && item.closeImageState != HOT) { item.closeImageState = HOT; redraw(item.closeRect.x, item.closeRect.y, item.closeRect.width, item.closeRect.height, false); } } else { if (item.closeImageState != NORMAL) { item.closeImageState = NORMAL; redraw(item.closeRect.x, item.closeRect.y, item.closeRect.width, item.closeRect.height, false); } } } if (i != selectedIndex && item.closeImageState != NONE && !close) { item.closeImageState = NONE; redraw(item.closeRect.x, item.closeRect.y, item.closeRect.width, item.closeRect.height, false); } if (i == selectedIndex && item.closeImageState != NORMAL && !close) { item.closeImageState = NORMAL; redraw(item.closeRect.x, item.closeRect.y, item.closeRect.width, item.closeRect.height, false); } } break; } case SWT.MouseUp: { if (event.button != 1) return; if (chevronRect.contains(x, y)) { boolean selected = chevronImageState == SELECTED; if (!selected) return; CTabFolderEvent e = new CTabFolderEvent(this); e.widget = this; e.time = event.time; e.x = chevronRect.x; e.y = chevronRect.y; e.width = chevronRect.width; e.height = chevronRect.height; e.doit = true; for (int i = 0; i < folderListeners.length; i++) { folderListeners[i].showList(e); } if (e.doit && !isDisposed()) { showList(chevronRect); } Display display = getDisplay(); Point cursorLocation = display.getCursorLocation(); cursorLocation = display.map(null, this, cursorLocation); chevronImageState = chevronRect.contains(cursorLocation) ? HOT : NORMAL; redraw(chevronRect.x, chevronRect.y, chevronRect.width, chevronRect.height, false); return; } if (minRect.contains(x, y)) { boolean selected = minImageState == SELECTED; minImageState = HOT; redraw(minRect.x, minRect.y, minRect.width, minRect.height, false); if (!selected) return; CTabFolderEvent e = new CTabFolderEvent(this); e.widget = this; e.time = event.time; for (int i = 0; i < folderListeners.length; i++) { if (minimized) { folderListeners[i].restore(e); } else { folderListeners[i].minimize(e); } } return; } if (maxRect.contains(x, y)) { boolean selected = maxImageState == SELECTED; maxImageState = HOT; redraw(maxRect.x, maxRect.y, maxRect.width, maxRect.height, false); if (!selected) return; CTabFolderEvent e = new CTabFolderEvent(this); e.widget = this; e.time = event.time; for (int i = 0; i < folderListeners.length; i++) { if (maximized) { folderListeners[i].restore(e); } else { folderListeners[i].maximize(e); } } return; } CTabItem item = null; if (single) { if (selectedIndex != -1) { Rectangle bounds = items[selectedIndex].getBounds(); if (bounds.contains(x, y)){ item = items[selectedIndex]; } } } else { for (int i=0; i<items.length; i++) { Rectangle bounds = items[i].getBounds(); if (bounds.contains(x, y)){ item = items[i]; } } } if (item != null) { if (item.closeRect.contains(x,y)) { boolean selected = item.closeImageState == SELECTED; item.closeImageState = HOT; redraw(item.closeRect.x, item.closeRect.y, item.closeRect.width, item.closeRect.height, false); if (!selected) return; CTabFolderEvent e = new CTabFolderEvent(this); e.widget = this; e.time = event.time; e.item = item; e.doit = true; for (int j = 0; j < folderListeners.length; j++) { CTabFolder2Listener listener = folderListeners[j]; listener.close(e); } for (int j = 0; j < tabListeners.length; j++) { CTabFolderListener listener = tabListeners[j]; listener.itemClosed(e); } if (e.doit) item.dispose(); return; } } } }} | 12413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12413/9a842e2cbce8c649ced74690f47b7d01119e6b44/CTabFolder.java/clean/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
918,
21000,
12,
1133,
871,
13,
288,
202,
474,
619,
273,
871,
18,
92,
16,
677,
273,
871,
18,
93,
31,
202,
9610,
261,
2575,
18,
723,
13,
288,
202,
202,
3593,
348,
8588,
18,
9186,
6767,
30,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
918,
21000,
12,
1133,
871,
13,
288,
202,
474,
619,
273,
871,
18,
92,
16,
677,
273,
871,
18,
93,
31,
202,
9610,
261,
2575,
18,
723,
13,
288,
202,
202,
3593,
348,
8588,
18,
9186,
6767,
30,... |
LOG.assertTrue(vFile.isValid()); | LOG.assertTrue(vFile.isValid(), vFile.getName()); | public PsiDirectory findDirectory(VirtualFile vFile) { LOG.assertTrue(myInitialized, "Access to psi files should be performed only after startup activity"); LOG.assertTrue(!myDisposed); ApplicationManager.getApplication().assertReadAccessAllowed(); LOG.assertTrue(vFile.isValid()); if (!vFile.isDirectory()) return null; dispatchPendingEvents(); synchronized (PsiLock.LOCK) { PsiDirectory psiDir = myVFileToPsiDirMap.get(vFile); if (psiDir != null) return psiDir; if (myProjectRootManager.getFileIndex().isIgnored(vFile)) return null; VirtualFile parent = vFile.getParent(); if (parent != null) { //? findDirectory(parent);// need to cache parent directory - used for firing events } psiDir = new PsiDirectoryImpl(myManager, vFile); myVFileToPsiDirMap.put(vFile, psiDir); return psiDir; } } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/a49b5318bd72fbf3e3be8631872394dfb312363e/FileManagerImpl.java/buggy/source/com/intellij/psi/impl/file/impl/FileManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
453,
7722,
2853,
1104,
2853,
12,
6466,
812,
331,
812,
13,
288,
565,
2018,
18,
11231,
5510,
12,
4811,
11459,
16,
315,
1862,
358,
23921,
1390,
1410,
506,
9591,
1338,
1839,
11850,
5728... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
453,
7722,
2853,
1104,
2853,
12,
6466,
812,
331,
812,
13,
288,
565,
2018,
18,
11231,
5510,
12,
4811,
11459,
16,
315,
1862,
358,
23921,
1390,
1410,
506,
9591,
1338,
1839,
11850,
5728... |
vr.order = order; vr.filter = filter; vr.maxSize = maxSize; vr.constraints = constraints; | Relation getVirtualPropertyRelation() { if (!virtual) { throw new RuntimeException("getVirtualPropertyRelation called on non-virtual relation"); } Relation vr = new Relation(this); vr.groupby = groupby; vr.groupbyOrder = groupbyOrder; vr.groupbyPrototype = groupbyPrototype; vr.order = order; vr.filter = filter; vr.maxSize = maxSize; vr.constraints = constraints; return vr; } | 3798 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3798/507949310c616f1c639b071ea7f27f7c17ec21ff/Relation.java/clean/src/helma/objectmodel/db/Relation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
7317,
336,
6466,
1396,
3963,
1435,
288,
3639,
309,
16051,
12384,
13,
288,
5411,
604,
394,
3235,
2932,
588,
6466,
1396,
3963,
2566,
603,
1661,
17,
12384,
2533,
8863,
3639,
289,
3639,
7317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7317,
336,
6466,
1396,
3963,
1435,
288,
3639,
309,
16051,
12384,
13,
288,
5411,
604,
394,
3235,
2932,
588,
6466,
1396,
3963,
2566,
603,
1661,
17,
12384,
2533,
8863,
3639,
289,
3639,
7317,
... | |
if (requiredTasks[i].getState() != COMPLETED) { | if (requiredTasks[i].getState() != COMPLETED || requiredTasks[i].getState() != SKIPPED ) { | public boolean requiredTasksCompleted() { boolean startable = true; ICompositeCheatSheetTask[] requiredTasks = getRequiredTasks(); for (int i = 0; i < requiredTasks.length; i++) { if (requiredTasks[i].getState() != COMPLETED) { startable = false; } } return startable; } | 13822 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13822/2d1768d57de2eed5c4c22117872dd05b73c41b6d/AbstractTask.java/clean/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/model/AbstractTask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1931,
6685,
9556,
1435,
288,
202,
202,
6494,
787,
429,
273,
638,
31,
202,
202,
45,
9400,
39,
580,
270,
8229,
2174,
8526,
1931,
6685,
273,
19881,
6685,
5621,
202,
202,
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,
1250,
1931,
6685,
9556,
1435,
288,
202,
202,
6494,
787,
429,
273,
638,
31,
202,
202,
45,
9400,
39,
580,
270,
8229,
2174,
8526,
1931,
6685,
273,
19881,
6685,
5621,
202,
202,
18... |
accessDetail( listing, outputEmitter, rowData ); | accessDetail( listing, outputEmitter, rsIterator ); | protected void accessQuery( ReportItemDesign design, IContentEmitter emitter ) { ListingDesign listing = (ListingDesign) design; rsetCursor = -1; outputEmitter = emitter; int groupCount = listing.getGroupCount( ); int NONE_GROUP = groupCount + 1; int groupIndex; int pageBreakInterval = listing.getPageBreakInterval( ); if ( rset == null || rsetEmpty == true ) { // empty rset startTOCEntry( null ); accessHeader( listing, outputEmitter, null ); finishTOCEntry( ); startTOCEntry( null ); accessFooter( listing, outputEmitter, null ); finishTOCEntry( ); return; } IResultIterator rsIterator = ( (DteResultSet) rset ) .getResultIterator( ); IBaseQueryDefinition query = listing.getQuery( ); Collection rowExpressions = ( query == null ? null : query .getRowExpressions( ) ); Collection beforeExpressions = ( query == null ? null : query .getBeforeExpressions( ) ); Collection afterExpressions = ( query == null ? null : query .getAfterExpressions( ) ); IRowData rowData = new RowData( rsIterator, rowExpressions ); IRowData headerData = new RowData( rsIterator, beforeExpressions ); IRowData footerData = new RowData( rsIterator, afterExpressions ); startTOCEntry( null ); accessHeader( listing, outputEmitter, headerData ); finishTOCEntry( ); if ( groupCount == 0 ) { // no group tables do { rsetCursor++; startTOCEntry( null ); accessDetail( listing, outputEmitter, rowData ); finishTOCEntry( ); if ( pageBreakInterval > 0 ) { if ( ( rsetCursor + 1 ) % pageBreakInterval == 0 ) { needPageBreak = true; } } if ( rset.getEndingGroupLevel( ) == 0 ) { // we never add page break before the table header and // the last row needPageBreak = false; startTOCEntry( null ); accessFooter( listing, outputEmitter, footerData ); finishTOCEntry( ); } } while ( rset.next( ) ); return; } // multiple group tables do { rsetCursor++; int startGroup = rset.getStartingGroupLevel( ); if ( startGroup != NONE_GROUP ) { // It start the group startGroup. It also start the // groups from startGroup to groupCount. groupIndex = startGroup - 1; if ( groupIndex < 0 ) { groupIndex = 0; } while ( groupIndex < groupCount ) { startGroupTOCEntry( );// open the group startTOCEntry( null );// open the group header accessGroupHeader( listing, groupIndex, outputEmitter ); finishTOCEntry( );// close the group header groupIndex++; } } startGroupTOCEntry( ); accessDetail( listing, outputEmitter, rowData ); finishGroupTOCEntry( ); int endGroup = rset.getEndingGroupLevel( ); if ( endGroup != NONE_GROUP ) { // the endGroup has terminate, it also termiate the // groups // from endGroup-1 // to groupCount-1. endGroup = endGroup - 1; if ( endGroup < 0 ) { endGroup = 0; } groupIndex = groupCount - 1; while ( groupIndex >= endGroup ) { startTOCEntry( null ); // open the group footer accessGroupFooter( listing, groupIndex, outputEmitter ); finishTOCEntry( ); // close the group footer finishGroupTOCEntry( ); // close the group groupIndex--; } } if ( pageBreakInterval > 0 ) { if ( ( rsetCursor + 1 ) % pageBreakInterval == 0 ) { needPageBreak = true; } } if ( rset.getEndingGroupLevel( ) == 0 ) { // we never add page break before the table header and // the last row needPageBreak = false; startTOCEntry( null ); accessFooter( listing, outputEmitter, footerData ); finishTOCEntry( ); } } while ( rset.next( ) ); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/c332d326b9697aa0e37846b9b0c7fd09f3641e6f/ListingElementExecutor.java/clean/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/executor/ListingElementExecutor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
2006,
1138,
12,
8706,
1180,
15478,
8281,
16,
467,
1350,
13476,
11520,
262,
202,
95,
202,
202,
19081,
15478,
11591,
273,
261,
19081,
15478,
13,
8281,
31,
202,
202,
86,
542,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2006,
1138,
12,
8706,
1180,
15478,
8281,
16,
467,
1350,
13476,
11520,
262,
202,
95,
202,
202,
19081,
15478,
11591,
273,
261,
19081,
15478,
13,
8281,
31,
202,
202,
86,
542,... |
return (Node)u3; } | return (Node) u3; } | public Node getDefnNode() { return (Node)u3; } | 49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/d31a76ee29d5978a9bec41e3ac9134cee024bcab/Node.java/buggy/org/jruby/nodes/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2029,
336,
3262,
82,
907,
1435,
288,
202,
202,
2463,
261,
907,
13,
89,
23,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2029,
336,
3262,
82,
907,
1435,
288,
202,
202,
2463,
261,
907,
13,
89,
23,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
lo -= 1L << 62; | lo &= pow62m1; | public LongLong(long l1, long l2) { assert l1 >= 0L : l1; assert l1 <= 1L << 61 : l1; // l1 = l1H31 * 2^31 + l1L31, 0 <= l1L31 < 2^31 long l1H31 = l1 >> 31; long l1L31 = l1 & pow31m1; boolean minus = false; assert l2 >= -(1L << 61) : l2; assert l2 <= 1L << 61 : l2; if (l2 < 0L) { minus = true; l2 = -l2; } // l2 = l2H31 * 2^31 + l2L31, 0 <= l2L31 < 2^31 long l2H31 = l2 >> 31; long l2L31 = l2 & pow31m1; // l1 * l2 = l1H31*l2H31 * 2^62 + // (l1H31*l2L31+l1L31*l2H31) * 2^31 + // l1L31 * l2L31 // = hi * 2^62 + lo, 0 <= lo < 2^62 long res = l1H31 * l2L31 + l1L31 * l2H31; hi = (res >> 31) + l1H31 * l2H31; lo = ((res & pow31m1) << 31) + l1L31 * l2L31; if (lo >= (1L << 62)) { hi++; lo -= 1L << 62; } if (minus) { hi = - hi - 1L; lo = (- lo) & pow62m1; } } | 46058 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46058/0cc100149c634527b9163a1175ecf327455bb97e/LongLong.java/buggy/amibe/src/org/jcae/mesh/amibe/util/LongLong.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3407,
3708,
12,
5748,
328,
21,
16,
1525,
328,
22,
13,
202,
95,
202,
202,
11231,
328,
21,
1545,
374,
48,
294,
328,
21,
31,
202,
202,
11231,
328,
21,
1648,
404,
48,
2296,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3407,
3708,
12,
5748,
328,
21,
16,
1525,
328,
22,
13,
202,
95,
202,
202,
11231,
328,
21,
1545,
374,
48,
294,
328,
21,
31,
202,
202,
11231,
328,
21,
1648,
404,
48,
2296,
17... |
if (decl.getFlag(Declaration.IS_CONSTANT|Declaration.INDIRECT_BINDING)) | if (decl.getFlag(Declaration.PROCEDURE|Declaration.IS_CONSTANT|Declaration.INDIRECT_BINDING)) | public final static void evalModule (Environment env, CallContext ctx, Compilation comp) throws Throwable { ModuleExp mexp = comp.getModule(); Environment orig_env = Environment.getCurrent(); try { if (env != orig_env) Environment.setCurrent(env); if (! alwaysCompile && ! comp.mustCompile) { // optimization - don't generate unneeded Class. if (debugPrintExpr) { OutPort dout = OutPort.outDefault(); dout.println ("[Evaluating module \""+mexp.getName()+"\":"); mexp.print(dout); dout.println(']'); dout.flush(); } mexp.body.eval (env, ctx); } else { ModuleBody mod; try { Class clas = evalToClass(comp); if (clas == null) return; Object inst = clas.newInstance (); Procedure proc = (Procedure) inst; if (proc.getName() == null) proc.setName (mexp.name); mod = (ModuleBody) inst; // Import declarations defined in module into the Environment. for (Declaration decl = mexp.firstDecl(); decl != null; decl = decl.nextDecl()) { Object dname = decl.getName(); if (decl.isPrivate() || dname == null) continue; Field fld = decl.field; Location loc = new ClassMemberLocation(inst, fld.getDeclaringClass(), fld.getName()); Symbol sym = dname instanceof Symbol ? (Symbol) dname : Symbol.make("", dname.toString().intern()); Object property = comp.getInterpreter() .getEnvPropertyFor(decl); if (decl.getFlag(Declaration.IS_CONSTANT|Declaration.INDIRECT_BINDING)) { Expression dvalue = decl.getValue(); Object value; if (dvalue instanceof QuoteExp && dvalue != QuoteExp.undefined_exp) value = ((QuoteExp) dvalue).getValue(); else value = loc.get(); if (decl.isIndirectBinding()) env.addLocation(sym, property, (Location) value); else env.define(sym, property, value); } else { if (decl.isIndirectBinding()) loc = (Location) loc.get(); // else perhaps use a StaticFieldLocation? FIXME // Perhaps set loc.decl = decl? env.addLocation(sym, property, loc); } } } catch (InstantiationException ex) { throw new RuntimeException("class not instantiable: in lambda eval"); } catch (IllegalAccessException ex) { throw new RuntimeException("class illegal access: in lambda eval"); } mod.run(ctx); } ctx.runUntilDone(); } finally { if (env != orig_env) Environment.setCurrent(orig_env); } } | 41089 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41089/cef811079e04bcce48ca6da80b52f6e939f91657/ModuleExp.java/clean/gnu/expr/ModuleExp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
760,
918,
5302,
3120,
261,
5494,
1550,
16,
3049,
1042,
1103,
16,
22416,
1161,
13,
1216,
4206,
225,
288,
565,
5924,
2966,
312,
2749,
273,
1161,
18,
588,
3120,
5621,
565,
7518,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
760,
918,
5302,
3120,
261,
5494,
1550,
16,
3049,
1042,
1103,
16,
22416,
1161,
13,
1216,
4206,
225,
288,
565,
5924,
2966,
312,
2749,
273,
1161,
18,
588,
3120,
5621,
565,
7518,
... |
Point d = ca.getSize( ); | Point d = this.getSize( ); | private final void showException( GC g2d, Exception ex ) { String sWrappedException = ex.getClass( ).getName( ); Throwable th = ex; while ( ex.getCause( ) != null ) { ex = (Exception) ex.getCause( ); } String sException = ex.getClass( ).getName( ); if ( sWrappedException.equals( sException ) ) { sWrappedException = null; } String sMessage = null; if ( th instanceof BirtException ) { sMessage = ( (BirtException) th ).getLocalizedMessage( ); } else { sMessage = ex.getMessage( ); } if ( sMessage == null ) { sMessage = "<null>";//$NON-NLS-1$ } StackTraceElement[] stea = ex.getStackTrace( ); Point d = ca.getSize( ); Device dv = Display.getCurrent( ); Font fo = new Font( dv, "Courier", SWT.BOLD, 16 );//$NON-NLS-1$ g2d.setFont( fo ); FontMetrics fm = g2d.getFontMetrics( ); g2d.setBackground( dv.getSystemColor( SWT.COLOR_WHITE ) ); g2d.fillRectangle( 20, 20, d.x - 40, d.y - 40 ); g2d.setForeground( dv.getSystemColor( SWT.COLOR_BLACK ) ); g2d.drawRectangle( 20, 20, d.x - 40, d.y - 40 ); g2d.setClipping( 20, 20, d.x - 40, d.y - 40 ); int x = 25, y = 20 + fm.getHeight( ); g2d.drawString( "Exception:", x, y );//$NON-NLS-1$ x += g2d.textExtent( "Exception:" ).x + 5;//$NON-NLS-1$ g2d.setForeground( dv.getSystemColor( SWT.COLOR_RED ) ); g2d.drawString( sException, x, y ); x = 25; y += fm.getHeight( ); if ( sWrappedException != null ) { g2d.setForeground( dv.getSystemColor( SWT.COLOR_BLACK ) ); g2d.drawString( "Wrapped In:", x, y );//$NON-NLS-1$ x += g2d.textExtent( "Wrapped In:" ).x + 5;//$NON-NLS-1$ g2d.setForeground( dv.getSystemColor( SWT.COLOR_RED ) ); g2d.drawString( sWrappedException, x, y ); x = 25; y += fm.getHeight( ); } g2d.setForeground( dv.getSystemColor( SWT.COLOR_BLACK ) ); y += 10; g2d.drawString( "Message:", x, y );//$NON-NLS-1$ x += g2d.textExtent( "Message:" ).x + 5;//$NON-NLS-1$ g2d.setForeground( dv.getSystemColor( SWT.COLOR_BLUE ) ); g2d.drawString( sMessage, x, y ); x = 25; y += fm.getHeight( ); g2d.setForeground( dv.getSystemColor( SWT.COLOR_BLACK ) ); y += 10; g2d.drawString( "Trace:", x, y );//$NON-NLS-1$ x = 40; y += fm.getHeight( ); g2d.setForeground( dv.getSystemColor( SWT.COLOR_DARK_GREEN ) ); for ( int i = 0; i < stea.length; i++ ) { g2d.drawString( stea[i].getClassName( ) + ":"//$NON-NLS-1$ + stea[i].getMethodName( ) + "(...):"//$NON-NLS-1$ + stea[i].getLineNumber( ), x, y ); x = 40; y += fm.getHeight( ); } fo.dispose( ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/ef9ad0cebcee59b4b447430acdbf2355afecf441/JavaScriptViewer.java/buggy/chart/org.eclipse.birt.chart.examples/src/org/eclipse/birt/chart/examples/api/script/JavaScriptViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
727,
918,
2405,
503,
12,
15085,
314,
22,
72,
16,
1185,
431,
262,
202,
95,
202,
202,
780,
272,
17665,
503,
273,
431,
18,
588,
797,
12,
262,
18,
17994,
12,
11272,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
727,
918,
2405,
503,
12,
15085,
314,
22,
72,
16,
1185,
431,
262,
202,
95,
202,
202,
780,
272,
17665,
503,
273,
431,
18,
588,
797,
12,
262,
18,
17994,
12,
11272,
202,
202,
... |
int i; for (i=0; i<_list.size(); i++) { | int i = _list.size()-1; while (i>=0) { | public void addEntry(RosterEntry e) { if (log.isDebugEnabled()) log.debug("Add entry "+e); int i; for (i=0; i<_list.size(); i++) { // compareToIgnoreCase not present in Java 1.1.8 if (e.getId().toUpperCase().compareTo(((RosterEntry)_list.get(i)).getId().toUpperCase()) < 0 ) break; // I can never remember whether I want break or continue here } _list.add(i, e); setDirty(true); firePropertyChange("add", null, e); } | 2652 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2652/3122c50a984a7f80c4f860907cd6f1ca7ef4dec2/Roster.java/clean/jmri/jmrit/roster/Roster.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
1622,
12,
54,
29811,
1622,
425,
13,
288,
3639,
309,
261,
1330,
18,
291,
2829,
1526,
10756,
613,
18,
4148,
2932,
986,
1241,
13773,
73,
1769,
3639,
509,
277,
31,
3639,
364... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
1622,
12,
54,
29811,
1622,
425,
13,
288,
3639,
309,
261,
1330,
18,
291,
2829,
1526,
10756,
613,
18,
4148,
2932,
986,
1241,
13773,
73,
1769,
3639,
509,
277,
31,
3639,
364... |
null, "setName"); | null, "setNameExpr"); | public PropertyDescriptor[] getPropertyDescriptors() { PropertyDescriptor[] result = new PropertyDescriptor[30]; try { result[0] = new PropertyDescriptor("accesskey", ELTextareaTag.class, null, "setAccesskey"); result[1] = new PropertyDescriptor("alt", ELTextareaTag.class, null, "setAlt"); result[2] = new PropertyDescriptor("altKey", ELTextareaTag.class, null, "setAltKey"); result[3] = new PropertyDescriptor("cols", ELTextareaTag.class, null, "setCols"); // This attribute has a non-standard mapping. result[4] = new PropertyDescriptor("disabled", ELTextareaTag.class, null, "setDisabledExpr"); // This attribute has a non-standard mapping. result[5] = new PropertyDescriptor("indexed", ELTextareaTag.class, null, "setIndexedExpr"); result[6] = new PropertyDescriptor("name", ELTextareaTag.class, null, "setName"); result[7] = new PropertyDescriptor("onblur", ELTextareaTag.class, null, "setOnblur"); result[8] = new PropertyDescriptor("onchange", ELTextareaTag.class, null, "setOnchange"); result[9] = new PropertyDescriptor("onclick", ELTextareaTag.class, null, "setOnclick"); result[10] = new PropertyDescriptor("ondblclick", ELTextareaTag.class, null, "setOndblclick"); result[11] = new PropertyDescriptor("onfocus", ELTextareaTag.class, null, "setOnfocus"); result[12] = new PropertyDescriptor("onkeydown", ELTextareaTag.class, null, "setOnkeydown"); result[13] = new PropertyDescriptor("onkeypress", ELTextareaTag.class, null, "setOnkeypress"); result[14] = new PropertyDescriptor("onkeyup", ELTextareaTag.class, null, "setOnkeyup"); result[15] = new PropertyDescriptor("onmousedown", ELTextareaTag.class, null, "setOnmousedown"); result[16] = new PropertyDescriptor("onmousemove", ELTextareaTag.class, null, "setOnmousemove"); result[17] = new PropertyDescriptor("onmouseout", ELTextareaTag.class, null, "setOnmouseout"); result[18] = new PropertyDescriptor("onmouseover", ELTextareaTag.class, null, "setOnmouseover"); result[19] = new PropertyDescriptor("onmouseup", ELTextareaTag.class, null, "setOnmouseup"); result[20] = new PropertyDescriptor("property", ELTextareaTag.class, null, "setProperty"); result[21] = new PropertyDescriptor("readonly", ELTextareaTag.class, null, "setReadonlyExpr"); result[22] = new PropertyDescriptor("rows", ELTextareaTag.class, null, "setRows"); result[23] = new PropertyDescriptor("style", ELTextareaTag.class, null, "setStyle"); result[24] = new PropertyDescriptor("styleClass", ELTextareaTag.class, null, "setStyleClass"); result[25] = new PropertyDescriptor("styleId", ELTextareaTag.class, null, "setStyleId"); result[26] = new PropertyDescriptor("tabindex", ELTextareaTag.class, null, "setTabindex"); result[27] = new PropertyDescriptor("title", ELTextareaTag.class, null, "setTitle"); result[28] = new PropertyDescriptor("titleKey", ELTextareaTag.class, null, "setTitleKey"); result[29] = new PropertyDescriptor("value", ELTextareaTag.class, null, "setValue"); } catch (IntrospectionException ex) { ex.printStackTrace(); } return (result); } | 48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/db064e19656421b94aaf753550935d95f44bd5f9/ELTextareaTagBeanInfo.java/buggy/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELTextareaTagBeanInfo.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,
5082,
15533,
3639,
775,
288,
5411,
563,
63,
20,
65,
273,
394,
26761,
2932,
3860... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5082,
15533,
3639,
775,
288,
5411,
563,
63,
20,
65,
273,
394,
26761,
2932,
3860... |
for (int idx = 0; idx < markerTypes.length; idx++) { IMarkerDelta[] markerDeltas = event.findMarkerDeltas( markerTypes[idx], true); List changes = new ArrayList(markerDeltas.length); | for (int idx = 0; idx < markerTypes.length; idx++) { IMarkerDelta[] markerDeltas = event.findMarkerDeltas( markerTypes[idx], true); List changes = new ArrayList(markerDeltas.length); | public void resourceChanged(IResourceChangeEvent event) { String[] markerTypes = getMarkerTypes(); boolean refreshNeeded = false; for (int idx = 0; idx < markerTypes.length; idx++) { IMarkerDelta[] markerDeltas = event.findMarkerDeltas( markerTypes[idx], true); List changes = new ArrayList(markerDeltas.length); examineDelta(markerDeltas, changes); if (markerDeltas.length != changes.size()) { refreshNeeded = true; } MarkerList changed = currentMarkers.findMarkers(changes); changed.refresh(); change(changed.asList()); } // Refresh everything if markers were added or removed if (refreshNeeded) { markerCountDirty = true; refresh(); } } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/1ceb585b9b16047c6c580984b0c9962c41a22ba6/MarkerView.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1058,
5033,
12,
45,
1420,
20930,
871,
13,
288,
5411,
514,
8526,
5373,
2016,
273,
23232,
264,
2016,
5621,
5411,
1250,
4460,
11449,
273,
629,
31,
5411,
364,
261,
474,
2067,
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,
540,
1071,
918,
1058,
5033,
12,
45,
1420,
20930,
871,
13,
288,
5411,
514,
8526,
5373,
2016,
273,
23232,
264,
2016,
5621,
5411,
1250,
4460,
11449,
273,
629,
31,
5411,
364,
261,
474,
2067,
273,
... |
if (domElement.getXmlTag() != null) { | if (domElement != null && domElement.getXmlTag() != null) { | private static Collection<DomElementProblemDescriptor> getXmlProblems(DomElement domElement) { Collection<DomElementProblemDescriptor> problems = new ArrayList<DomElementProblemDescriptor>(); if (domElement.getXmlTag() != null) { problems.addAll(getResolveProblems(domElement)); } return problems; } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/afa9209242c065ae67bfab5ecc8830a3b68cdd31/DomElementsProblemsHolderImpl.java/clean/source/com/intellij/util/xml/highlighting/DomElementsProblemsHolderImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
2200,
32,
8832,
1046,
13719,
3187,
34,
28504,
626,
19122,
12,
8832,
1046,
31817,
13,
288,
565,
2200,
32,
8832,
1046,
13719,
3187,
34,
9688,
273,
394,
2407,
32,
8832,
1046,
1371... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
2200,
32,
8832,
1046,
13719,
3187,
34,
28504,
626,
19122,
12,
8832,
1046,
31817,
13,
288,
565,
2200,
32,
8832,
1046,
13719,
3187,
34,
9688,
273,
394,
2407,
32,
8832,
1046,
1371... |
public org.quickfix.field.MaturityDay getMaturityDay() throws FieldNotFound { org.quickfix.field.MaturityDay value = new org.quickfix.field.MaturityDay(); | public quickfix.field.MaturityDay getMaturityDay() throws FieldNotFound { quickfix.field.MaturityDay value = new quickfix.field.MaturityDay(); | public org.quickfix.field.MaturityDay getMaturityDay() throws FieldNotFound { org.quickfix.field.MaturityDay value = new org.quickfix.field.MaturityDay(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/NewOrderList.java/clean/src/java/src/quickfix/fix42/NewOrderList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
15947,
2336,
4245,
2108,
270,
2336,
4245,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
15947,
2336,
4245,
460,
273,
394,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
15947,
2336,
4245,
2108,
270,
2336,
4245,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
15947,
2336,
4245,
460,
273,
394,... |
private static String findRoot(Properties preProperties, Properties postProperties) { String root = null; try { if (postProperties != null) root = postProperties.getProperty("python.home"); if (root == null) root = preProperties.getProperty("python.home"); if (root == null) root = preProperties.getProperty("install.root"); String version = preProperties.getProperty("java.version"); if (version == null) version = "???"; String lversion = version.toLowerCase(); if (lversion.startsWith("java")) version = version.substring(4, version.length()); if (lversion.startsWith("jdk") || lversion.startsWith("jre")) { version = version.substring(3, version.length()); } if (version.equals("12")) version = "1.2"; if (version != null) platform = "java"+version; } catch (Exception exc) { return null; } //System.err.println("root: "+root); if (root != null) return root; // If install.root is undefined find jpython.jar in class.path String classpath = preProperties.getProperty("java.class.path"); if (classpath == null) return null; int jpy = classpath.toLowerCase().indexOf("jython.jar"); if (jpy == -1) { return null; } int start = classpath.lastIndexOf(java.io.File.pathSeparator, jpy)+1; return classpath.substring(start, jpy); } | 6527 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6527/635ef1ead7007ebec6d112fec8a8105c30208435/PySystemState.java/clean/src/org/python/core/PySystemState.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
1104,
2375,
12,
2297,
675,
2297,
16,
4766,
282,
6183,
1603,
2297,
13,
565,
288,
3639,
514,
1365,
273,
446,
31,
3639,
775,
288,
5411,
309,
261,
2767,
2297,
480,
446,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
1104,
2375,
12,
2297,
675,
2297,
16,
4766,
282,
6183,
1603,
2297,
13,
565,
288,
3639,
514,
1365,
273,
446,
31,
3639,
775,
288,
5411,
309,
261,
2767,
2297,
480,
446,
13,
... | ||
scanner.resetTo(ini.sourceStart, ini.sourceEnd); try { parse(); } catch (AbortCompilation ex) { lastAct = ERROR_ACTION; } finally { nestedMethod[nestedType]--; | ProcessNonTerminals : do { /* reduce */ consumeRule(act); stateStackTop -= (rhs[act] - 1); act = ntAction(stack[stateStackTop], lhs[act]); } while (act <= NUM_RULES); | public void parse( Initializer ini, TypeDeclaration type, CompilationUnitDeclaration unit) { //only parse the method body of md //fill out method statements //convert bugs into parse error initialize(); goForInitializer(); nestedMethod[nestedType]++; referenceContext = type; compilationUnit = unit; scanner.resetTo(ini.sourceStart, ini.sourceEnd); // just on the beginning { try { parse(); } catch (AbortCompilation ex) { lastAct = ERROR_ACTION; } finally { nestedMethod[nestedType]--; } if (lastAct == ERROR_ACTION) { return; } ini.block = ((Initializer) astStack[astPtr]).block; // mark initializer with local type if one was found during parsing if ((type.bits & AstNode.HasLocalTypeMASK) != 0) { ini.bits |= AstNode.HasLocalTypeMASK; } } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/0ed39879606810ff8db06fed2d2c454db613d59d/Parser.java/buggy/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1109,
12,
202,
14729,
6896,
16,
225,
202,
559,
6094,
618,
16,
225,
202,
19184,
2802,
6094,
2836,
13,
288,
202,
759,
3700,
1109,
326,
707,
1417,
434,
3481,
202,
759,
5935,
596,
707... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
12,
202,
14729,
6896,
16,
225,
202,
559,
6094,
618,
16,
225,
202,
19184,
2802,
6094,
2836,
13,
288,
202,
759,
3700,
1109,
326,
707,
1417,
434,
3481,
202,
759,
5935,
596,
707... |
void clear() { | final void clear() { | void clear() { fullNameToMember.clear(); nameToMember.clear(); } | 13291 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13291/615094576784f8eacf0891411a5b25d98778892b/NameToParents.java/clean/src/org/jedit/ruby/cache/NameToParents.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
727,
918,
2424,
1435,
288,
3639,
12424,
774,
4419,
18,
8507,
5621,
3639,
508,
774,
4419,
18,
8507,
5621,
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,
727,
918,
2424,
1435,
288,
3639,
12424,
774,
4419,
18,
8507,
5621,
3639,
508,
774,
4419,
18,
8507,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
public boolean eIsSet( EStructuralFeature eFeature ) | public boolean eIsSet( int featureID ) | public boolean eIsSet( EStructuralFeature eFeature ) { switch ( eDerivedStructuralFeatureID( eFeature ) ) { case AttributePackage.GRADIENT__TYPE : return isSetType( ); case AttributePackage.GRADIENT__START_COLOR : return startColor != null; case AttributePackage.GRADIENT__END_COLOR : return endColor != null; case AttributePackage.GRADIENT__DIRECTION : return isSetDirection( ); case AttributePackage.GRADIENT__CYCLIC : return isSetCyclic( ); case AttributePackage.GRADIENT__TRANSPARENCY : return isSetTransparency( ); } return eDynamicIsSet( eFeature ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/036e8c78765730b146e5854b9d6c397a296fed86/GradientImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/impl/GradientImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
20372,
12,
512,
14372,
4595,
425,
4595,
262,
202,
95,
202,
202,
9610,
261,
425,
21007,
14372,
4595,
734,
12,
425,
4595,
262,
262,
202,
202,
95,
1082,
202,
3593,
3601,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
20372,
12,
512,
14372,
4595,
425,
4595,
262,
202,
95,
202,
202,
9610,
261,
425,
21007,
14372,
4595,
734,
12,
425,
4595,
262,
262,
202,
202,
95,
1082,
202,
3593,
3601,
22... |
user.reconnectKeyReceived(keybytes.data(), keySecondsToLive); | user.reconnectKeyReceived(keybytes.data(), keySecondsToLive); | private void issueNewKey(SGSUser user) { synchronized(currentKeys){ SGSUUID key = new StatisticalUUID(); BYTEARRAY keybytes = new BYTEARRAY(key.toByteArray()); currentKeys.put(user.getUserID(), keybytes); try { user.reconnectKeyReceived(keybytes.data(), keySecondsToLive); } catch (IOException e) { e.printStackTrace(); } xmitConnectKey(user.getUserID(), keybytes); if (TRACEKEYS){ System.out.println("Generated key "+keybytes.toString()+ " for user "+user.toString()); } } } | 55380 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55380/e047e05d2003e5cda1e707141a6bb130a66b50e0/RouterImpl.java/buggy/src/com/sun/gi/comm/routing/impl/RouterImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
5672,
1908,
653,
12,
55,
16113,
1299,
729,
13,
288,
202,
202,
22043,
12,
2972,
2396,
15329,
1082,
202,
55,
16113,
5562,
498,
273,
394,
8269,
376,
1706,
5562,
5621,
1082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
5672,
1908,
653,
12,
55,
16113,
1299,
729,
13,
288,
202,
202,
22043,
12,
2972,
2396,
15329,
1082,
202,
55,
16113,
5562,
498,
273,
394,
8269,
376,
1706,
5562,
5621,
1082,
... |
private void insertFirstContentTag(ElementSpec[] data) { // FIXME: This method is not complete. It needs to properly recreate the // leaves when the spec's direction is JoinPreviousDirection. ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addRemovedElement(current); edit.addAddedElement(newEl1); if (current.getEndOffset() != newEndOffset) { // This means all the leaves that were there previously need // to be recreated after all the new Elements are inserted. } } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element next = paragraph.getElement(index + 1); Element[] removed = new Element[] { current, next }; Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); Element[] added = new Element[2]; added[0] = newEl1; if (data.length == 1) added[1] = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else added[1] = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); edit.addRemovedElements(removed); edit.addAddedElements(added); } break; case ElementSpec.OriginateDirection: if (current.getStartOffset() != offset) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); } Element newEl2 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addRemovedElement(current); edit.addAddedElement(newEl2); if (current.getEndOffset() != endOffset && (data.length == 1)) { // This means all the leaves that were there previously need // to be recreated after all the new Elements are inserted. Element newCurrent = createLeafElement(paragraph, current.getAttributes(), newEndOffset, current.getEndOffset()); edit.addAddedElement(newCurrent); } break; default: break; } offset = newEndOffset; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/clean/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
2243,
3759,
1350,
1805,
12,
1046,
1990,
8526,
501,
15329,
759,
9852,
30,
1220,
707,
353,
486,
3912,
18,
7193,
4260,
358,
8214,
23052,
326,
759,
15559,
1347,
326,
857,
1807,
4068,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
2243,
3759,
1350,
1805,
12,
1046,
1990,
8526,
501,
15329,
759,
9852,
30,
1220,
707,
353,
486,
3912,
18,
7193,
4260,
358,
8214,
23052,
326,
759,
15559,
1347,
326,
857,
1807,
4068,
35... | ||
if (toolbarMenu != null) | if (toolbarMenu != null) { | public Menu getMenu(Control parent) { if (toolbarMenu != null) toolbarMenu.dispose(); toolbarMenu = new Menu(parent); initMenu(toolbarMenu); return toolbarMenu; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/SelectWorkingSetsAction.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/SelectWorkingSetsAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
9809,
25877,
12,
3367,
982,
13,
288,
202,
202,
430,
261,
18849,
4599,
480,
446,
13,
1082,
202,
18849,
4599,
18,
2251,
4150,
5621,
202,
202,
18849,
4599,
273,
394,
9809,
12,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
9809,
25877,
12,
3367,
982,
13,
288,
202,
202,
430,
261,
18849,
4599,
480,
446,
13,
1082,
202,
18849,
4599,
18,
2251,
4150,
5621,
202,
202,
18849,
4599,
273,
394,
9809,
12,
29... |
if (receivedRoundsUS.get(lastAuthPart)) { | /*if (receivedRoundsUS.get(lastAuthPart)) { | private boolean handleDongleCommunication(byte[] nonce, byte[] sentRfMessage, int rounds, byte[] receivedDelays, byte[] receivedRfMessage) throws DongleAuthenticationProtocolException, InternalApplicationException { // first check the parameters if (remoteRelateId < 0) throw new DongleAuthenticationProtocolException("Remote relate id must be >= 0."); if (nonce == null || nonce.length != NonceByteLength) throw new DongleAuthenticationProtocolException("Expecting random nonce with a length of " + NonceByteLength + " Bytes."); if (sentRfMessage == null || sentRfMessage.length != NonceByteLength) throw new DongleAuthenticationProtocolException("Expecting RF message with a length of " + NonceByteLength + " Bytes."); if (receivedRfMessage == null || receivedRfMessage.length != NonceByteLength) throw new DongleAuthenticationProtocolException("Received RF message will have " + NonceByteLength + " Bytes, expecting pre-allocated array."); if (rounds < 2) throw new DongleAuthenticationProtocolException("Need at least 2 rounds for the interlock protocol to be secure."); SerialConnector serialConn = SerialConnector.getSerialConnector(); // fetch our own relate id from the serial connector (which must be connected by now) if (! serialConn.isOperational()) throw new InternalApplicationException("Error: connection to dongle has not yet been established!"); int localRelateId = serialConn.getLocalRelateId(); if (localRelateId == -1) throw new InternalApplicationException("Error: local relate id is reported as -1, which is an error case!!"); // This message queue is used to receive events from the dongle. MessageQueue eventQueue = new MessageQueue(); serialConn.registerEventQueue(eventQueue); // construct the start-of-authentication message and sent it to the dongle if (!serialConn.startAuthenticationWith(remoteRelateId, nonce, sentRfMessage, rounds, EntropyBitsPerRound)) { logger.error("ERROR: could not send start-of-authentication packet to dongle"); raiseAuthenticationFailureEvent(new Integer(remoteRelateId), null, "Unable to send start-of-authentication packet to dongle."); return false; } raiseAuthenticationProgressEvent(new Integer(remoteRelateId), 2, AuthenticationStages + rounds, "Initiated authentication mode in dongle"); // and wait for the measurements and authentication data to be received int lastAuthPart = -1, lastCompletedRound = -1; BitSet receivedRoundsRF = new BitSet(rounds), receivedRoundsUS = new BitSet(rounds); int messageBitsPerRound = (sentRfMessage.length * 8) / rounds; if (sentRfMessage.length * 8 > messageBitsPerRound * rounds) messageBitsPerRound++; logger.error("Transmitting " + messageBitsPerRound + " bits of the RF message each round"); while (lastCompletedRound < rounds-1) { while (eventQueue.isEmpty()) eventQueue.waitForMessage(500); RelateEvent e = (RelateEvent) eventQueue.getMessage(); if (e == null) { logger.warn("Warning: got null message out of message queue! This should not happen."); continue; } if (e.getType() == RelateEvent.AUTHENTICATION_INFO && e.getDevice().getId() == remoteRelateId) { // sanity check if (e.round > rounds) { logger.warn("Ignoring received authentication part for round number " + e.round + ", only expected " + rounds + " rounds"); continue; } // check if we already got that round - only use the first packet so to ignore any ack-only packets if (receivedRoundsRF.get(e.round-1)) { logger.warn("Ignoring received authentication part for round " + e.round + " since it was already received earlier."); continue; } receivedRoundsRF.set(e.round-1, true); // if it is the last round, it might have less bits int curBits = e.round < rounds ? messageBitsPerRound : (sentRfMessage.length * 8 - messageBitsPerRound * (rounds-1)); // authentication info event: just remember the bits received with it addPart(receivedRfMessage, e.authenticationPart, (e.round-1) * messageBitsPerRound, curBits); lastAuthPart = e.round-1; logger.info("Received authentication part from dongle " + remoteRelateId + ": round " + (lastAuthPart+1) + (e.ack ? " with" : " without") + " ack out of " + rounds + " (" + curBits + " bits): " + SerialConnector.byteArrayToHexString(e.authenticationPart)); } else if (e.getType() == RelateEvent.NEW_MEASUREMENT && e.getMeasurement().getRelatum() == localRelateId && e.getMeasurement().getId() == remoteRelateId) { if (e.getMeasurement().getTransducers() == 0) { logger.debug("WARNING: got measurement with 0 valid transducers during authentication! Not discarding it."); } if (e.getMeasurement().getDistance() == 4094) { logger.debug("Discarding invalid measurement in authentication mode: reported by dongle"); continue; } // sanity check if (lastAuthPart >= rounds) { logger.warn("Ignoring received delayed measurement for round number " + (lastCompletedRound+1) + ", only expected " + rounds + " rounds"); continue; } // even more sanity... if (lastAuthPart < 0) { logger.info("Got measurement event before getting an authentication packet - ignoring"); continue; } // check if we already got that round - only use the first packet so to ignore any ack-only packets if (receivedRoundsUS.get(lastAuthPart)) { logger.warn("Ignoring received delayed measurement for round " + (lastCompletedRound+1) + " since it was already received earlier."); continue; } receivedRoundsUS.set(lastAuthPart, true); // measurement event for the authentication partner: re-use the round from the authentication info event int delayedMeasurement = (int) e.getMeasurement().getDistance(); // still do a sanity check (within our accuracy range) if (delayedMeasurement - referenceMeasurement <= -(1 << EntropyBitsOffset)) { logger.debug("Discarding invalid measurement in authentication mode: smaller than reference"); continue; } // first extract the delay bits (since it is delayed, it is guaranteed to be longer than the reference) // WATCHME: at the moment we use only 3 bits, but that might change.... byte delay = (byte) ((delayedMeasurement - referenceMeasurement) >> EntropyBitsOffset); // and add to the receivedNonce for later comparison addPart(receivedDelays, new byte[] {delay}, lastAuthPart * EntropyBitsPerRound, EntropyBitsPerRound); lastCompletedRound = lastAuthPart; logger.info("Received delayed measurement to dongle " + remoteRelateId + ": " + delayedMeasurement + ", delay in mm=" + (delayedMeasurement-referenceMeasurement) + ", computed nonce part from delay: " + (delay & 0x07) + " " + SerialConnector.byteArrayToBinaryString(new byte[] {delay})); raiseAuthenticationProgressEvent(new Integer(remoteRelateId), 3 + lastCompletedRound+1, AuthenticationStages + rounds, "Got delayed measurement at round " + lastCompletedRound); } } serialConn.unregisterEventQueue(eventQueue); // check if everything has been received correctly if (receivedRoundsRF.nextClearBit(0) < rounds) { logger.error("ERROR: Did not receive all required authentication parts from remote dongle."); return false; } if (receivedRoundsUS.nextClearBit(0) < rounds) { logger.error("ERROR: Did not receive all required delayed authentications from remote dongle."); return false; } return true; } | 14316 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14316/f3c1e2d803716c120bf25807a43c19ecc74513a2/DongleProtocolHandler.java/clean/src/org/eu/mayrhofer/authentication/DongleProtocolHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
1640,
40,
932,
298,
25219,
12,
7229,
8526,
7448,
16,
1160,
8526,
3271,
54,
74,
1079,
16,
1875,
202,
474,
21196,
16,
1160,
8526,
5079,
6763,
87,
16,
1160,
8526,
5079,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
1640,
40,
932,
298,
25219,
12,
7229,
8526,
7448,
16,
1160,
8526,
3271,
54,
74,
1079,
16,
1875,
202,
474,
21196,
16,
1160,
8526,
5079,
6763,
87,
16,
1160,
8526,
5079,
54... |
String realName = versionNames.get(uri); | StringBuffer realName = versionNames.get(uri); | public void endDocument() throws SAXException { for (String product : components.keySet()) { List<String> componentURIs = components.get(product); for (String uri : componentURIs) { String realName = componentNames.get(uri); if (realName != null) { //configuration.addAttributeValue(product+"."+BugzillaReportElement.COMPONENT.getKeyString(), realName); configuration.addComponent(product, realName); } } } for (String product : versions.keySet()) { List<String> versionURIs = versions.get(product); for (String uri : versionURIs) { String realName = versionNames.get(uri); if (realName != null) { //configuration.addAttributeValue(product+"."+BugzillaReportElement.VERSION.getKeyString(), realName); configuration.addVersion(product, realName); } } } for (String product : milestones.keySet()) { List<String> milestoneURIs = milestones.get(product); for (String uri : milestoneURIs) { String realName = milestoneNames.get(uri); if (realName != null) { //configuration.addAttributeValue(product+"."+BugzillaReportElement.TARGET_MILESTONE.getKeyString(), realName); configuration.addTargetMilestone(product, realName); } } } super.endDocument(); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/584278fd36588570d799890a990adc5ef6e02a9d/SaxConfigurationContentHandler.java/buggy/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxConfigurationContentHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
679,
2519,
1435,
1216,
14366,
288,
21114,
202,
1884,
261,
780,
3017,
294,
4085,
18,
856,
694,
10756,
288,
1082,
202,
682,
32,
780,
34,
1794,
1099,
2520,
273,
4085,
18,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
679,
2519,
1435,
1216,
14366,
288,
21114,
202,
1884,
261,
780,
3017,
294,
4085,
18,
856,
694,
10756,
288,
1082,
202,
682,
32,
780,
34,
1794,
1099,
2520,
273,
4085,
18,
58... |
init(cms, filename); | public CmsXmlWpTemplateFile(CmsObject cms, String filename) throws CmsException { super(); registerMyTags(); init(cms, filename); } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/52daad1e8645f2ab43c22626ae664777819b5df8/CmsXmlWpTemplateFile.java/buggy/src/com/opencms/workplace/CmsXmlWpTemplateFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
16084,
59,
84,
2283,
812,
12,
4747,
921,
6166,
16,
514,
1544,
13,
1216,
11228,
288,
3639,
2240,
5621,
3639,
1744,
12062,
3453,
5621,
6647,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
16084,
59,
84,
2283,
812,
12,
4747,
921,
6166,
16,
514,
1544,
13,
1216,
11228,
288,
3639,
2240,
5621,
3639,
1744,
12062,
3453,
5621,
6647,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100... | |
AbstractDataType newObject; for (int i = 0; i < copyObject.objectList.size(); i++) { newObject = (AbstractDataType) ID3Tags.copyObject(copyObject.objectList.get(i)); newObject.setBody(this); this.objectList.add(newObject); } | setupObjectList(); | public AbstractTagFrameBody(AbstractTagFrameBody copyObject) { AbstractDataType newObject; for (int i = 0; i < copyObject.objectList.size(); i++) { newObject = (AbstractDataType) ID3Tags.copyObject(copyObject.objectList.get(i)); newObject.setBody(this); this.objectList.add(newObject); } } | 40452 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/40452/8e6062659057068b4b85fb7b41c567e179db6f7c/AbstractTagFrameBody.java/buggy/src/org/jaudiotagger/tag/AbstractTagFrameBody.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4115,
1805,
3219,
2250,
12,
7469,
1805,
3219,
2250,
1610,
921,
13,
565,
288,
3639,
4115,
6273,
24518,
31,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
1610,
921,
18,
1612,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4115,
1805,
3219,
2250,
12,
7469,
1805,
3219,
2250,
1610,
921,
13,
565,
288,
3639,
4115,
6273,
24518,
31,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
1610,
921,
18,
1612,
68... |
while (true) { | while (result.size()<token_deep) { | private Token[] getTokens(String text) { ArrayList result = new ArrayList(); TokenStream ts = analyzer.tokenStream("content", new StringReader(text)); Token token = null; while (true) { try { token = ts.next(); } catch (IOException e) { token = null; } if (token == null) { break; } result.add(token); } try { ts.close(); } catch (IOException e) { // ignore } return (Token[]) result.toArray(new Token[result.size()]); } | 46828 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46828/22bfa7ce23d1ec38b86357cec80d82db35045285/BasicSummarizer.java/buggy/src/plugin/summary-basic/src/java/org/apache/nutch/summary/basic/BasicSummarizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
3155,
8526,
18349,
12,
780,
977,
13,
288,
565,
2407,
563,
273,
394,
2407,
5621,
565,
3155,
1228,
3742,
273,
15116,
18,
2316,
1228,
2932,
1745,
3113,
394,
26227,
12,
955,
10019,
565,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
3155,
8526,
18349,
12,
780,
977,
13,
288,
565,
2407,
563,
273,
394,
2407,
5621,
565,
3155,
1228,
3742,
273,
15116,
18,
2316,
1228,
2932,
1745,
3113,
394,
26227,
12,
955,
10019,
565,... |
if (args.length < 1) { System.err.println("Usage: java test.multiplemigration.Test <nodeName> ... <nodeName>"); System.exit(1); } Test test = null; Object[] arg = new Object[1]; arg[0] = args; try { System.out.println("Creating object"); test = (Test) ProActive.newActive("test.multiplemigration.Test", arg); Thread.sleep(5000); System.out.println("Calling the object"); test.echo(); Thread.sleep(5000); System.out.println("Calling the object again"); test.echo(); } catch (Exception e) { e.printStackTrace(); } | if (args.length < 1) { System.err.println("Usage: java test.multiplemigration.Test <nodeName> ... <nodeName>"); System.exit(1); | public static void main(String[] args) { if (args.length < 1) { System.err.println("Usage: java test.multiplemigration.Test <nodeName> ... <nodeName>"); System.exit(1); } Test test = null; Object[] arg = new Object[1]; arg[0] = args; try { System.out.println("Creating object"); test = (Test) ProActive.newActive("test.multiplemigration.Test", arg); Thread.sleep(5000); System.out.println("Calling the object"); test.echo(); Thread.sleep(5000); System.out.println("Calling the object again"); test.echo(); } catch (Exception e) { e.printStackTrace(); } } | 23362 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/23362/5e642ce7dcf879375a80fc7d91f77e9f8895c453/Test.java/clean/src/test/multiplemigration/Test.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
3639,
309,
261,
1968,
18,
2469,
411,
404,
13,
288,
5411,
2332,
18,
370,
18,
8222,
2932,
5357,
30,
2252,
1842,
18,
9622,
15746,
18,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
3639,
309,
261,
1968,
18,
2469,
411,
404,
13,
288,
5411,
2332,
18,
370,
18,
8222,
2932,
5357,
30,
2252,
1842,
18,
9622,
15746,
18,
4... |
try { assertTrue(def instanceof IASTName); assertEquals(((ASTNode)def).getOffset(), header.indexOf("x")); assertEquals(((ASTNode)def).getLength(), "x".length()); assertTrue(false); } catch (AssertionFailedError afe) {} | assertTrue(def instanceof IASTName); assertEquals(((ASTNode)def).getOffset(), header.indexOf("x")); assertEquals(((ASTNode)def).getLength(), "x".length()); | public void testSimpleOpenDeclaration() throws Exception { String header = "int x() { return 1; }"; //$NON-NLS-1$ importFile("test.h", header); //$NON-NLS-1$ String code = "int foo() { \n return x();\n}\n"; //$NON-NLS-1$ IFile file = importFile("test.c", code); int offset = code.indexOf("x();\n}\n"); IASTNode def = testF2(file, offset); try { // TODO raised bug 97079 assertTrue(def instanceof IASTName); assertEquals(((ASTNode)def).getOffset(), header.indexOf("x")); //$NON-NLS-1$ assertEquals(((ASTNode)def).getLength(), "x".length()); //$NON-NLS-1$ assertTrue(false); // when this fails then the test is passing correctly } catch (AssertionFailedError afe) {} IASTNode decl = testF3(file, offset); assertTrue(decl instanceof IASTName); assertEquals(((ASTNode)decl).getOffset(), header.indexOf("x")); //$NON-NLS-1$ assertEquals(((ASTNode)decl).getLength(), "x".length()); //$NON-NLS-1$ } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/fb5cd0f1574353599faccca082d41381c5f24ef8/CSelectionTestsDOMIndexer.java/clean/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selectiontests/CSelectionTestsDOMIndexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
5784,
3678,
6094,
1435,
1216,
1185,
288,
202,
202,
780,
1446,
273,
315,
474,
619,
1435,
288,
327,
404,
31,
289,
14432,
4329,
3993,
17,
5106,
17,
21,
8,
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,
1842,
5784,
3678,
6094,
1435,
1216,
1185,
288,
202,
202,
780,
1446,
273,
315,
474,
619,
1435,
288,
327,
404,
31,
289,
14432,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
... |
if((inData.indexOf('&') == -1) && (inData.indexOf('<') == -1) && (inData.indexOf('>') == -1) && (inData.indexOf('\'') == -1) && (inData.indexOf('\"') == -1)) { return inData; | int length = input.length(); StringBuilder buffer = null; for (int i = 0; i < length; ) { int c = input.codePointAt(i); if(Character.getType(c) == Character.DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE) { if(buffer == null) buffer = createBuffer(input, i); buffer.append(' '); } else { switch (c) { case '&': if(buffer == null) buffer = createBuffer(input, i); buffer.append("&"); break; case '<': if(buffer == null) buffer = createBuffer(input, i); buffer.append("<"); break; case '>': if(buffer == null) buffer = createBuffer(input, i); buffer.append(">"); break; case '\"': if(buffer == null) buffer = createBuffer(input, i); buffer.append("""); break; case '\'': if(buffer == null) buffer = createBuffer(input, i); buffer.append("'"); break; default: if(buffer != null) buffer.appendCodePoint(c); } } i += Character.charCount(c); | public static String encodeXML(String inData) { //return null, if null is passed as argument if(inData == null) return null; //if no special characters, just return //(for optimization. Though may be an overhead, but for most of the //strings, this will save time) if((inData.indexOf('&') == -1) && (inData.indexOf('<') == -1) && (inData.indexOf('>') == -1) && (inData.indexOf('\'') == -1) && (inData.indexOf('\"') == -1)) { return inData; } //get the length of input String int length = inData.length(); //create a StringBuffer of double the size (size is just for guidance //so as to reduce increase-capacity operations. The actual size of //the resulting string may be even greater than we specified, but is //extremely rare) StringBuffer buffer = new StringBuffer(2 * length); char charToCompare; //iterate over the input String for(int i=0; i < length; i++) { charToCompare = inData.charAt(i); //if the ith character is special character, replace by code if(charToCompare == '&') { buffer.append("&"); } else if(charToCompare == '<') { buffer.append("<"); } else if(charToCompare == '>') { buffer.append(">"); } else if(charToCompare == '\"') { buffer.append("""); } else if(charToCompare == '\'') { buffer.append("'"); } else { buffer.append(charToCompare); } } //return the encoded string return buffer.toString(); } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/fd9b4022ade90ac08aa50c135747cc8c42606b0c/LimeXMLUtils.java/buggy/components/gnutella-core/src/main/java/com/limegroup/gnutella/xml/LimeXMLUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
2017,
4201,
12,
780,
316,
751,
13,
565,
288,
3639,
368,
2463,
446,
16,
309,
446,
353,
2275,
487,
1237,
3639,
309,
12,
267,
751,
422,
446,
13,
5411,
327,
446,
31,
7734,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
2017,
4201,
12,
780,
316,
751,
13,
565,
288,
3639,
368,
2463,
446,
16,
309,
446,
353,
2275,
487,
1237,
3639,
309,
12,
267,
751,
422,
446,
13,
5411,
327,
446,
31,
7734,... |
eDynamicSet( eFeature, newValue ); | super.eSet( featureID, newValue ); | public void eSet( EStructuralFeature eFeature, Object newValue ) { switch ( eDerivedStructuralFeatureID( eFeature ) ) { case AttributePackage.DATA_POINT_COMPONENT__TYPE : setType( (DataPointComponentType) newValue ); return; case AttributePackage.DATA_POINT_COMPONENT__FORMAT_SPECIFIER : setFormatSpecifier( (FormatSpecifier) newValue ); return; } eDynamicSet( eFeature, newValue ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/036e8c78765730b146e5854b9d6c397a296fed86/DataPointComponentImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/impl/DataPointComponentImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
20199,
12,
512,
14372,
4595,
425,
4595,
16,
1033,
6129,
262,
202,
95,
202,
202,
9610,
261,
425,
21007,
14372,
4595,
734,
12,
425,
4595,
262,
262,
202,
202,
95,
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,
918,
20199,
12,
512,
14372,
4595,
425,
4595,
16,
1033,
6129,
262,
202,
95,
202,
202,
9610,
261,
425,
21007,
14372,
4595,
734,
12,
425,
4595,
262,
262,
202,
202,
95,
1082,
202,... |
private ICompilationUnit createNewWorkingCopy(ICompilationUnit parentCompilationUnit, String typeName, String contents, WorkingCopyOwner workingCopyOwner, IProblemRequestor problemRequestor, IProgressMonitor progressMonitor) throws CoreException, JavaModelException { IJavaProject jp = parentCompilationUnit.getJavaProject(); // // create folder for generated source files // ensureGeneratedSourceFolder( jp, progressMonitor ); IFolder folder = getGeneratedSourceFolder(); // // figure out package part of type & file name // String pkgName; String fname; int idx = typeName.lastIndexOf( '.' ); if ( idx > 0 ) { pkgName = typeName.substring( 0, idx ); fname = typeName.substring(idx + 1, typeName.length()) + ".java"; //$NON-NLS-1$ } else { pkgName = ""; //$NON-NLS-1$ fname = typeName + ".java"; //$NON-NLS-1$ } // // create compilation unit // IPackageFragmentRoot root = jp.getPackageFragmentRoot(folder); IPackageFragment pkgFragment = root.createPackageFragment( pkgName, true, null ); ICompilationUnit cu = pkgFragment.getCompilationUnit( fname ); if ( cu == null || ! cu.getResource().exists() ) { cu = pkgFragment.createCompilationUnit( fname, contents, true, progressMonitor ); } else { makeReadOnly( cu, false ); } // // TODO: can we call getWorkingCopy here? // cu.becomeWorkingCopy(problemRequestor, progressMonitor); ICompilationUnit workingCopy = cu; // // update maps // addEntryToWorkingCopyMaps( parentCompilationUnit, workingCopy ); // we save this here since the resource has to exist on disk workingCopy.commitWorkingCopy( true, progressMonitor ); // // make the file derived so that it is not checked into source control. // makeDerived( workingCopy ); // // make working copy read-only // makeReadOnly( workingCopy, true ); return workingCopy; } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/1604c4cb884aee860a1cc5ef654a628a5e36afd0/GeneratedFileManager.java/buggy/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/generatedfile/GeneratedFileManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
45,
19184,
2802,
2640,
1908,
14836,
2951,
12,
45,
19184,
2802,
2938,
19184,
2802,
16,
780,
723,
461,
16,
1082,
202,
780,
3980,
16,
14836,
2951,
5541,
20478,
2951,
5541,
16,
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,
1152,
45,
19184,
2802,
2640,
1908,
14836,
2951,
12,
45,
19184,
2802,
2938,
19184,
2802,
16,
780,
723,
461,
16,
1082,
202,
780,
3980,
16,
14836,
2951,
5541,
20478,
2951,
5541,
16,
108... | ||
if (A_OpenCms.isLogging()) | if ((A_OpenCms.isLogging() && I_CmsLogChannels.C_PREPROCESSOR_IS_LOGGING)) | public void publishProject(CmsUser user, int projectId, CmsProject onlineProject) throws CmsException{ CmsAccessFilesystem discAccess = new CmsAccessFilesystem(m_exportpointStorage); CmsFolder currentFolder = null; CmsFile currentFile = null; CmsFolder newFolder = null; Vector offlineFolders; Vector offlineFiles; Vector deletedFolders = new Vector(); // folderIdIndex: offlinefolderId | onlinefolderId Hashtable folderIdIndex = new Hashtable(); // read all folders in offlineProject offlineFolders = readFolders(projectId); for (int i = 0; i < offlineFolders.size(); i++) { currentFolder = ((CmsFolder) offlineFolders.elementAt(i)); // C_STATE_DELETE if (currentFolder.getState() == C_STATE_DELETED) { deletedFolders.addElement(currentFolder); // C_STATE_NEW } else if (currentFolder.getState() == C_STATE_NEW) { // export to filesystem if necessary String exportKey = checkExport(currentFolder.getAbsolutePath()); if (exportKey != null) { discAccess.createFolder(currentFolder.getAbsolutePath(), exportKey); } // get parentId for onlineFolder either from folderIdIndex or from the database Integer parentId = (Integer) folderIdIndex.get(new Integer(currentFolder.getParentId())); if (parentId == null) { CmsFolder currentOnlineParent = readFolder(onlineProject.getId(), currentFolder.getParent()); parentId = new Integer(currentOnlineParent.getResourceId()); folderIdIndex.put(new Integer(currentFolder.getParentId()), parentId); } // create the new folder and insert its id in the folderindex try { newFolder = createFolder(user, onlineProject, onlineProject, currentFolder, parentId.intValue(), currentFolder.getAbsolutePath()); newFolder.setState(C_STATE_UNCHANGED); writeFolder(onlineProject, newFolder, false); } catch (CmsException e) { if (e.getType() == CmsException.C_FILE_EXISTS) { // the folder already exists CmsFolder onlineFolder = null; try { onlineFolder = readFolder(onlineProject.getId(), currentFolder.getAbsolutePath()); } catch (CmsException exc) { throw exc; } // end of catch PreparedStatement statement = null; Connection con = null; try { con = DriverManager.getConnection(m_poolName); // update the onlineFolder with data from offlineFolder statement = con.prepareStatement(m_cq.C_RESOURCES_UPDATE); statement.setInt(1, currentFolder.getType()); statement.setInt(2, currentFolder.getFlags()); statement.setInt(3, currentFolder.getOwnerId()); statement.setInt(4, currentFolder.getGroupId()); statement.setInt(5, onlineFolder.getProjectId()); statement.setInt(6, currentFolder.getAccessFlags()); statement.setInt(7, C_STATE_UNCHANGED); statement.setInt(8, currentFolder.isLockedBy()); statement.setInt(9, currentFolder.getLauncherType()); statement.setString(10, currentFolder.getLauncherClassname()); statement.setTimestamp(11, new Timestamp(System.currentTimeMillis())); statement.setInt(12, currentFolder.getResourceLastModifiedBy()); statement.setInt(13, 0); statement.setInt(14, currentFolder.getFileId()); statement.setInt(15, onlineFolder.getResourceId()); statement.executeUpdate(); newFolder = readFolder(onlineProject.getId(), currentFolder.getAbsolutePath()); } catch (SQLException sqle) { throw new CmsException("[" + this.getClass().getName() + "] " + sqle.getMessage(), CmsException.C_SQL_ERROR, sqle); } finally { if(statement != null) { try { statement.close(); } catch(SQLException exc) { // nothing to do here } } if(con != null) { try { con.close(); } catch(SQLException exc) { // nothing to do here } } } } else { throw e; } } folderIdIndex.put(new Integer(currentFolder.getResourceId()), new Integer(newFolder.getResourceId())); // copy properties try { Hashtable props = readAllProperties(currentFolder.getResourceId(), currentFolder.getType()); writeProperties(props, newFolder.getResourceId(), newFolder.getType()); } catch (CmsException exc) { if (A_OpenCms.isLogging()) { A_OpenCms.log(I_CmsLogChannels.C_OPENCMS_INFO, "[CmsDbAccess] error publishing, copy properties for " + newFolder.toString() + " Message= " + exc.getMessage()); } } // C_STATE_CHANGED } else if (currentFolder.getState() == C_STATE_CHANGED) { // export to filesystem if necessary String exportKey = checkExport(currentFolder.getAbsolutePath()); if (exportKey != null) { discAccess.createFolder(currentFolder.getAbsolutePath(), exportKey); } CmsFolder onlineFolder = null; try { onlineFolder = readFolder(onlineProject.getId(), currentFolder.getAbsolutePath()); } catch (CmsException exc) { // if folder does not exist create it if (exc.getType() == CmsException.C_NOT_FOUND) { // get parentId for onlineFolder either from folderIdIndex or from the database Integer parentId = (Integer) folderIdIndex.get(new Integer(currentFolder.getParentId())); if (parentId == null) { CmsFolder currentOnlineParent = readFolder(onlineProject.getId(), currentFolder.getParent()); parentId = new Integer(currentOnlineParent.getResourceId()); folderIdIndex.put(new Integer(currentFolder.getParentId()), parentId); } // create the new folder onlineFolder = createFolder(user, onlineProject, onlineProject, currentFolder, parentId.intValue(), currentFolder.getAbsolutePath()); onlineFolder.setState(C_STATE_UNCHANGED); writeFolder(onlineProject, onlineFolder, false); } else { throw exc; } } // end of catch PreparedStatement statement = null; Connection con = null; try { con = DriverManager.getConnection(m_poolName); // update the onlineFolder with data from offlineFolder statement = con.prepareStatement(m_cq.C_RESOURCES_UPDATE); statement.setInt(1, currentFolder.getType()); statement.setInt(2, currentFolder.getFlags()); statement.setInt(3, currentFolder.getOwnerId()); statement.setInt(4, currentFolder.getGroupId()); statement.setInt(5, onlineFolder.getProjectId()); statement.setInt(6, currentFolder.getAccessFlags()); statement.setInt(7, C_STATE_UNCHANGED); statement.setInt(8, currentFolder.isLockedBy()); statement.setInt(9, currentFolder.getLauncherType()); statement.setString(10, currentFolder.getLauncherClassname()); statement.setTimestamp(11, new Timestamp(System.currentTimeMillis())); statement.setInt(12, currentFolder.getResourceLastModifiedBy()); statement.setInt(13, 0); statement.setInt(14, currentFolder.getFileId()); statement.setInt(15, onlineFolder.getResourceId()); statement.executeUpdate(); } catch (SQLException e) { throw new CmsException("[" + this.getClass().getName() + "] " + e.getMessage(), CmsException.C_SQL_ERROR, e); } finally { // close all db-resources if(statement != null) { try { statement.close(); } catch(SQLException exc) { // nothing to do here } } if(con != null) { try { con.close(); } catch(SQLException exc) { // nothing to do here } } } folderIdIndex.put(new Integer(currentFolder.getResourceId()), new Integer(onlineFolder.getResourceId())); // copy properties try { deleteAllProperties(onlineFolder.getResourceId()); Hashtable props = readAllProperties(currentFolder.getResourceId(), currentFolder.getType()); writeProperties(props, onlineFolder.getResourceId(), currentFolder.getType()); } catch (CmsException exc) { if (A_OpenCms.isLogging()) { A_OpenCms.log(I_CmsLogChannels.C_OPENCMS_INFO, "[CmsDbAccess] error publishing, deleting properties for " + onlineFolder.toString() + " Message= " + exc.getMessage()); } } // C_STATE_UNCHANGED } else if (currentFolder.getState() == C_STATE_UNCHANGED) { CmsFolder onlineFolder = null; try { onlineFolder = readFolder(onlineProject.getId(), currentFolder.getAbsolutePath()); } catch (CmsException exc) { if (exc.getType() == CmsException.C_NOT_FOUND) { // get parentId for onlineFolder either from folderIdIndex or from the database Integer parentId = (Integer) folderIdIndex.get(new Integer(currentFolder.getParentId())); if (parentId == null) { CmsFolder currentOnlineParent = readFolder(onlineProject.getId(), currentFolder.getParent()); parentId = new Integer(currentOnlineParent.getResourceId()); folderIdIndex.put(new Integer(currentFolder.getParentId()), parentId); } // create the new folder onlineFolder = createFolder(user, onlineProject, onlineProject, currentFolder, parentId.intValue(), currentFolder.getAbsolutePath()); onlineFolder.setState(C_STATE_UNCHANGED); writeFolder(onlineProject, onlineFolder, false); // copy properties try { Hashtable props = readAllProperties(currentFolder.getResourceId(), currentFolder.getType()); writeProperties(props, onlineFolder.getResourceId(), onlineFolder.getType()); } catch (CmsException exc2) { if (A_OpenCms.isLogging()) { A_OpenCms.log(I_CmsLogChannels.C_OPENCMS_INFO, "[CmsDbAccess] error publishing, copy properties for " + onlineFolder.toString() + " Message= " + exc.getMessage()); } } } else { throw exc; } } // end of catch folderIdIndex.put(new Integer(currentFolder.getResourceId()), new Integer(onlineFolder.getResourceId())); } // end of else if } // end of for(... // now read all FILES in offlineProject offlineFiles = readFiles(projectId); for (int i = 0; i < offlineFiles.size(); i++) { currentFile = ((CmsFile) offlineFiles.elementAt(i)); if (currentFile.getName().startsWith(C_TEMP_PREFIX)) { removeFile(projectId, currentFile.getAbsolutePath()); // C_STATE_DELETE } else if (currentFile.getState() == C_STATE_DELETED) { // delete in filesystem if necessary String exportKey = checkExport(currentFile.getAbsolutePath()); if (exportKey != null) { try { discAccess.removeResource(currentFile.getAbsolutePath(), exportKey); } catch (Exception ex) { } } try { CmsFile currentOnlineFile = readFile(onlineProject.getId(), onlineProject.getId(), currentFile.getAbsolutePath()); try { deleteAllProperties(currentOnlineFile.getResourceId()); } catch (CmsException exc) { if (A_OpenCms.isLogging()) { A_OpenCms.log(I_CmsLogChannels.C_OPENCMS_INFO, "[CmsDbAccess] error publishing, deleting properties for " + currentOnlineFile.toString() + " Message= " + exc.getMessage()); } } try { deleteResource(currentOnlineFile.getResourceId()); } catch (CmsException exc) { if (A_OpenCms.isLogging()) { A_OpenCms.log(I_CmsLogChannels.C_OPENCMS_INFO, "[CmsDbAccess] error publishing, deleting resource for " + currentOnlineFile.toString() + " Message= " + exc.getMessage()); } } } catch (Exception ex) { // this exception is thrown when the file does not exist in the // online project anymore. This is OK, so do nothing. } // C_STATE_CHANGED } else if (currentFile.getState() == C_STATE_CHANGED) { // export to filesystem if necessary String exportKey = checkExport(currentFile.getAbsolutePath()); if (exportKey != null) { discAccess.writeFile(currentFile.getAbsolutePath(), exportKey, readFileContent(currentFile.getFileId())); } CmsFile onlineFile = null; try { onlineFile = readFileHeader(onlineProject.getId(), currentFile.getAbsolutePath()); } catch (CmsException exc) { if (exc.getType() == CmsException.C_NOT_FOUND) { // get parentId for onlineFolder either from folderIdIndex or from the database Integer parentId = (Integer) folderIdIndex.get(new Integer(currentFile.getParentId())); if (parentId == null) { CmsFolder currentOnlineParent = readFolder(onlineProject.getId(), currentFolder.getParent()); parentId = new Integer(currentOnlineParent.getResourceId()); folderIdIndex.put(new Integer(currentFile.getParentId()), parentId); } // create a new File currentFile.setState(C_STATE_UNCHANGED); onlineFile = createFile(onlineProject, onlineProject, currentFile, user.getId(), parentId.intValue(), currentFile.getAbsolutePath(), false); } } // end of catch PreparedStatement statement = null; Connection con = null; try { con = DriverManager.getConnection(m_poolName); // update the onlineFile with data from offlineFile statement = con.prepareStatement(m_cq.C_RESOURCES_UPDATE_FILE); statement.setInt(1, currentFile.getType()); statement.setInt(2, currentFile.getFlags()); statement.setInt(3, currentFile.getOwnerId()); statement.setInt(4, currentFile.getGroupId()); statement.setInt(5, onlineFile.getProjectId()); statement.setInt(6, currentFile.getAccessFlags()); statement.setInt(7, C_STATE_UNCHANGED); statement.setInt(8, currentFile.isLockedBy()); statement.setInt(9, currentFile.getLauncherType()); statement.setString(10, currentFile.getLauncherClassname()); statement.setTimestamp(11, new Timestamp(System.currentTimeMillis())); statement.setInt(12, currentFile.getResourceLastModifiedBy()); statement.setInt(13, currentFile.getLength()); statement.setInt(14, currentFile.getFileId()); statement.setInt(15, onlineFile.getResourceId()); statement.executeUpdate(); } catch (SQLException e) { throw new CmsException("[" + this.getClass().getName() + "] " + e.getMessage(), CmsException.C_SQL_ERROR, e); } finally { if(statement != null) { try { statement.close(); } catch(SQLException exc) { // nothing to do here } } if(con != null) { try { con.close(); } catch(SQLException exc) { // nothing to do here } } } // copy properties try { deleteAllProperties(onlineFile.getResourceId()); Hashtable props = readAllProperties(currentFile.getResourceId(), currentFile.getType()); writeProperties(props, onlineFile.getResourceId(), currentFile.getType()); } catch (CmsException exc) { if (A_OpenCms.isLogging()) { A_OpenCms.log(I_CmsLogChannels.C_OPENCMS_INFO, "[CmsDbAccess] error publishing, deleting properties for " + onlineFile.toString() + " Message= " + exc.getMessage()); } } // C_STATE_NEW } else if (currentFile.getState() == C_STATE_NEW) { // export to filesystem if necessary String exportKey = checkExport(currentFile.getAbsolutePath()); if (exportKey != null) { discAccess.writeFile(currentFile.getAbsolutePath(), exportKey, readFileContent(currentFile.getFileId())); } // get parentId for onlineFile either from folderIdIndex or from the database Integer parentId = (Integer) folderIdIndex.get(new Integer(currentFile.getParentId())); if (parentId == null) { CmsFolder currentOnlineParent = readFolder(onlineProject.getId(), currentFile.getParent()); parentId = new Integer(currentOnlineParent.getResourceId()); folderIdIndex.put(new Integer(currentFile.getParentId()), parentId); } // create the new file removeFile(onlineProject.getId(), currentFile.getAbsolutePath()); CmsFile newFile = createFile(onlineProject, onlineProject, currentFile, user.getId(), parentId.intValue(), currentFile.getAbsolutePath(), false); newFile.setState(C_STATE_UNCHANGED); writeFile(onlineProject, onlineProject, newFile, false); // copy properties try { Hashtable props = readAllProperties(currentFile.getResourceId(), currentFile.getType()); writeProperties(props, newFile.getResourceId(), newFile.getType()); } catch (CmsException exc) { if (A_OpenCms.isLogging()) { A_OpenCms.log(I_CmsLogChannels.C_OPENCMS_INFO, "[CmsDbAccess] error publishing, copy properties for " + newFile.toString() + " Message= " + exc.getMessage()); } } } } // end of for(... // now delete the "deleted" folders for (int i = deletedFolders.size() - 1; i > -1; i--) { currentFolder = ((CmsFolder) deletedFolders.elementAt(i)); String exportKey = checkExport(currentFolder.getAbsolutePath()); if (exportKey != null) { discAccess.removeResource(currentFolder.getAbsolutePath(), exportKey); } try { deleteAllProperties(currentFolder.getResourceId()); } catch (CmsException exc) { if (A_OpenCms.isLogging()) { A_OpenCms.log(I_CmsLogChannels.C_OPENCMS_INFO, "[CmsDbAccess] error publishing, deleting properties for " + currentFolder.toString() + " Message= " + exc.getMessage()); } } removeFolderForPublish(onlineProject, currentFolder.getAbsolutePath()); } // end of for //clearFilesTable();} | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/65fec749058083642e3e85283287c65357fa8690/CmsDbAccess.java/clean/src/com/opencms/file/mySql/CmsDbAccess.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
3808,
4109,
12,
4747,
1299,
729,
16,
509,
9882,
16,
2149,
4109,
12365,
4109,
13,
1216,
11228,
95,
202,
4747,
1862,
12861,
19169,
1862,
273,
394,
2149,
1862,
12861,
12,
81,
67,
6530,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3808,
4109,
12,
4747,
1299,
729,
16,
509,
9882,
16,
2149,
4109,
12365,
4109,
13,
1216,
11228,
95,
202,
4747,
1862,
12861,
19169,
1862,
273,
394,
2149,
1862,
12861,
12,
81,
67,
6530,... |
int port = isFromMcast ? RouterService.getNonForcedPort() : RouterService.getPort(); byte[] ip = isFromMcast ? RouterService.getNonForcedAddress() : (canFWTransfer ? RouterService.getExternalAddress() : RouterService.getAddress()); | int port = -1; byte[] ip = null; if(isFromMcast) { ip = RouterService.getNonForcedAddress(); port = RouterService.getNonForcedPort(); if(!NetworkUtils.isValidPort(port) || !NetworkUtils.isValidAddress(ip)) isFromMcast = false; } if(!isFromMcast) { port = RouterService.getPort(); if(!NetworkUtils.isValidPort(port)) return Collections.EMPTY_LIST; if(canFWTransfer) { ip = RouterService.getExternalAddress(); if(!NetworkUtils.isValidAddress(ip)) canFWTransfer = false; } if(!canFWTransfer) { ip = RouterService.getAddress(); if(!NetworkUtils.isValidAddress(ip)) return Collections.EMPTY_LIST; } } | protected List createQueryReply(byte[] guid, byte ttl, long speed, Response[] res, byte[] clientGUID, boolean busy, boolean uploaded, boolean measuredSpeed, boolean isFromMcast, boolean canFWTransfer) { List queryReplies = new ArrayList(); QueryReply queryReply = null; // if it is a multicasted response, use the non-forced address // and port int port = isFromMcast ? RouterService.getNonForcedPort() : RouterService.getPort(); byte[] ip = isFromMcast ? RouterService.getNonForcedAddress() : (canFWTransfer ? RouterService.getExternalAddress() : RouterService.getAddress()); // get the xml collection string... String xmlCollectionString = LimeXMLDocumentHelper.getAggregateString(res); if (xmlCollectionString == null) xmlCollectionString = ""; byte[] xmlBytes = null; try { xmlBytes = xmlCollectionString.getBytes("UTF-8"); } catch(UnsupportedEncodingException ueex) {//no support for utf-8?? //all implementations of java must support utf8 encoding //here we will allow this QueryReply to be sent out //with xml being empty rather than not allowing the //Query to be sent out //therefore we won't throw a IllegalArgumentException but we will //show it so the error will be sent to Bug servlet ErrorService.error (ueex, "encountered UnsupportedEncodingException in creation of QueryReply : xmlCollectionString : " + xmlCollectionString); } // get the *latest* push proxies if we have not accepted an incoming // connection in this session boolean notIncoming = !RouterService.acceptedIncomingConnection(); Set proxies = (notIncoming ? _manager.getPushProxies() : null); // it may be too big.... if (xmlBytes.length > QueryReply.XML_MAX_SIZE) { // ok, need to partition responses up once again and send out // multiple query replies..... List splitResps = new LinkedList(); splitAndAddResponses(splitResps, res); while (!splitResps.isEmpty()) { Response[] currResps = (Response[]) splitResps.remove(0); String currXML = LimeXMLDocumentHelper.getAggregateString(currResps); byte[] currXMLBytes = null; try { currXMLBytes = currXML.getBytes("UTF-8"); } catch(UnsupportedEncodingException ueex) { //all implementations of java must support utf8 encoding //so if we get here there was something really wrong //we will show the error but treat as if the currXML was //empty (see the try catch for uee earlier) ErrorService.error (ueex, "encountered UnsupportedEncodingException : currXML " + currXML); currXMLBytes = "".getBytes(); } if ((currXMLBytes.length > QueryReply.XML_MAX_SIZE) && (currResps.length > 1)) splitAndAddResponses(splitResps, currResps); else { // create xml bytes if possible... byte[] xmlCompressed = null; if ((currXML != null) && (!currXML.equals(""))) xmlCompressed = LimeXMLUtils.compress(currXMLBytes); else //there is no XML xmlCompressed = DataUtils.EMPTY_BYTE_ARRAY; // create the new queryReply queryReply = new QueryReply(guid, ttl, port, ip, speed, currResps, _clientGUID, xmlCompressed, notIncoming, busy, uploaded, measuredSpeed, ChatSettings.CHAT_ENABLED.getValue(), isFromMcast, canFWTransfer, proxies); queryReplies.add(queryReply); } } } else { // xml is small enough, no problem..... // get xml bytes if possible.... byte[] xmlCompressed = null; if (xmlCollectionString!=null && !xmlCollectionString.equals("")) xmlCompressed = LimeXMLUtils.compress(xmlBytes); else //there is no XML xmlCompressed = DataUtils.EMPTY_BYTE_ARRAY; // create the new queryReply queryReply = new QueryReply(guid, ttl, port, ip, speed, res, _clientGUID, xmlCompressed, notIncoming, busy, uploaded, measuredSpeed, ChatSettings.CHAT_ENABLED.getValue(), isFromMcast, canFWTransfer, proxies); queryReplies.add(queryReply); } return queryReplies; } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/aafd5415744f1736231e94b2c1d9472f267ba56b/StandardMessageRouter.java/clean/components/gnutella-core/src/main/java/com/limegroup/gnutella/StandardMessageRouter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
987,
17698,
7817,
12,
7229,
8526,
9875,
16,
1160,
6337,
16,
4766,
565,
1525,
8632,
16,
2306,
8526,
400,
16,
4766,
565,
1160,
8526,
1004,
17525,
16,
19694,
1250,
21697,
16,
1250,
914... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
17698,
7817,
12,
7229,
8526,
9875,
16,
1160,
6337,
16,
4766,
565,
1525,
8632,
16,
2306,
8526,
400,
16,
4766,
565,
1160,
8526,
1004,
17525,
16,
19694,
1250,
21697,
16,
1250,
914... |
MylarTaskListPlugin.getTaskListManager().deleteCategory(cat); | MylarTaskListPlugin.getTaskListManager().getTaskList().deleteCategory(cat); | public void testLocalBugUnqual() throws InterruptedException { lists.clear(); String bugPrefix = "<server>-"; // TaskList t = MylarTaskListPlugin.getTaskListManager().getTaskList(); // MylarTaskListPlugin.getTaskListManager().setTaskList(t); TaskListManager manager = MylarTaskListPlugin.getTaskListManager(); TaskCategory cat = new TaskCategory("Testing Category"); manager.addCategory(cat); BugzillaTask bugTask1 = new BugzillaTask(bugPrefix + 94185, "<bugzilla info>", true); manager.moveToCategory(cat, bugTask1); // cat.addTask(bugTask1); while (bugTask1.isCurrentlySynchronizing()) { Thread.sleep(500); } BugzillaTask bugTask2 = new BugzillaTask(bugPrefix + 3692, "<bugzilla info>", true); manager.moveToCategory(cat, bugTask2); // cat.addTask(bugTask2); while (bugTask2.isCurrentlySynchronizing()) { Thread.sleep(500); } BugzillaTask bugTask3 = new BugzillaTask(bugPrefix + 3693, "<bugzilla info>", true); manager.moveToCategory(cat, bugTask3); // cat.addTask(bugTask3); while (bugTask3.isCurrentlySynchronizing()) { Thread.sleep(500); } BugzillaTask bugTask4 = new BugzillaTask(bugPrefix + 9583, "<bugzilla info>", true); manager.moveToCategory(cat, bugTask4); // cat.addTask(bugTask4); while (bugTask4.isCurrentlySynchronizing()) { Thread.sleep(500); } BugzillaMylarSearch s = new BugzillaMylarSearch(BugzillaMylarSearch.LOCAL_UNQUAL, astNodeType, IBugzillaConstants.ECLIPSE_BUGZILLA_URL); 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); // 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()); MylarBugsPlugin.getBridge().removeFromLandmarksHash(astNodeType); MylarTaskListPlugin.getTaskListManager().deleteCategory(cat); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/13614594a9b173e07f135be6945c24ae86a7b752/BugzillaSearchPluginTest.java/clean/org.eclipse.mylyn.tests/src/org/eclipse/mylyn/tests/misc/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,
3532,
3567,
34,
10951,
31,
202,
202,
759,
3837,
682,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3532,
3567,
34,
10951,
31,
202,
202,
759,
3837,
682,
... |
this.breakCallStack = false; | protected void doSetUp() throws Exception { serverUri = getInDest().getUri(); // reset the flag this.breakCallStack = false; } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/def74bdd482793071b3a83149ab7b8f157a7ca1f/UdpConnectorFunctionalTestCase.java/clean/providers/udp/src/test/java/org/mule/providers/udp/UdpConnectorFunctionalTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
741,
694,
1211,
1435,
1216,
1185,
565,
288,
3639,
1438,
3006,
273,
7854,
9378,
7675,
588,
3006,
5621,
3639,
368,
2715,
326,
2982,
1850,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
741,
694,
1211,
1435,
1216,
1185,
565,
288,
3639,
1438,
3006,
273,
7854,
9378,
7675,
588,
3006,
5621,
3639,
368,
2715,
326,
2982,
1850,
289,
2,
-100,
-100,
-100,
-100,
-100,
-1... | |
Container cp = getContentPane(); m_editorPane = new JEditorPane(); m_editorPane.setEditable(false); JScrollPane scroller = new JScrollPane(m_editorPane); cp.add(scroller, "Center"); Box bbut = Box.createHorizontalBox(); bbut.add(Box.createHorizontalGlue()); bbut.add(m_closeButton); bbut.add(Box.createHorizontalGlue()); cp.add(bbut, "South"); m_editorPane.addHyperlinkListener(new HListener(m_parent, false)); | public TagValidationFrame(MainWindow parent) { m_parent = parent; // set window size & position initWindowLayout(); Container cp = getContentPane(); m_editorPane = new JEditorPane(); m_editorPane.setEditable(false); JScrollPane scroller = new JScrollPane(m_editorPane); cp.add(scroller, "Center"); // NOI18N Box bbut = Box.createHorizontalBox(); bbut.add(Box.createHorizontalGlue()); bbut.add(m_closeButton); bbut.add(Box.createHorizontalGlue()); cp.add(bbut, "South"); // NOI18N m_editorPane.addHyperlinkListener(new HListener(m_parent, false)); // Configure close button m_closeButton = new JButton(); m_closeButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doCancel(); } }); // Handle escape key to close the window KeyStroke escape = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false); Action escapeAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { doCancel(); } }; getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW). put(escape, "ESCAPE"); // NOI18N getRootPane().getActionMap().put("ESCAPE", escapeAction); // NOI18N updateUIText(); } | 8797 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8797/a48bc3476cb07b9c2d4e4868f70d5e99078447c5/TagValidationFrame.java/clean/src/org/omegat/gui/TagValidationFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4034,
4354,
3219,
12,
6376,
3829,
982,
13,
565,
288,
3639,
312,
67,
2938,
273,
982,
31,
3639,
368,
444,
2742,
963,
473,
1754,
3639,
1208,
3829,
3744,
5621,
3639,
4039,
3283,
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,
4034,
4354,
3219,
12,
6376,
3829,
982,
13,
565,
288,
3639,
312,
67,
2938,
273,
982,
31,
3639,
368,
444,
2742,
963,
473,
1754,
3639,
1208,
3829,
3744,
5621,
3639,
4039,
3283,
273,
... | |
if (prefix != null && prefix.equals("")) { prefix = null; } | public void setPrefix(String prefix) throws DOMException { if (syncData) { synchronizeData(); } // treat an empty string as a null if (prefix != null && prefix.equals("")) { prefix = null; } if (namespaceURI == null || (prefix != null && ((prefix.equals("xmlns") && !namespaceURI.equals("http://www.w3.org/2000/xmlns/")) || (prefix.equals("xml") && !namespaceURI.equals("http://www.w3.org/XML/1998/namespace"))))) { throw new DOMExceptionImpl(DOMException.NAMESPACE_ERR, "DOM003 Namespace error"); } if (ownerDocument.errorChecking && !DocumentImpl.isXMLName(prefix)) { throw new DOMExceptionImpl(DOMException.INVALID_CHARACTER_ERR, "DOM002 Illegal character"); } this.prefix = prefix; } | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/75897d7a2cd6f262aaa9c4668e929e6b050c3281/AttrNSImpl.java/buggy/src/org/apache/xerces/dom/AttrNSImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
2244,
12,
780,
1633,
13,
3639,
1216,
4703,
503,
565,
288,
3639,
309,
261,
8389,
751,
13,
288,
5411,
16978,
751,
5621,
3639,
289,
202,
759,
10116,
392,
1008,
533,
487,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
2244,
12,
780,
1633,
13,
3639,
1216,
4703,
503,
565,
288,
3639,
309,
261,
8389,
751,
13,
288,
5411,
16978,
751,
5621,
3639,
289,
202,
759,
10116,
392,
1008,
533,
487,
27... | |
if (hiddenMode != null) { if (isValueReference(hiddenMode)) { ValueBinding vb = application.createValueBinding(hiddenMode); component.setHiddenMode(vb); } else { component.setHiddenMode(hiddenMode); } } | protected void setProperties(UIComponent uiComponent) { if (LOG.isDebugEnabled()) { if (DataColumnComponent.COMPONENT_TYPE==getComponentType()) { LOG.debug("Component id='"+getId()+"' type='"+getComponentType()+"'."); } LOG.debug(" visible='"+visible+"'"); LOG.debug(" hiddenMode='"+hiddenMode+"'"); LOG.debug(" text='"+text+"'"); LOG.debug(" toolTipText='"+toolTipText+"'"); LOG.debug(" alignment='"+alignment+"'"); LOG.debug(" foregroundColor='"+foregroundColor+"'"); LOG.debug(" backgroundColor='"+backgroundColor+"'"); LOG.debug(" styleClass='"+styleClass+"'"); LOG.debug(" ascending='"+ascending+"'"); LOG.debug(" sortComparator='"+sortComparator+"'"); LOG.debug(" resizable='"+resizable+"'"); LOG.debug(" width='"+width+"'"); LOG.debug(" maxWidth='"+maxWidth+"'"); LOG.debug(" minWidth='"+minWidth+"'"); LOG.debug(" verticalAlign='"+verticalAlign+"'"); LOG.debug(" value='"+value+"'"); LOG.debug(" defaultCellImageURL='"+defaultCellImageURL+"'"); LOG.debug(" cellImageURL='"+cellImageURL+"'"); LOG.debug(" cellStyleClass='"+cellStyleClass+"'"); LOG.debug(" autoFilter='"+autoFilter+"'"); } super.setProperties(uiComponent); if ((uiComponent instanceof DataColumnComponent)==false) { throw new IllegalStateException("Component specified by tag is not instanceof of 'DataColumnComponent'."); } DataColumnComponent component = (DataColumnComponent) uiComponent; FacesContext facesContext = getFacesContext(); Application application = facesContext.getApplication(); if (visible != null) { if (isValueReference(visible)) { ValueBinding vb = application.createValueBinding(visible); component.setVisible(vb); } else { component.setVisible(getBoolean(visible)); } } if (hiddenMode != null) { if (isValueReference(hiddenMode)) { ValueBinding vb = application.createValueBinding(hiddenMode); component.setHiddenMode(vb); } else { component.setHiddenMode(hiddenMode); } } if (text != null) { if (isValueReference(text)) { ValueBinding vb = application.createValueBinding(text); component.setText(vb); } else { component.setText(text); } } if (toolTipText != null) { if (isValueReference(toolTipText)) { ValueBinding vb = application.createValueBinding(toolTipText); component.setToolTipText(vb); } else { component.setToolTipText(toolTipText); } } if (alignment != null) { if (isValueReference(alignment)) { ValueBinding vb = application.createValueBinding(alignment); component.setAlignment(vb); } else { component.setAlignment(alignment); } } if (foregroundColor != null) { if (isValueReference(foregroundColor)) { ValueBinding vb = application.createValueBinding(foregroundColor); component.setForegroundColor(vb); } else { component.setForegroundColor(foregroundColor); } } if (backgroundColor != null) { if (isValueReference(backgroundColor)) { ValueBinding vb = application.createValueBinding(backgroundColor); component.setBackgroundColor(vb); } else { component.setBackgroundColor(backgroundColor); } } if (sortListeners != null) { parseActionListener(application, component, SORT_LISTENER_TYPE, sortListeners); } if (styleClass != null) { if (isValueReference(styleClass)) { ValueBinding vb = application.createValueBinding(styleClass); component.setStyleClass(vb); } else { component.setStyleClass(styleClass); } } if (ascending != null) { if (isValueReference(ascending)) { ValueBinding vb = application.createValueBinding(ascending); component.setAscending(vb); } else { component.setAscending(getBool(ascending)); } } if (sortComparator != null) { ValueBinding vb = application.createValueBinding(sortComparator); component.setSortComparator(vb); } if (resizable != null) { if (isValueReference(resizable)) { ValueBinding vb = application.createValueBinding(resizable); component.setResizable(vb); } else { component.setResizable(getBool(resizable)); } } if (width != null) { if (isValueReference(width)) { ValueBinding vb = application.createValueBinding(width); component.setWidth(vb); } else { component.setWidth(width); } } if (maxWidth != null) { if (isValueReference(maxWidth)) { ValueBinding vb = application.createValueBinding(maxWidth); component.setMaxWidth(vb); } else { component.setMaxWidth(getInt(maxWidth)); } } if (minWidth != null) { if (isValueReference(minWidth)) { ValueBinding vb = application.createValueBinding(minWidth); component.setMinWidth(vb); } else { component.setMinWidth(getInt(minWidth)); } } if (verticalAlign != null) { if (isValueReference(verticalAlign)) { ValueBinding vb = application.createValueBinding(verticalAlign); component.setVerticalAlign(vb); } else { component.setVerticalAlign(verticalAlign); } } if (value != null) { if (isValueReference(value)) { ValueBinding vb = application.createValueBinding(value); component.setValue(vb); } else { component.setValue(value); } } if (defaultCellImageURL != null) { if (isValueReference(defaultCellImageURL)) { ValueBinding vb = application.createValueBinding(defaultCellImageURL); component.setDefaultCellImageURL(vb); } else { component.setDefaultCellImageURL(defaultCellImageURL); } } if (cellImageURL != null) { if (isValueReference(cellImageURL)) { ValueBinding vb = application.createValueBinding(cellImageURL); component.setCellImageURL(vb); } else { component.setCellImageURL(cellImageURL); } } if (cellStyleClass != null) { if (isValueReference(cellStyleClass)) { ValueBinding vb = application.createValueBinding(cellStyleClass); component.setCellStyleClass(vb); } else { component.setCellStyleClass(cellStyleClass); } } if (autoFilter != null) { if (isValueReference(autoFilter)) { ValueBinding vb = application.createValueBinding(autoFilter); component.setAutoFilter(vb); } else { component.setAutoFilter(getBool(autoFilter)); } } if (converter != null) { if (isValueReference(converter)) { ValueBinding vb = application.createValueBinding(converter); component.setConverter(vb); } else { component.setConverter(application.createConverter(converter)); } } } | 6232 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6232/1f1850be471d4b8bfd2f3c50aa61bc39bf91259a/DataColumnTag.java/clean/org.rcfaces.core/src/org/rcfaces/core/internal/taglib/DataColumnTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
23126,
12,
5370,
1841,
5915,
1841,
13,
288,
202,
202,
430,
261,
4842,
18,
291,
2829,
1526,
10756,
288,
1082,
202,
430,
261,
751,
1494,
1841,
18,
22922,
67,
2399,
631,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
23126,
12,
5370,
1841,
5915,
1841,
13,
288,
202,
202,
430,
261,
4842,
18,
291,
2829,
1526,
10756,
288,
1082,
202,
430,
261,
751,
1494,
1841,
18,
22922,
67,
2399,
631,
58... | |
else if (e.getSource() instanceof JTextArea && e.getButton() == MouseEvent.BUTTON1) { JTextArea field = (JTextArea) e.getSource(); try { result = field.getDocument().getText(0, field.getDocument().getLength()); } catch (Exception exc) {System.out.println(exc);} } | public void mousePressed(MouseEvent e) { if (e.getSource() instanceof JTextField && e.getButton() == MouseEvent.BUTTON1) { JTextField field = (JTextField) e.getSource(); try { result = field.getDocument().getText(0, field.getDocument().getLength()); } catch (Exception exc) {System.out.println(exc);} } if (e.getSource() instanceof JRowBox && e.getButton() == MouseEvent.BUTTON1) { JRowBox thisBox = (JRowBox) e.getSource(); result = (String) thisBox.getSelectedItem(); } else if (e.getSource() instanceof JTextArea && e.getButton() == MouseEvent.BUTTON1) { JTextArea field = (JTextArea) e.getSource(); try { result = field.getDocument().getText(0, field.getDocument().getLength()); } catch (Exception exc) {System.out.println(exc);} } } | 46826 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46826/835ee8fbcdd2f2630bbfb0d0a4905e1188009198/VariableComboEditor.java/clean/loci/ome/notebook/VariableComboEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
7644,
24624,
12,
9186,
1133,
425,
13,
288,
202,
225,
309,
261,
73,
18,
588,
1830,
1435,
1276,
804,
16157,
597,
1377,
425,
18,
588,
3616,
1435,
422,
17013,
1133,
18,
20068,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
7644,
24624,
12,
9186,
1133,
425,
13,
288,
202,
225,
309,
261,
73,
18,
588,
1830,
1435,
1276,
804,
16157,
597,
1377,
425,
18,
588,
3616,
1435,
422,
17013,
1133,
18,
20068,
21... | |
debug=Messages.getString("GroupBy.Debug.CalcAggregateStart"); | debug="calcAggregate start"; | private void calcAggregate(Row r) { debug=Messages.getString("GroupBy.Debug.CalcAggregateStart"); //$NON-NLS-1$ for (int i=0;i<data.subjectnrs.length;i++) { debug=Messages.getString("GroupBy.Debug.CalcAggregateStartLoop"); //$NON-NLS-1$ Value subj = r.getValue(data.subjectnrs[i]); Value value = data.agg.getValue(i); //System.out.println(" calcAggregate value, i="+i+", agg.size()="+agg.size()+", subj="+subj+", value="+value); debug=Messages.getString("GroupBy.Debug.CalcAggregateSwitch"); //$NON-NLS-1$ switch(meta.getAggregateType()[i]) { case GroupByMeta.TYPE_GROUP_SUM : value.plus(subj); break; case GroupByMeta.TYPE_GROUP_AVERAGE : value.plus(subj); data.counts[i]++; break; case GroupByMeta.TYPE_GROUP_COUNT_ALL : data.counts[i]++; break; case GroupByMeta.TYPE_GROUP_MIN : if (subj.compare(value)<0) value.setValue(subj); break; case GroupByMeta.TYPE_GROUP_MAX : if (subj.compare(value)>0) value.setValue(subj); break; case GroupByMeta.TYPE_GROUP_CONCAT_COMMA : if (!subj.isNull()) { if (value.getStringLength()>0) value.setValue(value.getString()+", "); //$NON-NLS-1$ value.setValue(value.getString()+subj.getString()); } break; default: break; } } debug=Messages.getString("GroupBy.Debug.CalcAggregateEnd"); //$NON-NLS-1$ } | 9547 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9547/754fb164f144a027078c68d9f9e667ecc61dbfdb/GroupBy.java/buggy/src/be/ibridge/kettle/trans/step/groupby/GroupBy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
7029,
11490,
12,
1999,
436,
13,
202,
95,
202,
202,
4148,
1546,
12448,
11490,
787,
14432,
4329,
3993,
17,
5106,
17,
21,
8,
9506,
202,
1884,
261,
474,
277,
33,
20,
31,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
7029,
11490,
12,
1999,
436,
13,
202,
95,
202,
202,
4148,
1546,
12448,
11490,
787,
14432,
4329,
3993,
17,
5106,
17,
21,
8,
9506,
202,
1884,
261,
474,
277,
33,
20,
31,
7... |
return ut; | ut.token = this.token; return ut; | public Object clone() { UnionType ut = new UnionType(new_num()); ut.switch_type_spec = this.switch_type_spec; ut.switch_body = switch_body; ut.pack_name = this.pack_name; ut.name = this.name; ut.written = this.written; ut.scopeData = this.scopeData; ut.enclosing_symbol = this.enclosing_symbol; return ut; } | 46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/dd381f6fad964a54cc4cf3da1745df94110a3459/UnionType.java/clean/src/org/jacorb/idl/UnionType.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
3236,
1435,
565,
288,
202,
14325,
559,
5218,
273,
394,
9589,
559,
12,
2704,
67,
2107,
10663,
202,
322,
18,
9610,
67,
723,
67,
2793,
273,
333,
18,
9610,
67,
723,
67,
2793,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
3236,
1435,
565,
288,
202,
14325,
559,
5218,
273,
394,
9589,
559,
12,
2704,
67,
2107,
10663,
202,
322,
18,
9610,
67,
723,
67,
2793,
273,
333,
18,
9610,
67,
723,
67,
2793,
... |
public void setConf(NutchConf conf) { this.nutchConf = conf; | public void setConf(Configuration conf) { this.conf = conf; | public void setConf(NutchConf conf) { this.nutchConf = conf; } | 1316 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1316/25437bc825d50715dcc9a289a1b4c8fbbc6aced1/URLQueryFilter.java/clean/src/plugin/query-url/src/java/org/apache/nutch/searcher/url/URLQueryFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
3976,
12,
50,
322,
343,
3976,
2195,
13,
288,
565,
333,
18,
82,
322,
343,
3976,
273,
2195,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
3976,
12,
50,
322,
343,
3976,
2195,
13,
288,
565,
333,
18,
82,
322,
343,
3976,
273,
2195,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
int atchar = URI.indexOf('@'); if (atchar == -1) { throw new MalformedURLException(); | if(uri.extra != null) { extra = new byte[uri.extra.length]; System.arraycopy(uri.extra, 0, extra, 0, extra.length); | public FreenetURI(String URI) throws MalformedURLException { if (URI == null) { throw new MalformedURLException("No URI specified"); } // check scheme int colon = URI.indexOf(':'); if ((colon != -1) && !URI.substring(0, colon).equalsIgnoreCase("freenet")) { throw new MalformedURLException("Invalid scheme for Freenet URI"); } // decode keyType int atchar = URI.indexOf('@'); if (atchar == -1) { throw new MalformedURLException(); } else { keyType = URI.substring(colon + 1, atchar).toUpperCase().trim(); } URI = URI.substring(atchar + 1); // decode metaString int slash2; Vector sv = new Vector(); while ((slash2 = URI.lastIndexOf("/")) != -1) { String s = URI.substring(slash2 + "/".length()); if (s != null) sv.addElement(s); URI = URI.substring(0, slash2); } boolean b = false; if("SSK".equals(keyType) || (b="USK".equals(keyType))) { if(sv.isEmpty()) throw new MalformedURLException("No docname"); docName = (String) sv.remove(sv.size()-1); if(b) { if(sv.isEmpty()) throw new MalformedURLException("No suggested edition number for USK"); try { suggestedEdition = Long.parseLong((String)sv.remove(sv.size()-1)); } catch (NumberFormatException e) { MalformedURLException e1 = new MalformedURLException("Invalid suggested edition: "+e); e1.initCause(e); throw e1; } } else suggestedEdition = -1; } else if(keyType.equalsIgnoreCase("KSK")) { docName = URI; metaStr = null; routingKey = null; cryptoKey = null; extra = null; suggestedEdition = -1; return; } else { // docName not necessary, nor is it supported, for CHKs. docName = null; suggestedEdition = -1; } if (!sv.isEmpty()) { metaStr = new String[sv.size()]; for (int i = 0; i < metaStr.length; i++) metaStr[i] = (String) sv.elementAt(metaStr.length - 1 - i); } else { metaStr = null; } // strip 'file extensions' from CHKs // added by aum (david@rebirthing.co.nz) if ("CHK".equals(keyType)) { URI = URI.split("[.]")[0]; } // URI now contains: routingKey[,cryptoKey][,metaInfo] StringTokenizer st = new StringTokenizer(URI, ","); try { if (st.hasMoreTokens()) { routingKey = Base64.decode(st.nextToken()); } else { routingKey = cryptoKey = extra = null; return; } if (!st.hasMoreTokens()) { cryptoKey = extra = null; return; } // Can be cryptokey or name-value pair. String t = st.nextToken(); cryptoKey = Base64.decode(t); if (!st.hasMoreTokens()) { extra = null; return; } extra = Base64.decode(st.nextToken()); } catch (IllegalBase64Exception e) { throw new MalformedURLException("Invalid Base64 quantity: " + e); } } | 46035 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46035/16aaa5f4a386abac6ba9a9554c3f6382c8d3fa71/FreenetURI.java/buggy/src/freenet/keys/FreenetURI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
478,
2842,
278,
3098,
12,
780,
3699,
13,
1216,
20710,
288,
202,
202,
430,
261,
3098,
422,
446,
13,
288,
1082,
202,
12849,
394,
20710,
2932,
2279,
3699,
1269,
8863,
202,
202,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
478,
2842,
278,
3098,
12,
780,
3699,
13,
1216,
20710,
288,
202,
202,
430,
261,
3098,
422,
446,
13,
288,
1082,
202,
12849,
394,
20710,
2932,
2279,
3699,
1269,
8863,
202,
202,
9... |
if (input.forceReader) return null; | public String getEncoding() { if (input.forceReader) return null; return (input.inputEncoding == null) ? "UTF-8" : input.inputEncoding; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/27e9978154ebcb2e4d9c4e05e11bf17d1b8e1ef5/XMLParser.java/buggy/core/src/classpath/gnu/gnu/xml/stream/XMLParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
29505,
1435,
225,
288,
565,
309,
261,
2630,
18,
5734,
2514,
13,
1377,
327,
446,
31,
565,
327,
261,
2630,
18,
2630,
4705,
422,
446,
13,
692,
315,
5159,
17,
28,
6,
294,
810,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
29505,
1435,
225,
288,
565,
309,
261,
2630,
18,
5734,
2514,
13,
1377,
327,
446,
31,
565,
327,
261,
2630,
18,
2630,
4705,
422,
446,
13,
692,
315,
5159,
17,
28,
6,
294,
810,
... | |
cfw.markLabel(isNumberLabel); | cfw.markLabel(isNumberLabel, stack); | private void dcpLoadAsObject(int dcp_register) { cfw.addALoad(dcp_register); cfw.add(ByteCode.GETSTATIC, "java/lang/Void", "TYPE", "Ljava/lang/Class;"); int isNumberLabel = cfw.acquireLabel(); int beyond = cfw.acquireLabel(); cfw.add(ByteCode.IF_ACMPEQ, isNumberLabel); cfw.addALoad(dcp_register); cfw.add(ByteCode.GOTO, beyond); cfw.markLabel(isNumberLabel); cfw.addDLoad(dcp_register + 1); addDoubleWrap(); cfw.markLabel(beyond); } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/5a691b58fa9078dc6cdf67ede627d293ff262d9b/Codegen.java/buggy/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
302,
4057,
2563,
1463,
921,
12,
474,
302,
4057,
67,
4861,
13,
565,
288,
3639,
6080,
91,
18,
1289,
1013,
6189,
12,
72,
4057,
67,
4861,
1769,
3639,
6080,
91,
18,
1289,
12,
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,
3238,
918,
302,
4057,
2563,
1463,
921,
12,
474,
302,
4057,
67,
4861,
13,
565,
288,
3639,
6080,
91,
18,
1289,
1013,
6189,
12,
72,
4057,
67,
4861,
1769,
3639,
6080,
91,
18,
1289,
12,
32... |
final long constantMaskValue; | private static boolean isIncompatibleMask(PsiBinaryExpression maskExpression, PsiExpression constantExpression){ final PsiJavaToken sign = maskExpression.getOperationSign(); final IElementType tokenType = sign.getTokenType(); final Object constantValue = ConstantExpressionUtil.computeCastTo(constantExpression, PsiType.LONG); if(constantValue == null){ return false; } final long constantLongValue = (Long) constantValue; final long constantMaskValue; final PsiExpression maskRhs = maskExpression.getROperand(); final PsiExpression maskLhs = maskExpression.getLOperand(); if(PsiUtil.isConstantExpression(maskRhs)){ final Object rhsValue = ConstantExpressionUtil.computeCastTo(maskRhs, PsiType.LONG); if (rhsValue == null) { return false; // Might indeed be the case with "null" literal whoes constant value evaluates to null. Check out (a|null) case. } constantMaskValue = ((Long) rhsValue); } else{ final Object lhsValue = ConstantExpressionUtil.computeCastTo(maskLhs, PsiType.LONG); constantMaskValue = ((Long) lhsValue); } if(tokenType.equals(JavaTokenType.OR)){ if((constantMaskValue | constantLongValue) != constantLongValue){ return true; } } if(tokenType.equals(JavaTokenType.AND)){ if((constantMaskValue | constantLongValue) != constantMaskValue){ return true; } } return false; } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/fca4a2a7b3bb9b4ae2848f026d06eb262318948d/IncompatibleMaskInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/bitwise/IncompatibleMaskInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
8048,
10943,
5796,
12,
52,
7722,
5905,
2300,
3066,
2300,
16,
4766,
2868,
453,
7722,
2300,
5381,
2300,
15329,
3639,
727,
453,
7722,
5852,
1345,
1573,
273,
3066,
2300,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
8048,
10943,
5796,
12,
52,
7722,
5905,
2300,
3066,
2300,
16,
4766,
2868,
453,
7722,
2300,
5381,
2300,
15329,
3639,
727,
453,
7722,
5852,
1345,
1573,
273,
3066,
2300,
18,
... | |
cTmp.setTransparency(255); | iTransparency = (bTransparencyChanged) ? this.iTransparency : ((ColorDefinition) fCurrent) .getTransparency(); | public void mouseDown(MouseEvent e) { fireHandleEvent(MOUSE_CLICKED_EVENT); if (e.getSource().equals(cnvSelection)) { toggleDropDown(); } else if (e.getSource() instanceof ColorSelectionCanvas) { ColorDefinition cTmp = AttributeFactory.eINSTANCE.createColorDefinition(); Color clrTmp = ((ColorSelectionCanvas) e.getSource()).getColorAt(e.x, e.y); cTmp.set(clrTmp.getRed(), clrTmp.getGreen(), clrTmp.getBlue()); if (clrTmp.getRed() == 0) { cTmp.setTransparency(255); } setFill(cTmp); fireHandleEvent(FillChooserComposite.FILL_CHANGED_EVENT); cmpDropDown.getShell().dispose(); } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/328c8495576ec950cc922a812ac021ce2d28f134/FillChooserComposite.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/FillChooserComposite.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
7644,
4164,
12,
9186,
1133,
425,
13,
565,
288,
3639,
4452,
3259,
1133,
12,
5980,
8001,
67,
7697,
3507,
2056,
67,
10454,
1769,
3639,
309,
261,
73,
18,
588,
1830,
7675,
14963,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
7644,
4164,
12,
9186,
1133,
425,
13,
565,
288,
3639,
4452,
3259,
1133,
12,
5980,
8001,
67,
7697,
3507,
2056,
67,
10454,
1769,
3639,
309,
261,
73,
18,
588,
1830,
7675,
14963,
... |
copyPath = PathUtil.append(myRepositoryRoot, copyPath); | copyPath = PathUtil.encode(copyPath); copyPath = myRepository.getFullPath(copyPath); | public void addDir(String path, String copyPath, long copyRevision) throws SVNException { path = PathUtil.encode(path); DAVResource parentResource = (DAVResource) myDirsStack.peek(); if (parentResource.getWorkingURL() == null) { String filePath = PathUtil.append(parentResource.getURL(), PathUtil.tail(path)); DAVResponse responce = DAVUtil.getResourceProperties(myConnection, filePath, null, DAVElement.STARTING_PROPERTIES, true); if (responce != null) { throw new SVNException("Directory '" + filePath + "' already exists"); } } checkoutResource(parentResource); String wPath = parentResource.getWorkingURL(); DAVResource newDir = new DAVResource(myCommitMediator, myConnection, PathUtil.encode(path), -1, copyPath != null); newDir.setWorkingURL(PathUtil.append(wPath, PathUtil.tail(path))); myDirsStack.push(newDir); myPathsMap.put(newDir.getURL(), path); if (copyPath != null) { // convert to full path? copyPath = PathUtil.append(myRepositoryRoot, copyPath); // not implemented yet. DAVBaselineInfo info = DAVUtil.getBaselineInfo(myConnection, copyPath, copyRevision, false, false, null); copyPath = PathUtil.append(info.baselineBase, info.baselinePath); // full url. wPath = myLocation.getProtocol() + "://" + myLocation.getHost() + ":" + myLocation.getPort() + newDir.getWorkingURL(); DAVStatus status = myConnection.doCopy(copyPath, wPath); if (status.getResponseCode() != 201 && status.getResponseCode() != 204) { throw new SVNException("COPY failed: " + status); } } else { DAVStatus status = myConnection.doMakeCollection(newDir.getWorkingURL()); if (status.getResponseCode() != 201) { throw new SVNException("MKCOL failed: " + status); } } } | 2776 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2776/e6f73006295e39445d36ffed9f41c7b3c1c2614d/DAVCommitEditor.java/buggy/javasvn/src/org/tmatesoft/svn/core/internal/io/dav/DAVCommitEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
1621,
12,
780,
589,
16,
514,
1610,
743,
16,
1525,
1610,
7939,
13,
1216,
29537,
50,
503,
288,
3639,
589,
273,
2666,
1304,
18,
3015,
12,
803,
1769,
7734,
463,
5856,
1420,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
1621,
12,
780,
589,
16,
514,
1610,
743,
16,
1525,
1610,
7939,
13,
1216,
29537,
50,
503,
288,
3639,
589,
273,
2666,
1304,
18,
3015,
12,
803,
1769,
7734,
463,
5856,
1420,
... |
RubyClass structClass = type.getRuntime().getClasses().getStructClass(); | RubyClass structClass = type.getRuntime().getClass("Struct"); | private static IRubyObject getInstanceVariable(RubyClass type, String name) { RubyClass structClass = type.getRuntime().getClasses().getStructClass(); while (type != null && type != structClass) { IRubyObject variable = type.getInstanceVariable(name); if (variable != null) { return variable; } type = type.getSuperClass(); } return type.getRuntime().getNil(); } | 50993 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50993/ca6b16e996ea9af83ce593594b9c69b9364a9924/RubyStruct.java/clean/src/org/jruby/RubyStruct.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
15908,
10340,
921,
3694,
3092,
12,
54,
10340,
797,
618,
16,
514,
508,
13,
288,
3639,
19817,
797,
1958,
797,
273,
618,
18,
588,
5576,
7675,
588,
797,
2932,
3823,
8863,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
15908,
10340,
921,
3694,
3092,
12,
54,
10340,
797,
618,
16,
514,
508,
13,
288,
3639,
19817,
797,
1958,
797,
273,
618,
18,
588,
5576,
7675,
588,
797,
2932,
3823,
8863,
3639,
1... |
processChildren(manager.getItems(), addGroup(manager, parentLocation)); | processChildren(manager.getItems(), parentLocation); | private void addContributionManager(IContributionManager manager, SLocation parentLocation) { System.err.println("addContributionManager: unknown: " //$NON-NLS-1$ + manager.getClass().getName()); processChildren(manager.getItems(), addGroup(manager, parentLocation)); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/5af242f9e1cef0507ee8fbeaa76acd846c7379b7/LegacyMenuManager.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/LegacyMenuManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
527,
442,
4027,
1318,
12,
45,
442,
4027,
1318,
3301,
16,
1082,
202,
55,
2735,
982,
2735,
13,
288,
202,
202,
3163,
18,
370,
18,
8222,
2932,
1289,
442,
4027,
1318,
30,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
527,
442,
4027,
1318,
12,
45,
442,
4027,
1318,
3301,
16,
1082,
202,
55,
2735,
982,
2735,
13,
288,
202,
202,
3163,
18,
370,
18,
8222,
2932,
1289,
442,
4027,
1318,
30,
5... |
public void focusGained(FocusEvent e) { _lastFocusOwner = _junitErrorPanel; } | public void focusGained(FocusEvent e) { _lastFocusOwner = _compilerErrorPanel; } | public void focusGained(FocusEvent e) { _lastFocusOwner = _junitErrorPanel; } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/89ce626553f46c8001d10031c8a245d2124e251e/MainFrame.java/buggy/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
7155,
43,
8707,
12,
9233,
1133,
425,
13,
288,
389,
2722,
9233,
5541,
273,
389,
78,
4873,
668,
5537,
31,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
7155,
43,
8707,
12,
9233,
1133,
425,
13,
288,
389,
2722,
9233,
5541,
273,
389,
78,
4873,
668,
5537,
31,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
final CommandManager commandManager, final IActiveChecker activeChecker) { if (bindingManager == null) { throw new NullPointerException( "The callback needs a binding manager"); } | final CommandManager commandManager) { this(bindingManager, commandManager, new IActiveChecker() { public boolean isActive(String commandId) { return true; } | public CommandCallback(final BindingManager bindingManager, final CommandManager commandManager, final IActiveChecker activeChecker) { if (bindingManager == null) { throw new NullPointerException( "The callback needs a binding manager"); //$NON-NLS-1$ } if (commandManager == null) { throw new NullPointerException( "The callback needs a command manager"); //$NON-NLS-1$ } if (activeChecker == null) { throw new NullPointerException( "The callback needs an active callback"); //$NON-NLS-1$ } this.activeChecker = activeChecker; this.bindingManager = bindingManager; this.commandManager = commandManager; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/27a0b33bc311f95dbf221a6ff17f50aa537c6a6c/ExternalActionManager.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/action/ExternalActionManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
3498,
2428,
12,
6385,
15689,
1318,
5085,
1318,
16,
9506,
202,
6385,
3498,
1318,
1296,
1318,
16,
9506,
202,
6385,
467,
3896,
8847,
2695,
8847,
13,
288,
1082,
202,
430,
261,
7374... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3498,
2428,
12,
6385,
15689,
1318,
5085,
1318,
16,
9506,
202,
6385,
3498,
1318,
1296,
1318,
16,
9506,
202,
6385,
467,
3896,
8847,
2695,
8847,
13,
288,
1082,
202,
430,
261,
7374... |
LogicalMessage msg = holder.getLMC().getMessage(); | LogicalMessageContext lmc = holder.getLMC(); LogicalMessage msg = lmc.getMessage(); | private void insertFaultMessage(ContextHolder holder, ProtocolException exception) { try { SOAPMessageContext context = holder.getSMC(); if (context == null) { // non-soap case LogicalMessage msg = holder.getLMC().getMessage(); if (msg != null) { msg.setPayload(null); } return; } SOAPMessage message = context.getMessage(); SOAPEnvelope envelope = message.getSOAPPart().getEnvelope(); SOAPBody body = envelope.getBody(); if (body.hasFault()) { return; } if (envelope.getHeader() != null) { envelope.getHeader().detachNode(); } body.removeContents(); SOAPFault fault = body.addFault(); String envelopeNamespace = envelope.getNamespaceURI(); if (exception instanceof SOAPFaultException) { SOAPFaultException sfe = (SOAPFaultException) exception; SOAPFault userFault = sfe.getFault(); QName faultCode = userFault.getFaultCodeAsQName(); if (faultCode == null) { faultCode = determineFaultCode(context); } fault.setFaultCode(faultCode); String faultString = userFault.getFaultString(); if (faultString == null) { if (sfe.getMessage() != null) { faultString = sfe.getMessage(); } else { faultString = sfe.toString(); } } fault.setFaultString(faultString); String faultActor = userFault.getFaultActor(); if (faultActor == null) { faultActor = ""; } fault.setFaultActor(faultActor); if (userFault.getDetail() != null) { fault.addChildElement(userFault.getDetail()); } } else { fault.setFaultCode(determineFaultCode(context)); if (exception.getMessage() != null) { fault.setFaultString(exception.getMessage()); } else { fault.setFaultString(exception.toString()); } } } catch (Exception e) { // severe since this is from runtime and not handler logger.log(Level.SEVERE, "exception while creating fault message in handler chain", e); throw new RuntimeException(e); } } | 9667 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9667/b558afd90bf6f0bb5f8721bdda2a3f641067a9a6/HandlerChainCaller.java/clean/jaxws-ri/rt/src/com/sun/xml/ws/handler/HandlerChainCaller.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2243,
7083,
1079,
12,
1042,
6064,
10438,
16,
3639,
4547,
503,
1520,
13,
288,
7734,
775,
288,
5411,
16434,
1079,
1042,
819,
273,
10438,
18,
588,
7303,
39,
5621,
5411,
309,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2243,
7083,
1079,
12,
1042,
6064,
10438,
16,
3639,
4547,
503,
1520,
13,
288,
7734,
775,
288,
5411,
16434,
1079,
1042,
819,
273,
10438,
18,
588,
7303,
39,
5621,
5411,
309,
261,
... |
static public double min(Context cx, Scriptable thisObj, Object[] args, Function funObj) | public static double min(Context cx, Scriptable thisObj, Object[] args, Function funObj) | static public double min(Context cx, Scriptable thisObj, Object[] args, Function funObj) { double result = Double.POSITIVE_INFINITY; if (args.length == 0) return result; for (int i = 0; i < args.length; i++) { double d = ScriptRuntime.toNumber(args[i]); if (d != d) return d; result = Math.min(result, d); } return result; } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/3ef540f70dc64e503df2b7ca56d6cf65647fcf42/NativeMath.java/buggy/js/rhino/org/mozilla/javascript/NativeMath.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1071,
1645,
1131,
12,
1042,
9494,
16,
22780,
15261,
16,
19694,
1033,
8526,
833,
16,
4284,
9831,
2675,
13,
565,
288,
3639,
1645,
563,
273,
3698,
18,
7057,
16325,
67,
17716,
31,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1071,
1645,
1131,
12,
1042,
9494,
16,
22780,
15261,
16,
19694,
1033,
8526,
833,
16,
4284,
9831,
2675,
13,
565,
288,
3639,
1645,
563,
273,
3698,
18,
7057,
16325,
67,
17716,
31,
3639,
... |
OrthogonalSampleData oSample = DataFactory.eINSTANCE.createOrthogonalSampleData(); oSample.setDataSetRepresentation("5,4,12"); oSample.setSeriesDefinitionIndex(0); sd.getOrthogonalSampleData().add(oSample); | OrthogonalSampleData oSample = DataFactory.eINSTANCE.createOrthogonalSampleData( ); oSample.setDataSetRepresentation( "5,4,12" ); oSample.setSeriesDefinitionIndex( 0 ); sd.getOrthogonalSampleData( ).add( oSample ); | private void addSampleData(Chart newChart) { SampleData sd = DataFactory.eINSTANCE.createSampleData(); sd.getBaseSampleData().clear(); sd.getOrthogonalSampleData().clear(); // Create Base Sample Data BaseSampleData sdBase = DataFactory.eINSTANCE.createBaseSampleData(); sdBase.setDataSetRepresentation("A, B, C"); //$NON-NLS-1$ sd.getBaseSampleData().add(sdBase); // Create Orthogonal Sample Data (with simulation count of 2) OrthogonalSampleData oSample = DataFactory.eINSTANCE.createOrthogonalSampleData(); oSample.setDataSetRepresentation("5,4,12"); //$NON-NLS-1$ oSample.setSeriesDefinitionIndex(0); sd.getOrthogonalSampleData().add(oSample); /* * OrthogonalSampleData oSample2 = DataFactory.eINSTANCE.createOrthogonalSampleData(); * oSample2.setDataSetRepresentation("7,22,14"); oSample2.setSeriesDefinitionIndex(0); * sd.getOrthogonalSampleData().add(oSample2); */ newChart.setSampleData(sd); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/baa5e816320b37d313f82b2e70ae4a71b1f4e89d/PieChart.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/type/PieChart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
527,
8504,
751,
12,
7984,
394,
7984,
13,
565,
288,
3639,
11474,
751,
8349,
273,
1910,
1733,
18,
73,
13341,
18,
2640,
8504,
751,
5621,
3639,
8349,
18,
588,
2171,
8504,
751,
76... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
527,
8504,
751,
12,
7984,
394,
7984,
13,
565,
288,
3639,
11474,
751,
8349,
273,
1910,
1733,
18,
73,
13341,
18,
2640,
8504,
751,
5621,
3639,
8349,
18,
588,
2171,
8504,
751,
76... |
asm.emitPUSH_RegDisp(SP, (count-1)<<LG_WORDSIZE); | asm.emitPUSH_RegDisp(SP, Offset.fromIntZeroExtend((count-1)<<LG_WORDSIZE)); | protected final void emit_invokeinterface(VM_MethodReference methodRef) { int count = methodRef.getParameterWords() + 1; // +1 for "this" parameter VM_Method resolvedMethod = null; resolvedMethod = methodRef.peekInterfaceMethod(); // (1) Emit dynamic type checking sequence if required to do so inline. if (VM.BuildForIMTInterfaceInvocation || (VM.BuildForITableInterfaceInvocation && VM.DirectlyIndexedITables)) { if (resolvedMethod == null) { // Can't successfully resolve it at compile time. // Call uncommon case typechecking routine to do the right thing when this code actually executes. asm.emitMOV_Reg_RegDisp (T1, SP, (count-1) << 2); // "this" object asm.emitPUSH_Imm(methodRef.getId()); // dict id of target VM_ObjectModel.baselineEmitLoadTIB(asm, S0, T1); asm.emitPUSH_Reg(S0); genParameterRegisterLoad(2); // pass 2 parameter word asm.emitCALL_RegDisp(JTOC, VM_Entrypoints.unresolvedInvokeinterfaceImplementsTestMethod.getOffsetAsInt());// check that "this" class implements the interface } else { asm.emitMOV_Reg_RegDisp (T0, JTOC, resolvedMethod.getDeclaringClass().getTibOffset().toInt()); // tib of the interface method asm.emitMOV_Reg_RegDisp (T1, SP, (count-1) << 2); // "this" object asm.emitPUSH_RegDisp(T0, TIB_TYPE_INDEX << 2); // type of the interface method VM_ObjectModel.baselineEmitLoadTIB(asm, S0, T1); asm.emitPUSH_Reg(S0); genParameterRegisterLoad(2); // pass 2 parameter word asm.emitCALL_RegDisp(JTOC, VM_Entrypoints.invokeinterfaceImplementsTestMethod.getOffsetAsInt());// check that "this" class implements the interface } } // (2) Emit interface invocation sequence. if (VM.BuildForIMTInterfaceInvocation) { VM_InterfaceMethodSignature sig = VM_InterfaceMethodSignature.findOrCreate(methodRef); int offset = sig.getIMTOffset().toInt(); // squirrel away signature ID VM_ProcessorLocalState.emitMoveImmToField(asm, VM_Entrypoints.hiddenSignatureIdField.getOffsetAsInt(), sig.getId()); asm.emitMOV_Reg_RegDisp (T1, SP, (count-1) << 2); // "this" object VM_ObjectModel.baselineEmitLoadTIB(asm,S0,T1); if (VM.BuildForIndirectIMT) { // Load the IMT Base into S0 asm.emitMOV_Reg_RegDisp(S0, S0, TIB_IMT_TIB_INDEX << 2); } genParameterRegisterLoad(methodRef, true); asm.emitCALL_RegDisp(S0, offset); // the interface call } else if (VM.BuildForITableInterfaceInvocation && VM.DirectlyIndexedITables && resolvedMethod != null) { VM_Class I = resolvedMethod.getDeclaringClass(); asm.emitMOV_Reg_RegDisp (T1, SP, (count-1) << 2); // "this" object VM_ObjectModel.baselineEmitLoadTIB(asm,S0,T1); asm.emitMOV_Reg_RegDisp (S0, S0, TIB_ITABLES_TIB_INDEX << 2); // iTables asm.emitMOV_Reg_RegDisp (S0, S0, I.getInterfaceId() << 2); // iTable genParameterRegisterLoad(methodRef, true); int idx = VM_InterfaceInvocation.getITableIndex(I, methodRef.getName(), methodRef.getDescriptor()); asm.emitCALL_RegDisp(S0, idx << 2); // the interface call } else { int itableIndex = -1; if (VM.BuildForITableInterfaceInvocation && resolvedMethod != null) { // get the index of the method in the Itable itableIndex = VM_InterfaceInvocation.getITableIndex(resolvedMethod.getDeclaringClass(), methodRef.getName(), methodRef.getDescriptor()); } if (itableIndex == -1) { // itable index is not known at compile-time. // call "invokeInterface" to resolve object + method id into // method address int methodRefId = methodRef.getId(); asm.emitPUSH_RegDisp(SP, (count-1)<<LG_WORDSIZE); // "this" parameter is obj asm.emitPUSH_Imm(methodRefId); // id of method to call genParameterRegisterLoad(2); // pass 2 parameter words asm.emitCALL_RegDisp(JTOC, VM_Entrypoints.invokeInterfaceMethod.getOffsetAsInt()); // invokeinterface(obj, id) returns address to call asm.emitMOV_Reg_Reg (S0, T0); // S0 has address of method genParameterRegisterLoad(methodRef, true); asm.emitCALL_Reg(S0); // the interface method (its parameters are on stack) } else { // itable index is known at compile-time. // call "findITable" to resolve object + interface id into // itable address asm.emitMOV_Reg_RegDisp (T0, SP, (count-1) << 2); // "this" object VM_ObjectModel.baselineEmitLoadTIB(asm, S0, T0); asm.emitPUSH_Reg(S0); asm.emitPUSH_Imm (resolvedMethod.getDeclaringClass().getInterfaceId()); // interface id genParameterRegisterLoad(2); // pass 2 parameter words asm.emitCALL_RegDisp (JTOC, VM_Entrypoints.findItableMethod.getOffsetAsInt()); // findItableOffset(tib, id) returns iTable asm.emitMOV_Reg_Reg (S0, T0); // S0 has iTable genParameterRegisterLoad(methodRef, true); asm.emitCALL_RegDisp (S0, itableIndex << 2); // the interface call } } genResultRegisterUnload(methodRef); } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/607ce8428a60a1e2ea6aeee16fe403ddf08d4b83/VM_Compiler.java/clean/rvm/src/vm/arch/intel/compilers/baseline/VM_Compiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
727,
918,
3626,
67,
14407,
5831,
12,
7397,
67,
1305,
2404,
707,
1957,
13,
288,
565,
509,
1056,
273,
707,
1957,
18,
588,
1662,
7363,
1435,
397,
404,
31,
368,
397,
21,
364,
315,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
727,
918,
3626,
67,
14407,
5831,
12,
7397,
67,
1305,
2404,
707,
1957,
13,
288,
565,
509,
1056,
273,
707,
1957,
18,
588,
1662,
7363,
1435,
397,
404,
31,
368,
397,
21,
364,
315,
2... |
if(!hasMoreWin && count - 4 == 5) { | if (!hasMoreWin && count - 4 == 5) { | public void addFile(String fileName) { int count = windowMenu.getItemCount(); JMenuItem item; if(count == 4) { windowMenu.addSeparator(); count++; } JMenuItem lastItem = windowMenu.getItem(count -1); boolean hasMoreWin = false; int maxWin = 5; if(lastItem != null && lastItem.getText().equals("More Windows...")) { hasMoreWin = true; maxWin++; } if(!hasMoreWin && count - 4 == 5) { windowMenu.add(item = new JMenuItem("More Windows...", 'M')); item.setActionCommand("More Windows..."); item.addActionListener(this); return; } else if(count - 4 <= maxWin) { if(hasMoreWin) { count--; windowMenu.remove(lastItem); } File f = new File(fileName); windowMenu.add(item = new JMenuItem((char)('0' + (count-4)) + " " + f.getName(), '0' + (count - 4))); if(hasMoreWin) { windowMenu.add(lastItem); } } else { return; } item.setActionCommand(fileName); item.addActionListener(this); } | 19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/bebd557da53b74c60ab8525aa96904d4cee6224c/Main.java/buggy/toolsrc/org/mozilla/javascript/tools/debugger/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
18671,
12,
780,
3968,
13,
288,
3639,
509,
1056,
273,
2742,
4599,
18,
588,
30687,
5621,
3639,
804,
12958,
761,
31,
3639,
309,
12,
1883,
422,
1059,
13,
288,
5411,
2742,
4599,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18671,
12,
780,
3968,
13,
288,
3639,
509,
1056,
273,
2742,
4599,
18,
588,
30687,
5621,
3639,
804,
12958,
761,
31,
3639,
309,
12,
1883,
422,
1059,
13,
288,
5411,
2742,
4599,
1... |
public void createState() | /* package */ void createState(SmcLexer.Token token) | public void createState() { SmcState retval; if (_state_in_progress != null) { error("Cannot create new state while still filling in previous state (" + _state_in_progress.getName() + ").", false); } else { _state_in_progress = createTargetState(_token.getValue()); } return; } | 50995 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50995/ffbfa44caa39de8d579429432aa3aca8bd077721/SmcParser.java/buggy/net/sf/smc/SmcParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1748,
2181,
1195,
918,
752,
1119,
12,
9552,
71,
13356,
18,
1345,
1147,
13,
565,
288,
3639,
9425,
71,
1119,
5221,
31,
3639,
309,
261,
67,
2019,
67,
267,
67,
8298,
480,
446,
13,
3639,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1748,
2181,
1195,
918,
752,
1119,
12,
9552,
71,
13356,
18,
1345,
1147,
13,
565,
288,
3639,
9425,
71,
1119,
5221,
31,
3639,
309,
261,
67,
2019,
67,
267,
67,
8298,
480,
446,
13,
3639,
2... |
List<ITask> children = t.getChildren(); i = 0; for (i = 0; i < children.size(); i++) { writeTask(children.get(i), doc, node); | for (ITask t : task.getChildren()) { writeTask(t, doc, node); | public static void writeTask(ITask t, Document doc, Element root) { // create node and set attributes // Element node = doc.createElement("Task"); node.setAttribute("Path", t.getPath()); node.setAttribute("Label", t.getLabel()); node.setAttribute("Handle", t.getHandle()); node.setAttribute("Priority", t.getPriority()); if (t.isCategory()) { node.setAttribute("IsCategory", "true"); } else { node.setAttribute("IsCategory", "false"); } if (t.isCompleted()) { node.setAttribute("Complete", "true"); } else { node.setAttribute("Complete", "false"); } if (t.isActive()) { node.setAttribute("Active", "true"); } else { node.setAttribute("Active", "false"); } if (t instanceof BugzillaTask) { BugzillaTask bt = (BugzillaTask) t; node.setAttribute("Bugzilla", "true"); node.setAttribute("LastDate", new Long(bt.getLastRefreshTime() .getTime()).toString()); if (bt.isDirty()) { node.setAttribute("Dirty", "true"); } else { node.setAttribute("Dirty", "false"); } bt.saveBugReport(false); } else { node.setAttribute("Bugzilla", "false"); } node.setAttribute("Notes", t.getNotes()); node.setAttribute("Elapsed", t.getElapsedTime()); node.setAttribute("Estimated", t.getEstimatedTime()); List<String> rl = t.getRelatedLinks().getLinks(); int i = 0; for (String link : rl) { node.setAttribute("link"+i, link); i++; } List<ITask> children = t.getChildren(); i = 0; for (i = 0; i < children.size(); i++) { writeTask(children.get(i), doc, node); } // append new node to root node // root.appendChild(node); return; } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/bfd6c75025dd41ab813783fc0743c23cfe1c2fc2/XmlUtil.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/util/XmlUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
1045,
2174,
12,
1285,
835,
268,
16,
4319,
997,
16,
3010,
1365,
13,
288,
202,
202,
759,
752,
756,
471,
444,
1677,
202,
202,
759,
377,
1082,
202,
1046,
756,
273,
997... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
1045,
2174,
12,
1285,
835,
268,
16,
4319,
997,
16,
3010,
1365,
13,
288,
202,
202,
759,
752,
756,
471,
444,
1677,
202,
202,
759,
377,
1082,
202,
1046,
756,
273,
997... |
public int[] getIndexDoc() { | public int[] getIndexDoc() { | public int[] getIndexDoc() //OK { return indexDoc; } | 12667 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12667/dcebcb137cae72183f70dd584cabe1d90b452696/casaOpAdvances.java/buggy/src/imakante/sales/casaOpAdvances.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
8526,
8088,
1759,
1435,
368,
3141,
565,
288,
3639,
327,
770,
1759,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
8526,
8088,
1759,
1435,
368,
3141,
565,
288,
3639,
327,
770,
1759,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
{ if (stat != null) { if (stat.getResultSetConcurrency() == java.sql.ResultSet.CONCUR_UPDATABLE) return new org.postgresql.jdbc2.UpdateableResultSet((org.postgresql.jdbc2.Connection)conn, fields, tuples, status, updateCount, insertOID, binaryCursor); } | { if (stat != null) { if (stat.getResultSetConcurrency() == java.sql.ResultSet.CONCUR_UPDATABLE) return new org.postgresql.jdbc2.UpdateableResultSet((org.postgresql.jdbc2.Connection)conn, fields, tuples, status, updateCount, insertOID, binaryCursor); } | public java.sql.ResultSet getResultSet(org.postgresql.Connection conn, java.sql.Statement stat, Field[] fields, Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor) throws SQLException { // In 7.1 we now test concurrency to see which class to return. If we are not working with a // Statement then default to a normal ResultSet object. if (stat != null) { if (stat.getResultSetConcurrency() == java.sql.ResultSet.CONCUR_UPDATABLE) return new org.postgresql.jdbc2.UpdateableResultSet((org.postgresql.jdbc2.Connection)conn, fields, tuples, status, updateCount, insertOID, binaryCursor); } return new org.postgresql.jdbc2.ResultSet((org.postgresql.jdbc2.Connection)conn, fields, tuples, status, updateCount, insertOID, binaryCursor); } | 52628 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52628/ef7d7910745cf2812007668138eaaf0a8e1d8d99/Connection.java/buggy/src/interfaces/jdbc/org/postgresql/jdbc2/Connection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
8601,
694,
12,
3341,
18,
2767,
24330,
18,
1952,
1487,
16,
2252,
18,
4669,
18,
3406,
610,
16,
2286,
8526,
1466,
16,
5589,
10384,
16,
514,
1267,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
8601,
694,
12,
3341,
18,
2767,
24330,
18,
1952,
1487,
16,
2252,
18,
4669,
18,
3406,
610,
16,
2286,
8526,
1466,
16,
5589,
10384,
16,
514,
1267,
16,
... |
if ( getAxisForProcessing( ).getType( ) .equals( AxisType.DATE_TIME_LITERAL ) ) { Calendar cal = Calendar.getInstance( Locale.getDefault( ) ); cal.set( Calendar.MINUTE, 0 ); StringBuffer sbNewDate = new StringBuffer( "" ); sbNewDate.append( cal.get( Calendar.MONTH ) + 1 ); sbNewDate.append( "/" ); sbNewDate.append( cal.get( Calendar.DATE ) + iValueCount ); sbNewDate.append( "/" ); sbNewDate.append( cal.get( Calendar.YEAR ) ); sElement = sbNewDate.toString( ); } else { sElement = String.valueOf( 6.0 + iValueCount ); } iValueCount++; | private String getConvertedSampleDataRepresentation( String sOldRepresentation ) { StringTokenizer strtok = new StringTokenizer( sOldRepresentation, "," ); //$NON-NLS-1$ NumberFormat nf = NumberFormat.getNumberInstance( ); SimpleDateFormat sdf = new SimpleDateFormat( "MM/dd/yyyy", Locale.getDefault( ) ); //$NON-NLS-1$ StringBuffer sbNewRepresentation = new StringBuffer( "" ); //$NON-NLS-1$ int iValueCount = 0; while ( strtok.hasMoreTokens( ) ) { String sElement = strtok.nextToken( ).trim( ); if ( sElement.startsWith( "'" ) ) //$NON-NLS-1$ { sElement = sElement.substring( 1, sElement.length( ) - 1 ); } try { if ( getAxisForProcessing( ).getType( ) .equals( AxisType.DATE_TIME_LITERAL ) ) { sdf.parse( sElement ); } else if ( getAxisForProcessing( ).getType( ) .equals( AxisType.TEXT_LITERAL ) ) { if ( !sElement.startsWith( "'" ) ) //$NON-NLS-1$ { sElement = "'" + sElement + "'"; //$NON-NLS-1$ //$NON-NLS-2$ } } else { double dbl = nf.parse( sElement ).doubleValue( ); sElement = String.valueOf( dbl ); } } catch ( ParseException e ) { if ( getAxisForProcessing( ).getType( ) .equals( AxisType.DATE_TIME_LITERAL ) ) { Calendar cal = Calendar.getInstance( Locale.getDefault( ) ); cal.set( Calendar.MINUTE, 0 ); StringBuffer sbNewDate = new StringBuffer( "" ); //$NON-NLS-1$ sbNewDate.append( cal.get( Calendar.MONTH ) + 1 ); sbNewDate.append( "/" ); //$NON-NLS-1$ sbNewDate.append( cal.get( Calendar.DATE ) + iValueCount ); sbNewDate.append( "/" ); //$NON-NLS-1$ sbNewDate.append( cal.get( Calendar.YEAR ) ); sElement = sbNewDate.toString( ); } else { sElement = String.valueOf( 6.0 + iValueCount ); } iValueCount++; } sbNewRepresentation.append( sElement ); sbNewRepresentation.append( "," ); //$NON-NLS-1$ } return sbNewRepresentation.toString( ).substring( 0, sbNewRepresentation.length( ) - 1 ); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/9c143c7bd7a9bea149fb6cc545637d277f71d29e/AxisYSheetImpl.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/format/axis/AxisYSheetImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
336,
22063,
8504,
751,
13742,
12,
1082,
202,
780,
272,
7617,
13742,
262,
202,
95,
202,
202,
780,
10524,
609,
17692,
273,
394,
16370,
12,
272,
7617,
13742,
16,
5753,
11272,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
336,
22063,
8504,
751,
13742,
12,
1082,
202,
780,
272,
7617,
13742,
262,
202,
95,
202,
202,
780,
10524,
609,
17692,
273,
394,
16370,
12,
272,
7617,
13742,
16,
5753,
11272,... | |
dim.breakFlag = true; | dim.setBreak(); | void actionPerformed(ActionEvent e) { String cmd = e.getActionCommand(); int returnValue = -1; if (cmd.equals("Cut") || cmd.equals("Copy") || cmd.equals("Paste")) { JInternalFrame f = getSelectedFrame(); if (f != null && f instanceof ActionListener) { ((ActionListener)f).actionPerformed(e); } } else if (cmd.equals("Step Over")) { returnValue = Dim.STEP_OVER; } else if (cmd.equals("Step Into")) { returnValue = Dim.STEP_INTO; } else if (cmd.equals("Step Out")) { returnValue = Dim.STEP_OUT; } else if (cmd.equals("Go")) { returnValue = Dim.GO; } else if (cmd.equals("Break")) { dim.breakFlag = true; } else if (cmd.equals("Exit")) { exit(); } else if (cmd.equals("Open")) { String fileName = chooseFile("Select a file to compile"); if (fileName != null) { String text = readFile(fileName); if (text != null) { RunProxy proxy = new RunProxy(this, RunProxy.OPEN_FILE); proxy.fileName = fileName; proxy.text = text; new Thread(proxy).start(); } } } else if (cmd.equals("Load")) { String fileName = chooseFile("Select a file to execute"); if (fileName != null) { String text = readFile(fileName); if (text != null) { RunProxy proxy = new RunProxy(this, RunProxy.LOAD_FILE); proxy.fileName = fileName; proxy.text = text; new Thread(proxy).start(); } } } else if (cmd.equals("More Windows...")) { MoreWindows dlg = new MoreWindows(this, fileWindows, "Window", "Files"); dlg.showDialog(this); } else if (cmd.equals("Console")) { if (console.isIcon()) { desk.getDesktopManager().deiconifyFrame(console); } console.show(); desk.getDesktopManager().activateFrame(console); console.consoleTextArea.requestFocus(); } else if (cmd.equals("Cut")) { } else if (cmd.equals("Copy")) { } else if (cmd.equals("Paste")) { } else if (cmd.equals("Go to function...")) { FindFunction dlg = new FindFunction(this, "Go to function", "Function"); dlg.showDialog(this); } else if (cmd.equals("Tile")) { JInternalFrame[] frames = desk.getAllFrames(); int count = frames.length; int rows, cols; rows = cols = (int)Math.sqrt(count); if (rows*cols < count) { cols++; if (rows * cols < count) { rows++; } } Dimension size = desk.getSize(); int w = size.width/cols; int h = size.height/rows; int x = 0; int y = 0; for (int i = 0; i < rows; i++) { for (int j = 0; j < cols; j++) { int index = (i*cols) + j; if (index >= frames.length) { break; } JInternalFrame f = frames[index]; try { f.setIcon(false); f.setMaximum(false); } catch (Exception exc) { } desk.getDesktopManager().setBoundsForFrame(f, x, y, w, h); x += w; } y += h; x = 0; } } else if (cmd.equals("Cascade")) { JInternalFrame[] frames = desk.getAllFrames(); int count = frames.length; int x, y, w, h; x = y = 0; h = desk.getHeight(); int d = h / count; if (d > 30) d = 30; for (int i = count -1; i >= 0; i--, x += d, y += d) { JInternalFrame f = frames[i]; try { f.setIcon(false); f.setMaximum(false); } catch (Exception exc) { } Dimension dimen = f.getPreferredSize(); w = dimen.width; h = dimen.height; desk.getDesktopManager().setBoundsForFrame(f, x, y, w, h); } } else { Object obj = getFileWindow(cmd); if (obj != null) { FileWindow w = (FileWindow)obj; try { if (w.isIcon()) { w.setIcon(false); } w.setVisible(true); w.moveToFront(); w.setSelected(true); } catch (Exception exc) { } } } if (returnValue != -1) { updateEnabled(false); dim.setReturnValue(returnValue); } } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/2d4fc75b74d717c754829dde488ff0a7456682cc/SwingGui.java/clean/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/SwingGui.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
26100,
12,
1803,
1133,
425,
13,
288,
3639,
514,
1797,
273,
425,
18,
588,
1803,
2189,
5621,
3639,
509,
7750,
273,
300,
21,
31,
3639,
309,
261,
4172,
18,
14963,
2932,
15812,
7923,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
26100,
12,
1803,
1133,
425,
13,
288,
3639,
514,
1797,
273,
425,
18,
588,
1803,
2189,
5621,
3639,
509,
7750,
273,
300,
21,
31,
3639,
309,
261,
4172,
18,
14963,
2932,
15812,
7923,
74... |
curFacing = entity.getFacing(); curPos = entity.getPosition(); entity.setSecondaryFacing( curFacing ); mpUsed = entity.getRunMP(); entity.moved = moveType; fellDuringMovement = true; distance = entity.delta_distance; break; | curFacing = entity.getFacing(); curPos = entity.getPosition(); entity.setSecondaryFacing( curFacing ); mpUsed = entity.getRunMP(); entity.moved = moveType; fellDuringMovement = true; distance = entity.delta_distance; break; | private void processMovement(Entity entity, MovementData md) { // check for fleeing if (md.contains(MovementData.STEP_FLEE)) { // Unit has fled the battlefield. phaseReport.append("\n" ).append( entity.getDisplayName() ).append( " flees the battlefield.\n"); // Is the unit carrying passengers? final Vector passengers = entity.getLoadedUnits(); if ( !passengers.isEmpty() ) { final Enumeration iter = passengers.elements(); while ( iter.hasMoreElements() ) { final Entity passenger = (Entity) iter.nextElement(); // Unit has fled the battlefield. phaseReport.append( " It carries " ) .append( passenger.getDisplayName() ) .append( " with it.\n" ); game.removeEntity( passenger.getId(), Game.UNIT_IN_RETREAT ); send( createRemoveEntityPacket(passenger.getId(), Game.UNIT_IN_RETREAT) ); } } // Is the unit being swarmed? final int swarmerId = entity.getSwarmAttackerId(); if ( Entity.NONE != swarmerId ) { final Entity swarmer = game.getEntity( swarmerId ); // Has the swarmer taken a turn? if ( !swarmer.isDone() ) { // Dead entities don't take turns. game.removeTurnFor(swarmer); send(createTurnVectorPacket()); } // End swarmer-still-to-move // Unit has fled the battlefield. swarmer.setSwarmTargetId( Entity.NONE ); entity.setSwarmAttackerId( Entity.NONE ); phaseReport.append( " It takes " ) .append( swarmer.getDisplayName() ) .append( " with it.\n" ); game.removeEntity( swarmerId, Game.UNIT_IN_RETREAT ); send( createRemoveEntityPacket(swarmerId, Game.UNIT_IN_RETREAT) ); } game.removeEntity( entity.getId(), Game.UNIT_IN_RETREAT ); send( createRemoveEntityPacket(entity.getId(), Game.UNIT_IN_RETREAT) ); return; } if (md.contains(MovementData.STEP_EJECT)) { phaseReport.append("\n" ).append( entity.getDisplayName()).append( " ejects.\n"); phaseReport.append(destroyEntity(entity, "ejection")); game.removeEntity( entity.getId(), Game.UNIT_SALVAGEABLE ); send(createRemoveEntityPacket(entity.getId(), Game.UNIT_SALVAGEABLE)); return; } // check for MASC failure if (entity instanceof Mech) { if (((Mech)entity).checkForMASCFailure(phaseReport)) { // no movement after that return; } } // okay, proceed with movement calculations Coords lastPos = entity.getPosition(); Coords curPos = entity.getPosition(); int curFacing = entity.getFacing(); int distance = 0; int mpUsed = 0; int moveType = Entity.MOVE_NONE; int overallMoveType = Entity.MOVE_NONE; boolean firstStep; boolean wasProne; boolean fellDuringMovement; int prevFacing = curFacing; Hex prevHex = null; final boolean isInfantry = (entity instanceof Infantry); AttackAction charge = null; // Compile the move Compute.compile(game, entity.getId(), md); // get last step's movement type for (final Enumeration i = md.getSteps(); i.hasMoreElements();) { final MovementData.Step step = (MovementData.Step)i.nextElement(); if (step.getMovementType() == Entity.MOVE_ILLEGAL) { break; } else { overallMoveType = step.getMovementType(); } } // iterate through steps firstStep = true; fellDuringMovement = false; MovementData.Step prevStep = null; for (final Enumeration i = md.getSteps(); i.hasMoreElements();) { final MovementData.Step step = (MovementData.Step)i.nextElement(); wasProne = entity.isProne(); boolean isPavementStep = step.isOnPavement(); // stop for illegal movement if (step.getMovementType() == Entity.MOVE_ILLEGAL) { break; } // check piloting skill for getting up if (step.getType() == MovementData.STEP_GET_UP) { entity.heatBuildup += 1; entity.setProne(false); wasProne = false; doSkillCheckInPlace(entity, new PilotingRollData(entity.getId(), 0, "getting up"), true); } else if (firstStep) { // running with destroyed hip or gyro needs a check if (overallMoveType == Entity.MOVE_RUN && !entity.isProne() && (entity.getDestroyedCriticals(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_GYRO,Mech.LOC_CT) > 0 || entity.hasHipCrit())) { doSkillCheckInPlace(entity, new PilotingRollData(entity.getId(), 0, "running with damaged hip actuator or gyro"), false); } firstStep = false; } // did the entity just fall? if (!wasProne && entity.isProne()) { moveType = step.getMovementType(); curFacing = entity.getFacing(); curPos = entity.getPosition(); mpUsed = step.getMpUsed(); fellDuringMovement = true; break; } if (step.getType() == MovementData.STEP_UNJAM_RAC) { entity.setUnjammingRAC(true); game.addAction(new UnjamAction(entity.getId())); break; } // set most step parameters moveType = step.getMovementType(); distance = step.getDistance(); mpUsed = step.getMpUsed(); // check for charge if (step.getType() == MovementData.STEP_CHARGE) { Targetable target = step.getTarget( game ); ChargeAttackAction caa = new ChargeAttackAction(entity.getId(), target.getTargetType(), target.getTargetId(), target.getPosition()); entity.setDisplacementAttack(caa); game.addCharge(caa); charge = caa; break; } // check for dfa if (step.getType() == MovementData.STEP_DFA) { Targetable target = step.getTarget( game ); DfaAttackAction daa = new DfaAttackAction(entity.getId(), target.getTargetType(), target.getTargetId(), target.getPosition()); entity.setDisplacementAttack(daa); game.addCharge(daa); charge = daa; break; } // set last step parameters curPos = step.getPosition(); curFacing = step.getFacing(); final Hex curHex = game.board.getHex(curPos); // Check for skid. if ( moveType != Entity.MOVE_JUMP && prevHex != null && prevStep.isOnPavement() && overallMoveType == Entity.MOVE_RUN && prevFacing != curFacing && !lastPos.equals(curPos) && !isInfantry ) { // Have an entity-meaningful PSR message. boolean psrPassed = true; PilotingRollData psr = null; if ( entity instanceof Mech ) { psr = new PilotingRollData (entity.getId(), getMovementPSRModifier(distance), "running & turning on pavement"); psrPassed = doSkillCheckWhileMoving( entity, lastPos, lastPos, psr ); } else { psr = new PilotingRollData (entity.getId(), getMovementPSRModifier(distance), "reckless driving on pavement"); psrPassed = doSkillCheckWhileMoving( entity, lastPos, lastPos, psr, false ); } // Does the entity skid? if ( !psrPassed ){ curPos = lastPos; Coords nextPos = curPos; Hex nextHex = null; int skidDistance = 0; Enumeration targets = null; Entity target = null; int curElevation; int nextElevation; // All charge damage is based upon // the pre-skid move distance. entity.delta_distance = distance-1; // All attacks against a skidding target are at +2, // and are *NOT* based upon distance moved at all. moveType = Entity.MOVE_SKID; // What is the first hex in the skid? nextPos = curPos.translated( prevFacing ); nextHex = game.board.getHex( nextPos ); // Move the entity a number hexes from curPos in the // prevFacing direction equal to half the distance moved // this turn (rounded up), unless something intervenes. for ( skidDistance = 0; skidDistance < (int) Math.ceil(entity.delta_distance / 2.0); skidDistance++ ) { // Is the next hex off the board? if ( !game.board.contains(nextPos) ) { // Can the entity skid off the map? if ( game.getOptions().booleanOption("push_off_board") ) { // Yup. One dead entity. game.removeEntity(entity.getId(), Game.UNIT_IN_RETREAT); send(createRemoveEntityPacket(entity.getId(), Game.UNIT_IN_RETREAT)); phaseReport.append("*** " ) .append( entity.getDisplayName() ) .append( " has skidded off the field. ***\n"); // The entity's movement is completed. return; } else { // Nope. Update the report. phaseReport.append( " Can't skid off the field.\n" ); } // Stay in the current hex and stop skidding. break; } // Can the skiding entity enter the next hex from this? // N.B. can skid along roads. if ( ( entity.isHexProhibited(curHex) || entity.isHexProhibited(nextHex) ) && !Compute.canMoveOnPavement(game, curPos, nextPos) ) { // Update report. phaseReport.append( " Can't skid into hex " ) .append( nextPos.getBoardNum() ) .append( ".\n" ); // N.B. the BMRr pg. 22 says that the unit // "crashes" into the terrain but it doesn't // mention any damage. // Stay in the current hex and stop skidding. break; } // Hovercraft can "skid" over water. // TODO: allow entities to occupy different levels of // buildings. curElevation = curHex.floor(); nextElevation = nextHex.floor(); if ( entity instanceof Tank && entity.getMovementType() == Entity.MovementType.HOVER ) { Terrain land = game.board.getHex(curPos). getTerrain(Terrain.WATER); if ( land != null ) { curElevation += land.getLevel(); } land = nextHex.getTerrain(Terrain.WATER); if ( land != null ) { nextElevation += land.getLevel(); } } // BMRr pg. 22 - Can't skid uphill, // but can skid downhill. if ( curElevation < nextElevation ) { phaseReport.append ( " Can not skid uphill into hex " + nextPos.getBoardNum() ).append( ".\n" ); // Stay in the current hex and stop skidding. break; } // Get any building in the hex. Building bldg = game.board.getBuildingAt(nextPos); boolean bldgSuffered = false; // Does the next hex contain an entities? // ASSUMPTION: hurt EVERYONE in the hex. // TODO: allow entities to occupy different levels of // buildings, and only skid into a single level. boolean stopTheSkid = false; targets = game.getEntities( nextPos ); while ( targets.hasMoreElements() ) { target = (Entity) targets.nextElement(); // TODO : allow ready targets to move out of way // Mechs and vehicles get charged. if ( !(target instanceof Infantry) ) { // Update report. phaseReport.append( " Skids into " + target.getShortName() + " in hex " + nextPos.getBoardNum() + "... " ); // Resolve a charge against the target. // ASSUMPTION: buildings block damage for // *EACH* entity charged. ToHitData toHit = new ToHitData(); toHit.setHitTable( ToHitData.HIT_NORMAL ); toHit.setSideTable (Compute.targetSideTable(entity, target)); resolveChargeDamage (entity, target, toHit, prevFacing); bldgSuffered = true; // The skid ends here if the target lives. // TODO : we should keep skiding if the target // is pushed off the board as it has // been "destroyed" according to the // MegaMek interpretation of the rules. if ( !target.isDoomed() && !target.isDestroyed() ) { stopTheSkid = true; } } // Resolve "move-through" damage on infantry. // Infantry inside of a building don't get a // move-through, but suffer "bleed through" // from the building. else if ( bldg != null ) { // Update report. phaseReport.append( " Skids through " + target.getShortName() + " in hex " + nextPos.getBoardNum() + "... " ); // Infantry don't have different // tables for punches and kicks HitData hit = target.rollHitLocation( ToHitData.HIT_NORMAL, Compute.targetSideTable(entity, target) ); // Damage equals tonnage, divided by 5. // ASSUMPTION: damage is applied in one hit. phaseReport.append( damageEntity(target, hit, (int)Math.round(entity.getWeight()/5)) ); phaseReport.append( "\n" ); } // End handle-infantry // Has the target been destroyed? if ( target.isDoomed() ) { // Has the target taken a turn? if ( !target.isDone() ) { // Dead entities don't take turns. game.removeTurnFor(target); send(createTurnVectorPacket()); } // End target-still-to-move // Clean out the entity. target.setDestroyed(true); game.moveToGraveyard(target.getId()); send(createRemoveEntityPacket(target.getId())); } // Update the target's position, // unless it is off the game map. if ( !game.isInGraveyard(target) ) { entityUpdate( target.getId() ); } } // Check the next entity in the hex. // Handle the building in the hex. // TODO : BMRr pg. 22, only count buildings that are // higher than our starting terrain height. // TODO: allow units to skid on top of buildings. if ( bldg != null ) { // Report that the entity has entered the bldg. phaseReport.append( " Skids into " ) .append( bldg.getName() ) .append( " in hex " ) .append( nextPos.getBoardNum() ) .append( ".\n" ); // If the building hasn't already suffered // damage, then apply charge damage to the // building and displace the entity inside. // ASSUMPTION: you don't charge the building // if Tanks or Mechs were charged. int chargeDamage = Compute.getChargeDamageFor ( entity ); if ( !bldgSuffered ) { phaseReport.append( " " ) .append( damageBuilding( bldg, chargeDamage ) ); // Apply damage to the attacker. int toAttacker = Compute.getChargeDamageTakenBy ( entity, bldg ); HitData hit = entity.rollHitLocation( ToHitData.HIT_NORMAL, Compute.targetSideTable(curPos, nextPos, entity.getFacing(), false) ); phaseReport.append( this.damageEntity( entity, hit, toAttacker ) ) .append( "\n" ); curPos = nextPos; entity.setPosition( curPos ); } // End buildings-suffer-too // Any infantry in the building take damage // equal to the building being charged. // ASSUMPTION: infantry take no damage from the // building absorbing damage from // Tanks and Mechs being charged. damageInfantryIn( bldg, chargeDamage ); // If a building still stands, then end the skid, // and add it to the list of affected buildings. if ( bldg.getCurrentCF() > 0 ) { stopTheSkid = true; this.addAffectedBldg( bldg, false ); } } // End handle-building. // Do we stay in the current hex and stop skidding? if ( stopTheSkid ) { break; } // Update the position and keep skidding. curPos = nextPos; entity.setPosition( curPos ); phaseReport.append( " Skids into hex " ).append( curPos.getBoardNum() ).append( ".\n" ); // Get the next hex in the skid? nextPos = nextPos.translated( prevFacing ); nextHex = game.board.getHex( nextPos ); } // Handle the next skid hex. // If the skidding entity violates stacking, // displace targets until it doesn't. curPos = entity.getPosition(); target = Compute.stackingViolation (game, entity.getId(), curPos); while (target != null) { nextPos = Compute.getValidDisplacement (game, target.getId(), target.getPosition(), prevFacing); // ASSUMPTION // There should always be *somewhere* that // the target can go... last skid hex if // nothing else is available. if ( null == nextPos ) { // But I don't trust the assumption fully. // Report the error and try to continue. System.err.println( "The skid of " + entity.getShortName() + " should displace " + target.getShortName() + " in hex " + curPos.getBoardNum() + " but there is nowhere to go." ); break; } phaseReport.append( " " ); // indent displacement doEntityDisplacement(target, curPos, nextPos, null); target = Compute.stackingViolation( game, entity.getId(), curPos ); } // Mechs suffer damage for every hex skidded. if ( entity instanceof Mech ) { // Calculate one half falling damage times skid length. int damage = skidDistance * (int) Math.ceil(Math.round(entity.getWeight() / 10.0) / 2.0); // report skid damage phaseReport.append(" " ).append( entity.getDisplayName() ).append( " suffers " ).append( damage ).append( " damage from the skid."); // standard damage loop // All skid damage is to the front. while (damage > 0) { int cluster = Math.min(5, damage); HitData hit = entity.rollHitLocation(ToHitData.HIT_NORMAL, ToHitData.SIDE_FRONT); phaseReport.append(damageEntity(entity, hit, cluster)); damage -= cluster; } phaseReport.append( "\n" ); } // Clean up the entity if it has been destroyed. if ( entity.isDoomed() ) { entity.setDestroyed(true); game.moveToGraveyard(entity.getId()); send(createRemoveEntityPacket(entity.getId())); // The entity's movement is completed. return; } // Let the player know the ordeal is over. phaseReport.append( " Skid ends.\n" ); // set entity parameters curFacing = entity.getFacing(); curPos = entity.getPosition(); entity.setSecondaryFacing( curFacing ); mpUsed = entity.getRunMP(); // skid consumes all movement entity.moved = moveType; fellDuringMovement = true; distance = entity.delta_distance; break; } // End failed-skid-psr } // End need-skid-psr // check if we've moved into rubble if (!lastPos.equals(curPos) && step.getMovementType() != Entity.MOVE_JUMP && curHex.levelOf(Terrain.RUBBLE) > 0) { doSkillCheckWhileMoving(entity, lastPos, curPos, new PilotingRollData(entity.getId(), 0, "entering Rubble")); } // check to see if we've moved OUT of fire and we are a mech if (!lastPos.equals(curPos) && step.getMovementType() != Entity.MOVE_JUMP && game.board.getHex(lastPos).contains(Terrain.FIRE)) { if (entity instanceof Mech) { entity.heatBuildup+=2; phaseReport.append("\n" ).append( entity.getDisplayName() ).append( " passes through a fire. It will generate 2 more heat this round.\n"); } } // check to see if we've moved INTO fire and we are not a mech if (!lastPos.equals(curPos) && step.getMovementType() != Entity.MOVE_JUMP && game.board.getHex(curPos).contains(Terrain.FIRE)) { if (!(entity instanceof Mech)) { doFlamingDeath(entity); } } // check if we've moved into water if (!lastPos.equals(curPos) && step.getMovementType() != Entity.MOVE_JUMP && curHex.levelOf(Terrain.WATER) > 0 && entity.getMovementType() != Entity.MovementType.HOVER && !isPavementStep) { if (curHex.levelOf(Terrain.WATER) == 1) { doSkillCheckWhileMoving(entity, lastPos, curPos, new PilotingRollData(entity.getId(), -1, "entering Depth 1 Water")); } else if (curHex.levelOf(Terrain.WATER) == 2) { doSkillCheckWhileMoving(entity, lastPos, curPos, new PilotingRollData(entity.getId(), 0, "entering Depth 2 Water")); // Any swarming infantry will be destroyed. final int swarmerId = entity.getSwarmAttackerId(); if ( Entity.NONE != swarmerId ) { final Entity swarmer = game.getEntity( swarmerId ); swarmer.setSwarmTargetId( Entity.NONE ); entity.setSwarmAttackerId( Entity.NONE ); swarmer.setPosition( curPos ); phaseReport.append( " The swarming unit, " ) .append( swarmer.getShortName() ) .append( ", drowns!\n" ) .append( destroyEntity(swarmer, "a watery grave", false) ); entityUpdate( swarmerId ); } } else { doSkillCheckWhileMoving(entity, lastPos, curPos, new PilotingRollData(entity.getId(), 1, "entering Depth 3+ Water")); // Any swarming infantry will be destroyed. final int swarmerId = entity.getSwarmAttackerId(); if ( Entity.NONE != swarmerId ) { final Entity swarmer = game.getEntity( swarmerId ); swarmer.setSwarmTargetId( Entity.NONE ); entity.setSwarmAttackerId( Entity.NONE ); swarmer.setPosition( curPos ); phaseReport.append( " The swarming unit, " ) .append( swarmer.getShortName() ) .append( ", drowns!\n" ) .append( destroyEntity(swarmer, "a watery grave", false) ); entityUpdate( swarmerId ); } } // Mech on fire with infernos can wash them off. // Check if enterning depth 2 water or prone in depth 1. if ( entity instanceof Mech && entity.infernos.isStillBurning() ) { if ( ( 1 == curHex.levelOf(Terrain.WATER) && entity.isProne() ) || ( 2 <= curHex.levelOf(Terrain.WATER) ) ) { washInferno(entity, curPos); } } } // Handle loading units. if ( step.getType() == MovementData.STEP_LOAD ) { // Find the unit being loaded. Entity loaded = null; Enumeration entities = game.getEntities( curPos ); while ( entities.hasMoreElements() ) { // Is the other unit friendly and not the current entity? loaded = (Entity)entities.nextElement(); if ( entity.getOwner() == loaded.getOwner() && !entity.equals(loaded) ) { // The moving unit should be able to load the other // unit and the other should be able to have a turn. if ( !entity.canLoad(loaded) || !loaded.isSelectable() ) { // Something is fishy in Denmark. System.err.println( entity.getShortName() + " can not load " + loaded.getShortName() ); loaded = null; } else { // Have the deployed unit load the indicated unit. this.loadUnit( entity, loaded ); // Stop looking. break; } } else { // Nope. Discard it. loaded = null; } } // Handle the next entity in this hex. // We were supposed to find someone to load. if ( loaded == null ) { System.err.println( "Could not find unit for " + entity.getShortName() + " to load in " + curPos ); } } // End STEP_LOAD // Handle unloading units. if ( step.getType() == MovementData.STEP_UNLOAD ) { Targetable unloaded = step.getTarget( game ); if ( !this.unloadUnit( entity, unloaded, curPos, curFacing ) ) { System.err.println( "Error! Server was told to unload " + unloaded.getDisplayName() + " from " + entity.getDisplayName() + " into " + curPos.getBoardNum() ); } } // Handle non-infantry moving into a building. if ( !lastPos.equals(curPos) && step.getMovementType() != Entity.MOVE_JUMP && ( curHex.contains(Terrain.BUILDING) || (prevHex != null && prevHex.contains(Terrain.BUILDING)) ) && !(entity instanceof Infantry) ) { // Get the building being exited. // TODO: allow units to climb on top of buildings. Building bldgExited = game.board.getBuildingAt( lastPos ); // Get the building being entered. // TODO: allow units to climb on top of buildings. Building bldgEntered = game.board.getBuildingAt( curPos ); // If we're not leaving a building, just handle the "entered". boolean collapsed = false; if ( bldgExited == null ) { collapsed = passBuildingWall( entity, bldgEntered, lastPos, curPos, distance, "entering" ); this.addAffectedBldg( bldgEntered, collapsed ); } // If we're moving withing the same building, just handle // the "within". else if ( bldgExited.equals( bldgEntered ) ) { collapsed = passBuildingWall( entity, bldgEntered, lastPos, curPos, distance, "moving in" ); this.addAffectedBldg( bldgEntered, collapsed ); } // If we have different buildings, roll for each. else if ( bldgExited != null && bldgEntered != null ) { collapsed = passBuildingWall( entity, bldgExited, lastPos, curPos, distance, "exiting" ); this.addAffectedBldg( bldgExited, collapsed ); collapsed = passBuildingWall( entity, bldgEntered, lastPos, curPos, distance, "entering" ); this.addAffectedBldg( bldgEntered, collapsed ); } // Otherwise, just handle the "exited". else { collapsed = passBuildingWall( entity, bldgExited, lastPos, curPos, distance, "exiting" ); this.addAffectedBldg( bldgExited, collapsed ); } // Clean up the entity if it has been destroyed. if ( entity.isDoomed() ) { entity.setDestroyed(true); game.moveToGraveyard(entity.getId()); send(createRemoveEntityPacket(entity.getId())); // The entity's movement is completed. return; } // TODO: what if a building collapses into rubble? } // did the entity just fall? if (!wasProne && entity.isProne()) { curFacing = entity.getFacing(); curPos = entity.getPosition(); mpUsed = step.getMpUsed(); fellDuringMovement = true; break; } // dropping prone intentionally? if (step.getType() == MovementData.STEP_GO_PRONE) { mpUsed = step.getMpUsed(); entity.setProne(true); // check to see if we washed off infernos if ( entity instanceof Mech && entity.infernos.isStillBurning() && curHex.levelOf(Terrain.WATER) >= 1 ) { washInferno(entity, curPos); } break; } // update lastPos, prevStep, prevFacing & prevHex lastPos = new Coords(curPos); prevStep = step; if (!curHex.equals(prevHex)) { prevFacing = curFacing; } prevHex = curHex; } // set entity parameters entity.setPosition(curPos); entity.setFacing(curFacing); entity.setSecondaryFacing(curFacing); entity.delta_distance = distance; entity.moved = moveType; entity.mpUsed = mpUsed; // but the danger isn't over yet! landing from a jump can be risky! if (overallMoveType == Entity.MOVE_JUMP && !entity.isMakingDfa()) { // check for damaged criticals if (entity.getDestroyedCriticals(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_GYRO,Mech.LOC_CT) > 0 || entity.hasLegActuatorCrit()) { doSkillCheckInPlace(entity, new PilotingRollData(entity.getId(), 0, "landing with damaged leg actuator or gyro"), false); } // jumped into water? int waterLevel = game.board.getHex(curPos).levelOf(Terrain.WATER); if (waterLevel == 1) { doSkillCheckInPlace(entity, new PilotingRollData(entity.getId(), -1, "entering Depth 1 Water"), false); } else if (waterLevel == 2) { doSkillCheckInPlace(entity, new PilotingRollData(entity.getId(), 0, "entering Depth 2 Water"), false); // Any swarming infantry will be destroyed. final int swarmerId = entity.getSwarmAttackerId(); if ( Entity.NONE != swarmerId ) { final Entity swarmer = game.getEntity( swarmerId ); swarmer.setSwarmTargetId( Entity.NONE ); entity.setSwarmAttackerId( Entity.NONE ); swarmer.setPosition( curPos ); phaseReport.append( " The swarming unit, " ) .append( swarmer.getShortName() ) .append( ", drowns!\n" ) .append( destroyEntity(swarmer, "a watery grave", false) ); entityUpdate( swarmerId ); } } else if (waterLevel >= 3) { doSkillCheckInPlace(entity, new PilotingRollData(entity.getId(), 1, "entering Depth 3+ Water"), false); // Any swarming infantry will be destroyed. final int swarmerId = entity.getSwarmAttackerId(); if ( Entity.NONE != swarmerId ) { final Entity swarmer = game.getEntity( swarmerId ); swarmer.setSwarmTargetId( Entity.NONE ); entity.setSwarmAttackerId( Entity.NONE ); swarmer.setPosition( curPos ); phaseReport.append( " The swarming unit, " ) .append( swarmer.getShortName() ) .append( ", drowns!\n" ) .append( destroyEntity(swarmer, "a watery grave", false) ); entityUpdate( swarmerId ); } } // If the entity is being swarmed, jumping may dislodge the fleas. final int swarmerId = entity.getSwarmAttackerId(); if ( Entity.NONE != swarmerId ) { final Entity swarmer = game.getEntity( swarmerId ); final PilotingRollData roll = Compute.getBasePilotingRoll(game, entity.getId()); // Add a +4 modifier. roll.addModifier( 4, "dislodge swarming infantry" ); // If the swarmer has Assault claws, give a 1 modifier. // We can stop looking when we find our first match. for ( Enumeration iter = swarmer.getMisc(); iter.hasMoreElements(); ) { Mounted mount = (Mounted) iter.nextElement(); EquipmentType equip = mount.getType(); if ( BattleArmor.ASSAULT_CLAW.equals (equip.getInternalName()) ) { roll.addModifier( 1, "swarmer has assault claws" ); break; } } // okay, print the info phaseReport.append("\n") .append( entity.getDisplayName() ) .append( " tries to dislodge swarming infantry.\n" ); // roll final int diceRoll = Compute.d6(2); phaseReport.append("Needs " ).append( roll.getValueAsString() ).append( " [" ).append( roll.getDesc() ).append( "]" ).append( ", rolls " ).append( diceRoll ).append( " : "); if (diceRoll < roll.getValue()) { phaseReport.append("fails.\n"); } else { phaseReport.append("succeeds.\n"); entity.setSwarmAttackerId( Entity.NONE ); swarmer.setSwarmTargetId( Entity.NONE ); // Did the infantry fall into water? final Hex curHex = game.board.getHex(curPos); if ( curHex.levelOf(Terrain.WATER) > 0 ) { // Swarming infantry die. swarmer.setPosition( curPos ); phaseReport.append(" ") .append(swarmer.getDisplayName()) .append(" is dislodged and drowns!") .append(destroyEntity(swarmer, "a watery grave", false)); } else { // Swarming infantry take an 11 point hit. // ASSUMPTION : damage should not be doubled. phaseReport.append(" ") .append(swarmer.getDisplayName()) .append(" is dislodged and suffers 11 damage.") .append( damageEntity(swarmer, swarmer.rollHitLocation(ToHitData.HIT_NORMAL, ToHitData.SIDE_FRONT), 11) ) .append( "\n" ); swarmer.setPosition( curPos ); } entityUpdate( swarmerId ); } // End successful-PSR } // End try-to-dislodge-swarmers } // End entity-is-jumping // should we give another turn to the entity to keep moving? if (fellDuringMovement && entity.mpUsed < entity.getRunMP() && entity.isSelectable() && !entity.isDoomed()) { entity.applyDamage(); entity.setDone(false); GameTurn newTurn = new GameTurn.SpecificEntityTurn(entity.getOwner().getId(), entity.getId()); game.insertTurn(newTurn); // brief everybody on the turn update send(createTurnVectorPacket()); } else { entity.setDone(true); } // If the entity is being swarmed, update the attacker's position. final int swarmerId = entity.getSwarmAttackerId(); if ( Entity.NONE != swarmerId ) { final Entity swarmer = game.getEntity( swarmerId ); swarmer.setPosition( curPos ); // If the hex is on fire, and the swarming infantry is // *not* Battle Armor, it drops off. if ( !(swarmer instanceof BattleArmor) && game.board.getHex(curPos).contains(Terrain.FIRE) ) { swarmer.setSwarmTargetId( Entity.NONE ); entity.setSwarmAttackerId( Entity.NONE ); phaseReport.append( "\n " ) .append( swarmer.getShortName() ) .append( " can't stand the fire's heat and drops off.\n" ); } entityUpdate( swarmerId ); } // Update the entitiy's position, // unless it is off the game map. if ( !game.isInGraveyard(entity) ) { entityUpdate( entity.getId() ); } // if using double blind, update the player on new units he might see if (doBlind()) { send(entity.getOwner().getId(), createFilteredEntitiesPacket(entity.getOwner())); } // if we generated a charge attack, report it now if (charge != null) { send(createAttackPacket(charge, true)); } } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/45349ba32e2e85a101b2a9c5c72e3214b9b6be01/Server.java/clean/megamek/src/megamek/server/Server.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
49,
26140,
12,
1943,
1522,
16,
490,
26140,
751,
3481,
13,
288,
202,
759,
866,
364,
284,
11182,
310,
3639,
309,
261,
1264,
18,
12298,
12,
49,
26140,
751,
18,
26951,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
49,
26140,
12,
1943,
1522,
16,
490,
26140,
751,
3481,
13,
288,
202,
759,
866,
364,
284,
11182,
310,
3639,
309,
261,
1264,
18,
12298,
12,
49,
26140,
751,
18,
26951,
67,
... |
} | } | public void insert(MenuItem item, int index) { if (index < 0) throw new IllegalArgumentException("Index is less than zero"); items.insertElementAt(item, index); MenuPeer mp = (MenuPeer) getPeer(); // FIXME: Need to add a peer method here. // if (mp != null) // mp.insertItem(item, index); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/Menu.java/buggy/core/src/classpath/java/java/awt/Menu.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2243,
12,
12958,
761,
16,
509,
770,
13,
288,
202,
202,
430,
261,
1615,
411,
374,
13,
1082,
202,
12849,
394,
2754,
2932,
1016,
353,
5242,
2353,
3634,
8863,
202,
202,
3319,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2243,
12,
12958,
761,
16,
509,
770,
13,
288,
202,
202,
430,
261,
1615,
411,
374,
13,
1082,
202,
12849,
394,
2754,
2932,
1016,
353,
5242,
2353,
3634,
8863,
202,
202,
3319,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.