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 |
|---|---|---|---|---|---|---|
outBegIdx.value = startIdx; outNbElement.value = outIdx; | if( startIdx < lookbackTotal ) startIdx = lookbackTotal; | public TA_RetCode LINEARREG_ANGLE(int startIdx, int endIdx, double inReal[], int optInTimePeriod, MInteger outBegIdx, MInteger outNbElement, double outReal[]) { int outIdx; int today, lookbackTotal; double SumX, SumXY, SumY, SumXSqr, Divisor; double m; int i; double tempValue1; 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 < 2) || ((int) optInTimePeriod > 100000)) return TA_RetCode.TA_BAD_PARAM; lookbackTotal = LINEARREG_ANGLE_Lookback(optInTimePeriod); if (startIdx < lookbackTotal) startIdx = lookbackTotal; if (startIdx > endIdx) { outBegIdx.value = 0; outNbElement.value = 0; return TA_RetCode.TA_SUCCESS; } outIdx = 0; today = startIdx; SumX = optInTimePeriod * (optInTimePeriod - 1) * 0.5; SumXSqr = optInTimePeriod * (optInTimePeriod - 1) * (2 * optInTimePeriod - 1) / 6; Divisor = SumX * SumX - optInTimePeriod * SumXSqr; while (today <= endIdx) { SumXY = 0; SumY = 0; for (i = optInTimePeriod; i-- != 0;) { SumY += tempValue1 = inReal[today - i]; SumXY += (double) i * tempValue1; } m = (optInTimePeriod * SumXY - SumX * SumY) / Divisor; outReal[outIdx++] = m * (180.0 / 3.14159265358979323846); today++; } outBegIdx.value = startIdx; outNbElement.value = outIdx; return TA_RetCode.TA_SUCCESS; } | 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,
399,
37,
67,
7055,
1085,
14340,
985,
5937,
67,
30978,
12,
474,
27108,
16,
509,
679,
4223,
16,
1082,
202,
9056,
316,
6955,
63,
6487,
509,
2153,
382,
26540,
16,
490,
4522,
596,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14340,
985,
5937,
67,
30978,
12,
474,
27108,
16,
509,
679,
4223,
16,
1082,
202,
9056,
316,
6955,
63,
6487,
509,
2153,
382,
26540,
16,
490,
4522,
596,
... |
setMode(); | setMode(); if(file != null) modTime = file.lastModified(); if(!getPath().equals(oldPath)) { jEdit.updatePosition(Buffer.this); setMode(); } | public void run() { if(rename) { if(autosaveFile != null) autosaveFile.delete(); saveUndo = undo.editToBeUndone(); if(oldPath.equals(getPath())) { setFlag(AUTOSAVE_DIRTY,false); setFlag(READ_ONLY,false); setFlag(NEW_FILE,false); setFlag(UNTITLED,false); setFlag(DIRTY,false); setFlag(IO,false); saveUndo = undo.editToBeUndone(); if(!getPath().equals(oldPath)) setMode(); if(file != null) modTime = file.lastModified(); } if(!getPath().equals(oldPath)) setMode(); if(file != null) modTime = file.lastModified(); } if(!getPath().equals(oldPath)) { if(rename) jEdit.updatePosition(Buffer.this); VFSManager.sendVFSUpdate(getVFS(),getPath(),true); } EditBus.send(new BufferUpdate(Buffer.this, BufferUpdate.DIRTY_CHANGED)); } | 6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/0ccaec2dceb7e61687dc6094fa6761613f0560ad/Buffer.java/clean/org/gjt/sp/jedit/Buffer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1086,
1435,
1082,
202,
95,
9506,
202,
430,
12,
18539,
13,
9506,
202,
95,
6862,
202,
430,
12,
21996,
836,
812,
480,
446,
13,
25083,
202,
21996,
836,
812,
18,
3733,
5621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1086,
1435,
1082,
202,
95,
9506,
202,
430,
12,
18539,
13,
9506,
202,
95,
6862,
202,
430,
12,
21996,
836,
812,
480,
446,
13,
25083,
202,
21996,
836,
812,
18,
3733,
5621,
... |
recv.callMethod("write", RubyString.newString(recv.getRuntime(), "\n")); | recv.callMethod("write", recv.getRuntime().newString("\n")); | public static IRubyObject puts(IRubyObject recv, IRubyObject[] args) { if (args.length == 0) { recv.callMethod("write", RubyString.newString(recv.getRuntime(), "\n")); return recv.getRuntime().getNil(); } for (int i = 0; i < args.length; i++) { String line = null; if (args[i].isNil()) { line = "nil"; } else if (args[i] instanceof RubyArray) { puts(recv, ((RubyArray) args[i]).toJavaArray()); continue; } else { line = args[i].toString(); } recv.callMethod("write", RubyString.newString(recv.getRuntime(), line)); if (!line.endsWith("\n")) { recv.callMethod("write", RubyString.newString(recv.getRuntime(), "\n")); } } return recv.getRuntime().getNil(); } | 47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyIO.java/buggy/src/org/jruby/RubyIO.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15908,
10340,
921,
8200,
12,
7937,
10340,
921,
10665,
16,
15908,
10340,
921,
8526,
833,
13,
288,
3639,
309,
261,
1968,
18,
2469,
422,
374,
13,
288,
5411,
10665,
18,
1991,
1305,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15908,
10340,
921,
8200,
12,
7937,
10340,
921,
10665,
16,
15908,
10340,
921,
8526,
833,
13,
288,
3639,
309,
261,
1968,
18,
2469,
422,
374,
13,
288,
5411,
10665,
18,
1991,
1305,... |
double alpha1old = alpha1; double alpha1starold = alpha1star; double alpha2old = alpha2; double alpha2starold = alpha2star; | private boolean takeStep(int i1, int i2) { //System.out.print("+"); if (i1 == i2) { return false; } double y1 = target[i1]; double y2 = target[i2]; double alpha1 = model.getAlpha(i1); double alpha2 = model.getAlpha(i2); double alpha1star = model.getAlphaStar(i1); double alpha2star = model.getAlphaStar(i2); double phi1 = getError(i1); double phi2 = getError(i2); System.out.println("y1=" + y1 + "\ty2=" + y2); System.out.println("alpha1=" + alpha1 + "\talpha2=" + alpha2); System.out.println("alpha1star=" + alpha1star + "\talpha2star=" + alpha2star); System.out.println("phi1=" + phi1 + "\tphi2=" + phi2); double k11 = model.getKernelValue(i1, i1); double k12 = model.getKernelValue(i1, i2); double k22 = model.getKernelValue(i2, i2); double eta = k11 + k22 - 2.0 * k12; // from improvement // double eta = 2.0 * k12 - k11 - k22; // from tutorial, but always gives negative eta System.out.println("k11=" + k11 + "\tk12=" + k12 + "\tk22=" + k22); System.out.println("eta=" + eta); boolean case1, case2, case3, case4, finnished, changed; double alpha1old = alpha1; double alpha1starold = alpha1star; double alpha2old = alpha2; double alpha2starold = alpha2star; double deltaphi = phi2 - phi1; case1 = case2 = case3 = case4 = finnished = changed = false; System.out.println("deltaphi=" + deltaphi); double L, H; double a1 = 0.0, a2 = 0.0; double gamma = alpha1 - alpha1star + alpha2 - alpha2star; System.out.println("gamma=" + gamma); System.out.println("epsilon=" + epsilon); if(eta <= 0) { System.out.println("Negative eta"); return false; } while (!finnished) { if(!case1 && (alpha1 > 0.0 || (alpha1star == 0.0 && deltaphi > 0.0)) && (alpha2 > 0.0 || (alpha2star == 0.0 && deltaphi < 0.0)) ) { L = Math.max(0.0, gamma - C); H = Math.min(C, gamma); System.out.println("L=" + L + "\tH=" + H); if (L < H) { a2 = alpha2 - deltaphi / eta; System.out.println("Ideal a2 = " + a2); a2 = Math.min(a2, H); a2 = Math.max(L, a2); a1 = alpha1 - (a2 - alpha2); System.out.println("a1=" + a1 + ", a2=" + a2); // updatae alpah1, alpha2 if change greater than some eps if(Math.abs(a2 - alpha2) > epsilon * (a2 + alpha2 + 1.0 + epsilon)) { model.setAlpha(i1, a1); model.setAlpha(i2, a2); alpha1 = a1; alpha2 = a2; System.out.println("case1 worked"); changed = true; } else { System.out.println("case1: change too small: " + (a2 - alpha2)); } } else { System.out.println("case1: L > H"); finnished = true; } case1 = true; } else if (!case2 && (alpha1 > 0.0 || (alpha1star == 0.0 && deltaphi > 2.0 * epsilon)) && (alpha2star > 0.0 || (alpha2 == 0.0 && deltaphi > 2.0 * epsilon)) ) { L = Math.max(0.0, gamma); H = Math.min(C, C + gamma); System.out.println("L=" + L + "\tH=" + H); if(L < H) { a2 = alpha2star + (deltaphi - 2.0 * epsilon) / eta; System.out.println("Ideal a2 = " + a2); a2 = Math.min(a2, H); a2 = Math.max(L, a2); a1 = alpha1 + (a2 - alpha2star); System.out.println("a1=" + a1 + ", a2=" + a2); // updatae alpah1, alpha2star if change greater than some eps if(Math.abs(a2 - alpha2star) > epsilon * (a2 + alpha2star + 1.0 + epsilon)) { model.setAlpha(i1, a1); model.setAlphaStar(i2, a2); alpha1 = a1; alpha2star = a2; System.out.println("case2 worked"); changed = true; } else { System.out.println("case2: change too small: " + (a2 - alpha2star)); } } else { System.out.println("case2: L > H"); finnished = true; } case2 = true; } else if (!case3 && (alpha1star > 0.0 || (alpha1 == 0.0 && deltaphi < 2.0 * epsilon)) && (alpha2 > 0.0 || (alpha2star == 0.0 && deltaphi < 2.0 * epsilon)) ) { L = Math.max(0.0, -gamma); H = Math.min(C, -gamma + C); System.out.println("L=" + L + "\tH=" + H); if(L < H) { a2 = alpha2 - (deltaphi + 2.0 * epsilon) / eta; // according to improvement //a2 = alpha2 - (deltaphi - 2.0 * epsilon) / eta; // according to tutorial System.out.println("Ideal a2 = " + a2); a2 = Math.min(a2, H); a2 = Math.max(L, a2); a1 = alpha1star + (a2 - alpha2); // according to improvement //a1 = alpha1star - (a2 - alpha2); // according to tutorial System.out.println("a1=" + a1 + ", a2=" + a2); // update alpha1star, alpha2 if change is greater than some eps if(Math.abs(a2 - alpha2) > epsilon * (a2 + alpha2 + 1.0 + epsilon)) { model.setAlphaStar(i1, a1); model.setAlpha(i2, a2); alpha1star = a1; alpha2 = a2; System.out.println("case3 worked"); changed = true; } else { System.out.println("case3: change too small: " + (a2 - alpha2)); } } else { System.out.println("case3: L > H"); finnished = true; } case3 = true; } else if(!case4 && (alpha1star > 0.0 || (alpha1 == 0 && deltaphi < 0.0)) && (alpha2star > 0.0 || (alpha2 == 0 && deltaphi > 0.0)) ) { L = Math.max(0.0, -gamma - C); H = Math.min(C, -gamma); System.out.println("L=" + L + "\tH=" + H); if(L < H) { a2 = alpha2star + deltaphi/eta; System.out.println("Ideal a2 = " + a2); a2 = Math.min(a2, H); a2 = Math.max(L, a2); a1 = alpha1star - (a2 - alpha2star); System.out.println("a1=" + a1 + ", a2=" + a2); // update alpha1star, alpha2star if change is larger than some eps if(Math.abs(a2 - alpha2star) > epsilon * (a2 + alpha2star + 1.0 + epsilon)) { model.setAlphaStar(i1, a1); model.setAlphaStar(i2, a2); alpha1star = a1; alpha2star = a2; System.out.println("case4 worked"); changed = true; } else { System.out.println("case4: change too small: " + (a2 - alpha2star)); } } else { System.out.println("case4: L > H"); finnished = true; } case4 = true; } else { finnished = true; } System.out.println("!!!Errors: " + getError(i1) + " " + getError(i2)); // update deltaphi /* deltaphi = phi2 - phi1 + eta * ( (alpha1 - alpha1star) + (alpha1old - alpha1starold) ); */ deltaphi = getError(i2) - getError(i1); System.out.println("deltaphi=" + deltaphi); } // Calculate new threshold double b; double bOld = model.getThreshold(); System.out.println("b was " + bOld); /* if(!isBound(alpha1)) { b = phi1 + y1*(alpha1 - alpha1old)*k11 + y2*(alpha2 - alpha2old)*k12 + bOld; } else if(!isBound(alpha2)) { b = phi2 + y1*(alpha1 - alpha1old)*k12 + y2*(alpha2 - alpha2old)*k22 + bOld; } else if(!isBound(alpha1star)) { b = phi1 + y1*(alpha1star - alpha1starold)*k11 + y2*(alpha2star - alpha2starold)*k12 + bOld; } else if(!isBound(alpha2star)) { b = phi2 + y1*(alpha1star - alpha1starold)*k12 + y2*(alpha2star - alpha2starold)*k22 + bOld; } else { // no suitable alpha found to infer b - take middle of allowed interval double b1 = phi1 + y1*(alpha1 - alpha1old)*k11 + y2*(alpha2 - alpha2old)*k12 + bOld; double b2 = phi2 + y1*(alpha1 - alpha1old)*k12 + y2*(alpha2 - alpha2old)*k22 + bOld; b = (b1 + b2) / 2.0; } model.setThreshold(b); System.out.println("b is " + b); */ // double bOld = model.getThreshold(); if (!isBound(alpha1)) { b = y1 - model.internalClassify(i1) + bOld - epsilon; } else if (!isBound(alpha1star)) { b = y1 - model.internalClassify(i1) + bOld - epsilon; } else { b = y1 - model.internalClassify(i1) + bOld; } model.setThreshold(b); // Update error cache/* E[i1] = 0; E[i2] = 0; for (int l = 0; l < E.length; ++l) { if (l==i1 || l==i2) { continue; } if (!(isBound(model.getAlpha(l)))) { E[l] += y1*(a1-alpha1)*model.getKernelValue(i1, l) + y2*(a2-alpha2)*model.getKernelValue(i2, l) + bOld - b; } }*/ if(changed) { System.out.println("Successfuly changed things"); return true; } else { System.out.println("Nothing changed"); return false; } } | 50397 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50397/dc62a0a7cf481c21c3be647214959067a3b98f61/SMORegressionTrainer.java/clean/src/org/biojava/stats/svm/SMORegressionTrainer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1250,
4862,
4160,
12,
474,
277,
21,
16,
509,
277,
22,
13,
288,
565,
368,
3163,
18,
659,
18,
1188,
2932,
15,
8863,
565,
309,
261,
77,
21,
422,
277,
22,
13,
288,
202,
565,
327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1250,
4862,
4160,
12,
474,
277,
21,
16,
509,
277,
22,
13,
288,
565,
368,
3163,
18,
659,
18,
1188,
2932,
15,
8863,
565,
309,
261,
77,
21,
422,
277,
22,
13,
288,
202,
565,
327,
... | |
for (Enumeration i = getEquipment(); i.hasMoreElements();) { ((Mounted)i.nextElement()).newRound(roundNumber); | for (Mounted m : getEquipment()){ m.newRound(roundNumber); | public void newRound(int roundNumber) { unloadedThisTurn = false; done = false; delta_distance = 0; mpUsed = 0; if(assaultDropInProgress == 2) assaultDropInProgress = 0; moved = IEntityMovementType.MOVE_NONE; gotPavementBonus = false; hitThisRoundByAntiTSM = false; hitBySwarmsEntity = new Vector(); hitBySwarmsWeapon = new Vector(); setTaggedBy(-1); setLayingMines(false); setArmsFlipped(false); setDisplacementAttack(null); setFindingClub(false); setSpotting(false); setClearingMinefield(false); setUnjammingRAC(false); crew.setKoThisRound(false); m_lNarcedBy |= m_lPendingNarc; if (pendingINarcPods.size() > 0) { for (int j = 0;j < pendingINarcPods.size();j++) { iNarcPods.addElement(pendingINarcPods.elementAt(j)); } pendingINarcPods = new Vector(); } for (Enumeration i = getEquipment(); i.hasMoreElements();) { ((Mounted)i.nextElement()).newRound(roundNumber); } // Update the inferno tracker. this.infernos.newRound(roundNumber); } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/cbe74d020e74a85c0e3b8ebf32d1ebc85c1ba62f/Entity.java/clean/megamek/src/megamek/common/Entity.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
394,
11066,
12,
474,
3643,
1854,
13,
288,
3639,
640,
4230,
2503,
15858,
273,
629,
31,
3639,
2731,
273,
629,
31,
3639,
3622,
67,
8969,
273,
374,
31,
3639,
6749,
6668,
273,
374... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
394,
11066,
12,
474,
3643,
1854,
13,
288,
3639,
640,
4230,
2503,
15858,
273,
629,
31,
3639,
2731,
273,
629,
31,
3639,
3622,
67,
8969,
273,
374,
31,
3639,
6749,
6668,
273,
374... |
2, 2, matrix | 2, 2, matrix, scoreType | public DPMatrix forwardMatrix(SymbolList[] seqs) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { if (seqs.length != 2) { throw new IllegalArgumentException("This DP object only runs on pairs."); } lockModel(); Forward f = new Forward(); PairDPMatrix matrix = new PairDPMatrix(this, seqs[0], seqs[1]); PairDPCursor cursor = new MatrixPairDPCursor( seqs[0], seqs[1], (CrossProductAlphabet) getModel().emissionAlphabet(), 2, 2, matrix ); double score = f.runForward(cursor); matrix.setScore(score); unlockModel(); return matrix; } | 50397 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50397/f34f99e864e9e8905fb53dcbad1bf1ae9678cc15/PairwiseDP.java/buggy/src/org/biojava/bio/dp/PairwiseDP.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
463,
52,
4635,
5104,
4635,
12,
5335,
682,
8526,
19472,
13,
282,
1216,
565,
2141,
5335,
503,
16,
565,
2141,
27316,
503,
16,
565,
2141,
8850,
503,
225,
288,
565,
309,
261,
22437,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
463,
52,
4635,
5104,
4635,
12,
5335,
682,
8526,
19472,
13,
282,
1216,
565,
2141,
5335,
503,
16,
565,
2141,
27316,
503,
16,
565,
2141,
8850,
503,
225,
288,
565,
309,
261,
22437,
18... |
int incrDecrType = node.getExistingIntProp(Node.INCRDECR_PROP); | int incrDecrMask = node.getExistingIntProp(Node.INCRDECR_PROP); | private int visitIncDec(Node node, Node child, int iCodeTop) { int incrDecrType = node.getExistingIntProp(Node.INCRDECR_PROP); int childType = child.getType(); switch (childType) { case Token.GETVAR : { String name = child.getString(); if (itsData.itsNeedsActivation) { iCodeTop = addIcode(Icode_SCOPE, iCodeTop); stackChange(1); iCodeTop = addStringOp(Icode_PROP_INC_DEC, name, iCodeTop); iCodeTop = addByte(incrDecrType, iCodeTop); } else { int i = scriptOrFn.getParamOrVarIndex(name); iCodeTop = addVarOp(Icode_VAR_INC_DEC, i, iCodeTop); iCodeTop = addByte(incrDecrType, iCodeTop); stackChange(1); } break; } case Token.NAME : { String name = child.getString(); iCodeTop = addStringOp(Icode_NAME_INC_DEC, name, iCodeTop); iCodeTop = addByte(incrDecrType, iCodeTop); stackChange(1); break; } case Token.GETPROP : { Node object = child.getFirstChild(); iCodeTop = generateICode(object, iCodeTop); String property = object.getNext().getString(); iCodeTop = addStringOp(Icode_PROP_INC_DEC, property, iCodeTop); iCodeTop = addByte(incrDecrType, iCodeTop); break; } case Token.GETELEM : { Node object = child.getFirstChild(); iCodeTop = generateICode(object, iCodeTop); Node index = object.getNext(); iCodeTop = generateICode(index, iCodeTop); iCodeTop = addIcode(Icode_ELEM_INC_DEC, iCodeTop); iCodeTop = addByte(incrDecrType, iCodeTop); stackChange(-1); break; } case Token.GET_REF : { Node ref = child.getFirstChild(); iCodeTop = generateICode(ref, iCodeTop); iCodeTop = addIcode(Icode_REF_INC_DEC, iCodeTop); iCodeTop = addByte(incrDecrType, iCodeTop); break; } default : { throw badTree(node); } } return iCodeTop; } | 12904 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12904/a3039484fe39a3dbe840a19951dc87f44221e7eb/Interpreter.java/buggy/js/rhino/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
3757,
14559,
1799,
12,
907,
756,
16,
2029,
1151,
16,
509,
277,
1085,
3401,
13,
565,
288,
3639,
509,
17633,
1799,
86,
5796,
273,
756,
18,
588,
9895,
1702,
4658,
12,
907,
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,
509,
3757,
14559,
1799,
12,
907,
756,
16,
2029,
1151,
16,
509,
277,
1085,
3401,
13,
565,
288,
3639,
509,
17633,
1799,
86,
5796,
273,
756,
18,
588,
9895,
1702,
4658,
12,
907,
18,
... |
throw new UnsupportedOperationException("Dimensions of a Table can't be calculated. See the FAQ."); | throw new UnsupportedOperationException("Dimensions of a Table can't be calculated. See the FAQ."); | public float top() { throw new UnsupportedOperationException("Dimensions of a Table can't be calculated. See the FAQ."); } | 3011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3011/ed86dfb474e6fa22e1797452482e751a297a7e1f/Table.java/clean/itext/src/com/lowagie/text/Table.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1431,
1760,
1435,
288,
3639,
604,
394,
13172,
2932,
10796,
434,
279,
3555,
848,
1404,
506,
8894,
18,
2164,
326,
15064,
53,
1199,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1431,
1760,
1435,
288,
3639,
604,
394,
13172,
2932,
10796,
434,
279,
3555,
848,
1404,
506,
8894,
18,
2164,
326,
15064,
53,
1199,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-10... |
int tmp_ret = instance.proxycall144(get_SetLOD(), tmp_0, param_1); | int tmp_ret = instance.proxycall154(get_SetLOD(), tmp_0, param_1); | public final int SetLOD(Win32.IDirectDrawSurface7 This, int param_1) { long tmp_0 = This == null ? 0 : This.longLockPointer(); int tmp_ret = instance.proxycall144(get_SetLOD(), tmp_0, param_1); if (This != null) { This.unlock(); } return tmp_ret; } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/9b00f971bab2256d913aec1b141462a929f6e182/Win32.java/clean/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/Win32.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
727,
509,
1000,
48,
1212,
12,
18049,
1578,
18,
734,
867,
6493,
11508,
27,
1220,
16,
509,
579,
67,
21,
13,
288,
5411,
1525,
1853,
67,
20,
273,
1220,
422,
446,
692,
374,
294,
1220... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
509,
1000,
48,
1212,
12,
18049,
1578,
18,
734,
867,
6493,
11508,
27,
1220,
16,
509,
579,
67,
21,
13,
288,
5411,
1525,
1853,
67,
20,
273,
1220,
422,
446,
692,
374,
294,
1220... |
else if (name.equals(Constants.DOM_WELLFORMED)) { | else if (name.equalsIgnoreCase(Constants.DOM_WELLFORMED)) { | public Object getParameter(String name) throws DOMException { // REVISIT: Recognizes DOM L3 default features only. // Does not yet recognize Xerces features. if (name.equals(Constants.DOM_COMMENTS)) { return ((features & COMMENTS) != 0) ? Boolean.TRUE : Boolean.FALSE; } else if (name.equals(Constants.DOM_NAMESPACES)) { return (features & NAMESPACES) != 0 ? Boolean.TRUE : Boolean.FALSE; } else if (name.equals(Constants.DOM_DATATYPE_NORMALIZATION)) { // REVISIT: datatype-normalization only takes effect if validation is on return (features & DTNORMALIZATION) != 0 ? Boolean.TRUE : Boolean.FALSE; } else if (name.equals(Constants.DOM_CDATA_SECTIONS)) { return (features & CDATA) != 0 ? Boolean.TRUE : Boolean.FALSE; } else if (name.equals(Constants.DOM_ENTITIES)) { return (features & ENTITIES) != 0 ? Boolean.TRUE : Boolean.FALSE; } else if (name.equals(Constants.DOM_SPLIT_CDATA)) { return (features & SPLITCDATA) != 0 ? Boolean.TRUE : Boolean.FALSE; } else if (name.equals(Constants.DOM_VALIDATE)) { return (features & VALIDATE) != 0 ? Boolean.TRUE : Boolean.FALSE; } else if (name.equals(Constants.DOM_WELLFORMED)) { return (features & WELLFORMED) != 0 ? Boolean.TRUE : Boolean.FALSE; } else if (name.equals(Constants.DOM_INFOSET)) { return (features & INFOSET_MASK) == INFOSET_TRUE_PARAMS ? Boolean.TRUE : Boolean.FALSE; } else if (name.equals(Constants.DOM_NORMALIZE_CHARACTERS) || name.equals(Constants.DOM_CANONICAL_FORM) || name.equals(Constants.DOM_VALIDATE_IF_SCHEMA) || name.equals(Constants.DOM_CHECK_CHAR_NORMALIZATION) ) { return Boolean.FALSE; } else if (name.equals(SEND_PSVI)) { return Boolean.TRUE; } else if (name.equals(Constants.DOM_PSVI)) { return (features & PSVI) != 0 ? Boolean.TRUE : Boolean.FALSE; } else if ( name.equals(Constants.DOM_NAMESPACE_DECLARATIONS) || name.equals(Constants.DOM_ELEMENT_CONTENT_WHITESPACE)) { return Boolean.TRUE; } else if (name.equals(Constants.DOM_ERROR_HANDLER)) { return fErrorHandlerWrapper.getErrorHandler(); } else if (name.equals(Constants.DOM_RESOURCE_RESOLVER)) { XMLEntityResolver entityResolver = getEntityResolver(); if (entityResolver != null && entityResolver instanceof DOMEntityResolverWrapper) { return ((DOMEntityResolverWrapper) entityResolver).getEntityResolver(); } return null; } else if (name.equals(Constants.DOM_SCHEMA_TYPE)) { return getProperty(Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_LANGUAGE); } else if (name.equals(Constants.DOM_SCHEMA_LOCATION)) { return getProperty(Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_SOURCE); } else if (name.equals(SYMBOL_TABLE)){ return getProperty(SYMBOL_TABLE); } else if (name.equals(GRAMMAR_POOL)){ return getProperty(GRAMMAR_POOL); } else { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "FEATURE_NOT_FOUND", new Object[] { name }); throw new DOMException(DOMException.NOT_FOUND_ERR, msg); } } | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/f00018a29b68d07b04fbc24df9c69aaca3f6bfc4/DOMConfigurationImpl.java/clean/src/org/apache/xerces/dom/DOMConfigurationImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
5575,
12,
780,
508,
13,
1216,
4703,
503,
288,
202,
202,
759,
2438,
26780,
1285,
30,
7776,
4198,
3128,
4703,
511,
23,
805,
4467,
1338,
18,
202,
202,
759,
1850,
9637,
486,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
5575,
12,
780,
508,
13,
1216,
4703,
503,
288,
202,
202,
759,
2438,
26780,
1285,
30,
7776,
4198,
3128,
4703,
511,
23,
805,
4467,
1338,
18,
202,
202,
759,
1850,
9637,
486,... |
public void mT51() throws RecognitionException { int T51_StartIndex = input.index(); try { int type = T51; int start = getCharIndex(); int line = getLine(); int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; if ( backtracking>0 && alreadyParsedRule(input, 37) ) { return ; } // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:42:7: ( '||' ) // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:42:7: '||' { match("||"); if (failed) return ; } if ( token==null ) {emit(type,line,charPosition,channel,start,getCharIndex()-1);} } finally { if ( backtracking>0 ) { memoize(input, 37, T51_StartIndex); } } } | 5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/7f81b86a0f548bd02b09afc74b46454cdf158154/RuleParserLexer.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParserLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
21115,
10593,
1435,
1216,
9539,
288,
3639,
509,
399,
10593,
67,
16792,
273,
810,
18,
1615,
5621,
3639,
775,
288,
5411,
509,
618,
273,
399,
10593,
31,
5411,
509,
787,
273,
23577... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21115,
10593,
1435,
1216,
9539,
288,
3639,
509,
399,
10593,
67,
16792,
273,
810,
18,
1615,
5621,
3639,
775,
288,
5411,
509,
618,
273,
399,
10593,
31,
5411,
509,
787,
273,
23577... | ||
super(HandleTunnelMessageJob.this._context); | super(HandleTunnelMessageJob.this.getContext()); | public HandleGatewayMessageJob(I2NPMessage body, TunnelInfo tunnel, int length) { super(HandleTunnelMessageJob.this._context); _body = body; _length = length; _info = tunnel; } | 45677 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45677/e737e5c9507ed0d463dc9e45a8f63657f466b177/HandleTunnelMessageJob.java/clean/router/java/src/net/i2p/router/message/HandleTunnelMessageJob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
5004,
5197,
1079,
2278,
12,
45,
22,
23430,
1079,
1417,
16,
399,
8564,
966,
14825,
16,
509,
769,
13,
288,
5411,
2240,
12,
3259,
20329,
1079,
2278,
18,
2211,
18,
29120,
10663,
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
5004,
5197,
1079,
2278,
12,
45,
22,
23430,
1079,
1417,
16,
399,
8564,
966,
14825,
16,
509,
769,
13,
288,
5411,
2240,
12,
3259,
20329,
1079,
2278,
18,
2211,
18,
29120,
10663,
5411,
... |
public boolean isApplicationClass(JavaClass cls) { return subtypes.isApplicationClass(cls); } | public abstract boolean isApplicationClass(JavaClass cls); | public boolean isApplicationClass(JavaClass cls) { return subtypes.isApplicationClass(cls); } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/997c2d915e1856ef1e91dd0c00a79abea575fcfb/AnalysisContext.java/clean/findbugs/src/java/edu/umd/cs/findbugs/ba/AnalysisContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
353,
3208,
797,
12,
5852,
797,
2028,
13,
288,
202,
202,
2463,
720,
2352,
18,
291,
3208,
797,
12,
6429,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
353,
3208,
797,
12,
5852,
797,
2028,
13,
288,
202,
202,
2463,
720,
2352,
18,
291,
3208,
797,
12,
6429,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (layout != null) | if (layout != null) { | protected void configureShell(Shell newShell) { // The single image version of this code had a comment related to bug // 46624, // and some code that did nothing if the stored image was already // disposed. // The equivalent in the multi-image version seems to be to remove the // disposed images from the array passed to the shell. if (defaultImages != null && defaultImages.length > 0) { ArrayList nonDisposedImages = new ArrayList(defaultImages.length); for (int i = 0; i < defaultImages.length; ++i) if (defaultImages[i] != null && !defaultImages[i].isDisposed()) nonDisposedImages.add(defaultImages[i]); if (nonDisposedImages.size() <= 0) System.err.println("Window.configureShell: images disposed"); //$NON-NLS-1$ else { Image[] array = new Image[nonDisposedImages.size()]; nonDisposedImages.toArray(array); newShell.setImages(array); } } Layout layout = getLayout(); if (layout != null) newShell.setLayout(layout); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/391f2606b4ea2c1fb5052d938ca90877ee7631f6/Window.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/window/Window.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
5068,
13220,
12,
13220,
394,
13220,
13,
288,
202,
202,
759,
1021,
2202,
1316,
1177,
434,
333,
981,
9323,
279,
2879,
3746,
358,
7934,
202,
202,
759,
1059,
6028,
3247,
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,
918,
5068,
13220,
12,
13220,
394,
13220,
13,
288,
202,
202,
759,
1021,
2202,
1316,
1177,
434,
333,
981,
9323,
279,
2879,
3746,
358,
7934,
202,
202,
759,
1059,
6028,
3247,
16,
... |
assertEquals("##SAfe0014", rsmd.getTableName(1)); | assertEquals("#SAfe0014", rsmd.getTableName(1)); | public void testPreparedAndCallableCursors0014() throws Exception { Statement stmt = con.createStatement(); stmt.executeUpdate("CREATE TABLE ##SAfe0014(id INT PRIMARY KEY)"); stmt.executeUpdate("INSERT INTO ##SAfe0014 VALUES (1)"); stmt.executeUpdate("CREATE PROCEDURE #sp_SAfe0014(@P1 INT, @P2 INT) AS " + "SELECT id, @P2 FROM ##SAfe0014 WHERE id=@P1"); stmt.close(); PreparedStatement ps = con.prepareStatement("SELECT id FROM ##SAfe0014", ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); ResultSet resultSet = ps.executeQuery(); // No warnings assertEquals(null, resultSet.getWarnings()); assertEquals(null, ps.getWarnings()); // Correct ResultSet assertTrue(resultSet.next()); assertEquals(1, resultSet.getInt(1)); assertTrue(!resultSet.next()); // Correct meta data ResultSetMetaData rsmd = resultSet.getMetaData(); assertEquals("id", rsmd.getColumnName(1)); assertEquals("##SAfe0014", rsmd.getTableName(1)); // Insert row resultSet.moveToInsertRow(); resultSet.updateInt(1, 2); resultSet.insertRow(); resultSet.moveToCurrentRow(); // Check correct row count resultSet.last(); assertEquals(2, resultSet.getRow()); resultSet.close(); ps.close(); ps = con.prepareStatement("SELECT id, ? FROM ##SAfe0014 WHERE id = ?", ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); ps.setInt(1, 5); ps.setInt(2, 1); resultSet = ps.executeQuery(); // No warnings assertEquals(null, resultSet.getWarnings()); assertEquals(null, ps.getWarnings()); // Correct ResultSet assertTrue(resultSet.next()); assertEquals(1, resultSet.getInt(1)); assertEquals(5, resultSet.getInt(2)); assertTrue(!resultSet.next()); // Correct meta data rsmd = resultSet.getMetaData(); assertEquals("id", rsmd.getColumnName(1)); assertEquals("##SAfe0014", rsmd.getTableName(1)); resultSet.close(); ps.close(); CallableStatement cs = con.prepareCall("{call #sp_SAfe0014(?,?)}", ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); cs.setInt(1, 1); cs.setInt(2, 3); resultSet = cs.executeQuery(); // No warnings assertEquals(null, resultSet.getWarnings()); assertEquals(null, cs.getWarnings()); // Correct ResultSet assertTrue(resultSet.next()); assertEquals(1, resultSet.getInt(1)); assertEquals(3, resultSet.getInt(2)); assertTrue(!resultSet.next()); // Correct meta data rsmd = resultSet.getMetaData(); assertEquals("id", rsmd.getColumnName(1)); assertEquals("##SAfe0014", rsmd.getTableName(1)); resultSet.close(); cs.close(); } | 439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/94384c8c0e9119cf0723288e9c58f679e0b99097/SAfeTest.java/buggy/trunk/jtds/src/test/net/sourceforge/jtds/test/SAfeTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
15464,
1876,
11452,
2408,
87,
1383,
713,
3461,
1435,
1216,
1185,
288,
3639,
8056,
3480,
273,
356,
18,
2640,
3406,
5621,
3639,
3480,
18,
8837,
1891,
2932,
9344,
7567,
7541,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15464,
1876,
11452,
2408,
87,
1383,
713,
3461,
1435,
1216,
1185,
288,
3639,
8056,
3480,
273,
356,
18,
2640,
3406,
5621,
3639,
3480,
18,
8837,
1891,
2932,
9344,
7567,
7541,
... |
if (pchar == tchar) | if (pchar == tchar) { | protected boolean regExpRegionMatches(String text, int tStart, String p, int pStart, int plen) { while (plen-- > 0) { char tchar = text.charAt(tStart++); char pchar = p.charAt(pStart++); /* process wild cards */ if (!fIgnoreWildCards) { /* skip single wild cards */ if (pchar == fSingleWildCard) { continue; } } if (pchar == tchar) continue; if (fIgnoreCase) { if (Character.toUpperCase(tchar) == Character .toUpperCase(pchar)) continue; // comparing after converting to upper case doesn't handle all // cases; // also compare after converting to lower case if (Character.toLowerCase(tchar) == Character .toLowerCase(pchar)) continue; } return false; } return true; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/StringMatcher.java/buggy/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/StringMatcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1250,
31223,
5165,
6869,
12,
780,
977,
16,
509,
268,
1685,
16,
514,
293,
16,
1082,
202,
474,
293,
1685,
16,
509,
886,
275,
13,
288,
202,
202,
17523,
261,
28907,
413,
405,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1250,
31223,
5165,
6869,
12,
780,
977,
16,
509,
268,
1685,
16,
514,
293,
16,
1082,
202,
474,
293,
1685,
16,
509,
886,
275,
13,
288,
202,
202,
17523,
261,
28907,
413,
405,
3... |
IWorkbenchPartReference ref = editorPresentation.getVisibleEditor(); if (ref instanceof WorkbenchPartReference) { WorkbenchPartReference concreteRef = (WorkbenchPartReference) ref; concreteRef.setPinned(concreteRef.isPinned()); } | IWorkbenchPartReference ref = editorPresentation .getVisibleEditor(); if (ref instanceof WorkbenchPartReference) { WorkbenchPartReference concreteRef = (WorkbenchPartReference) ref; concreteRef.setPinned(concreteRef.isPinned()); } | public final Object execute(final ExecutionEvent event) { // check if the "Close editors automatically" preference is // set if (WorkbenchPlugin.getDefault().getPreferenceStore() .getBoolean( IPreferenceConstants.REUSE_EDITORS_BOOLEAN)) { IWorkbenchPartReference ref = editorPresentation.getVisibleEditor(); if (ref instanceof WorkbenchPartReference) { WorkbenchPartReference concreteRef = (WorkbenchPartReference) ref; concreteRef.setPinned(concreteRef.isPinned()); } } return null; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/f1c8b0aa355c00a6c82a289c808984de6778bfca/EditorManager.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
727,
1033,
1836,
12,
6385,
8687,
1133,
871,
13,
288,
6862,
202,
759,
866,
309,
326,
315,
4605,
29431,
6635,
6,
11555,
353,
6862,
202,
759,
444,
6862,
202,
430,
261,
2421,
221... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
727,
1033,
1836,
12,
6385,
8687,
1133,
871,
13,
288,
6862,
202,
759,
866,
309,
326,
315,
4605,
29431,
6635,
6,
11555,
353,
6862,
202,
759,
444,
6862,
202,
430,
261,
2421,
221... |
patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("where: wrong arguments"); } foundObject = context.findDictionary(patoken.value); if (foundObject != null) { context.operands.push(foundObject); context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); | catch (EmptyStackException e) { throw new PainterException("Dictionary stack is empty"); | public void execute(PAContext context) throws PainterException { Object data[], foundObject; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("where: wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("where: wrong arguments"); } foundObject = context.findDictionary(patoken.value); if (foundObject != null) { context.operands.push(foundObject); context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } | 6653 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6653/847947ee757ac47e8514ce31066d7b04585dcfbb/PAContext.java/buggy/src/com/lowagie/text/pdf/codec/postscript/PAContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1033,
501,
63,
6487,
1392,
921,
31,
3639,
17988,
969,
9670,
969,
31,
3639,
501,
273,
819,
18,
5120,
3542,
57... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1033,
501,
63,
6487,
1392,
921,
31,
3639,
17988,
969,
9670,
969,
31,
3639,
501,
273,
819,
18,
5120,
3542,
57... |
private void verifyProjectFiltering( String groupId, String artifactId, String inclusionPattern, String exclusionPattern, List depTrail, boolean verifyInclusion ) { ProjectWithArtifactMockControl pmac = new ProjectWithArtifactMockControl( groupId, artifactId, depTrail ); mockManager.replayAll(); // make sure the mock is satisfied...you can't disable this expectation. pmac.mac.artifact.getDependencyConflictId(); Set projects = new HashSet(); projects.add( pmac ); List inclusions; if ( inclusionPattern != null ) { inclusions = Collections.singletonList( inclusionPattern ); } else { inclusions = Collections.EMPTY_LIST; } List exclusions; if ( exclusionPattern != null ) { exclusions = Collections.singletonList( exclusionPattern ); } else { exclusions = Collections.EMPTY_LIST; } Logger logger = new ConsoleLogger( Logger.LEVEL_DEBUG, "test" ); FilterUtils.filterProjects( projects, inclusions, exclusions, depTrail != null, logger ); if ( verifyInclusion ) { assertEquals( 1, projects.size() ); assertEquals( pmac.getId(), ((MavenProject) projects.iterator().next()).getId() ); } else { assertTrue( projects.isEmpty() ); } mockManager.verifyAll(); // get ready for multiple calls per test. mockManager.clear(); } | 7444 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7444/70d891a8e6f332fc2ed44b13fa0bcdf93310c57f/FilterUtilsTest.java/buggy/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/FilterUtilsTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3929,
4109,
30115,
12,
514,
6612,
16,
514,
25496,
16,
514,
26485,
3234,
16,
514,
21244,
3234,
16,
987,
5993,
18107,
16,
1250,
3929,
382,
15335,
262,
565,
288,
3639,
5420,
1190,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3929,
4109,
30115,
12,
514,
6612,
16,
514,
25496,
16,
514,
26485,
3234,
16,
514,
21244,
3234,
16,
987,
5993,
18107,
16,
1250,
3929,
382,
15335,
262,
565,
288,
3639,
5420,
1190,... | ||
getTargetEditPart().showTargetFeedback(getSourceRequest()); | setFlag(FLAG_TARGET_FEEDBACK, true); getTargetEditPart().showTargetFeedback(getSourceRequest()); | protected void showTargetFeedback() { if (getTargetEditPart() != null) getTargetEditPart().showTargetFeedback(getSourceRequest());} | 11225 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11225/2fc4d68dee8215e7a6f42b2babda798c8f770c0f/ResizeTracker.java/buggy/org.eclipse.gef/src/org/eclipse/gef/tools/ResizeTracker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
2405,
2326,
15888,
1435,
288,
202,
430,
261,
588,
2326,
4666,
1988,
1435,
480,
446,
13,
202,
202,
588,
2326,
4666,
1988,
7675,
4500,
2326,
15888,
12,
588,
1830,
691,
10663,
97,
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,
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,
4750,
918,
2405,
2326,
15888,
1435,
288,
202,
430,
261,
588,
2326,
4666,
1988,
1435,
480,
446,
13,
202,
202,
588,
2326,
4666,
1988,
7675,
4500,
2326,
15888,
12,
588,
1830,
691,
10663,
97,
2,
... |
updateIcon(null); | private synchronized void addImpl() { if (! nativePeerExists) //we only want to add this tray icon to the Status Bar once { //initialize all needed native resources nsStatusItemWrapperPointer = createStatusItem(); updateIcon(null); setTitleNative(nsStatusItemWrapperPointer, caption); setToolTipNative(nsStatusItemWrapperPointer, toolTipText); nativePeerExists = true; } } | 4416 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4416/fa0f18ad6aa85ba5d245f426c46cfda005cccd9e/MacTrayIconService.java/clean/src/jdic/src/mac_os_x/classes/org/jdesktop/jdic/tray/internal/impl/MacTrayIconService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3852,
918,
527,
2828,
1435,
565,
288,
3639,
309,
16051,
6448,
6813,
4002,
13,
368,
1814,
1338,
2545,
358,
527,
333,
268,
435,
4126,
358,
326,
2685,
16654,
3647,
3639,
288,
5411,
368... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3852,
918,
527,
2828,
1435,
565,
288,
3639,
309,
16051,
6448,
6813,
4002,
13,
368,
1814,
1338,
2545,
358,
527,
333,
268,
435,
4126,
358,
326,
2685,
16654,
3647,
3639,
288,
5411,
368... | |
{ LdapDN dn = new LdapDN( "a = b" ); LdapDN dn2 = new LdapDN(); dn.addAll( dn2 ); Assert.assertEquals( "a=b", dn.toString() ); Assert.assertEquals( "a = b", dn.getUpName() ); } | { LdapDN dn = new LdapDN( "a = b" ); LdapDN dn2 = new LdapDN(); dn.addAll( dn2 ); Assert.assertEquals( "a=b", dn.toString() ); Assert.assertEquals( "a = b", dn.getUpName() ); } | public void testLdapDNAddAllAddedNameEmpty() throws InvalidNameException { LdapDN dn = new LdapDN( "a = b" ); LdapDN dn2 = new LdapDN(); dn.addAll( dn2 ); Assert.assertEquals( "a=b", dn.toString() ); Assert.assertEquals( "a = b", dn.getUpName() ); } | 54578 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54578/34d16a3366af953bef4b3d5f4cf0e7c6bda29ba6/LdapDNTest.java/clean/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
18437,
8609,
986,
1595,
8602,
461,
1921,
1435,
1216,
1962,
26771,
565,
288,
3639,
18053,
8609,
8800,
273,
394,
18053,
8609,
12,
315,
69,
273,
324,
6,
11272,
3639,
18053,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18437,
8609,
986,
1595,
8602,
461,
1921,
1435,
1216,
1962,
26771,
565,
288,
3639,
18053,
8609,
8800,
273,
394,
18053,
8609,
12,
315,
69,
273,
324,
6,
11272,
3639,
18053,
... |
Object[] args = new Object [] {refAttr, DOMUtil.getLocalName(child)}; reportSchemaError("src-attribute_group", args, child); | Object[] args = new Object [] {refAttr.rawname, "(annotation?)", DOMUtil.getLocalName(child)}; reportSchemaError("s4s-elt-must-match.1", args, child); | XSAttributeGroupDecl traverseLocal(Element elmNode, XSDocumentInfo schemaDoc, SchemaGrammar grammar) { // General Attribute Checking for elmNode declared locally Object[] attrValues = fAttrChecker.checkAttributes(elmNode, false, schemaDoc); // get attribute QName refAttr = (QName) attrValues[XSAttributeChecker.ATTIDX_REF]; XSAttributeGroupDecl attrGrp = null; // ref should be here. if (refAttr == null) { reportSchemaError("s4s-att-must-appear", new Object[]{"attributeGroup (local)", "ref"}, elmNode); fAttrChecker.returnAttrArray(attrValues, schemaDoc); return null; } // get global decl attrGrp = (XSAttributeGroupDecl)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.ATTRIBUTEGROUP_TYPE, refAttr, elmNode); // no children are allowed here except annotation, which is optional. Element child = DOMUtil.getFirstChildElement(elmNode); if (child != null) { String childName = DOMUtil.getLocalName(child); if (childName.equals(SchemaSymbols.ELT_ANNOTATION)) { traverseAnnotationDecl(child, attrValues, false, schemaDoc); child = DOMUtil.getNextSiblingElement(child); } if (child != null) { Object[] args = new Object [] {refAttr, DOMUtil.getLocalName(child)}; reportSchemaError("src-attribute_group", args, child); } } // if fAttrChecker.returnAttrArray(attrValues, schemaDoc); return attrGrp; } // traverseLocal | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/08452497d5ddc107ce0c88dafa4af418a8162487/XSDAttributeGroupTraverser.java/buggy/src/org/apache/xerces/impl/xs/traversers/XSDAttributeGroupTraverser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1139,
55,
1499,
1114,
3456,
10080,
2042,
12,
1046,
12531,
907,
16,
4766,
4202,
1139,
55,
2519,
966,
1963,
1759,
16,
4766,
4202,
4611,
18576,
6473,
13,
288,
3639,
368,
9544,
3601,
24471,
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,
1139,
55,
1499,
1114,
3456,
10080,
2042,
12,
1046,
12531,
907,
16,
4766,
4202,
1139,
55,
2519,
966,
1963,
1759,
16,
4766,
4202,
4611,
18576,
6473,
13,
288,
3639,
368,
9544,
3601,
24471,
3... |
addTime = rep.getJobEntryAttributeBoolean(id_jobentry, "arg_time"); | addTime = rep.getJobEntryAttributeBoolean(id_jobentry, "add_time"); | public void loadRep(Repository rep, long id_jobentry, ArrayList databases) throws KettleException { try { super.loadRep(rep, id_jobentry, databases); long id_transformation = rep.getJobEntryAttributeInteger(id_jobentry, "id_transformation"); Row r = rep.getTransformation(id_transformation); if (r==null) { if (r==null) { transname = rep.getJobEntryAttributeString(id_jobentry, "name"); String dirPath = rep.getJobEntryAttributeString(id_jobentry, "dir_path"); directory = rep.getDirectoryTree().findDirectory(dirPath); } else { transname = r.getString("NAME", null); long id_directory = r.getInteger("ID_DIRECTORY", 0L); if (id_directory>0) { directory = rep.getDirectoryTree().findDirectory(id_directory); } else { directory = rep.getDirectoryTree(); } } System.out.println("Loading transformation in directory ["+directory+"]"); } filename = rep.getJobEntryAttributeString(id_jobentry, "filename"); argFromPrevious = rep.getJobEntryAttributeBoolean(id_jobentry, "arg_from_previous"); setLogfile = rep.getJobEntryAttributeBoolean(id_jobentry, "set_logfile"); addDate = rep.getJobEntryAttributeBoolean(id_jobentry, "add_date"); addTime = rep.getJobEntryAttributeBoolean(id_jobentry, "arg_time"); logfile = rep.getJobEntryAttributeString(id_jobentry, "logfile"); logext = rep.getJobEntryAttributeString(id_jobentry, "logext"); loglevel = LogWriter.getLogLevel( rep.getJobEntryAttributeString(id_jobentry, "loglevel") ); // How many arguments? int argnr = rep.countNrJobEntryAttributes(id_jobentry, "argument"); arguments = new String[argnr]; // Read them all... for (int a=0;a<argnr;a++) { arguments[a]= rep.getJobEntryAttributeString(id_jobentry, a, "argument"); } } catch(KettleDatabaseException dbe) { throw new KettleException("Unable to load job entry of type transMeta from the repository for id_jobentry="+id_jobentry, dbe); } } | 58146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58146/295072eb8d592773f7c8702e41e63a036c8d6c74/JobEntryTrans.java/clean/kettle/src/be/ibridge/kettle/job/entry/trans/JobEntryTrans.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1262,
18933,
12,
3305,
2071,
16,
1525,
612,
67,
4688,
4099,
16,
2407,
16358,
13,
1216,
1475,
278,
5929,
503,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
9565,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1262,
18933,
12,
3305,
2071,
16,
1525,
612,
67,
4688,
4099,
16,
2407,
16358,
13,
1216,
1475,
278,
5929,
503,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
9565,
18,
... |
JspTag from, Class klass) | JspTag from, Class<?> klass) | public static final JspTag findAncestorWithClass( JspTag from, Class klass) { boolean isInterface = false; if (from == null || klass == null || (!JspTag.class.isAssignableFrom(klass) && !(isInterface = klass.isInterface()))) { return null; } for (;;) { JspTag parent = null; if( from instanceof SimpleTag ) { parent = ((SimpleTag)from).getParent(); } else if( from instanceof Tag ) { parent = ((Tag)from).getParent(); } if (parent == null) { return null; } if (parent instanceof TagAdapter) { parent = ((TagAdapter) parent).getAdaptee(); } if ((isInterface && klass.isInstance(parent)) || klass.isAssignableFrom(parent.getClass())) { return parent; } from = parent; } } | 46196 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46196/423b950886cf6e10fa1f9b4e3acf983689d7d1f5/SimpleTagSupport.java/clean/java/javax/servlet/jsp/tagext/SimpleTagSupport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
727,
19300,
1805,
1104,
15637,
1190,
797,
12,
202,
21796,
1805,
628,
16,
1659,
12880,
34,
7352,
13,
377,
288,
202,
6494,
21456,
273,
629,
31,
202,
430,
261,
2080,
422,
446,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
727,
19300,
1805,
1104,
15637,
1190,
797,
12,
202,
21796,
1805,
628,
16,
1659,
12880,
34,
7352,
13,
377,
288,
202,
6494,
21456,
273,
629,
31,
202,
430,
261,
2080,
422,
446,
7... |
rlistener.addSequenceProperty(getKeywordsTerm(), kws[i].trim()); | rlistener.addSequenceProperty(Terms.getKeywordsTerm(), kws[i].trim()); | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolean hasInternalWhitespace = false; rlistener.startSequence(); if (ns==null) ns=RichObjectFactory.getDefaultNamespace(); rlistener.setNamespace(ns); // Get an ordered list of key->value pairs in array-tuples String sectionKey = null; NCBITaxon tax = null; String organism = null; String accession = null; do { List section = this.readSection(reader); sectionKey = ((String[])section.get(0))[0]; if(sectionKey == null){ throw new ParseException("Section key was null. Accession:"+ accession == null ? "Not set" : accession); } // process section-by-section if (sectionKey.equals(LOCUS_TAG)) { // entryname dataclass; [circular] molecule; division; sequencelength BP. String loc = ((String[])section.get(0))[1]; String regex = "^(\\S+)\\s+standard;\\s+(circular)?\\s*(\\S+);\\s+(\\S+);\\s+\\d+\\s+BP\\.$"; Pattern p = Pattern.compile(regex); Matcher m = p.matcher(loc); if (m.matches()) { rlistener.setName(m.group(1)); rlistener.setDivision(m.group(4)); rlistener.addSequenceProperty(getMolTypeTerm(),m.group(3)); // Optional extras String circular = m.group(2); if (circular!=null) rlistener.setCircular(true); } else { throw new ParseException("Bad ID line found: "+loc); } } else if (sectionKey.equals(DEFINITION_TAG)) { rlistener.setDescription(((String[])section.get(0))[1]); } else if (sectionKey.equals(SOURCE_TAG)) { // IGNORE - can get from first feature in feature table } else if (sectionKey.equals(DATE_TAG)) { String date = ((String[])section.get(0))[1].trim().substring(0,11); rlistener.addSequenceProperty(getModificationTerm(), date); } else if (sectionKey.equals(ACCESSION_TAG)) { // if multiple accessions, store only first as accession, // and store rest in annotation String[] accs = ((String[])section.get(0))[1].split(";"); accession = accs[0].trim(); rlistener.setAccession(accession); for (int i = 1; i < accs.length; i++) { rlistener.addSequenceProperty(getAccessionTerm(),accs[i].trim()); } } else if (sectionKey.equals(VERSION_TAG)) { String ver = ((String[])section.get(0))[1]; String regex = "^(\\S+?)\\.(\\d+)$"; Pattern p = Pattern.compile(regex); Matcher m = p.matcher(ver); if (m.matches()) { rlistener.setVersion(Integer.parseInt(m.group(2))); } else { throw new ParseException("Bad version line found: "+ver); } } else if (sectionKey.equals(KEYWORDS_TAG)) { String[] kws = ((String[])section.get(0))[1].split(";"); for (int i = 1; i < kws.length; i++) { rlistener.addSequenceProperty(getKeywordsTerm(), kws[i].trim()); } } else if (sectionKey.equals(DATABASE_XREF_TAG)) { // database_identifier; primary_identifier; secondary_identifier. String[] refs = ((String[])section.get(0))[1].split("\\."); for (int i = 0 ; i < refs.length; i++) { if (refs[i].trim().length()==0) continue; String[] parts = refs[i].split(";"); // construct a DBXREF out of the dbname part[0] and accession part[1] CrossRef crossRef = new SimpleCrossRef(parts[0].trim(),parts[1].trim(),0); RankedCrossRef rcrossRef = new SimpleRankedCrossRef(crossRef, i+1); rlistener.setRankedCrossRef(rcrossRef); } } else if (sectionKey.equals(REFERENCE_TAG)) { // first line of section has rank and location String refrank = ((String[])section.get(0))[1]; int ref_rank = Integer.parseInt(refrank.substring(1,refrank.length()-1)); int ref_start = -999; int ref_end = -999; // rest can be in any order String authors = null; String title = null; String journal = null; String pubmed = null; String medline = null; String doi = null; String remark = null; for (int i = 1; i < section.size(); i++) { String key = ((String[])section.get(i))[0]; String val = ((String[])section.get(i))[1]; if (key.equals(AUTHORS_TAG)) authors = val; if (key.equals(TITLE_TAG)) title = val; if (key.equals(JOURNAL_TAG)) journal = val; if (key.equals(REFERENCE_XREF_TAG)) { // database_identifier; primary_identifier. String[] refs = val.split("\\."); for (int j = 0 ; j < refs.length; j++) { if (refs[j].trim().length()==0) continue; String[] parts = refs[j].split(";"); String db = parts[0].toUpperCase(); String ref = parts[1]; if (db.equals("PUBMED")) pubmed = ref; else if (db.equals("MEDLINE")) medline = ref; else if (db.equals("DOI")) doi = ref; } } if (key.equals(REMARK_TAG)) remark = val; if (key.equals(REFERENCE_POSITION_TAG)) { // only the first group is taken // if we have multiple lines, only the last line is taken String regex = "^(\\d+)(-(\\d+))?$"; Pattern p = Pattern.compile(regex); Matcher m = p.matcher(val); if (m.matches()) { ref_start = Integer.parseInt(m.group(1)); if(m.group(2) != null) ref_end = Integer.parseInt(m.group(3)); } else { throw new ParseException("Bad reference line found: "+val); } } } // create the pubmed crossref and assign to the bioentry CrossRef pcr = null; if (pubmed!=null) { pcr = (CrossRef)RichObjectFactory.getObject(SimpleCrossRef.class,new Object[]{"PUBMED", pubmed}); RankedCrossRef rpcr = new SimpleRankedCrossRef(pcr, 0); rlistener.setRankedCrossRef(rpcr); } // create the medline crossref and assign to the bioentry CrossRef mcr = null; if (medline!=null) { mcr = (CrossRef)RichObjectFactory.getObject(SimpleCrossRef.class,new Object[]{"MEDLINE", medline}); RankedCrossRef rmcr = new SimpleRankedCrossRef(mcr, 0); rlistener.setRankedCrossRef(rmcr); } // create the doi crossref and assign to the bioentry CrossRef dcr = null; if (doi!=null) { dcr = (CrossRef)RichObjectFactory.getObject(SimpleCrossRef.class,new Object[]{"DOI", doi}); RankedCrossRef rdcr = new SimpleRankedCrossRef(dcr, 0); rlistener.setRankedCrossRef(rdcr); } // create the docref object try { DocRef dr = (DocRef)RichObjectFactory.getObject(SimpleDocRef.class,new Object[]{authors,journal}); if (title!=null) dr.setTitle(title); // assign either the pubmed or medline to the docref - medline gets priority, then pubmed, then doi if (mcr!=null) dr.setCrossref(mcr); else if (pcr!=null) dr.setCrossref(pcr); else if (dcr!=null) dr.setCrossref(dcr); // assign the remarks dr.setRemark(remark); // assign the docref to the bioentry RankedDocRef rdr = new SimpleRankedDocRef(dr, (ref_start != -999 ? new Integer(ref_start) : null), (ref_end != -999 ? new Integer(ref_end) : null), ref_rank); rlistener.setRankedDocRef(rdr); } catch (ChangeVetoException e) { throw new ParseException(e); } } else if (sectionKey.equals(COMMENT_TAG)) { // Set up some comments rlistener.setComment(((String[])section.get(0))[1]); } else if (sectionKey.equals(FEATURE_TAG)) { // starting from second line of input, start a new feature whenever we come across // a key that does not start with / boolean seenAFeature = false; for (int i = 1 ; i < section.size(); i++) { String key = ((String[])section.get(i))[0]; String val = ((String[])section.get(i))[1]; if (key.startsWith("/")) { key = key.substring(1); // strip leading slash val = val.replaceAll("\"","").trim(); // strip quotes // parameter on old feature if (key.equals("db_xref")) { String regex = "^(\\S+?):(\\S+)$"; Pattern p = Pattern.compile(regex); Matcher m = p.matcher(val); if (m.matches()) { String dbname = m.group(1); String raccession = m.group(2); if (dbname.equals("taxon")) { // Set the Taxon instead of a dbxref tax = (NCBITaxon)RichObjectFactory.getObject(SimpleNCBITaxon.class, new Object[]{Integer.valueOf(raccession)}); rlistener.setTaxon(tax); try { if (organism!=null) tax.addName(NCBITaxon.SCIENTIFIC,organism); } catch (ChangeVetoException e) { throw new ParseException(e); } } else { try { CrossRef cr = (CrossRef)RichObjectFactory.getObject(SimpleCrossRef.class,new Object[]{dbname, raccession}); RankedCrossRef rcr = new SimpleRankedCrossRef(cr, 0); rlistener.getCurrentFeature().addRankedCrossRef(rcr); } catch (ChangeVetoException e) { throw new ParseException(e); } } } else { throw new ParseException("Bad dbxref found: "+val); } } else if (key.equals("organism")) { try { organism = val; if (tax!=null) tax.addName(NCBITaxon.SCIENTIFIC,organism); } catch (ChangeVetoException e) { throw new ParseException(e); } } else { if (key.equals("translation")) { // strip spaces from sequence val = val.replaceAll("\\s+",""); } rlistener.addFeatureProperty(RichObjectFactory.getDefaultOntology().getOrCreateTerm(key),val); } } else { // new feature! // end previous feature if (seenAFeature) rlistener.endFeature(); // start next one, with lots of lovely info in it RichFeature.Template templ = new RichFeature.Template(); templ.annotation = new SimpleRichAnnotation(); templ.sourceTerm = getEMBLTerm(); templ.typeTerm = RichObjectFactory.getDefaultOntology().getOrCreateTerm(key); templ.featureRelationshipSet = new TreeSet(); templ.rankedCrossRefs = new TreeSet(); String tidyLocStr = val.replaceAll("\\s+",""); templ.location = GenbankLocationParser.parseLocation(ns, accession, tidyLocStr); rlistener.startFeature(templ); seenAFeature = true; } } if (seenAFeature) rlistener.endFeature(); } else if (sectionKey.equals(START_SEQUENCE_TAG) && !this.elideSymbols) { // our first line is ignorable as it is the ORIGIN tag // the second line onwards conveniently have the number as // the [0] tuple, and sequence string as [1] so all we have // to do is concat the [1] parts and then strip out spaces, // and replace '.' and '~' with '-' for our parser. StringBuffer seq = new StringBuffer(); for (int i = 1 ; i < section.size(); i++) seq.append(((String[])section.get(i))[1]); try { SymbolList sl = new SimpleSymbolList(symParser, seq.toString().replaceAll("\\s+","").replaceAll("[\\.|~]","-")); rlistener.addSymbols(symParser.getAlphabet(), (Symbol[])(sl.toList().toArray(new Symbol[0])), 0, sl.length()); } catch (Exception e) { throw new ParseException(e); } } } while (!sectionKey.equals(END_SEQUENCE_TAG)); // Allows us to tolerate trailing whitespace without // thinking that there is another Sequence to follow while (true) { reader.mark(1); int c = reader.read(); if (c == -1) { hasAnotherSequence = false; break; } if (Character.isWhitespace((char) c)) { hasInternalWhitespace = true; continue; } if (hasInternalWhitespace) System.err.println("Warning: whitespace found between sequence entries"); reader.reset(); break; } // Finish up. rlistener.endSequence(); return hasAnotherSequence; } | 50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/69eb38be3563c2b80729626b15ffb8ceade2d315/EMBLFormat.java/buggy/src/org/biojavax/bio/seq/io/EMBLFormat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
855,
22591,
4021,
12,
17947,
2514,
2949,
16,
5411,
8565,
1345,
1588,
5382,
2678,
16,
5411,
534,
1354,
6926,
4294,
2223,
436,
12757,
16,
5411,
6005,
3153,
13,
5411,
1216,
2141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
855,
22591,
4021,
12,
17947,
2514,
2949,
16,
5411,
8565,
1345,
1588,
5382,
2678,
16,
5411,
534,
1354,
6926,
4294,
2223,
436,
12757,
16,
5411,
6005,
3153,
13,
5411,
1216,
2141,
... |
int type = T85; int start = getCharIndex(); int line = getLine(); int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; { match("threadsafe"); | try { int type = T85; int start = getCharIndex(); int line = getLine(); int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; { match("threadsafe"); | public void mT85() throws RecognitionException { int type = T85; int start = getCharIndex(); int line = getLine(); int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:26:7: ( 'threadsafe' ) // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:26:7: 'threadsafe' { match("threadsafe"); } if ( token==null ) {emit(type,line,charPosition,channel,start,getCharIndex()-1);} } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/7e425814ce563fcc662b266adb2a4dc8e1a95d19/JavaParserLexer.java/buggy/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParserLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
21115,
7140,
1435,
1216,
9539,
288,
3639,
509,
618,
273,
399,
7140,
31,
3639,
509,
787,
273,
23577,
1016,
5621,
3639,
509,
980,
273,
9851,
5621,
3639,
509,
1149,
2555,
273,
235... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21115,
7140,
1435,
1216,
9539,
288,
3639,
509,
618,
273,
399,
7140,
31,
3639,
509,
787,
273,
23577,
1016,
5621,
3639,
509,
980,
273,
9851,
5621,
3639,
509,
1149,
2555,
273,
235... |
return viewExecutionCourseProjects(mapping,form,request,response); | return viewExecutionCourseProjects(mapping, form, request, response); | public ActionForward prepareViewExecutionCourseProjects(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws FenixActionException, FenixFilterException { ISiteComponent viewProjectsComponent = new InfoSiteProjects(); readSiteView(request, viewProjectsComponent, null, null, null); return viewExecutionCourseProjects(mapping,form,request,response); } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/51b6ac2293210675b11702dcd353d11f8f6541bc/TeacherAdministrationViewerDispatchAction.java/clean/src/net/sourceforge/fenixedu/presentationTier/Action/teacher/TeacherAdministrationViewerDispatchAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4382,
8514,
2911,
1767,
3210,
39,
3117,
15298,
12,
1803,
3233,
2874,
16,
4382,
1204,
646,
16,
5411,
9984,
590,
16,
12446,
766,
13,
565,
1216,
478,
275,
697,
1803,
503,
16,
478,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4382,
8514,
2911,
1767,
3210,
39,
3117,
15298,
12,
1803,
3233,
2874,
16,
4382,
1204,
646,
16,
5411,
9984,
590,
16,
12446,
766,
13,
565,
1216,
478,
275,
697,
1803,
503,
16,
478,
27... |
cost += getOriginalJumpMP()*getOriginalJumpMP()*weight*200; | public double getCost() { double cost=0; // For future reference, Enhanched-Imaging Cockpit is 400,000. if (getCockpitType() == Mech.COCKPIT_TORSO_MOUNTED) { cost += 750000; } else if (getCockpitType() == Mech.COCKPIT_SMALL) { cost += 175000; } else { cost += 200000; } if(hasEiCockpit()) cost += 200000; cost += 50000;//life support cost += weight*2000;//sensors int muscCost=this.hasTSM()? 16000 : 2000; cost+=muscCost*weight;//musculature int structureCost=400; if(hasEndo() || hasCompositeStructure()) { structureCost=1600; } if(hasReinforcedStructure()) { structureCost=6400; } cost+=structureCost*weight;//IS cost+=2*(150+80+120)*weight;//leg actuators; int numOfLowerArmActuators=0; int numOfHands=0; if ( hasSystem(Mech.ACTUATOR_HAND, Mech.LOC_LARM) ) { numOfHands++; } if ( hasSystem(Mech.ACTUATOR_LOWER_ARM, Mech.LOC_LARM) ) { numOfLowerArmActuators++; } if ( hasSystem(Mech.ACTUATOR_HAND, Mech.LOC_RARM) ) { numOfHands++; } if ( hasSystem(Mech.ACTUATOR_LOWER_ARM, Mech.LOC_RARM) ) { numOfLowerArmActuators++; } cost+=(2*100+numOfLowerArmActuators*50+numOfHands*80)*weight;//arm actuators int engineCost=5000; if(hasXL()) { engineCost=20000; } if(hasLightEngine()) { engineCost=15000; } cost+=(weight*getOriginalWalkMP()*weight*engineCost)/75;//(weight*walk=rating; rating*weight*cost factor = cost of engine. if (getGyroType() == Mech.GYRO_XL) { cost += 750000 * (int)Math.ceil(getOriginalWalkMP()*weight/100f) * 0.5; } else if (getGyroType() == Mech.GYRO_COMPACT) { cost += 400000 * (int)Math.ceil(getOriginalWalkMP()*weight/100f) * 1.5; } else if (getGyroType() == Mech.GYRO_HEAVY_DUTY) { cost += 500000 * (int)Math.ceil(getOriginalWalkMP()*weight/100f) * 2; } else { cost += 300000*(int)Math.ceil(getOriginalWalkMP()*weight/100f); } cost += getOriginalJumpMP()*getOriginalJumpMP()*weight*200; int freeSinks = hasDoubleHeatSinks()? 0 : 10;//num of sinks we don't pay for int sinkCost = hasDoubleHeatSinks()? 6000: 2000; cost += sinkCost*(heatSinks()-freeSinks);//cost of sinks cost += getArmorWeight()*EquipmentType.getArmorCost(armorType);//armor cost += getWeaponsAndEquipmentCost(); double omniCost = 0.0; if (isOmni()) { omniCost = cost*0.25f; } cost+=omniCost; cost*=(1+(weight/100f)); return Math.round(cost); } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/172078b8adefbe88f7423178b650065ed6db8c6a/BipedMech.java/buggy/megamek/src/megamek/common/BipedMech.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1645,
1927,
669,
1435,
288,
3639,
1645,
6991,
33,
20,
31,
3639,
368,
2457,
3563,
2114,
16,
1374,
25842,
2049,
17,
1170,
5755,
385,
975,
84,
305,
353,
7409,
16,
3784,
18,
3639,
309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1645,
1927,
669,
1435,
288,
3639,
1645,
6991,
33,
20,
31,
3639,
368,
2457,
3563,
2114,
16,
1374,
25842,
2049,
17,
1170,
5755,
385,
975,
84,
305,
353,
7409,
16,
3784,
18,
3639,
309... | |
return value; | return value; | public int intValue() { return value; } | 52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyId.java/buggy/org/jruby/RubyId.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
9307,
1435,
288,
202,
2463,
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,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
9307,
1435,
288,
202,
2463,
460,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (value.equals("yes")) | if ("yes".equals(value)) | protected void loadLookAndFeel() throws Exception { // Do we have any preference for this OS ? String syskey = "unix"; if (OsVersion.IS_WINDOWS) { syskey = "windows"; } else if (OsVersion.IS_OSX) { syskey = "mac"; } String laf = null; if (installdata.guiPrefs.lookAndFeelMapping.containsKey(syskey)) { laf = (String) installdata.guiPrefs.lookAndFeelMapping.get(syskey); } // Let's use the system LAF // Resolve whether button icons should be used or not. boolean useButtonIcons = true; if (installdata.guiPrefs.modifier.containsKey("useButtonIcons") && ((String) installdata.guiPrefs.modifier.get("useButtonIcons")) .equalsIgnoreCase("no")) useButtonIcons = false; ButtonFactory.useButtonIcons(useButtonIcons); boolean useLabelIcons = true; if (installdata.guiPrefs.modifier.containsKey("useLabelIcons") && ((String) installdata.guiPrefs.modifier.get("useLabelIcons")) .equalsIgnoreCase("no")) useLabelIcons = false; LabelFactory.setUseLabelIcons(useLabelIcons); if (laf == null) { if (!syskey.equals("mac")) { String syslaf = UIManager.getSystemLookAndFeelClassName(); UIManager.setLookAndFeel(syslaf); if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel) { MetalLookAndFeel.setCurrentTheme(new IzPackMetalTheme()); ButtonFactory.useHighlightButtons(); // Reset the use button icons state because // useHighlightButtons // make it always true. ButtonFactory.useButtonIcons(useButtonIcons); installdata.buttonsHColor = new Color(182, 182, 204); } } lnf = "swing"; return; } // Kunststoff (http://www.incors.org/) if (laf.equals("kunststoff")) { ButtonFactory.useHighlightButtons(); // Reset the use button icons state because useHighlightButtons // make it always true. ButtonFactory.useButtonIcons(useButtonIcons); installdata.buttonsHColor = new Color(255, 255, 255); Class lafClass = Class.forName("com.incors.plaf.kunststoff.KunststoffLookAndFeel"); Class mtheme = Class.forName("javax.swing.plaf.metal.MetalTheme"); Class[] params = { mtheme}; Class theme = Class.forName("com.izforge.izpack.gui.IzPackKMetalTheme"); Method setCurrentThemeMethod = lafClass.getMethod("setCurrentTheme", params); // We invoke and place Kunststoff as our L&F LookAndFeel kunststoff = (LookAndFeel) lafClass.newInstance(); MetalTheme ktheme = (MetalTheme) theme.newInstance(); Object[] kparams = { ktheme}; UIManager.setLookAndFeel(kunststoff); setCurrentThemeMethod.invoke(kunststoff, kparams); lnf = "kunststoff"; return; } // Liquid (http://liquidlnf.sourceforge.net/) if (laf.equals("liquid")) { UIManager.setLookAndFeel("com.birosoft.liquid.LiquidLookAndFeel"); lnf = "liquid"; Map params = (Map) installdata.guiPrefs.lookAndFeelParams.get(laf); if (params.containsKey("decorate.frames")) { String value = (String) params.get("decorate.frames"); if (value.equals("yes")) { JFrame.setDefaultLookAndFeelDecorated(true); } } if (params.containsKey("decorate.dialogs")) { String value = (String) params.get("decorate.dialogs"); if (value.equals("yes")) { JDialog.setDefaultLookAndFeelDecorated(true); } } return; } // Metouia (http://mlf.sourceforge.net/) if (laf.equals("metouia")) { UIManager.setLookAndFeel("net.sourceforge.mlf.metouia.MetouiaLookAndFeel"); lnf = "metouia"; return; } // JGoodies Looks (http://looks.dev.java.net/) if (laf.equals("looks")) { Map variants = new TreeMap(); variants.put("extwin", "com.jgoodies.plaf.windows.ExtWindowsLookAndFeel"); variants.put("plastic", "com.jgoodies.plaf.plastic.PlasticLookAndFeel"); variants.put("plastic3D", "com.jgoodies.plaf.plastic.Plastic3DLookAndFeel"); variants.put("plasticXP", "com.jgoodies.plaf.plastic.PlasticXPLookAndFeel"); String variant = (String) variants.get("plasticXP"); Map params = (Map) installdata.guiPrefs.lookAndFeelParams.get(laf); if (params.containsKey("variant")) { String param = (String) params.get("variant"); if (variants.containsKey(param)) { variant = (String) variants.get(param); } } UIManager.setLookAndFeel(variant); } } | 58440 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58440/98333eede78b9ac1131e72aef96a4d63b6ae031f/GUIInstaller.java/clean/izpack-src/trunk/src/lib/com/izforge/izpack/installer/GUIInstaller.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1262,
9794,
1876,
2954,
292,
1435,
1216,
1185,
565,
288,
3639,
368,
2256,
732,
1240,
1281,
11555,
364,
333,
5932,
692,
3639,
514,
2589,
856,
273,
315,
21136,
14432,
3639,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1262,
9794,
1876,
2954,
292,
1435,
1216,
1185,
565,
288,
3639,
368,
2256,
732,
1240,
1281,
11555,
364,
333,
5932,
692,
3639,
514,
2589,
856,
273,
315,
21136,
14432,
3639,
309,
... |
org.openscience.cdk.interfaces.IAtomType[] atomTypes = getAtomTypeFactory(atom.getBuilder()).getAtomTypes(atom.getSymbol()); | IAtomType[] atomTypes = getAtomTypeFactory(atom.getBuilder()).getAtomTypes(atom.getSymbol()); | public int calculateNumberOfImplicitHydrogens(IAtom atom, double bondOrderSum, double maxBondOrder, int neighbourCount) throws CDKException { int missingHydrogens = 0; if (atom instanceof PseudoAtom) { logger.debug("don't figure it out... it simply does not lack H's"); return 0; } logger.debug("Calculating number of missing hydrogen atoms"); // get default atom org.openscience.cdk.interfaces.IAtomType[] atomTypes = getAtomTypeFactory(atom.getBuilder()).getAtomTypes(atom.getSymbol()); if (atomTypes.length == 0) { logger.warn("Element not found in configuration file: ", atom); return 0; } logger.debug("Found atomtypes: ", atomTypes.length); for (int f = 0; f < atomTypes.length; f++) { org.openscience.cdk.interfaces.IAtomType type = atomTypes[f]; if (couldMatchAtomType(atom, bondOrderSum, maxBondOrder, type)) { logger.debug("This type matches: ", type); int formalNeighbourCount = type.getFormalNeighbourCount(); if (type.getHybridization() == CDKConstants.HYBRIDIZATION_UNSET) { missingHydrogens = (int) (type.getBondOrderSum() - bondOrderSum); } else { switch (atom.getHybridization()) { case CDKConstants.HYBRIDIZATION_SP3: missingHydrogens = formalNeighbourCount - neighbourCount; break; case CDKConstants.HYBRIDIZATION_SP2: missingHydrogens = formalNeighbourCount - neighbourCount; break; case CDKConstants.HYBRIDIZATION_SP1: missingHydrogens = formalNeighbourCount - neighbourCount; break; default: missingHydrogens = (int) (type.getBondOrderSum() - bondOrderSum); } } break; } } logger.debug("missing hydrogens: ", missingHydrogens); return missingHydrogens; } | 46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/55b9d38ca1fa2f6755db09f806da82bf11665b4b/ValencyHybridChecker.java/clean/src/org/openscience/cdk/tools/ValencyHybridChecker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
4604,
9226,
15787,
17507,
9005,
23730,
12,
45,
3641,
3179,
16,
1645,
8427,
2448,
3495,
16,
1645,
943,
9807,
2448,
16,
509,
16497,
1380,
13,
540,
1216,
24570,
288,
3639,
509... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4604,
9226,
15787,
17507,
9005,
23730,
12,
45,
3641,
3179,
16,
1645,
8427,
2448,
3495,
16,
1645,
943,
9807,
2448,
16,
509,
16497,
1380,
13,
540,
1216,
24570,
288,
3639,
509... |
{ } | { return false; } | public boolean supportsConvert() throws SQLException { // XXX-Not Implemented } | 45497 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45497/6a061da272f04e1463864065f87f1f3fd61d6162/DatabaseMetaData.java/clean/src/interfaces/jdbc/postgresql/DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
6146,
2723,
1435,
1216,
6483,
202,
95,
202,
202,
759,
11329,
17,
1248,
18788,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
6146,
2723,
1435,
1216,
6483,
202,
95,
202,
202,
759,
11329,
17,
1248,
18788,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
XFormsUtils.fillNode(pipelineContext, node, newValue, null); | XFormsInstance.setValueForNode(pipelineContext, node, newValue, null); | public void run(PipelineContext pipelineContext, FunctionContext functionContext, String encryptionPassword, Document instance) { // Fill the instance String[] ids = nodeset.split(" "); try { String id = ids[0]; if (XFormsUtils.isNameEncryptionEnabled()) id = SecureUtils.decrypt(pipelineContext, encryptionPassword, id); Integer idInteger = new Integer(Integer.parseInt(id)); Node node = (Node) ((InstanceData) instance.getRootElement().getData()).getIdToNodeMap().get(idInteger); String newValue = value != null ? value : content == null ? "" : content; XFormsUtils.fillNode(pipelineContext, node, newValue, null); } catch (NumberFormatException e) { throw new OXFException("Invalid node-id in setvalue action", e); } } | 54445 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54445/2831e4e1e9d768448c66fe22d29db22228308e74/SetValue.java/clean/src/java/org/orbeon/oxf/processor/xforms/input/action/SetValue.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
12,
8798,
1042,
5873,
1042,
16,
4284,
1042,
445,
1042,
16,
514,
8731,
3913,
16,
4319,
791,
13,
288,
3639,
368,
14192,
326,
791,
3639,
514,
8526,
3258,
273,
2199,
278,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
12,
8798,
1042,
5873,
1042,
16,
4284,
1042,
445,
1042,
16,
514,
8731,
3913,
16,
4319,
791,
13,
288,
3639,
368,
14192,
326,
791,
3639,
514,
8526,
3258,
273,
2199,
278,
1... |
assertTrue(e.getMessage().startsWith(Messages.get("rmi", RmiConnector.MSG_PARAM_SERVICE_METHOD_NOT_SET))); | assertTrue(e.getMessage().startsWith( Messages.get("rmi", RmiConnector.MSG_PARAM_SERVICE_METHOD_NOT_SET))); | public void testNoMethodSet() throws Exception { UMOImmutableEndpoint ep = new ImmutableMuleEndpoint("rmi://localhost/TestService", false); UMOMessageDispatcher dispatcher = rmiConnector.getDispatcher(ep); try { dispatcher.send(getTestEvent("hello", ep)); } catch (UMOException e) { assertTrue(e instanceof DispatchException); assertTrue(e.getMessage().startsWith(Messages.get("rmi", RmiConnector.MSG_PARAM_SERVICE_METHOD_NOT_SET))); } } | 28323 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28323/f22bcd2035487efd91d326568c482912217bbe55/RmiInvocationTestCase.java/buggy/transports/rmi/src/test/java/org/mule/providers/rmi/RmiInvocationTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2279,
1305,
694,
1435,
1216,
1185,
565,
288,
3639,
587,
5980,
16014,
3293,
5529,
273,
394,
7252,
49,
725,
3293,
2932,
8864,
77,
2207,
13014,
19,
4709,
1179,
3113,
629,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2279,
1305,
694,
1435,
1216,
1185,
565,
288,
3639,
587,
5980,
16014,
3293,
5529,
273,
394,
7252,
49,
725,
3293,
2932,
8864,
77,
2207,
13014,
19,
4709,
1179,
3113,
629,
17... |
if (!FileUtils.isReallyParent(_completeFile, f)) | if (!FileUtils.isReallyInParentPath(_completeFile, f)) | TorrentFileSystem(BTData data, int numHashes, long pieceLength, byte [] infoHash) throws IOException { // name of the torrent, also specifying the directory under which to save the torrents. _name = CommonUtils.convertFileName(data.getName()); // we need to check the name of the torrent, security risk! if (_name.length() == 0) throw new ValueException("bad torrent name"); _incompleteFile = new File(SharingSettings.INCOMPLETE_DIRECTORY.getValue(), Base32.encode(infoHash)+File.separator+_name); _completeFile = new File(SharingSettings.getSaveDirectory(), _name); if (!FileUtils.isReallyParent(SharingSettings.getSaveDirectory(), _completeFile)) throw new SaveLocationException(SaveLocationException.SECURITY_VIOLATION, _completeFile); if(data.getFiles() != null) { List<BTData.BTFileData> files = data.getFiles(); List<TorrentFile> torrents = new ArrayList<TorrentFile>(files.size()); for(BTData.BTFileData file : files) { TorrentFile f = new TorrentFile(file.getLength(), new File(_completeFile, file.getPath()).getAbsolutePath()); if (!FileUtils.isReallyParent(_completeFile, f)) throw new SaveLocationException(SaveLocationException.SECURITY_VIOLATION, f); torrents.add(f); } if (files.size() == 0) throw new ValueException("bad metainfo, no files!"); // add the beginning and ending chunks for each file. long position = 0; for (TorrentFile file : torrents) { file.setBegin((int) (position / pieceLength)); position += file.length(); file.setEnd((int) (position / pieceLength)); } _files = torrents; // add folders, for easier conflict checking later on for(String folderPath : data.getFolders()) _folders.add(new File(_completeFile, folderPath)); _folders.add(_completeFile); } else { TorrentFile f = new TorrentFile(data.getLength(), _completeFile.getAbsolutePath()); f.setBegin(0); f.setEnd(numHashes); _files = new ArrayList<TorrentFile>(1); _files.add(f); } _totalSize = calculateTotalSize(_files); } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/c5fb70ffd5771b1350109cf209e77ecb2dffca4c/TorrentFileSystem.java/clean/components/gnutella-core/src/main/java/com/limegroup/bittorrent/TorrentFileSystem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
27266,
547,
11785,
12,
38,
56,
751,
501,
16,
509,
818,
14455,
16,
1525,
11151,
1782,
16,
1160,
5378,
1123,
2310,
13,
225,
202,
15069,
1860,
288,
202,
565,
368,
508,
434,
326,
17351... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
27266,
547,
11785,
12,
38,
56,
751,
501,
16,
509,
818,
14455,
16,
1525,
11151,
1782,
16,
1160,
5378,
1123,
2310,
13,
225,
202,
15069,
1860,
288,
202,
565,
368,
508,
434,
326,
17351... |
else if (month < Calendar.AUGUST) return 31 - (month & 1); | private int getDaysInMonth(int month, int year) { // Most of this is copied from GregorianCalendar.getActualMaximum() if (month == Calendar.FEBRUARY) { return ((year & 3) == 0 && (year % 100 != 0 || year % 400 == 0)) ? 29 : 28; } else if (month < Calendar.AUGUST) return 31 - (month & 1); else return 30 + (month & 1); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/53b78dd1e4587254262f4618d2aa7551de8e0cbf/SimpleTimeZone.java/clean/core/src/classpath/java/java/util/SimpleTimeZone.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
509,
2343,
8271,
382,
5445,
12,
474,
3138,
16,
509,
3286,
13,
225,
288,
565,
368,
22099,
434,
333,
353,
9268,
628,
28033,
18,
588,
11266,
13528,
1435,
565,
309,
261,
7496,
422,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
509,
2343,
8271,
382,
5445,
12,
474,
3138,
16,
509,
3286,
13,
225,
288,
565,
368,
22099,
434,
333,
353,
9268,
628,
28033,
18,
588,
11266,
13528,
1435,
565,
309,
261,
7496,
422,
55... | |
iCodeTop = addStringOp(Token.STRING, name, iCodeTop); itsStackDepth += 2; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addIcode(type == Token.INC ? Icode_PROPINC : Icode_PROPDEC, iCodeTop); itsStackDepth--; | stackChange(1); int op = (type == Token.INC) ? Icode_PROPINC : Icode_PROPDEC; iCodeTop = addStringOp(op, name, iCodeTop); | private int generateICode(Node node, int iCodeTop) { int type = node.getType(); Node child = node.getFirstChild(); Node firstChild = child; int savedStackDepth = itsStackDepth; int stackDelta = 0; // expected stack change for subtree code boolean stackShouldBeZero = false; switch (type) { case Token.FUNCTION : { int fnIndex = node.getExistingIntProp(Node.FUNCTION_PROP); FunctionNode fn = scriptOrFn.getFunctionNode(fnIndex); if (fn.getFunctionType() != FunctionNode.FUNCTION_STATEMENT) { stackDelta = 1; // Only function expressions or function expression // statements needs closure code creating new function // object on stack as function statements are initialized // at script/function start iCodeTop = addIndexOp(Icode_CLOSURE, fnIndex, iCodeTop); stackChange(1); } else { stackShouldBeZero = true; } break; } case Token.SCRIPT : stackShouldBeZero = true; iCodeTop = updateLineNumber(node, iCodeTop); while (child != null) { if (child.getType() != Token.FUNCTION) iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); } break; case Token.CASE : // Skip case condition child = child.getNext(); // fallthrough case Token.LABEL : case Token.LOOP : case Token.DEFAULT : case Token.BLOCK : case Token.EMPTY : stackShouldBeZero = true; iCodeTop = updateLineNumber(node, iCodeTop); while (child != null) { iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); } break; case Token.WITH : ++itsWithDepth; stackShouldBeZero = true; iCodeTop = updateLineNumber(node, iCodeTop); while (child != null) { iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); } --itsWithDepth; break; case Token.LOCAL_BLOCK : stackShouldBeZero = true; if ((itsLocalTop & ~0xFF) != 0) { throw Context.reportRuntimeError( "Program too complex (out of locals)"); } node.putIntProp(Node.LOCAL_PROP, itsLocalTop); ++itsLocalTop; if (itsLocalTop > itsData.itsMaxLocals) { itsData.itsMaxLocals = itsLocalTop; } iCodeTop = updateLineNumber(node, iCodeTop); while (child != null) { iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); } --itsLocalTop; break; case Token.LOCAL_LOAD : { stackDelta = 1; int localIndex = getLocalBlockRef(node); iCodeTop = addIndexOp(Token.LOCAL_LOAD, localIndex, iCodeTop); stackChange(1); break; } case Token.COMMA : stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); while (null != (child = child.getNext())) { if (1 != itsStackDepth - savedStackDepth) Kit.codeBug(); iCodeTop = addToken(Token.POP, iCodeTop); itsStackDepth--; iCodeTop = generateICode(child, iCodeTop); } break; case Token.INIT_LIST : stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); while (null != (child = child.getNext())) { if (1 != itsStackDepth - savedStackDepth) Kit.codeBug(); iCodeTop = addIcode(Icode_DUP, iCodeTop); // No stack adjusting: USE_STACK in subtree will do it iCodeTop = generateICode(child, iCodeTop); iCodeTop = addToken(Token.POP, iCodeTop); itsStackDepth--; } break; case Token.USE_STACK: // Indicates that stack was modified externally, // like placed catch object stackDelta = 1; itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; case Token.SWITCH : { stackShouldBeZero = true; Node.Jump switchNode = (Node.Jump)node; iCodeTop = updateLineNumber(switchNode, iCodeTop); iCodeTop = generateICode(child, iCodeTop); ObjArray cases = (ObjArray) switchNode.getProp(Node.CASES_PROP); for (int i = 0; i < cases.size(); i++) { Node thisCase = (Node)cases.get(i); Node first = thisCase.getFirstChild(); // the case expression is the firstmost child // the rest will be generated when the case // statements are encountered as siblings of // the switch statement. iCodeTop = generateICode(first, iCodeTop); iCodeTop = addIcode(Icode_DUPSECOND, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addToken(Token.SHEQ, iCodeTop); itsStackDepth--; Node.Target target = new Node.Target(); thisCase.addChildAfter(target, first); // If true, Icode_IFEQ_POP will jump and remove case value // from stack iCodeTop = addGoto(target, Icode_IFEQ_POP, iCodeTop); itsStackDepth--; } iCodeTop = addToken(Token.POP, iCodeTop); itsStackDepth--; Node defaultNode = (Node) switchNode.getProp(Node.DEFAULT_PROP); if (defaultNode != null) { Node.Target defaultTarget = new Node.Target(); defaultNode.getFirstChild(). addChildToFront(defaultTarget); iCodeTop = addGoto(defaultTarget, Token.GOTO, iCodeTop); } Node.Target breakTarget = switchNode.target; iCodeTop = addGoto(breakTarget, Token.GOTO, iCodeTop); break; } case Token.TARGET : stackShouldBeZero = true; markTargetLabel((Node.Target)node, iCodeTop); break; case Token.NEW : case Token.CALL : { stackDelta = 1; if (type == Token.NEW) { iCodeTop = generateICode(child, iCodeTop); } else { iCodeTop = generateCallFunAndThis(child, iCodeTop); if (itsStackDepth - savedStackDepth != 2) Kit.codeBug(); } int argCount = 0; while ((child = child.getNext()) != null) { iCodeTop = generateICode(child, iCodeTop); ++argCount; } int callType = node.getIntProp(Node.SPECIALCALL_PROP, Node.NON_SPECIALCALL); if (callType != Node.NON_SPECIALCALL) { // embed line number and source filename iCodeTop = addIndexOp(Icode_CALLSPECIAL, argCount, iCodeTop); iCodeTop = addByte(callType, iCodeTop); iCodeTop = addByte(type == Token.NEW ? 1 : 0, iCodeTop); iCodeTop = addShort(itsLineNumber, iCodeTop); } else { iCodeTop = addIndexOp(type, argCount, iCodeTop); } // adjust stack if (type == Token.NEW) { // f, args -> results itsStackDepth -= argCount; } else { // f, thisObj, args -> results itsStackDepth -= (argCount + 1); } if (argCount > itsData.itsMaxCalleeArgs) itsData.itsMaxCalleeArgs = argCount; break; } case Token.IFEQ : case Token.IFNE : iCodeTop = generateICode(child, iCodeTop); itsStackDepth--; // after the conditional GOTO, really // fall thru... case Token.GOTO : { stackShouldBeZero = true; Node.Target target = ((Node.Jump)node).target; iCodeTop = addGoto(target, (byte) type, iCodeTop); break; } case Token.JSR : { stackShouldBeZero = true; Node.Target target = ((Node.Jump)node).target; iCodeTop = addGoto(target, Icode_GOSUB, iCodeTop); break; } case Token.FINALLY : { stackShouldBeZero = true; // Account for incomming exception or GOTOSUB address ++itsStackDepth; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; int finallyRegister = getLocalBlockRef(node); iCodeTop = addIndexOp(Token.LOCAL_SAVE, finallyRegister, iCodeTop); itsStackDepth--; while (child != null) { iCodeTop = generateICode(child, iCodeTop); if (itsStackDepth != 0) Kit.codeBug(); child = child.getNext(); } iCodeTop = addIndexOp(Icode_RETSUB, finallyRegister, iCodeTop); break; } case Token.AND : case Token.OR : { stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); iCodeTop = addIcode(Icode_DUP, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; int afterSecondJumpStart = iCodeTop; int jump = (type == Token.AND) ? Token.IFNE : Token.IFEQ; iCodeTop = addForwardGoto(jump, iCodeTop); itsStackDepth--; iCodeTop = addToken(Token.POP, iCodeTop); itsStackDepth--; child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); resolveForwardGoto(afterSecondJumpStart, iCodeTop); break; } case Token.HOOK : { stackDelta = 1; Node ifThen = child.getNext(); Node ifElse = ifThen.getNext(); iCodeTop = generateICode(child, iCodeTop); int elseJumpStart = iCodeTop; iCodeTop = addForwardGoto(Token.IFNE, iCodeTop); itsStackDepth--; iCodeTop = generateICode(ifThen, iCodeTop); int afterElseJumpStart = iCodeTop; iCodeTop = addForwardGoto(Token.GOTO, iCodeTop); resolveForwardGoto(elseJumpStart, iCodeTop); itsStackDepth = savedStackDepth; iCodeTop = generateICode(ifElse, iCodeTop); resolveForwardGoto(afterElseJumpStart, iCodeTop); break; } case Token.GETPROP : stackDelta = 1; iCodeTop = visitGetProp(iCodeTop, node, child, false); break; case Token.GETELEM : stackDelta = 1; iCodeTop = visitGetElem(iCodeTop, node, child, false); break; case Token.DELPROP : case Token.BITAND : case Token.BITOR : case Token.BITXOR : case Token.LSH : case Token.RSH : case Token.URSH : case Token.ADD : case Token.SUB : case Token.MOD : case Token.DIV : case Token.MUL : case Token.EQ: case Token.NE: case Token.SHEQ: case Token.SHNE: case Token.IN : case Token.INSTANCEOF : case Token.LE : case Token.LT : case Token.GE : case Token.GT : stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addToken(type, iCodeTop); itsStackDepth--; break; case Token.POS : case Token.NEG : case Token.NOT : case Token.BITNOT : case Token.TYPEOF : case Token.VOID : stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); if (type == Token.VOID) { iCodeTop = addToken(Token.POP, iCodeTop); iCodeTop = addToken(Token.UNDEFINED, iCodeTop); } else { iCodeTop = addToken(type, iCodeTop); } break; case Token.SETPROP : case Token.SETPROP_OP : { stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); int special = node.getIntProp(Node.SPECIAL_PROP_PROP, 0); if (special != 0) { if (type == Token.SETPROP_OP) { iCodeTop = addIcode(Icode_DUP, iCodeTop); if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; if (special == Node.SPECIAL_PROP_PROTO) { iCodeTop = addIcode(Icode_GETPROTO, iCodeTop); } else if (special == Node.SPECIAL_PROP_PARENT) { iCodeTop = addIcode(Icode_GETSCOPEPARENT, iCodeTop); } else { throw badTree(node); } // Compensate for the following USE_STACK itsStackDepth--; } iCodeTop = generateICode(child, iCodeTop); if (special == Node.SPECIAL_PROP_PROTO) { iCodeTop = addIcode(Icode_SETPROTO, iCodeTop); } else if (special == Node.SPECIAL_PROP_PARENT) { iCodeTop = addIcode(Icode_SETPARENT, iCodeTop); } else { throw badTree(node); } itsStackDepth--; } else { iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); if (type == Token.SETPROP_OP) { iCodeTop = addIcode(Icode_DUPSECOND, iCodeTop); iCodeTop = addIcode(Icode_DUPSECOND, iCodeTop); itsStackDepth += 2; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addToken(Token.GETPROP, iCodeTop); itsStackDepth--; // Compensate for the following USE_STACK itsStackDepth--; } iCodeTop = generateICode(child, iCodeTop); iCodeTop = addToken(Token.SETPROP, iCodeTop); itsStackDepth -= 2; } break; } case Token.SETELEM : case Token.SETELEM_OP : stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); if (type == Token.SETELEM_OP) { iCodeTop = addIcode(Icode_DUPSECOND, iCodeTop); iCodeTop = addIcode(Icode_DUPSECOND, iCodeTop); itsStackDepth += 2; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addToken(Token.GETELEM, iCodeTop); itsStackDepth--; // Compensate for the following USE_STACK itsStackDepth--; } iCodeTop = generateICode(child, iCodeTop); iCodeTop = addToken(Token.SETELEM, iCodeTop); itsStackDepth -= 2; break; case Token.SETNAME : stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addStringOp(Token.SETNAME, firstChild.getString(), iCodeTop); itsStackDepth--; break; case Token.TYPEOFNAME : { stackDelta = 1; String name = node.getString(); int index = -1; // use typeofname if an activation frame exists // since the vars all exist there instead of in jregs if (itsInFunctionFlag && !itsData.itsNeedsActivation) index = scriptOrFn.getParamOrVarIndex(name); if (index == -1) { iCodeTop = addStringOp(Icode_TYPEOFNAME, name, iCodeTop); stackChange(1); } else { iCodeTop = addToken(Token.GETVAR, iCodeTop); iCodeTop = addByte(index, iCodeTop); stackChange(1); iCodeTop = addToken(Token.TYPEOF, iCodeTop); } break; } case Token.BINDNAME : case Token.NAME : case Token.STRING : stackDelta = 1; iCodeTop = addStringOp(type, node.getString(), iCodeTop); stackChange(1); break; case Token.INC : case Token.DEC : { stackDelta = 1; int childType = child.getType(); switch (childType) { case Token.GETVAR : { String name = child.getString(); if (itsData.itsNeedsActivation) { iCodeTop = addIcode(Icode_SCOPE, iCodeTop); iCodeTop = addStringOp(Token.STRING, name, iCodeTop); itsStackDepth += 2; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addIcode(type == Token.INC ? Icode_PROPINC : Icode_PROPDEC, iCodeTop); itsStackDepth--; } else { int i = scriptOrFn.getParamOrVarIndex(name); iCodeTop = addIcode(type == Token.INC ? Icode_VARINC : Icode_VARDEC, iCodeTop); iCodeTop = addByte(i, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; } case Token.GETPROP : case Token.GETELEM : { Node getPropChild = child.getFirstChild(); iCodeTop = generateICode(getPropChild, iCodeTop); getPropChild = getPropChild.getNext(); iCodeTop = generateICode(getPropChild, iCodeTop); int icode; if (childType == Token.GETPROP) { icode = (type == Token.INC) ? Icode_PROPINC : Icode_PROPDEC; } else { icode = (type == Token.INC) ? Icode_ELEMINC : Icode_ELEMDEC; } iCodeTop = addIcode(icode, iCodeTop); itsStackDepth--; break; } default : { iCodeTop = addStringOp(type == Token.INC ? Icode_NAMEINC : Icode_NAMEDEC, child.getString(), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; } } break; } case Token.NUMBER : { stackDelta = 1; double num = node.getDouble(); int inum = (int)num; if (inum == num) { if (inum == 0) { iCodeTop = addToken(Token.ZERO, iCodeTop); // Check for negative zero if (1.0 / num < 0.0) { iCodeTop = addToken(Token.NEG, iCodeTop); } } else if (inum == 1) { iCodeTop = addToken(Token.ONE, iCodeTop); } else if ((short)inum == inum) { iCodeTop = addIcode(Icode_SHORTNUMBER, iCodeTop); iCodeTop = addShort(inum, iCodeTop); } else { iCodeTop = addIcode(Icode_INTNUMBER, iCodeTop); iCodeTop = addInt(inum, iCodeTop); } } else { int index = getDoubleIndex(num); iCodeTop = addIndexOp(Token.NUMBER, index, iCodeTop); } stackChange(1); break; } case Token.POPV : stackShouldBeZero = true; // fallthrough case Token.POP : iCodeTop = updateLineNumber(node, iCodeTop); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addToken(type, iCodeTop); itsStackDepth--; break; case Token.ENTERWITH : stackShouldBeZero = true; iCodeTop = generateICode(child, iCodeTop); iCodeTop = addToken(Token.ENTERWITH, iCodeTop); itsStackDepth--; break; case Token.CATCH_SCOPE : stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); iCodeTop = addStringOp(Token.CATCH_SCOPE, node.getString(), iCodeTop); break; case Token.LEAVEWITH : stackShouldBeZero = true; iCodeTop = addToken(Token.LEAVEWITH, iCodeTop); break; case Token.TRY : { stackShouldBeZero = true; Node.Jump tryNode = (Node.Jump)node; int exceptionObjectLocal = getLocalBlockRef(tryNode); Node catchTarget = tryNode.target; Node finallyTarget = tryNode.getFinally(); int tryStart = iCodeTop; int tryEnd = -1; int catchStart = -1; int finallyStart = -1; while (child != null) { boolean generated = false; if (child == catchTarget) { if (tryEnd >= 0) Kit.codeBug(); tryEnd = iCodeTop; catchStart = iCodeTop; markTargetLabel((Node.Target)child, iCodeTop); generated = true; } else if (child == finallyTarget) { if (tryEnd < 0) { tryEnd = iCodeTop; } finallyStart = iCodeTop; markTargetLabel((Node.Target)child, iCodeTop); generated = true; } if (!generated) { iCodeTop = generateICode(child, iCodeTop); } child = child.getNext(); } // [tryStart, tryEnd) contains GOSUB to call finally when it // presents at the end of try code and before return, break // continue that transfer control outside try. // After finally is executed the control will be // transfered back into [tryStart, tryEnd) and exception // handling assumes that the only code executed after // finally returns will be a jump outside try which could not // trigger exceptions. // It does not hold if instruction observer throws during // goto. Currently it may lead to double execution of finally. addExceptionHandler(tryStart, tryEnd, catchStart, finallyStart, itsWithDepth, exceptionObjectLocal); break; } case Token.THROW : stackShouldBeZero = true; iCodeTop = updateLineNumber(node, iCodeTop); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addToken(Token.THROW, iCodeTop); iCodeTop = addShort(itsLineNumber, iCodeTop); itsStackDepth--; break; case Token.RETURN : stackShouldBeZero = true; iCodeTop = updateLineNumber(node, iCodeTop); if (child != null) { iCodeTop = generateICode(child, iCodeTop); iCodeTop = addToken(Token.RETURN, iCodeTop); itsStackDepth--; } else { iCodeTop = addIcode(Icode_RETUNDEF, iCodeTop); } break; case Token.RETURN_POPV : stackShouldBeZero = true; iCodeTop = updateLineNumber(node, iCodeTop); iCodeTop = addToken(Token.RETURN_POPV, iCodeTop); break; case Token.GETVAR : { stackDelta = 1; String name = node.getString(); if (itsData.itsNeedsActivation) { // SETVAR handled this by turning into a SETPROP, but // we can't do that to a GETVAR without manufacturing // bogus children. Instead we use a special op to // push the current scope. iCodeTop = addIcode(Icode_SCOPE, iCodeTop); iCodeTop = addStringOp(Token.STRING, name, iCodeTop); itsStackDepth += 2; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addToken(Token.GETPROP, iCodeTop); itsStackDepth--; } else { int index = scriptOrFn.getParamOrVarIndex(name); iCodeTop = addToken(Token.GETVAR, iCodeTop); iCodeTop = addByte(index, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; } case Token.SETVAR : { stackDelta = 1; if (itsData.itsNeedsActivation) { child.setType(Token.BINDNAME); node.setType(Token.SETNAME); iCodeTop = generateICode(node, iCodeTop); } else { String name = child.getString(); child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); int index = scriptOrFn.getParamOrVarIndex(name); iCodeTop = addToken(Token.SETVAR, iCodeTop); iCodeTop = addByte(index, iCodeTop); } break; } case Token.NULL: case Token.THIS: case Token.THISFN: case Token.FALSE: case Token.TRUE: case Token.UNDEFINED: stackDelta = 1; iCodeTop = addToken(type, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; case Token.ENUM_INIT : stackShouldBeZero = true; iCodeTop = generateICode(child, iCodeTop); iCodeTop = addIndexOp(Token.ENUM_INIT, getLocalBlockRef(node), iCodeTop); stackChange(-1); break; case Token.ENUM_NEXT : case Token.ENUM_ID : stackDelta = 1; iCodeTop = addIndexOp(type, getLocalBlockRef(node), iCodeTop); stackChange(1); break; case Token.REGEXP : { stackDelta = 1; int index = node.getExistingIntProp(Node.REGEXP_PROP); iCodeTop = addIndexOp(Token.REGEXP, index, iCodeTop); stackChange(1); break; } case Token.ARRAYLIT: case Token.OBJECTLIT: stackDelta = 1; iCodeTop = visitLiteral(iCodeTop, node, child); break; default : throw badTree(node); } if (stackDelta != itsStackDepth - savedStackDepth) { //System.out.println("Bad stack delta: type="+Token.name(type)+" expected="+stackDelta+" real="+ (itsStackDepth - savedStackDepth)); Kit.codeBug(); } if (stackShouldBeZero && !(stackDelta == 0 && itsStackDepth == 0)) { Kit.codeBug(); } return iCodeTop; } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/03911d128e17ed128bb1934f6e59ce577eb60acc/Interpreter.java/clean/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
2103,
45,
1085,
12,
907,
756,
16,
509,
277,
1085,
3401,
13,
565,
288,
3639,
509,
618,
273,
756,
18,
588,
559,
5621,
3639,
2029,
1151,
273,
756,
18,
588,
3759,
1763,
5621,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
2103,
45,
1085,
12,
907,
756,
16,
509,
277,
1085,
3401,
13,
565,
288,
3639,
509,
618,
273,
756,
18,
588,
559,
5621,
3639,
2029,
1151,
273,
756,
18,
588,
3759,
1763,
5621,
3... |
getColorAndFontCollector().setFontsAndColors(element); getColorAndFontCollector().applyFontsAndColors(ti); } } | getColorAndFontCollector().setFontsAndColors(element); getColorAndFontCollector().applyFontsAndColors(ti); } } | protected void doUpdateItem(Item item, Object element) { // update icon and label // Similar code in TableTreeViewer.doUpdateItem() IBaseLabelProvider prov = getLabelProvider(); ITableLabelProvider tprov = null; if (prov instanceof ITableLabelProvider) { tprov = (ITableLabelProvider) prov; } int columnCount = tableTree.getTable().getColumnCount(); TableTreeItem ti = (TableTreeItem) item; // Also enter loop if no columns added. See 1G9WWGZ: JFUIF:WINNT - TableViewer with 0 columns does not work for (int column = 0; column < columnCount || column == 0; column++) { String text = "";//$NON-NLS-1$ Image image = null; if (tprov != null) { text = tprov.getColumnText(element, column); image = tprov.getColumnImage(element, column); } else { if (column == 0) { ViewerLabel updateLabel = new ViewerLabel(item .getText(), item.getImage()); buildLabel(updateLabel,element); //As it is possible for user code to run the event //loop check here. if (item.isDisposed()) { unmapElement(element, item); return; } text = updateLabel.getText(); image = updateLabel.getImage(); } } //Avoid setting text to null if(text == null) { text = ""; //$NON-NLS-1$ } ti.setText(column, text); // Apparently a problem to setImage to null if already null if (ti.getImage(column) != image) { ti.setImage(column, image); } getColorAndFontCollector().setFontsAndColors(element); getColorAndFontCollector().applyFontsAndColors(ti); } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/98f48f47b2fd4c2b264a8e2e689bcbe9c594c5d2/TableTreeViewer.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TableTreeViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
741,
1891,
1180,
12,
1180,
761,
16,
1033,
930,
13,
288,
3639,
368,
1089,
4126,
471,
1433,
3639,
368,
22967,
981,
316,
3555,
2471,
18415,
18,
2896,
1891,
1180,
1435,
3639,
467,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
1891,
1180,
12,
1180,
761,
16,
1033,
930,
13,
288,
3639,
368,
1089,
4126,
471,
1433,
3639,
368,
22967,
981,
316,
3555,
2471,
18415,
18,
2896,
1891,
1180,
1435,
3639,
467,
... |
return iD != ID_EDEFAULT; | return ((eFlags & ID_EFLAG) != 0) != ID_EDEFAULT; | public boolean eIsSet(EStructuralFeature eFeature) { switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) { case DTDPackage.DTD_ATTRIBUTE__EANNOTATIONS : return eAnnotations != null && !getEAnnotations().isEmpty(); case DTDPackage.DTD_ATTRIBUTE__NAME : return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case DTDPackage.DTD_ATTRIBUTE__ETYPE : return eType != null; case DTDPackage.DTD_ATTRIBUTE__CHANGEABLE : return changeable != CHANGEABLE_EDEFAULT; case DTDPackage.DTD_ATTRIBUTE__VOLATILE : return volatile_ != VOLATILE_EDEFAULT; case DTDPackage.DTD_ATTRIBUTE__TRANSIENT : return transient_ != TRANSIENT_EDEFAULT; case DTDPackage.DTD_ATTRIBUTE__UNIQUE : return unique != UNIQUE_EDEFAULT; case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_LITERAL : return DEFAULT_VALUE_LITERAL_EDEFAULT == null ? defaultValueLiteral != null : !DEFAULT_VALUE_LITERAL_EDEFAULT.equals(defaultValueLiteral); case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE : return getDefaultValue() != null; case DTDPackage.DTD_ATTRIBUTE__LOWER_BOUND : return lowerBound != LOWER_BOUND_EDEFAULT; case DTDPackage.DTD_ATTRIBUTE__UPPER_BOUND : return upperBound != UPPER_BOUND_EDEFAULT; case DTDPackage.DTD_ATTRIBUTE__MANY : return isMany() != false; case DTDPackage.DTD_ATTRIBUTE__REQUIRED : return isRequired() != false; case DTDPackage.DTD_ATTRIBUTE__ECONTAINING_CLASS : return getEContainingClass() != null; case DTDPackage.DTD_ATTRIBUTE__UNSETTABLE : return unsettable != UNSETTABLE_EDEFAULT; case DTDPackage.DTD_ATTRIBUTE__ID : return iD != ID_EDEFAULT; case DTDPackage.DTD_ATTRIBUTE__EATTRIBUTE_TYPE : return basicGetEAttributeType() != null; case DTDPackage.DTD_ATTRIBUTE__COMMENT : return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment); case DTDPackage.DTD_ATTRIBUTE__DEFAULT_KIND : return defaultKind != DEFAULT_KIND_EDEFAULT; case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_STRING : return DEFAULT_VALUE_STRING_EDEFAULT == null ? defaultValueString != null : !DEFAULT_VALUE_STRING_EDEFAULT.equals(defaultValueString); case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY : return attributeNameReferencedEntity != null; case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY : return attributeTypeReferencedEntity != null; case DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT : return getDTDElement() != null; } return eDynamicIsSet(eFeature); } | 13989 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13989/a55c66c7e7342eb8cf757012799d1f83d30bd1bd/DTDAttributeImpl.java/buggy/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDAttributeImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
20372,
12,
41,
14372,
4595,
425,
4595,
13,
288,
202,
202,
9610,
261,
73,
21007,
14372,
4595,
734,
12,
73,
4595,
18,
588,
4595,
734,
9334,
425,
4595,
18,
588,
2170,
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,
225,
202,
482,
1250,
20372,
12,
41,
14372,
4595,
425,
4595,
13,
288,
202,
202,
9610,
261,
73,
21007,
14372,
4595,
734,
12,
73,
4595,
18,
588,
4595,
734,
9334,
425,
4595,
18,
588,
2170,
797,
... |
mCustomUnitsField.setEnabled(enable); | mCustomUnitsEditor.setEnabled(enable); | public void propertyValueChanged(ConfigElementEvent evt) { if ( evt.getProperty().equals("device_units") ) { Object value = mElement.getProperty("device_units", 0); boolean enable = ((Number) value).floatValue() == 0.0; mCustomUnitsField.setEnabled(enable); } } | 7933 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7933/020c421e82dddaec4050dafdcc51328460d240e3/TransmitterTransformPanel.java/buggy/modules/vrjuggler/vrjconfig/commoneditors/org/vrjuggler/vrjconfig/commoneditors/TransmitterTransformPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
12337,
5033,
12,
809,
1046,
1133,
6324,
13,
1377,
288,
540,
309,
261,
6324,
18,
588,
1396,
7675,
14963,
2932,
5964,
67,
7705,
7923,
262,
540,
288,
5411,
1033,
460,
273,
312,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
12337,
5033,
12,
809,
1046,
1133,
6324,
13,
1377,
288,
540,
309,
261,
6324,
18,
588,
1396,
7675,
14963,
2932,
5964,
67,
7705,
7923,
262,
540,
288,
5411,
1033,
460,
273,
312,
... |
public org.quickfix.field.TradSesMethod getTradSesMethod() throws FieldNotFound { org.quickfix.field.TradSesMethod value = new org.quickfix.field.TradSesMethod(); | public quickfix.field.TradSesMethod getTradSesMethod() throws FieldNotFound { quickfix.field.TradSesMethod value = new quickfix.field.TradSesMethod(); | public org.quickfix.field.TradSesMethod getTradSesMethod() throws FieldNotFound { org.quickfix.field.TradSesMethod value = new org.quickfix.field.TradSesMethod(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/TradingSessionStatus.java/buggy/src/java/src/quickfix/fix43/TradingSessionStatus.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
1609,
72,
55,
281,
1305,
336,
1609,
72,
55,
281,
1305,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
1609,
72,
55,
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,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
1609,
72,
55,
281,
1305,
336,
1609,
72,
55,
281,
1305,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
1609,
72,
55,
28... |
public void showMessageDialog(String pMessage, String pTitle) { final String message = pMessage; final String title = pTitle; Runnable runMe = new Runnable() { public void run() { JOptionPane.showInternalMessageDialog((JDesktopPane)Pooka.getMainPanel().getContentPanel(), message, title, JOptionPane.PLAIN_MESSAGE); } }; if (! SwingUtilities.isEventDispatchThread()) { try { SwingUtilities.invokeAndWait(runMe); } catch (Exception e) { } } else { runMe.run(); } } | 967 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/967/538edc8a94ad8ef2062ef68f8ea643b251c1a947/MessageInternalFrame.java/clean/src/net/suberic/pooka/gui/MessageInternalFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2405,
1079,
6353,
12,
780,
293,
1079,
16,
514,
293,
4247,
13,
288,
565,
727,
514,
883,
273,
293,
1079,
31,
565,
727,
514,
2077,
273,
293,
4247,
31,
3639,
10254,
1086,
4667,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2405,
1079,
6353,
12,
780,
293,
1079,
16,
514,
293,
4247,
13,
288,
565,
727,
514,
883,
273,
293,
1079,
31,
565,
727,
514,
2077,
273,
293,
4247,
31,
3639,
10254,
1086,
4667,
... | ||
/* if (path.isNil()) { | if (tmp.isNil()) { | public RubyString getClassname() { RubyString path = null; RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass)rbModule).getSuperClass(); } if (rbModule == null) { rbModule = getRuby().getObjectClass(); } path = (RubyString)getInstanceVariables().get("__classpath__"); if (path != null) { if (getInstanceVariables().get("__classid__") != null) { path = RubyString.m_newString(getRuby(), ((RubyId)getInstanceVariables().get("__classid__")).toName()); // todo: convert from symbol to string getInstanceVariables().put("__classpath__", path); getInstanceVariables().remove("__classid__"); } } if (path == null) { path = rbModule.findClassPath(); /* if (path.isNil()) { return null; }*/ return path; } /*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ return path; } | 49476 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49476/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RubyModule.java/clean/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
780,
2900,
529,
1435,
288,
3639,
19817,
780,
589,
273,
446,
31,
7734,
19817,
3120,
7138,
3120,
273,
333,
31,
3639,
1323,
261,
6731,
3120,
18,
291,
19323,
1435,
747,
7138,
312... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
780,
2900,
529,
1435,
288,
3639,
19817,
780,
589,
273,
446,
31,
7734,
19817,
3120,
7138,
3120,
273,
333,
31,
3639,
1323,
261,
6731,
3120,
18,
291,
19323,
1435,
747,
7138,
312... |
gd.horizontalAlignment = gd.FILL; | gd.horizontalAlignment = GridData.FILL; | protected void doFillIntoGrid(Composite parent, int numColumns) { Control control = getLabelControl(parent); valueControl = getValueControl(parent); GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = numColumns - 2; valueControl.setLayoutData(gd); changeFontButton = getChangeControl(parent); gd = new GridData(); gd.horizontalAlignment = gd.FILL; gd.heightHint = convertVerticalDLUsToPixels(changeFontButton, IDialogConstants.BUTTON_HEIGHT); int widthHint = convertHorizontalDLUsToPixels(changeFontButton, IDialogConstants.BUTTON_WIDTH); gd.widthHint = Math.max(widthHint, changeFontButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x); changeFontButton.setLayoutData(gd); control = getPreviewControl(); if (control != null) { gd = new GridData(); gd.horizontalAlignment = gd.FILL; gd.horizontalSpan = numColumns; gd.heightHint = previewer.getPreferredHeight(); control.setLayoutData(gd); }} | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/02ba77e383bb608847bcbeec7cbb2c08f1e26a2a/FontFieldEditor.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/FontFieldEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
741,
8026,
5952,
6313,
12,
9400,
982,
16,
509,
30109,
13,
288,
202,
3367,
3325,
273,
11237,
3367,
12,
2938,
1769,
202,
1132,
3367,
273,
2366,
3367,
12,
2938,
1769,
202,
6313,
751,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
741,
8026,
5952,
6313,
12,
9400,
982,
16,
509,
30109,
13,
288,
202,
3367,
3325,
273,
11237,
3367,
12,
2938,
1769,
202,
1132,
3367,
273,
2366,
3367,
12,
2938,
1769,
202,
6313,
751,
... |
throw new MessageInvalidException(ProtocolErrorMessage.INVALID_MESSAGE, "PersistentPut goes from server to client not the other way around", identifier); | throw new MessageInvalidException(ProtocolErrorMessage.INVALID_MESSAGE, "PersistentPut goes from server to client not the other way around", identifier, global); | public void run(FCPConnectionHandler handler, Node node) throws MessageInvalidException { throw new MessageInvalidException(ProtocolErrorMessage.INVALID_MESSAGE, "PersistentPut goes from server to client not the other way around", identifier); } | 51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/bbb3c23ec38ea1c7abb48040a17f5fc7932248bc/PersistentPutDir.java/clean/src/freenet/node/fcp/PersistentPutDir.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
12,
42,
4258,
1952,
1503,
1838,
16,
2029,
756,
13,
1082,
202,
15069,
2350,
1941,
503,
288,
202,
202,
12849,
394,
2350,
1941,
503,
12,
5752,
14935,
18,
9347,
67,
872... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
12,
42,
4258,
1952,
1503,
1838,
16,
2029,
756,
13,
1082,
202,
15069,
2350,
1941,
503,
288,
202,
202,
12849,
394,
2350,
1941,
503,
12,
5752,
14935,
18,
9347,
67,
872... |
repaint(); | this.repaint(); | public void setSindex(int s) { if (s != m_sIndex) { m_shapePoints = null; m_createShape = false; } m_sIndex = s; repaint(); } | 4773 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4773/dc64e78e5cb981247dcf5060d192c6dbdf43d5cd/VisualizePanel.java/buggy/weka/gui/explorer/VisualizePanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
13928,
1615,
12,
474,
272,
13,
288,
1377,
309,
261,
87,
480,
312,
67,
87,
1016,
13,
288,
202,
81,
67,
4867,
5636,
273,
446,
31,
202,
81,
67,
2640,
8500,
273,
629,
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,
377,
1071,
918,
13928,
1615,
12,
474,
272,
13,
288,
1377,
309,
261,
87,
480,
312,
67,
87,
1016,
13,
288,
202,
81,
67,
4867,
5636,
273,
446,
31,
202,
81,
67,
2640,
8500,
273,
629,
31,
137... |
this.stripWicketParamTag = settings.getStripWicketParamTag(); | this.stripWicketTag = settings.getStripWicketTag(); | public void configure(ApplicationSettings settings) { this.componentNameAttribute = settings.getComponentNameAttribute(); this.stripWicketParamTag = settings.getStripWicketParamTag(); this.stripComments = settings.getStripComments(); this.compressWhitespace = settings.getCompressWhitespace(); this.automaticLinking = settings.getAutomaticLinking(); this.stripWicketFromComponentTag = settings.getStripComponentNames(); } | 46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/5be84663c2eb913369fea8910ad1faa19158db62/MarkupParser.java/clean/wicket/src/java/wicket/markup/MarkupParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
5068,
12,
3208,
2628,
1947,
13,
202,
95,
3639,
333,
18,
4652,
461,
1499,
273,
1947,
18,
588,
1841,
461,
1499,
5621,
3639,
333,
18,
6406,
59,
29378,
1805,
273,
1947,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
5068,
12,
3208,
2628,
1947,
13,
202,
95,
3639,
333,
18,
4652,
461,
1499,
273,
1947,
18,
588,
1841,
461,
1499,
5621,
3639,
333,
18,
6406,
59,
29378,
1805,
273,
1947,
18,
... |
public Collection prerequisiteGoals(Scheduler scheduler) { X10Scheduler x10Sched = (X10Scheduler) scheduler; List<Goal> l = new ArrayList<Goal>(); l.add(x10Sched.Disambiguated(job)); l.add(x10Sched.TypePropagated(job)); // l.add(x10sched.TypesElaboratedForJobs()); l.addAll(super.prerequisiteGoals(scheduler)); return l; } | 1832 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1832/f8e1720cd66996a6339b992bf154aa0d019240a3/ExtensionInfo.java/clean/x10.compiler/src/polyglot/ext/x10/ExtensionInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2200,
30328,
16608,
1137,
5741,
1031,
12,
11870,
8129,
13,
288,
202,
202,
60,
2163,
11870,
619,
2163,
55,
2049,
273,
261,
60,
2163,
11870,
13,
8129,
31,
202,
682,
32,
27716,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2200,
30328,
16608,
1137,
5741,
1031,
12,
11870,
8129,
13,
288,
202,
202,
60,
2163,
11870,
619,
2163,
55,
2049,
273,
261,
60,
2163,
11870,
13,
8129,
31,
202,
682,
32,
27716,
3... | ||
int size = this._valueList.size(); org.exolab.castor.tests.framework.testDescriptor.Value[] array = new org.exolab.castor.tests.framework.testDescriptor.Value[size]; for (int index = 0; index < size; index++){ array[index] = (org.exolab.castor.tests.framework.testDescriptor.Value) _valueList.get(index); | if (index < 0 || index >= this._valueList.size()) { throw new IndexOutOfBoundsException("getValue: Index value '" + index + "' not in range [0.." + (this._valueList.size() - 1) + "]"); | public org.exolab.castor.tests.framework.testDescriptor.Value[] getValue() { int size = this._valueList.size(); org.exolab.castor.tests.framework.testDescriptor.Value[] array = new org.exolab.castor.tests.framework.testDescriptor.Value[size]; for (int index = 0; index < size; index++){ array[index] = (org.exolab.castor.tests.framework.testDescriptor.Value) _valueList.get(index); } return array; } //-- org.exolab.castor.tests.framework.testDescriptor.Value[] getValue() | 57307 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57307/944d2a6307b12265358614111f0785d1668b34cc/CallMethod.java/buggy/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/CallMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2358,
18,
338,
355,
378,
18,
4155,
280,
18,
16341,
18,
12303,
18,
3813,
3187,
18,
620,
8526,
2366,
1435,
565,
288,
3639,
509,
963,
273,
333,
6315,
1132,
682,
18,
1467,
5621,
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,
2358,
18,
338,
355,
378,
18,
4155,
280,
18,
16341,
18,
12303,
18,
3813,
3187,
18,
620,
8526,
2366,
1435,
565,
288,
3639,
509,
963,
273,
333,
6315,
1132,
682,
18,
1467,
5621,
3639,... |
TreePath parentPath = internalGetSorterParentPath(parent, sorter); | protected int indexForElement(Widget parent, Object element) { ViewerSorter sorter = getSorter(); Item[] items = getChildren(parent); int count = items.length; if (sorter == null) return count; int min = 0, max = count - 1; while (min <= max) { int mid = (min + max) / 2; Object data = items[mid].getData(); int compare = sorter.compare(this, data, element); if (compare == 0) { // find first item > element while (compare == 0) { ++mid; if (mid >= count) { break; } data = items[mid].getData(); compare = sorter.compare(this, data, element); } return mid; } if (compare < 0) min = mid + 1; else max = mid - 1; } return min; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/990698bdd0a4b0271c66c276d567bcde732bfa70/AbstractTreeViewer.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4902,
743,
17743,
273,
2713,
967,
24952,
3054,
743,
12,
2938,
16,
19867,
1769,
4902,
743,
17743,
273,
2713,
967,
24952,
3054,
743,
12,
2938,
16,
19867,
1769,
4902,
743,
17743,
273,
2713,
967,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4902,
743,
17743,
273,
2713,
967,
24952,
3054,
743,
12,
2938,
16,
19867,
1769,
4902,
743,
17743,
273,
2713,
967,
24952,
3054,
743,
12,
2938,
16,
19867,
1769,
4902,
743,
17743,
273,
2713,
967,
... | |
s = s.trim(); if("true".equals(s)) return TRUE; else if("false".equals(s)) return FALSE; else if(isInt(s)) | final Interpreter ip = new Interpreter(); try | Value evaluate(String s) { assert !file.repository.isBuildStage(); //System.out.println("--------------evaluate-"+name+"--"+s+"--"); s = s.trim(); if("true".equals(s)) return TRUE; else if("false".equals(s)) return FALSE; else if(isInt(s)) { try { return new Value(Integer.parseInt(s)); } catch(NumberFormatException e) { throw new RuntimeException(e); } } else if(isString(s)) { return new Value(s.substring(1, s.length()-1)); } else if(s.startsWith(NEW)) { s = s.substring(NEW.length()); final int openParent = s.indexOf('('); if(openParent<=0) throw new RuntimeException(s); final String newClassName = s.substring(0, openParent); // TODO make a function Class newClass; try { newClass = file.findType(newClassName.trim()); } catch(InjectorParseException e) { if(newClassName.endsWith("Hash")) newClass = AnyHash.class; else throw new RuntimeException(e); } if(!Feature.class.isAssignableFrom(newClass)) throw new RuntimeException(newClass.toString()); final int closeParent = s.lastIndexOf(')'); if(closeParent<=openParent) throw new RuntimeException(s); final Value[] arguments = evaluateArgumentList(s.substring(openParent+1, closeParent)); final Class insteadOfAny; if(newClass==EnumAttribute.class) insteadOfAny = EnumValue.class; else if(newClass==ItemAttribute.class) insteadOfAny = Item.class; else insteadOfAny = null; final Object[] argumentInstances = toInstances(arguments, insteadOfAny); final Class[] argumentClasses = toClasses(arguments); final Constructor constructor; try { constructor = findConstructor(newClass, argumentClasses); } catch(NoSuchMethodException e) { throw new RuntimeException(e); } try { return new Value(constructor.newInstance(argumentInstances), newClass); } catch(InstantiationException e) { throw new RuntimeException(e); } catch(InvocationTargetException e) { throw new RuntimeException(e.getTargetException()); } catch(IllegalAccessException e) { throw new RuntimeException(e); } } else if(getAttribute(s)!=null) { final JavaAttribute a = getAttribute(s); if((a.modifier & (Modifier.STATIC|Modifier.FINAL))!=(Modifier.STATIC|Modifier.FINAL)) throw new RuntimeException(a.toString()+'-'+Modifier.toString(a.modifier)); //System.out.println("----------"+feature.toString()); return a.evaluate(); } else if(s.endsWith(CLASS)) { final String className = s.substring(0, s.length()-CLASS.length()); try { return new Value(file.findType(className.trim()), Class.class); } catch(InjectorParseException e) { return ANY_CLASS; } } else { final int dot = s.indexOf('.'); if(dot>=0) { final String prefix = s.substring(0, dot); final String postfix = s.substring(dot+1); CopeType aClass = null; try { aClass = file.repository.getCopeType(prefix); } catch(RuntimeException e) { if(!e.getMessage().startsWith("no cope type for ")) // TODO better exception throw new RuntimeException("bad exception", e); } if(aClass!=null) { return aClass.javaClass.evaluate(postfix); } else { final Value left = evaluate(prefix); int openParent = postfix.indexOf('('); if(openParent<0) throw new RuntimeException(postfix); final String featureName = postfix.substring(0, openParent); final int closeParent = postfix.lastIndexOf(')'); if(closeParent<=openParent) throw new RuntimeException(s); final Value[] arguments = evaluateArgumentList(postfix.substring(openParent+1, closeParent)); final Object[] argumentInstances = toInstances(arguments, null); final Class[] argumentClasses = toClasses(arguments); final Method m; try { m = findMethod(left.clazz, featureName, argumentClasses); } catch(NoSuchMethodException e2) { throw new RuntimeException(e2); } try { return new Value(m.invoke(left.instance, argumentInstances), m.getReturnType()); } catch(IllegalAccessException e2) { throw new RuntimeException(e2); } catch(InvocationTargetException e2) { throw new RuntimeException(e2.getTargetException()); } } } else { int openParent = s.indexOf('('); if(openParent>=0) { final String methodName = s.substring(0, openParent); final int closeParent = s.lastIndexOf(')'); if(closeParent<=openParent) throw new RuntimeException(s); final Value[] arguments = evaluateArgumentList(s.substring(openParent+1, closeParent)); final Object[] argumentInstances = toInstances(arguments, null); final Class[] argumentClasses = toClasses(arguments); final Method m; try { m = findMethod(Item.class, methodName, argumentClasses); } catch(NoSuchMethodException e2) { throw new RuntimeException(e2); } try { return new Value(m.invoke(null, argumentInstances), m.getReturnType()); } catch(IllegalAccessException e2) { throw new RuntimeException(s, e2); } catch(InvocationTargetException e2) { throw new RuntimeException(s, e2.getTargetException()); } } else { try { final Field f = Item.class.getField(s); final int m = f.getModifiers(); if((m & (Modifier.STATIC|Modifier.FINAL))!=(Modifier.STATIC|Modifier.FINAL)) throw new RuntimeException(f.toString()+'-'+Modifier.toString(m)); //System.out.println("----------"+f.getName()); final Object value = f.get(null); //System.out.println("----------"+value.toString()); return new Value(value, f.getType()); } catch(NoSuchFieldException e) { throw new RuntimeException(s, e); } catch(IllegalAccessException e) { throw new RuntimeException(s, e); } } } } } | 50290 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50290/8f72cc50c038be129639e96b05da7c994236335b/JavaClass.java/clean/instrument/src/com/exedio/cope/instrument/JavaClass.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
620,
5956,
12,
780,
272,
13,
202,
95,
202,
202,
11231,
401,
768,
18,
9071,
18,
291,
3116,
8755,
5621,
202,
202,
759,
3163,
18,
659,
18,
8222,
2932,
17908,
21024,
10951,
15,
529,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
620,
5956,
12,
780,
272,
13,
202,
95,
202,
202,
11231,
401,
768,
18,
9071,
18,
291,
3116,
8755,
5621,
202,
202,
759,
3163,
18,
659,
18,
8222,
2932,
17908,
21024,
10951,
15,
529,
... |
long[] data = new long[8]; data[0]=-2593835568731268616L; | long[] data = new long[2048]; data[0]=-2593835568731268609L; | private static final long[] mk_tokenSet_0() { long[] data = new long[8]; data[0]=-2593835568731268616L; data[1]=-2L; for (int i = 2; i<=3; i++) { data[i]=-1L; } return data; } | 48756 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48756/5049f6eadb6eff8f7d24ae4a36bc564cb893e02c/PerlBaseLexer.java/clean/org.epic.debug/src/org/epic/debug/varparser/PerlBaseLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
727,
1525,
8526,
5028,
67,
2316,
694,
67,
20,
1435,
288,
202,
202,
5748,
8526,
501,
273,
394,
1525,
63,
28,
15533,
202,
202,
892,
63,
20,
65,
29711,
2947,
29,
7414,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1525,
8526,
5028,
67,
2316,
694,
67,
20,
1435,
288,
202,
202,
5748,
8526,
501,
273,
394,
1525,
63,
28,
15533,
202,
202,
892,
63,
20,
65,
29711,
2947,
29,
7414,
23... |
case 114: return jjMoveStringLiteralDfa2_4(active0, 0x100000L); | private final int jjMoveStringLiteralDfa1_4(long active0){ try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_4(0, active0); return 1; } switch(curChar) { case 35: if ((active0 & 0x200L) != 0L) return jjStopAtPos(1, 9); break; case 42: if ((active0 & 0x800L) != 0L) return jjStartNfaWithStates_4(1, 11, 0); break; case 97: return jjMoveStringLiteralDfa2_4(active0, 0x200000L); case 114: return jjMoveStringLiteralDfa2_4(active0, 0x100000L); default : break; } return jjStartNfa_4(0, active0);} | 55820 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55820/983675edbbab0e381643fec9c2a3e765c2f88830/ParserTokenManager.java/buggy/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
727,
509,
10684,
7607,
28565,
40,
507,
21,
67,
24,
12,
5748,
2695,
20,
15329,
282,
775,
288,
662,
2156,
273,
810,
67,
3256,
18,
896,
2156,
5621,
289,
282,
1044,
12,
6290,
18,
1594,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
727,
509,
10684,
7607,
28565,
40,
507,
21,
67,
24,
12,
5748,
2695,
20,
15329,
282,
775,
288,
662,
2156,
273,
810,
67,
3256,
18,
896,
2156,
5621,
289,
282,
1044,
12,
6290,
18,
1594,
1... | |
if(leftDocked) { if(rightDocked) { | if (leftDocked) { if (rightDocked) { | void check(Component comp) { Component thisParent = finalThis.getParent(); if(thisParent == null) { return; } Component parent = finalT1.getParent(); boolean leftDocked = true; boolean rightDocked = true; boolean adjustVerticalSplit = false; if(parent != null) { if(parent != finalP1) { while(!(parent instanceof JFrame)) { parent = parent.getParent(); } JFrame frame = (JFrame)parent; finalDb.addTopLevel("Variables", frame); // We need the following hacks because: // - We want an undocked toolbar to be // resizable. // - We are using JToolbar as a container of a // JComboBox. Without this JComboBox's popup // can get left floating when the toolbar is // re-docked. // // We make the frame resizable and then // remove JToolbar's window listener // and insert one of our own that first ensures // the JComboBox's popup window is closed // and then calls JToolbar's window listener. if(!frame.isResizable()) { frame.setResizable(true); frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); final EventListener[] l = frame.getListeners(WindowListener.class); frame.removeWindowListener((WindowListener)l[0]); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { context.hidePopup(); ((WindowListener)l[0]).windowClosing(e); } }); //adjustVerticalSplit = true; } leftDocked = false; } else { leftDocked = true; } } parent = finalT2.getParent(); if(parent != null) { if(parent != finalP2) { while(!(parent instanceof JFrame)) { parent = parent.getParent(); } JFrame frame = (JFrame)parent; finalDb.addTopLevel("Evaluate", frame); frame.setResizable(true); rightDocked = false; } else { rightDocked = true; } } if(leftDocked && t2Docked && rightDocked && t2Docked) { // no change return; } t1Docked = leftDocked; t2Docked = rightDocked; JSplitPane split = (JSplitPane)thisParent; if(leftDocked) { if(rightDocked) { finalSplit.setDividerLocation(0.5); } else { finalSplit.setDividerLocation(1.0); } if(adjustVerticalSplit) { split.setDividerLocation(0.66); } } else if(rightDocked) { finalSplit.setDividerLocation(0.0); split.setDividerLocation(0.66); } else { // both undocked split.setDividerLocation(1.0); } } | 12904 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12904/5b760bc86060749267746b7d77c0c8da1d3b9c1d/Main.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
918,
866,
12,
1841,
1161,
13,
288,
10792,
5435,
333,
3054,
273,
727,
2503,
18,
588,
3054,
5621,
10792,
309,
12,
2211,
3054,
422,
446,
13,
288,
13491,
327,
31,
10792,
289,
10792,
5435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
918,
866,
12,
1841,
1161,
13,
288,
10792,
5435,
333,
3054,
273,
727,
2503,
18,
588,
3054,
5621,
10792,
309,
12,
2211,
3054,
422,
446,
13,
288,
13491,
327,
31,
10792,
289,
10792,
5435,
... |
VM.sysWriteln("[ Back to printing stack trace # ", traceIndex, | VM.sysWriteln("[ Retrying printing stack trace # ", traceIndex, | public void print(PrintLN out, Throwable trigger) { boolean printed = false; try { VM.sysWriteln("VM_StackTrace.print(): Printing Stack Trace # ", traceIndex); print4Real(out, trigger); printed = true; } catch (OutOfMemoryError e) { trigger.tallyOutOfMemoryError(); VM.sysWriteln("VM_StackTrace.print(): OutOfMemoryError while printing stack trace # ", traceIndex); } catch (Throwable e) { trigger.tallyWeirdError(); VM.sysWriteln("VM_StackTrace.print(): *UNEXPECTED* Throwable while displaying stack trace # ", traceIndex); VM.sysWrite(" The Throwable was: "); e.sysWrite(); VM.sysWriteln("VM_StackTrace.print(): And its stack trace was:"); e.sysWriteStackTrace(); } finally { if (printed) return; // all is well if (out.isSysWrite()) { VM.sysWriteln("[ Aborting stack trace # ", traceIndex, " ; already was printing with sysWrite()]"); return; } VM.sysWriteln("[ Back to printing stack trace # ", traceIndex, "; using sysWrite(), this time ]"); print4Real(PrintContainer.readyPrinter, trigger); } } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/a57c9e5dc0c4e2631bd519b4697249c7ba4f3d33/VM_StackTrace.java/buggy/rvm/src/vm/runtime/VM_StackTrace.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1172,
12,
5108,
48,
50,
596,
16,
4206,
3080,
13,
288,
565,
1250,
14099,
273,
629,
31,
565,
775,
288,
1377,
8251,
18,
9499,
4913,
292,
82,
2932,
7397,
67,
6332,
18,
1188,
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,
918,
1172,
12,
5108,
48,
50,
596,
16,
4206,
3080,
13,
288,
565,
1250,
14099,
273,
629,
31,
565,
775,
288,
1377,
8251,
18,
9499,
4913,
292,
82,
2932,
7397,
67,
6332,
18,
1188,
13... |
void setArray(int i, Array x) throws SQLException; | void setArray(int index, Array value) throws SQLException; | void setArray(int i, Array x) throws SQLException; | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/8e6a933c7311b8af73a149d26777089b7dc8bd68/PreparedStatement.java/buggy/core/src/classpath/java/java/sql/PreparedStatement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
444,
1076,
12,
474,
277,
16,
1510,
619,
13,
1216,
6483,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
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,
282,
918,
444,
1076,
12,
474,
277,
16,
1510,
619,
13,
1216,
6483,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
public static void setCachingEnabled(boolean cachingEnabled) { if (isCachingEnabled && !cachingEnabled) { JavaMembers.classTable = new Hashtable(); } isCachingEnabled = cachingEnabled; FunctionObject.setCachingEnabled(cachingEnabled); | public static void setCachingEnabled(boolean cachingEnabled) { | public static void setCachingEnabled(boolean cachingEnabled) { if (isCachingEnabled && !cachingEnabled) { // Caching is being turned off. Empty caches. JavaMembers.classTable = new Hashtable(); } isCachingEnabled = cachingEnabled; FunctionObject.setCachingEnabled(cachingEnabled); } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/54563952a0c0ed41e6d682175eedff353d9d4352/Context.java/clean/js/rhino/src/org/mozilla/javascript/Context.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
444,
17712,
1526,
12,
6494,
11393,
1526,
13,
288,
3639,
309,
261,
291,
17712,
1526,
597,
401,
17703,
310,
1526,
13,
288,
5411,
368,
23782,
310,
353,
3832,
21826,
3397,
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,
760,
918,
444,
17712,
1526,
12,
6494,
11393,
1526,
13,
288,
3639,
309,
261,
291,
17712,
1526,
597,
401,
17703,
310,
1526,
13,
288,
5411,
368,
23782,
310,
353,
3832,
21826,
3397,
18,... |
case 140: | case 142: | public final Expression expr(AST _t, PathExpr path ) throws RecognitionException, PermissionDeniedException,EXistException,XPathException { Expression step; org.exist.xquery.parser.XQueryAST expr_AST_in = (_t == ASTNULL) ? null : (org.exist.xquery.parser.XQueryAST)_t; org.exist.xquery.parser.XQueryAST c = null; org.exist.xquery.parser.XQueryAST astIf = null; org.exist.xquery.parser.XQueryAST someVarName = null; org.exist.xquery.parser.XQueryAST everyVarName = null; org.exist.xquery.parser.XQueryAST r = null; org.exist.xquery.parser.XQueryAST f = null; org.exist.xquery.parser.XQueryAST varName = null; org.exist.xquery.parser.XQueryAST posVar = null; org.exist.xquery.parser.XQueryAST l = null; org.exist.xquery.parser.XQueryAST letVarName = null; org.exist.xquery.parser.XQueryAST w = null; org.exist.xquery.parser.XQueryAST collURI = null; step= null; if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_castable: case LITERAL_cast: { step=typeCastExpr(_t,path); _t = _retTree; break; } case COMMA: { AST __t59 = _t; c = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,COMMA); _t = _t.getFirstChild(); PathExpr left= new PathExpr(context); PathExpr right= new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; SequenceConstructor sc= new SequenceConstructor(context); sc.setASTNode(c); sc.addPath(left); sc.addPath(right); path.addPath(sc); step = sc; _t = __t59; _t = _t.getNextSibling(); break; } case LITERAL_if: { AST __t60 = _t; astIf = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_if); _t = _t.getFirstChild(); PathExpr testExpr= new PathExpr(context); PathExpr thenExpr= new PathExpr(context); PathExpr elseExpr= new PathExpr(context); step=expr(_t,testExpr); _t = _retTree; step=expr(_t,thenExpr); _t = _retTree; step=expr(_t,elseExpr); _t = _retTree; ConditionalExpression cond= new ConditionalExpression(context, testExpr, thenExpr, elseExpr); cond.setASTNode(astIf); path.add(cond); step = cond; _t = __t60; _t = _t.getNextSibling(); break; } case LITERAL_some: { AST __t61 = _t; org.exist.xquery.parser.XQueryAST tmp3_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_some); _t = _t.getFirstChild(); List clauses= new ArrayList(); PathExpr satisfiesExpr = new PathExpr(context); { _loop66: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==VARIABLE_BINDING)) { AST __t63 = _t; someVarName = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,VARIABLE_BINDING); _t = _t.getFirstChild(); ForLetClause clause= new ForLetClause(); PathExpr inputSequence = new PathExpr(context); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_as: { AST __t65 = _t; org.exist.xquery.parser.XQueryAST tmp4_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_as); _t = _t.getFirstChild(); sequenceType(_t,clause.sequenceType); _t = _retTree; _t = __t65; _t = _t.getNextSibling(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } step=expr(_t,inputSequence); _t = _retTree; clause.varName= someVarName.getText(); clause.inputSequence= inputSequence; clauses.add(clause); _t = __t63; _t = _t.getNextSibling(); } else { break _loop66; } } while (true); } step=expr(_t,satisfiesExpr); _t = _retTree; Expression action = satisfiesExpr; for (int i= clauses.size() - 1; i >= 0; i--) { ForLetClause clause= (ForLetClause) clauses.get(i); BindingExpression expr = new QuantifiedExpression(context, QuantifiedExpression.SOME); expr.setVariable(clause.varName); expr.setSequenceType(clause.sequenceType); expr.setInputSequence(clause.inputSequence); expr.setReturnExpression(action); satisfiesExpr= null; action= expr; } path.add(action); step = action; _t = __t61; _t = _t.getNextSibling(); break; } case LITERAL_every: { AST __t67 = _t; org.exist.xquery.parser.XQueryAST tmp5_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_every); _t = _t.getFirstChild(); List clauses= new ArrayList(); PathExpr satisfiesExpr = new PathExpr(context); { _loop72: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==VARIABLE_BINDING)) { AST __t69 = _t; everyVarName = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,VARIABLE_BINDING); _t = _t.getFirstChild(); ForLetClause clause= new ForLetClause(); PathExpr inputSequence = new PathExpr(context); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_as: { AST __t71 = _t; org.exist.xquery.parser.XQueryAST tmp6_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_as); _t = _t.getFirstChild(); sequenceType(_t,clause.sequenceType); _t = _retTree; _t = __t71; _t = _t.getNextSibling(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } step=expr(_t,inputSequence); _t = _retTree; clause.varName= everyVarName.getText(); clause.inputSequence= inputSequence; clauses.add(clause); _t = __t69; _t = _t.getNextSibling(); } else { break _loop72; } } while (true); } step=expr(_t,satisfiesExpr); _t = _retTree; Expression action = satisfiesExpr; for (int i= clauses.size() - 1; i >= 0; i--) { ForLetClause clause= (ForLetClause) clauses.get(i); BindingExpression expr = new QuantifiedExpression(context, QuantifiedExpression.EVERY); expr.setVariable(clause.varName); expr.setSequenceType(clause.sequenceType); expr.setInputSequence(clause.inputSequence); expr.setReturnExpression(action); satisfiesExpr= null; action= expr; } path.add(action); step = action; _t = __t67; _t = _t.getNextSibling(); break; } case LITERAL_return: { AST __t73 = _t; r = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_return); _t = _t.getFirstChild(); List clauses= new ArrayList(); Expression action= new PathExpr(context); action.setASTNode(r); PathExpr whereExpr= null; List orderBy= null; { int _cnt88=0; _loop88: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_for: { AST __t75 = _t; f = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_for); _t = _t.getFirstChild(); { int _cnt81=0; _loop81: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==VARIABLE_BINDING)) { AST __t77 = _t; varName = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,VARIABLE_BINDING); _t = _t.getFirstChild(); ForLetClause clause= new ForLetClause(); clause.ast = f; PathExpr inputSequence= new PathExpr(context); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_as: { AST __t79 = _t; org.exist.xquery.parser.XQueryAST tmp7_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_as); _t = _t.getFirstChild(); clause.sequenceType= new SequenceType(); sequenceType(_t,clause.sequenceType); _t = _retTree; _t = __t79; _t = _t.getNextSibling(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case POSITIONAL_VAR: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case POSITIONAL_VAR: { posVar = (org.exist.xquery.parser.XQueryAST)_t; match(_t,POSITIONAL_VAR); _t = _t.getNextSibling(); clause.posVar= posVar.getText(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } step=expr(_t,inputSequence); _t = _retTree; clause.varName= varName.getText(); clause.inputSequence= inputSequence; clauses.add(clause); _t = __t77; _t = _t.getNextSibling(); } else { if ( _cnt81>=1 ) { break _loop81; } else {throw new NoViableAltException(_t);} } _cnt81++; } while (true); } _t = __t75; _t = _t.getNextSibling(); break; } case LITERAL_let: { AST __t82 = _t; l = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_let); _t = _t.getFirstChild(); { int _cnt87=0; _loop87: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==VARIABLE_BINDING)) { AST __t84 = _t; letVarName = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,VARIABLE_BINDING); _t = _t.getFirstChild(); ForLetClause clause= new ForLetClause(); clause.ast = l; clause.isForClause= false; PathExpr inputSequence= new PathExpr(context); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_as: { AST __t86 = _t; org.exist.xquery.parser.XQueryAST tmp8_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_as); _t = _t.getFirstChild(); clause.sequenceType= new SequenceType(); sequenceType(_t,clause.sequenceType); _t = _retTree; _t = __t86; _t = _t.getNextSibling(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } step=expr(_t,inputSequence); _t = _retTree; clause.varName= letVarName.getText(); clause.inputSequence= inputSequence; clauses.add(clause); _t = __t84; _t = _t.getNextSibling(); } else { if ( _cnt87>=1 ) { break _loop87; } else {throw new NoViableAltException(_t);} } _cnt87++; } while (true); } _t = __t82; _t = _t.getNextSibling(); break; } default: { if ( _cnt88>=1 ) { break _loop88; } else {throw new NoViableAltException(_t);} } } _cnt88++; } while (true); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_where: { w = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_where); _t = _t.getNextSibling(); whereExpr= new PathExpr(context); whereExpr.setASTNode(w); step=expr(_t,whereExpr); _t = _retTree; break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case ORDER_BY: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ORDER_BY: { AST __t91 = _t; org.exist.xquery.parser.XQueryAST tmp9_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,ORDER_BY); _t = _t.getFirstChild(); orderBy= new ArrayList(3); { int _cnt98=0; _loop98: do { if (_t==null) _t=ASTNULL; if ((_tokenSet_0.member(_t.getType()))) { PathExpr orderSpecExpr= new PathExpr(context); step=expr(_t,orderSpecExpr); _t = _retTree; OrderSpec orderSpec= new OrderSpec(context, orderSpecExpr); int modifiers= 0; orderBy.add(orderSpec); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_ascending: case LITERAL_descending: { { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_ascending: { org.exist.xquery.parser.XQueryAST tmp10_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_ascending); _t = _t.getNextSibling(); break; } case LITERAL_descending: { org.exist.xquery.parser.XQueryAST tmp11_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_descending); _t = _t.getNextSibling(); modifiers= OrderSpec.DESCENDING_ORDER; orderSpec.setModifiers(modifiers); break; } default: { throw new NoViableAltException(_t); } } } break; } case 3: case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_collation: case LITERAL_element: case LCURLY: case COMMA: case LITERAL_empty: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_empty: { org.exist.xquery.parser.XQueryAST tmp12_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_empty); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_greatest: { org.exist.xquery.parser.XQueryAST tmp13_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_greatest); _t = _t.getNextSibling(); break; } case LITERAL_least: { org.exist.xquery.parser.XQueryAST tmp14_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_least); _t = _t.getNextSibling(); modifiers |= OrderSpec.EMPTY_LEAST; orderSpec.setModifiers(modifiers); break; } default: { throw new NoViableAltException(_t); } } } break; } case 3: case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_collation: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_collation: { org.exist.xquery.parser.XQueryAST tmp15_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_collation); _t = _t.getNextSibling(); collURI = (org.exist.xquery.parser.XQueryAST)_t; match(_t,STRING_LITERAL); _t = _t.getNextSibling(); orderSpec.setCollation(collURI.getText()); break; } case 3: case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } } else { if ( _cnt98>=1 ) { break _loop98; } else {throw new NoViableAltException(_t);} } _cnt98++; } while (true); } _t = __t91; _t = _t.getNextSibling(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } step=expr(_t,(PathExpr) action); _t = _retTree; for (int i= clauses.size() - 1; i >= 0; i--) { ForLetClause clause= (ForLetClause) clauses.get(i); BindingExpression expr; if (clause.isForClause) expr= new ForExpr(context); else expr= new LetExpr(context); expr.setASTNode(clause.ast); expr.setVariable(clause.varName); expr.setSequenceType(clause.sequenceType); expr.setInputSequence(clause.inputSequence); expr.setReturnExpression(action); if (clause.isForClause) ((ForExpr) expr).setPositionalVariable(clause.posVar); if (whereExpr != null) { expr.setWhereExpression(whereExpr); whereExpr= null; } action= expr; } if (orderBy != null) { OrderSpec orderSpecs[]= new OrderSpec[orderBy.size()]; int k= 0; for (Iterator j= orderBy.iterator(); j.hasNext(); k++) { OrderSpec orderSpec= (OrderSpec) j.next(); orderSpecs[k]= orderSpec; } ((BindingExpression)action).setOrderSpecs(orderSpecs); } path.add(action); step = action; _t = __t73; _t = _t.getNextSibling(); break; } case LITERAL_instance: { AST __t99 = _t; org.exist.xquery.parser.XQueryAST tmp16_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_instance); _t = _t.getFirstChild(); PathExpr expr = new PathExpr(context); SequenceType type= new SequenceType(); step=expr(_t,expr); _t = _retTree; sequenceType(_t,type); _t = _retTree; step = new InstanceOfExpression(context, expr, type); path.add(step); _t = __t99; _t = _t.getNextSibling(); break; } case LITERAL_or: { AST __t100 = _t; org.exist.xquery.parser.XQueryAST tmp17_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_or); _t = _t.getFirstChild(); PathExpr left= new PathExpr(context); PathExpr right= new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; _t = __t100; _t = _t.getNextSibling(); OpOr or= new OpOr(context); or.addPath(left); or.addPath(right); path.addPath(or); step = or; break; } case LITERAL_and: { AST __t101 = _t; org.exist.xquery.parser.XQueryAST tmp18_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_and); _t = _t.getFirstChild(); PathExpr left= new PathExpr(context); PathExpr right= new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; _t = __t101; _t = _t.getNextSibling(); OpAnd and= new OpAnd(context); and.addPath(left); and.addPath(right); path.addPath(and); step = and; break; } case UNION: { AST __t102 = _t; org.exist.xquery.parser.XQueryAST tmp19_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,UNION); _t = _t.getFirstChild(); PathExpr left= new PathExpr(context); PathExpr right= new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; _t = __t102; _t = _t.getNextSibling(); Union union= new Union(context, left, right); path.add(union); step = union; break; } case LITERAL_intersect: { AST __t103 = _t; org.exist.xquery.parser.XQueryAST tmp20_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_intersect); _t = _t.getFirstChild(); PathExpr left = new PathExpr(context); PathExpr right = new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; _t = __t103; _t = _t.getNextSibling(); Intersection intersect = new Intersection(context, left, right); path.add(intersect); step = intersect; break; } case LITERAL_except: { AST __t104 = _t; org.exist.xquery.parser.XQueryAST tmp21_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_except); _t = _t.getFirstChild(); PathExpr left = new PathExpr(context); PathExpr right = new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; _t = __t104; _t = _t.getNextSibling(); Except intersect = new Except(context, left, right); path.add(intersect); step = intersect; break; } case ABSOLUTE_SLASH: { AST __t105 = _t; org.exist.xquery.parser.XQueryAST tmp22_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,ABSOLUTE_SLASH); _t = _t.getFirstChild(); RootNode root= new RootNode(context); path.add(root); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { step=expr(_t,path); _t = _retTree; break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t105; _t = _t.getNextSibling(); break; } case ABSOLUTE_DSLASH: { AST __t107 = _t; org.exist.xquery.parser.XQueryAST tmp23_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,ABSOLUTE_DSLASH); _t = _t.getFirstChild(); RootNode root= new RootNode(context); path.add(root); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { step=expr(_t,path); _t = _retTree; if (step instanceof LocationStep) { LocationStep s= (LocationStep) step; if (s.getAxis() == Constants.ATTRIBUTE_AXIS) // combines descendant-or-self::node()/attribute:* s.setAxis(Constants.DESCENDANT_ATTRIBUTE_AXIS); else s.setAxis(Constants.DESCENDANT_SELF_AXIS); } else step.setPrimaryAxis(Constants.DESCENDANT_SELF_AXIS); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t107; _t = _t.getNextSibling(); break; } case LITERAL_to: { AST __t109 = _t; org.exist.xquery.parser.XQueryAST tmp24_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_to); _t = _t.getFirstChild(); PathExpr start= new PathExpr(context); PathExpr end= new PathExpr(context); List args= new ArrayList(2); args.add(start); args.add(end); step=expr(_t,start); _t = _retTree; step=expr(_t,end); _t = _retTree; RangeExpression range= new RangeExpression(context); range.setArguments(args); path.addPath(range); step = range; _t = __t109; _t = _t.getNextSibling(); break; } case EQ: case LT: case GT: case NEQ: case GTEQ: case LTEQ: { step=generalComp(_t,path); _t = _retTree; break; } case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: { step=valueComp(_t,path); _t = _retTree; break; } case BEFORE: case AFTER: case LITERAL_is: case LITERAL_isnot: { step=nodeComp(_t,path); _t = _retTree; break; } case ANDEQ: case OREQ: { step=fulltextComp(_t,path); _t = _retTree; break; } case PARENTHESIZED: case FUNCTION: case VARIABLE_REF: case ELEMENT: case TEXT: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case STRING_LITERAL: case LCURLY: case XML_COMMENT: case XML_PI: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: { step=primaryExpr(_t,path); _t = _retTree; break; } case QNAME: case WILDCARD: case PREFIX_WILDCARD: case ATTRIBUTE_TEST: case NCNAME: case LITERAL_element: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case LITERAL_preceding: { step=pathExpr(_t,path); _t = _retTree; break; } case UNARY_MINUS: case UNARY_PLUS: case STAR: case PLUS: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: { step=numericExpr(_t,path); _t = _retTree; break; } default: { throw new NoViableAltException(_t); } } _retTree = _t; return step; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/9aec85412cf9f86cb609358133dd23628306f44a/XQueryTreeParser.java/clean/src/org/exist/xquery/parser/XQueryTreeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
5371,
225,
3065,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
16,
14124,
503,
288,
202,
202,
2300,
2235,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
5371,
225,
3065,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
16,
14124,
503,
288,
202,
202,
2300,
2235,
3... |
"/* \n" + " * Version (target 1.2) \n" + " * - magic: CAFEBABE\n" + " * - minor: 0\n" + " * - major: 46\n" + " */\n" + " "public class A extends java.lang.Object {\n" + " \n" + " /* Method descriptor #6 ()V */\n" + " public A();\n" + " /* Stack: 1, Locals: 1 */\n" + " Code attribute:\n" + " 0 aload_0\n" + " 1 invokespecial #9 <Constructor java.lang.Object()>\n" + " 4 return\n" + "\n" + " Line number attribute:\n" + " [pc: 0, line: 1]\n" + " Local variable table attribute:\n" + " [pc: 0, pc: 5] local: this index: 0 type: A\n" + " \n" + | public void test017() { String source = "public class A {\n" + " public static void main(String[] args) {\n" + " boolean b = false;\n" + " if (true\n" + " == !b) { \n" + " System.out.println();\n" + " }\n" + " }\n" + "}"; String expectedOutput = "/* \n" + " * Version (target 1.2) \n" + " * - magic: CAFEBABE\n" + " * - minor: 0\n" + " * - major: 46\n" + " */\n" + "// Compiled from A.java\n" + "public class A extends java.lang.Object {\n" + " \n" + " /* Method descriptor #6 ()V */\n" + " public A();\n" + " /* Stack: 1, Locals: 1 */\n" + " Code attribute:\n" + " 0 aload_0\n" + " 1 invokespecial #9 <Constructor java.lang.Object()>\n" + " 4 return\n" + "\n" + " Line number attribute:\n" + " [pc: 0, line: 1]\n" + " Local variable table attribute:\n" + " [pc: 0, pc: 5] local: this index: 0 type: A\n" + " \n" + " /* Method descriptor #15 ([Ljava/lang/String;)V */\n" + " public static void main(String[] args);\n" + " /* Stack: 1, Locals: 2 */\n" + " Code attribute:\n" + " 0 iconst_0\n" + " 1 istore_1\n" + " 2 iload_1\n" + " 3 ifne 12\n" + " 6 getstatic #21 <Field java.lang.System#out java.io.PrintStream>\n" + " 9 invokevirtual #26 <Method java.io.PrintStream#println() void>\n" + " 12 return\n" + "\n" + " Line number attribute:\n" + " [pc: 0, line: 3]\n" + " [pc: 2, line: 5]\n" + " [pc: 6, line: 6]\n" + " [pc: 12, line: 8]\n" + " Local variable table attribute:\n" + " [pc: 0, pc: 13] local: args index: 0 type: java/lang/String[]\n" + " [pc: 2, pc: 13] local: b index: 1 type: boolean\n" + " \n" + "}"; checkClassFile("A", source, expectedOutput); } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/33954bbbcb57410dd9650c66d085059854f2f0c2/ClassFileReaderTest.java/clean/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1611,
27,
1435,
288,
202,
202,
780,
1084,
273,
1082,
202,
6,
482,
667,
432,
18890,
82,
6,
397,
1082,
202,
6,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
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,
482,
918,
1842,
1611,
27,
1435,
288,
202,
202,
780,
1084,
273,
1082,
202,
6,
482,
667,
432,
18890,
82,
6,
397,
1082,
202,
6,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
13,
1... | |
PerspectiveDescriptor originalDescriptor) { if (!validateLabel(label)) return null; if (findPerspectiveWithLabel(label) != null) return null; | PerspectiveDescriptor originalDescriptor) { if (!validateLabel(label)) return null; if (findPerspectiveWithLabel(label) != null) return null; | public PerspectiveDescriptor createPerspective(String label, PerspectiveDescriptor originalDescriptor) { // Sanity check to avoid invalid or duplicate labels. if (!validateLabel(label)) return null; if (findPerspectiveWithLabel(label) != null) return null; // Calculate ID. String id = label.replace(' ', '_'); id = id.trim(); // Create descriptor. PerspectiveDescriptor desc = new PerspectiveDescriptor(id, label, originalDescriptor); add(desc); return desc; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/0707a6aff6dbd240f7c0b2dae47e64da2f4fd627/PerspectiveRegistry.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveRegistry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
453,
414,
16772,
3187,
752,
14781,
16772,
12,
780,
1433,
16,
5411,
453,
414,
16772,
3187,
2282,
3187,
13,
288,
3639,
368,
23123,
866,
358,
4543,
2057,
578,
6751,
3249,
18,
3639,
309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
453,
414,
16772,
3187,
752,
14781,
16772,
12,
780,
1433,
16,
5411,
453,
414,
16772,
3187,
2282,
3187,
13,
288,
3639,
368,
23123,
866,
358,
4543,
2057,
578,
6751,
3249,
18,
3639,
309... |
container.dispose(); toolBarManager.dispose(); toolBarManager.removeAll(); toolBarManager = null; container = null; if (bg != null) bg.dispose(); if (fg != null) fg.dispose(); if (handleImage != null) { handleImage.dispose(); handleImage = null; } } | container.dispose(); toolBarManager.dispose(); toolBarManager.removeAll(); toolBarManager = null; container = null; if (bg != null) bg.dispose(); if (fg != null) fg.dispose(); if (handleImage != null) { handleImage.dispose(); handleImage = null; } } | public void dispose() { container.dispose(); toolBarManager.dispose(); toolBarManager.removeAll(); toolBarManager = null; container = null; if (bg != null) bg.dispose(); if (fg != null) fg.dispose(); if (handleImage != null) { handleImage.dispose(); handleImage = null; } } | 13822 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13822/1b18c4111a9bdd6d059092d4cb5971693a9544b2/IntroLaunchBar.java/clean/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/IntroLaunchBar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
15825,
1435,
288,
202,
202,
3782,
18,
2251,
4150,
5621,
202,
202,
6738,
5190,
1318,
18,
2251,
4150,
5621,
202,
202,
6738,
5190,
1318,
18,
4479,
1595,
5621,
202,
202,
6738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15825,
1435,
288,
202,
202,
3782,
18,
2251,
4150,
5621,
202,
202,
6738,
5190,
1318,
18,
2251,
4150,
5621,
202,
202,
6738,
5190,
1318,
18,
4479,
1595,
5621,
202,
202,
6738,
... |
DocumentBuilder documentBuilder = null; | DocumentBuilder documentBuilder; | public void process(String request, Writer response) { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); DocumentBuilder documentBuilder = null; try { documentBuilder = factory.newDocumentBuilder(); } catch (ParserConfigurationException e) { throw Util.newError(e, "Error processing '" + request + "'"); } Document document = null; try { document = documentBuilder.parse(new InputSource(new StringReader(request))); } catch (SAXException e) { throw Util.newError(e, "Error processing '" + request + "'"); } catch (IOException e) { throw Util.newError(e, "Error processing '" + request + "'"); } Element documentElement = document.getDocumentElement(); try { process(documentElement, new SAXHandler(new SAXWriter(response))); } catch (SAXException e) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Request " + request + " failed", e); } } } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/6a0bccf4b2f4db71715c51cb88065a65f97acd80/XmlaMediator.java/clean/src/main/mondrian/xmla/XmlaMediator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1207,
12,
780,
590,
16,
5497,
766,
13,
288,
3639,
30236,
3272,
273,
30236,
18,
2704,
1442,
5621,
3639,
3272,
18,
542,
3402,
10155,
12,
3767,
1769,
3639,
4319,
1263,
1668,
1263,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1207,
12,
780,
590,
16,
5497,
766,
13,
288,
3639,
30236,
3272,
273,
30236,
18,
2704,
1442,
5621,
3639,
3272,
18,
542,
3402,
10155,
12,
3767,
1769,
3639,
4319,
1263,
1668,
1263,... |
DatabaseStoreMessage msg = new DatabaseStoreMessage(_context); | DatabaseStoreMessage msg = new DatabaseStoreMessage(getContext()); | private void sendData(Hash key, DataStructure data, Hash toPeer, TunnelId replyTunnel) { if (_log.shouldLog(Log.DEBUG)) _log.debug("Sending data matching key key " + key.toBase64() + " to peer " + toPeer.toBase64() + " tunnel " + replyTunnel); DatabaseStoreMessage msg = new DatabaseStoreMessage(_context); msg.setKey(key); if (data instanceof LeaseSet) { msg.setLeaseSet((LeaseSet)data); msg.setValueType(DatabaseStoreMessage.KEY_TYPE_LEASESET); } else if (data instanceof RouterInfo) { msg.setRouterInfo((RouterInfo)data); msg.setValueType(DatabaseStoreMessage.KEY_TYPE_ROUTERINFO); } _context.statManager().addRateData("netDb.lookupsMatched", 1, 0); _context.statManager().addRateData("netDb.lookupsHandled", 1, 0); sendMessage(msg, toPeer, replyTunnel); } | 45677 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45677/e737e5c9507ed0d463dc9e45a8f63657f466b177/HandleDatabaseLookupMessageJob.java/clean/router/java/src/net/i2p/router/networkdb/HandleDatabaseLookupMessageJob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1366,
751,
12,
2310,
498,
16,
1910,
6999,
501,
16,
2474,
358,
6813,
16,
399,
8564,
548,
4332,
20329,
13,
288,
3639,
309,
261,
67,
1330,
18,
13139,
1343,
12,
1343,
18,
9394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1366,
751,
12,
2310,
498,
16,
1910,
6999,
501,
16,
2474,
358,
6813,
16,
399,
8564,
548,
4332,
20329,
13,
288,
3639,
309,
261,
67,
1330,
18,
13139,
1343,
12,
1343,
18,
9394,
... |
private String processDate(Date date) throws FenixFilterException, FenixServiceException { | private String processDate(Date date) throws FenixFilterException, FenixServiceException { | private String processDate(Date date) throws FenixFilterException, FenixServiceException { return DateFormatUtil.format("dd/MM/yyyy", date); } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/1eab5569eea9b71f208c0d25e856d5bdea5a3e8c/OrganizationalStructureBackingBean.java/clean/src/net/sourceforge/fenixedu/presentationTier/backBeans/manager/organizationalStructureManagement/OrganizationalStructureBackingBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
1207,
1626,
12,
1626,
1509,
13,
1216,
478,
275,
697,
1586,
503,
16,
478,
275,
697,
15133,
288,
202,
202,
2463,
18371,
1304,
18,
2139,
2932,
449,
19,
8206,
19,
17722,
3113,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
1207,
1626,
12,
1626,
1509,
13,
1216,
478,
275,
697,
1586,
503,
16,
478,
275,
697,
15133,
288,
202,
202,
2463,
18371,
1304,
18,
2139,
2932,
449,
19,
8206,
19,
17722,
3113,
15... |
{ return true; } | { return true; } | public boolean canSave(String[] message) { return true; } | 8339 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8339/85b2c993d0d0d60c5fc0f7ab1ca0a68a7ddba9f5/InitializationDelegate.java/clean/src/games/strategy/triplea/delegate/InitializationDelegate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
848,
4755,
12,
780,
8526,
883,
13,
225,
288,
565,
327,
638,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
282,
1071,
1250,
848,
4755,
12,
780,
8526,
883,
13,
225,
288,
565,
327,
638,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
reset(); | reset(); | public void up(Event evt) { Message msg; //System.out.println("UP: " + evt); Object temp_obj; // used for type checking before performing casts switch( evt.getType() ) { case Event.SET_LOCAL_ADDRESS: temp_obj = evt.getArg(); if ( temp_obj instanceof Address ) { local_addr = (Address) temp_obj; } else { log.error( "Error: Total.up() - could not cast local address to an Address object" ); } break; case Event.MSG: // get the message and the header for the TOTAL_OLD layer temp_obj = evt.getArg(); if ( temp_obj instanceof Message ) { msg = (Message) temp_obj; temp_obj = msg.removeHeader(getName()); if ( temp_obj instanceof TotalHeader ) { TotalHeader hdr = (TotalHeader) temp_obj; // switch on the "command" defined by the header switch( hdr.total_header_type ) { case TotalHeader.TOTAL_UNICAST: // don't process this message, just pass it up (TotalHeader header already removed) passUp(evt); return; case TotalHeader.TOTAL_BCAST: handleBCastMessage( msg, hdr.seq_id ); break; case TotalHeader.TOTAL_REQUEST: // if we are the sequencer, respond to this request if ( isSequencer() ) { handleRequestMessage( msg ); } break; case TotalHeader.TOTAL_NEW_VIEW: // store the sequence id that we should expect next next_seq_id = hdr.seq_id; // TODO: need to send some sort of ACK or something to the sequencer (maybe) break; case TotalHeader.TOTAL_CUM_SEQ_ACK: // if we are the sequencer, update state if ( isSequencer() ) { temp_obj = msg.getSrc(); if ( temp_obj instanceof Address ) { ack_history.setSeq( (Address) temp_obj, hdr.seq_id ); } else { log.error( "Error: TOTAL_OLD.Up() - could not cast source of message to an Address object (case TotalHeader.TOTAL_CUM_SEQ_ACK)" ); } } break; case TotalHeader.TOTAL_RESEND: // if we are the sequencer, respond to this request if ( isSequencer() ) { handleResendRequest( msg, hdr.seq_id ); } break; default: // unrecognized header type - discard message log.error( "Error: TOTAL_OLD.up() - unrecognized TotalHeader in message - " + hdr.toString() ); return; // don't let it call passUp() } // switch( hdr.total_header_type ) } else { log.error( "Error: TOTAL_OLD.up() - could not cast message header to TotalHeader (case Event.MSG)" ); } // if ( temp_obj instanceof TotalHeader ) } else { log.error( "Error: TOTAL_OLD.up() - could not cast argument of Event to a Message (case Event.MSG)" ); } // if ( temp_obj instanceof Address ) //System.out.println("The message is " + msg); return; // don't blindly pass up messages immediately (if at all) // begin mms21 /* case Event.BECOME_SERVER: System.out.println( "Become Server event passed up to TOTAL_OLD (debug - mms21)" ); break; */ case Event.TMP_VIEW: // TODO: this may be temporary case Event.VIEW_CHANGE: System.out.println( "View Change event passed up to TOTAL_OLD (debug - mms21)" ); View new_view = (View) evt.getArg(); members = new_view.getMembers(); { // print the members of this new view System.out.println( "New view members (printed in TOTAL_OLD):" ); int view_size = members.size(); for( int i=0; i<view_size; i++ ) { System.out.println( " " + members.elementAt(i).toString() ); } } // reset the state for total ordering for this new view reset(); // if we are the sequencer in this new view, send a new // TOTAL_NEW_VIEW message to the group if ( isSequencer() ) { // we are the sequencer in this new view log.error( "TOTAL_OLD.up() - I am the sequencer of this new view" ); // we need to keep track of acknowledgements messages ack_history = new MessageAcks( members ); // start assigning messages with this sequence id next_seq_id_to_assign = INIT_SEQ_ID; // send a message to the group with the initial sequence id to expect Message new_view_msg = new Message( null, local_addr, null ); new_view_msg.putHeader(getName(), new TotalHeader( TotalHeader.TOTAL_NEW_VIEW, next_seq_id_to_assign ) ); passDown( new Event( Event.MSG, new_view_msg ) ); } break; // end mms21 default: break; } // switch( evt.getType() ) passUp(evt); // Pass up to the layer above us } | 48949 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48949/13de68466e3cf7fde6ee0bde0cee09a33e837e89/TOTAL_OLD.java/buggy/src/org/jgroups/protocols/TOTAL_OLD.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
731,
12,
1133,
6324,
13,
288,
3639,
2350,
1234,
31,
3639,
368,
3163,
18,
659,
18,
8222,
2932,
3079,
30,
315,
397,
6324,
1769,
202,
921,
1906,
67,
2603,
31,
225,
368,
1399,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
731,
12,
1133,
6324,
13,
288,
3639,
2350,
1234,
31,
3639,
368,
3163,
18,
659,
18,
8222,
2932,
3079,
30,
315,
397,
6324,
1769,
202,
921,
1906,
67,
2603,
31,
225,
368,
1399,
... |
PyType self_type = getType(); PyObject impl = self_type.lookup("__rmul__"); if (impl != null) { PyObject res = impl.__get__(this, self_type).__call__(other); if (res == Py.NotImplemented) | PyType self_type=getType(); PyObject impl=self_type.lookup("__rmul__"); if (impl!=null) { PyObject res=impl.__get__(this,self_type).__call__(other); if (res==Py.NotImplemented) | public PyObject __rmul__(PyObject other) { PyType self_type = getType(); PyObject impl = self_type.lookup("__rmul__"); if (impl != null) { PyObject res = impl.__get__(this, self_type).__call__(other); if (res == Py.NotImplemented) return null; return res; } return super.__rmul__(other); } | 6527 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6527/f9070a6bddff5a2a46bf38e7d12db571f23826e9/PyDictionaryDerived.java/buggy/src/org/python/core/PyDictionaryDerived.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4707,
921,
1001,
8864,
332,
972,
12,
9413,
921,
1308,
13,
288,
3639,
4707,
559,
365,
67,
723,
273,
3130,
5621,
3639,
4707,
921,
9380,
273,
365,
67,
723,
18,
8664,
2932,
972,
8864,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4707,
921,
1001,
8864,
332,
972,
12,
9413,
921,
1308,
13,
288,
3639,
4707,
559,
365,
67,
723,
273,
3130,
5621,
3639,
4707,
921,
9380,
273,
365,
67,
723,
18,
8664,
2932,
972,
8864,... |
return new StringContains(substring); } | return new StringContains(substring); } | public StringContains stringContains( String substring ) { return new StringContains(substring); } | 54028 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54028/4aaf60d8fa76687c3492c508dd98678fbbd3d935/MockObjectSupportTestCase.java/buggy/jmock/core/src/org/jmock/core/MockObjectSupportTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
10846,
533,
10846,
12,
514,
3019,
262,
288,
377,
202,
2463,
394,
514,
10846,
12,
28023,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
10846,
533,
10846,
12,
514,
3019,
262,
288,
377,
202,
2463,
394,
514,
10846,
12,
28023,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
public TopDocs optimize(BooleanQuery original, Searcher searcher, int numHits, String sortField, boolean reverse) throws IOException { BooleanQuery query = new BooleanQuery(); BooleanQuery cacheQuery = new BooleanQuery(); BooleanQuery filterQuery = new BooleanQuery(); ArrayList filters = new ArrayList(); BooleanClause[] clauses = original.getClauses(); for (int i = 0; i < clauses.length; i++) { BooleanClause c = clauses[i]; if (c.required // required && c.query.getBoost() == 0.0f) { // boost is zero if (c.query instanceof TermQuery // TermQuery && (searcher.docFreq(((TermQuery)c.query).getTerm()) / (float)searcher.maxDoc()) < threshold) { // beneath threshold query.add(c); // don't filterize continue; } if (c.query instanceof RangeQuery) { // RangeQuery RangeQuery range = (RangeQuery)c.query; boolean inclusive = range.isInclusive();// convert to RangeFilter Term lower = range.getLowerTerm(); Term upper = range.getUpperTerm(); filters.add(new RangeFilter(lower!=null?lower.field():upper.field(), lower != null ? lower.text() : null, upper != null ? upper.text() : null, inclusive, inclusive)); cacheQuery.add(c.query, true, false); // cache it continue; } // all other query types filterQuery.add(c.query, true, false); // filter it cacheQuery.add(c.query, true, false); // cache it continue; } query.add(c); // query it } Filter filter = null; if (cacheQuery.getClauses().length != 0) { synchronized (cache) { // check cache filter = (Filter)cache.get(cacheQuery); } if (filter == null) { // miss if (filterQuery.getClauses().length != 0) // add filterQuery to filters filters.add(new QueryFilter(filterQuery)); if (filters.size() == 1) { // convert filters to filter filter = (Filter)filters.get(0); } else { filter = new ChainedFilter((Filter[])filters.toArray (new Filter[filters.size()]), ChainedFilter.AND); } if (!(filter instanceof QueryFilter)) // make sure bits are cached filter = new CachingWrapperFilter(filter); synchronized (cache) { cache.put(cacheQuery, filter); // cache the filter } } } if (sortField == null && !reverse) { // no hit limit if (MAX_HITS <= 0) { return searcher.search(query, filter, numHits); } // hits limited -- use a LimitedCollector LimitedCollector collector = new LimitedCollector(numHits, MAX_HITS); LimitExceeded exceeded = null; try { searcher.search(query, filter, collector); } catch (LimitExceeded le) { exceeded = le; } TopDocs results = collector.topDocs(); if (exceeded != null) { // limit was exceeded results.totalHits = (int) // must estimate totalHits (results.totalHits*(searcher.maxDoc()/(float)exceeded.maxDoc)); } return results; } else { return searcher.search(query, filter, numHits, new Sort(sortField, reverse)); } } | 46828 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46828/329ff64e9d7295aff108f85e9a8103f5e5f8f398/LuceneQueryOptimizer.java/clean/src/java/org/apache/nutch/searcher/LuceneQueryOptimizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
3401,
1759,
2048,
337,
10153,
12,
5507,
1138,
8830,
16,
2979,
264,
3072,
264,
16,
474,
2107,
20950,
16,
780,
3804,
974,
16,
6494,
9845,
13,
15069,
14106,
95,
5507,
1138,
2271,
33,
2704,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
3401,
1759,
2048,
337,
10153,
12,
5507,
1138,
8830,
16,
2979,
264,
3072,
264,
16,
474,
2107,
20950,
16,
780,
3804,
974,
16,
6494,
9845,
13,
15069,
14106,
95,
5507,
1138,
2271,
33,
2704,
... | ||
private static void addClassPathEntries(final IJavaProject project, final Set projects, final List paths) throws JavaModelException { Assert.isNotNull(project); Assert.isNotNull(projects); Assert.isNotNull(paths); projects.add(project); final IClasspathEntry[] entries= project.getResolvedClasspath(true); final IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot(); int kind= 0; IClasspathEntry entry= null; IPath path= null; IProject resource= null; IJavaProject reference= null; for (int index= 0; index < entries.length; index++) { entry= entries[index]; kind= entry.getEntryKind(); if (kind == IClasspathEntry.CPE_LIBRARY) addClassPathEntry(paths, entry.getPath().toString()); else if (kind == IClasspathEntry.CPE_SOURCE) addClassPathEntry(paths, project.getProject().getLocation().makeAbsolute().toString() + project.getOutputLocation().removeFirstSegments(1).makeAbsolute().toFile().toString() + PATH_SEPARATOR); else if (kind == IClasspathEntry.CPE_PROJECT) { path= entry.getPath(); resource= root.getProject(path.toString()); if (resource != null && resource.exists()) { reference= JavaCore.create(resource); if (reference != null && !projects.contains(reference)) addClassPathEntries(reference, projects, paths); } } else Assert.isTrue(false); } } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/512d9961d80f7dfb4d518e60a05f9c4c4f41729c/SerialVersionHashProposal.java/buggy/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SerialVersionHashProposal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
11365,
270,
395,
2126,
6459,
1289,
22158,
5400,
12,
6385,
45,
5852,
4109,
4406,
16,
6385,
694,
13582,
16,
6385,
682,
4481,
13,
15069,
5852,
1488,
503,
95,
202,
202,
8213,
18,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11365,
270,
395,
2126,
6459,
1289,
22158,
5400,
12,
6385,
45,
5852,
4109,
4406,
16,
6385,
694,
13582,
16,
6385,
682,
4481,
13,
15069,
5852,
1488,
503,
95,
202,
202,
8213,
18,
291,
... | ||
public Object clone() { | public Object clone() throws CloneNotSupportedException { | public Object clone() { IAtomContainer clone = null; IElectronContainer electronContainer = null; IElectronContainer newEC = null; IAtom[] natoms; IAtom[] newAtoms; try { clone = (AtomContainer) super.clone(); } catch (Exception e) { e.printStackTrace(System.err); } // start from scratch clone.removeAllElements(); // clone all atoms for (int f = 0; f < getAtomCount(); f++) { clone.addAtom((Atom) getAtomAt(f).clone()); } // clone the electronContainer for (int f = 0; f < getElectronContainerCount(); f++) { electronContainer = this.getElectronContainerAt(f); newEC = getBuilder().newElectronContainer(); if (electronContainer instanceof IBond) { IBond bond = (IBond) electronContainer; newEC = (IElectronContainer)bond.clone(); natoms = bond.getAtoms(); newAtoms = new IAtom[natoms.length]; for (int g = 0; g < natoms.length; g++) { try { newAtoms[g] = clone.getAtomAt(getAtomNumber(natoms[g])); } catch (Exception exc) { exc.printStackTrace(); } } ((IBond) newEC).setAtoms(newAtoms); } else if (electronContainer instanceof ILonePair) { IAtom atom = ((ILonePair) electronContainer).getAtom(); newEC = (ILonePair)electronContainer.clone(); ((ILonePair) newEC).setAtom(clone.getAtomAt(getAtomNumber(atom))); } else if (electronContainer instanceof ISingleElectron) { IAtom atom = ((ISingleElectron) electronContainer).getAtom(); newEC = (ISingleElectron)electronContainer.clone(); ((ISingleElectron) newEC).setAtom(clone.getAtomAt(getAtomNumber(atom))); } else { //System.out.println("Expecting EC, got: " + electronContainer.getClass().getName()); newEC = (IElectronContainer) electronContainer.clone(); } clone.addElectronContainer(newEC); } return clone; } | 1306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1306/2b55a607674535cd8492e3539d8f3dce16fc3b92/AtomContainer.java/clean/src/org/openscience/cdk/AtomContainer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
3236,
1435,
288,
202,
202,
45,
3641,
2170,
3236,
273,
446,
31,
202,
202,
8732,
1582,
1949,
2170,
27484,
2170,
273,
446,
31,
202,
202,
8732,
1582,
1949,
2170,
394,
7228,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
3236,
1435,
288,
202,
202,
45,
3641,
2170,
3236,
273,
446,
31,
202,
202,
8732,
1582,
1949,
2170,
27484,
2170,
273,
446,
31,
202,
202,
8732,
1582,
1949,
2170,
394,
7228,
... |
success = getModelRoot().setCurrentPageId( getCurrentLocation()); | success = getModel().setCurrentPageId(getCurrentLocation()); | public boolean navigateForward() { boolean success = false; if (getModelRoot().isDynamic()) { // dynamic case. Uses navigation history. if (canNavigateForward()) { navigateHistoryForward(); if (isURL(getCurrentLocation())) { success = browser.setUrl(getCurrentLocation()); } else // we need to regen HTML. Set current page, and this // will triger regen. success = getModelRoot().setCurrentPageId( getCurrentLocation()); } else success = false; } else // static HTML case. use browser real Forward. success = browser.forward(); updateNavigationActionsState(); return success; } | 13822 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13822/cb77b765539cf049025dc6b23290a38c6212d7d5/BrowserIntroPartImplementation.java/buggy/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartImplementation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
28479,
8514,
1435,
288,
3639,
1250,
2216,
273,
629,
31,
3639,
309,
261,
588,
1488,
2375,
7675,
291,
9791,
10756,
288,
5411,
368,
5976,
648,
18,
14854,
10394,
4927,
18,
5411,
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,
1250,
28479,
8514,
1435,
288,
3639,
1250,
2216,
273,
629,
31,
3639,
309,
261,
588,
1488,
2375,
7675,
291,
9791,
10756,
288,
5411,
368,
5976,
648,
18,
14854,
10394,
4927,
18,
5411,
3... |
protected List getFeatList(PlayerCharacter pc) | protected List<Ability> getFeatList(PlayerCharacter pc) | protected List getFeatList(PlayerCharacter pc) { List ret = new ArrayList(); ret.addAll(pc.getRealFeatsList()); ret.addAll(pc.featAutoList()); ret.addAll(pc.getVirtualFeatList()); return ret; } | 48301 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48301/746f9fbe7d3bb98c609b2f38fbc5ffad4e685726/DFeatAllToken.java/clean/code/src/java/plugin/exporttokens/DFeatAllToken.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
987,
13683,
270,
682,
12,
12148,
7069,
6125,
13,
202,
95,
202,
202,
682,
325,
273,
394,
2407,
5621,
202,
202,
1349,
18,
1289,
1595,
12,
2436,
18,
588,
6955,
2954,
2323,
682,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
987,
13683,
270,
682,
12,
12148,
7069,
6125,
13,
202,
95,
202,
202,
682,
325,
273,
394,
2407,
5621,
202,
202,
1349,
18,
1289,
1595,
12,
2436,
18,
588,
6955,
2954,
2323,
682,
... |
layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane(); Point lp = layeredPane.getLocationOnScreen(); Point r = SwingUtilities.getRoot(invoker).getLocationOnScreen(); int px = locationX - (lp.x - r.x); int py = locationY - (lp.y - r.y); popup.show(px, py, size.width, size.height); | layeredPane = SwingUtilities.getRootPane(invoker) .getLayeredPane(); Point p = new Point(popupLocation.x, popupLocation.y); SwingUtilities.convertPointFromScreen(p, layeredPane); popup.show(p.x, p.y, size.width, size.height); } else { if (rootContainer.contains(popupLocation)) { Insets insets = rootContainer.getInsets(); popup.show(popupLocation.x - insets.left, popupLocation.y - insets.top, size.width, size.height); | public void setVisible(boolean visible) { super.setVisible(visible); firePopupMenuWillBecomeVisible(); if (visible) { Container rootContainer = (Container) SwingUtilities.getRoot(invoker); boolean fit = true; Dimension size; // Determine the size of the popup menu if (this.getSize().width == 0 && this.getSize().width == 0) size = this.getPreferredSize(); else size = this.getSize(); if ((size.width > (rootContainer.getWidth() - locationX)) || (size.height > (rootContainer.getHeight() - locationY))) fit = false; if (lightWeightPopupEnabled && fit) popup = new LightWeightPopup(this); else { if (fit) popup = new MediumWeightPopup(this); else popup = new HeavyWeightPopup(this); } if (popup instanceof LightWeightPopup || popup instanceof MediumWeightPopup) { JLayeredPane layeredPane; layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane(); Point lp = layeredPane.getLocationOnScreen(); Point r = SwingUtilities.getRoot(invoker).getLocationOnScreen(); int px = locationX - (lp.x - r.x); int py = locationY - (lp.y - r.y); popup.show(px, py, size.width, size.height); } else popup.show(locationX, locationY, size.width, size.height); } else { firePopupMenuWillBecomeInvisible(); popup.hide(); } } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/2d7debfa0b9e176eb89b1dd2089f53cb5079cc16/JPopupMenu.java/buggy/core/src/classpath/javax/javax/swing/JPopupMenu.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
16697,
12,
6494,
6021,
13,
225,
288,
565,
2240,
18,
542,
6207,
12,
8613,
1769,
565,
4452,
13770,
4599,
13670,
38,
557,
1742,
6207,
5621,
565,
309,
261,
8613,
13,
1377,
288,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
16697,
12,
6494,
6021,
13,
225,
288,
565,
2240,
18,
542,
6207,
12,
8613,
1769,
565,
4452,
13770,
4599,
13670,
38,
557,
1742,
6207,
5621,
565,
309,
261,
8613,
13,
1377,
288,
2... |
cellspacing = value; | cellspacing = value; | public void setCellpadding(float value) { cellspacing = value; } | 3506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3506/ed86dfb474e6fa22e1797452482e751a297a7e1f/Table.java/clean/itext/src/com/lowagie/text/Table.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
4020,
9598,
12,
5659,
460,
13,
288,
3639,
2484,
14080,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
4020,
9598,
12,
5659,
460,
13,
288,
3639,
2484,
14080,
273,
460,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
osversion.addElement(Version.parseVersion(value)); | osversion.addElement(new VersionRange(value)); | protected synchronized void addAttribute(String key, String value) { if (key.equals(Constants.BUNDLE_NATIVECODE_PROCESSOR)) { if (processor == null) { processor = new Attribute(); } processor.addElement(aliasMapper.aliasProcessor(value)); return; } if (key.equals(Constants.BUNDLE_NATIVECODE_OSNAME)) { if (osname == null) { osname = new Attribute(); } osname.addElement(aliasMapper.aliasOSName(value)); return; } if (key.equals(Constants.BUNDLE_NATIVECODE_OSVERSION)) { if (osversion == null) { osversion = new Attribute(); } osversion.addElement(Version.parseVersion(value)); return; } if (key.equals(Constants.SELECTION_FILTER_ATTRIBUTE)) { if (filterString == null) { filterString = value; } return; } if (key.equals(Constants.BUNDLE_NATIVECODE_LANGUAGE)) { if (language == null) { language = new Attribute(); } language.addElement(value.toLowerCase()); return; } } | 2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/69c7acc1170a0cdbba49398c072e44e0c2e156f0/BundleNativeCode.java/buggy/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/BundleNativeCode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
3852,
918,
10759,
12,
780,
498,
16,
514,
460,
13,
288,
202,
202,
430,
261,
856,
18,
14963,
12,
2918,
18,
30245,
67,
50,
12992,
5572,
67,
16560,
916,
3719,
288,
1082,
202,
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,
225,
202,
1117,
3852,
918,
10759,
12,
780,
498,
16,
514,
460,
13,
288,
202,
202,
430,
261,
856,
18,
14963,
12,
2918,
18,
30245,
67,
50,
12992,
5572,
67,
16560,
916,
3719,
288,
1082,
202,
4... |
ruby_iter = iter; | rubyIter = new Iter(); | public void init() { // FRAME frame = new FRAME(); iter iter = new iter(); int state; if (initialized) { return; } initialized = true; topFrame = getRubyFrame(); ruby_iter = iter; // rb_origenviron = environ; // Init_stack(0); // Init_heap(); // PUSH_SCOPE(); getRuby().rubyScope.setLocalVars(null); getRuby().rubyScope.setLocalVars(null); // top_scope = getRuby().ruby_scope; /* default visibility is private at toplevel */ // SET_SCOPE(SCOPE_PRIVATE); // PUSH_TAG( PROT_NONE ); // if ((state = EXEC_TAG()) == 0) { // rb_call_inits(); ruby_class = getRuby().getObjectClass(); // ruby_frame.self = ruby_top_self; // top_cref = new NODE(NODE_CREF, getRuby().getObjectClass(), null, null); // ruby_cref = top_cref; rubyFrame.setCbase((VALUE)ruby_cref); // rb_define_global_const( "TOPLEVEL_BINDING", rb_f_binding( ruby_top_self ) ); // ruby_prog_init(); // } // POP_TAG(); // if (state != 0) { // error_print(); // } // POP_SCOPE(); // ruby_scope = top_scope; } | 45298 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45298/f1e2c45b99e6f9a2be3f15f5fd7ad91c7e086a2c/RubyInterpreter.java/clean/org/jruby/interpreter/RubyInterpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
1435,
288,
3639,
368,
20183,
2623,
273,
394,
20183,
5621,
3639,
1400,
1400,
273,
394,
1400,
5621,
3639,
509,
919,
31,
3639,
309,
261,
13227,
13,
288,
5411,
327,
31,
3639,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
1435,
288,
3639,
368,
20183,
2623,
273,
394,
20183,
5621,
3639,
1400,
1400,
273,
394,
1400,
5621,
3639,
509,
919,
31,
3639,
309,
261,
13227,
13,
288,
5411,
327,
31,
3639,... |
"ldap.sslEnabled")).booleanValue(); | "ldap.sslEnabled")); | private LdapManager() { this.host = JiveGlobals.getXMLProperty("ldap.host"); String portStr = JiveGlobals.getXMLProperty("ldap.port"); if (portStr != null) { try { this.port = Integer.parseInt(portStr); } catch (NumberFormatException nfe) { } } if (JiveGlobals.getXMLProperty("ldap.usernameField") != null) { this.usernameField = JiveGlobals.getXMLProperty("ldap.usernameField"); } if (JiveGlobals.getXMLProperty("ldap.baseDN") != null) { this.baseDN = JiveGlobals.getXMLProperty("ldap.baseDN"); } if (JiveGlobals.getXMLProperty("ldap.alternateBaseDN") != null) { this.alternateBaseDN = JiveGlobals.getXMLProperty("ldap.alternateBaseDN"); } if (JiveGlobals.getXMLProperty("ldap.nameField") != null) { this.nameField = JiveGlobals.getXMLProperty("ldap.nameField"); } if (JiveGlobals.getXMLProperty("ldap.emailField") != null) { this.emailField = JiveGlobals.getXMLProperty("ldap.emailField"); } if (JiveGlobals.getXMLProperty("ldap.connectionPoolEnabled") != null) { this.connectionPoolEnabled = Boolean.valueOf( JiveGlobals.getXMLProperty("ldap.connectionPoolEnabled")).booleanValue(); } if (JiveGlobals.getXMLProperty("ldap.searchFilter") != null) { this.searchFilter = JiveGlobals.getXMLProperty("ldap.searchFilter"); } else { StringBuilder filter = new StringBuilder(); filter.append("(").append(usernameField).append("={0})"); this.searchFilter = filter.toString(); } if (JiveGlobals.getXMLProperty("ldap.groupNameField") != null) { this.groupNameField = JiveGlobals.getXMLProperty("ldap.groupNameField"); } if (JiveGlobals.getXMLProperty("ldap.groupMemberField") != null) { this.groupMemberField = JiveGlobals.getXMLProperty("ldap.groupMemberField"); } if (JiveGlobals.getXMLProperty("ldap.groupDescriptionField") != null) { this.groupDescriptionField = JiveGlobals.getXMLProperty("ldap.groupDescriptionField"); } if (JiveGlobals.getXMLProperty("ldap.posixMode") != null) { this.posixMode = Boolean.valueOf(JiveGlobals.getXMLProperty("ldap.posixMode")); } if (JiveGlobals.getXMLProperty("ldap.groupSearchFilter") != null) { this.groupSearchFilter = JiveGlobals.getXMLProperty("ldap.groupSearchFilter"); } else { this.groupSearchFilter = "("+groupMemberField+"={0})"; } this.adminDN = JiveGlobals.getXMLProperty("ldap.adminDN"); if (adminDN != null && adminDN.trim().equals("")) { adminDN = null; } this.adminPassword = JiveGlobals.getXMLProperty("ldap.adminPassword"); this.ldapDebugEnabled = Boolean.valueOf(JiveGlobals.getXMLProperty( "ldap.debugEnabled")).booleanValue(); this.sslEnabled = Boolean.valueOf(JiveGlobals.getXMLProperty( "ldap.sslEnabled")).booleanValue(); this.followReferrals = Boolean.valueOf(JiveGlobals.getXMLProperty( "ldap.autoFollowReferrals")).booleanValue(); this.initialContextFactory = JiveGlobals.getXMLProperty("ldap.initialContextFactory"); if (initialContextFactory != null) { try { Class.forName(initialContextFactory); } catch (ClassNotFoundException cnfe) { Log.error("Initial context factory class failed to load: " + initialContextFactory + ". Using default initial context factory class instead."); initialContextFactory = "com.sun.jndi.ldap.LdapCtxFactory"; } } // Use default value if none was set. else { initialContextFactory = "com.sun.jndi.ldap.LdapCtxFactory"; } if (Log.isDebugEnabled()) { Log.debug("Created new LdapManager() instance, fields:"); Log.debug("\t host: " + host); Log.debug("\t port: " + port); Log.debug("\t usernamefield: " + usernameField); Log.debug("\t baseDN: " + baseDN); Log.debug("\t alternateBaseDN: " + alternateBaseDN); Log.debug("\t nameField: " + nameField); Log.debug("\t emailField: " + emailField); Log.debug("\t adminDN: " + adminDN); Log.debug("\t adminPassword: " + adminPassword); Log.debug("\t searchFilter: " + searchFilter); Log.debug("\t ldapDebugEnabled: " + ldapDebugEnabled); Log.debug("\t sslEnabled: " + sslEnabled); Log.debug("\t initialContextFactory: " + initialContextFactory); Log.debug("\t connectionPoolEnabled: " + connectionPoolEnabled); Log.debug("\t autoFollowReferrals: " + followReferrals); Log.debug("\t groupNameField: " + groupNameField); Log.debug("\t groupMemberField: " + groupMemberField); Log.debug("\t groupDescriptionField: " + groupDescriptionField); Log.debug("\t posixMode: " + posixMode); Log.debug("\t groupSearchFilter: " + groupSearchFilter); } } | 6161 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6161/26da5404f91ae0c0102986671c82e45825d3148e/LdapManager.java/buggy/src/java/org/jivesoftware/wildfire/ldap/LdapManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
18053,
1318,
1435,
288,
3639,
333,
18,
2564,
273,
804,
688,
19834,
18,
588,
4201,
1396,
2932,
14394,
18,
2564,
8863,
3639,
514,
1756,
1585,
273,
804,
688,
19834,
18,
588,
4201,
1396... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18053,
1318,
1435,
288,
3639,
333,
18,
2564,
273,
804,
688,
19834,
18,
588,
4201,
1396,
2932,
14394,
18,
2564,
8863,
3639,
514,
1756,
1585,
273,
804,
688,
19834,
18,
588,
4201,
1396... |
public void executeTest(String type) throws Exception { String queryString = (String) queries.get(type); Query q = new Query(queryString); BestQueryStorer bestQuery = new BestQueryStorer(); Set precompsSet = PrecomputedTableManager.getInstance(getDatabase()).getPrecomputedTables(); QueryOptimiser.recursiveOptimise(precompsSet, q, bestQuery, q); Set optimisedQueries = bestQuery.getQueries(); // optimisedQueries now contains the set of queries we need to see all give the same results Iterator queriesIter = optimisedQueries.iterator(); while (queriesIter.hasNext()) { Query optimisedQuery = (Query) queriesIter.next(); checkResultsForQueries(q, optimisedQuery); } System.out.println(type + "(" + optimisedQueries.size() + " choices)"); // Now try the optimise() method. We don't know which of the // set of queries we are actually going to get back, but we // can check that it takes less time than the original query. String optimisedQuery = QueryOptimiser.optimise(queryString, getDatabase()); if (queryString.equals(optimisedQuery)) { System.out.println(": ORIGINAL "); } else { System.out.println(": OPTIMISED "); } checkResultsForQueries(q, new Query(optimisedQuery)); } | 7196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7196/719b76dd14f2f3126e764a6597240e50b7004c4f/QueryOptimiserFunctionalTest.java/buggy/intermine/src/test/org/intermine/sql/precompute/QueryOptimiserFunctionalTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
90,
11359,
561,
557,
624,
4709,
12,
780,
723,
13,
15069,
503,
95,
780,
2271,
780,
28657,
780,
13,
13748,
18,
588,
12,
723,
1769,
1138,
85,
33,
2704,
1138,
12,
2271,
780,
1769,
14173,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
90,
11359,
561,
557,
624,
4709,
12,
780,
723,
13,
15069,
503,
95,
780,
2271,
780,
28657,
780,
13,
13748,
18,
588,
12,
723,
1769,
1138,
85,
33,
2704,
1138,
12,
2271,
780,
1769,
14173,
... | ||
if (ct.method.equals(Request.SUBSCRIBE) | if (this.isLoggingEnabled()) { logWriter.logDebug("ct.fromTag = " + fromTag); logWriter.logDebug("thisToTag = " + thisToTag); logWriter.logDebug("hisEvent = " + hisEvent); logWriter.logDebug("eventHdr " + eventHdr); } if (listeningPoint.getPort() == port && listeningPoint.getIPAddress().equals(host) | public SIPClientTransaction findSubscribeTransaction( SIPRequest notifyMessage) { synchronized (clientTransactions) { Iterator it = clientTransactions.iterator(); String thisToTag = notifyMessage.getTo().getTag(); if (thisToTag == null) return null; Event eventHdr = (Event) notifyMessage.getHeader(EventHeader.NAME); if (eventHdr == null) return null; while (it.hasNext()) { SIPClientTransaction ct = (SIPClientTransaction) it.next(); //SIPRequest sipRequest = ct.getOriginalRequest(); String fromTag = ct.from.getTag(); Event hisEvent = ct.event; // Event header is mandatory but some slopply clients // dont include it. if (hisEvent == null) continue; if (ct.method.equals(Request.SUBSCRIBE) && fromTag.equalsIgnoreCase(thisToTag) && hisEvent != null && eventHdr.match(hisEvent) && notifyMessage.getCallId().getCallId() .equalsIgnoreCase(ct.callId.getCallId())) return ct; } } return null; } | 7607 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7607/d3bce65e49e71ee7df15bd72fd338535d4501bc1/SIPTransactionStack.java/buggy/trunk/src/gov/nist/javax/sip/stack/SIPTransactionStack.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
348,
2579,
1227,
3342,
1104,
16352,
3342,
12,
1082,
202,
17739,
691,
5066,
1079,
13,
288,
202,
202,
22043,
261,
2625,
14186,
13,
288,
1082,
202,
3198,
518,
273,
1004,
14186,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
348,
2579,
1227,
3342,
1104,
16352,
3342,
12,
1082,
202,
17739,
691,
5066,
1079,
13,
288,
202,
202,
22043,
261,
2625,
14186,
13,
288,
1082,
202,
3198,
518,
273,
1004,
14186,
18,... |
input.mark(rl); } | input.mark(rl); } | public void mark(int rl) { input.mark(rl); } | 5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/4e5fe60cb9134363e50dbd8da5c5e82e3c6e9afc/SVGReader.java/buggy/src/org/apache/fop/image/analyser/SVGReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
7682,
1071,
918,
2267,
12,
474,
11618,
13,
288,
18701,
810,
18,
3355,
12,
1321,
1769,
13491,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
7682,
1071,
918,
2267,
12,
474,
11618,
13,
288,
18701,
810,
18,
3355,
12,
1321,
1769,
13491,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
m_ops.m_opMap[matchTypePos] = OpCodes.MATCH_ANY_ANCESTOR; | m_ops.setOp(matchTypePos, OpCodes.MATCH_ANY_ANCESTOR); | protected boolean AbbreviatedNodeTestStep(boolean isLeadingSlashPermitted) throws javax.xml.transform.TransformerException { int opPos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH]; int axesType; // The next blocks guarantee that a MATCH_XXX will be added. int matchTypePos = -1; if (tokenIs('@')) { axesType = OpCodes.MATCH_ATTRIBUTE; appendOp(2, axesType); nextToken(); } else if (this.lookahead("::", 1)) { if (tokenIs("attribute")) { axesType = OpCodes.MATCH_ATTRIBUTE; appendOp(2, axesType); } else if (tokenIs("child")) { matchTypePos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH]; axesType = OpCodes.MATCH_IMMEDIATE_ANCESTOR; appendOp(2, axesType); } else { axesType = -1; this.error(XPATHErrorResources.ER_AXES_NOT_ALLOWED, new Object[]{ this.m_token }); } nextToken(); nextToken(); } else if (tokenIs('/')) { if (!isLeadingSlashPermitted) { // "A step was expected in the pattern, but '/' was encountered." error(XPATHErrorResources.ER_EXPECTED_STEP_PATTERN, null); } axesType = OpCodes.MATCH_ANY_ANCESTOR; appendOp(2, axesType); nextToken(); } else { matchTypePos = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH]; axesType = OpCodes.MATCH_IMMEDIATE_ANCESTOR; appendOp(2, axesType); } // Make room for telling how long the step is without the predicate m_ops.m_opMap[OpMap.MAPINDEX_LENGTH] += 1; NodeTest(axesType); // Tell how long the step is without the predicate m_ops.m_opMap[opPos + OpMap.MAPINDEX_LENGTH + 1] = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH] - opPos; while (tokenIs('[')) { Predicate(); } boolean trailingSlashConsumed; // For "a//b", where "a" is current step, we need to mark operation of // current step as "MATCH_ANY_ANCESTOR". Then we'll consume the first // slash and subsequent step will be treated as a MATCH_IMMEDIATE_ANCESTOR // (unless it too is followed by '//'.) // // %REVIEW% Following is what happens today, but I'm not sure that's // %REVIEW% correct behaviour. Perhaps no valid case could be constructed // %REVIEW% where it would matter? // // If current step is on the attribute axis (e.g., "@x//b"), we won't // change the current step, and let following step be marked as // MATCH_ANY_ANCESTOR on next call instead. if ((matchTypePos > -1) && tokenIs('/') && lookahead('/', 1)) { m_ops.m_opMap[matchTypePos] = OpCodes.MATCH_ANY_ANCESTOR; nextToken(); trailingSlashConsumed = true; } else { trailingSlashConsumed = false; } // Tell how long the entire step is. m_ops.m_opMap[opPos + OpMap.MAPINDEX_LENGTH] = m_ops.m_opMap[OpMap.MAPINDEX_LENGTH] - opPos; return trailingSlashConsumed; } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/f136f83081069756bcd71950054569f3ad4d2ce5/XPathParser.java/buggy/src/org/apache/xpath/compiler/XPathParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1250,
9771,
9854,
907,
4709,
4160,
12,
6494,
353,
19112,
11033,
31465,
13,
5411,
1216,
6863,
18,
2902,
18,
6547,
18,
8319,
503,
225,
288,
565,
509,
1061,
1616,
273,
312,
67,
4473,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1250,
9771,
9854,
907,
4709,
4160,
12,
6494,
353,
19112,
11033,
31465,
13,
5411,
1216,
6863,
18,
2902,
18,
6547,
18,
8319,
503,
225,
288,
565,
509,
1061,
1616,
273,
312,
67,
4473,
... |
public Point getRight() {return new Point(right(), y+height/2);} | public Point getRight() { return new Point(right(), y + height / 2); } | public Point getRight() {return new Point(right(), y+height/2);} | 11225 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11225/fcca3c0c8061d4598950ea2edd5c108d6ddf60f4/Rectangle.java/buggy/org.eclipse.draw2d/src/org/eclipse/draw2d/geometry/Rectangle.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
4686,
202,
588,
4726,
1435,
202,
288,
2463,
394,
4686,
12,
4083,
9334,
677,
15,
4210,
19,
22,
1769,
97,
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,
1071,
4686,
202,
588,
4726,
1435,
202,
288,
2463,
394,
4686,
12,
4083,
9334,
677,
15,
4210,
19,
22,
1769,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (element instanceof ITaskCategory || element instanceof IQuery) { | if (element instanceof ITaskCategory || element instanceof ITaskQuery) { | public String getColumnText(Object obj, int columnIndex) { if (obj instanceof ITaskListElement) { ITaskListElement element = (ITaskListElement) obj; switch (columnIndex) { case 0: return null; case 1: return null; case 2: if (element instanceof ITaskCategory || element instanceof IQuery) { return null; } return element.getPriority(); case 3: return element.getDescription(false); } } return null; } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/de4b42dba8b1b8b770b413f9f9d24bdc30fccd38/TasklistLabelProvider.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TasklistLabelProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
6716,
1528,
12,
921,
1081,
16,
509,
14882,
13,
288,
377,
202,
430,
261,
2603,
1276,
467,
2174,
682,
1046,
13,
288,
1082,
202,
1285,
835,
682,
1046,
930,
273,
261,
1285,
835,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
6716,
1528,
12,
921,
1081,
16,
509,
14882,
13,
288,
377,
202,
430,
261,
2603,
1276,
467,
2174,
682,
1046,
13,
288,
1082,
202,
1285,
835,
682,
1046,
930,
273,
261,
1285,
835,
... |
String from = ((InternetAddress) getMessageIn().getFrom()[0]).getAddress().trim(); | String from = "FETCHMAIL-SERVICE"; try { from = ((InternetAddress) getMessageIn().getFrom()[0]).getAddress().trim(); } catch (Exception _) { getLogger().info("Could not identify sender -- using default value"); } | protected MailAddress getSender() throws MessagingException { String from = ((InternetAddress) getMessageIn().getFrom()[0]).getAddress().trim(); InternetAddress internetAddress = null; // Check for domain part, add default if missing if (from.indexOf('@') < 0) { StringBuffer fromBuffer = new StringBuffer(from); fromBuffer.append('@'); fromBuffer.append(getDefaultDomainName()); internetAddress = new InternetAddress(fromBuffer.toString()); } else internetAddress = new InternetAddress(from); return new MailAddress(internetAddress); } | 47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/f28846d04b7c2a6eef59240b53d3f6d66c3bd676/MessageProcessor.java/clean/branches/branch_2_1_fcs/src/java/org/apache/james/fetchmail/MessageProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
11542,
1887,
1322,
2345,
1435,
1216,
23794,
503,
565,
288,
3639,
514,
628,
273,
5411,
14015,
26562,
1887,
13,
2381,
382,
7675,
588,
1265,
1435,
63,
20,
65,
2934,
588,
1887,
7675,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11542,
1887,
1322,
2345,
1435,
1216,
23794,
503,
565,
288,
3639,
514,
628,
273,
5411,
14015,
26562,
1887,
13,
2381,
382,
7675,
588,
1265,
1435,
63,
20,
65,
2934,
588,
1887,
7675,
52... |
public void testHeloEnforcement() throws Exception, SMTPException { | public void testHeloEnforcement() throws Exception { | public void testHeloEnforcement() throws Exception, SMTPException { finishSetUp(m_testConfiguration); SMTPProtocol smtpProtocol1 = new SMTPProtocol("127.0.0.1", m_smtpListenerPort); smtpProtocol1.openPort(); assertEquals("first connection taken", 1, smtpProtocol1.getState()); // no message there, yet assertNull("no mail received by mail server", m_mailServer.getLastMail()); String sender1 = "mail_sender1@localhost"; try { smtpProtocol1.mail(new Address(sender1)); fail("helo not enforced"); } catch (SMTPException e) { assertEquals("expected 503 error", 503, e.getCode()); } smtpProtocol1.helo(InetAddress.getLocalHost()); smtpProtocol1.mail(new Address(sender1)); smtpProtocol1.quit(); } | 47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/36ca715b2ae7da1381d09c7859e92ec192618503/SMTPServerTest.java/clean/src/test/org/apache/james/smtpserver/SMTPServerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
44,
24214,
664,
5734,
475,
1435,
1216,
1185,
288,
3639,
4076,
694,
1211,
12,
81,
67,
3813,
1750,
1769,
3639,
18102,
5752,
17660,
5752,
21,
273,
394,
18102,
5752,
2932,
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,
377,
1071,
918,
1842,
44,
24214,
664,
5734,
475,
1435,
1216,
1185,
288,
3639,
4076,
694,
1211,
12,
81,
67,
3813,
1750,
1769,
3639,
18102,
5752,
17660,
5752,
21,
273,
394,
18102,
5752,
2932,
14... |
if (this.bEnableWidths) { lblWidth.setEnabled(bState & bEnableUI); cmbWidth.setEnabled(bState & bEnableUI); | if ( this.bEnableWidths ) { lblWidth.setEnabled( bState & bEnableUI ); cmbWidth.setEnabled( bState & bEnableUI ); | public void setEnabled(boolean bState) { boolean bEnableUI = true; if (this.bEnableVisibility) { cbVisible.setEnabled(bState); bEnableUI = cbVisible.getSelection(); } if (this.bEnableStyles) { lblStyle.setEnabled(bState & bEnableUI); cmbStyle.setEnabled(bState & bEnableUI); } if (this.bEnableWidths) { lblWidth.setEnabled(bState & bEnableUI); cmbWidth.setEnabled(bState & bEnableUI); } if (this.bEnableColor) { lblColor.setEnabled(bState & bEnableUI); cmbColor.setEnabled(bState & bEnableUI); } this.bEnabled = bState; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/c60a4815037b62e9358af2625eb6236e7c979d0f/LineAttributesComposite.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/LineAttributesComposite.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
12888,
12,
6494,
324,
1119,
13,
288,
202,
202,
6494,
324,
8317,
5370,
273,
638,
31,
202,
202,
430,
261,
2211,
18,
70,
8317,
10135,
13,
288,
1082,
202,
7358,
6207,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
12888,
12,
6494,
324,
1119,
13,
288,
202,
202,
6494,
324,
8317,
5370,
273,
638,
31,
202,
202,
430,
261,
2211,
18,
70,
8317,
10135,
13,
288,
1082,
202,
7358,
6207,
18,
5... |
setMarginwidth(0); | private void evaluateExpressions() throws JspException { try { setAnchor((String) evalAttr("anchor", getAnchor(), String.class)); } catch (NullAttributeException ex) { setAnchor(null); } try { setForward((String) evalAttr("forward", getForward(), String.class)); } catch (NullAttributeException ex) { setForward(null); } try { setFrameborder((String) evalAttr("frameborder", getFrameborder(), String.class)); } catch (NullAttributeException ex) { setFrameborder(null); } try { setFrameName((String) evalAttr("frameName", getFrameName(), String.class)); } catch (NullAttributeException ex) { setFrameName(null); } try { setHref((String) evalAttr("href", getHref(), String.class)); } catch (NullAttributeException ex) { setHref(null); } try { setLongdesc((String) evalAttr("longdesc", getLongdesc(), String.class)); } catch (NullAttributeException ex) { setLongdesc(null); } try { setMarginheight(((Integer) evalAttr("marginheight", getMarginheightExpr(), Integer.class)). intValue()); } catch (NullAttributeException ex) { setMarginheight(0); } try { setMarginwidth(((Integer) evalAttr("marginwidth", getMarginwidthExpr(), Integer.class)). intValue()); } catch (NullAttributeException ex) { setMarginwidth(0); } try { setName((String) evalAttr("name", getName(), String.class)); } catch (NullAttributeException ex) { setName(null); } try { setNoresize(((Boolean) evalAttr("noresize", getNoresizeExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { setNoresize(false); } try { setPage((String) evalAttr("page", getPage(), String.class)); } catch (NullAttributeException ex) { setPage(null); } try { setParamId((String) evalAttr("paramId", getParamId(), String.class)); } catch (NullAttributeException ex) { setParamId(null); } try { setParamName((String) evalAttr("paramName", getParamName(), String.class)); } catch (NullAttributeException ex) { setParamName(null); } try { setParamProperty((String) evalAttr("paramProperty", getParamProperty(), String.class)); } catch (NullAttributeException ex) { setParamProperty(null); } try { setParamScope((String) evalAttr("paramScope", getParamScope(), String.class)); } catch (NullAttributeException ex) { setParamScope(null); } try { setProperty((String) evalAttr("property", getProperty(), String.class)); } catch (NullAttributeException ex) { setProperty(null); } try { setScope((String) evalAttr("scope", getScope(), String.class)); } catch (NullAttributeException ex) { setScope(null); } try { setScrolling((String) evalAttr("scrolling", getScrolling(), String.class)); } catch (NullAttributeException ex) { setScrolling(null); } try { setStyle((String) evalAttr("style", getStyle(), String.class)); } catch (NullAttributeException ex) { setStyle(null); } try { setStyleClass((String) evalAttr("styleClass", getStyleClass(), String.class)); } catch (NullAttributeException ex) { setStyleClass(null); } try { setStyleId((String) evalAttr("styleId", getStyleId(), String.class)); } catch (NullAttributeException ex) { setStyleId(null); } try { setTitle((String) evalAttr("title", getTitle(), String.class)); } catch (NullAttributeException ex) { setTitle(null); } try { setTitleKey((String) evalAttr("titleKey", getTitleKey(), String.class)); } catch (NullAttributeException ex) { setTitleKey(null); } try { setTransaction(((Boolean) evalAttr("transaction", getTransactionExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { setTransaction(false); } } | 48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/db064e19656421b94aaf753550935d95f44bd5f9/ELFrameTag.java/buggy/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELFrameTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
11605,
12443,
780,
13,
5302,
3843,
2932,
16215,
3113,
336,
11605,
9334,
514,
18,
1106,
10019,
3639,
289,
1044,
261,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
11605,
12443,
780,
13,
5302,
3843,
2932,
16215,
3113,
336,
11605,
9334,
514,
18,
1106,
10019,
3639,
289,
1044,
261,... | |
Collection<EvsResult> nameResult = vc.getNameResult(); | public ValidationItems validate() { module = new EvsModule(UserPreferences.getInstance().getPreTBox()?"PRE_NCI_Thesaurus":"NCI_Thesaurus"); List<Concept> concepts = ElementsLists.getInstance(). getElements(DomainObjectFactory.newConcept()); final ExecutorService executor = Executors.newFixedThreadPool(10); final BlockingQueue<Future> futures = new LinkedBlockingQueue<Future>(); final Map<Future,Concept> futureConceptMap = new HashMap<Future,Concept>(); for(final Concept concept : concepts) { Future<ValidatedConcept> future = executor.submit(new Callable<ValidatedConcept>() { public ValidatedConcept call() throws Exception { EvsResult result = module.findByConceptCode(concept.getPreferredName(), false); Collection<EvsResult> nameResult = module.findByPreferredName(concept.getLongName(), false); return new ValidatedConcept(concept, nameResult, result); } }); futures.add(future); futureConceptMap.put(future, concept); } int pStatus = 0; // wait for each future to complete for(Future<ValidatedConcept> future : futures) { final Concept con = futureConceptMap.get(future); if(progressListener != null) { ProgressEvent event = new ProgressEvent(); event.setMessage("Validating " + con.getLongName()); event.setStatus(pStatus++); progressListener.newProgressEvent(event); } ValidatedConcept vc = null; try { // block until the future is ready vc = future.get(); } catch (Exception e) { e.printStackTrace(); } EvsResult result = vc.getResult(); if(result != null) { if(con.getLongName() == null || !con.getLongName().equals(result.getConcept().getLongName())) { items.addItem(new ValidationError( PropertyAccessor.getProperty( "mismatch.name.by.code", con.getLongName()), new ConceptMismatchWrapper(1,result.getConcept(),con))); //highlightDifferentNameByCode.add(result.getConcept()); //errorList.put(con, result.getConcept()); } if(con.getPreferredDefinition() == null || !con.getPreferredDefinition().trim().equals( result.getConcept().getPreferredDefinition().trim())) { items.addItem(new MismatchDefByCodeError( PropertyAccessor.getProperty( "mismatch.def.by.code", con.getLongName()),new ConceptMismatchWrapper(2,result.getConcept(),con))); //highlightDifferentDefByCode.add(result.getConcept()); //errorList.put(con, result.getConcept()); } } Collection<EvsResult> nameResult = vc.getNameResult(); if(nameResult != null && nameResult.size() == 1) { for(EvsResult name : nameResult) { if(con.getPreferredName() == null || !con.getPreferredName().equals( name.getConcept().getPreferredName())) { items.addItem(new ValidationError( PropertyAccessor.getProperty( "mismatch.code.by.name", con.getLongName()), new ConceptMismatchWrapper(3,name.getConcept(),con))); //highlightDifferentCodeByName.add(name.getConcept()); //errorNameList.put(con, name.getConcept()); } if(con.getPreferredDefinition() == null || !con.getPreferredDefinition().trim().equals( name.getConcept().getPreferredDefinition().trim())) { items.addItem(new ValidationError( PropertyAccessor.getProperty( "mismatch.def.by.name", con.getLongName()), new ConceptMismatchWrapper(4,name.getConcept(),con))); //highlightDifferentDefByName.add(name.getConcept()); //errorNameList.put(con, name.getConcept()); } } } // a slight delay so that we can see the progress in the UI, since the // futures tend to complete in batches try { Thread.sleep(20); } catch (InterruptedException e) { e.printStackTrace(); } } return items; } | 55019 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55019/ffeeea09f111a2a8643fd34245a7b47244637a56/ConceptValidator.java/buggy/src/gov/nih/nci/ncicb/cadsr/loader/validator/ConceptValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5684,
3126,
1954,
1435,
288,
565,
1605,
273,
394,
512,
6904,
3120,
12,
1299,
12377,
18,
588,
1442,
7675,
588,
1386,
56,
3514,
1435,
7225,
3670,
67,
50,
7266,
67,
1315,
281,
28659,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5684,
3126,
1954,
1435,
288,
565,
1605,
273,
394,
512,
6904,
3120,
12,
1299,
12377,
18,
588,
1442,
7675,
588,
1386,
56,
3514,
1435,
7225,
3670,
67,
50,
7266,
67,
1315,
281,
28659,
... | |
MPSProject project = getContext().getProject(); SModel targetModel = targetClass.getModel(); String fqName = targetModel.getFQName(); String name = targetClass.getName(); String className = fqName + '.' + name; SModel tmpModel = new SModel(); tmpModel.setLoading(true); SimpleModelDescriptor tmpModelDescriptor = new SimpleModelDescriptor(tmpModel); targetModel.addImportedModelDescriptor(tmpModelDescriptor); try { JavaClassMap javaClassMap = JavaClassMaps.getJavaClassMap(tmpModel); ClassConcept tmpClass = null; try { tmpClass = (ClassConcept) javaClassMap.get(className); } catch (Exception e1) { LOG.error(e1); } if (tmpClass == null) { JOptionPane.showMessageDialog(myContainer, "Class not found:\n" + className, "Class Not Found", JOptionPane.ERROR_MESSAGE); return; } targetClass.setExtendedClass(toModelClass(tmpClass.getExtendedClass(), targetModel, project)); Iterator<StaticFieldDeclaration> staticFields = tmpClass.staticFields(); while (staticFields.hasNext()) { StaticFieldDeclaration staticFieldDeclaration = staticFields.next(); StaticFieldDeclaration copy = (StaticFieldDeclaration) createValidCopy(staticFieldDeclaration, targetModel, project); targetClass.addStaticField(copy); } Iterator<FieldDeclaration> fields = tmpClass.fields(); while (fields.hasNext()) { FieldDeclaration fieldDeclaration = fields.next(); FieldDeclaration copy = (FieldDeclaration) createValidCopy(fieldDeclaration, targetModel, project); targetClass.addField(copy); } Iterator<ConstructorDeclaration> constructors = tmpClass.constructors(); while (constructors.hasNext()) { ConstructorDeclaration constructorDeclaration = constructors.next(); ConstructorDeclaration copy = (ConstructorDeclaration) createValidCopy(constructorDeclaration, targetModel, project); targetClass.addConstructor(copy); } Iterator<InstanceMethodDeclaration> methods = tmpClass.methods(); while (methods.hasNext()) { InstanceMethodDeclaration instanceMethodDeclaration = methods.next(); InstanceMethodDeclaration copy = (InstanceMethodDeclaration) createValidCopy(instanceMethodDeclaration, targetModel, project); targetClass.addMethod(copy); } Iterator<StaticMethodDeclaration> staticMethods = tmpClass.staticMethods(); while (staticMethods.hasNext()) { StaticMethodDeclaration staticMethodDeclaration = staticMethods.next(); StaticMethodDeclaration copy = (StaticMethodDeclaration) createValidCopy(staticMethodDeclaration, targetModel, project); targetClass.addStaticMethod(copy); } targetModel.fireModelChangedDramaticallyEvent(); JOptionPane.showMessageDialog(myContainer, "Added:\n" + tmpClass.getStaticFieldsCount() + " static fields\n" + tmpClass.getFieldsCount() + " fields\n" + tmpClass.getConstructorsCount() + " constructors\n" + tmpClass.getMethodsCount() + " methods\n" + tmpClass.getStaticMethodsCount() + " static methods", "Class Has Been Generated", JOptionPane.INFORMATION_MESSAGE); tmpClass.delete(); } finally { targetModel.deleteImportedModel(tmpModelDescriptor.getFQName()); } } | copy[0] = CopyUtil.copy(root); } | public void run() { MPSProject project = getContext().getProject(); SModel targetModel = targetClass.getModel(); String fqName = targetModel.getFQName(); String name = targetClass.getName(); String className = fqName + '.' + name; SModel tmpModel = new SModel(); tmpModel.setLoading(true); SimpleModelDescriptor tmpModelDescriptor = new SimpleModelDescriptor(tmpModel); targetModel.addImportedModelDescriptor(tmpModelDescriptor); try { JavaClassMap javaClassMap = JavaClassMaps.getJavaClassMap(tmpModel); ClassConcept tmpClass = null; try { tmpClass = (ClassConcept) javaClassMap.get(className); } catch (Exception e1) { LOG.error(e1); } if (tmpClass == null) { JOptionPane.showMessageDialog(myContainer, "Class not found:\n" + className, "Class Not Found", JOptionPane.ERROR_MESSAGE); return; } targetClass.setExtendedClass(toModelClass(tmpClass.getExtendedClass(), targetModel, project)); Iterator<StaticFieldDeclaration> staticFields = tmpClass.staticFields(); while (staticFields.hasNext()) { StaticFieldDeclaration staticFieldDeclaration = staticFields.next(); StaticFieldDeclaration copy = (StaticFieldDeclaration) createValidCopy(staticFieldDeclaration, targetModel, project); targetClass.addStaticField(copy); } Iterator<FieldDeclaration> fields = tmpClass.fields(); while (fields.hasNext()) { FieldDeclaration fieldDeclaration = fields.next(); FieldDeclaration copy = (FieldDeclaration) createValidCopy(fieldDeclaration, targetModel, project); targetClass.addField(copy); } Iterator<ConstructorDeclaration> constructors = tmpClass.constructors(); while (constructors.hasNext()) { ConstructorDeclaration constructorDeclaration = constructors.next(); ConstructorDeclaration copy = (ConstructorDeclaration) createValidCopy(constructorDeclaration, targetModel, project); targetClass.addConstructor(copy); } Iterator<InstanceMethodDeclaration> methods = tmpClass.methods(); while (methods.hasNext()) { InstanceMethodDeclaration instanceMethodDeclaration = methods.next(); InstanceMethodDeclaration copy = (InstanceMethodDeclaration) createValidCopy(instanceMethodDeclaration, targetModel, project); targetClass.addMethod(copy); } Iterator<StaticMethodDeclaration> staticMethods = tmpClass.staticMethods(); while (staticMethods.hasNext()) { StaticMethodDeclaration staticMethodDeclaration = staticMethods.next(); StaticMethodDeclaration copy = (StaticMethodDeclaration) createValidCopy(staticMethodDeclaration, targetModel, project); targetClass.addStaticMethod(copy); } targetModel.fireModelChangedDramaticallyEvent(); JOptionPane.showMessageDialog(myContainer, "Added:\n" + tmpClass.getStaticFieldsCount() + " static fields\n" + tmpClass.getFieldsCount() + " fields\n" + tmpClass.getConstructorsCount() + " constructors\n" + tmpClass.getMethodsCount() + " methods\n" + tmpClass.getStaticMethodsCount() + " static methods", "Class Has Been Generated", JOptionPane.INFORMATION_MESSAGE); tmpClass.delete(); } finally { targetModel.deleteImportedModel(tmpModelDescriptor.getFQName()); } } | 14939 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14939/478c1e353f58d79d016cb8b2d214bc92557b2fa2/AbstractEditorComponent.java/clean/source/jetbrains/mps/nodeEditor/AbstractEditorComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
10402,
1071,
918,
1086,
1435,
288,
10792,
11132,
4109,
1984,
273,
6474,
7675,
588,
4109,
5621,
10792,
348,
1488,
1018,
1488,
273,
14563,
18,
588,
1488,
5621,
10792,
514,
8508,
461,
273,
1018,
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,
10402,
1071,
918,
1086,
1435,
288,
10792,
11132,
4109,
1984,
273,
6474,
7675,
588,
4109,
5621,
10792,
348,
1488,
1018,
1488,
273,
14563,
18,
588,
1488,
5621,
10792,
514,
8508,
461,
273,
1018,
14... |
private boolean endsNotBalanced() { String line;// int row = area.getCaretLine(); int count = area.getLineCount(); int balancedCount = 0;// StringBuffer buffer = new StringBuffer(""); boolean isString = false; for (int i = 0; i < count; i++) { line = area.getLineText(i).trim(); if (hasEndKeyword(line)) {// buffer.append(balancedCount + "");// for (int j = 0; j < balancedCount; buffer.append(j++ > -1 ? " " : "")) ;// buffer.append(line + "\n"); balancedCount--; } if (line.indexOf("<<-EOF") != -1) { isString = true; } else if (line.indexOf("EOF") != -1) { isString = false; } if (!isString) { boolean isDoMatch = DoRegExp.instance.isMatch(line); boolean doInComment = isDoInComment(line);// if(line.indexOf("File.open") != -1) {// buffer.append("do: " + isDoMatch + ", in comment: " + doInComment + ',' + line + '\n');// } boolean isDoStatement = isDoMatch && !doInComment; boolean ignore = IgnoreRegExp.instance.isMatch(line); boolean conditionalAssignment = TrailingConditionRegExp.instance.isMatch(line); if (conditionalAssignment || (!ignore && (isDoStatement || MatchRegExp.instance.isMatch(line)))) { boolean openingBrace = line.indexOf("{") != -1 && line.indexOf("}") == -1; boolean elsif = line.indexOf("elsif") != -1; if (!openingBrace && !elsif) {// buffer.append(balancedCount + "");// for (int j = 0; j < balancedCount; buffer.append(j++ > -1 ? " " : "")) ;// buffer.append(line + "\n"); balancedCount++; int moduleIndex = line.indexOf("module"); while(moduleIndex != -1) { moduleIndex = line.indexOf("module", moduleIndex+5); if(moduleIndex != -1) { balancedCount++; } } } } } }// RubyPlugin.log(buffer.toString(), AutoIndentAndInsertEnd.class); boolean endsNotBalanced = balancedCount < 0; RubyPlugin.log("Ends " + (endsNotBalanced ? "not " : "") + "balanced", AutoIndentAndInsertEnd.class); return endsNotBalanced; } | 13291 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13291/615094576784f8eacf0891411a5b25d98778892b/AutoIndentAndInsertEnd.java/buggy/src/org/jedit/ruby/structure/AutoIndentAndInsertEnd.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
6494,
5839,
1248,
13937,
72,
1435,
95,
780,
1369,
31,
759,
474,
492,
33,
5036,
18,
588,
39,
20731,
1670,
5621,
474,
1883,
33,
5036,
18,
588,
1670,
1380,
5621,
474,
12296,
72,
1380,
33,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6494,
5839,
1248,
13937,
72,
1435,
95,
780,
1369,
31,
759,
474,
492,
33,
5036,
18,
588,
39,
20731,
1670,
5621,
474,
1883,
33,
5036,
18,
588,
1670,
1380,
5621,
474,
12296,
72,
1380,
33,... | ||
final PsiFile[] psiRoots = file.getPsiRoots(); | final FileViewProvider viewProvider = file.getViewProvider(); | protected void findMatches(MatchResultSink sink, final MatchOptions options) throws MalformedPatternException, UnsupportedPatternException { PsiDocumentManager.getInstance(project).commitAllDocuments(); matchContext.clear(); matchContext.setSink( new MatchConstraintsSink( sink, options.getMaxMatchesCount(), options.isDistinct(), options.isCaseSensitiveMatch() ) ); matchContext.setOptions(options); matchContext.setMatcher(visitor); CompiledPattern compiledPattern = null; synchronized(getClass()) { if (options ==lastOptions) { compiledPattern = lastPattern; } lastOptions = null; lastPattern = null; } if (compiledPattern==null) { compiledPattern = PatternCompiler.compilePattern(project,options); } if (compiledPattern== null) { return; } matchContext.setPattern(compiledPattern); matchContext.getSink().setMatchingProcess( scheduler ); scheduler.init(); progress = matchContext.getSink().getProgressIndicator(); visitor.setMatchContext(matchContext); if(isTesting) { // testing mode; final PsiElement[] elements = ((LocalSearchScope)options.getScope()).getScope(); for (PsiElement element : elements) { match(element); } matchContext.getSink().matchingFinished(); return; } SearchScope searchScope = compiledPattern.getScope(); if (searchScope==null) searchScope = options.getScope(); if (searchScope instanceof GlobalSearchScope) { final GlobalSearchScope scope = (GlobalSearchScope)searchScope; final ContentIterator ci = new ContentIterator() { public boolean processFile(VirtualFile fileOrDir) { if (!fileOrDir.isDirectory()) { final PsiFile file = PsiManager.getInstance(project).findFile(fileOrDir); if ((options.getFileType() == StdFileTypes.JAVA && file instanceof PsiJavaFile) || (options.getFileType() != StdFileTypes.JAVA && file instanceof XmlFile) ) { final PsiFile[] psiRoots = file.getPsiRoots(); for(PsiFile root:psiRoots) { ++totalFilesToScan; scheduler.addOneTask( new MatchOneFile(root) ); } } } return true; } }; final ProjectRootManager instance = ProjectRootManager.getInstance(project); ProjectFileIndex projectFileIndex = instance.getFileIndex(); final VirtualFile[] rootFiles = ApplicationManager.getApplication().runReadAction(new Computable<VirtualFile[]>() { public VirtualFile[] compute() { return (options.getFileType() == StdFileTypes.JAVA)? instance.getRootFiles(ProjectRootType.SOURCE): instance.getContentRoots() ; } }); HashSet<VirtualFile> visited = new HashSet<VirtualFile>(rootFiles.length); final VirtualFileFilter filter = new VirtualFileFilter() { public boolean accept(VirtualFile file) { if(!file.isDirectory()) return scope.contains(file); return true; } }; for (final VirtualFile rootFile : rootFiles) { if (visited.contains(rootFile)) continue; if (projectFileIndex.isInLibrarySource(rootFile) && !scope.isSearchInLibraries()) { continue; } ApplicationManager.getApplication().runReadAction(new Runnable() { public void run() { FileIndexImplUtil.iterateRecursively( rootFile, filter, ci ); } }); visited.add(rootFile); } /* @ todo factor out handlers, etc*/ } else { final PsiElement[] elementsToScan = ((LocalSearchScope)searchScope).getScope(); totalFilesToScan = elementsToScan.length; for (int i = 0; i < elementsToScan.length; ++i) { scheduler.addOneTask(new MatchOneFile(elementsToScan[i])); elementsToScan[i] = null; // to prevent long PsiElement reference } } if (scheduler.getTaskQueueEndAction()==null) { scheduler.setTaskQueueEndAction( new Runnable() { public void run() { matchContext.getSink().matchingFinished(); } } ); } scheduler.executeNext(); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/ec68037169795bc8ce41f0691b1d578c6437d5a7/MatcherImpl.java/buggy/plugins/structuralsearch/source/com/intellij/structuralsearch/impl/matcher/MatcherImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1104,
6869,
12,
2060,
1253,
11326,
9049,
16,
727,
4639,
1320,
702,
13,
1216,
13311,
3234,
503,
16,
7221,
3234,
503,
225,
288,
565,
453,
7722,
2519,
1318,
18,
588,
1442,
12,
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,
4750,
918,
1104,
6869,
12,
2060,
1253,
11326,
9049,
16,
727,
4639,
1320,
702,
13,
1216,
13311,
3234,
503,
16,
7221,
3234,
503,
225,
288,
565,
453,
7722,
2519,
1318,
18,
588,
1442,
12,
4... |
return new XSLTEngineSupport(TransformerFactory.newInstance()).isCustomURIResolverSupported(); | return new XSLTEngineSupport().isCustomURIResolverSupported(); | public static boolean isCustomURIResolverSupported() { return new XSLTEngineSupport(TransformerFactory.newInstance()).isCustomURIResolverSupported(); } | 3174 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3174/4378f8c89e4becd95fa37c3b152abca60e12d6a4/TestUtil.java/clean/tests/org/tigris/juxy/TestUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1250,
353,
3802,
3098,
4301,
7223,
1435,
288,
565,
327,
394,
20751,
4410,
6289,
7675,
291,
3802,
3098,
4301,
7223,
5621,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1250,
353,
3802,
3098,
4301,
7223,
1435,
288,
565,
327,
394,
20751,
4410,
6289,
7675,
291,
3802,
3098,
4301,
7223,
5621,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
private void setExplorerSettings(I_CmsSession session, Hashtable parameters, CmsRequestContext reqCont, CmsXmlWpTemplateFile xmlTemplateDocument) { //get the actual user settings // first try to read them from the session String explorerSettings = null; int explorerSettingsValue = 0; explorerSettings = (String)session.getValue(C_PARA_EXPLORERSETTINGS); // if this fails, get the settings from the user obeject if(explorerSettings == null) { explorerSettings = (String)reqCont.currentUser().getAdditionalInfo(C_ADDITIONAL_INFO_EXPLORERSETTINGS); } //check if the default button was selected. // if so, delete all user settings so that they are set to the defaults later. if(parameters.get(C_PARA_DEFAULT) != null) { explorerSettings = null; } // if the settings are still empty, set them to default if(explorerSettings != null) { explorerSettingsValue = new Integer(explorerSettings).intValue(); } else { explorerSettingsValue = C_FILELIST_TITLE + C_FILELIST_TYPE + C_FILELIST_CHANGED; } // now update the datablocks in the template if((explorerSettingsValue & C_FILELIST_TITLE) > 0) { xmlTemplateDocument.setData(C_CHECKTITLE, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKTITLE, " "); } if((explorerSettingsValue & C_FILELIST_TYPE) > 0) { xmlTemplateDocument.setData(C_CHECKTYPE, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKTYPE, " "); } if((explorerSettingsValue & C_FILELIST_CHANGED) > 0) { xmlTemplateDocument.setData(C_CHECKCHANGED, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKCHANGED, " "); } if((explorerSettingsValue & C_FILELIST_SIZE) > 0) { xmlTemplateDocument.setData(C_CHECKSIZE, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKSIZE, " "); } if((explorerSettingsValue & C_FILELIST_STATE) > 0) { xmlTemplateDocument.setData(C_CHECKSTATE, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKSTATE, " "); } if((explorerSettingsValue & C_FILELIST_OWNER) > 0) { xmlTemplateDocument.setData(C_CHECKOWNER, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKOWNER, " "); } if((explorerSettingsValue & C_FILELIST_GROUP) > 0) { xmlTemplateDocument.setData(C_CHECKGROUP, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKGROUP, " "); } if((explorerSettingsValue & C_FILELIST_ACCESS) > 0) { xmlTemplateDocument.setData(C_CHECKACCESS, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKACCESS, " "); } if((explorerSettingsValue & C_FILELIST_LOCKED) > 0) { xmlTemplateDocument.setData(C_CHECKLOCKEDBY, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKLOCKEDBY, " "); } } | 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,
3238,
918,
444,
20938,
2628,
12,
45,
67,
4747,
2157,
1339,
16,
18559,
1472,
16,
2868,
2149,
21426,
1111,
660,
16,
16084,
59,
84,
2283,
812,
2025,
2283,
2519,
13,
288,
7734,
368,
588,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
444,
20938,
2628,
12,
45,
67,
4747,
2157,
1339,
16,
18559,
1472,
16,
2868,
2149,
21426,
1111,
660,
16,
16084,
59,
84,
2283,
812,
2025,
2283,
2519,
13,
288,
7734,
368,
588,
32... | ||
return this.implementation_vendor; | return this.implementationVendor; | public String getImplementationVendor() { return this.implementation_vendor; }; | 46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/0a7f0ac7459a9f9ba3f69e907ae5192937b6f0bd/DescriptorSpecification.java/buggy/src/org/openscience/cdk/qsar/DescriptorSpecification.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
336,
13621,
14786,
1435,
288,
3639,
327,
333,
18,
30810,
14786,
31,
565,
289,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
336,
13621,
14786,
1435,
288,
3639,
327,
333,
18,
30810,
14786,
31,
565,
289,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } for (int j=0; j<count; j++) { longs[j] = DataTools.read4UnsignedBytes(in, littleEndian); | long pointer = in.readInt(); in.seek((int) (globalOffset + pointer)); } for (int j=0; j<count; j++) { longs[j] = in.readInt(); | public static Hashtable getIFD(RandomAccessStream in, long ifdNum, long globalOffset, long offset, boolean littleEndian) throws IOException { Hashtable ifd = new Hashtable(); // save little-endian flag to internal LITTLE_ENDIAN tag ifd.put(new Integer(LITTLE_ENDIAN), new Boolean(littleEndian)); // read in directory entries for this IFD if (DEBUG) { debug("getIFDs: seeking IFD #" + ifdNum + " at " + (globalOffset != 0 ? (globalOffset + "+" + offset) : ("" + offset))); } in.seek(globalOffset + offset); int numEntries = DataTools.read2UnsignedBytes(in, littleEndian); if (DEBUG) debug("getIFDs: " + numEntries + " directory entries to read"); if (numEntries == 0 || numEntries == 1) return ifd; for (int i=0; i<numEntries; i++) { in.seek(globalOffset + offset + 2 + 12 * i); int tag = DataTools.read2UnsignedBytes(in, littleEndian); int type = DataTools.read2UnsignedBytes(in, littleEndian); int count = (int) DataTools.read4UnsignedBytes(in, littleEndian); if (DEBUG) { debug("getIFDs: read " + getIFDTagName(tag) + " (type=" + getIFDTypeName(type) + "; count=" + count + ")"); } if (count < 0) return null; // invalid data Object value = null; if (type == BYTE) { // 8-bit unsigned integer short[] bytes = new short[count]; if (count > 4) { long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } for (int j=0; j<count; j++) { bytes[j] = DataTools.readUnsignedByte(in); } if (bytes.length == 1) value = new Short(bytes[0]); else value = bytes; } else if (type == ASCII) { // 8-bit byte that contain a 7-bit ASCII code; // the last byte must be NUL (binary zero) byte[] ascii = new byte[count]; if (count > 4) { long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } in.readFully(ascii); // count number of null terminators int nullCount = 0; for (int j=0; j<count; j++) { if (ascii[j] == 0 || j == count - 1) nullCount++; } // convert character array to array of strings String[] strings = new String[nullCount]; int c = 0, ndx = -1; for (int j=0; j<count; j++) { if (ascii[j] == 0) { strings[c++] = new String(ascii, ndx + 1, j - ndx - 1); ndx = j; } else if (j == count - 1) { // handle non-null-terminated strings strings[c++] = new String(ascii, ndx + 1, j - ndx); } } if (strings.length == 1) value = strings[0]; else value = strings; } else if (type == SHORT) { // 16-bit (2-byte) unsigned integer int[] shorts = new int[count]; if (count > 2) { long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } for (int j=0; j<count; j++) { shorts[j] = DataTools.read2UnsignedBytes(in, littleEndian); } if (shorts.length == 1) value = new Integer(shorts[0]); else value = shorts; } else if (type == LONG) { // 32-bit (4-byte) unsigned integer long[] longs = new long[count]; if (count > 1) { long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } for (int j=0; j<count; j++) { longs[j] = DataTools.read4UnsignedBytes(in, littleEndian); } if (longs.length == 1) value = new Long(longs[0]); else value = longs; } else if (type == RATIONAL) { // Two LONGs: the first represents the numerator of a fraction; // the second, the denominator TiffRational[] rationals = new TiffRational[count]; long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); for (int j=0; j<count; j++) { long numer = DataTools.read4UnsignedBytes(in, littleEndian); long denom = DataTools.read4UnsignedBytes(in, littleEndian); rationals[j] = new TiffRational(numer, denom); } if (rationals.length == 1) value = rationals[0]; else value = rationals; } else if (type == SBYTE || type == UNDEFINED) { // SBYTE: An 8-bit signed (twos-complement) integer // UNDEFINED: An 8-bit byte that may contain anything, // depending on the definition of the field byte[] sbytes = new byte[count]; if (count > 4) { long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } in.readFully(sbytes); if (sbytes.length == 1) value = new Byte(sbytes[0]); else value = sbytes; } else if (type == SSHORT) { // A 16-bit (2-byte) signed (twos-complement) integer short[] sshorts = new short[count]; if (count > 2) { long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } for (int j=0; j<count; j++) { sshorts[j] = DataTools.read2SignedBytes(in, littleEndian); } if (sshorts.length == 1) value = new Short(sshorts[0]); else value = sshorts; } else if (type == SLONG) { // A 32-bit (4-byte) signed (twos-complement) integer int[] slongs = new int[count]; if (count > 1) { long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } for (int j=0; j<count; j++) { slongs[j] = DataTools.read4SignedBytes(in, littleEndian); } if (slongs.length == 1) value = new Integer(slongs[0]); else value = slongs; } else if (type == SRATIONAL) { // Two SLONG's: the first represents the numerator of a fraction, // the second the denominator TiffRational[] srationals = new TiffRational[count]; long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); for (int j=0; j<count; j++) { int numer = DataTools.read4SignedBytes(in, littleEndian); int denom = DataTools.read4SignedBytes(in, littleEndian); srationals[j] = new TiffRational(numer, denom); } if (srationals.length == 1) value = srationals[0]; else value = srationals; } else if (type == FLOAT) { // Single precision (4-byte) IEEE format float[] floats = new float[count]; if (count > 1) { long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } for (int j=0; j<count; j++) { floats[j] = DataTools.readFloat(in, littleEndian); } if (floats.length == 1) value = new Float(floats[0]); else value = floats; } else if (type == DOUBLE) { // Double precision (8-byte) IEEE format double[] doubles = new double[count]; long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); for (int j=0; j<count; j++) { doubles[j] = DataTools.readDouble(in, littleEndian); } if (doubles.length == 1) value = new Double(doubles[0]); else value = doubles; } if (value != null) ifd.put(new Integer(tag), value); } in.seek(globalOffset + offset + 2 + 12 * numEntries); return ifd; } | 11426 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11426/2df09d33bfdc966378aae0cc09cb503afb983bc2/TiffTools.java/clean/loci/formats/TiffTools.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
18559,
336,
5501,
40,
12,
8529,
1862,
1228,
316,
16,
565,
1525,
309,
72,
2578,
16,
1525,
2552,
2335,
16,
1525,
1384,
16,
1250,
328,
10609,
13,
565,
1216,
1860,
225,
288,
565,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
18559,
336,
5501,
40,
12,
8529,
1862,
1228,
316,
16,
565,
1525,
309,
72,
2578,
16,
1525,
2552,
2335,
16,
1525,
1384,
16,
1250,
328,
10609,
13,
565,
1216,
1860,
225,
288,
565,... |
public void addSource(IFile resource, IPath indexedContainer){ | public void addSource(IFile resource, IPath indexedContainers, boolean checkEncounteredHeaders){ | public void addSource(IFile resource, IPath indexedContainer){ IProject project = resource.getProject(); boolean indexEnabled = false; if (project != null) indexEnabled = isIndexEnabled(project); else org.eclipse.cdt.internal.core.model.Util.log(null, "IndexManager addSource: File has no project associated : " + resource.getName(), ICLogConstants.CDT); //$NON-NLS-1$ if (CCorePlugin.getDefault() == null) return; if (indexEnabled){ AddCompilationUnitToIndex job = new AddCompilationUnitToIndex(resource, indexedContainer, this); //If we are in WAITING mode, we need to kick ourselves into enablement if (!jobSet.add(job.resource.getLocation()) && enabledState()==ENABLED) return; if (this.awaitingJobsCount() < MAX_FILES_IN_MEMORY) { // reduces the chance that the file is open later on, preventing it from being deleted if (!job.initializeContents()) return; } request(job); } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/92d190f0ab1c3db65bb37b50929e0604e86e87b4/IndexManager.java/buggy/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/IndexManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
527,
1830,
12,
45,
812,
1058,
16,
467,
743,
8808,
2170,
15329,
9506,
202,
45,
4109,
1984,
273,
1058,
18,
588,
4109,
5621,
9506,
202,
6494,
770,
1526,
273,
629,
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,
225,
202,
482,
918,
527,
1830,
12,
45,
812,
1058,
16,
467,
743,
8808,
2170,
15329,
9506,
202,
45,
4109,
1984,
273,
1058,
18,
588,
4109,
5621,
9506,
202,
6494,
770,
1526,
273,
629,
31,
202,
... |
Account copy = receivables.copy(); | Account copy = myReceivables.copy(); | public void testCopyMakesCopiesOfEntriesInNewAccount() { Account copy = receivables.copy(); assertEquals(Money.dollars(400), copy.balance()); copy.addEntry(Money.dollars(200), MfDate.today()); assertEquals(Money.dollars(600), copy.balance()); assertEquals(Money.dollars(400), receivables.balance()); assertTrue(copy.isValid()); } | 14939 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14939/ac369c451a39e55d2f75faa3035d179bd40b6349/AccountTester.java/buggy/projects/agreement/framework/java/test/postingrules/AccountTester.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2951,
14534,
15670,
951,
5400,
382,
1908,
3032,
1435,
288,
3639,
6590,
1610,
273,
3399,
4779,
427,
1538,
18,
3530,
5621,
3639,
1815,
8867,
12,
23091,
18,
72,
22382,
5913,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2951,
14534,
15670,
951,
5400,
382,
1908,
3032,
1435,
288,
3639,
6590,
1610,
273,
3399,
4779,
427,
1538,
18,
3530,
5621,
3639,
1815,
8867,
12,
23091,
18,
72,
22382,
5913,
... |
protected void genStorePrologue(Context ctx, Tree tree) { | protected void genStorePrologue(Context ctx, Tree tree) throws JCode.OffsetTooBigException { | protected void genStorePrologue(Context ctx, Tree tree) { Symbol sym = tree.symbol(); switch (tree) { case Ident(_): if (sym.owner().isClass()) ctx.code.emitALOAD_0(); break; case Select(Tree qualifier, _): if (!isStaticMember(sym)) genLoadQualifier(ctx, tree, true); break; default: throw global.fail("unexpected left-hand side", tree); } } | 55146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55146/c77d194dd13b0993bfe9967759f9164c47156bc8/GenJVM.java/buggy/sources/scalac/backend/jvm/GenJVM.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
3157,
2257,
626,
1330,
344,
12,
1042,
1103,
16,
4902,
2151,
13,
1216,
804,
1085,
18,
2335,
10703,
9901,
503,
288,
3639,
8565,
5382,
273,
2151,
18,
7175,
5621,
3639,
1620,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
3157,
2257,
626,
1330,
344,
12,
1042,
1103,
16,
4902,
2151,
13,
1216,
804,
1085,
18,
2335,
10703,
9901,
503,
288,
3639,
8565,
5382,
273,
2151,
18,
7175,
5621,
3639,
1620,
261,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.