rem stringlengths 1 53.3k | add stringlengths 0 80.5k | context stringlengths 6 326k | meta stringlengths 141 403 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
public void set(RubyObject value, String id, RubyObject data, RubyGlobalEntry entry) { | public void set(Ruby ruby, RubyGlobalEntry entry, RubyObject value) { | public void set(RubyObject value, String id, RubyObject data, RubyGlobalEntry entry) { bean.bean = JavaUtil.convertRubyToJava(ruby, value, bean.type); } | 47619 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47619/4e4bb40b2eb2d38881d15ca8ef7cda4c34323793/JRubyEngine.java/clean/org/jruby/javasupport/bsf/JRubyEngine.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
444,
12,
54,
10340,
22155,
16,
19817,
5160,
1622,
1241,
16,
19817,
921,
460,
13,
288,
5411,
3931,
18,
14496,
273,
5110,
1304,
18,
6283,
54,
10340,
774,
5852,
12,
27768,
16,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
444,
12,
54,
10340,
22155,
16,
19817,
5160,
1622,
1241,
16,
19817,
921,
460,
13,
288,
5411,
3931,
18,
14496,
273,
5110,
1304,
18,
6283,
54,
10340,
774,
5852,
12,
27768,
16,
4... |
super(position); | super(position, NodeTypes.WHENNODE); | public WhenNode(ISourcePosition position, Node expressionNodes, Node bodyNode, Node nextCase) { super(position); this.expressionNodes = expressionNodes; this.bodyNode = bodyNode; this.nextCase = nextCase; } | 48300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48300/6e15491217631472c05c6928672f9c7064a978b3/WhenNode.java/buggy/src/org/jruby/ast/WhenNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5203,
907,
12,
45,
1830,
2555,
1754,
16,
2029,
2652,
3205,
16,
2029,
1417,
907,
16,
2029,
1024,
2449,
13,
288,
3639,
2240,
12,
3276,
16,
2029,
2016,
18,
12557,
1157,
8744,
1769,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5203,
907,
12,
45,
1830,
2555,
1754,
16,
2029,
2652,
3205,
16,
2029,
1417,
907,
16,
2029,
1024,
2449,
13,
288,
3639,
2240,
12,
3276,
16,
2029,
2016,
18,
12557,
1157,
8744,
1769,
3... |
factory.populateReport(report, repository.getUrl(), repository.getUserName(), repository.getPassword(), null); | factory.populateReport(report, repository.getUrl(), null, repository.getUserName(), repository.getPassword(), null); | public void testBugNoFound222() { int bugid = -1; String errorMessage = ""; TaskRepository repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL); try { BugzillaReport report = new BugzillaReport(bugid, repository.getUrl()); factory.populateReport(report, repository.getUrl(), repository.getUserName(), repository.getPassword(), null); } catch (LoginException e) { // } catch (IOException e) { errorMessage = e.getMessage(); } assertEquals(IBugzillaConstants.ERROR_INVALID_BUG_ID, errorMessage); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/1171d370baf60483cd2856894f73255d3693f49d/RepositoryReportFactoryTest.java/buggy/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
19865,
2279,
2043,
28855,
1435,
288,
202,
202,
474,
7934,
350,
273,
300,
21,
31,
202,
202,
780,
9324,
273,
1408,
31,
202,
202,
2174,
3305,
3352,
273,
394,
3837,
330... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19865,
2279,
2043,
28855,
1435,
288,
202,
202,
474,
7934,
350,
273,
300,
21,
31,
202,
202,
780,
9324,
273,
1408,
31,
202,
202,
2174,
3305,
3352,
273,
394,
3837,
330... |
verifyEquals("true", selenium.getChecked("base-spud")); verifyNotEquals("true", selenium.getChecked("base-rice")); verifyEquals("true", selenium.getChecked("option-cheese")); verifyNotEquals("true", selenium.getChecked("option-onions")); | verifyEquals("true", selenium.getChecked("base-spud")); verifyNotEquals("true", selenium.getChecked("base-rice")); verifyEquals("true", selenium.getChecked("option-cheese")); verifyNotEquals("true", selenium.getChecked("option-onions")); | public void test() throws Throwable { selenium.setContext("Test check/uncheck of toggle-buttons", "info"); /* Test check/uncheck of toggle-buttons *//* "toggle buttons" == check-boxes and radio-buttons */ // open|./tests/html/test_check_uncheck.html| selenium.open("./tests/html/test_check_uncheck.html");/* check initial state */ // verifyChecked|base-spud|true verifyEquals("true", selenium.getChecked("base-spud")); // verifyNotChecked|base-rice|true verifyNotEquals("true", selenium.getChecked("base-rice")); // verifyChecked|option-cheese|true verifyEquals("true", selenium.getChecked("option-cheese")); // verifyNotChecked|option-onions|true verifyNotEquals("true", selenium.getChecked("option-onions"));/* okay, now start pushing buttons */ // check|base-rice| selenium.check("base-rice"); // verifyNotChecked|base-spud|true verifyNotEquals("true", selenium.getChecked("base-spud")); // verifyChecked|base-rice|true verifyEquals("true", selenium.getChecked("base-rice")); // uncheck|option-cheese| selenium.uncheck("option-cheese"); // verifyNotChecked|option-cheese|true verifyNotEquals("true", selenium.getChecked("option-cheese")); // check|option-onions| selenium.check("option-onions"); // verifyChecked|option-onions|true verifyEquals("true", selenium.getChecked("option-onions"));/* address elements by name+value */ // verifyNotChecked|option-chilli|true verifyNotEquals("true", selenium.getChecked("option-chilli")); // check|option chilli| selenium.check("option chilli"); // verifyChecked|option-chilli|true verifyEquals("true", selenium.getChecked("option-chilli")); // uncheck|option index=3| selenium.uncheck("option index=3"); // verifyNotChecked|option-chilli|true verifyNotEquals("true", selenium.getChecked("option-chilli")); checkForVerificationErrors(); } | 4718 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4718/15660ffa40e3fe9cdf6de2752e79d93831571a27/TestCheckUncheck.java/buggy/clients/java/src/test/java/com/thoughtworks/selenium/generated/TestCheckUncheck.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1842,
1435,
1216,
4206,
288,
202,
202,
1786,
17327,
18,
542,
1042,
2932,
4709,
866,
19,
318,
1893,
434,
10486,
17,
16016,
3113,
315,
1376,
8863,
225,
1748,
7766,
866,
19,
318,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1842,
1435,
1216,
4206,
288,
202,
202,
1786,
17327,
18,
542,
1042,
2932,
4709,
866,
19,
318,
1893,
434,
10486,
17,
16016,
3113,
315,
1376,
8863,
225,
1748,
7766,
866,
19,
318,
... |
final public void bastore() { | public void bastore() { | final public void bastore() { if (DEBUG) System.out.println(position + "\t\tbastore"); //$NON-NLS-1$ countLabels = 0; stackDepth -= 3; if (classFileOffset >= bCodeStream.length) { resizeByteArray(); } position++; bCodeStream[classFileOffset++] = OPC_bastore;} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/5a485cb39d1ee33622141cf426fac71c4bf93ded/CodeStream.java/buggy/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
727,
1071,
918,
324,
689,
479,
1435,
288,
202,
430,
261,
9394,
13,
2332,
18,
659,
18,
8222,
12,
3276,
397,
1548,
88,
64,
18587,
689,
479,
8863,
4329,
3993,
17,
5106,
17,
21,
8,
202,
1883,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
727,
1071,
918,
324,
689,
479,
1435,
288,
202,
430,
261,
9394,
13,
2332,
18,
659,
18,
8222,
12,
3276,
397,
1548,
88,
64,
18587,
689,
479,
8863,
4329,
3993,
17,
5106,
17,
21,
8,
202,
1883,
... |
if (!Hierarchy.isSubtype(lhsType, rhsType) && !Hierarchy.isSubtype(rhsType, lhsType)) | if (!Hierarchy.isSubtype(lhsType, rhsType) && !Hierarchy.isSubtype(rhsType, lhsType)) | private void checkEqualsComparison(Location location, JavaClass jclass, MethodGen methodGen, TypeDataflow typeDataflow) throws DataflowAnalysisException { InstructionHandle handle = location.getHandle(); TypeFrame frame = typeDataflow.getFactAtLocation(location); if (frame.getStackDepth() < 2) throw new DataflowAnalysisException("Stack underflow", methodGen, handle); int numSlots = frame.getNumSlots(); Type lhsType_ = frame.getValue(numSlots - 2); Type rhsType_ = frame.getValue(numSlots - 1); if (lhsType_.equals(rhsType_)) return; if (!(lhsType_ instanceof ReferenceType) || !(rhsType_ instanceof ReferenceType)) { bugReporter.logError("equals() used to compare non-object type(s) in " + SignatureConverter.convertMethodSignature(methodGen) + " at " + location.getHandle()); return; } // For now, ignore the case where either reference is not // of an object type. (It could be either an array or null.) if (!(lhsType_ instanceof ObjectType) || !(rhsType_ instanceof ObjectType)) return; ObjectType lhsType = (ObjectType) lhsType_; ObjectType rhsType = (ObjectType) rhsType_; int priority = LOW_PRIORITY; // If neither object is a subtype of the other, // make it medium priority try { if (!Hierarchy.isSubtype(lhsType, rhsType) && !Hierarchy.isSubtype(rhsType, lhsType)) priority = NORMAL_PRIORITY; } catch (ClassNotFoundException e) { bugReporter.reportMissingClass(e); return; } String sourceFile = jclass.getSourceFileName(); bugReporter.reportBug(new BugInstance("RC_SUSPCIOUS_EQUALS", priority) .addClassAndMethod(methodGen, sourceFile) .addSourceLine(methodGen, sourceFile, location.getHandle()) .addClass(lhsType.getClassName()).describe("CLASS_REFTYPE") .addClass(rhsType.getClassName()).describe("CLASS_REFTYPE") ); } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/1272c0e34bbc03a964a317c8649cd7ba82d1e7bd/FindRefComparison.java/clean/findbugs/src/java/edu/umd/cs/findbugs/detect/FindRefComparison.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
866,
8867,
16059,
12,
2735,
2117,
16,
29491,
525,
1106,
16,
2985,
7642,
707,
7642,
16,
202,
202,
559,
751,
2426,
618,
751,
2426,
13,
1216,
1910,
2426,
9418,
503,
288,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
866,
8867,
16059,
12,
2735,
2117,
16,
29491,
525,
1106,
16,
2985,
7642,
707,
7642,
16,
202,
202,
559,
751,
2426,
618,
751,
2426,
13,
1216,
1910,
2426,
9418,
503,
288,
20... |
if (state.indices == null || state.indices.isEmpty()) continue; | if (state.indices == null || state.indices.isEmpty()) continue; | protected Map addIndLookupSwitch(Local lookup_key, Stmt default_label, boolean names_matter) { TMStateMachine sm = ((TMStateMachine) curTraceMatch.getStateMachine()); Iterator states = sm.getStateIterator(); Map case_to_label = new HashMap(); List lookup_values = new LinkedList(); List lookup_labels = new LinkedList(); while (states.hasNext()) { SMNode state = (SMNode) states.next(); if (state.indices == null || state.indices.isEmpty()) continue; Object table_case; if (names_matter) table_case = state.indices; else table_case = new Integer(state.indices.size()); Stmt label = (Stmt) case_to_label.get(table_case); if (label == null) { label = getNewLabel(); case_to_label.put(table_case, label); } lookup_values.add(getInt(state.getNumber())); lookup_labels.add(label); } if (!case_to_label.isEmpty()) doLookupSwitch(lookup_key, lookup_values, lookup_labels, default_label); return case_to_label; } | 236 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/236/6bfdd4698fa4edb661b1e45946e7d37b991d8275/ClassGenHelper.java/buggy/aop/abc/src/abc/tm/weaving/weaver/ClassGenHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1635,
527,
3866,
6609,
10200,
12,
2042,
3689,
67,
856,
16,
13751,
805,
67,
1925,
16,
202,
4766,
1250,
1257,
67,
21838,
13,
202,
95,
202,
202,
22903,
1119,
6981,
3029,
273,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1635,
527,
3866,
6609,
10200,
12,
2042,
3689,
67,
856,
16,
13751,
805,
67,
1925,
16,
202,
4766,
1250,
1257,
67,
21838,
13,
202,
95,
202,
202,
22903,
1119,
6981,
3029,
273,
14... |
RubyHash result = newHash(runtime, getValueMap(), getDefaultValue()); | RubyHash result = newHash(getRuntime(), getValueMap(), getDefaultValue()); | public IRubyObject rbClone() { RubyHash result = newHash(runtime, getValueMap(), getDefaultValue()); result.setupClone(this); return result; } | 48300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48300/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyHash.java/clean/src/org/jruby/RubyHash.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
15908,
10340,
921,
7138,
10930,
1435,
288,
202,
202,
54,
10340,
2310,
563,
273,
394,
2310,
12,
9448,
16,
2366,
863,
9334,
19569,
10663,
202,
202,
2088,
18,
8401,
10930,
12,
2211... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
202,
482,
15908,
10340,
921,
7138,
10930,
1435,
288,
202,
202,
54,
10340,
2310,
563,
273,
394,
2310,
12,
9448,
16,
2366,
863,
9334,
19569,
10663,
202,
202,
2088,
18,
8401,
10930,
12,
2211... |
private static CellBox layoutCell(LayoutContext c, CellBox cell, Content content, boolean fixed, TableBox table, int col) { //OK, first set up the current style. All depends on this... CascadedStyle pushed = content.getStyle(); if (pushed != null) { c.pushStyle(pushed); } if (c.getCurrentStyle().isIdent(CSSName.BACKGROUND_ATTACHMENT, IdentValue.FIXED)) { c.getRootLayer().setFixedBackground(true); } // a cell defines a new bfc cell.setStyle(c.getCurrentStyle()); cell.setContainingBlockWidth(c.getExtents().width); cell.setElement(content.getElement()); BlockFormattingContext bfc = new BlockFormattingContext(cell, c); c.pushBFC(bfc); // copy the extents Rectangle oe = c.getExtents(); c.setExtents(new Rectangle(oe)); cell.colspan = (int) c.getCurrentStyle().asFloat(CSSName.FS_COLSPAN); cell.rowspan = (int) c.getCurrentStyle().asFloat(CSSName.FS_ROWSPAN); if (fixed) { int width = 0; for (int i = 0; i < cell.colspan; i++) width += table.columns[col + i]; c.getExtents().width = width; } CalculatedStyle style = c.getCurrentStyle(); BorderPropertySet border = c.getCurrentStyle().getBorder(c); RectPropertySet padding = c.getCurrentStyle().getPaddingRect((float) oe.getWidth(), c); // calculate the width and height as much as possible int setHeight = -1;//means height is not set by css int setWidth = -1;//means width is not set by css if (!cell.getStyle().isAutoWidth()) { setWidth = (int) style.getFloatPropertyProportionalWidth(CSSName.WIDTH, c.getExtents().width, c); c.getExtents().width = setWidth; cell.contentWidth = (int) (setWidth - border.left() - padding.left() - padding.right() - border.right()); } if (!cell.getStyle().isAutoHeight()) { setHeight = (int) style.getFloatPropertyProportionalHeight(CSSName.HEIGHT, c.getExtents().height, c); c.getExtents().height = setHeight; cell.height = setHeight; } //check if replaced ReplacedElement re = c.getReplacedElementFactory().createReplacedElement( c, cell, c.getUac(), setWidth, setHeight); if (re != null) { cell.contentWidth = re.getIntrinsicWidth(); cell.height = re.getIntrinsicHeight(); cell.setReplacedElement(re); } // save height incase fixed height int original_height = cell.height; // do children's layout cell.leftMBP = (int) border.left() + (int) padding.left(); cell.rightMBP = (int) padding.right() + (int) border.right(); int tx = (int) border.left() + (int) padding.left(); int ty = (int) border.top() + (int) padding.top(); cell.tx = tx; cell.ty = ty; c.translate(tx, ty); Rectangle extents = c.shrinkExtents(tx + (int) border.right() + (int) padding.right(), ty + (int) border.bottom() + (int) padding.bottom()); if (! cell.isReplaced()) { int previousContentWidth = cell.contentWidth; cell.contentWidth = c.getExtents().width; cell.layoutChildren(c); cell.contentWidth = previousContentWidth; } else { if (c.isInteractive()) { c.getCanvas().add( ((SwingReplacedElement)cell.getReplacedElement()).getJComponent()); } } c.setExtents(extents); c.translate(-tx, -ty); // restore height incase fixed height if (!cell.getStyle().isAutoHeight()) { // Uu.p("restoring original height"); cell.height = original_height; } else { int delta = c.getBlockFormattingContext().getFloatManager().getClearDelta( c, (int) border.top() + (int) padding.top() + cell.height); if (delta > 0) { cell.height += delta; } } cell.height = (int) border.top() + (int) padding.top() + cell.height + (int) padding.bottom() + (int) border.bottom(); //restore the extents c.setExtents(oe); // remove the bfc c.popBFC(); //and now, back to previous style if (pushed != null) { c.popStyle(); } // Uu.p("BoxLayout: finished with cell: " + cell); cell.setState(Box.DONE); cell.expandToMaxChildWidth(); return cell; } | 52947 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52947/c503dd5c043db2513f5773aa55dcb4b694e3fe84/TableBoxing.java/clean/src/java/org/xhtmlrenderer/table/TableBoxing.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
8614,
3514,
3511,
4020,
12,
3744,
1042,
276,
16,
8614,
3514,
2484,
16,
3697,
913,
16,
1250,
5499,
16,
3555,
3514,
1014,
16,
509,
645,
13,
288,
3639,
368,
3141,
16,
1122,
444,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8614,
3514,
3511,
4020,
12,
3744,
1042,
276,
16,
8614,
3514,
2484,
16,
3697,
913,
16,
1250,
5499,
16,
3555,
3514,
1014,
16,
509,
645,
13,
288,
3639,
368,
3141,
16,
1122,
444,... | ||
Box treeBox = new Box(BoxLayout.Y_AXIS); treeBox.setBorder(new TitledBorder("Schema")); | JPanel treeBox = new JPanel(); treeBox.setLayout(new BoxLayout(treeBox, BoxLayout.Y_AXIS)); | public Box getButtonPanel() { associationLabel.setEditable(false); Box buttonsPanel = new Box(BoxLayout.X_AXIS); Box treeBox = new Box(BoxLayout.Y_AXIS); treeBox.setBorder(new TitledBorder("Schema")); Box mappingBox = new Box(BoxLayout.Y_AXIS); mappingBox.setBorder(new TitledBorder("Mapping")); Box nodeBox = new Box(BoxLayout.Y_AXIS); nodeBox.setBorder(new TitledBorder("Node")); Box associationBox = new Box(BoxLayout.X_AXIS); associationBox.setBorder(new TitledBorder("Associations")); Box outputBox = new Box(BoxLayout.X_AXIS); outputBox.setBorder(new TitledBorder("Output")); /* add a button for loading a XML Schema */ JButton loadFileb = new JButton("Open"); loadFileb.setMaximumSize(buttonsDimension); loadFileb.addActionListener(new LoadSchemaListener()); JButton setIdb = new JButton("Prefix"); setIdb.setMaximumSize(buttonsDimension); setIdb.addActionListener(new SetIdListener()); /* add a button for duplicate a node (in case of lists) */ JButton duplicateb = new JButton("Duplicate"); duplicateb.setMaximumSize(buttonsDimension); duplicateb.addActionListener(new DuplicateListener()); /* add a button for restauring original choice */ JButton choiceb = new JButton("Restaure"); choiceb.setMaximumSize(buttonsDimension); choiceb.addActionListener(new OriginalNodeListener()); JButton infosb = new JButton("About"); infosb.setMaximumSize(buttonsDimension); infosb.addActionListener(new InfosListener()); JButton checkb = new JButton("Check"); checkb.setMaximumSize(buttonsDimension); checkb.addActionListener(new CheckListener()); JButton previewb = new JButton("Preview"); previewb.setMaximumSize(buttonsDimension); previewb.addActionListener(new PreviewListener()); JButton printb = new JButton("Make XML"); printb.setMaximumSize(buttonsDimension); printb.addActionListener(new PrintListener()); treeBox.add(loadFileb); treeBox.add(setIdb); treeBox.add(checkb); nodeBox.add(duplicateb); nodeBox.add(choiceb); nodeBox.add(infosb); outputBox.add(previewb); outputBox.add(printb); associationButtons = new ButtonGroup(); fieldAssociation = new JRadioButton("to field"); duplicableFieldAssociation = new JRadioButton("to duplicable field"); dictionnaryAssociation = new JRadioButton("to dictionnary"); defaultAssociation = new JRadioButton("to default value"); autoGenerationAssociationButton = new JRadioButton("to automatic value"); flatFileAssociation = new JRadioButton("to flat file"); associationButtons.add(flatFileAssociation); associationButtons.add(duplicableFieldAssociation); associationButtons.add(fieldAssociation); associationButtons.add(dictionnaryAssociation); associationButtons.add(defaultAssociation); associationButtons.add(autoGenerationAssociationButton); associationButtons.setSelected(flatFileAssociation.getModel(), true); // JButton validationRegexpsb = new JButton("validate on regular // expression:"); // validationRegexpsb.setMaximumSize(buttonsDimension); // validationRegexpsb.addActionListener(new // validationRegexpsListener()); JButton genericAssociationb = new JButton("Associate"); genericAssociationb.setMaximumSize(buttonsDimension); genericAssociationb.addActionListener(new GenericAssociationListener()); JButton genericCancelAssociationb = new JButton("Cancel"); genericCancelAssociationb.setMaximumSize(buttonsDimension); genericCancelAssociationb .addActionListener(new GenericCancelAssociationListener()); Box associationb1Box = new Box(BoxLayout.Y_AXIS); Box associationb2Box = new Box(BoxLayout.Y_AXIS); Box associationb3Box = new Box(BoxLayout.X_AXIS); Box associationb4Box = new Box(BoxLayout.X_AXIS); associationb1Box.add(flatFileAssociation); associationb1Box.add(duplicableFieldAssociation); associationb1Box.add(fieldAssociation); JButton editFieldb = new JButton("validation"); editFieldb.addActionListener(new EditFieldAssociationListener()); associationb1Box.add(editFieldb); associationb1Box.add(dictionnaryAssociation); associationb1Box.add(defaultAssociation); associationb1Box.add(defaultAssociation); associationb1Box.add(autoGenerationAssociationButton); JScrollPane scrollPane = new JScrollPane(associationLabel); scrollPane .setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); associationb2Box.add(scrollPane); associationb3Box.add(genericAssociationb); associationb3Box.add(genericCancelAssociationb); associationb2Box.add(associationb4Box); associationb2Box.add(associationb3Box); associationBox.add(associationb2Box); associationBox.add(associationb1Box); Box lineBox2 = new Box(BoxLayout.X_AXIS); Box lineBox3 = new Box(BoxLayout.Y_AXIS); lineBox2.add(treeBox); lineBox2.add(nodeBox); lineBox3.add(lineBox2); lineBox3.add(outputBox); buttonsPanel.add(associationBox); buttonsPanel.add(lineBox3); return buttonsPanel; } | 6189 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6189/5d4d88bd8718ab3a8d2a08d4750a9110b4cc5fa9/XsdTreePanelImpl.java/buggy/psi/mi/tools/xmlMakerFlattener/src/mint/filemakers/xmlMaker/gui/XsdTreePanelImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8549,
2882,
2644,
5537,
1435,
288,
202,
202,
19358,
2224,
18,
542,
15470,
12,
5743,
1769,
202,
202,
3514,
9502,
5537,
273,
394,
8549,
12,
3514,
3744,
18,
60,
67,
25614,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8549,
2882,
2644,
5537,
1435,
288,
202,
202,
19358,
2224,
18,
542,
15470,
12,
5743,
1769,
202,
202,
3514,
9502,
5537,
273,
394,
8549,
12,
3514,
3744,
18,
60,
67,
25614,
1769,
... |
if (angle < cosMinAngle) | if (angle > -cosMinAngle) | private static final boolean checkRidges(Vertex v, double cosMinAngle, OTriangle ot) { if (ot.origin() != v) ot.nextOTri(); if (ot.origin() != v) ot.nextOTri(); assert ot.origin() == v; Vertex first = ot.destination(); while (true) { Vertex d = ot.destination(); if (d != Vertex.outer && 0 != d.getRef()) { double [] n1 = ot.getTri().normal3D(); ot.symOTri(); double [] n2 = ot.getTri().normal3D(); ot.symOTri(); double angle = Metric3D.prodSca(n1, n2); if (angle < cosMinAngle) return false; } ot.nextOTriOrigin(); if (ot.destination() == first) break; } return true; } | 46701 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46701/36df8f95d2cd875eb9f1d4a9f9aac59052c3c25a/Mesh.java/buggy/amibe/src/org/jcae/mesh/amibe/ds/Mesh.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
727,
1250,
866,
54,
350,
2852,
12,
6475,
331,
16,
1645,
4987,
2930,
8467,
16,
531,
31506,
15835,
13,
202,
95,
202,
202,
430,
261,
352,
18,
10012,
1435,
480,
331,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
727,
1250,
866,
54,
350,
2852,
12,
6475,
331,
16,
1645,
4987,
2930,
8467,
16,
531,
31506,
15835,
13,
202,
95,
202,
202,
430,
261,
352,
18,
10012,
1435,
480,
331,
13,
1... |
Properties props_, String initialSettings) | Properties props_) | public Tds( java.sql.Connection connection_, Properties props_, String initialSettings) throws java.io.IOException, java.net.UnknownHostException, java.sql.SQLException, com.internetcds.jdbc.tds.TdsException { connection = (java.sql.Connection) connection_; initialProps = props_; host = props_.getProperty("HOST"); serverType = Integer.parseInt(props_.getProperty("SERVERTYPE")); port = Integer.parseInt(props_.getProperty("PORT")); database = props_.getProperty("DBNAME"); user = props_.getProperty("user"); password = props_.getProperty("password"); appName = props_.getProperty("APPNAME", "jdbclib"); serverName = props_.getProperty("SERVERNAME", host); progName = props_.getProperty("PROGNAME", "java_app"); progMajorVersion = (byte) DriverVersion.getDriverMajorVersion(); progMinorVersion = (byte) DriverVersion.getDriverMinorVersion(); String verString = props_.getProperty("TDS", "42"); procedureCache = new HashMap(); // new Vector(); // XXX as proceduresOfTra = new ArrayList(); // XXX This driver doesn't properly support TDS 5.0, AFAIK. // Added 2000-06-07. tdsVer = TDS42; // tdsVer = TDS70; if (verString.equals("5.0")) { tdsVer = Tds.TDS50; } else if (verString.equals("7.0")) { tdsVer = Tds.TDS70; } // RMK 2000-06-08 if (System.getProperty("TDS_SHOW_WARNINGS") != null || props_.getProperty("TDS_SHOW_WARNINGS") != null) { showWarnings = true; } cancelController = new CancelController(); // Send the logon packet to the server sock = new Socket(host, port); sock.setTcpNoDelay(true); comm = new TdsComm(sock, tdsVer); setCharset(props_.getProperty("CHARSET")); if (logon()) { // everything is hunky-dory. } else { throw new SQLException("Logon failed. " + lastServerMessage); } } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/82db06b5ace2496789b551dd8bd53aa218a17088/Tds.java/clean/src.old/main/com/internetcds/jdbc/tds/Tds.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
399,
2377,
12,
5411,
2252,
18,
4669,
18,
1952,
1459,
67,
16,
5411,
6183,
3458,
67,
16,
5411,
514,
2172,
2628,
13,
2398,
1216,
2252,
18,
1594,
18,
14106,
16,
2252,
18,
2758,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
399,
2377,
12,
5411,
2252,
18,
4669,
18,
1952,
1459,
67,
16,
5411,
6183,
3458,
67,
16,
5411,
514,
2172,
2628,
13,
2398,
1216,
2252,
18,
1594,
18,
14106,
16,
2252,
18,
2758,
18,
... |
for (int descriptorIndx = 0; descriptorIndx < descriptors.length; descriptorIndx++) for (int extId = 0; extId < extensionIds.length; extId++) | for (int descriptorIndx = 0; descriptorIndx < descriptors.length; descriptorIndx++) { for (int extId = 0; extId < extensionIds.length; extId++) { | public INavigatorContentDescriptor[] activateExtensions( String[] extensionIds, boolean toDeactivateAllOthers) { Set activatedDescriptors = new HashSet(); setActive(extensionIds, true); for (int extId = 0; extId < extensionIds.length; extId++) { activatedDescriptors.add(CONTENT_DESCRIPTOR_REGISTRY .getContentDescriptor(extensionIds[extId])); } if (toDeactivateAllOthers) { NavigatorContentDescriptor[] descriptors = CONTENT_DESCRIPTOR_REGISTRY .getAllContentDescriptors(); List descriptorList = new ArrayList(Arrays.asList(descriptors)); for (int descriptorIndx = 0; descriptorIndx < descriptors.length; descriptorIndx++) for (int extId = 0; extId < extensionIds.length; extId++) if (descriptors[descriptorIndx].getId().equals( extensionIds[extId])) descriptorList.remove(descriptors[descriptorIndx]); String[] deactivatedExtensions = new String[descriptorList.size()]; for (int i = 0; i < descriptorList.size(); i++) { INavigatorContentDescriptor descriptor = (INavigatorContentDescriptor) descriptorList .get(i); deactivatedExtensions[i] = descriptor.getId(); } setActive(deactivatedExtensions, false); } if (activatedDescriptors.size() == 0) return NO_DESCRIPTORS; return (INavigatorContentDescriptor[]) activatedDescriptors .toArray(new NavigatorContentDescriptor[activatedDescriptors .size()]); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/NavigatorActivationService.java/buggy/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorActivationService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2120,
13061,
1350,
3187,
8526,
10235,
7513,
12,
1082,
202,
780,
8526,
2710,
2673,
16,
1250,
358,
758,
10014,
1595,
51,
29540,
13,
288,
202,
202,
694,
14892,
12705,
273,
394,
684... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2120,
13061,
1350,
3187,
8526,
10235,
7513,
12,
1082,
202,
780,
8526,
2710,
2673,
16,
1250,
358,
758,
10014,
1595,
51,
29540,
13,
288,
202,
202,
694,
14892,
12705,
273,
394,
684... |
String name =(String) i.next(); String value =(String) requestHeaders.get(name); line = name + HEADER_SEP + value + CRLF; | Headers.HeaderElement elt = (Headers.HeaderElement)i.next(); line = elt.name + HEADER_SEP + elt.value + CRLF; | public Response dispatch() throws IOException { if (dispatched) { throw new ProtocolException("request already dispatched"); } final String CRLF = "\r\n"; final String HEADER_SEP = ": "; final String US_ASCII = "US-ASCII"; final String version = connection.getVersion(); Response response; int contentLength = -1; boolean retry = false; int attempts = 0; boolean expectingContinue = false; if (requestBodyWriter != null) { contentLength = requestBodyWriter.getContentLength(); String expect = getHeader("Expect"); if (expect != null && expect.equals("100-continue")) { expectingContinue = true; } else { setHeader("Content-Length", Integer.toString(contentLength)); } } try { // Loop while authentication fails or continue do { retry = false; // Get socket output and input streams OutputStream out = connection.getOutputStream(); // Request line String requestUri = path; if (connection.isUsingProxy() && !"*".equals(requestUri) && !"CONNECT".equals(method)) { requestUri = getRequestURI(); } String line = method + ' ' + requestUri + ' ' + version + CRLF; out.write(line.getBytes(US_ASCII)); // Request headers for (Iterator i = requestHeaders.keySet().iterator(); i.hasNext(); ) { String name =(String) i.next(); String value =(String) requestHeaders.get(name); line = name + HEADER_SEP + value + CRLF; out.write(line.getBytes(US_ASCII)); } out.write(CRLF.getBytes(US_ASCII)); // Request body if (requestBodyWriter != null && !expectingContinue) { byte[] buffer = new byte[4096]; int len; int count = 0; requestBodyWriter.reset(); do { len = requestBodyWriter.write(buffer); if (len > 0) { out.write(buffer, 0, len); } count += len; } while (len > -1 && count < contentLength); } out.flush(); // Get response while(true) { response = readResponse(connection.getInputStream()); int sc = response.getCode(); if (sc == 401 && authenticator != null) { if (authenticate(response, attempts++)) { retry = true; } } else if (sc == 100) { if (expectingContinue) { requestHeaders.remove("Expect"); setHeader("Content-Length", Integer.toString(contentLength)); expectingContinue = false; retry = true; } else { // A conforming server can send an unsoliceted // Continue response but *should* not (RFC 2616 // sec 8.2.3). Ignore the bogus Continue // response and get the real response that // should follow continue; } } break; } } while (retry); } catch (IOException e) { connection.close(); throw e; } return response; } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/8da559ed4c7f73380c52b15b35f00d575632f56a/Request.java/buggy/gnu/java/net/protocol/http/Request.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2306,
3435,
1435,
565,
1216,
1860,
225,
288,
565,
309,
261,
10739,
329,
13,
1377,
288,
3639,
604,
394,
4547,
503,
2932,
2293,
1818,
25513,
8863,
1377,
289,
565,
727,
514,
21791,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2306,
3435,
1435,
565,
1216,
1860,
225,
288,
565,
309,
261,
10739,
329,
13,
1377,
288,
3639,
604,
394,
4547,
503,
2932,
2293,
1818,
25513,
8863,
1377,
289,
565,
727,
514,
21791,
273... |
m_urlOfSource = xmlSource.getSystemId(); | { m_urlOfSource = org.apache.xml.utils.SystemIDResolver.getAbsoluteURI(xmlSource.getSystemId()); xmlSource.setSystemId(m_urlOfSource); } | public void transform(Source source) throws TransformerException { if(source instanceof DOMSource) { DOMSource dsource = (DOMSource)source; m_urlOfSource = dsource.getSystemId(); Node dNode = dsource.getNode(); if (null != dNode) { if(null != m_urlOfSource) { // System.out.println("Putting document in cache: "+m_urlOfSource); this.getXPathContext().getSourceTreeManager().putDocumentInCache(dNode, dsource); } this.transformNode(dsource.getNode()); return; } else { String messageStr = XSLMessages.createMessage(XSLTErrorResources.ER_ILLEGAL_DOMSOURCE_INPUT, null); throw new IllegalArgumentException(messageStr); } } InputSource xmlSource = SAXSource.sourceToInputSource(source); if(null == xmlSource) { m_errorHandler.fatalError(new TransformerException("Can't transform a Source of type "+ source.getClass().getName()+"!")); } if (null != xmlSource.getSystemId()) m_urlOfSource = xmlSource.getSystemId(); try { XMLReader reader = null; if(source instanceof SAXSource) reader = ((SAXSource)source).getXMLReader(); if (null == reader) { // Use JAXP1.1 ( if possible ) try { javax.xml.parsers.SAXParserFactory factory= javax.xml.parsers.SAXParserFactory.newInstance(); factory.setNamespaceAware( true ); javax.xml.parsers.SAXParser jaxpParser= factory.newSAXParser(); reader=jaxpParser.getXMLReader(); } catch( javax.xml.parsers.ParserConfigurationException ex ) { throw new org.xml.sax.SAXException( ex ); } catch( javax.xml.parsers.FactoryConfigurationError ex1 ) { throw new org.xml.sax.SAXException( ex1.toString() ); } catch( NoSuchMethodError ex2 ) { } catch (AbstractMethodError ame){} } if (null == reader) { reader = XMLReaderFactory.createXMLReader(); } try { reader.setFeature("http://xml.org/sax/features/namespace-prefixes", true); reader.setFeature("http://apache.org/xml/features/validation/dynamic", true); } catch (org.xml.sax.SAXException se) { // We don't care. } // Get the input content handler, which will handle the // parse events and create the source tree. ContentHandler inputHandler = getInputContentHandler(); reader.setContentHandler(inputHandler); if(inputHandler instanceof org.xml.sax.DTDHandler) reader.setDTDHandler((org.xml.sax.DTDHandler)inputHandler); try { if(inputHandler instanceof org.xml.sax.ext.LexicalHandler) reader.setProperty("http://xml.org/sax/properties/lexical-handler", inputHandler); if(inputHandler instanceof org.xml.sax.ext.DeclHandler) reader.setProperty("http://xml.org/sax/properties/declaration-handler", inputHandler); } catch(org.xml.sax.SAXException se) {} try { if(inputHandler instanceof org.xml.sax.ext.LexicalHandler) reader.setProperty("http://xml.org/sax/handlers/LexicalHandler", inputHandler); if(inputHandler instanceof org.xml.sax.ext.DeclHandler) reader.setProperty("http://xml.org/sax/handlers/DeclHandler", inputHandler); } catch(org.xml.sax.SAXNotRecognizedException snre) { } // Set the reader for cloning purposes. getXPathContext().setPrimaryReader(reader); this.m_exceptionThrown = null; if (inputHandler instanceof SourceTreeHandler) { SourceTreeHandler sth = (SourceTreeHandler) inputHandler; sth.setInputSource(source); sth.setUseMultiThreading(true); Node doc = sth.getRoot(); if (null != doc) { SourceTreeManager stm = getXPathContext().getSourceTreeManager(); stm.putDocumentInCache(doc, source); m_xmlSource = source; m_doc = doc; if (isParserEventsOnMain()) { m_isTransformDone = false; getXPathContext().getPrimaryReader().parse(xmlSource); } else { Thread t = createTransformThread();// m_reportInPostExceptionFromThread = false; t.start(); transformNode(doc); } } } else { // ?? reader.parse(xmlSource); } // Kick off the parse. When the ContentHandler gets // the startDocument event, it will call transformNode( node ). // reader.parse( xmlSource ); // This has to be done to catch exceptions thrown from // the transform thread spawned by the STree handler. Exception e = getExceptionThrown(); if (null != e) { if (e instanceof javax.xml.transform.TransformerException) { throw (javax.xml.transform.TransformerException) e; } else if (e instanceof org.apache.xml.utils.WrappedRuntimeException) { m_errorHandler.fatalError( new javax.xml.transform.TransformerException( ((org.apache.xml.utils.WrappedRuntimeException) e).getException()) ); } else { throw new javax.xml.transform.TransformerException(e); } } else if (null != m_resultTreeHandler) { m_resultTreeHandler.endDocument(); } } catch (org.apache.xml.utils.WrappedRuntimeException wre) { Throwable throwable = wre.getException(); while (throwable instanceof org.apache.xml.utils.WrappedRuntimeException) { throwable = ((org.apache.xml.utils.WrappedRuntimeException) throwable).getException(); } m_errorHandler.fatalError( new TransformerException(wre.getException()) ); } // Patch attributed to David Eisenberg <david@catcode.com> catch (org.xml.sax.SAXParseException spe) { String msg = spe.getMessage(); SAXSourceLocator loc = new SAXSourceLocator(spe); m_errorHandler.fatalError(new TransformerException( msg, loc )); } catch(org.xml.sax.SAXException se) { m_errorHandler.fatalError(new TransformerException( se )); } catch (IOException ioe) { m_errorHandler.fatalError(new TransformerException( ioe )); } finally { // This looks to be redundent to the one done in TransformNode. reset(); } } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/be58440a49fdab9237347e3450c474f2dd9ad24d/TransformerImpl.java/clean/src/org/apache/xalan/transformer/TransformerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2510,
12,
1830,
1084,
13,
377,
1216,
21684,
225,
288,
565,
309,
12,
3168,
1276,
4703,
1830,
13,
565,
288,
1377,
4703,
1830,
302,
3168,
273,
261,
8168,
1830,
13,
3168,
31,
137... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2510,
12,
1830,
1084,
13,
377,
1216,
21684,
225,
288,
565,
309,
12,
3168,
1276,
4703,
1830,
13,
565,
288,
1377,
4703,
1830,
302,
3168,
273,
261,
8168,
1830,
13,
3168,
31,
137... |
setColor(i); | setColor(currentIndex); | void refresh() { if (isDisposed()) { return; } progressLabel.setText(getMainTitle()); int percentDone = getPercentDone(); JobInfo[] infos = getJobInfos(); if (isRunning()) { if (progressBar == null) { if (percentDone == IProgressMonitor.UNKNOWN) { // Only do it if there is an indeterminate task // There may be no task so we don't want to create it // until we know for sure for (int i = 0; i < infos.length; i++) { if (infos[i].hasTaskInfo() && infos[i].getTaskInfo().totalWork == IProgressMonitor.UNKNOWN) { createProgressBar(SWT.INDETERMINATE); break; } } } else { createProgressBar(SWT.NONE); progressBar.setMinimum(0); progressBar.setMaximum(100); } } // Protect against bad counters if (percentDone >= 0 && percentDone <= 100 && percentDone != progressBar.getSelection()) { progressBar.setSelection(percentDone); } } else if (isCompleted()) { if (progressBar != null) { progressBar.dispose(); progressBar = null; } setLayoutsForNoProgress(); actionButton.setImage(JFaceResources .getImage(CLEAR_FINISHED_JOB_KEY)); actionButton.setDisabledImage(JFaceResources .getImage(DISABLED_CLEAR_FINISHED_JOB_KEY)); } for (int i = 0; i < infos.length; i++) { JobInfo jobInfo = infos[i]; if (jobInfo.hasTaskInfo()) { String taskString = jobInfo.getTaskInfo().getTaskName(); String subTaskString = null; Object[] jobChildren = jobInfo.getChildren(); if (jobChildren.length > 0) { subTaskString = ((JobTreeElement) jobChildren[0]) .getDisplayString(); } if (subTaskString != null) { if (taskString == null) { taskString = subTaskString; } else { taskString = NLS.bind( ProgressMessages.JobInfo_DoneNoProgressMessage, taskString, subTaskString); } } if (taskString != null) { setLinkText(infos[i].getJob(), taskString, i); } } else {// Check for the finished job state Job job = jobInfo.getJob(); if (job.getResult() != null) { IStatus result = job.getResult(); String message = EMPTY_STRING; if (result != null) { message = result.getMessage(); } setLinkText(job, message, i); } } setColor(i); } // Remove completed tasks if (infos.length < taskEntries.size()) { for (int i = infos.length; i < taskEntries.size(); i++) { ((Link) taskEntries.get(i)).dispose(); } if (infos.length > 1) taskEntries = taskEntries.subList(0, infos.length - 1); else taskEntries.clear(); } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/d583225c39735eacd0a618ae9467e64379c8a99f/ProgressInfoItem.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressInfoItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
4460,
1435,
288,
202,
202,
430,
261,
291,
1669,
7423,
10756,
288,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
8298,
2224,
18,
542,
1528,
12,
588,
6376,
4247,
10663,
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,
6459,
4460,
1435,
288,
202,
202,
430,
261,
291,
1669,
7423,
10756,
288,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
8298,
2224,
18,
542,
1528,
12,
588,
6376,
4247,
10663,
202,
202... |
return (int) (((bytes[1] & 0xff) << 8) | (0xff & bytes[0])); | return ((bytes[1] & 0xff) << 8) | (0xff & bytes[0]); | static public int toUnsignedShort(byte[] bytes, boolean bigEndian) { if (bytes.length == 1) { return (int) (0xff & bytes[0]); } else if (bigEndian) { return (int) (((bytes[0] & 0xff) << 8) | (0xff & bytes[1])); } else { return (int) (((bytes[1] & 0xff) << 8) | (0xff & bytes[0])); } } | 8350 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8350/5260440040976f842c028c8f42eddeb7ec697f78/Utils.java/buggy/src/sphinx4/edu/cmu/sphinx/tools/audio/Utils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1071,
509,
358,
13290,
4897,
12,
7229,
8526,
1731,
16,
1250,
5446,
7583,
13,
288,
202,
430,
261,
3890,
18,
2469,
422,
404,
13,
288,
202,
565,
327,
261,
474,
13,
261,
20,
5297,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
358,
13290,
4897,
12,
7229,
8526,
1731,
16,
1250,
5446,
7583,
13,
288,
202,
430,
261,
3890,
18,
2469,
422,
404,
13,
288,
202,
565,
327,
261,
474,
13,
261,
20,
5297,
47... |
System.out.println("3"); | private static String stripWiki(String text) { int i = 0, j, k; i = text.indexOf("[[Image:"); if (i == -1) i = text.indexOf("[[image:"); int l = i; System.out.println("1"); while (i > -1) { j = text.indexOf("[[", i + 2); k = text.indexOf("]]", i + 2); if (j != -1 && j < k && k > -1) { i = k; continue; } else { if (k == -1) text = text.substring(0, l); else text = text.substring(0, l) + text.substring(k + 2); i = text.indexOf("[[Image:"); if (i == -1) i = text.indexOf("[[image:"); l = i; } } System.out.println("2"); while ((i = text.indexOf("<!--")) != -1) { if ((j = text.indexOf("-->", i)) == -1) break; if (j + 4 >= text.length()) text = text.substring(0, i); else text = text.substring(0, i) + text.substring(j + 4); } System.out.println("3"); text = text.replaceAll("\\{\\|(.*?)\\|\\}", "") .replaceAll("\\[\\[[A-Za-z_-]+:([^|]+?)\\]\\]", "") .replaceAll("\\[\\[([^|]+?)\\]\\]", "$1") .replaceAll("\\[\\[([^|]+\\|)(.*?)\\]\\]", "$2") .replaceAll("(^|\n):*''[^'].*\n", "") .replaceAll("^----.*", "") .replaceAll("'''''", "") .replaceAll("('''|</?[bB]>)", "") .replaceAll("''", "") .replaceAll("</?[uU]>", ""); System.out.println("4"); return text; } | 7109 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7109/7bd014b4b714e0de505f124d05fad8f27e6a7738/MWSearch.java/buggy/lucene-search/src/org/wikimedia/lsearch/MWSearch.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
514,
2569,
25438,
12,
780,
977,
13,
288,
202,
202,
474,
277,
273,
374,
16,
525,
16,
417,
31,
202,
202,
77,
273,
977,
18,
31806,
2932,
31128,
2040,
2773,
1769,
202,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
514,
2569,
25438,
12,
780,
977,
13,
288,
202,
202,
474,
277,
273,
374,
16,
525,
16,
417,
31,
202,
202,
77,
273,
977,
18,
31806,
2932,
31128,
2040,
2773,
1769,
202,
202... | |
choiceSet = DesignEngine.getMetaDataDictionary( ) | choiceSet = DEUtil.getMetaDataDictionary( ) | private IChoiceSet getFormatChoiceSet( String type ) { IChoiceSet choiceSet = null; if ( DesignChoiceConstants.PARAM_TYPE_STRING.equals( type ) ) { choiceSet = DesignEngine.getMetaDataDictionary( ) .getChoiceSet( DesignChoiceConstants.CHOICE_STRING_FORMAT_TYPE ); } else if ( DesignChoiceConstants.PARAM_TYPE_DATETIME.equals( type ) ) { choiceSet = DesignEngine.getMetaDataDictionary( ) .getChoiceSet( DesignChoiceConstants.CHOICE_DATETIME_FORMAT_TYPE ); } else if ( DesignChoiceConstants.PARAM_TYPE_DECIMAL.equals( type ) || DesignChoiceConstants.PARAM_TYPE_FLOAT.equals( type ) ) { choiceSet = DesignEngine.getMetaDataDictionary( ) .getChoiceSet( DesignChoiceConstants.CHOICE_NUMBER_FORMAT_TYPE ); } return choiceSet; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/112d9727a9137a0204f4192391212e00ab899e84/ParameterDialog.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/ParameterDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
467,
10538,
694,
10959,
10538,
694,
12,
514,
618,
262,
202,
95,
202,
202,
45,
10538,
694,
6023,
694,
273,
446,
31,
202,
202,
430,
261,
29703,
10538,
2918,
18,
8388,
67,
2399,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
467,
10538,
694,
10959,
10538,
694,
12,
514,
618,
262,
202,
95,
202,
202,
45,
10538,
694,
6023,
694,
273,
446,
31,
202,
202,
430,
261,
29703,
10538,
2918,
18,
8388,
67,
2399,... |
mpvs.setPropertyValueAt(new PropertyValue(propertyName,c.getTime()),i); else mpvs.setPropertyValueAt(new PropertyValue(propertyName,c),i); | mpvs.setPropertyValueAt(new PropertyValue(propertyName,c.getTime()),i); else mpvs.setPropertyValueAt(new PropertyValue(propertyName,c),i); | private void checkStructuredDateDefinitions(ServletRequest request, MutablePropertyValues mpvs) { PropertyValue[] pvs = mpvs.getPropertyValues(); for (int i = 0; i < pvs.length; i++) { PropertyValue pv = pvs[i]; try { String propertyName = pv.getName(); Class type = super.getBeanWrapper().getPropertyType(propertyName); // if its a date check that it hasn't got structured parameters in the request // this is used as an alternative to specifying the date format if(type == Date.class || type == Calendar.class) { try { int year = Integer.parseInt(request.getParameter(propertyName + "_year")); int month = Integer.parseInt(request.getParameter(propertyName + "_month")); int day = Integer.parseInt(request.getParameter(propertyName + "_day")); int hour = Integer.parseInt(request.getParameter(propertyName + "_hour")); int minute = Integer.parseInt(request.getParameter(propertyName + "_minute")); Calendar c = new GregorianCalendar(year,month - 1,day,hour,minute); if(type == Date.class) mpvs.setPropertyValueAt(new PropertyValue(propertyName,c.getTime()),i); else mpvs.setPropertyValueAt(new PropertyValue(propertyName,c),i); } catch(NumberFormatException nfe) { LOG.warn("Unable to parse structured date from request for date ["+propertyName+"]",nfe); } } } catch(InvalidPropertyException ipe) { // ignore } } } | 52953 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52953/6cbe4c4e9d0ebf61dda52d13446eca8cd413a126/GrailsDataBinder.java/buggy/src/web/org/codehaus/groovy/grails/web/binding/GrailsDataBinder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
866,
30733,
1626,
7130,
12,
18572,
590,
16,
10960,
1396,
1972,
6749,
6904,
13,
288,
3639,
4276,
620,
8526,
293,
6904,
273,
6749,
6904,
18,
588,
1396,
1972,
5621,
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,
225,
202,
1152,
918,
866,
30733,
1626,
7130,
12,
18572,
590,
16,
10960,
1396,
1972,
6749,
6904,
13,
288,
3639,
4276,
620,
8526,
293,
6904,
273,
6749,
6904,
18,
588,
1396,
1972,
5621,
3639,
364... |
public Mark selectFirst(double x, double y, AttributedCharacterIterator aci, TextNode node, GraphicsNodeRenderContext context); | Mark selectFirst(double x, double y, AttributedCharacterIterator aci, TextNode node); | public Mark selectFirst(double x, double y, AttributedCharacterIterator aci, TextNode node, GraphicsNodeRenderContext context); | 46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/4c1a37c6e3e260eb88efd61d61285ad704f7c64a/TextPainter.java/buggy/sources/org/apache/batik/gvt/TextPainter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6622,
2027,
3759,
12,
9056,
619,
16,
1645,
677,
16,
18701,
2380,
11050,
7069,
3198,
1721,
77,
16,
18701,
3867,
907,
756,
16,
18701,
16830,
907,
3420,
1042,
819,
1769,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6622,
2027,
3759,
12,
9056,
619,
16,
1645,
677,
16,
18701,
2380,
11050,
7069,
3198,
1721,
77,
16,
18701,
3867,
907,
756,
16,
18701,
16830,
907,
3420,
1042,
819,
1769,
2,
-100,
-100,... |
rfsName += C_EXPORT_DEFAULT_FILE; | rfsName += EXPORT_DEFAULT_FILE; | public int export(HttpServletRequest req, HttpServletResponse res, CmsObject cms, CmsStaticExportData data) throws CmsException, IOException, ServletException, CmsStaticExportException { int status = -1; CmsFile file; String vfsName = data.getVfsName(); String rfsName = data.getRfsName(); CmsResource resource = data.getResource(); // cut the site root from the vfsName and switch to the correct site String siteRoot = CmsSiteManager.getSiteRoot(vfsName); CmsI18nInfo i18nInfo = OpenCms.getLocaleManager().getI18nInfo( req, cms.getRequestContext().currentUser(), cms.getRequestContext().currentProject(), vfsName); String remoteAddr = m_remoteAddr; if (remoteAddr == null) { remoteAddr = I_CmsConstants.C_IP_LOCALHOST; } CmsContextInfo contextInfo = new CmsContextInfo(cms.getRequestContext().currentUser(), cms.getRequestContext() .currentProject(), vfsName, "/", i18nInfo.getLocale(), i18nInfo.getEncoding(), remoteAddr); cms = OpenCms.initCmsObject(null, contextInfo); if (siteRoot != null) { vfsName = vfsName.substring(siteRoot.length()); } else { siteRoot = "/"; } if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().key(Messages.LOG_STATIC_EXPORT_SITE_ROOT_2, siteRoot, vfsName)); } cms.getRequestContext().setSiteRoot(siteRoot); String oldUri = null; // this flag signals if the export method is used for "on demand" or "after publish". // if no request and result stream are available, it was called during "export on publish" boolean exportOnDemand = ((req != null) && (res != null)); CmsStaticExportResponseWrapper wrapRes = null; if (res != null) { wrapRes = new CmsStaticExportResponseWrapper(res); } if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().key(Messages.LOG_SE_RESOURCE_START_1, data)); } // read vfs resource if (resource.isFile()) { file = cms.readFile(vfsName); } else { file = CmsFile.upgrade(OpenCms.initResource(cms, vfsName, req, wrapRes), cms); try { cms.readResource(vfsName + file.getName()); vfsName = vfsName + file.getName(); } catch (CmsException e) { // } rfsName += C_EXPORT_DEFAULT_FILE; } // check loader id for resource I_CmsResourceLoader loader = OpenCms.getResourceManager().getLoader(file); if ((loader == null) || (!loader.isStaticExportEnabled())) { Object[] arguments = new Object[]{vfsName, new Integer(file.getTypeId())}; throw new CmsStaticExportException(Messages.get().container(Messages.ERR_EXPORT_NOT_SUPPORTED_2, arguments)); } FileOutputStream exportStream = null; File exportFile = null; String exportFileName = CmsFileUtil.normalizePath(getExportPath() + rfsName); // only export those resource where the export property is set if (OpenCms.getLinkManager().exportRequired(cms, vfsName)) { // make sure all required parent folder exist createExportFolder(rfsName); status = HttpServletResponse.SC_OK; // generate export file instance and output stream exportFile = new File(exportFileName); } else { // the resource was not used for export, so return HttpServletResponse.SC_SEE_OTHER // as a signal for not exported resource status = HttpServletResponse.SC_SEE_OTHER; } // ensure we have exactly the same setup as if called "the usual way" // we only have to do this in case of the static export on demand if (exportOnDemand) { String mimetype = OpenCms.getResourceManager().getMimeType( file.getName(), cms.getRequestContext().getEncoding()); if (wrapRes != null) { wrapRes.setContentType(mimetype); } oldUri = cms.getRequestContext().getUri(); cms.getRequestContext().setUri(vfsName); } // do the export byte[] result = loader.export(cms, file, req, wrapRes); // release unused resources file = null; if (result != null) { if (exportFile != null) { // write new exported file content try { exportStream = new FileOutputStream(exportFile); exportStream.write(result); exportStream.close(); } catch (Throwable t) { throw new CmsStaticExportException(Messages.get().container(Messages.ERR_OUTPUT_STREAM_1, exportFileName), t); } // update the file with the modification date from the server if (req != null) { Long dateLastModified = (Long)req.getAttribute(I_CmsConstants.C_HEADER_OPENCMS_EXPORT); if ((dateLastModified != null) && (dateLastModified.longValue() != -1)) { exportFile.setLastModified((dateLastModified.longValue() / 1000) * 1000); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().key(Messages.LOG_SET_LAST_MODIFIED_2, exportFile.getName(), new Long((dateLastModified.longValue() / 1000) * 1000))); } } } else { // otherweise take the last modification date form the OpenCms resource exportFile.setLastModified((resource.getDateLastModified() / 1000) * 1000); } } // get the status that was set status = (wrapRes != null) ? wrapRes.getStatus() : -1; if (status < 0) { // the status was not set, assume everything is o.k. status = HttpServletResponse.SC_OK; } } else { // the resource was not written because it was not modified. // set the status to not modified status = HttpServletResponse.SC_NOT_MODIFIED; } // restore context // we only have to do this in case of the static export on demand if (exportOnDemand) { cms.getRequestContext().setUri(oldUri); } // log export success if (LOG.isInfoEnabled()) { LOG.info(Messages.get().key(Messages.LOG_STATIC_EXPORTED_2, vfsName, exportFileName)); } return status; } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/d6b5089281646a808cd03ce9039138d8b4818362/CmsStaticExportManager.java/buggy/src/org/opencms/staticexport/CmsStaticExportManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
3359,
12,
2940,
18572,
1111,
16,
12446,
400,
16,
14371,
6166,
16,
2149,
5788,
6144,
751,
501,
13,
565,
1216,
11228,
16,
1860,
16,
16517,
16,
2149,
5788,
6144,
503,
288,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
3359,
12,
2940,
18572,
1111,
16,
12446,
400,
16,
14371,
6166,
16,
2149,
5788,
6144,
751,
501,
13,
565,
1216,
11228,
16,
1860,
16,
16517,
16,
2149,
5788,
6144,
503,
288,
3639,
... |
if ((buffer[offset] & '\ufff0') == 0) { | if ((buffer[offset] & '\udfd0') == 0) { | int read() throws IOException { for(;;) { if (end == offset && !fill()) return -1; // Do only a bitmask + branch per character, at the cost of // three branches per low-bits-only character. if ((buffer[offset] & '\ufff0') == 0) { if (buffer[offset] == '\r') { // if the next character is a newline, skip past it. if ((offset + 1) < end) { if (buffer[offset + 1] == '\n') offset++; } else { // set a flag for fill(), in case the first char of the // next fill is a newline. lastWasCR = true; } } else if (buffer[offset] != '\n') { return (int) buffer[offset++]; } offset++; prevStart = lineStart; lineStart = offset; lineno++; return '\n'; } if ((buffer[offset] >= 128) && Character.getType(buffer[offset]) == Character.FORMAT) { hadCFSinceStringStart = true; offset++; } else break; } return (int) buffer[offset++]; } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/a912f99c105742299def40e5379d8c4bf79beee6/LineBuffer.java/clean/js/rhino/src/org/mozilla/javascript/LineBuffer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
509,
855,
1435,
1216,
1860,
288,
202,
202,
1884,
12,
25708,
13,
288,
1082,
202,
430,
261,
409,
422,
1384,
597,
401,
5935,
10756,
9506,
565,
327,
300,
21,
31,
1082,
202,
759,
2256,
1338,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
855,
1435,
1216,
1860,
288,
202,
202,
1884,
12,
25708,
13,
288,
1082,
202,
430,
261,
409,
422,
1384,
597,
401,
5935,
10756,
9506,
565,
327,
300,
21,
31,
1082,
202,
759,
2256,
1338,... |
if ((active1 & 0x100000000040000L) != 0L) | if ((active1 & 0x40000000040000L) != 0L) | private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1){ switch (pos) { case 0: if ((active1 & 0x100000000040000L) != 0L) return 4; if ((active0 & 0x7ffffffffffff000L) != 0L) { jjmatchedKind = 71; return 28; } if ((active0 & 0x100L) != 0L || (active1 & 0x1002000000000L) != 0L) return 49; return -1; case 1: if ((active0 & 0x201800000L) != 0L) return 28; if ((active0 & 0x7ffffffdfe7ff000L) != 0L) { if (jjmatchedPos != 1) { jjmatchedKind = 71; jjmatchedPos = 1; } return 28; } if ((active0 & 0x100L) != 0L) return 54; return -1; case 2: if ((active0 & 0x400026080000000L) != 0L) return 28; if ((active0 & 0x7bfffd9d7f7ff000L) != 0L) { if (jjmatchedPos != 2) { jjmatchedKind = 71; jjmatchedPos = 2; } return 28; } return -1; case 3: if ((active0 & 0xa20048102058000L) != 0L) return 28; if ((active0 & 0x71dff95c7d7a7000L) != 0L) { jjmatchedKind = 71; jjmatchedPos = 3; return 28; } return -1; case 4: if ((active0 & 0x20c50000781a4000L) != 0L) return 28; if ((active0 & 0x511af95c05603000L) != 0L) { if (jjmatchedPos != 4) { jjmatchedKind = 71; jjmatchedPos = 4; } return 28; } return -1; case 5: if ((active0 & 0x8ac10801000000L) != 0L) return 28; if ((active0 & 0x5110385424603000L) != 0L) { jjmatchedKind = 71; jjmatchedPos = 5; return 28; } return -1; case 6: if ((active0 & 0x5110205400201000L) != 0L) { jjmatchedKind = 71; jjmatchedPos = 6; return 28; } if ((active0 & 0x180024402000L) != 0L) return 28; return -1; case 7: if ((active0 & 0x5000000000201000L) != 0L) return 28; if ((active0 & 0x110205400000000L) != 0L) { jjmatchedKind = 71; jjmatchedPos = 7; return 28; } return -1; case 8: if ((active0 & 0x100204000000000L) != 0L) return 28; if ((active0 & 0x10001400000000L) != 0L) { jjmatchedKind = 71; jjmatchedPos = 8; return 28; } return -1; case 9: if ((active0 & 0x10000000000000L) != 0L) { jjmatchedKind = 71; jjmatchedPos = 9; return 28; } if ((active0 & 0x1400000000L) != 0L) return 28; return -1; case 10: if ((active0 & 0x10000000000000L) != 0L) { jjmatchedKind = 71; jjmatchedPos = 10; return 28; } return -1; default : return -1; }} | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/1d8de6b34ea0ddb64fc94b478c0950c0d35de605/JavaParserTokenManager.java/buggy/pmd/src/net/sourceforge/pmd/ast/JavaParserTokenManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
727,
509,
10684,
4947,
28565,
40,
507,
67,
20,
12,
474,
949,
16,
1525,
2695,
20,
16,
1525,
2695,
21,
15329,
282,
1620,
261,
917,
13,
282,
288,
1377,
648,
374,
30,
540,
309,
14015,
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,
727,
509,
10684,
4947,
28565,
40,
507,
67,
20,
12,
474,
949,
16,
1525,
2695,
20,
16,
1525,
2695,
21,
15329,
282,
1620,
261,
917,
13,
282,
288,
1377,
648,
374,
30,
540,
309,
14015,
35... |
double magFactor) | double magFactor, int w, int h) | public ToolBar(Registry registry, ImageInspectorManager manager, double magFactor) { setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); putClientProperty("JToolBar.isRollover", new Boolean(true)); zoomBar = new ZoomBar(registry, manager, magFactor); lensBar = new LensBar(registry, manager); add(zoomBar); add(Box.createRigidArea(HBOX)); add(new JSeparator(JSeparator.HORIZONTAL)); add(lensBar); add(new JSeparator(JSeparator.HORIZONTAL)); add(Box.createRigidArea(HBOX)); } | 55464 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55464/8846f7da5fbaf4d3fb83aa43b5616bcd13483654/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/transform/ToolBar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
13288,
5190,
12,
4243,
4023,
16,
3421,
19443,
1318,
3301,
16,
5397,
1645,
4447,
6837,
16,
509,
341,
16,
509,
366,
13,
565,
288,
3639,
18479,
12,
2704,
8549,
3744,
12,
2211,
16,
85... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13288,
5190,
12,
4243,
4023,
16,
3421,
19443,
1318,
3301,
16,
5397,
1645,
4447,
6837,
16,
509,
341,
16,
509,
366,
13,
565,
288,
3639,
18479,
12,
2704,
8549,
3744,
12,
2211,
16,
85... |
VM.sysExit(VM.exitStatusDyingWithUncaughtException); | VM.sysExit(VM.EXIT_STATUS_DYING_WITH_UNCAUGHT_EXCEPTION); | static void terminate () throws InterruptiblePragma { boolean terminateSystem = false; if (trace) VM_Scheduler.trace("VM_Thread", "terminate"); if (traceTermination) { VM.disableGC(); VM.sysWriteln("[ BEGIN Verbosely dumping stack at time of thread termination"); VM_Scheduler.dumpStack(); VM.sysWriteln("END Verbosely dumping stack at time of creating thread termination ]"); VM.enableGC(); } //-#if RVM_WITH_HPM // sample HPM counter values at every interrupt or a thread switch. if (VM.BuildForHPM && VM_HardwarePerformanceMonitors.safe && ! VM_HardwarePerformanceMonitors.thread_group) { captureCallChainCMIDs(false); VM_Thread myThread = getCurrentThread(); if (VM_HardwarePerformanceMonitors.verbose>=5) { VM.sysWriteln("***VM_Thread.startoff() terminate thread "+myThread.getIndex()+"***!"); } VM_Processor.getCurrentProcessor().hpm.updateHPMcounters(myThread, false, true); } //-#endif //-#if RVM_WITH_ADAPTIVE_SYSTEM VM_RuntimeMeasurements.monitorThreadExit(); //-#endif VM_Thread myThread = getCurrentThread(); // allow java.lang.Thread.exit() to remove this thread from ThreadGroup myThread.exit(); synchronized (myThread) { // release anybody waiting on this thread - // begin critical section // VM_Scheduler.threadCreationMutex.lock(); VM_Processor.getCurrentProcessor().disableThreadSwitching(); // in particular, see java.lang.Thread.join() myThread.isAlive = false; myThread.notifyAll(); } // // if the thread terminated because of an exception, remove // the mark from the exception register object, or else the // garbage collector will attempt to relocate its ip field. myThread.hardwareExceptionRegisters.inuse = false; VM_Scheduler.numActiveThreads -= 1; if (myThread.isDaemon) VM_Scheduler.numDaemons -= 1; if (VM_Scheduler.numDaemons == VM_Scheduler.numActiveThreads) { // no non-daemon thread remains terminateSystem = true; } if (traceTermination) { VM.sysWriteln("VM_Thread.terminate: myThread.isDaemon = ", myThread.isDaemon); VM.sysWriteln(" VM_Scheduler.numActiveThreads = ", VM_Scheduler.numActiveThreads); VM.sysWriteln(" VM_Scheduler.numDaemons = ", VM_Scheduler.numDaemons); VM.sysWriteln(" terminateSystem = ", terminateSystem); } // end critical section // VM_Processor.getCurrentProcessor().enableThreadSwitching(); VM_Scheduler.threadCreationMutex.unlock(); if (VM.VerifyAssertions) VM._assert( (!VM.fullyBooted && terminateSystem ) || VM_Processor.getCurrentProcessor().threadSwitchingEnabled()); if (terminateSystem) { if (myThread.dyingWithUncaughtException) VM.sysExit(VM.exitStatusDyingWithUncaughtException); else if (myThread.thread instanceof MainThread) { MainThread mt = (MainThread) myThread.thread; if (! mt.launched) { VM.sysExit(VM.exitStatusMainThreadCouldNotLaunch); } } VM.sysExit(0); if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED); } if (myThread.jniEnv != null) { VM_JNIEnvironment.deallocateEnvironment(myThread.jniEnv); myThread.jniEnv = null; } // become another thread // begin critical section // VM_Scheduler.threadCreationMutex.lock(); myThread.releaseThreadSlot(); myThread.beingDispatched = true; VM_Scheduler.threadCreationMutex.unlock(); VM_Processor.getCurrentProcessor().dispatch(false); if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED); } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/d6068c5ba70e6ee40bffe9c49b0e352cd82ebe7e/VM_Thread.java/clean/rvm/src/vm/scheduler/VM_Thread.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
918,
10850,
1832,
1216,
3094,
4483,
1523,
2050,
9454,
288,
565,
1250,
10850,
3163,
273,
629,
31,
565,
309,
261,
5129,
13,
8251,
67,
11870,
18,
5129,
2932,
7397,
67,
3830,
3113,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
918,
10850,
1832,
1216,
3094,
4483,
1523,
2050,
9454,
288,
565,
1250,
10850,
3163,
273,
629,
31,
565,
309,
261,
5129,
13,
8251,
67,
11870,
18,
5129,
2932,
7397,
67,
3830,
3113,
315,
... |
public void startDocument(XMLLocator locator, String encoding) | public void startDocument(XMLLocator locator, String encoding, Augmentations augs) | public void startDocument(XMLLocator locator, String encoding) throws XNIException { } // startDocument(XMLLocator,String) | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/1281996de10d3af1b51f0b4d78cfcd75d8ade6fe/AbstractXMLDocumentParser.java/buggy/src/org/apache/xerces/parsers/AbstractXMLDocumentParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
787,
2519,
12,
4201,
5786,
8871,
16,
514,
2688,
16,
432,
14870,
1012,
279,
9024,
13,
540,
1216,
1139,
50,
45,
503,
288,
565,
289,
368,
787,
2519,
12,
4201,
5786,
16,
780,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
787,
2519,
12,
4201,
5786,
8871,
16,
514,
2688,
16,
432,
14870,
1012,
279,
9024,
13,
540,
1216,
1139,
50,
45,
503,
288,
565,
289,
368,
787,
2519,
12,
4201,
5786,
16,
780,
1... |
throws SQLException, IOException { | throws SQLException, IOException { | public int insertBlobTrigger(Connection conn, Trigger trigger) throws SQLException, IOException { PreparedStatement ps = null; ByteArrayOutputStream os = null; try { // update the blob os = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(os); oos.writeObject(trigger); oos.close(); byte[] buf = os.toByteArray(); ByteArrayInputStream is = new ByteArrayInputStream(buf); ps = conn.prepareStatement(rtp(INSERT_BLOB_TRIGGER)); ps.setString(1, trigger.getName()); ps.setString(2, trigger.getGroup()); ps.setBinaryStream(3, is, buf.length); return ps.executeUpdate(); } finally { closeStatement(ps); } } | 3431 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3431/0ca5d7d851637eb8695746dba9608de14253a225/StdJDBCDelegate.java/buggy/src/java/org/quartz/impl/jdbcjobstore/StdJDBCDelegate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
2243,
9405,
6518,
12,
1952,
1487,
16,
11321,
3080,
13,
5411,
1216,
6483,
16,
1860,
288,
3639,
16913,
4250,
273,
446,
31,
3639,
11559,
1140,
273,
446,
31,
3639,
775,
288,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
2243,
9405,
6518,
12,
1952,
1487,
16,
11321,
3080,
13,
5411,
1216,
6483,
16,
1860,
288,
3639,
16913,
4250,
273,
446,
31,
3639,
11559,
1140,
273,
446,
31,
3639,
775,
288,
5411,
... |
meta_data[i] = rsmd.getColumnLabel(++i) ; | meta_data[i] = rsmd.getColumnLabel(++i) ; | public Vector executeProcedure() { Vector results = new Vector() ; try { if (cs == null) { throw new NullPointerException("DBConnect.executeProcedure() cs == null") ; } rs = cs.executeQuery() ; if (rs == null) { throw new NullPointerException("DBConnect.executeProcedure() rs == null") ; } rsmd = rs.getMetaData() ; columnCount = rsmd.getColumnCount() ; meta_data = new String[columnCount] ; for (int i = 0 ; i<columnCount ; ) { meta_data[i] = rsmd.getColumnLabel(++i) ; } while ( rs.next() ) { for ( int i = 1 ; i <= columnCount; i++ ) { String s = rs.getString(i) ; if (s == null) { s = "" ; } if ( trimStr ) results.addElement(s.trim()) ; else results.addElement(s) ; } } rs.close() ; cs.close() ; } catch (Exception ex) { String eol = System.getProperty("line.separator") ; log.warn("Failed to execute procedure: {"+eol+strProcedure+eol+"}", ex) ; } return results ; } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/5809d66a25d58d7ffad1cd1d9aa41c714fbcef76/DBConnect.java/clean/server/src/imcode/server/DBConnect.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5589,
1836,
17213,
1435,
225,
288,
202,
5018,
1686,
273,
394,
5589,
1435,
274,
202,
698,
288,
202,
565,
309,
261,
2143,
422,
446,
13,
288,
202,
202,
12849,
394,
10108,
2932,
2290,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5589,
1836,
17213,
1435,
225,
288,
202,
5018,
1686,
273,
394,
5589,
1435,
274,
202,
698,
288,
202,
565,
309,
261,
2143,
422,
446,
13,
288,
202,
202,
12849,
394,
10108,
2932,
2290,
... |
e.printStackTrace(); | e.printStackTrace(); | public static void main(String[] args) { try { //System.err.println("entered main"); splashScreen = new SplashScreen("Initialising. Please wait...", 20); splashScreen.incProgress(); Browser f = new Browser(WIDTH, HEIGHT); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); if (args.length > 0 && args[0] != null) if (args[0].equals("-standalone") || f.workOffline() ) { f.standAlone = true; f.chooseNewLocalCorpus(); //f.dictionary = new Dictionary(); } else f.SERVER = args[0]; // SL: all this needs to be revamped to allow user to choose which // corpus server(s) to connect to. else if ( f.workOffline() ) if ( f.clProperties.getProperty("last.index.dir") == null) f.chooseNewLocalCorpus(); else f.setLocalCorpus(f.clProperties.getProperty("last.index.dir")); else if ( f.clProperties.getProperty("tec.client.server") != null ) f.SERVER = f.clProperties.getProperty("tec.client.server"); f.HEDBAS = "http://"+f.SERVER+"/tec/headers"; if ( f.clProperties.getProperty("tec.client.headers") != null ) f.HEDBAS = f.clProperties.getProperty("tec.client.headers"); //f.show(); if ( f.clProperties.getProperty("tec.client.port") != null ) f.PORTNUM = new Integer(f.clProperties.getProperty("tec.client.port")).intValue(); //f.setAdvSearchOptions(); f.pack(); splashScreen.dismiss(); f.setVisible(true); f.noApplet = true; //System.err.println("SERVER="+f.SERVER+" PORT="+f.PORTNUM+"\nHEADERS="+f.HEDBAS); } catch (Exception e){ System.err.println(e+" Usage: Browser HOSTNAME\n See also client.properties"); e.printStackTrace(); System.exit(1); }} | 55997 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55997/d9c398b6a96694293062ede8d2a45ea00b897817/Browser.java/clean/trunk/src/modnlp/tec/client/Browser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
565,
775,
288,
1377,
368,
3163,
18,
370,
18,
8222,
2932,
2328,
329,
2774,
8863,
1377,
6121,
961,
7956,
273,
394,
29356,
7956,
2932,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
565,
775,
288,
1377,
368,
3163,
18,
370,
18,
8222,
2932,
2328,
329,
2774,
8863,
1377,
6121,
961,
7956,
273,
394,
29356,
7956,
2932,
44... |
this.memory.getRightObjectMemory().size() ); | this.memory.getObjectMemory().size() ); | public void testRetractObject() { final DefaultFactHandle f0 = (DefaultFactHandle) this.workingMemory.getFactHandleFactory().newFactHandle( "cheese" ); final DefaultFactHandle f1 = (DefaultFactHandle) this.workingMemory.getFactHandleFactory().newFactHandle( "other cheese" ); final ReteTuple tuple0 = new ReteTuple( f0 ); this.node.assertObject( f0, this.context, this.workingMemory ); this.node.assertObject( f1, this.context, this.workingMemory ); assertEquals( 2, this.memory.getRightObjectMemory().size() ); // assert tuple, should add one to left memory this.node.assertTuple( tuple0, this.context, this.workingMemory ); // check memory assertEquals( 1, this.memory.getLeftTupleMemory().size() ); assertEquals( 0, this.sink.getRetracted().size() ); assertEquals( 1, this.sink.getAsserted().size() ); Assert.assertEquals( "Wrong number of elements in matching objects list ", 2, ((Collection) ((DefaultFactHandle) ((Tuple) ((Object[]) this.sink.getAsserted().get( 0 ))[0]).get( 1 )).getObject()).size() ); this.node.retractObject( f1, this.context, this.workingMemory ); assertEquals( 1, this.memory.getRightObjectMemory().size() ); assertEquals( 1, this.sink.getRetracted().size() ); assertEquals( 2, this.sink.getAsserted().size() ); Assert.assertEquals( "Wrong number of elements in matching objects list ", 1, ((Collection) ((DefaultFactHandle) ((Tuple) ((Object[]) this.sink.getAsserted().get( 1 ))[0]).get( 1 )).getObject()).size() ); this.node.retractObject( f0, this.context, this.workingMemory ); assertEquals( 0, this.memory.getRightObjectMemory().size() ); assertEquals( 2, this.sink.getRetracted().size() ); assertEquals( 3, this.sink.getAsserted().size() ); Assert.assertEquals( "Wrong number of elements in matching objects list ", 0, ((Collection) ((DefaultFactHandle) ((Tuple) ((Object[]) this.sink.getAsserted().get( 2 ))[0]).get( 1 )).getObject()).size() ); } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/dde741e9a64ec2acd6237192cd5e253455aa7e29/CollectNodeTest.java/buggy/drools-core/src/test/java/org/drools/reteoo/CollectNodeTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
7055,
14266,
921,
1435,
288,
3639,
727,
2989,
9766,
3259,
284,
20,
273,
261,
1868,
9766,
3259,
13,
333,
18,
20478,
6031,
18,
588,
9766,
3259,
1733,
7675,
2704,
9766,
3259... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7055,
14266,
921,
1435,
288,
3639,
727,
2989,
9766,
3259,
284,
20,
273,
261,
1868,
9766,
3259,
13,
333,
18,
20478,
6031,
18,
588,
9766,
3259,
1733,
7675,
2704,
9766,
3259... |
int i; if (startIdx < 0) return TA_RetCode.TA_OUT_OF_RANGE_START_INDEX; if ((endIdx < 0) || (endIdx < startIdx)) return TA_RetCode.TA_OUT_OF_RANGE_END_INDEX; if ((int) optInTimePeriod == (Integer.MIN_VALUE )) optInTimePeriod = 14; else if (((int) optInTimePeriod < 1) || ((int) optInTimePeriod > 100000)) return TA_RetCode.TA_BAD_PARAM; if (optInTimePeriod > 1) lookbackTotal = optInTimePeriod + (this.unstablePeriod[TA_FuncUnstId.TA_FUNC_UNST_MINUS_DI .ordinal()]); else lookbackTotal = 1; | int today, lookbackTotal, outIdx; double prevHigh, prevLow, prevClose; double prevMinusDM, prevTR; double tempReal, tempReal2, diffP, diffM; | public TA_RetCode MINUS_DI(int startIdx, int endIdx, double inHigh[], double inLow[], double inClose[], int optInTimePeriod, MInteger outBegIdx, MInteger outNbElement, double outReal[]) { int today, lookbackTotal, outIdx; double prevHigh, prevLow, prevClose; double prevMinusDM, prevTR; double tempReal, tempReal2, diffP, diffM; int i; if (startIdx < 0) return TA_RetCode.TA_OUT_OF_RANGE_START_INDEX; if ((endIdx < 0) || (endIdx < startIdx)) return TA_RetCode.TA_OUT_OF_RANGE_END_INDEX; if ((int) optInTimePeriod == (Integer.MIN_VALUE )) optInTimePeriod = 14; else if (((int) optInTimePeriod < 1) || ((int) optInTimePeriod > 100000)) return TA_RetCode.TA_BAD_PARAM; if (optInTimePeriod > 1) lookbackTotal = optInTimePeriod + (this.unstablePeriod[TA_FuncUnstId.TA_FUNC_UNST_MINUS_DI .ordinal()]); else lookbackTotal = 1; if (startIdx < lookbackTotal) startIdx = lookbackTotal; if (startIdx > endIdx) { outBegIdx.value = 0; outNbElement.value = 0; return TA_RetCode.TA_SUCCESS; } outIdx = 0; if (optInTimePeriod <= 1) { outBegIdx.value = startIdx; today = startIdx - 1; prevHigh = inHigh[today]; prevLow = inLow[today]; prevClose = inClose[today]; while (today < endIdx) { today++; tempReal = inHigh[today]; diffP = tempReal - prevHigh; prevHigh = tempReal; tempReal = inLow[today]; diffM = prevLow - tempReal; prevLow = tempReal; if ((diffM > 0) && (diffP < diffM)) { { tempReal = prevHigh - prevLow; tempReal2 = Math.abs(prevHigh - prevClose); if (tempReal2 > tempReal) tempReal = tempReal2; tempReal2 = Math.abs(prevLow - prevClose); if (tempReal2 > tempReal) tempReal = tempReal2; } ; if ((((-0.00000001) < tempReal) && (tempReal < 0.00000001))) outReal[outIdx++] = (double) 0.0; else outReal[outIdx++] = diffM / tempReal; } else outReal[outIdx++] = (double) 0.0; prevClose = inClose[today]; } outNbElement.value = outIdx; return TA_RetCode.TA_SUCCESS; } outBegIdx.value = today = startIdx; prevMinusDM = 0.0; prevTR = 0.0; today = startIdx - lookbackTotal; prevHigh = inHigh[today]; prevLow = inLow[today]; prevClose = inClose[today]; i = optInTimePeriod - 1; while (i-- > 0) { today++; tempReal = inHigh[today]; diffP = tempReal - prevHigh; prevHigh = tempReal; tempReal = inLow[today]; diffM = prevLow - tempReal; prevLow = tempReal; if ((diffM > 0) && (diffP < diffM)) { prevMinusDM += diffM; } { tempReal = prevHigh - prevLow; tempReal2 = Math.abs(prevHigh - prevClose); if (tempReal2 > tempReal) tempReal = tempReal2; tempReal2 = Math.abs(prevLow - prevClose); if (tempReal2 > tempReal) tempReal = tempReal2; } ; prevTR += tempReal; prevClose = inClose[today]; } i = (this.unstablePeriod[TA_FuncUnstId.TA_FUNC_UNST_MINUS_DI.ordinal()]) + 1; while (i-- != 0) { today++; tempReal = inHigh[today]; diffP = tempReal - prevHigh; prevHigh = tempReal; tempReal = inLow[today]; diffM = prevLow - tempReal; prevLow = tempReal; if ((diffM > 0) && (diffP < diffM)) { prevMinusDM = prevMinusDM - (prevMinusDM / optInTimePeriod) + diffM; } else { prevMinusDM = prevMinusDM - (prevMinusDM / optInTimePeriod); } { tempReal = prevHigh - prevLow; tempReal2 = Math.abs(prevHigh - prevClose); if (tempReal2 > tempReal) tempReal = tempReal2; tempReal2 = Math.abs(prevLow - prevClose); if (tempReal2 > tempReal) tempReal = tempReal2; } ; prevTR = prevTR - (prevTR / optInTimePeriod) + tempReal; prevClose = inClose[today]; } if (!(((-0.00000001) < prevTR) && (prevTR < 0.00000001))) outReal[0] = (100.0 * (prevMinusDM / prevTR)); else outReal[0] = 0.0; outIdx = 1; while (today < endIdx) { today++; tempReal = inHigh[today]; diffP = tempReal - prevHigh; prevHigh = tempReal; tempReal = inLow[today]; diffM = prevLow - tempReal; prevLow = tempReal; if ((diffM > 0) && (diffP < diffM)) { prevMinusDM = prevMinusDM - (prevMinusDM / optInTimePeriod) + diffM; } else { prevMinusDM = prevMinusDM - (prevMinusDM / optInTimePeriod); } { tempReal = prevHigh - prevLow; tempReal2 = Math.abs(prevHigh - prevClose); if (tempReal2 > tempReal) tempReal = tempReal2; tempReal2 = Math.abs(prevLow - prevClose); if (tempReal2 > tempReal) tempReal = tempReal2; } ; prevTR = prevTR - (prevTR / optInTimePeriod) + tempReal; prevClose = inClose[today]; if (!(((-0.00000001) < prevTR) && (prevTR < 0.00000001))) outReal[outIdx++] = (100.0 * (prevMinusDM / prevTR)); else outReal[outIdx++] = 0.0; } outNbElement.value = outIdx; return TA_RetCode.TA_SUCCESS; } | 2365 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2365/8c26ea7a2c59f9148f3db0db7ab39ed48689e601/Core.java/buggy/ta-lib/java/src/TA/Lib/Core.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
399,
37,
67,
7055,
1085,
6989,
3378,
67,
2565,
12,
474,
27108,
16,
509,
679,
4223,
16,
1645,
316,
8573,
63,
6487,
1082,
202,
9056,
316,
10520,
63,
6487,
1645,
316,
4605,
63,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
399,
37,
67,
7055,
1085,
6989,
3378,
67,
2565,
12,
474,
27108,
16,
509,
679,
4223,
16,
1645,
316,
8573,
63,
6487,
1082,
202,
9056,
316,
10520,
63,
6487,
1645,
316,
4605,
63,
... |
colspan = value; | colspan = value; | public void setColspan(int value) { colspan = value; } | 3011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3011/ed86dfb474e6fa22e1797452482e751a297a7e1f/Cell.java/buggy/itext/src/com/lowagie/text/Cell.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
914,
3969,
12,
474,
460,
13,
288,
3639,
20856,
273,
460,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
914,
3969,
12,
474,
460,
13,
288,
3639,
20856,
273,
460,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if(doc == null) | if (doc == null) | public WebDocument store(WebDocument doc) { for(Iterator it = docStorages.iterator(); it.hasNext();) { doc = ((DocumentStorage)it.next()).store(doc); if(doc == null) { break; } } return doc; } | 1514 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1514/3e11600e4ef191d486936aabf1d5c14072865fe5/StoragePipeline.java/clean/sandbox/contributions/webcrawler-LARM/src/de/lanlab/larm/storage/StoragePipeline.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2999,
2519,
1707,
12,
4079,
2519,
997,
13,
565,
288,
3639,
364,
12,
3198,
518,
273,
997,
510,
280,
1023,
18,
9838,
5621,
518,
18,
5332,
2134,
5621,
13,
3639,
288,
5411,
997,
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,
2999,
2519,
1707,
12,
4079,
2519,
997,
13,
565,
288,
3639,
364,
12,
3198,
518,
273,
997,
510,
280,
1023,
18,
9838,
5621,
518,
18,
5332,
2134,
5621,
13,
3639,
288,
5411,
997,
273,
... |
public void run() { if (beforeAddition()) { final T result = performElementAddition(); if (result != null) { afterAddition(result); | protected void run(Result<StableElement<T>> result) throws Throwable { final T t = (T)getDomCollectionChildDescription().addValue(getParentDomElement(), getElementClass()); tuneNewValue(t); aClass[0] = DomReflectionUtil.getRawType(parent.getGenericInfo().getCollectionChildDescription(t.getXmlElementName()).getType()); oldChooser[0] = ClassChooserManager.getClassChooser(aClass[0]); final SmartPsiElementPointer pointer = SmartPointerManager.getInstance(getProject()).createSmartPsiElementPointer(t.getXmlTag()); ClassChooserManager.registerClassChooser(aClass[0], new ClassChooser() { public Class<? extends T> chooseClass(final XmlTag tag) { if (tag == pointer.getElement()) { return getElementClass(); } return oldChooser[0].chooseClass(tag); | public void run() { if (beforeAddition()) { final T result = performElementAddition(); if (result != null) { afterAddition(result); } } } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/73de0c5a6bb3f7a70c4fb8fb2ba17200056a45c2/DefaultAddAction.java/clean/dom/openapi/src/com/intellij/util/xml/ui/actions/DefaultAddAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1086,
1435,
288,
3639,
309,
261,
5771,
30296,
10756,
288,
1850,
727,
399,
563,
273,
3073,
1046,
30296,
5621,
1850,
309,
261,
2088,
480,
446,
13,
288,
5411,
1839,
30296,
12,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1086,
1435,
288,
3639,
309,
261,
5771,
30296,
10756,
288,
1850,
727,
399,
563,
273,
3073,
1046,
30296,
5621,
1850,
309,
261,
2088,
480,
446,
13,
288,
5411,
1839,
30296,
12,
20... |
this.name = name; | super("Component " + container.getExtendedId() + " does not contain a component '" + componentId + "'."); this.componentId = componentId; | public NoSuchComponentException(String name, IComponent container) { this.name = name; this.container = container; } | 4433 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4433/984b77103242b4230ba7e4a22b965c478e030898/NoSuchComponentException.java/buggy/framework/src/com/primix/tapestry/NoSuchComponentException.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
5823,
1841,
503,
12,
780,
508,
16,
467,
1841,
1478,
13,
202,
95,
202,
202,
2211,
18,
529,
273,
508,
31,
202,
202,
2211,
18,
3782,
273,
1478,
31,
202,
97,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
202,
482,
5823,
1841,
503,
12,
780,
508,
16,
467,
1841,
1478,
13,
202,
95,
202,
202,
2211,
18,
529,
273,
508,
31,
202,
202,
2211,
18,
3782,
273,
1478,
31,
202,
97,
2,
-100,
-100,
-1... |
try { int portNum = Support_PortManager.getNextPort(); final ServerSocket ss = new ServerSocket(portNum); Socket sock = new Socket(InetAddress.getLocalHost(), portNum); Runnable runnable = new Runnable() { public void run() { try { Socket as = ss.accept(); ss.close(); InputStream in = as.getInputStream(); in.read(); in.close(); } catch (IOException e) { System.out.println(Thread.currentThread() + ": " + e); } } }; Thread thread = new Thread(runnable, "Socket.getOutputStream"); thread.start(); int c = 0; do { try { Thread.sleep(200); } catch (InterruptedException e) { } if (++c > 4) fail("thread is not alive"); } while (!thread.isAlive()); OutputStream out = sock.getOutputStream(); byte[] data = new byte[256]; out.write(data); c = 0; do { try { Thread.sleep(200); } catch (InterruptedException e) { } if (++c > 4) { fail("read call did not exit"); } } while (thread.isAlive()); boolean exception = false; try { for (int i = 0; i < 400; i++) out.write(data); } catch (IOException e) { exception = true; } out.close(); assertTrue("write to closed socket did not cause exception", exception); } catch (IOException e) { fail("Unexpected IOException : " + e.getMessage()); } | public void test_getOutputStream() { // Test for method java.io.OutputStream // java.net.Socket.getOutputStream() try { int sport = startServer("SServer getOutputStream"); int portNumber = Support_PortManager.getNextPort(); s = new Socket(InetAddress.getLocalHost(), sport, null, portNumber); java.io.OutputStream os = s.getOutputStream(); assertNotNull("Failed to get stream", os); tearDown(); } catch (Exception e) { fail("Exception during getOutputStream test" + e.toString()); } try { int portNum = Support_PortManager.getNextPort(); final ServerSocket ss = new ServerSocket(portNum); Socket sock = new Socket(InetAddress.getLocalHost(), portNum); Runnable runnable = new Runnable() { public void run() { try { Socket as = ss.accept(); ss.close(); InputStream in = as.getInputStream(); in.read(); in.close(); } catch (IOException e) { System.out.println(Thread.currentThread() + ": " + e); } } }; Thread thread = new Thread(runnable, "Socket.getOutputStream"); thread.start(); int c = 0; do { try { Thread.sleep(200); } catch (InterruptedException e) { } if (++c > 4) fail("thread is not alive"); } while (!thread.isAlive()); OutputStream out = sock.getOutputStream(); byte[] data = new byte[256]; out.write(data); c = 0; do { try { Thread.sleep(200); } catch (InterruptedException e) { } if (++c > 4) { fail("read call did not exit"); } } while (thread.isAlive()); boolean exception = false; try { for (int i = 0; i < 400; i++) out.write(data); } catch (IOException e) { exception = true; } out.close(); assertTrue("write to closed socket did not cause exception", exception); } catch (IOException e) { fail("Unexpected IOException : " + e.getMessage()); } } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/bc86cd1e314cd948b1f872a54b5075cf2678bc4a/SocketTest.java/clean/modules/luni/src/test/java/tests/api/java/net/SocketTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
67,
588,
4632,
1435,
288,
202,
202,
759,
7766,
364,
707,
2252,
18,
1594,
18,
4632,
202,
202,
759,
2252,
18,
2758,
18,
4534,
18,
588,
4632,
1435,
202,
202,
698,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
67,
588,
4632,
1435,
288,
202,
202,
759,
7766,
364,
707,
2252,
18,
1594,
18,
4632,
202,
202,
759,
2252,
18,
2758,
18,
4534,
18,
588,
4632,
1435,
202,
202,
698,
28... | |
case ts.ERROR: | case TokenStream.ERROR: | private Object statementHelper(TokenStream ts, Source source) throws IOException, JavaScriptException { Object pn = null; // If skipsemi == true, don't add SEMI + EOL to source at the // end of this statment. For compound statements, IF/FOR etc. boolean skipsemi = false; int tt; int lastExprType = 0; // For wellTerminated. 0 to avoid warning. tt = ts.getToken(); switch(tt) { case ts.IF: { skipsemi = true; source.append((char)ts.IF); int lineno = ts.getLineno(); Object cond = condition(ts, source); source.append((char)ts.LC); source.append((char)ts.EOL); Object ifTrue = statement(ts, source); Object ifFalse = null; if (ts.matchToken(ts.ELSE)) { source.append((char)ts.RC); source.append((char)ts.ELSE); source.append((char)ts.LC); source.append((char)ts.EOL); ifFalse = statement(ts, source); } source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createIf(cond, ifTrue, ifFalse, lineno); break; } case ts.SWITCH: { skipsemi = true; source.append((char)ts.SWITCH); pn = nf.createSwitch(ts.getLineno()); Object cur_case = null; // to kill warning Object case_statements; mustMatchToken(ts, ts.LP, "msg.no.paren.switch"); source.append((char)ts.LP); nf.addChildToBack(pn, expr(ts, source, false)); mustMatchToken(ts, ts.RP, "msg.no.paren.after.switch"); source.append((char)ts.RP); mustMatchToken(ts, ts.LC, "msg.no.brace.switch"); source.append((char)ts.LC); source.append((char)ts.EOL); while ((tt = ts.getToken()) != ts.RC && tt != ts.EOF) { switch(tt) { case ts.CASE: source.append((char)ts.CASE); cur_case = nf.createUnary(ts.CASE, expr(ts, source, false)); source.append((char)ts.COLON); source.append((char)ts.EOL); break; case ts.DEFAULT: cur_case = nf.createLeaf(ts.DEFAULT); source.append((char)ts.DEFAULT); source.append((char)ts.COLON); source.append((char)ts.EOL); // XXX check that there isn't more than one default break; default: reportError(ts, "msg.bad.switch"); break; } mustMatchToken(ts, ts.COLON, "msg.no.colon.case"); case_statements = nf.createLeaf(TokenStream.BLOCK); while ((tt = ts.peekToken()) != ts.RC && tt != ts.CASE && tt != ts.DEFAULT && tt != ts.EOF) { nf.addChildToBack(case_statements, statement(ts, source)); } // assert cur_case nf.addChildToBack(cur_case, case_statements); nf.addChildToBack(pn, cur_case); } source.append((char)ts.RC); source.append((char)ts.EOL); break; } case ts.WHILE: { skipsemi = true; source.append((char)ts.WHILE); int lineno = ts.getLineno(); Object cond = condition(ts, source); source.append((char)ts.LC); source.append((char)ts.EOL); Object body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createWhile(cond, body, lineno); break; } case ts.DO: { source.append((char)ts.DO); source.append((char)ts.LC); source.append((char)ts.EOL); int lineno = ts.getLineno(); Object body = statement(ts, source); source.append((char)ts.RC); mustMatchToken(ts, ts.WHILE, "msg.no.while.do"); source.append((char)ts.WHILE); Object cond = condition(ts, source); pn = nf.createDoWhile(body, cond, lineno); break; } case ts.FOR: { skipsemi = true; source.append((char)ts.FOR); int lineno = ts.getLineno(); Object init; // Node init is also foo in 'foo in Object' Object cond; // Node cond is also object in 'foo in Object' Object incr = null; // to kill warning Object body; mustMatchToken(ts, ts.LP, "msg.no.paren.for"); source.append((char)ts.LP); tt = ts.peekToken(); if (tt == ts.SEMI) { init = nf.createLeaf(ts.VOID); } else { if (tt == ts.VAR) { // set init to a var list or initial ts.getToken(); // throw away the 'var' token init = variables(ts, source, true); } else { init = expr(ts, source, true); } } tt = ts.peekToken(); if (tt == ts.RELOP && ts.getOp() == ts.IN) { ts.matchToken(ts.RELOP); source.append((char)ts.IN); // 'cond' is the object over which we're iterating cond = expr(ts, source, false); } else { // ordinary for loop mustMatchToken(ts, ts.SEMI, "msg.no.semi.for"); source.append((char)ts.SEMI); if (ts.peekToken() == ts.SEMI) { // no loop condition cond = nf.createLeaf(ts.VOID); } else { cond = expr(ts, source, false); } mustMatchToken(ts, ts.SEMI, "msg.no.semi.for.cond"); source.append((char)ts.SEMI); if (ts.peekToken() == ts.RP) { incr = nf.createLeaf(ts.VOID); } else { incr = expr(ts, source, false); } } mustMatchToken(ts, ts.RP, "msg.no.paren.for.ctrl"); source.append((char)ts.RP); source.append((char)ts.LC); source.append((char)ts.EOL); body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); if (incr == null) { // cond could be null if 'in obj' got eaten by the init node. pn = nf.createForIn(init, cond, body, lineno); } else { pn = nf.createFor(init, cond, incr, body, lineno); } break; } case ts.TRY: { int lineno = ts.getLineno(); Object tryblock; Object catchblocks = null; Object finallyblock = null; skipsemi = true; source.append((char)ts.TRY); source.append((char)ts.LC); source.append((char)ts.EOL); tryblock = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); catchblocks = nf.createLeaf(TokenStream.BLOCK); boolean sawDefaultCatch = false; int peek = ts.peekToken(); if (peek == ts.CATCH) { while (ts.matchToken(ts.CATCH)) { if (sawDefaultCatch) { reportError(ts, "msg.catch.unreachable"); } source.append((char)ts.CATCH); mustMatchToken(ts, ts.LP, "msg.no.paren.catch"); source.append((char)ts.LP); mustMatchToken(ts, ts.NAME, "msg.bad.catchcond"); String varName = ts.getString(); source.addString(ts.NAME, varName); Object catchCond = null; if (ts.matchToken(ts.IF)) { source.append((char)ts.IF); catchCond = expr(ts, source, false); } else { sawDefaultCatch = true; } mustMatchToken(ts, ts.RP, "msg.bad.catchcond"); source.append((char)ts.RP); mustMatchToken(ts, ts.LC, "msg.no.brace.catchblock"); source.append((char)ts.LC); source.append((char)ts.EOL); nf.addChildToBack(catchblocks, nf.createCatch(varName, catchCond, statements(ts, source), ts.getLineno())); mustMatchToken(ts, ts.RC, "msg.no.brace.after.body"); source.append((char)ts.RC); source.append((char)ts.EOL); } } else if (peek != ts.FINALLY) { mustMatchToken(ts, ts.FINALLY, "msg.try.no.catchfinally"); } if (ts.matchToken(ts.FINALLY)) { source.append((char)ts.FINALLY); source.append((char)ts.LC); source.append((char)ts.EOL); finallyblock = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); } pn = nf.createTryCatchFinally(tryblock, catchblocks, finallyblock, lineno); break; } case ts.THROW: { int lineno = ts.getLineno(); source.append((char)ts.THROW); pn = nf.createThrow(expr(ts, source, false), lineno); if (lineno == ts.getLineno()) wellTerminated(ts, ts.ERROR); break; } case ts.BREAK: { int lineno = ts.getLineno(); source.append((char)ts.BREAK); // matchLabel only matches if there is one String label = matchLabel(ts); if (label != null) { source.addString(ts.NAME, label); } pn = nf.createBreak(label, lineno); break; } case ts.CONTINUE: { int lineno = ts.getLineno(); source.append((char)ts.CONTINUE); // matchLabel only matches if there is one String label = matchLabel(ts); if (label != null) { source.addString(ts.NAME, label); } pn = nf.createContinue(label, lineno); break; } case ts.WITH: { skipsemi = true; source.append((char)ts.WITH); int lineno = ts.getLineno(); mustMatchToken(ts, ts.LP, "msg.no.paren.with"); source.append((char)ts.LP); Object obj = expr(ts, source, false); mustMatchToken(ts, ts.RP, "msg.no.paren.after.with"); source.append((char)ts.RP); source.append((char)ts.LC); source.append((char)ts.EOL); Object body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createWith(obj, body, lineno); break; } case ts.VAR: { int lineno = ts.getLineno(); pn = variables(ts, source, false); if (ts.getLineno() == lineno) wellTerminated(ts, ts.ERROR); break; } case ts.RETURN: { Object retExpr = null; int lineno = 0; source.append((char)ts.RETURN); // bail if we're not in a (toplevel) function if ((ts.flags & ts.TSF_FUNCTION) == 0) reportError(ts, "msg.bad.return"); /* This is ugly, but we don't want to require a semicolon. */ ts.flags |= ts.TSF_REGEXP; tt = ts.peekTokenSameLine(); ts.flags &= ~ts.TSF_REGEXP; if (tt != ts.EOF && tt != ts.EOL && tt != ts.SEMI && tt != ts.RC) { lineno = ts.getLineno(); retExpr = expr(ts, source, false); if (ts.getLineno() == lineno) wellTerminated(ts, ts.ERROR); ts.flags |= ts.TSF_RETURN_EXPR; } else { ts.flags |= ts.TSF_RETURN_VOID; } // XXX ASSERT pn pn = nf.createReturn(retExpr, lineno); break; } case ts.LC: skipsemi = true; pn = statements(ts, source); mustMatchToken(ts, ts.RC, "msg.no.brace.block"); break; case ts.ERROR: // Fall thru, to have a node for error recovery to work on case ts.EOL: case ts.SEMI: pn = nf.createLeaf(ts.VOID); skipsemi = true; break; default: { lastExprType = tt; int tokenno = ts.getTokenno(); ts.ungetToken(tt); int lineno = ts.getLineno(); pn = expr(ts, source, false); if (ts.peekToken() == ts.COLON) { /* check that the last thing the tokenizer returned was a * NAME and that only one token was consumed. */ if (lastExprType != ts.NAME || (ts.getTokenno() != tokenno)) reportError(ts, "msg.bad.label"); ts.getToken(); // eat the COLON /* in the C source, the label is associated with the * statement that follows: * nf.addChildToBack(pn, statement(ts)); */ String name = ts.getString(); pn = nf.createLabel(name, lineno); // depend on decompiling lookahead to guess that that // last name was a label. source.append((char)ts.COLON); source.append((char)ts.EOL); return pn; } if (lastExprType == ts.FUNCTION) nf.setFunctionExpressionStatement(pn); pn = nf.createExprStatement(pn, lineno); /* * Check explicitly against (multi-line) function * statement. * lastExprEndLine is a hack to fix an * automatic semicolon insertion problem with function * expressions; the ts.getLineno() == lineno check was * firing after a function definition even though the * next statement was on a new line, because * speculative getToken calls advanced the line number * even when they didn't succeed. */ if (ts.getLineno() == lineno || (lastExprType == ts.FUNCTION && ts.getLineno() == lastExprEndLine)) { wellTerminated(ts, lastExprType); } break; } } ts.matchToken(ts.SEMI); if (!skipsemi) { source.append((char)ts.SEMI); source.append((char)ts.EOL); } return pn; } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/40ff06028a06e98171197c83b9b067a0c12f72ae/Parser.java/clean/js/rhino/org/mozilla/javascript/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
3021,
2276,
12,
1345,
1228,
3742,
16,
4998,
1084,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
1033,
11059,
273,
446,
31,
3639,
368,
971,
2488,
307,
9197,
422,
638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
3021,
2276,
12,
1345,
1228,
3742,
16,
4998,
1084,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
1033,
11059,
273,
446,
31,
3639,
368,
971,
2488,
307,
9197,
422,
638,
... |
String table = (etype == EntryType.IDENTITY || etype == EntryType.DATASOURCE ? "zimbra.directory_leaf_attrs" : "zimbra.directory_attrs"); | String table = (etype.isLeafEntry() ? "zimbra.directory_leaf_attrs" : "zimbra.directory_attrs"); | private static void insertAttribute(Connection conn, EntryType etype, int entryId, String key, String value) throws ServiceException, SQLException { PreparedStatement stmt = null; try { String table = (etype == EntryType.IDENTITY || etype == EntryType.DATASOURCE ? "zimbra.directory_leaf_attrs" : "zimbra.directory_attrs"); stmt = conn.prepareStatement("INSERT INTO " + table + " (entry_id, name, value) VALUES (?, ?, ?)"); stmt.setInt(1, entryId); stmt.setString(2, key); stmt.setString(3, value); stmt.executeUpdate(); stmt.close(); } finally { DbPool.closeStatement(stmt); } } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/f7887fe038d09a2917c4312e46e0d727013cf619/DbOfflineDirectory.java/clean/ZimbraOffline/src/java/com/zimbra/cs/db/DbOfflineDirectory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
2243,
1499,
12,
1952,
1487,
16,
3841,
559,
24700,
16,
509,
1241,
548,
16,
514,
498,
16,
514,
460,
13,
565,
1216,
16489,
16,
6483,
288,
3639,
16913,
3480,
273,
446,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
2243,
1499,
12,
1952,
1487,
16,
3841,
559,
24700,
16,
509,
1241,
548,
16,
514,
498,
16,
514,
460,
13,
565,
1216,
16489,
16,
6483,
288,
3639,
16913,
3480,
273,
446,
31,
... |
System.out.println("parse: "+isource.getSystemId()); | public Node getDOMNode(Source source, SourceLocator locator) throws TransformerException { if (source instanceof DOMSource) { return ((DOMSource) source).getNode(); } Node doc = null; try { // System.out.println("reading: "+source.getSystemId()); XMLReader reader = getXMLReader(source, locator); // TODO: Need to use factory of some kind to create the ContentHandler // (Also, try using JAXP if need be...) ContentHandler handler = new SourceTreeHandler(); if (handler instanceof org.apache.xalan.stree.SourceTreeHandler) { // temp hack ((org.apache.xalan.stree.SourceTreeHandler) handler).setUseMultiThreading( false); } reader.setContentHandler(handler); if (handler instanceof org.xml.sax.DTDHandler) reader.setDTDHandler((org.xml.sax.DTDHandler) handler); try { if (handler instanceof org.xml.sax.ext.LexicalHandler) reader.setProperty("http://xml.org/sax/properties/lexical-handler", handler); if (handler instanceof org.xml.sax.ext.DeclHandler) reader.setProperty( "http://xml.org/sax/properties/declaration-handler", handler); } catch (org.xml.sax.SAXException se){} try { if (handler instanceof org.xml.sax.ext.LexicalHandler) reader.setProperty("http://xml.org/sax/handlers/LexicalHandler", handler); if (handler instanceof org.xml.sax.ext.DeclHandler) reader.setProperty("http://xml.org/sax/handlers/DeclHandler", handler); } catch (org.xml.sax.SAXNotRecognizedException snre){} InputSource isource = SAXSource.sourceToInputSource(source);System.out.println("parse: "+isource.getSystemId()); reader.parse(isource);System.out.println("done with parse: "+isource.getSystemId()); if (handler instanceof org.apache.xalan.stree.SourceTreeHandler) { doc = ((org.apache.xalan.stree.SourceTreeHandler) handler).getRoot(); } } catch (IOException ioe) { throw new TransformerException(ioe.getMessage(), locator, ioe); } catch (org.xml.sax.SAXException se) { throw new TransformerException(se.getMessage(), locator, se); } return doc; } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/9c02fc0402a81c449cf0d6c96bbd3942d6f15829/SourceTreeManager.java/buggy/src/org/apache/xpath/SourceTreeManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2029,
2343,
1872,
907,
12,
1830,
1084,
16,
4998,
5786,
8871,
13,
1850,
1216,
21684,
225,
288,
565,
309,
261,
3168,
1276,
4703,
1830,
13,
565,
288,
1377,
327,
14015,
8168,
1830,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2029,
2343,
1872,
907,
12,
1830,
1084,
16,
4998,
5786,
8871,
13,
1850,
1216,
21684,
225,
288,
565,
309,
261,
3168,
1276,
4703,
1830,
13,
565,
288,
1377,
327,
14015,
8168,
1830,
13,
... | |
public int AROONOSC_Lookback( int optInTimePeriod ){ return optInTimePeriod;} | 2365 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2365/69e0567047ad75d101e30d35826ecbb51165ba43/Core.java/buggy/ta-lib/java/src/TA/Lib/Core.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
474,
985,
51,
673,
51,
2312,
67,
9794,
823,
12,
474,
3838,
382,
26540,
15329,
2463,
3838,
382,
26540,
31,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
474,
985,
51,
673,
51,
2312,
67,
9794,
823,
12,
474,
3838,
382,
26540,
15329,
2463,
3838,
382,
26540,
31,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | ||
return ""; | return ""; | protected static String createDocumentPath( String filePath, HttpServletRequest request ) { String temp = null; String projectName = null; String documentName = null; if ( ( filePath == null ) || ( filePath.length( ) == 0 ) ) return ""; String sessionId = request.getSession( ).getId( ); String fileSeparator = "\\"; if ( filePath.lastIndexOf( fileSeparator ) == -1 ) fileSeparator = "/"; if ( filePath.lastIndexOf( fileSeparator ) != -1 ) { documentName = filePath.substring( filePath .lastIndexOf( fileSeparator ) ); temp = filePath .substring( 0, filePath.lastIndexOf( fileSeparator ) ); if ( temp.lastIndexOf( fileSeparator ) != -1 ) projectName = temp .substring( temp.lastIndexOf( fileSeparator ) ); else projectName = temp; } else documentName = filePath; String documentFolder = workingFolder + fileSeparator + DOCUMENTS_DIR + fileSeparator + sessionId + projectName; String documentPath = documentFolder + documentName; return documentPath; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/36f5c1f9fdad21fddfe9855eec53df32f125e252/ParameterAccessor.java/clean/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/utility/ParameterAccessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
760,
514,
27569,
743,
12,
514,
4612,
16,
1082,
202,
2940,
18572,
590,
262,
202,
95,
202,
202,
780,
1906,
273,
446,
31,
202,
202,
780,
17234,
273,
446,
31,
202,
202,
780,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
760,
514,
27569,
743,
12,
514,
4612,
16,
1082,
202,
2940,
18572,
590,
262,
202,
95,
202,
202,
780,
1906,
273,
446,
31,
202,
202,
780,
17234,
273,
446,
31,
202,
202,
780,
16... |
keyBindingService.registerGlobalAction(deleteAction); | private void makeActions() { // The actions in jface do not have menu vs. enable, vs. disable vs. color // There are actions in here being passed the workbench - problem // Get services for notification. IPartService partService = window.getPartService(); WWinKeyBindingService keyBindingService = window.getKeyBindingService(); // Many actions need the workbench. IWorkbench workbench = window.getWorkbench(); newWizardAction = new NewWizardAction(); // images for this action are set in its constructor keyBindingService.registerGlobalAction(newWizardAction); newWizardDropDownAction = new NewWizardDropDownAction(workbench, newWizardAction); newWizardDropDownAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_NEW_WIZ)); newWizardDropDownAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_NEW_WIZ_HOVER)); newWizardDropDownAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_NEW_WIZ_DISABLED)); importResourcesAction = new ImportResourcesAction(workbench); importResourcesAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_IMPORT_WIZ)); importResourcesAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_IMPORT_WIZ_HOVER)); importResourcesAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_IMPORT_WIZ_DISABLED)); exportResourcesAction = new ExportResourcesAction(workbench,WorkbenchMessages.getString("ExportResourcesAction.fileMenuText")); exportResourcesAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_EXPORT_WIZ)); exportResourcesAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_EXPORT_WIZ_HOVER)); exportResourcesAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_EXPORT_WIZ_DISABLED)); rebuildAllAction = new GlobalBuildAction(window, IncrementalProjectBuilder.FULL_BUILD); // 1G82IWC - a new icon is needed for Rebuild All or Build // rebuildAllAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_BUILD_EXEC)); // rebuildAllAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_BUILD_EXEC_HOVER)); // rebuildAllAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_BUILD_EXEC_DISABLED)); rebuildAllAction.setActionDefinitionId(rebuildAllActionDefId); buildAllAction = new GlobalBuildAction(window, IncrementalProjectBuilder.INCREMENTAL_BUILD); buildAllAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_BUILD_EXEC)); buildAllAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_BUILD_EXEC_HOVER)); buildAllAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_BUILD_EXEC_DISABLED)); buildAllAction.setActionDefinitionId(buildAllActionDefId); saveAction = new SaveAction(window); saveAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVE_EDIT)); saveAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVE_EDIT_HOVER)); saveAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVE_EDIT_DISABLED)); partService.addPartListener(saveAction); saveAction.setActionDefinitionId(saveActionDefId); keyBindingService.registerGlobalAction(saveAction); saveAsAction = new SaveAsAction(window); saveAsAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVEAS_EDIT)); saveAsAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVEAS_EDIT_HOVER)); saveAsAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVEAS_EDIT_DISABLED)); partService.addPartListener(saveAsAction); saveAllAction = new SaveAllAction(window); saveAllAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVEALL_EDIT)); saveAllAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVEALL_EDIT_HOVER)); saveAllAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVEALL_EDIT_DISABLED)); partService.addPartListener(saveAllAction); saveAllAction.setActionDefinitionId(saveAllActionDefId); keyBindingService.registerGlobalAction(saveAllAction); undoAction = new LabelRetargetAction(IWorkbenchActionConstants.UNDO, WorkbenchMessages.getString("Workbench.undo")); //$NON-NLS-1$ undoAction.setToolTipText(WorkbenchMessages.getString("Workbench.undoToolTip")); //$NON-NLS-1$ undoAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_UNDO_EDIT)); undoAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_UNDO_EDIT_HOVER)); undoAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_UNDO_EDIT_DISABLED)); partService.addPartListener(undoAction); undoAction.setActionDefinitionId(undoActionDefId); keyBindingService.registerGlobalAction(undoAction); redoAction = new LabelRetargetAction(IWorkbenchActionConstants.REDO, WorkbenchMessages.getString("Workbench.redo")); //$NON-NLS-1$ redoAction.setToolTipText(WorkbenchMessages.getString("Workbench.redoToolTip")); //$NON-NLS-1$ redoAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_REDO_EDIT)); redoAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_REDO_EDIT_HOVER)); redoAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_REDO_EDIT_DISABLED)); partService.addPartListener(redoAction); redoAction.setActionDefinitionId(redoActionDefId); keyBindingService.registerGlobalAction(redoAction); cutAction = new RetargetAction(IWorkbenchActionConstants.CUT, WorkbenchMessages.getString("Workbench.cut")); //$NON-NLS-1$ cutAction.setToolTipText(WorkbenchMessages.getString("Workbench.cutToolTip")); //$NON-NLS-1$ cutAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_CUT_EDIT)); cutAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_CUT_EDIT_HOVER)); cutAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_CUT_EDIT_DISABLED)); partService.addPartListener(cutAction); cutAction.setActionDefinitionId(cutActionDefId); keyBindingService.registerGlobalAction(cutAction); copyAction = new RetargetAction(IWorkbenchActionConstants.COPY, WorkbenchMessages.getString("Workbench.copy")); //$NON-NLS-1$ copyAction.setToolTipText(WorkbenchMessages.getString("Workbench.copyToolTip")); //$NON-NLS-1$ copyAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_COPY_EDIT)); copyAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_COPY_EDIT_HOVER)); copyAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_COPY_EDIT_DISABLED)); partService.addPartListener(copyAction); copyAction.setActionDefinitionId(copyActionDefId); keyBindingService.registerGlobalAction(copyAction); pasteAction = new RetargetAction(IWorkbenchActionConstants.PASTE, WorkbenchMessages.getString("Workbench.paste")); //$NON-NLS-1$ pasteAction.setToolTipText(WorkbenchMessages.getString("Workbench.pasteToolTip")); //$NON-NLS-1$ pasteAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PASTE_EDIT)); pasteAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PASTE_EDIT_HOVER)); pasteAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PASTE_EDIT_DISABLED)); partService.addPartListener(pasteAction); pasteAction.setActionDefinitionId(pasteActionDefId); keyBindingService.registerGlobalAction(pasteAction); printAction = new RetargetAction(IWorkbenchActionConstants.PRINT, WorkbenchMessages.getString("Workbench.print")); //$NON-NLS-1$ printAction.setToolTipText(WorkbenchMessages.getString("Workbench.printToolTip")); //$NON-NLS-1$ printAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PRINT_EDIT)); printAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PRINT_EDIT_HOVER)); printAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PRINT_EDIT_DISABLED)); partService.addPartListener(printAction); printAction.setActionDefinitionId(printActionDefId); keyBindingService.registerGlobalAction(printAction); selectAllAction = new RetargetAction(IWorkbenchActionConstants.SELECT_ALL, WorkbenchMessages.getString("Workbench.selectAll")); //$NON-NLS-1$ selectAllAction.setToolTipText(WorkbenchMessages.getString("Workbench.selectAllToolTip")); //$NON-NLS-1$ partService.addPartListener(selectAllAction); selectAllAction.setActionDefinitionId(selectAllActionDefId); keyBindingService.registerGlobalAction(selectAllAction); findAction = new RetargetAction(IWorkbenchActionConstants.FIND, WorkbenchMessages.getString("Workbench.findReplace")); //$NON-NLS-1$ findAction.setToolTipText(WorkbenchMessages.getString("Workbench.findReplaceToolTip")); //$NON-NLS-1$// Find's images commented out due to conflict with Search.// See bug 16412.// findAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SEARCH_SRC));// findAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SEARCH_SRC_HOVER));// findAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SEARCH_SRC_DISABLED)); partService.addPartListener(findAction); findAction.setActionDefinitionId(findActionDefId); keyBindingService.registerGlobalAction(findAction); closeAction = new CloseEditorAction(window); partService.addPartListener(closeAction); closeAction.setActionDefinitionId(closeActionDefId); keyBindingService.registerGlobalAction(closeAction); closeAllAction = new CloseAllAction(window); partService.addPartListener(closeAllAction); closeAllAction.setActionDefinitionId(closeAllActionDefId); keyBindingService.registerGlobalAction(closeAllAction); closeAllSavedAction = new CloseAllSavedAction(window); partService.addPartListener(closeAllSavedAction); closeAllSavedAction.setActionDefinitionId(closeAllSavedActionDefId); keyBindingService.registerGlobalAction(closeAllSavedAction); pinEditorAction = new PinEditorAction(window); partService.addPartListener(pinEditorAction); pinEditorAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PIN_EDITOR)); pinEditorAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PIN_EDITOR_HOVER)); pinEditorAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PIN_EDITOR_DISABLED)); aboutAction = new AboutAction(window); aboutAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_OBJS_DEFAULT_PROD)); openPreferencesAction = new OpenPreferencesAction(window); addBookmarkAction = new RetargetAction(IWorkbenchActionConstants.BOOKMARK, WorkbenchMessages.getString("Workbench.addBookMark")); //$NON-NLS-1$ partService.addPartListener(addBookmarkAction); addBookmarkAction.setToolTipText(WorkbenchMessages.getString("Workbench.addBookMarkToolTip")); //$NON-NLS-1$ addBookmarkAction.setActionDefinitionId(addBookmarkActionDefId); keyBindingService.registerGlobalAction(addBookmarkAction); addTaskAction = createGlobalAction(IWorkbenchActionConstants.ADD_TASK, "edit", false); //$NON-NLS-1$ syncWithEditorAction = createGlobalAction(IWorkbenchActionConstants.SYNC_EDITOR, "navigate", false); //$NON-NLS-1$ syncWithEditorAction.setEnabled(false); deleteAction = new RetargetAction(IWorkbenchActionConstants.DELETE, WorkbenchMessages.getString("Workbench.delete")); //$NON-NLS-1$ deleteAction.setToolTipText(WorkbenchMessages.getString("Workbench.deleteToolTip")); //$NON-NLS-1$ deleteAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_DELETE_EDIT)); deleteAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_DELETE_EDIT_HOVER)); deleteAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_DELETE_EDIT_DISABLED)); deleteAction.enableAccelerator(false); WorkbenchHelp.setHelp(deleteAction, IHelpContextIds.DELETE_RETARGET_ACTION); partService.addPartListener(deleteAction); deleteAction.setActionDefinitionId(deleteActionDefId); // keyBindingService.registerGlobalAction(deleteAction); // See if a welcome page is specified AboutInfo[] infos = ((Workbench)workbench).getFeaturesInfo(); for (int i = 0; i < infos.length; i++) { if (infos[i].getWelcomePageURL() != null) { quickStartAction = new QuickStartAction(workbench); break; } } // Actions for invisible accelerators showViewMenuAction = new ShowViewMenuAction(window); showViewMenuAction.setActionDefinitionId(showViewMenuActionDefId); keyBindingService.registerGlobalAction(showViewMenuAction); showPartPaneMenuAction = new ShowPartPaneMenuAction(window); showPartPaneMenuAction.setActionDefinitionId(showPartPaneMenuActionDefId); keyBindingService.registerGlobalAction(showPartPaneMenuAction); nextEditorAction = new CycleEditorAction(window, true); nextEditorAction.setActionDefinitionId(nextEditorActionDefId); keyBindingService.registerGlobalAction(nextEditorAction); prevEditorAction = new CycleEditorAction(window, false); prevEditorAction.setActionDefinitionId(prevEditorActionDefId); keyBindingService.registerGlobalAction(prevEditorAction); nextPartAction = new CyclePartAction(window, true); nextPartAction.setActionDefinitionId(nextPartActionDefId); keyBindingService.registerGlobalAction(nextPartAction); prevPartAction = new CyclePartAction(window, false); prevPartAction.setActionDefinitionId(prevPartActionDefId); keyBindingService.registerGlobalAction(prevPartAction); nextPerspectiveAction = new CyclePerspectiveAction(window, true); nextPerspectiveAction.setActionDefinitionId(nextPerspectiveActionDefId); keyBindingService.registerGlobalAction(nextPerspectiveAction); prevPerspectiveAction = new CyclePerspectiveAction(window, false); prevPerspectiveAction.setActionDefinitionId(prevPerspectiveActionDefId); keyBindingService.registerGlobalAction(prevPerspectiveAction); activateEditorAction = new ActivateEditorAction(window); activateEditorAction.setActionDefinitionId(activateEditorActionDefId); keyBindingService.registerGlobalAction(activateEditorAction); workbenchEditorsAction = new WorkbenchEditorsAction(window); workbenchEditorsAction.setActionDefinitionId(workbenchEditorsActionDefId); keyBindingService.registerGlobalAction(workbenchEditorsAction); hideShowEditorAction = new ToggleEditorsVisibilityAction(window); savePerspectiveAction = new SavePerspectiveAction(window); editActionSetAction = new EditActionSetsAction(window); lockToolBarAction = new LockToolBarAction(window); resetPerspectiveAction = new ResetPerspectiveAction(window); closePerspAction = new ClosePerspectiveAction(window); closeAllPerspsAction = new CloseAllPerspectivesAction(window); //Must change/copy the image. It is using a local toolbar image and colored. backwardHistoryAction = new NavigationHistoryAction(window, false); backwardHistoryAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_BACKWARD_NAV)); backwardHistoryAction.setActionDefinitionId(backwardHistoryActionDefId); keyBindingService.registerGlobalAction(backwardHistoryAction); forwardHistoryAction = new NavigationHistoryAction(window, true); forwardHistoryAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_FORWARD_NAV)); forwardHistoryAction.setActionDefinitionId(forwardHistoryActionDefId); keyBindingService.registerGlobalAction(forwardHistoryAction); // menu reorg if (usingMenuReorg) { // create the new actions needed for the reorg revertAction = createGlobalAction(IWorkbenchActionConstants.REVERT, "file", false); //$NON-NLS-1$ refreshAction = createGlobalAction(IWorkbenchActionConstants.REFRESH, "file", false); //$NON-NLS-1$ propertiesAction = createGlobalAction(IWorkbenchActionConstants.PROPERTIES, "file", false); //$NON-NLS-1$ moveAction = createGlobalAction(IWorkbenchActionConstants.MOVE, "edit", false); //$NON-NLS-1$ renameAction = createGlobalAction(IWorkbenchActionConstants.RENAME, "edit", false); //$NON-NLS-1$ goIntoAction = createGlobalAction(IWorkbenchActionConstants.GO_INTO, "navigate", false); //$NON-NLS-1$ backAction = createGlobalAction(IWorkbenchActionConstants.BACK, "navigate", true); //$NON-NLS-1$ forwardAction = createGlobalAction(IWorkbenchActionConstants.FORWARD, "navigate", true); //$NON-NLS-1$ upAction = createGlobalAction(IWorkbenchActionConstants.UP, "navigate", true); //$NON-NLS-1$ nextAction = createGlobalAction(IWorkbenchActionConstants.NEXT, "navigate", true); //$NON-NLS-1$ nextAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_NEXT_NAV)); previousAction = createGlobalAction(IWorkbenchActionConstants.PREVIOUS, "navigate", true); //$NON-NLS-1$ previousAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PREVIOUS_NAV)); buildProjectAction = createGlobalAction(IWorkbenchActionConstants.BUILD_PROJECT, "project", false); //$NON-NLS-1$ rebuildProjectAction = createGlobalAction(IWorkbenchActionConstants.REBUILD_PROJECT, "project", false); //$NON-NLS-1$ openProjectAction = createGlobalAction(IWorkbenchActionConstants.OPEN_PROJECT, "project", false); //$NON-NLS-1$ closeProjectAction = createGlobalAction(IWorkbenchActionConstants.CLOSE_PROJECT, "project", false); //$NON-NLS-1$ // override the text and tooltip for certain actions, // either to get the new text or a different mnemonic savePerspectiveAction.setText(WorkbenchMessages.getString("Workbench.savePerspectiveAs")); //$NON-NLS-1$ editActionSetAction.setText(WorkbenchMessages.getString("Workbench.customizePerspective")); //$NON-NLS-1$ lockToolBarAction.setText(WorkbenchMessages.getString("Workbench.lockPerspectiveToolBar")); //$NON-NLS-1$ resetPerspectiveAction.setText(WorkbenchMessages.getString("Workbench.resetPerspective")); //$NON-NLS-1$ closePerspAction.setText(WorkbenchMessages.getString("Workbench.closePerspective")); //$NON-NLS-1$ closeAllPerspsAction.setText(WorkbenchMessages.getString("Workbench.closeAllPerspectives")); //$NON-NLS-1$ buildAllAction.setText(WorkbenchMessages.getString("Workbench.buildAll")); //$NON-NLS-1$ buildAllAction.setToolTipText(WorkbenchMessages.getString("Workbench.buildAllToolTip")); //$NON-NLS-1$ keyBindingService.registerGlobalAction(buildAllAction); rebuildAllAction.setText(WorkbenchMessages.getString("Workbench.rebuildAll")); //$NON-NLS-1$ rebuildAllAction.setToolTipText(WorkbenchMessages.getString("Workbench.rebuildAllToolTip")); //$NON-NLS-1$ keyBindingService.registerGlobalAction(rebuildAllAction); } // end menu reorg } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/7283ee58d926a10b576da907ebf9901660a71fa6/WorkbenchActionBuilder.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchActionBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
856,
5250,
1179,
18,
4861,
5160,
1803,
12,
3733,
1803,
1769,
918,
856,
5250,
1179,
18,
4861,
5160,
1803,
12,
3733,
1803,
1769,
1221,
6100,
1435,
856,
5250,
1179,
18,
4861,
5160... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
856,
5250,
1179,
18,
4861,
5160,
1803,
12,
3733,
1803,
1769,
918,
856,
5250,
1179,
18,
4861,
5160,
1803,
12,
3733,
1803,
1769,
1221,
6100,
1435,
856,
5250,
1179,
18,
4861,
5160... | |
if (id == suggestedId) suggestedId++; | if (id == suggestedId) { suggestedId++; } | protected void createButtonsForButtonBar(Composite parent) { final String[] buttonLabels = getButtonLabels(); final Button[] buttons = new Button[buttonLabels.length]; final int defaultButtonIndex = getDefaultButtonIndex(); int suggestedId = IDialogConstants.INTERNAL_ID; for (int i = 0; i < buttonLabels.length; i++) { String label = buttonLabels[i]; // get the JFace button ID that matches the label, or use the specified // id if there is no match. int id = mapButtonLabelToButtonID(label, suggestedId); // if the suggested id was used, increment the default for next use if (id == suggestedId) suggestedId++; Button button = createButton(parent, id, label, defaultButtonIndex == i); buttons[i] = button; } setButtons(buttons); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/391f2606b4ea2c1fb5052d938ca90877ee7631f6/MessageDialogWithToggle.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialogWithToggle.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
752,
14388,
1290,
3616,
5190,
12,
9400,
982,
13,
288,
3639,
727,
514,
8526,
3568,
5888,
273,
2882,
2644,
5888,
5621,
3639,
727,
12569,
8526,
9502,
273,
394,
12569,
63,
5391,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
752,
14388,
1290,
3616,
5190,
12,
9400,
982,
13,
288,
3639,
727,
514,
8526,
3568,
5888,
273,
2882,
2644,
5888,
5621,
3639,
727,
12569,
8526,
9502,
273,
394,
12569,
63,
5391,
58... |
c.pushParentContent(content); if (ContentUtil.hasBlockContent(contentList)) { BlockBoxing.layoutContent(c, box, contentList, box); } else { InlineBoxing.layoutContent(c, box, contentList); } c.popParentContent(); | public static Box layoutChildren(Context c, Box box, Content content) { List contentList = content.getChildContent(c); box.setState(Box.CHILDREN_FLUX); if (contentList == null) { return box; } if (contentList.size() == 0) { return box; }//we can do this if there is no content, right? c.pushParentContent(content); if (ContentUtil.hasBlockContent(contentList)) {//this should be block layed out BlockBoxing.layoutContent(c, box, contentList, box); } else { InlineBoxing.layoutContent(c, box, contentList); } c.popParentContent(); box.setState(Box.DONE); return box; } | 8125 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8125/2486e0a7d32e8bf7a5ba0aa3c3626b52ad12da3c/Boxing.java/clean/src/java/org/xhtmlrenderer/layout/Boxing.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
8549,
3511,
4212,
12,
1042,
276,
16,
8549,
3919,
16,
3697,
913,
13,
288,
3639,
987,
913,
682,
273,
913,
18,
588,
1763,
1350,
12,
71,
1769,
3639,
3919,
18,
542,
1119,
12,
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,
377,
1071,
760,
8549,
3511,
4212,
12,
1042,
276,
16,
8549,
3919,
16,
3697,
913,
13,
288,
3639,
987,
913,
682,
273,
913,
18,
588,
1763,
1350,
12,
71,
1769,
3639,
3919,
18,
542,
1119,
12,
35... | |
case Id_sup: return realThis(thisObj, f). jsFunction_sup(); | case Id_sub: return realThis(thisObj, f).jsFunction_sub(); | public Object execMethod (int methodId, IdFunction f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { switch (methodId) { case ConstructorId_fromCharCode: return jsStaticFunction_fromCharCode(args); case Id_constructor: return jsConstructor(args, thisObj == null); case Id_toString: return realThis(thisObj, f). jsFunction_toString(); case Id_valueOf: return realThis(thisObj, f). jsFunction_valueOf(); case Id_charAt: return jsFunction_charAt(ScriptRuntime.toString(thisObj), args); case Id_charCodeAt: return wrap_double( jsFunction_charCodeAt(ScriptRuntime.toString(thisObj), args)); case Id_indexOf: return wrap_int( jsFunction_indexOf(ScriptRuntime.toString(thisObj), args)); case Id_lastIndexOf: return wrap_int( jsFunction_lastIndexOf(ScriptRuntime.toString(thisObj), args)); case Id_split: return jsFunction_split(cx, ScriptRuntime.toString(thisObj), args, f); case Id_substring: return jsFunction_substring(cx, ScriptRuntime.toString(thisObj), args); case Id_toLowerCase: return jsFunction_toLowerCase(ScriptRuntime.toString(thisObj)); case Id_toUpperCase: return jsFunction_toUpperCase(ScriptRuntime.toString(thisObj)); case Id_substr: return jsFunction_substr(ScriptRuntime.toString(thisObj), args); case Id_concat: return jsFunction_concat(ScriptRuntime.toString(thisObj), args); case Id_slice: return jsFunction_slice(ScriptRuntime.toString(thisObj), args); case Id_bold: return realThis(thisObj, f). jsFunction_bold(); case Id_italics: return realThis(thisObj, f). jsFunction_italics(); case Id_fixed: return realThis(thisObj, f). jsFunction_fixed(); case Id_strike: return realThis(thisObj, f). jsFunction_strike(); case Id_small: return realThis(thisObj, f). jsFunction_small(); case Id_big: return realThis(thisObj, f). jsFunction_big(); case Id_blink: return realThis(thisObj, f). jsFunction_blink(); case Id_sup: return realThis(thisObj, f). jsFunction_sup(); case Id_sub: return realThis(thisObj, f). jsFunction_sub(); case Id_fontsize: return realThis(thisObj, f). jsFunction_fontsize(ScriptRuntime.toString(args, 0)); case Id_fontcolor: return realThis(thisObj, f). jsFunction_fontcolor(ScriptRuntime.toString(args, 0)); case Id_link: return realThis(thisObj, f). jsFunction_link(ScriptRuntime.toString(args, 0)); case Id_anchor: return realThis(thisObj, f). jsFunction_anchor(ScriptRuntime.toString(args, 0)); case Id_equals: return wrap_boolean( jsFunction_equals(ScriptRuntime.toString(thisObj), ScriptRuntime.toString(args, 0))); case Id_equalsIgnoreCase: return wrap_boolean( jsFunction_equalsIgnoreCase(ScriptRuntime.toString(thisObj), ScriptRuntime.toString(args, 0))); case Id_match: return jsFunction_match(cx, thisObj, args, f); case Id_search: return jsFunction_search(cx, thisObj, args, f); case Id_replace: return jsFunction_replace(cx, thisObj, args, f); } return super.execMethod(methodId, f, cx, scope, thisObj, args); } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/35caf7c2bb93872680ae16e34746d94fe1e533e3/NativeString.java/buggy/js/rhino/src/org/mozilla/javascript/NativeString.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,
... |
List rowNames = ((FeatureDimension) bad.getDesignElementDimension()) .getContainedFeatures(); | List rowNames = null; DesignElementDimension ded = bad.getDesignElementDimension(); if (ded instanceof FeatureDimension) { rowNames = ((FeatureDimension) ded).getContainedFeatures(); } else if (ded instanceof ReporterDimension) { rowNames = ((ReporterDimension) ded).getReporters(); } | protected Item createItem(Object obj) throws Exception { if (seenMap.containsKey(obj)) { return (Item) seenMap.get(obj); } boolean storeItem = true; Class cls = obj.getClass(); String className = TypeUtil.unqualifiedName(cls.getName()); Item item = new Item(); item.setClassName(MAGE_NS + className); item.setImplementations(""); if (!cls.getName().equals("org.biomage.Common.MAGEJava") && !className.endsWith("_package")) { if (!cls.getName().equals("org.biomage.ArrayDesign.PhysicalArrayDesign") && !cls.getName().equals("org.biomage.DesignElement.Feature")) { item.setIdentifier(alias(className) + "_" + (id++)); seenMap.put(obj, item); } } else { // don't store the MAGEJava object storeItem = false; } opCount++; if (opCount % 1000 == 0) { long now = System.currentTimeMillis(); LOG.info("Converted " + opCount + " objects - running at " + (60000000 / (now - time)) + " (avg " + ((60000L * opCount) / (now - start)) + ") objects per minute -- now on " + item.getClassName()); time = now; } for (Iterator i = TypeUtil.getFieldInfos(cls).values().iterator(); i.hasNext();) { TypeUtil.FieldInfo info = (TypeUtil.FieldInfo) i.next(); Method m = info.getGetter(); if (m.getParameterTypes().length == 0) { Object value = m.invoke(obj, null); if (value != null) { if (Collection.class.isAssignableFrom(m.getReturnType())) { ReferenceList col = new ReferenceList(info.getName()); StringBuffer sb = new StringBuffer(); for (Iterator j = ((Collection) value).iterator(); j.hasNext();) { col.addRefId(createItem(j.next()).getIdentifier()); } if (col.getRefIds().size() > 0) { item.addCollection(col); } } else if (m.getReturnType().getName().startsWith("org.biomage")) { if (m.getReturnType().getName().startsWith(cls.getName() + "$")) { Method getName = value.getClass().getMethod("getName", null); String attValue = (String) getName.invoke(value, null); if (attValue != null) { item.setAttribute(info.getName(), escapeQuotes(attValue)); } else { LOG.warn("Null value for attribute " + info.getName() + " in Item " + item.getClassName() + " (" + item.getIdentifier() + ")"); } } else { item.setReference(info.getName(), createItem(value).getIdentifier()); } } else if (!info.getName().equals("identifier")) { item.setAttribute(info.getName(), escapeQuotes(value.toString())); // TODO handle dates? } } } } if (className.equals("PhysicalArrayDesign")) { // if item does not have name set it is a placeholder do not want to store PhysicalArrayDesign pad = (PhysicalArrayDesign) obj; String padId = pad.getIdentifier(); Item padItem = (Item) padIdentifiers.get(padId); if (padItem == null) { item.setIdentifier(alias(className) + "_" + (id++)); padIdentifiers.put(padId, item); } else if (pad.getName() != null) { item.setIdentifier(padItem.getIdentifier()); padIdentifiers.put(padId, item); } else { item = padItem; } storeItem = false; } else if (className.equals("Feature")) { Feature feature = (Feature) obj; String fid = feature.getIdentifier(); Item fItem = (Item) featureIdentifiers.get(fid); if (fItem == null) { item.setIdentifier(alias(className) + "_" + (id++)); featureIdentifiers.put(fid, item); } else if (feature.getZone() != null) { item.setIdentifier(fItem.getIdentifier()); featureIdentifiers.put(fid, item); } else { item = fItem; } storeItem = false; } else if (className.equals("DerivedBioAssayData")) { BioAssayData bad = (BioAssayData) obj; String fileName = ((BioDataCube) bad.getBioDataValues()).getDataExternal() .getFilenameURI(); List colTypes = bad.getQuantitationTypeDimension().getQuantitationTypes(); List rowNames = ((FeatureDimension) bad.getDesignElementDimension()) .getContainedFeatures(); BufferedReader br = new BufferedReader(new InputStreamReader(getClass().getClassLoader().getResourceAsStream(fileName))); Item bdt = makeItem("BioDataTuples"); ReferenceList dataList = new ReferenceList("bioAssayTupleData"); boolean storeTuple = false; for (Iterator i = rowNames.iterator(); i.hasNext();) { Feature feature = (Feature) i.next(); String s = br.readLine(); StringTokenizer st = new StringTokenizer(s, "\t"); for (Iterator j = colTypes.iterator(); j.hasNext();) { QuantitationType qt = (QuantitationType) j.next(); String value = st.nextToken(); if (qTypes.contains(qt.getName())) { storeTuple = true; Item datum = makeItem("BioAssayDatum"); dataList.addRefId(datum.getIdentifier()); datum.setReference("quantitationType", createItem(qt).getIdentifier()); datum.setReference("designElement", createItem(feature).getIdentifier()); datum.setAttribute("value", value); // reference to BioAssayData is not in model but adding it makes translation // easier, avoids enormous amount of prefetch datum.setReference("bioAssayData", item.getIdentifier()); storeItem(datum); } } } if (storeTuple) { bdt.addCollection(dataList); storeItem(bdt); // store BioDataTuple item item.setReference("bioDataValues", bdt.getIdentifier()); } } if (storeItem) { storeItem(item); } return item; } | 29158 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/29158/d2dddd1b91fa529ecf9e9281616f51ef0a34472c/MageConverter.java/clean/flymine/model/mage/src/java/org/flymine/dataconversion/MageConverter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
4342,
29274,
12,
921,
1081,
13,
1216,
1185,
288,
3639,
309,
261,
15156,
863,
18,
12298,
653,
12,
2603,
3719,
288,
5411,
327,
261,
1180,
13,
5881,
863,
18,
588,
12,
2603,
1769,
363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
4342,
29274,
12,
921,
1081,
13,
1216,
1185,
288,
3639,
309,
261,
15156,
863,
18,
12298,
653,
12,
2603,
3719,
288,
5411,
327,
261,
1180,
13,
5881,
863,
18,
588,
12,
2603,
1769,
363... |
final XFormsState sessionFormsState = (sessionStateCache == null) ? null : sessionStateCache.find(requestPageGenerationId, requestId); | final XFormsState sessionFormsState = (sessionStateCache == null) ? null : sessionStateCache.find(staticStateUUID, dynamicStateUUID); | private void doIt(final PipelineContext pipelineContext, ContentHandler contentHandler) { final ExternalContext externalContext = (ExternalContext) pipelineContext.getAttribute(PipelineContext.EXTERNAL_CONTEXT); final Element filesElement; final Element actionElement; final XFormsContainingDocument containingDocument; final XFormsState xformsState; final String requestPageGenerationId; // Use request input provided by client final Document requestDocument = readInputAsDOM4J(pipelineContext, INPUT_REQUEST); // Get action actionElement = requestDocument.getRootElement().element(XFormsConstants.XXFORMS_ACTION_QNAME); // Get files if any (those come from xforms-server-submit.xpl upon submission) filesElement = requestDocument.getRootElement().element(XFormsConstants.XXFORMS_FILES_QNAME); // Retrieve state { // Get static state final String staticStateString; { final Element staticStateElement = requestDocument.getRootElement().element(XFormsConstants.XXFORMS_STATIC_STATE_QNAME); staticStateString = staticStateElement.getTextTrim(); } // Get dynamic state final String dynamicStateString; { final Element dynamicStateElement = requestDocument.getRootElement().element(XFormsConstants.XXFORMS_DYNAMIC_STATE_QNAME); dynamicStateString = dynamicStateElement.getTextTrim(); } if (dynamicStateString.startsWith(APPLICATION_STATE_PREFIX)) { // State is currently stored in the application scope final String requestId = dynamicStateString.substring(APPLICATION_STATE_PREFIX.length()); // Extract page generation id requestPageGenerationId = staticStateString.substring(APPLICATION_STATE_PREFIX.length()); // We don't create the session cache at this point as it may not be necessary final XFormsServerApplicationStateCache applicationStateCache = XFormsServerApplicationStateCache.instance(externalContext, false); final XFormsState applicationFormsState = applicationStateCache.find(requestPageGenerationId, requestId); // This is not going to be good when it happens, and we must create a caching heuristic that minimizes this if (applicationFormsState == null) throw new OXFException("Unable to retrieve XForms engine state from application cache."); xformsState = applicationFormsState; } else if (dynamicStateString.startsWith(SESSION_STATE_PREFIX)) { // State doesn't come with the request, we should look it up in the repository final String requestId = dynamicStateString.substring(SESSION_STATE_PREFIX.length()); // Extract page generation id requestPageGenerationId = staticStateString.startsWith(SESSION_STATE_PREFIX) ? staticStateString.substring(SESSION_STATE_PREFIX.length()) : staticStateString.substring(APPLICATION_STATE_PREFIX.length()); // We don't create the session cache at this point as it may not be necessary final XFormsServerSessionStateCache sessionStateCache = XFormsServerSessionStateCache.instance(externalContext.getSession(false), false); final XFormsState sessionFormsState = (sessionStateCache == null) ? null : sessionStateCache.find(requestPageGenerationId, requestId); // This is not going to be good when it happens, and we must create a caching heuristic that minimizes this if (sessionFormsState == null) throw new OXFException("Unable to retrieve XForms engine state from session cache."); xformsState = sessionFormsState; } else { // State comes with request requestPageGenerationId = null; xformsState = new XFormsState(staticStateString, dynamicStateString); } } if (XFormsUtils.isCacheDocument()) { // Try to obtain containing document from cache if (filesElement == null) { // No fileElements, this may have been cached containingDocument = XFormsServerDocumentCache.instance().find(pipelineContext, xformsState); } else { // If there are filesElement, then we know this was not cached logger.debug("XForms - containing document cache (getContainingDocument): fileElements present."); containingDocument = createXFormsContainingDocument(pipelineContext, xformsState, filesElement); } } else { // Otherwise we recreate the containing document from scratch containingDocument = createXFormsContainingDocument(pipelineContext, xformsState, filesElement); } try { // Run event if any boolean allEvents = false; final Map valueChangeControlIds = new HashMap(); if (actionElement != null) { final List eventElements = actionElement.elements(XFormsConstants.XXFORMS_EVENT_QNAME); if (eventElements != null && eventElements.size() > 0) { // NOTE: We store here the last xxforms-value-change-with-focus-change event so // we can coalesce values in case several such events are sent for the same // control. The client should not send us such series of events, but currently // it may happen. String lastSourceControlId = null; String lastValueChangeEventValue = null; int[] sentEventCount = { 0 } ; for (Iterator i = eventElements.iterator(); i.hasNext();) { final Element eventElement = (Element) i.next(); final String sourceControlId = eventElement.attributeValue("source-control-id"); final String otherControlId = eventElement.attributeValue("other-control-id"); final String eventName = eventElement.attributeValue("name"); final String value = eventElement.getText(); if (XFormsEvents.XXFORMS_ALL_EVENTS_REQUIRED.equals(eventName)) { // Special event telling us to resend the client all the events since initialization allEvents = true; } else if (sourceControlId != null && eventName != null) { // An event is passed if (eventName.equals(XFormsEvents.XXFORMS_VALUE_CHANGE_WITH_FOCUS_CHANGE) && otherControlId == null) { // xxforms-value-change-with-focus-change event if (lastSourceControlId == null) { // Rember event lastSourceControlId = sourceControlId; lastValueChangeEventValue = value; } else if (lastSourceControlId.equals(sourceControlId)) { // Update event lastValueChangeEventValue = value; } else { // Send old event executeExternalEventPrepareIfNecessary(pipelineContext, containingDocument, sentEventCount, XFormsEvents.XXFORMS_VALUE_CHANGE_WITH_FOCUS_CHANGE, lastSourceControlId, null, lastValueChangeEventValue); // Remember new event lastSourceControlId = sourceControlId; lastValueChangeEventValue = value; } } else { if (lastSourceControlId != null) { // Send old event executeExternalEventPrepareIfNecessary(pipelineContext, containingDocument, sentEventCount, XFormsEvents.XXFORMS_VALUE_CHANGE_WITH_FOCUS_CHANGE, lastSourceControlId, null, lastValueChangeEventValue); lastSourceControlId = null; lastValueChangeEventValue = null; } // Send new event executeExternalEventPrepareIfNecessary(pipelineContext, containingDocument, sentEventCount, eventName, sourceControlId, otherControlId, value); } if (eventName.equals(XFormsEvents.XXFORMS_VALUE_CHANGE_WITH_FOCUS_CHANGE)) { // Remember id of control of which value changed valueChangeControlIds.put(sourceControlId, ""); } } else if (!(sourceControlId == null && eventName == null)) { throw new OXFException("<event> element must either have source-control-id and name attributes, or no attribute."); } } // Flush stored event if needed if (lastSourceControlId != null) { // Send old event executeExternalEventPrepareIfNecessary(pipelineContext, containingDocument, sentEventCount, XFormsEvents.XXFORMS_VALUE_CHANGE_WITH_FOCUS_CHANGE, lastSourceControlId, null, lastValueChangeEventValue); } } } // Create resulting document if there is a ContentHandler if (contentHandler != null) { outputResponse(containingDocument, allEvents, valueChangeControlIds, pipelineContext, contentHandler, requestPageGenerationId, externalContext, xformsState); } } catch (Throwable e) { // If an exception is caught, we need to discard the object as its state may be inconsistent final ObjectPool sourceObjectPool = containingDocument.getSourceObjectPool(); if (sourceObjectPool != null) { logger.debug("XForms - containing document cache: throwable caught, discarding document from pool."); try { sourceObjectPool.invalidateObject(containingDocument); containingDocument.setSourceObjectPool(null); } catch (Exception e1) { throw new OXFException(e1); } } throw new OXFException(e); } } | 10097 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10097/bb3699c4b7cb5d246bfe15271c53f36f24fc2e1f/XFormsServer.java/clean/src/java/org/orbeon/oxf/xforms/processor/XFormsServer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
741,
7193,
12,
6385,
13671,
1042,
5873,
1042,
16,
3697,
1503,
913,
1503,
13,
288,
3639,
727,
11352,
1042,
3903,
1042,
273,
261,
6841,
1042,
13,
5873,
1042,
18,
588,
1499,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
741,
7193,
12,
6385,
13671,
1042,
5873,
1042,
16,
3697,
1503,
913,
1503,
13,
288,
3639,
727,
11352,
1042,
3903,
1042,
273,
261,
6841,
1042,
13,
5873,
1042,
18,
588,
1499,
12,
... |
if (left != 0) add(part, relationship, left, right, refPart); else add(part, relationship, ratio, refPart); | if (left != 0) { add(part, relationship, left, right, refPart); } else { add(part, relationship, ratio, refPart); } | public IStatus restoreState(IMemento memento) { MultiStatus result = new MultiStatus( PlatformUI.PLUGIN_ID, IStatus.OK, WorkbenchMessages.RootLayoutContainer_problemsRestoringPerspective, null); // Read the info elements. IMemento[] children = memento.getChildren(IWorkbenchConstants.TAG_INFO); // Create a part ID to part hashtable. Map mapIDtoPart = new HashMap(children.length); // Loop through the info elements. for (int i = 0; i < children.length; i++) { // Get the info details. IMemento childMem = children[i]; String partID = childMem.getString(IWorkbenchConstants.TAG_PART); String relativeID = childMem .getString(IWorkbenchConstants.TAG_RELATIVE); int relationship = 0; float ratio = 0.0f; int left = 0, right = 0; if (relativeID != null) { relationship = childMem.getInteger( IWorkbenchConstants.TAG_RELATIONSHIP).intValue(); // Note: the ratio is used for reading pre-3.0 eclipse workspaces. It should be ignored // if "left" and "right" are available. Float ratioFloat = childMem .getFloat(IWorkbenchConstants.TAG_RATIO); Integer leftInt = childMem .getInteger(IWorkbenchConstants.TAG_RATIO_LEFT); Integer rightInt = childMem .getInteger(IWorkbenchConstants.TAG_RATIO_RIGHT); if (leftInt != null && rightInt != null) { left = leftInt.intValue(); right = rightInt.intValue(); } else { if (ratioFloat != null) { ratio = ratioFloat.floatValue(); } } } String strFolder = childMem .getString(IWorkbenchConstants.TAG_FOLDER); // Create the part. LayoutPart part = null; if (strFolder == null) part = new PartPlaceholder(partID); else { ViewStack folder = new ViewStack(page); folder.setID(partID); result.add(folder.restoreState(childMem .getChild(IWorkbenchConstants.TAG_FOLDER))); ContainerPlaceholder placeholder = new ContainerPlaceholder( partID); placeholder.setRealContainer(folder); part = placeholder; } // 1FUN70C: ITPUI:WIN - Shouldn't set Container when not active part.setContainer(this); // Add the part to the layout if (relativeID == null) { add(part); } else { LayoutPart refPart = (LayoutPart) mapIDtoPart.get(relativeID); if (refPart != null) { if (left != 0) add(part, relationship, left, right, refPart); else add(part, relationship, ratio, refPart); } else { WorkbenchPlugin .log("Unable to find part for ID: " + relativeID);//$NON-NLS-1$ } } mapIDtoPart.put(partID, part); } return result; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/ViewSashContainer.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewSashContainer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
1482,
5217,
1119,
12,
3445,
820,
83,
312,
820,
83,
13,
288,
3639,
5991,
1482,
563,
273,
394,
5991,
1482,
12,
7734,
11810,
5370,
18,
19415,
67,
734,
16,
7734,
467,
1482,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
1482,
5217,
1119,
12,
3445,
820,
83,
312,
820,
83,
13,
288,
3639,
5991,
1482,
563,
273,
394,
5991,
1482,
12,
7734,
11810,
5370,
18,
19415,
67,
734,
16,
7734,
467,
1482,
18,
... |
if ( icName.equals(SchemaSymbols.ELT_KEY) ) { | if ( icName.equals(SchemaSymbols.ELT_KEY) ) { | 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) | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/0561c4be90e07e6ba8d6b8f42edef5dc8d6d453c/TraverseSchema.java/buggy/src/org/apache/xerces/validators/schema/TraverseSchema.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
10080,
4334,
4878,
1290,
12,
474,
930,
1016,
16,
4766,
7734,
5589,
4215,
4878,
13,
3639,
1216,
1185,
288,
3639,
368,
7401,
1879,
4215,
6237,
364,
333,
930,
3639,
509,
963,
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,
10080,
4334,
4878,
1290,
12,
474,
930,
1016,
16,
4766,
7734,
5589,
4215,
4878,
13,
3639,
1216,
1185,
288,
3639,
368,
7401,
1879,
4215,
6237,
364,
333,
930,
3639,
509,
963,
273,... |
contextManagerEvent.haveDefinedContextIdsChanged(), contextManagerEvent.haveEnabledContextIdsChanged()); | contextManagerEvent.getEnabledContexts(), contextManagerEvent.getDisabledContexts(), contextManagerEvent.getDefinedContexts()); | public void contextManagerChanged(ContextManagerEvent contextManagerEvent) { ContextManagerEvent proxyContextManagerEvent = new ContextManagerEvent( ProxyContextManager.this, contextManagerEvent.haveDefinedContextIdsChanged(), contextManagerEvent.haveEnabledContextIdsChanged()); fireContextManagerChanged(proxyContextManagerEvent); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/50f2ca10ca784c3f46f44a5bd58b7f66c39fbf84/ProxyContextManager.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/ProxyContextManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
819,
1318,
5033,
12,
1042,
1318,
1133,
819,
1318,
1133,
13,
288,
9506,
202,
1042,
1318,
1133,
2889,
1042,
1318,
1133,
273,
6862,
202,
2704,
1772,
1318,
1133,
12,
25083,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
819,
1318,
5033,
12,
1042,
1318,
1133,
819,
1318,
1133,
13,
288,
9506,
202,
1042,
1318,
1133,
2889,
1042,
1318,
1133,
273,
6862,
202,
2704,
1772,
1318,
1133,
12,
25083,
20... |
while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } | else { | boolean match(CharIndexed input, REMatch mymatch) { int origin = mymatch.index; // number of times we've matched so far int numRepeats = 0; // Possible positions for the next repeat to match at REMatch newMatch = mymatch; REMatch last = null; REMatch current; // Add the '0-repeats' index // positions.elementAt(z) == position [] in input after <<z>> matches Vector positions = new Vector(); positions.addElement(newMatch); // Declare variables used in loop REMatch doables; REMatch doablesLast; REMatch recurrent; int lastIndex = mymatch.index; do { // Check for stingy match for each possibility. if ((stingy && (numRepeats >= min)) || alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); mymatch.empty = (mymatch.index == origin); return true; } else { // Special case of {0}. It must always match an empty string. if (alwaysEmpty) return false; } } doables = null; doablesLast = null; // try next repeat at all possible positions for (current = newMatch; current != null; current = current.next) { recurrent = (REMatch) current.clone(); if (token.match(input, recurrent)) { // add all items in current to doables array if (doables == null) { doables = recurrent; doablesLast = recurrent; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) doablesLast.next = recurrent; } // Find new doablesLast while (doablesLast.next != null) { doablesLast = doablesLast.next; } } } // if none of the possibilities worked out, break out of do/while if (doables == null) break; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; positions.addElement(newMatch); // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // And this case occurs either // (1-1) when this token is always empty, // for example "()" or "(())". // (1-2) when this token is not always empty // but can match an empty string, for example, // "a*", "(a|)". // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. if (doables.index == lastIndex) { if (doables.empty) { // Case (1): We break here, otherwise we will fall // into an endless loop. if (numRepeats < min) numRepeats = min; break; } else { // Case (2): We cannot break here because, for example, // "acbacb" matches "a.*b" up to 2 times but // not 3 times. So we have to check numRepeats >= min. // But we do not have to go further until numRepeats == max // because the more numRepeats grows, the shorter the // substring matching this token becomes. if (numRepeats > min) { // This means the previous match was successful, // and that must be the best match. This match // resulted in shortening the matched substring. numRepeats--; positions.remove(positions.size() - 1); break; } if (numRepeats == min) break; } } lastIndex = doables.index; } while (numRepeats < max); // If there aren't enough repeats, then fail if (numRepeats < min) return false; // We're greedy, but ease off until a true match is found int posIndex = positions.size(); // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch allResults = null; REMatch allResultsLast = null; REMatch results = null; int indexCount = posIndex - min; if (indexCount <= 0) { // This case occurs when we exited the previous do loop before // numRepeats >= min because an empty string matched the token. // In this case, an empty string can match as many times as // desired. indexCount = 1; } while (indexCount-- > 0) { --posIndex; newMatch = (REMatch) positions.elementAt(posIndex); results = matchRest(input, newMatch); if (results != null) { if (allResults == null) { allResults = results; allResultsLast = results; } else { // Order these from longest to shortest // Start by assuming longest (more repeats) allResultsLast.next = results; } // Find new doablesLast while (allResultsLast.next != null) { allResultsLast = allResultsLast.next; } } // else did not match rest of the tokens, try again on smaller sample // or break out when performing possessive matching if (possessive) break; } if (allResults != null) { mymatch.assignFrom(allResults); // does this get all? mymatch.empty = (mymatch.index == origin); return true; } // If we fall out, no matches. return false; } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/RETokenRepeated.java/clean/core/src/classpath/gnu/gnu/regexp/RETokenRepeated.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1250,
845,
12,
2156,
15034,
810,
16,
2438,
2060,
3399,
1916,
13,
288,
202,
474,
4026,
273,
3399,
1916,
18,
1615,
31,
202,
759,
1300,
434,
4124,
732,
8081,
4847,
1427,
10247,
202,
474,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1250,
845,
12,
2156,
15034,
810,
16,
2438,
2060,
3399,
1916,
13,
288,
202,
474,
4026,
273,
3399,
1916,
18,
1615,
31,
202,
759,
1300,
434,
4124,
732,
8081,
4847,
1427,
10247,
202,
474,
8... |
public int ADXR_Lookback(int optInTimePeriod) { | public int ADXR_Lookback( int optInTimePeriod ) { | public int ADXR_Lookback(int optInTimePeriod) { if (optInTimePeriod > 1) return optInTimePeriod + ADX_Lookback(optInTimePeriod) - 1; else return 3; } | 7231 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7231/5df8081f2a7211016256c0f481213a987e02947a/Core.java/clean/ta-lib/java/src/TA/Lib/Core.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
11738,
60,
54,
67,
9794,
823,
12,
474,
2153,
382,
26540,
13,
288,
202,
202,
430,
261,
3838,
382,
26540,
405,
404,
13,
1082,
202,
2463,
2153,
382,
26540,
397,
11738,
60,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
11738,
60,
54,
67,
9794,
823,
12,
474,
2153,
382,
26540,
13,
288,
202,
202,
430,
261,
3838,
382,
26540,
405,
404,
13,
1082,
202,
2463,
2153,
382,
26540,
397,
11738,
60,
... |
this.damageInfantryIn( bldg, damage ); | damageInfantryIn( bldg, damage ); | private void resolveKickAttack(PhysicalResult pr, int lastEntityId) { KickAttackAction kaa = (KickAttackAction)pr.aaa; final Entity ae = game.getEntity(kaa.getEntityId()); final Targetable target = game.getTarget(kaa.getTargetType(), kaa.getTargetId()); Entity te = null; if (target.getTargetType() == Targetable.TYPE_ENTITY) { te = (Entity)target; } boolean throughFront = true; if (te!=null) { throughFront = Compute.isThroughFrontHex(game, kaa.getEntityId(), te); } String legName = ( (kaa.getLeg() == KickAttackAction.LEFT) || (kaa.getLeg() == KickAttackAction.LEFTMULE) ) ? "Left " : "Right "; if (game.getOptions().booleanOption("maxtech_mulekicks")) { if ( (kaa.getLeg() == KickAttackAction.LEFTMULE) || (kaa.getLeg() == KickAttackAction.RIGHTMULE) ) { legName.concat(" rear "); } else { legName.concat(" front "); } } legName.concat("leg"); Report r; // get damage, ToHitData and roll from the PhysicalResult int damage = pr.damage; final ToHitData toHit = pr.toHit; int roll = pr.roll; final boolean targetInBuilding = Compute.isInBuilding( game, te ); final boolean glancing = (game.getOptions().booleanOption("maxtech_glancing_blows") && (roll == toHit.getValue())); // Which building takes the damage? Building bldg = game.getBoard().getBuildingAt( target.getPosition() ); if (lastEntityId != ae.getId()) { //who is making the attacks r = new Report(4005); r.subject = ae.getId(); r.addDesc(ae); addReport(r); } r = new Report(4055); r.subject = ae.getId(); r.indent(); r.add(legName); r.add(target.getDisplayName()); r.newlines = 0; addReport(r); if (toHit.getValue() == ToHitData.IMPOSSIBLE) { r = new Report(4060); r.subject = ae.getId(); r.add(toHit.getDesc()); addReport(r); game.addPSR(new PilotingRollData(ae.getId(), 0, "missed a kick")); return; } else if (toHit.getValue() == ToHitData.AUTOMATIC_SUCCESS) { r = new Report(4065); r.subject = ae.getId(); r.add(toHit.getDesc()); r.newlines = 0; addReport(r); roll = Integer.MAX_VALUE; } else { r = new Report(4025); r.subject = ae.getId(); r.add(toHit.getValue()); r.add(roll); r.newlines = 0; addReport(r); if (glancing) { r = new Report(4030); r.subject = ae.getId(); r.newlines = 0; addReport(r); } } // do we hit? if (roll < toHit.getValue()) { // miss r = new Report(4035); r.subject = ae.getId(); addReport(r); game.addPSR(new PilotingRollData(ae.getId(), 0, "missed a kick")); // If the target is in a building, the building absorbs the damage. if ( targetInBuilding && bldg != null ) { // Only report if damage was done to the building. if ( damage > 0 ) { Report buildingReport = damageBuilding( bldg, damage ); buildingReport.indent(); buildingReport.subject = ae.getId(); addReport(buildingReport); } } return; } // Targeting a building. if ( target.getTargetType() == Targetable.TYPE_BUILDING ) { // The building takes the full brunt of the attack. r = new Report(4040); r.subject = ae.getId(); addReport(r); Report buildingReport = damageBuilding( bldg, damage ); buildingReport.indent(); buildingReport.subject = ae.getId(); addReport(buildingReport); // Damage any infantry in the hex. this.damageInfantryIn( bldg, damage ); // And we're done! return; } HitData hit = te.rollHitLocation(toHit.getHitTable(), toHit.getSideTable()); r = new Report(4045); r.subject = ae.getId(); r.add(toHit.getTableDesc()); r.add(te.getLocationAbbr(hit)); r.newlines = 0; addReport(r); // The building shields all units from a certain amount of damage. // The amount is based upon the building's CF at the phase's start. if ( targetInBuilding && bldg != null ) { int bldgAbsorbs = (int) Math.ceil( bldg.getPhaseCF() / 10.0 ); int toBldg = Math.min( bldgAbsorbs, damage ); damage -= toBldg; addNewLines(); Report buildingReport = damageBuilding( bldg, toBldg ); buildingReport.indent(); buildingReport.subject = ae.getId(); addReport(buildingReport); } // A building may absorb the entire shot. if ( damage == 0 ) { r = new Report(4050); r.subject = ae.getId(); r.add(te.getShortName()); r.add(te.getOwner().getName()); r.newlines = 0; addReport(r); } else { if (glancing) { damage = (int)Math.floor(damage/2.0); } addReport(damageEntity(te, hit, damage, false, 0, false, false, throughFront)); } if (te.getMovementMode() == IEntityMovementMode.BIPED || te.getMovementMode() == IEntityMovementMode.QUAD) { PilotingRollData kickPRD = new PilotingRollData(te.getId(), getKickPushPSRMod(ae, te, 0), "was kicked"); kickPRD.setCumulative(false); // see Bug# 811987 for more info game.addPSR(kickPRD); } addNewLines(); } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/cbe74d020e74a85c0e3b8ebf32d1ebc85c1ba62f/Server.java/buggy/megamek/src/megamek/server/Server.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2245,
47,
1200,
3075,
484,
12,
18136,
1253,
846,
16,
509,
1142,
18029,
13,
288,
3639,
1475,
1200,
3075,
484,
1803,
417,
7598,
273,
261,
47,
1200,
3075,
484,
1803,
13,
683,
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,
918,
2245,
47,
1200,
3075,
484,
12,
18136,
1253,
846,
16,
509,
1142,
18029,
13,
288,
3639,
1475,
1200,
3075,
484,
1803,
417,
7598,
273,
261,
47,
1200,
3075,
484,
1803,
13,
683,
18... |
final JButton runButton = new JButton("Run"); final JButton viewButton = new JButton("View"); final JButton helpButton = new JButton("Help"); | runButton = new JButton("Run"); viewButton = new JButton("View"); helpButton = new JButton("Help"); | public PipelineEditor() { setBackground(Color.white); setMinimumSize(new java.awt.Dimension(100, 100)); setLayout(new BorderLayout()); scrollPane = new JScrollPane(); Border b = scrollPane.getBorder(); scrollPane.setBorder(GUIUtil.createBorder(b, 0, -1, -1, -1)); add(scrollPane, BorderLayout.CENTER); tasksInPipelineComboBox = new JComboBox(); addAfterButton = new JButton("Add Task After"); addBeforeButton = new JButton("Add Task Before"); deleteButton = new JButton("Delete"); moveUpButton = new JButton("Move Up"); moveDownButton = new JButton("Move Down"); tasksInPipelineComboBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { enableButtons(); } }); ActionListener taskBtnListener = new ActionListener() { public void actionPerformed(ActionEvent e) { int index = tasksInPipelineComboBox.getSelectedIndex(); updateInputFileValues(); if (e.getSource() == addAfterButton) { showAddTask(index, true); } else if (e.getSource() == addBeforeButton) { showAddTask(index, false); } else if (e.getSource() == deleteButton) { model.remove(index); } else if (e.getSource() == moveUpButton) { model.move(index, index - 1); } else if (e.getSource() == moveDownButton) { model.move(index, index + 1); } enableButtons(); } }; addAfterButton.addActionListener(taskBtnListener); addBeforeButton.addActionListener(taskBtnListener); deleteButton.addActionListener(taskBtnListener); moveUpButton.addActionListener(taskBtnListener); moveDownButton.addActionListener(taskBtnListener); buttonPanel = new JPanel(new BorderLayout()); JPanel topPanel = new JPanel(); topPanel.add(tasksInPipelineComboBox); topPanel.add(addAfterButton); topPanel.add(addBeforeButton); topPanel.add(deleteButton); topPanel.add(moveUpButton); topPanel.add(moveDownButton); JPanel bottomPanel = new JPanel(); final JButton expandAllButton = new JButton("Expand All"); final JButton collapseAllButton = new JButton("Collapse All"); bottomPanel.add(collapseAllButton); bottomPanel.add(expandAllButton); buttonPanel.add(topPanel, BorderLayout.CENTER); buttonPanel.add(bottomPanel, BorderLayout.SOUTH); buttonPanel.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, Color.DARK_GRAY)); ActionListener expandListener = new ActionListener() { public void actionPerformed(ActionEvent e) { if (e.getSource() == expandAllButton) { for (int i = 0; i < taskDisplayList.size(); i++) { TaskPanel p = (TaskPanel) taskDisplayList.get(i); p.setExpanded(true); } } else if (e.getSource() == collapseAllButton) { for (int i = 0; i < taskDisplayList.size(); i++) { TaskPanel p = (TaskPanel) taskDisplayList.get(i); p.setExpanded(false); } } } }; expandAllButton.addActionListener(expandListener); collapseAllButton.addActionListener(expandListener); JPanel bottomBtnPanel = new JPanel(); final JButton saveButton = new JButton("Save"); final JButton runButton = new JButton("Run"); final JButton viewButton = new JButton("View"); final JButton helpButton = new JButton("Help"); taskHelpActionListener = new TaskHelpActionListener(); helpButton.addActionListener(taskHelpActionListener); ActionListener btnListener = new ActionListener() { public void actionPerformed(ActionEvent e) { if (e.getSource() == saveButton) { save(); } else if (e.getSource() == runButton) { // FIXME MessageManager .notifyListeners(new ChangeViewMessageRequest( this, ChangeViewMessageRequest.SHOW_RUN_TASK_REQUEST, null)); } else if (e.getSource() == viewButton) { MessageManager .notifyListeners(new ChangeViewMessageRequest( this, ChangeViewMessageRequest.SHOW_VIEW_PIPELINE_REQUEST, null)); // FIXME } } }; saveButton.addActionListener(btnListener); runButton.addActionListener(btnListener); viewButton.addActionListener(btnListener); bottomBtnPanel.add(saveButton); bottomBtnPanel.add(runButton); bottomBtnPanel.add(viewButton); bottomBtnPanel.add(helpButton); add(bottomBtnPanel, BorderLayout.SOUTH); } | 57344 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57344/c43e5dbc4484928eebc42079cc370884dfc68f67/PipelineEditor.java/clean/clients/JavaGE/src/org/genepattern/gpge/ui/tasks/pipeline/PipelineEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
13671,
6946,
1435,
288,
202,
202,
542,
8199,
12,
2957,
18,
14739,
1769,
202,
202,
542,
13042,
1225,
12,
2704,
2252,
18,
2219,
88,
18,
8611,
12,
6625,
16,
2130,
10019,
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,
13671,
6946,
1435,
288,
202,
202,
542,
8199,
12,
2957,
18,
14739,
1769,
202,
202,
542,
13042,
1225,
12,
2704,
2252,
18,
2219,
88,
18,
8611,
12,
6625,
16,
2130,
10019,
202,
202... |
public static ConstructorDeclaration parseStatements(char[] source, Map settings, boolean recordParsingInformation) { | public ConstructorDeclaration parseStatements(char[] source, Map settings, boolean recordParsingInformation) { | public static ConstructorDeclaration parseStatements(char[] source, Map settings, boolean recordParsingInformation) { return parseStatements(source, 0, source.length, settings, recordParsingInformation); } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/55eb63b50ad4a934502bfb435a017ff21ebaf8d8/CodeSnippetParsingUtil.java/buggy/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/CodeSnippetParsingUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
11417,
6094,
1109,
14663,
12,
3001,
8526,
1084,
16,
1635,
1947,
16,
1250,
1409,
13963,
5369,
13,
288,
202,
202,
2463,
1109,
14663,
12,
3168,
16,
374,
16,
1084,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
11417,
6094,
1109,
14663,
12,
3001,
8526,
1084,
16,
1635,
1947,
16,
1250,
1409,
13963,
5369,
13,
288,
202,
202,
2463,
1109,
14663,
12,
3168,
16,
374,
16,
1084,
18,
2469,
... |
clearBottomTabs(); | clearIndividualBugInformation(); | private void setupTreeListeners() { tree.addTreeSelectionListener(new TreeSelectionListener(){ public void valueChanged(TreeSelectionEvent selectionEvent) { TreePath path = selectionEvent.getNewLeadSelectionPath(); if (path != null) { saveCommentsToBug(currentSelectedBugLeaf); if ((path.getLastPathComponent() instanceof BugLeafNode)) { boolean beforeProjectChanged = projectChanged; updateDesignation(); setUserCommentInputEnable(true); BugLeafNode bugLeaf = (BugLeafNode)path.getLastPathComponent(); BugInstance bug = bugLeaf.getBug(); currentSelectedBugLeaf = bugLeaf; currentSelectedBugAspects = null; updateSummaryTab(bugLeaf); updateCommentsTab(bugLeaf); displayer.displaySource(bug, bug.getPrimarySourceLineAnnotation()); setProjectChanged(beforeProjectChanged); } else { updateDesignation(); currentSelectedBugLeaf = null; currentSelectedBugAspects = (BugAspects)path.getLastPathComponent(); clearBottomTabs(); } }// Debug.println("Tree selection count:" + tree.getSelectionCount()); if (tree.getSelectionCount() !=1) { Debug.println("Tree selection count not equal to 1, disabling comments tab" + selectionEvent); MainFrame.this.setUserCommentInputEnable(false); } } }); tree.addMouseListener(new MouseListener(){ public void mouseClicked(MouseEvent e) { TreePath path = tree.getPathForLocation(e.getX(), e.getY()); if(path == null) return; if ((e.getButton() == MouseEvent.BUTTON3) || (e.getButton() == MouseEvent.BUTTON1 && e.isControlDown())){ if (tree.getModel().isLeaf(path.getLastPathComponent())){ tree.setSelectionPath(path); bugPopupMenu.show(tree, e.getX(), e.getY()); } else{ tree.setSelectionPath(path); if (!(path.getParentPath()==null))//If the path's parent path is null, the root was selected, dont allow them to filter out the root. branchPopupMenu.show(tree, e.getX(), e.getY()); } } } public void mousePressed(MouseEvent arg0) {} public void mouseReleased(MouseEvent arg0) {} public void mouseEntered(MouseEvent arg0) {} public void mouseExited(MouseEvent arg0) {} }); } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/23d93c99b5740d3acb71aa2ea73952c05dc266d5/MainFrame.java/clean/findbugs/src/java5/edu/umd/cs/findbugs/gui2/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3875,
2471,
5583,
1435,
202,
95,
202,
202,
3413,
18,
1289,
2471,
6233,
2223,
12,
2704,
4902,
6233,
2223,
1435,
95,
1082,
202,
482,
918,
460,
5033,
12,
2471,
6233,
1133,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3875,
2471,
5583,
1435,
202,
95,
202,
202,
3413,
18,
1289,
2471,
6233,
2223,
12,
2704,
4902,
6233,
2223,
1435,
95,
1082,
202,
482,
918,
460,
5033,
12,
2471,
6233,
1133,
... |
view.setType(Properties.NOTE); | view.setType(ViewType.NOTE); | public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, final PreferencesHint preferencesHint) { View view = super.createView(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint); // if a note view get created with a diagram semantic element // linked to it then we mark the note view as a diagram link // this will trigger the noteEdit part to switch the figure // to the DiagramLink mode (no border, no fill color and center // alignment) if (view.getElement() instanceof Diagram){ if(semanticHint==null || semanticHint.length()==0) view.setType(Properties.NOTE); EAnnotation annotation = EcoreFactory.eINSTANCE.createEAnnotation(); annotation.setSource(Properties.DIAGRAMLINK_ANNOTATION); view.getEAnnotations().add(annotation); } return view; } | 1758 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1758/94c38bd9865b5750d956f0b2101c832d2c93177f/NoteViewFactory.java/buggy/org.eclipse.gmf.runtime/plugins/org.eclipse.gmf.runtime.diagram.ui/src/org/eclipse/gmf/runtime/diagram/ui/view/factories/NoteViewFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4441,
15193,
12,
45,
13716,
429,
15178,
4216,
16,
4441,
1478,
1767,
16,
1082,
202,
780,
15178,
7002,
16,
509,
770,
16,
1250,
14249,
16,
727,
28310,
7002,
12750,
7002,
13,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4441,
15193,
12,
45,
13716,
429,
15178,
4216,
16,
4441,
1478,
1767,
16,
1082,
202,
780,
15178,
7002,
16,
509,
770,
16,
1250,
14249,
16,
727,
28310,
7002,
12750,
7002,
13,
288,
... |
Member[] members = schemaReader.getLevelMembers(level, false); | Member[] members = schemaReader.getLevelMembers(level, true); | public static Member[][] getAllMembers(SchemaReader schemaReader, Hierarchy hierarchy) { long start = System.currentTimeMillis(); try { List<Member[]> list = new ArrayList<Member[]>(500); // Getting the members by Level is the fastest way that I could // find for getting all of a hierarchy's members. Level[] levels = hierarchy.getLevels(); for (Level level : levels) { Member[] members = schemaReader.getLevelMembers(level, false); if (members != null) { list.add(members); } } return list.toArray(new Member[list.size()][]); } finally { if (LOGGER.isDebugEnabled()) { long end = System.currentTimeMillis(); LOGGER.debug("RolapMember.getAllMembers: time=" +(end-start)); } } } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/99cbcd315efe6bb8d9c24de544b692c9a73174da/RolapMember.java/buggy/src/main/mondrian/rolap/RolapMember.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
8596,
63,
6362,
65,
5514,
6918,
12,
3078,
2514,
1963,
2514,
16,
2398,
670,
6000,
9360,
13,
288,
3639,
1525,
787,
273,
2332,
18,
2972,
28512,
5621,
3639,
775,
288,
5411,
987,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8596,
63,
6362,
65,
5514,
6918,
12,
3078,
2514,
1963,
2514,
16,
2398,
670,
6000,
9360,
13,
288,
3639,
1525,
787,
273,
2332,
18,
2972,
28512,
5621,
3639,
775,
288,
5411,
987,
... |
if (node.jjtGetParent().jjtGetParent() instanceof ASTLocalVariableDeclaration) { | if (node.jjtGetParent().jjtGetParent() instanceof ASTLocalVariableDeclaration && !visited.contains(node.jjtGetParent().jjtGetParent())) { visited.add(node.jjtGetParent().jjtGetParent()); | public Object visit(ASTVariableDeclaratorId node, Object data) { if (node.jjtGetParent().jjtGetParent() instanceof ASTLocalVariableDeclaration) { Map locals = node.getScope().getVariableDeclarations(); for (Iterator i = locals.keySet().iterator(); i.hasNext();) { VariableNameDeclaration decl = (VariableNameDeclaration) i.next(); if (!actuallyUsed((List)locals.get(decl))) { ((RuleContext) data).getReport().addRuleViolation(createRuleViolation((RuleContext) data, decl.getLine(), MessageFormat.format(getMessage(), new Object[]{decl.getImage()}))); } } } return data; } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/bc9af74eed404a130296f1eeadb7b6644647ecd0/UnusedLocalVariableRule.java/clean/pmd/src/net/sourceforge/pmd/rules/UnusedLocalVariableRule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
3757,
12,
9053,
3092,
31419,
548,
756,
16,
1033,
501,
13,
288,
3639,
309,
261,
2159,
18,
78,
78,
88,
967,
3054,
7675,
78,
78,
88,
967,
3054,
1435,
1276,
9183,
2042,
26547,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3757,
12,
9053,
3092,
31419,
548,
756,
16,
1033,
501,
13,
288,
3639,
309,
261,
2159,
18,
78,
78,
88,
967,
3054,
7675,
78,
78,
88,
967,
3054,
1435,
1276,
9183,
2042,
26547,
... |
CompilationUnit astRoot= AST.parseCompilationUnit(cu, true); | CompilationUnit astRoot= AST.parseCompilationUnit(cu, true, null, null); | public void testMethodRequiresBody2() throws Exception { IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null); StringBuffer buf= new StringBuffer(); buf.append("package test1;\n"); buf.append("public class E {\n"); buf.append(" public int foo();\n"); buf.append("}\n"); ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null); CompilationUnit astRoot= AST.parseCompilationUnit(cu, true); ArrayList proposals= collectCorrections(cu, astRoot); assertNumberOf("proposals", proposals.size(), 1); assertCorrectLabels(proposals); CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0); String preview= proposal.getCompilationUnitChange().getPreviewContent(); buf= new StringBuffer(); buf.append("package test1;\n"); buf.append("public class E {\n"); buf.append(" public int foo() {\n"); buf.append(" return 0;\n"); buf.append(" }\n"); buf.append("}\n"); assertEqualString(preview, buf.toString()); } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/4b05e6b3ed9030e8d56c35b8aa455b737cd596e8/ModifierCorrectionsQuickFixTest.java/buggy/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/ModifierCorrectionsQuickFixTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1305,
21671,
2250,
22,
1435,
1216,
1185,
288,
202,
202,
45,
2261,
7456,
2298,
21,
33,
284,
1830,
3899,
18,
2640,
2261,
7456,
2932,
3813,
21,
3113,
629,
16,
446,
176... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1305,
21671,
2250,
22,
1435,
1216,
1185,
288,
202,
202,
45,
2261,
7456,
2298,
21,
33,
284,
1830,
3899,
18,
2640,
2261,
7456,
2932,
3813,
21,
3113,
629,
16,
446,
176... |
protected void translateXMLNode(ITextRegionCollection container, Iterator regions) { // contents must be valid XHTML, translate escaped CDATA into what it really is... ITextRegion r = null; if (regions.hasNext()) { r = (ITextRegion) regions.next(); if (r.getType() == XMLRegionContext.XML_TAG_NAME || r.getType() == XMLJSPRegionContexts.JSP_DIRECTIVE_NAME) // <jsp:directive.xxx comes in as this { String fullTagName = container.getFullText(r).trim(); if (fullTagName.indexOf(':') > -1) { addTaglibVariables(fullTagName); // it may be a taglib } StringTokenizer st = new StringTokenizer(fullTagName, ":.", false); //$NON-NLS-1$ if (st.hasMoreTokens() && st.nextToken().equals("jsp")) //$NON-NLS-1$ { if (st.hasMoreTokens()) { String jspTagName = st.nextToken(); if (jspTagName.equals("useBean")) //$NON-NLS-1$ { advanceNextNode(); // get the content if (getCurrentNode() != null) { translateUseBean(container); // 'regions' should be all the useBean attributes } } else if (jspTagName.equals("scriptlet")) //$NON-NLS-1$ { // <jsp:scriptlet>scriptlet content...</jsp:scriptlet> IStructuredDocumentRegion sdr = getCurrentNode().getNext(); if(sdr != null) { translateScriptletString(sdr.getText(), sdr, sdr.getStartOffset(), sdr.getEndOffset()); } advanceNextNode(); } else if (jspTagName.equals("expression")) //$NON-NLS-1$ { // <jsp:expression>expression content...</jsp:expression> IStructuredDocumentRegion sdr = getCurrentNode().getNext(); if(sdr != null) { translateExpressionString(sdr.getText(), sdr, sdr.getStartOffset(), sdr.getEndOffset()); } advanceNextNode(); } else if (jspTagName.equals("declaration")) //$NON-NLS-1$ { // <jsp:declaration>declaration content...</jsp:declaration> IStructuredDocumentRegion sdr = getCurrentNode().getNext(); if(sdr != null) { translateDeclarationString(sdr.getText(), sdr, sdr.getStartOffset(), sdr.getEndOffset()); } advanceNextNode(); } else if (jspTagName.equals("directive")) //$NON-NLS-1$ { if (st.hasMoreTokens()) { String directiveName = st.nextToken(); if (directiveName.equals("taglib")) { //$NON-NLS-1$ handleTaglib(); return; } else if (directiveName.equals("include")) { //$NON-NLS-1$ String fileLocation = ""; //$NON-NLS-1$ String attrValue = ""; //$NON-NLS-1$ // CMVC 258311 // PMR 18368, B663 // skip to required "file" attribute, should be safe because // "file" is the only attribute for the include directive while (r != null && regions.hasNext() && !r.getType().equals(XMLRegionContext.XML_TAG_ATTRIBUTE_NAME)) { r = (ITextRegion) regions.next(); } attrValue = getAttributeValue(r, regions); if (attrValue != null) handleIncludeFile(fileLocation); } else if (directiveName.equals("page")) { //$NON-NLS-1$ // 20040702 commenting this out // bad if currentNode is referenced after here w/ the current list // see: https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3035 // setCurrentNode(getCurrentNode().getNext()); if (getCurrentNode() != null) { translatePageDirectiveAttributes(regions); // 'regions' are attributes for the directive } } } } else if(jspTagName.equals("include")) { //$NON-NLS-1$ // <jsp:include page="filename") /> while(regions.hasNext()) { r = (ITextRegion)regions.next(); if(r.getType() == XMLRegionContext.XML_TAG_ATTRIBUTE_NAME && getCurrentNode().getText(r).equals("page")) { //$NON-NLS-1$ String filename = getAttributeValue(r, regions); handleIncludeFile(filename); break; } } } } } else { // tag name is not jsp // handle embedded jsp attributes... ITextRegion embedded = null; Iterator attrRegions = null; ITextRegion attrChunk = null; while (regions.hasNext()) { embedded = (ITextRegion) regions.next(); if (embedded instanceof ITextRegionContainer) { // parse out container attrRegions = ((ITextRegionContainer) embedded).getRegions().iterator(); while (attrRegions.hasNext()) { attrChunk = (ITextRegion) attrRegions.next(); String type = attrChunk.getType(); // CMVC 263661, embedded JSP in attribute support // only want to translate one time per embedded region // so we only translate on the JSP open tags (not content) if (type == XMLJSPRegionContexts.JSP_EXPRESSION_OPEN || type == XMLJSPRegionContexts.JSP_SCRIPTLET_OPEN || type == XMLJSPRegionContexts.JSP_DECLARATION_OPEN || type == XMLJSPRegionContexts.JSP_DIRECTIVE_OPEN) { // now call jsptranslate //System.out.println("embedded jsp OPEN >>>> " + ((ITextRegionContainer)embedded).getText(attrChunk)); translateEmbeddedJSPInAttribute((ITextRegionContainer) embedded); } } } } } } } } | 13989 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13989/2e01915a5c78fe7220591d5dfc6ebf923eaed5f2/JSPTranslator.java/buggy/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
225,
918,
225,
4204,
4201,
907,
12,
1285,
408,
5165,
2532,
225,
1478,
16,
225,
4498,
225,
10085,
13,
225,
288,
202,
202,
759,
225,
2939,
225,
1297,
225,
506,
225,
923,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
225,
918,
225,
4204,
4201,
907,
12,
1285,
408,
5165,
2532,
225,
1478,
16,
225,
4498,
225,
10085,
13,
225,
288,
202,
202,
759,
225,
2939,
225,
1297,
225,
506,
225,
923,
225,
... | ||
public void testPreparedStatement() throws Exception { | public void testPreparedStatement() throws Exception { PreparedStatement pstmt = con.prepareStatement("SELECT * FROM #test"); | public void testPreparedStatement() throws Exception { PreparedStatement pstmt = con.prepareStatement( "SELECT * FROM #test" ); makeTestTables( pstmt ); makeObjects( pstmt, 10 ); ResultSet rs = pstmt.executeQuery(); dump( rs ); rs.close(); } | 2029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2029/a8c6a6279bc7df150a56759cb3b952e9334b0a5a/PreparedStatementTest.java/clean/src/test/net/sourceforge/jtds/test/PreparedStatementTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
29325,
1435,
3639,
1216,
1185,
565,
288,
3639,
16913,
293,
10589,
5411,
273,
356,
18,
9366,
3406,
12,
315,
4803,
380,
4571,
468,
3813,
6,
11272,
3639,
1221,
4709,
6905,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29325,
1435,
3639,
1216,
1185,
565,
288,
3639,
16913,
293,
10589,
5411,
273,
356,
18,
9366,
3406,
12,
315,
4803,
380,
4571,
468,
3813,
6,
11272,
3639,
1221,
4709,
6905,
1... |
AttributeBuilder.buildStyle( styleBuffer, report.getNonInheritableDefaultStyle( ), this ); writer.style( "*", styleBuffer.toString( ), true ); | public void startReport( IReportContent report ) { logger.log( Level.FINE, "[HTMLReportEmitter] Start emitter." ); //$NON-NLS-1$ this.report = report; writer.open( out, "UTF-8" ); //$NON-NLS-1$ if ( isEmbeddable ) { fixTransparentPNG( ); return; } writer.startWriter( ); writer.openTag( HTMLTags.TAG_HTML ); writer.openTag( HTMLTags.TAG_META ); writer.attribute( HTMLTags.ATTR_HTTP_EQUIV, "Content-Type" ); //$NON-NLS-1$ writer.attribute( HTMLTags.ATTR_CONTENT, "text/html; charset=UTF-8" ); //$NON-NLS-1$ writer.closeNoEndTag( ); writer.openTag( HTMLTags.TAG_HEAD ); writer.openTag( HTMLTags.TAG_STYLE ); writer.attribute( HTMLTags.ATTR_TYPE, "text/css" ); //$NON-NLS-1$ // output general styles writer.style( "table", "border-collapse: collapse; empty-cells: show;", true ); //$NON-NLS-1$ //$NON-NLS-2$ /* * //MOZILLA/IE use middle as the default vertical align, but ROM defines the * //baseline instead. CSS uses baseline also. writer.style( "td", "vertical-align: baseline;", true ); //$NON-NLS-1$ //$NON-NLS-2$ */ IStyle style; StringBuffer styleBuffer = new StringBuffer( ); if ( report == null ) { logger.log( Level.WARNING, "[HTMLReportEmitter] Report object is null." ); //$NON-NLS-1$ } else { AttributeBuilder.buildStyle( styleBuffer, report.getNonInheritableDefaultStyle( ), this ); writer.style( "*", styleBuffer.toString( ), true ); //$NON-NLS-1$ ArrayList styleList = new ArrayList( ); int styleNum = 0; int m; for ( int n = 0; n < report.getStyleCount( ); n++ ) { styleBuffer.delete( 0, styleBuffer.capacity( ) ); style = report.getStyle( n ); if ( style != null ) { if ( style.isEmpty( ) ) { styleNameMapping.put( style.getName( ), null ); } else { IStyle tempStyle; for ( m = 0; m < styleNum; m++ ) { tempStyle = (IStyle) styleList.get( m ); if ( style.isSameStyle( tempStyle ) ) { styleNameMapping.put( style.getName( ), tempStyle.getName( ) ); break; } } if ( m == styleNum ) { AttributeBuilder.buildStyle( styleBuffer, style, this ); if ( styleBuffer.length( ) > 0 ) { styleList.add( style ); styleNum++; styleNameMapping.put( style.getName( ), style .getName( ) ); writer.style( style.getName( ), styleBuffer .toString( ), false ); } else { styleNameMapping.put( style.getName( ), null ); } } } } } } writer.closeTag( HTMLTags.TAG_STYLE ); fixTransparentPNG( ); writer.closeTag( HTMLTags.TAG_HEAD ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/4f4267c92561a16264f8aa745a0b651dae7e2da0/HTMLReportEmitter.java/clean/engine/org.eclipse.birt.report.engine.emitter.html/src/org/eclipse/birt/report/engine/emitter/html/HTMLReportEmitter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
787,
4820,
12,
467,
4820,
1350,
2605,
262,
202,
95,
202,
202,
4901,
18,
1330,
12,
4557,
18,
42,
3740,
16,
5158,
4870,
4820,
13476,
65,
3603,
11520,
1199,
11272,
4329,
399... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
787,
4820,
12,
467,
4820,
1350,
2605,
262,
202,
95,
202,
202,
4901,
18,
1330,
12,
4557,
18,
42,
3740,
16,
5158,
4870,
4820,
13476,
65,
3603,
11520,
1199,
11272,
4329,
399... | |
RubyFixnum.newFixnum(runtime, IOModes.CREAT)); | runtime.newFixnum(IOModes.CREAT)); | public static RubyClass createFileClass(Ruby runtime) { RubyClass fileClass = runtime.defineClass("File", runtime.getClasses().getIoClass()); RubyString separator = RubyString.newString(runtime, separator()); separator.freeze(); fileClass.defineConstant("SEPARATOR", separator); fileClass.defineConstant("Separator", separator); RubyString altSeparator = RubyString.newString(runtime, File.separatorChar == '/' ? "\\" : "/"); altSeparator.freeze(); fileClass.defineConstant("ALT_SEPARATOR", altSeparator); RubyString pathSeparator = RubyString.newString(runtime, File.pathSeparator); pathSeparator.freeze(); fileClass.defineConstant("PATH_SEPARATOR", pathSeparator); // Create constants for open flags fileClass.setConstant("RDONLY", RubyFixnum.newFixnum(runtime, IOModes.RDONLY)); fileClass.setConstant("WRONLY", RubyFixnum.newFixnum(runtime, IOModes.WRONLY)); fileClass.setConstant("RDWR", RubyFixnum.newFixnum(runtime, IOModes.RDWR)); fileClass.setConstant("CREAT", RubyFixnum.newFixnum(runtime, IOModes.CREAT)); fileClass.setConstant("EXCL", RubyFixnum.newFixnum(runtime, IOModes.EXCL)); fileClass.setConstant("NOCTTY", RubyFixnum.newFixnum(runtime, IOModes.NOCTTY)); fileClass.setConstant("TRUNC", RubyFixnum.newFixnum(runtime, IOModes.TRUNC)); fileClass.setConstant("APPEND", RubyFixnum.newFixnum(runtime, IOModes.APPEND)); fileClass.setConstant("NONBLOCK", RubyFixnum.newFixnum(runtime, IOModes.NONBLOCK)); CallbackFactory callbackFactory = runtime.callbackFactory(); fileClass.extendObject(runtime.getClasses().getFileTestModule()); fileClass.defineSingletonMethod("new", callbackFactory.getOptSingletonMethod(RubyFile.class, "newInstance")); fileClass.defineSingletonMethod("open", callbackFactory.getOptSingletonMethod(RubyFile.class, "open")); fileClass.defineSingletonMethod("chmod", callbackFactory.getOptSingletonMethod(RubyFile.class, "chmod", RubyInteger.class)); fileClass.defineSingletonMethod("lstat", callbackFactory.getSingletonMethod(RubyFile.class, "lstat", RubyString.class)); fileClass.defineSingletonMethod("expand_path", callbackFactory.getOptSingletonMethod(RubyFile.class, "expand_path")); fileClass.defineSingletonMethod("unlink", callbackFactory.getOptSingletonMethod(RubyFile.class, "unlink")); fileClass.defineSingletonMethod("rename", callbackFactory.getSingletonMethod(RubyFile.class, "rename", IRubyObject.class, IRubyObject.class)); fileClass.defineSingletonMethod("delete", callbackFactory.getOptSingletonMethod(RubyFile.class, "unlink")); fileClass.defineSingletonMethod("dirname", callbackFactory.getSingletonMethod(RubyFile.class, "dirname", RubyString.class)); fileClass.defineSingletonMethod("join", callbackFactory.getOptSingletonMethod(RubyFile.class, "join")); fileClass.defineSingletonMethod("basename", callbackFactory.getOptSingletonMethod(RubyFile.class, "basename")); fileClass.defineSingletonMethod("truncate", callbackFactory.getSingletonMethod(RubyFile.class, "truncate", RubyString.class, RubyFixnum.class)); fileClass.defineMethod("initialize", callbackFactory.getOptMethod(RubyFile.class, "initialize")); fileClass.defineMethod("truncate", callbackFactory.getMethod(RubyFile.class, "truncate", RubyFixnum.class)); // Works around a strange-ish implementation that uses a static method on the superclass. // It broke when moved to indexed callbacks, so added this line: fileClass.defineMethod("print", callbackFactory.getOptSingletonMethod(RubyIO.class, "print")); return fileClass; } | 46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyFile.java/clean/src/org/jruby/RubyFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
21266,
797,
12,
54,
10340,
3099,
13,
288,
3639,
19817,
797,
585,
797,
273,
3099,
18,
11255,
797,
2932,
812,
3113,
1171,
3099,
18,
588,
4818,
7675,
588,
15963,
797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
21266,
797,
12,
54,
10340,
3099,
13,
288,
3639,
19817,
797,
585,
797,
273,
3099,
18,
11255,
797,
2932,
812,
3113,
1171,
3099,
18,
588,
4818,
7675,
588,
15963,
797,
... |
(">:".equals(inner) && type.symbol() == global.definitions.ALL_CLASS)) | (" >: ".equals(inner) && type.symbol() == global.definitions.ALL_CLASS)) | public static MySymbolTablePrinter makeHTML(final HTMLGenerator htmlGenerator, final Page page, final SymbolBooleanFunction isDocumented) { return new MySymbolTablePrinter(page.getCodePrinter()) { public void printSymbol(Symbol sym, boolean addLink) { String name = sym.nameString(); // remove the leading "?" for names that come from attributes if (name.startsWith("?")) name = name.substring(1); if (global.debug) name = sym.name.toString(); if (isDocumented.apply(sym)) if (addLink) page.printAhref(htmlGenerator.definitionURI(sym, page).toString(), page.destinationFrame, name); else { page.printOTag("em"); page.print(name); page.printCTag("em"); } else page.print(name); } public Type getTypeToPrintForPrefix(Type prefix/*, sym*/) { while (true) { Type result = getTypeToPrintForPrefix0(prefix); if (result == prefix || result == null) { return cleanPrefix(result, global, isDocumented); } prefix = result; } } protected String INNER_LT = "<:"; public String getSymbolInnerString(Symbol symbol) { if (symbol.kind == Kinds.TYPE) return INNER_LT; // HTML encoded "<:" symbol else return super.getSymbolInnerString(symbol); } public SymbolTablePrinter printType(Type type, String inner) { if ((INNER_LT.equals(inner) && type.symbol() == global.definitions.ANY_CLASS) || (">:".equals(inner) && type.symbol() == global.definitions.ALL_CLASS)) return this; else { printType0(getTypeToPrintForType(type), inner); return this; } } }; } | 49529 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49529/ed607f9e0045285ac104e336231092c0be4e132c/SymbolTablePrinterFactory.java/buggy/sources/scala/tools/scaladoc/SymbolTablePrinterFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
8005,
5335,
1388,
12149,
1221,
4870,
12,
6385,
3982,
3908,
1729,
3908,
16,
4766,
7734,
727,
3460,
1363,
16,
4766,
7734,
727,
8565,
5507,
2083,
353,
2519,
329,
13,
288,
202,
246... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8005,
5335,
1388,
12149,
1221,
4870,
12,
6385,
3982,
3908,
1729,
3908,
16,
4766,
7734,
727,
3460,
1363,
16,
4766,
7734,
727,
8565,
5507,
2083,
353,
2519,
329,
13,
288,
202,
246... |
public byte[] getContent(CmsObject cms, String templateFile, String elementName, Hashtable parameters, String templateSelector) throws CmsException { // get request context and session CmsRequestContext reqCont = cms.getRequestContext(); I_CmsSession session = cms.getRequestContext().getSession(true); // define varialbes to store template and panel String template = ""; String panel; String oldPanel; int explorerSettingsValue; // clear session values on first load String initial = (String)parameters.get(C_PARA_INITIAL); if(initial != null) { // remove all session values session.removeValue("EXPLORERSETTINGS"); session.removeValue("TASKSETTINGS"); session.removeValue("USERSETTINGS"); session.removeValue("STARTSETTINGS"); session.removeValue(C_PARA_OLDPANEL); session.removeValue("lasturl"); } CmsXmlWpTemplateFile xmlTemplateDocument = new CmsXmlWpTemplateFile(cms, templateFile); // get the active panel value. This indicates which panel to be displayed. panel = (String)parameters.get(C_PARA_PANEL); // check if the submit or ok button is selected. If so, update all values if((parameters.get(C_PARA_SUBMIT) != null) || (parameters.get(C_PARA_OK) != null)) { // get the data values form the active panel and store them in the session. // this is nescessary to save this data in the next step. if(panel != null) { // the active panel is the explorer settings, save its data if(panel.equals(C_PANEL_EXPLORER)) { int explorerSettings = getExplorerSettings(parameters); session.putValue(C_PARA_EXPLORERSETTINGS, new Integer(explorerSettings).toString()); } // the active panel is the task settings, save its data if(panel.equals(C_PANEL_TASK)) { Hashtable taskSettings = getTaskSettings(parameters, session); if(taskSettings != null) { session.putValue(C_PARA_TASKSETTINGS, taskSettings); } } // the active panel is the starup settings, save its data if(panel.equals(C_PANEL_START)) { Hashtable startSettings = getStartSettings(cms, parameters); if(startSettings != null) { session.putValue(C_PARA_STARTSETTINGS, startSettings); } } // the active panel is the user settings, save its data if(panel.equals(C_PANEL_USER)) { /* String userSettings=getUserSettings(parameters); if (userSettings != null) { session.putValue(C_PARA_USERSETTINGS,userSettings); }*/ } } // update the actual user data with those values taken from the preferences // panles. All data set in the panels is now available in the session, so // check which data is available and set it. // now update the explorer settings String explorerSettings = (String)session.getValue(C_PARA_EXPLORERSETTINGS); if(explorerSettings != null) { reqCont.currentUser().setAdditionalInfo(C_ADDITIONAL_INFO_EXPLORERSETTINGS, explorerSettings); } // now update the task settings Hashtable taskSettings = (Hashtable)session.getValue(C_PARA_TASKSETTINGS); if(taskSettings != null) { reqCont.currentUser().setAdditionalInfo(C_ADDITIONAL_INFO_TASKSETTINGS, taskSettings); } // now update the start settings Hashtable startSettings = (Hashtable)session.getValue(C_PARA_STARTSETTINGS); if(startSettings != null) { cms.getRequestContext().currentUser().setAdditionalInfo(C_ADDITIONAL_INFO_STARTSETTINGS, startSettings); String defaultGroup = (String)startSettings.get(C_START_DEFAULTGROUP); reqCont.currentUser().setDefaultGroup(cms.readGroup(defaultGroup)); } // now update the user settings String userSettings = (String)session.getValue(C_PARA_USERSETTINGS); if(userSettings != null) { // reqCont.setCurrentGroup(userSettings); } // finally store the updated user object in the database cms.writeUser(reqCont.currentUser()); } // check which panel of the preferences should be displayed and update the // data on this panel with the default values or values already set in the // preferences before. if(panel != null) { // set the template to the active panel. // by doing this, the correct panel will be displayed when the template // is processed. template = panel; if(panel.equals(C_PANEL_EXPLORER)) { // this is the panel for setting the explorer preferences setExplorerSettings(session, parameters, reqCont, xmlTemplateDocument); } else { if(panel.equals(C_PANEL_TASK)) { // this is the panel for setting the task preferences setTaskSettings(session, parameters, reqCont, xmlTemplateDocument); } else { if(panel.equals(C_PANEL_START)) { // this is the panel for setting the start preferences setStartSettings(session, parameters, reqCont, xmlTemplateDocument); } else { if(panel.equals(C_PANEL_USER)) { // this is the panel for setting the user preferences setUserSettings(session, parameters, reqCont, xmlTemplateDocument); } } } } // finally store the given data into the session oldPanel = (String)session.getValue(C_PARA_OLDPANEL); if(oldPanel != null) { // the previous panel was the explorer panel, save all the data form there if(oldPanel.equals("explorer")) { int explorerSettings = getExplorerSettings(parameters); session.putValue("EXPLORERSETTINGS", new Integer(explorerSettings).toString()); } // the previous panel was the task panel, save all the data form there if(oldPanel.equals("task")) { Hashtable taskSettings = getTaskSettings(parameters, session); if(taskSettings != null) { session.putValue("TASKSETTINGS", taskSettings); } } // the previous panel was the user panel, save all the data form there if(oldPanel.equals("user")) { /* String userSettings=getUserSettings(parameters); if (userSettings != null) { session.putValue("USERSETTINGS",userSettings); }*/ } // the previous panel was the start panel, save all the data form there if(oldPanel.equals("start")) { Hashtable startSettings = getStartSettings(cms, parameters); if(startSettings != null) { session.putValue("STARTSETTINGS", startSettings); } } } session.putValue(C_PARA_OLDPANEL, panel); } // if the OK or cancel buttons are pressed return to the explorer and clear // the data in the session. if((parameters.get("OK") != null) || (parameters.get("CANCEL") != null)) { session.removeValue("EXPLORERSETTINGS"); session.removeValue("TASKSETTINGS"); session.removeValue("USERSETTINGS"); session.removeValue("STARTSETTINGS"); session.removeValue(C_PARA_OLDPANEL); try { cms.getRequestContext().getResponse().sendCmsRedirect(getConfigFile(cms).getWorkplaceActionPath() + C_WP_RELOAD); } catch(Exception e) { throw new CmsException("Redirect fails :" + getConfigFile(cms).getWorkplaceActionPath() + C_WP_RELOAD, CmsException.C_UNKNOWN_EXCEPTION, e); } return null; } return startProcessing(cms, xmlTemplateDocument, "", parameters, template); } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/e4f91e520eaf4e85154410f66713717665141a5b/CmsPreferencesPanels.java/clean/src/com/opencms/workplace/CmsPreferencesPanels.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1160,
8526,
5154,
12,
4747,
921,
6166,
16,
514,
28215,
16,
514,
14453,
16,
2398,
18559,
1472,
16,
514,
1542,
4320,
13,
1216,
11228,
288,
7734,
368,
336,
590,
819,
471,
1339,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1160,
8526,
5154,
12,
4747,
921,
6166,
16,
514,
28215,
16,
514,
14453,
16,
2398,
18559,
1472,
16,
514,
1542,
4320,
13,
1216,
11228,
288,
7734,
368,
336,
590,
819,
471,
1339,
3639,
... | ||
public void insertMessage( Message msg, long seq ) { synchronized( messages ) { int size = messages.size(); int index = 0; long this_seq = -1; | public void insertMessage(Message msg, long seq) { synchronized(messages) { int size=messages.size(); int index=0; long this_seq=-1; | public void insertMessage( Message msg, long seq ) { synchronized( messages ) { int size = messages.size(); int index = 0; long this_seq = -1; // used to prevent duplicate messages being stored // find the index where this message should be inserted try { while( (index < size) && ((this_seq = ((Entry) (messages.elementAt(index))).getSeq()) < seq) ) { index++; } } catch ( java.lang.ClassCastException e ) { log.error( "Error: (TOTAL_OLD) SavedMessages.insertMessage() - ClassCastException: could not cast element of \"messages\" to an Entry (index " + index + ')' ); return; } // check that the sequences aren't the same (don't want duplicates) if ( this_seq == seq ) { log.error( "SavedMessages.insertMessage() - sequence " + seq + " already exists in saved messages. Message NOT saved." ); return; } messages.insertElementAt( new Entry( msg, seq ), index ); } // synchronized( messages ) } | 47927 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47927/5ad015d9a78e1da3350d9b398b46b2f5d4508564/TOTAL_OLD.java/clean/src/org/jgroups/protocols/TOTAL_OLD.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2243,
1079,
12,
2350,
1234,
16,
1525,
3833,
262,
288,
202,
22043,
12,
2743,
262,
288,
202,
565,
509,
963,
273,
2743,
18,
1467,
5621,
202,
565,
509,
770,
273,
374,
31,
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,
377,
1071,
918,
2243,
1079,
12,
2350,
1234,
16,
1525,
3833,
262,
288,
202,
22043,
12,
2743,
262,
288,
202,
565,
509,
963,
273,
2743,
18,
1467,
5621,
202,
565,
509,
770,
273,
374,
31,
202,
... |
IdFunction f = new IdFunction(obj, FTAG, Id_JavaAdapter, "JavaAdapter", 1); f.enableConstructorUsage(); f.defineAsScopeProperty(scope, sealed); | IdFunction ctor = new IdFunction(obj, FTAG, Id_JavaAdapter, "JavaAdapter", 1, scope); ctor.markAsConstructor(null); ctor.exportAsScopeProperty(sealed); | public static void init(Context cx, Scriptable scope, boolean sealed) { JavaAdapter obj = new JavaAdapter(); IdFunction f = new IdFunction(obj, FTAG, Id_JavaAdapter, "JavaAdapter", 1); f.enableConstructorUsage(); f.defineAsScopeProperty(scope, sealed); } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/204d41ff43a8af9396620af92205c720e2d60c5c/JavaAdapter.java/buggy/js/rhino/src/org/mozilla/javascript/JavaAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1208,
12,
1042,
9494,
16,
22780,
2146,
16,
1250,
695,
18931,
13,
565,
288,
3639,
5110,
4216,
1081,
273,
394,
5110,
4216,
5621,
3639,
3124,
2083,
284,
273,
394,
3124,
2083,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
12,
1042,
9494,
16,
22780,
2146,
16,
1250,
695,
18931,
13,
565,
288,
3639,
5110,
4216,
1081,
273,
394,
5110,
4216,
5621,
3639,
3124,
2083,
284,
273,
394,
3124,
2083,... |
if (a1 == 5 && a2 == 5){ | if (a1 >= 5 && a2 >= 5){ | public void tallyCCInd(byte a1, byte a2, int cc){ //case = 0, control = 1 for int cc if (a1 == 5 && a2 == 5){ counts[cc][0]++; counts[cc][1]++; }else{ //seed the alleles as soon as they're found if (allele1 == 0){ allele1 = a1; } if (a1 != 0){ if (a1 == allele1){ counts[cc][0] ++; }else{ counts[cc][1] ++; } } if (a2 != 0){ if (a2 == allele1){ counts[cc][0]++; }else{ counts[cc][1]++; } } } } | 51222 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51222/cf3c64621895b781aae9f63c8ec7a930c396443a/TDTResult.java/buggy/edu/mit/wi/haploview/TDTResult.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
268,
1230,
6743,
3866,
12,
7229,
279,
21,
16,
1160,
279,
22,
16,
509,
4946,
15329,
3639,
368,
3593,
273,
374,
16,
3325,
273,
404,
364,
509,
4946,
3639,
309,
261,
69,
21,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
268,
1230,
6743,
3866,
12,
7229,
279,
21,
16,
1160,
279,
22,
16,
509,
4946,
15329,
3639,
368,
3593,
273,
374,
16,
3325,
273,
404,
364,
509,
4946,
3639,
309,
261,
69,
21,
15... |
label.setToolTipText(getToolTipText(label)); | addHoverListener(label); | protected void createLabel(Composite parent, FormToolkit toolkit) { Label label = toolkit.createLabel(parent, getPropertyLabel(), SWT.NULL); label.setForeground(toolkit.getColors().getColor(FormColors.TITLE)); label.setToolTipText(getToolTipText(label)); } | 14404 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14404/79541b29700b7cb737c717b919abc3e54eaef4aa/ExtensionAttributeRow.java/buggy/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/rows/ExtensionAttributeRow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
752,
2224,
12,
9400,
982,
16,
2748,
6364,
8691,
5226,
8691,
13,
288,
202,
202,
2224,
1433,
273,
5226,
8691,
18,
2640,
2224,
12,
2938,
16,
3911,
2224,
9334,
348,
8588,
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,
1117,
918,
752,
2224,
12,
9400,
982,
16,
2748,
6364,
8691,
5226,
8691,
13,
288,
202,
202,
2224,
1433,
273,
5226,
8691,
18,
2640,
2224,
12,
2938,
16,
3911,
2224,
9334,
348,
8588,
18... |
if (!(obj instanceof IFileEditorInput)) { | if (!(obj instanceof IFileEditorInput)) { | public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof IFileEditorInput)) { return false; } IFileEditorInput other = (IFileEditorInput) obj; return file.equals(other.getFile()); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/13f79d90ed68231f9aed2b1218f7d46854e8288b/FileEditorInput.java/clean/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/part/FileEditorInput.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1606,
12,
921,
1081,
13,
288,
3639,
309,
261,
2211,
422,
1081,
13,
288,
1082,
202,
2463,
638,
31,
202,
202,
97,
3639,
309,
16051,
12,
2603,
1276,
467,
812,
6946,
1210,
3719,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1606,
12,
921,
1081,
13,
288,
3639,
309,
261,
2211,
422,
1081,
13,
288,
1082,
202,
2463,
638,
31,
202,
202,
97,
3639,
309,
16051,
12,
2603,
1276,
467,
812,
6946,
1210,
3719,... |
Country country = postalCode.getCountry(); | Country country = primaryAddress.getCountry(); | protected void presentateUserInfo(IWContext iwc) throws RemoteException { addSeperator(iwrb.getLocalizedString("mbe.user_info","User info")); UserBusiness userService = getUserService(iwc); Page p = this.getParentPage(); if (p != null) { Script S = p.getAssociatedScript(); S.addFunction("checkInfoForm", getInfoCheckScript()); } Table infoTable = new Table(); Table addressTable = new Table(); int row = 1; addressTable.setCellspacing(4); Address primaryAddress = null; Address coAddress = null; UserStatus deceasedStatus = null; Email email = null; if (user != null) { primaryAddress = userService.getUsersMainAddress(user); coAddress = userService.getUsersCoAddress(user); deceasedStatus = getUserStatusService(iwc).getDeceasedUserStatus((Integer) user.getPrimaryKey()); email = userService.getUserMail(user); } if (!isNewUserView()) { //deceased layout section // TODO check for deceased date Text tDeceased = new Text(iwrb.getLocalizedString("mbe.deceased", "Deceased")); tDeceased.setStyleClass(deceasedFontStyleName); addressTable.add(tDeceased, 1, row); if (deceasedStatus != null) { DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, iwc.getCurrentLocale()); Text tDeceasedDate = new Text(df.format(deceasedStatus.getDateFrom())); setStyle(tDeceasedDate, STYLENAME_DECEASED); addressTable.add(tDeceasedDate, 2, row); } else { DateInput deceasedInput = new DateInput(prm_deceased_date); deceasedInput.setToDisplayDayLast(true); IWTimestamp today = IWTimestamp.RightNow(); deceasedInput.setLatestPossibleDate( today.getDate(), iwrb.getLocalizedString( "mbe.deceased_date_warning", "Please do not register deceased date in the future")); deceasedInput.setYearRange(today.getYear() - 5, today.getYear()); deceasedInput.setStyleClass(interfaceStyleName); addressTable.add(deceasedInput, 2, row); } row++; } addToMainPart(addressTable); addToMainPart(Text.getBreak()); // address layout section Text tAddress = new Text(iwrb.getLocalizedString("mbe.address", "Address")); Text tPrimary = new Text(iwrb.getLocalizedString("mbe.address.main", "Main")); Text tCO = new Text(iwrb.getLocalizedString("mbe.address.co", "C/O")); Text tStreetAddress = new Text(iwrb.getLocalizedString("mbe.address.street", "Street")); Text tPostalName = new Text(iwrb.getLocalizedString("mbe.address.postal.name", "Postal name")); Text tPostalCode = new Text(iwrb.getLocalizedString("mbe.address.postal.code", "Postal code")); Text tCommune = new Text(iwrb.getLocalizedString("mbe.commune", "Commune")); Text tCountry = new Text(iwrb.getLocalizedString("mbe.address.country", "Country")); tAddress.setStyleClass(headerFontStyleName); tPrimary.setStyleClass(headerFontStyleName); tCO.setStyleClass(headerFontStyleName); tStreetAddress.setStyleClass(headerFontStyleName); tPostalName.setStyleClass(headerFontStyleName); tPostalCode.setStyleClass(headerFontStyleName); tCountry.setStyleClass(headerFontStyleName); tCommune.setStyleClass(headerFontStyleName); addressTable.add(tAddress, 2, row); addressTable.add(tCO, 3, row); row++; int startRow = row; addressTable.add(tStreetAddress, 1, row++); addressTable.add(tPostalCode, 1, row++); addressTable.add(tPostalName, 1, row++); addressTable.add(tCommune, 1, row++); addressTable.add(tCountry, 1, row++); Country defaultCountry = null; Commune defaultCommune = null; Commune primaryCommune = null; Commune coCommune = null; try { defaultCommune = getCommuneBusiness(iwc).getCommuneHome().findDefaultCommune(); } catch (IDOLookupException e3) { e3.printStackTrace(); } catch (RemoteException e3) { e3.printStackTrace(); } catch (FinderException e3) { System.out.println("[UserEditor] Default Commune not found"); //e3.printStackTrace(); } try { defaultCountry = getCountryHome().findByIsoAbbreviation(iwc.getApplicationSettings().getDefaultLocale().getCountry()); } catch (RemoteException e1) { e1.printStackTrace(); } catch (MissingResourceException e1) { e1.printStackTrace(); } catch (FinderException e1) { System.out.println("[UserEditor] Default Country not found"); //e1.printStackTrace(); } TextInput primaryStreetAddressInput = new TextInput(prm_mainaddress_street); primaryStreetAddressInput.setStyleClass(interfaceStyleName); primaryStreetAddressInput.setLength(streetInputLength); primaryStreetAddressInput.keepStatusOnAction(isNewUserView()); TextInput primaryPostalCodeInput = new TextInput(prm_mainaddress_postal_code); primaryPostalCodeInput.setStyleClass(interfaceStyleName); primaryPostalCodeInput.setLength(postalcodeInputLength); primaryPostalCodeInput.keepStatusOnAction(isNewUserView()); TextInput primaryPostalNameInput = new TextInput(prm_mainaddress_postal_name); primaryPostalNameInput.setStyleClass(interfaceStyleName); primaryPostalNameInput.setLength(postalnameInputLength); primaryPostalNameInput.keepStatusOnAction(isNewUserView()); DropdownMenu primaryCommunes = new DropdownMenu(prm_maincommune_id); primaryCommunes.setStyleClass(interfaceStyleName); primaryCommunes.keepStatusOnAction(isNewUserView()); SelectorUtility su = new SelectorUtility(); su.getSelectorFromIDOEntities(primaryCommunes, getCommuneBusiness(iwc).getCommunes(), "getCommuneName"); CountryDropdownMenu primaryCountryInput = new CountryDropdownMenu(prm_mainaddress_country); primaryCountryInput.setStyleClass(interfaceStyleName); primaryCountryInput.keepStatusOnAction(isNewUserView()); TextInput coStreetAddressInput = new TextInput(prm_coaddress_street); coStreetAddressInput.setStyleClass(interfaceStyleName); coStreetAddressInput.setLength(streetInputLength); coStreetAddressInput.keepStatusOnAction(isNewUserView()); TextInput coPostalCodeInput = new TextInput(prm_coaddress_postal_code); coPostalCodeInput.setStyleClass(interfaceStyleName); coPostalCodeInput.setLength(postalcodeInputLength); coPostalCodeInput.keepStatusOnAction(isNewUserView()); TextInput coPostalNameInput = new TextInput(prm_coaddress_postal_name); coPostalNameInput.setStyleClass(interfaceStyleName); coPostalNameInput.setLength(postalnameInputLength); coPostalNameInput.keepStatusOnAction(isNewUserView()); DropdownMenu coCommunes = new DropdownMenu(prm_cocommune_id); su.getSelectorFromIDOEntities(coCommunes, getCommuneBusiness(iwc).getCommunes(), "getCommuneName"); coCommunes.setStyleClass(interfaceStyleName); coCommunes.keepStatusOnAction(isNewUserView()); CountryDropdownMenu coCountryInput = (CountryDropdownMenu) primaryCountryInput.clone(); coCountryInput.setName(prm_coaddress_country); coCountryInput.setStyleClass(interfaceStyleName); coCountryInput.keepStatusOnAction(isNewUserView()); /* PostalCodeDropdownMenu coPostalAddressInput = new PostalCodeDropdownMenu(); coPostalAddressInput.setName(prm_coaddress_postal); coPostalAddressInput.setStyleClass(interfaceStyleName); coPostalAddressInput.setShowCountry(true); */ if (defaultCountry != null) { primaryCountryInput.setSelectedCountry(defaultCountry); coCountryInput.setSelectedCountry(defaultCountry); //primaryPostalAddressInput.setCountry(defaultCountry); //coPostalAddressInput.setCountry(defaultCountry); } if (defaultCommune != null && user == null) { primaryCommunes.setSelectedElement((defaultCommune).getPrimaryKey().toString()); coCommunes.setSelectedElement((defaultCommune).getPrimaryKey().toString()); } //addressTable.add(tPrimary, 2, 2); row = startRow; addressTable.add(primaryStreetAddressInput, 2, row++); addressTable.add(primaryPostalCodeInput, 2, row++); addressTable.add(primaryPostalNameInput, 2, row++); addressTable.add(primaryCommunes, 2, row++); addressTable.add(primaryCountryInput, 2, row++); //row++; row = startRow; addressTable.add(coStreetAddressInput, 3, row++); addressTable.add(coPostalCodeInput, 3, row++); addressTable.add(coPostalNameInput, 3, row++); addressTable.add(coCommunes, 3, row++); addressTable.add(coCountryInput, 3, row++); //row++; if (primaryAddress != null) { primaryStreetAddressInput.setContent(primaryAddress.getStreetAddress()); addressTable.add(getOldParameter(prm_mainaddress_street, primaryAddress.getStreetAddress())); try { PostalCode postalCode = primaryAddress.getPostalCode(); //System.err.println("postal ID: "+postalCode.getPrimaryKey().toString()); if (postalCode != null) { if (postalCode.getPostalCode() != null) primaryPostalCodeInput.setContent(postalCode.getPostalCode()); if (postalCode.getName() != null) primaryPostalNameInput.setContent(postalCode.getName()); addressTable.add(new Parameter(prm_primaddress_postal_id, postalCode.getPrimaryKey().toString())); addressTable.add(getOldParameter(prm_mainaddress_postal_code, postalCode.getPostalCode())); addressTable.add(getOldParameter(prm_mainaddress_postal_name, postalCode.getName())); Country country = postalCode.getCountry(); if (country != null) { //primaryCountryInput.setSelectedElement(country.getPrimaryKey().toString()); primaryCountryInput.setSelectedCountry(country); addressTable.add(getOldParameter(prm_mainaddress_country, country.getPrimaryKey().toString())); } /*else if(defaultCountry != null){ //primaryCountryInput.setSelectedElement(defaultCountry.getPrimaryKey().toString()); primaryCountryInput.setSelectedCountry(defaultCountry); }*/ } if (primaryAddress.getCommuneID() > 0) { addressTable.add(getOldParameter(prm_maincommune_id, Integer.toString(primaryAddress.getCommuneID()))); primaryCommunes.setSelectedElement(primaryAddress.getCommuneID()); } else { primaryCommune = getCommune(iwc, user); if (primaryCommune != null) { primaryCommunes.setSelectedElement(primaryCommune.getPrimaryKey().toString()); } } } catch (Exception e2) { } //primaryPostalAddressInput.setSelectedElement(primaryAddress.getPostalCodeID()); } if (coAddress != null) { coStreetAddressInput.setContent(coAddress.getStreetAddress()); addressTable.add(getOldParameter(prm_coaddress_street, coAddress.getStreetAddress())); try { PostalCode postalCode = coAddress.getPostalCode(); if (postalCode != null) { if (postalCode.getPostalCode() != null) coPostalCodeInput.setContent(postalCode.getPostalCode()); if (postalCode.getName() != null) coPostalNameInput.setContent(postalCode.getName()); addressTable.add(new Parameter(prm_coaddress_postal_id, postalCode.getPrimaryKey().toString())); addressTable.add(getOldParameter(prm_coaddress_postal_code, postalCode.getPostalCode())); addressTable.add(getOldParameter(prm_coaddress_postal_name, postalCode.getName())); Country country = postalCode.getCountry(); if (country != null) { coCountryInput.setSelectedCountry(country); addressTable.add(getOldParameter(prm_coaddress_country_id, country.getPrimaryKey().toString())); } /*else if(defaultCountry != null){ coCountryInput.setSelectedCountry(defaultCountry); }*/ if (coAddress.getCommuneID() > 0) { addressTable.add(getOldParameter(prm_cocommune_id, Integer.toString(coAddress.getCommuneID()))); coCommunes.setSelectedElement(coAddress.getCommuneID()); } else { coCommune = getCommune(iwc, user); if (coCommune != null) { coCommunes.setSelectedElement(coCommune.getPrimaryKey().toString()); } } } } catch (Exception e2) { } } row++; // phone layout section Text tPhone = new Text(iwrb.getLocalizedString("mbe.phone", "Phone")); tPhone.setStyleClass(headerFontStyleName); TextInput phoneInput = new TextInput(prm_main_phone); phoneInput.setLength(phoneInputLength); phoneInput.setStyleClass(interfaceStyleName); phoneInput.keepStatusOnAction(isNewUserView()); addressTable.add(tPhone, 1, row); addressTable.add(phoneInput, 2, row++); try { Phone phone = userService.getUsersHomePhone(user); if (phone != null && phone.getNumber()!=null) { phoneInput.setContent(phone.getNumber()); addressTable.add(getOldParameter(prm_main_phone, phone.getNumber())); } } catch (NoPhoneFoundException e) { } row++; // email layout section Text tEmail = new Text(iwrb.getLocalizedString("mbe.email", "Email")); tEmail.setStyleClass(headerFontStyleName); TextInput emailInput = new TextInput(prm_email_address); emailInput.setStyleClass(interfaceStyleName); emailInput.setLength(emailInputLength); emailInput.keepStatusOnAction(isNewUserView()); emailInput.setAsEmail(); addressTable.add(tEmail, 1, row); addressTable.add(emailInput, 2, row++); if (email != null && email.getEmailAddress()!=null) { emailInput.setContent(email.getEmailAddress()); addressTable.add(getOldParameter(prm_email_address, email.getEmailAddress())); } } | 57353 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57353/4eb2f431282550260fe064d81f87eb137d62a77a/UserEditor.java/clean/src/java/is/idega/idegaweb/member/presentation/UserEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
3430,
340,
21015,
12,
45,
59,
1042,
25522,
71,
13,
1216,
18361,
288,
202,
202,
1289,
1761,
457,
639,
12,
22315,
6731,
18,
588,
2042,
1235,
780,
2932,
1627,
73,
18,
1355,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3430,
340,
21015,
12,
45,
59,
1042,
25522,
71,
13,
1216,
18361,
288,
202,
202,
1289,
1761,
457,
639,
12,
22315,
6731,
18,
588,
2042,
1235,
780,
2932,
1627,
73,
18,
1355,... |
if (value > Short.MAX_VALUE || value < Short.MIN_VALUE) | if (Math.abs(value) > Short.MAX_VALUE) | void setInteger(int value) throws java.sql.SQLException { // check if value is within bounds if (value > Short.MAX_VALUE || value < Short.MIN_VALUE) throw (SQLException)createException( LONG_CONVERSION_ERROR).fillInStackTrace(); setShort((short)value); } | 6960 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6960/27cb6a55a119953d15371beb58a710c958cb4e72/FBShortField.java/clean/src/org/firebirdsql/jdbc/FBShortField.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
444,
4522,
12,
474,
460,
13,
1216,
2252,
18,
4669,
18,
23116,
288,
3639,
368,
866,
309,
460,
353,
3470,
4972,
3639,
309,
261,
1132,
405,
7925,
18,
6694,
67,
4051,
747,
5411,
460,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
444,
4522,
12,
474,
460,
13,
1216,
2252,
18,
4669,
18,
23116,
288,
3639,
368,
866,
309,
460,
353,
3470,
4972,
3639,
309,
261,
1132,
405,
7925,
18,
6694,
67,
4051,
747,
5411,
460,
... |
String encoding = connection.getEncoding(); if (encoding == null) return new String(this_row[columnIndex - 1]); else { try { return new String(this_row[columnIndex - 1], encoding); } catch (UnsupportedEncodingException unse) { throw new PSQLException("postgresql.res.encoding", unse); } } | Encoding encoding = connection.getEncoding(); return encoding.decode(this_row[columnIndex - 1]); | public String getString(int columnIndex) throws SQLException { if (columnIndex < 1 || columnIndex > fields.length) throw new PSQLException("postgresql.res.colrange"); wasNullFlag = (this_row[columnIndex - 1] == null); if(wasNullFlag) return null; String encoding = connection.getEncoding(); if (encoding == null) return new String(this_row[columnIndex - 1]); else { try { return new String(this_row[columnIndex - 1], encoding); } catch (UnsupportedEncodingException unse) { throw new PSQLException("postgresql.res.encoding", unse); } } } | 46597 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46597/ff21a8e5c86457e205ff7c598b930efd711cb2dc/ResultSet.java/clean/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
4997,
12,
474,
14882,
13,
1216,
6483,
225,
288,
565,
309,
261,
2827,
1016,
411,
404,
747,
14882,
405,
1466,
18,
2469,
13,
1377,
604,
394,
453,
23116,
2932,
2767,
24330,
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,
282,
1071,
514,
4997,
12,
474,
14882,
13,
1216,
6483,
225,
288,
565,
309,
261,
2827,
1016,
411,
404,
747,
14882,
405,
1466,
18,
2469,
13,
1377,
604,
394,
453,
23116,
2932,
2767,
24330,
18,
4... |
if (actual == Long.TYPE || actual == Long.class) { return requested == Long.TYPE || requested == Long.class; | if (actual == long.class || actual == Long.class) { return requested == long.class || requested == Long.class; | public static boolean isAssignableFrom(Class actual, Class requested) { if (actual == Character.TYPE || actual == Character.class) { return requested == Character.TYPE || requested == Character.class; } if (actual == Double.TYPE || actual == Double.class) { return requested == Double.TYPE || requested == Double.class; } if (actual == Float.TYPE || actual == Float.class) { return requested == Float.TYPE || requested == Float.class; } if (actual == Integer.TYPE || actual == Integer.class) { return requested == Integer.TYPE || requested == Integer.class; } if (actual == Long.TYPE || actual == Long.class) { return requested == Long.TYPE || requested == Long.class; } if (actual == Short.TYPE || actual == Short.class) { return requested == Short.TYPE || requested == Short.class; } if (actual == Byte.TYPE || actual == Byte.class) { return requested == Byte.TYPE || requested == Byte.class; } if (actual == Boolean.TYPE || actual == Boolean.class) { return requested == Boolean.TYPE || requested == Boolean.class; } return actual.isAssignableFrom(requested); } | 9344 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9344/19c591b570f52fe96e4a4515eb7384f0feae8a47/ConstructorComponentAdapter.java/clean/trunk/java/picocontainer/src/java/org/picocontainer/defaults/ConstructorComponentAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
8917,
12,
797,
3214,
16,
1659,
3764,
13,
288,
3639,
309,
261,
18672,
422,
6577,
18,
2399,
747,
3214,
422,
6577,
18,
1106,
13,
288,
5411,
327,
3764,
422,
6577,
18,
2399,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
8917,
12,
797,
3214,
16,
1659,
3764,
13,
288,
3639,
309,
261,
18672,
422,
6577,
18,
2399,
747,
3214,
422,
6577,
18,
1106,
13,
288,
5411,
327,
3764,
422,
6577,
18,
2399,... |
final String name = SystemPropertyParameter.this.getName(); | public Calc compile(ExpCompiler compiler) { return new GenericCalc(new DummyExp(getType())) { public Calc[] getCalcs() { return new Calc[0]; } public Object evaluate(Evaluator evaluator) { final String name = SystemPropertyParameter.this.getName(); if (system) { return System.getProperty(name); } else { return MondrianProperties.instance().getProperty(name); } } }; } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/c137ac17997201652b16a35ab9683baf78ebb5cb/RolapSchemaReader.java/clean/src/main/mondrian/rolap/RolapSchemaReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
29128,
4074,
12,
2966,
9213,
5274,
13,
288,
5411,
327,
394,
7928,
25779,
12,
2704,
28622,
2966,
12,
588,
559,
1435,
3719,
288,
7734,
1071,
29128,
8526,
22433,
2143,
1435,
288,
10792,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
29128,
4074,
12,
2966,
9213,
5274,
13,
288,
5411,
327,
394,
7928,
25779,
12,
2704,
28622,
2966,
12,
588,
559,
1435,
3719,
288,
7734,
1071,
29128,
8526,
22433,
2143,
1435,
288,
10792,
... | |
Atom oAtom2 = new Atom("C2"); Atom oAtom3 = new Atom("C3"); | Atom oAtom2 = builder.newAtom("C2"); Atom oAtom3 = builder.newAtom("C3"); | public void testToString() { Strand oStrand = new Strand(); Monomer oMono1 = new Monomer(); oMono1.setMonomerName(new String("TRP279")); Monomer oMono2 = new Monomer(); oMono2.setMonomerName(new String("HOH")); Atom oAtom2 = new Atom("C2"); Atom oAtom3 = new Atom("C3"); oStrand.addAtom(oAtom2, oMono1); oStrand.addAtom(oAtom3, oMono2); Hashtable monomers = new Hashtable(); Monomer oMon = new Monomer(); oMon.setMonomerName(""); oMon.setMonomerType("UNKNOWN"); monomers.put("", oMon); monomers.put("TRP279", oMono1); monomers.put("HOH", oMono2); String description = oStrand.toString(); for (int i=0; i< description.length(); i++) { assertTrue('\n' != description.charAt(i)); assertTrue('\r' != description.charAt(i)); } } | 46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/67261c8143759a6ee4feb79dc1687d6dcfa25f40/StrandTest.java/buggy/src/org/openscience/cdk/test/StrandTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
5808,
1435,
288,
3639,
3978,
464,
320,
1585,
464,
273,
394,
3978,
464,
5621,
202,
202,
49,
14536,
320,
11415,
83,
21,
273,
394,
27082,
5621,
202,
202,
83,
11415,
83,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
5808,
1435,
288,
3639,
3978,
464,
320,
1585,
464,
273,
394,
3978,
464,
5621,
202,
202,
49,
14536,
320,
11415,
83,
21,
273,
394,
27082,
5621,
202,
202,
83,
11415,
83,
21... |
g.drawString(v.id(), x, y); | g.drawString(v.displayId(), x, y); | public void postPaint(java.awt.Graphics2D g) { if(_empty) { return; } // overridden method to paint stuff _after_ graph elements // have been drawn FontMetrics fm = g.getFontMetrics(); int fheight = fm.getAscent(); // show node name/id Iterator i =_registry.getNodeItems(); while(_settings.getBoolean(RenderSettings.SHOW_LABELS) && i.hasNext()) { if(_empty) return; // TODO: prefuse seems to use threads...? NodeItem item = (NodeItem) i.next(); PNode n = (PNode) item.getEntity(); Vertex v = n.v(); int x = 10 + (int) _registry.getNodeItem(n).getX(); int y = 10 + (int) _registry.getNodeItem(n).getY(); Rectangle rect = new Rectangle(x - 2, y - fheight, fm.stringWidth(v.id()) + 4, fheight + 2); setAlpha(g, TRANSPARENCY); g.setPaint(Color.WHITE); g.fill(rect); setAlpha(g, 1.0f); g.setPaint(Color.BLACK); g.draw(rect); g.drawString(v.id(), x, y); } // show edge length i =_registry.getEdgeItems(); double x1, y1, x2, y2; double theta; g.setPaint(Color.RED); g.setFont(new Font(g.getFont().getName(), g.getFont().getStyle(), 10)); while(_settings.getBoolean(RenderSettings.SHOW_LENGTH) && i.hasNext()) { if(_empty) return; // TODO: prefuse seems to use threads...? EdgeItem item = (EdgeItem) i.next(); PEdge p = (PEdge) item.getEntity(); PNode v1 = PNode.v2p((Vertex) p.e().getEnds().car()); PNode v2 = PNode.v2p((Vertex) p.e().getEnds().cdr()); x1 = _registry.getNodeItem(v1).getX(); y1 = _registry.getNodeItem(v1).getY(); x2 = _registry.getNodeItem(v2).getX(); y2 = _registry.getNodeItem(v2).getY(); theta = getTheta((int) x1, (int) y1, (int) x2, (int) y2); String label = "[" + p.e().length() + "]"; //g.translate((x1+x2)/2, (y1+y2)/2); //g.rotate(theta); g.drawString(label, (int) (x1 + (x2 - x1) * (3.0 / 5.0)), (int) (y1 + (y2 - y1) * (3.0 / 5.0))); //g.rotate(-theta); //g.translate(-(x1+x2)/2, -(y1+y2)/2); } /* String [][] test = {{"test", "12"}, {"\\hline",""}, {"asd","3232"}, {"\\hline",""}, {"test2","135"}}; renderTable(g, (int) getDisplayX() + 5, (int) getDisplayY() + 5, "", test); */ } | 11096 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11096/c261b7ab9a271b3bf8351f9fb37052e820284111/RenderBox.java/clean/trunk/src/nv2d/render/RenderBox.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1603,
12699,
12,
6290,
18,
2219,
88,
18,
17558,
22,
40,
314,
13,
288,
202,
202,
430,
24899,
5531,
13,
288,
1082,
202,
2463,
31,
202,
202,
97,
9506,
202,
759,
11000,
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,
225,
202,
482,
918,
1603,
12699,
12,
6290,
18,
2219,
88,
18,
17558,
22,
40,
314,
13,
288,
202,
202,
430,
24899,
5531,
13,
288,
1082,
202,
2463,
31,
202,
202,
97,
9506,
202,
759,
11000,
707... |
&& elemType.isObjectType()) | && elemType.isReferenceType()) | protected void genStringConcatenation(Context ctx, Tree[] elements) throws JCode.OffsetTooBigException { // Create string buffer ctx.code.emitNEW(JAVA_LANG_STRINGBUFFER); ctx.code.emitDUP(); ctx.code.emitINVOKESPECIAL(JAVA_LANG_STRINGBUFFER, "<init>", JMethodType.ARGLESS_VOID_FUNCTION); // Append all strings for (int i = 0; i < elements.length; ++i) { JType elemType = typeStoJ(elements[i].type); if (!elemType.equals(JObjectType.JAVA_LANG_STRING) && elemType.isObjectType()) elemType = JObjectType.JAVA_LANG_OBJECT; genLoad(ctx, elements[i], elemType); ctx.code.emitINVOKEVIRTUAL(JAVA_LANG_STRINGBUFFER, "append", new JMethodType(JAVA_LANG_STRINGBUFFER_T, new JType[] { elemType })); } // Get resulting string ctx.code.emitINVOKEVIRTUAL(JAVA_LANG_STRINGBUFFER, "toString", new JMethodType(JObjectType.JAVA_LANG_STRING, JType.EMPTY_ARRAY)); } | 32355 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/32355/b2847d55160be34f5e5c226c9e24704419057f36/GenJVM.java/buggy/sources/scalac/backend/jvm/GenJVM.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
3157,
780,
21432,
367,
12,
1042,
1103,
16,
4902,
8526,
2186,
13,
3639,
1216,
804,
1085,
18,
2335,
10703,
9901,
503,
288,
3639,
368,
1788,
533,
1613,
3639,
1103,
18,
710,
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,
4750,
918,
3157,
780,
21432,
367,
12,
1042,
1103,
16,
4902,
8526,
2186,
13,
3639,
1216,
804,
1085,
18,
2335,
10703,
9901,
503,
288,
3639,
368,
1788,
533,
1613,
3639,
1103,
18,
710,
18,
... |
return VM_Magic.objectAsAddress(o).toInt() >>> LOG_BYTES_IN_ADDRESS; | return VM_Magic.objectAsAddress(o).toWord().rshl(LOG_BYTES_IN_ADDRESS).toInt(); | public static int getObjectHashCode(Object o) { if (ADDRESS_BASED_HASHING) { if (MM_Interface.MOVES_OBJECTS) { int hashState = VM_Magic.getIntAtOffset(o, STATUS_OFFSET) & HASH_STATE_MASK; if (hashState == HASH_STATE_HASHED) { return VM_Magic.objectAsAddress(o).toInt() >>> LOG_BYTES_IN_ADDRESS; } else if (hashState == HASH_STATE_HASHED_AND_MOVED) { VM_Type t = VM_Magic.getObjectType(o); if (t.isArrayType()) { return VM_Magic.getIntAtOffset(o, HASHCODE_ARRAY_OFFSET); } else { return VM_Magic.getIntAtOffset(o, HASHCODE_SCALAR_OFFSET); } } else { int tmp; do { tmp = VM_Magic.prepareInt(o, STATUS_OFFSET); } while (!VM_Magic.attemptInt(o, STATUS_OFFSET, tmp, tmp | HASH_STATE_HASHED)); if (VM_ObjectModel.HASH_STATS) VM_ObjectModel.hashTransition1++; return getObjectHashCode(o); } } else { return VM_Magic.objectAsAddress(o).toInt() >>> LOG_BYTES_IN_ADDRESS; } } else { // 10 bit hash code in status word int hashCode = (VM_Magic.getIntAtOffset(o, STATUS_OFFSET) & HASH_CODE_MASK) >> HASH_CODE_SHIFT; if (hashCode != 0) return hashCode; return installHashCode(o); } } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/abcf642086530af03e09efc059695a6935feb221/VM_JavaHeader.java/buggy/rvm/src/vm/objectModel/default/VM_JavaHeader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
509,
6455,
21952,
12,
921,
320,
13,
288,
377,
309,
261,
15140,
67,
8369,
40,
67,
15920,
1360,
13,
288,
1377,
309,
261,
8206,
67,
1358,
18,
16537,
55,
67,
9422,
55,
13,
288,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
509,
6455,
21952,
12,
921,
320,
13,
288,
377,
309,
261,
15140,
67,
8369,
40,
67,
15920,
1360,
13,
288,
1377,
309,
261,
8206,
67,
1358,
18,
16537,
55,
67,
9422,
55,
13,
288,... |
if (end == -1) end = array.length; if (start > end) return null; if (start < 0) return null; if (end > array.length) return null; | if (end == -1) end = array.length; if (start > end) return null; if (start < 0) return null; if (end > array.length) return null; | public static final char[][] subarray(char[][] array, int start, int end) { if (end == -1) end = array.length; if (start > end) return null; if (start < 0) return null; if (end > array.length) return null; char[][] result = new char[end - start][]; System.arraycopy(array, start, result, 0, end - start); return result;} | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/e33c1f7b0c1f9dbe66a73370c1b98e653087c2df/CharOperation.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/CharOperation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
760,
727,
1149,
63,
6362,
65,
720,
1126,
12,
3001,
63,
6362,
65,
526,
16,
509,
787,
16,
509,
679,
13,
288,
202,
430,
261,
409,
422,
300,
21,
13,
202,
202,
409,
273,
526,
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,
1071,
760,
727,
1149,
63,
6362,
65,
720,
1126,
12,
3001,
63,
6362,
65,
526,
16,
509,
787,
16,
509,
679,
13,
288,
202,
430,
261,
409,
422,
300,
21,
13,
202,
202,
409,
273,
526,
18,
2469,
... |
if (actionType == EditorCellAction.RENDER_TEXT) { | if (actionType.equals(EditorCellAction.RENDER_TEXT)) { | public boolean processKeyPressed(EditorContext editorContext, KeyEvent keyEvent) { if (getNodes().size() != 0) { AbstractEditorComponent editor = editorContext.getNodeEditorComponent(); SNode node = getNodes().get(0); EditorCell cell = editor.findNodeCell(node); List<Pair<EditorCellKeyMapAction, EditorCell>> actionsInfo = KeyMapUtil.getKeyMapActionsForEvent(cell, keyEvent, editorContext); if (actionsInfo.size() == 1) { EditorCellKeyMapAction action = actionsInfo.get(0).o1; EditorCell contextCell = actionsInfo.get(0).o2; KeyMapUtil.executeKeyMapAction(action, keyEvent, contextCell, editorContext); return true; } else if (actionsInfo.size() > 1) { // show menu EditorUtil.showActionsMenu(actionsInfo, keyEvent, editorContext, cell); return true; } } String actionType = myEditorComponent.getActionType(keyEvent, editorContext); if (actionType == null) { if (keyEvent.getKeyCode() == KeyEvent.VK_DELETE || keyEvent.getKeyCode() == KeyEvent.VK_BACK_SPACE) { actionType = EditorCellAction.DELETE; } } // only DELETE and COPY and CUT and RENDER_TEXT are supported in this mode if (actionType != null) { if (actionType == EditorCellAction.DELETE) { doDeleteNodes(editorContext); return true; } if (actionType == EditorCellAction.COPY) { myEditorComponent.executeComponentAction(EditorCellAction.COPY); return true; } if (actionType == EditorCellAction.CUT) { myEditorComponent.executeComponentAction(EditorCellAction.CUT); return true; } if (actionType == EditorCellAction.RENDER_TEXT) { myEditorComponent.executeComponentAction(EditorCellAction.RENDER_TEXT); return true; } } if (keyEvent.getKeyCode() == KeyEvent.VK_ESCAPE) { deactivate(); return true; } if (!isSelectionKeystroke(keyEvent)) { // any navigation key - deactivate if (keyEvent.getKeyCode() == KeyEvent.VK_UP || keyEvent.getKeyCode() == KeyEvent.VK_DOWN || keyEvent.getKeyCode() == KeyEvent.VK_LEFT || keyEvent.getKeyCode() == KeyEvent.VK_RIGHT) { deactivate(); } // eat it anyway return true; } boolean next = (keyEvent.getKeyCode() == KeyEvent.VK_RIGHT || keyEvent.getKeyCode() == KeyEvent.VK_DOWN); SNode newLastNode = null; Iterator<SNode> iterator = myParentNode.children(myRole); while (iterator.hasNext()) { SNode semanticNode = iterator.next(); if (semanticNode == myLastNode) { if (next) { if (iterator.hasNext()) { newLastNode = iterator.next(); } else { newLastNode = null; } } break; } newLastNode = semanticNode; } if (newLastNode != null) { myLastNode = newLastNode; myEditorComponent.repaint(); } return true; } | 14939 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14939/60191b9c4f1e88a747a3f865513213d9eecb9574/NodeRangeSelection.java/buggy/source/jetbrains/mps/nodeEditor/NodeRangeSelection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
1207,
653,
24624,
12,
6946,
1042,
4858,
1042,
16,
23737,
498,
1133,
13,
288,
565,
309,
261,
588,
3205,
7675,
1467,
1435,
480,
374,
13,
288,
1377,
4115,
6946,
1841,
4858,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
1207,
653,
24624,
12,
6946,
1042,
4858,
1042,
16,
23737,
498,
1133,
13,
288,
565,
309,
261,
588,
3205,
7675,
1467,
1435,
480,
374,
13,
288,
1377,
4115,
6946,
1841,
4858,
273,
... |
protected int getColumnCount(ColInfo[] columns) { for (int i = columns.length - 1; i >= 0; i--) { if (columns[i].isHidden) { return i; } } return columns.length; } | 2029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2029/b6c2b55c4a8a51cf38c59497cb712a38582b7fba/JtdsResultSet.java/clean/src/main/net/sourceforge/jtds/jdbc/JtdsResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
509,
6716,
1380,
12,
914,
966,
8526,
2168,
13,
288,
3639,
364,
261,
474,
277,
273,
2168,
18,
2469,
300,
404,
31,
277,
1545,
374,
31,
277,
413,
13,
288,
5411,
309,
261,
5112,
63,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
6716,
1380,
12,
914,
966,
8526,
2168,
13,
288,
3639,
364,
261,
474,
277,
273,
2168,
18,
2469,
300,
404,
31,
277,
1545,
374,
31,
277,
413,
13,
288,
5411,
309,
261,
5112,
63,... | ||
PropertyHandle propHandle = getPropertyHandle( OdaDataSet.DESIGNER_STATE_PROP ); | PropertyHandle propHandle = getPropertyHandle( IOdaDataSetModel.DESIGNER_STATE_PROP ); | public OdaDesignerStateHandle getDesignerState( ) { PropertyHandle propHandle = getPropertyHandle( OdaDataSet.DESIGNER_STATE_PROP ); OdaDesignerState designerState = (OdaDesignerState) propHandle .getValue( ); if ( designerState == null ) return null; return (OdaDesignerStateHandle) designerState.getHandle( propHandle ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/d802c33711e0d111551ae23575895cd060f085b6/OdaDataSourceHandle.java/buggy/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/OdaDataSourceHandle.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
531,
2414,
15478,
264,
1119,
3259,
2343,
281,
724,
264,
1119,
12,
262,
202,
95,
202,
202,
1396,
3259,
2270,
3259,
273,
3911,
3259,
12,
531,
2414,
13676,
18,
1639,
11260,
654,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
531,
2414,
15478,
264,
1119,
3259,
2343,
281,
724,
264,
1119,
12,
262,
202,
95,
202,
202,
1396,
3259,
2270,
3259,
273,
3911,
3259,
12,
531,
2414,
13676,
18,
1639,
11260,
654,
... |
String url = page + language + ".html"; | String url = page + language + ".html"; | public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException { PortletContext context = getPortletContext(); String language = Locales.getCurrent().getLanguage(); language = languages.indexOf(language) < 0?defaultLanguage:"_" + language; String url = page + language + ".html"; PortletRequestDispatcher rd = context.getRequestDispatcher(url); rd.include(request, response); } | 14127 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14127/2e6bc9420707d397befe77148da292f9cde73e7d/HtmlPortlet.java/buggy/OpenXava/src/org/openxava/web/portlets/HtmlPortlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
741,
1767,
12,
3420,
691,
590,
16,
6987,
1064,
766,
13,
1216,
21305,
503,
16,
1860,
288,
202,
202,
18566,
1042,
819,
273,
11036,
1810,
1042,
5621,
202,
202,
780,
2653,
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,
225,
202,
482,
918,
741,
1767,
12,
3420,
691,
590,
16,
6987,
1064,
766,
13,
1216,
21305,
503,
16,
1860,
288,
202,
202,
18566,
1042,
819,
273,
11036,
1810,
1042,
5621,
202,
202,
780,
2653,
27... |
organizer.deleteExperimentFromDatabase(); | organizer.deleteRecipeFromDatabase(); | public void actionPerformed(ActionEvent e) { organizer.deleteExperimentFromDatabase(); } | 9368 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9368/a671d5282cffbfc9f602a99846223fb2a25d1c23/OrganizerMouseListener.java/buggy/csmart/src/org/cougaar/tools/csmart/ui/viewer/OrganizerMouseListener.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
3639,
15501,
1824,
18,
3733,
5650,
3151,
1265,
4254,
5621,
1377,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
26100,
12,
1803,
1133,
425,
13,
288,
3639,
15501,
1824,
18,
3733,
5650,
3151,
1265,
4254,
5621,
1377,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public void stop(boolean force) { | public synchronized void stop(boolean force) { | public void stop(boolean force) { if (getKernel() != null) { // lets shutdown the kernel so shutdown messages are displayed in // the console view kernel.shutdown(); } GeronimoConnectionFactory.getInstance().destroy(getServer()); kernel = null; // kill the process super.stop(true); } | 10123 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10123/4c520bc0cdd31f3b4750b17470fba6190bd1500b/GeronimoServerBehaviour.java/buggy/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/GeronimoServerBehaviour.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2132,
12,
6494,
2944,
13,
288,
202,
202,
430,
261,
588,
11286,
1435,
480,
446,
13,
288,
1082,
202,
759,
14557,
5731,
326,
5536,
1427,
5731,
2743,
854,
10453,
316,
1082,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2132,
12,
6494,
2944,
13,
288,
202,
202,
430,
261,
588,
11286,
1435,
480,
446,
13,
288,
1082,
202,
759,
14557,
5731,
326,
5536,
1427,
5731,
2743,
854,
10453,
316,
1082,
2... |
if (fake) { | long failures = countFailures(ctx); boolean failing = (failures > 5) && (pool.getSettings().getAllowZeroHop()); boolean failsafe = false; if (failing && (ctx.random().nextInt(100) < failures) ) failsafe = true; if (fake || failsafe) { | private PooledTunnelCreatorConfig configTunnel(RouterContext ctx, TunnelPool pool, boolean fake) { Log log = ctx.logManager().getLog(TunnelBuilder.class); TunnelPoolSettings settings = pool.getSettings(); long expiration = ctx.clock().now() + settings.getDuration(); List peers = null; if (fake) { peers = new ArrayList(1); peers.add(ctx.routerHash()); } else { peers = pool.getSelector().selectPeers(ctx, settings); } if ( (peers == null) || (peers.size() <= 0) ) { // no inbound or outbound tunnels to send the request through, and // the pool is refusing 0 hop tunnels if (peers == null) { if (log.shouldLog(Log.ERROR)) log.error("No peers to put in the new tunnel! selectPeers returned null! boo, hiss! fake=" + fake); } else { if (log.shouldLog(Log.ERROR)) log.error("No peers to put in the new tunnel! selectPeers returned an empty list?! fake=" + fake); } return null; } PooledTunnelCreatorConfig cfg = new PooledTunnelCreatorConfig(ctx, peers.size(), settings.isInbound(), settings.getDestination()); // peers[] is ordered endpoint first, but cfg.getPeer() is ordered gateway first for (int i = 0; i < peers.size(); i++) { int j = peers.size() - 1 - i; cfg.setPeer(j, (Hash)peers.get(i)); HopConfig hop = cfg.getConfig(j); hop.setExpiration(expiration); hop.setIVKey(ctx.keyGenerator().generateSessionKey()); hop.setLayerKey(ctx.keyGenerator().generateSessionKey()); // tunnelIds will be updated during building, and as the creator, we // don't need to worry about prev/next hop } cfg.setExpiration(expiration); Log l = ctx.logManager().getLog(TunnelBuilder.class); if (l.shouldLog(Log.DEBUG)) l.debug("Config contains " + peers + ": " + cfg); return cfg; } | 27433 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27433/dd1074746001691d77a22b7099f098bf0e0df2ba/TunnelBuilder.java/clean/router/java/src/net/i2p/router/tunnel/pool/TunnelBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
453,
22167,
20329,
10636,
809,
642,
20329,
12,
8259,
1042,
1103,
16,
399,
8564,
2864,
2845,
16,
1250,
10517,
13,
288,
3639,
1827,
613,
273,
1103,
18,
1330,
1318,
7675,
588,
1343,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
453,
22167,
20329,
10636,
809,
642,
20329,
12,
8259,
1042,
1103,
16,
399,
8564,
2864,
2845,
16,
1250,
10517,
13,
288,
3639,
1827,
613,
273,
1103,
18,
1330,
1318,
7675,
588,
1343,
12... |
int codeSize = visitor.getMethod().getCode().getCode().length; | Code code = visitor.getMethod().getCode(); int codeSize = (code != null) ? code.getCode().length : 0; | public static SourceLineAnnotation fromVisitedMethod(BetterVisitor visitor) { LineNumberTable lineNumberTable = getLineNumberTable(visitor); String className = visitor.getBetterClassName(); String sourceFile = visitor.getSourceFile(); int codeSize = visitor.getMethod().getCode().getCode().length; if (lineNumberTable == null) return createUnknown(className, sourceFile, 0, codeSize - 1); return forEntireMethod(className, sourceFile, lineNumberTable, codeSize); } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/a6f5a04409638dca3326291aa585089277ee3231/SourceLineAnnotation.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/SourceLineAnnotation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
4998,
1670,
3257,
628,
30019,
1305,
12,
38,
11214,
7413,
8000,
13,
288,
202,
202,
31063,
1388,
13629,
1388,
273,
26089,
1388,
12,
3516,
1811,
1769,
202,
202,
780,
2658,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
4998,
1670,
3257,
628,
30019,
1305,
12,
38,
11214,
7413,
8000,
13,
288,
202,
202,
31063,
1388,
13629,
1388,
273,
26089,
1388,
12,
3516,
1811,
1769,
202,
202,
780,
2658,
273... |
public RubyString findClassPath() { return null; | public RubyObject findClassPath() { FindClassPathResult arg = new FindClassPathResult(); arg.klass = this; arg.track = getRuby().getObjectClass(); arg.prev = null; if (getRuby().getObjectClass().getInstanceVariables() != null) { getRuby().getObjectClass().getInstanceVariables().foreach(new FindClassPathMapMethod(), arg); } if (arg.name == null) { getRuby().getClassMap().foreach(new FindClassPathMapMethod(), arg); } if (arg.name != null) { getInstanceVariables().put(getRuby().intern("__classpath__"), arg.path); return arg.path; } return getRuby().getNil(); | public RubyString findClassPath() { return null; } | 46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RubyModule.java/buggy/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
780,
1104,
22158,
1435,
288,
3639,
327,
446,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
780,
1104,
22158,
1435,
288,
3639,
327,
446,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
MessageDialog.openError(window.getShell(), WorkbenchMessages.getString("Error"), WorkbenchMessages.format("EditorManager.saveFailedMessage", new Object[] { e.getMessage()})); | ErrorDialog.openError( window.getShell(), WorkbenchMessages.getString("Error"), WorkbenchMessages.format("EditorManager.saveFailedMessage", new Object[] { e.getMessage()}), e.getStatus()); | public void run(IProgressMonitor monitor) { try { IProgressMonitor monitorWrap = new EventLoopProgressMonitor(monitor); ResourcesPlugin.getWorkspace().run(workspaceOp, monitorWrap); } catch (CoreException e) { IStatus status = new Status(Status.WARNING, PlatformUI.PLUGIN_ID, 0, WorkbenchMessages.getString("EditorManager.saveFailed"), e); //$NON-NLS-1$ WorkbenchPlugin.log(WorkbenchMessages.getString("EditorManager.saveFailed"), status); //$NON-NLS-1$ MessageDialog.openError(window.getShell(), WorkbenchMessages.getString("Error"), //$NON-NLS-1$ WorkbenchMessages.format("EditorManager.saveFailedMessage", new Object[] { e.getMessage()})); //$NON-NLS-1$ } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/2cacc51c2fa0bd083ab1f395cdea593610a271ff/EditorManager.java/clean/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/EditorManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1086,
12,
45,
5491,
7187,
6438,
13,
288,
9506,
202,
698,
288,
6862,
202,
45,
5491,
7187,
6438,
2964,
273,
394,
2587,
6452,
5491,
7187,
12,
10259,
1769,
6862,
202,
3805,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1086,
12,
45,
5491,
7187,
6438,
13,
288,
9506,
202,
698,
288,
6862,
202,
45,
5491,
7187,
6438,
2964,
273,
394,
2587,
6452,
5491,
7187,
12,
10259,
1769,
6862,
202,
3805,
... |
protected abstract void addTreeListener(Control control, TreeListener listener); | public void addTreeListener(ITreeViewerListener listener) { treeListeners.add(listener); } | protected abstract void addTreeListener(Control control, TreeListener listener); | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/062c32b8e3287ec1a2e491d34fe552dae26fe5f6/AbstractTreeViewer.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
8770,
918,
527,
2471,
2223,
12,
3367,
3325,
16,
5411,
4902,
2223,
2991,
1769,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
8770,
918,
527,
2471,
2223,
12,
3367,
3325,
16,
5411,
4902,
2223,
2991,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
ret.add(omg); | addPoint(omg); | public OMGraphicList getGraphics() { // Clone from the cache... if (featureCache != null) { // The main graphics object is made up of // FeatureCacheGraphicLists for features for applicable // tiles. OMGraphicList ret = new OMGraphicList(); for (Iterator it = graphics.iterator(); it.hasNext();) { OMGraphic omg = (OMGraphic)it.next(); if (omg instanceof FeatureCacheGraphicList) { FeatureCacheGraphicList fcgl = (FeatureCacheGraphicList)((FeatureCacheGraphicList)omg).clone(); fcgl.setDrawingAttributes(this); ret.add(fcgl); } else { ret.add(omg); } } return ret; } else { return graphics; } } | 47208 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47208/12e333dfadffcc32d8e62c2be132e98e417fef56/VPFCachedFeatureGraphicWarehouse.java/buggy/src/openmap/com/bbn/openmap/layer/vpf/VPFCachedFeatureGraphicWarehouse.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
28839,
29459,
682,
336,
17558,
1435,
288,
3639,
368,
12758,
628,
326,
1247,
2777,
3639,
309,
261,
7238,
1649,
480,
446,
13,
288,
5411,
368,
1021,
2774,
17313,
733,
353,
7165,
731,
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,
28839,
29459,
682,
336,
17558,
1435,
288,
3639,
368,
12758,
628,
326,
1247,
2777,
3639,
309,
261,
7238,
1649,
480,
446,
13,
288,
5411,
368,
1021,
2774,
17313,
733,
353,
7165,
731,
4... |
public void set(org.quickfix.field.PartyID value) | public void set(quickfix.field.PartyID value) | public void set(org.quickfix.field.PartyID value) { setField(value); } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/QuoteRequestReject.java/clean/src/java/src/quickfix/fix44/QuoteRequestReject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
12,
19525,
904,
18,
1518,
18,
17619,
734,
460,
13,
225,
288,
16331,
12,
1132,
1769,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
12,
19525,
904,
18,
1518,
18,
17619,
734,
460,
13,
225,
288,
16331,
12,
1132,
1769,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public List selectAllByTopic(int topicId) throws Exception | public List selectAllByTopic(int topicId) | public List selectAllByTopic(int topicId) throws Exception { return this.selectAllByTopicByLimit(topicId, 0, Integer.MAX_VALUE - 1); } | 52144 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52144/f4af364dacad27a1238104a19d90e4a102043281/GenericPostDAO.java/clean/src/net/jforum/dao/generic/GenericPostDAO.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
27787,
858,
6657,
12,
474,
3958,
548,
13,
1216,
1185,
202,
95,
202,
202,
2463,
333,
18,
4025,
1595,
858,
6657,
858,
3039,
12,
10476,
548,
16,
374,
16,
2144,
18,
6694,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
27787,
858,
6657,
12,
474,
3958,
548,
13,
1216,
1185,
202,
95,
202,
202,
2463,
333,
18,
4025,
1595,
858,
6657,
858,
3039,
12,
10476,
548,
16,
374,
16,
2144,
18,
6694,
6... |
quickfix.fix42.OrderCancelRequest message = new quickfix.fix42.OrderCancelRequest (new OrigClOrdID(order.getID()), new ClOrdID(id), new Symbol(order.getSymbol()), sideToFIXSide(order.getSide()), new TransactTime()); | quickfix.fix42.OrderCancelRequest message = new quickfix.fix42.OrderCancelRequest( new OrigClOrdID(order.getID()), new ClOrdID(id), new Symbol(order.getSymbol()), sideToFIXSide(order.getSide()), new TransactTime()); | public void cancel42(Order order) { String id = order.generateID(); quickfix.fix42.OrderCancelRequest message = new quickfix.fix42.OrderCancelRequest (new OrigClOrdID(order.getID()), new ClOrdID(id), new Symbol(order.getSymbol()), sideToFIXSide(order.getSide()), new TransactTime()); message.setField(new OrderQty(order.getQuantity())); orderTableModel.addID(order, id); send(message, order.getSessionID()); } | 52211 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52211/b1369a27979caf97c3e3b66213e8103f210c0b86/BanzaiApplication.java/buggy/examples/quickfix/examples/banzai/BanzaiApplication.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3755,
9452,
12,
2448,
1353,
13,
288,
3639,
514,
612,
273,
1353,
18,
7163,
734,
5621,
3639,
9549,
904,
18,
904,
9452,
18,
2448,
6691,
691,
883,
273,
5411,
394,
9549,
904,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3755,
9452,
12,
2448,
1353,
13,
288,
3639,
514,
612,
273,
1353,
18,
7163,
734,
5621,
3639,
9549,
904,
18,
904,
9452,
18,
2448,
6691,
691,
883,
273,
5411,
394,
9549,
904,
18,
... |
} catch (ClassNotFoundException e) { | } catch (ClassNotFoundException e) { | public static void compile(JCompilationUnit[] app) { //using the raw backend to generate uniprocessor code //so set the number of tiles to 1 and //turn partitioning on... //make sure that cluster option has not been turned on if ((KjcOptions.standalone || KjcOptions.rstream) && KjcOptions.cluster == -1) { KjcOptions.raw = 1; KjcOptions.partition_dp = true; } if (KjcOptions.malloczeros) System.out.println("\n*** --malloczeros enabled, make sure your raw simulator initializes memory with zeros ***\n"); if (KjcOptions.altcodegen && KjcOptions.standalone) at.dms.util.Utils.fail("The options altcodegen and standalone are mutually exclusive."); if (KjcOptions.altcodegen && KjcOptions.decoupled) at.dms.util.Utils.fail("The options altcodegen and decoupled are mutually exclusive."); if (KjcOptions.outputs > 0 && KjcOptions.numbers > 0) at.dms.util.Utils.fail("The options outputs and numbers are mutually exclusive."); if (KjcOptions.magic_net && KjcOptions.decoupled) at.dms.util.Utils.fail("The options magic_net and decoupled are mutually exclusive."); System.err.println("Starting Kopi2SIR.."); if(!KjcOptions.graph) System.out.println("/*"); Kopi2SIR k2s = new Kopi2SIR(app); SIRStream stream = null; for (int i = 0; i < app.length; i++) { //System.err.println("Visiting "+i+" of "+(app.length-1)); SIRStream top = (SIRStream)app[i].accept(k2s); if (top != null) { stream = top; } } System.err.println("Done Kopi2SIR.."); SemanticChecker.doCheck(stream); System.out.println("Out of semantic checker."); System.err.println("Done Semantic Check.."); String backendClass = null; String backendMethod = "run"; if (KjcOptions.backend != null) { backendClass = KjcOptions.backend; } else if (KjcOptions.graph) { backendClass = "streamit.eclipse.grapheditor.graph.GraphEncoder"; } else if (KjcOptions.rstream) { backendClass = "at.dms.kjc.rstream.StrToRStream"; } else if (KjcOptions.raw != -1) { System.out.println("*/"); if (KjcOptions.spacetime) { backendClass = "at.dms.kjc.spacetime.SpaceTimeBackend"; } else if (KjcOptions.spacedynamic) { backendClass = "at.dms.kjc.spacedynamic.SpaceDynamicBackend"; } else { backendClass = "at.dms.kjc.raw.RawBackend"; } } else if (KjcOptions.cluster != -1) { System.out.println("*/"); backendClass = "at.dms.kjc.cluster.ClusterBackend"; } else { backendClass = "at.dms.kjc.sir.lowering.Flattener"; backendMethod = "flatten"; } // To find a method, we need its name and signature. To // invoke it, we need to stuff the parameters into an // Object[]; given this, it's easy to get the types. params[0] = stream; params[1] = k2s.getInterfaces(); params[2] = k2s.getInterfaceTables(); params[3] = k2s.getStructures(); params[4] = k2s.getHelpers(); params[5] = k2s.getGlobal(); Method theMethod = null; Class theBackend = null; try { paramTypes[0] = Class.forName("at.dms.kjc.sir.SIRStream"); paramTypes[5] = Class.forName("at.dms.kjc.sir.SIRGlobal"); for (int i = 1; i < 5; i++) paramTypes[i] = params[i].getClass(); } catch (ClassNotFoundException e) { System.err.println("*** The class " + e.getMessage() + " does not exist."); return; } try { theBackend = Class.forName(backendClass); } catch (ClassNotFoundException e) { System.err.println("*** The class " + e.getMessage() + " does not exist."); return; } try { theMethod = theBackend.getMethod(backendMethod, paramTypes); } catch (NoSuchMethodException e) { //try the old calling convention Object old_params[] = new Object[4]; Class old_paramTypes[] = new Class[4]; for (int i = 0; i < 4; i++) { old_params[i] = params[i]; old_paramTypes[i] = paramTypes[i]; } params = old_params; paramTypes = old_paramTypes; try { theMethod = theBackend.getMethod(backendMethod, paramTypes); } catch (NoSuchMethodException e2) { System.err.println("*** The backend method " + backendClass + "." + backendMethod + "()" + " does not exist."); } } stream=null; k2s=null; System.gc(); try { theMethod.invoke(null, params); } catch (IllegalAccessException e) { System.err.println("*** Not allowed to invoke backend " + backendClass); System.exit(1); } catch (InvocationTargetException e) { // Loses debugging information on the exception, sigh. // We can't blindly rethrow the exception because it might // not be a RuntimeException. I hate Java. Die as best we can. e.getTargetException().printStackTrace(); System.exit(1); } } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/a745155d1520f2e1a94cd59f280e26a648ca28d2/StreaMITMain.java/buggy/streams/src/at/dms/kjc/StreaMITMain.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
4074,
12,
46,
19184,
2802,
8526,
595,
13,
288,
202,
759,
9940,
326,
1831,
4221,
358,
2103,
640,
625,
16127,
280,
981,
202,
759,
2048,
444,
326,
1300,
434,
12568,
358,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4074,
12,
46,
19184,
2802,
8526,
595,
13,
288,
202,
759,
9940,
326,
1831,
4221,
358,
2103,
640,
625,
16127,
280,
981,
202,
759,
2048,
444,
326,
1300,
434,
12568,
358,
40... |
return layout.getNodeId(fname); } | return layout.getNodeId(fname); } | public String getSubscribeId (String fname) throws PortalException { return layout.getNodeId(fname); } | 1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/a70ada928fe06bf9bc2b55f2f32208ea99e82cb6/AggregatedLayoutManager.java/buggy/source/org/jasig/portal/layout/alm/AggregatedLayoutManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
7040,
4989,
548,
261,
780,
5299,
13,
1216,
25478,
503,
288,
1377,
327,
3511,
18,
588,
15883,
12,
12749,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
7040,
4989,
548,
261,
780,
5299,
13,
1216,
25478,
503,
288,
1377,
327,
3511,
18,
588,
15883,
12,
12749,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
public void nodeConnected(NodeManagerEvent e) { // Do not calculate, since memberJoined is always fired //calculateIfRequired(e); } | 51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/5e02adc216a5e874559c0e9881d81ec39d41c9bd/FolderStatistic.java/buggy/src/main/de/dal33t/powerfolder/disk/FolderStatistic.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
756,
8932,
12,
907,
1318,
1133,
425,
13,
288,
5411,
368,
2256,
486,
4604,
16,
3241,
3140,
4572,
329,
353,
3712,
15950,
5411,
368,
11162,
2047,
3705,
12,
73,
1769,
3639,
289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
756,
8932,
12,
907,
1318,
1133,
425,
13,
288,
5411,
368,
2256,
486,
4604,
16,
3241,
3140,
4572,
329,
353,
3712,
15950,
5411,
368,
11162,
2047,
3705,
12,
73,
1769,
3639,
289,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.