rem
stringlengths 1
226k
| add
stringlengths 0
227k
| context
stringlengths 6
326k
| meta
stringlengths 143
403
| input_ids
listlengths 256
256
| attention_mask
listlengths 256
256
| labels
listlengths 128
128
|
|---|---|---|---|---|---|---|
Member next = (Member) v0.elementAt(i);
|
Object next = v0.elementAt(i); Member nextMember = (k < 0) ? (Member) next : ((Member[]) next)[k];
|
public Object evaluate(Evaluator evaluator, Exp[] args) { Vector v0 = (Vector) getArg(evaluator, args, 0), v1 = (Vector) getArg(evaluator, args, 1); if (args.length > 2) { throw Util.newInternal( "ToggleDrillState(RECURSIVE) not supported"); } if (v1.isEmpty()) { return v0; } HashSet set1 = toHashSet(v1); Vector result = new Vector(); int i = 0, n = v0.size(); while (i < n) { Member m = (Member) v0.elementAt(i++); result.addElement(m); if (!set1.contains(m)) { continue; } boolean isDrilledDown = false; if (i < n) { Member next = (Member) v0.elementAt(i); boolean strict = true; if (isAncestorOf(m, next, strict)) { isDrilledDown = true; } } if (isDrilledDown) { // skip descendants of this member do { Member next = (Member) v0.elementAt(i); boolean strict = true; if (isAncestorOf(m, next, strict)) { i++; } else { break; } } while (i < n); } else { Member[] children = m.getMemberChildren(); for (int j = 0; j < children.length; j++) { result.addElement(children[j]); } } } return result; }
|
51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/ca324b70b514c97179fae2a0f078df3b83dd33e1/BuiltinFunTable.java/buggy/src/main/mondrian/olap/fun/BuiltinFunTable.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
202,
482,
1033,
5956,
12,
15876,
18256,
16,
7784,
8526,
833,
13,
288,
25083,
202,
5018,
331,
20,
273,
261,
5018,
13,
336,
4117,
12,
14168,
639,
16,
833,
16,
374,
3631,
6862,
9506,
202,
90,
21,
273,
261,
5018,
13,
336,
4117,
12,
14168,
639,
16,
833,
16,
404,
1769,
25083,
202,
430,
261,
1968,
18,
2469,
405,
576,
13,
288,
6862,
1082,
202,
12849,
3564,
18,
2704,
3061,
12,
6862,
6862,
202,
6,
17986,
8956,
737,
1119,
12,
862,
7509,
24870,
13,
486,
3260,
8863,
25083,
202,
97,
25083,
202,
430,
261,
90,
21,
18,
291,
1921,
10756,
288,
6862,
1082,
202,
2463,
331,
20,
31,
25083,
202,
97,
25083,
202,
13482,
444,
21,
273,
358,
13482,
12,
90,
21,
1769,
25083,
202,
5018,
563,
273,
394,
5589,
5621,
25083,
202,
474,
277,
273,
374,
16,
290,
273,
331,
20,
18,
1467,
5621,
25083,
202,
17523,
261,
77,
411,
290,
13,
288,
6862,
1082,
202,
4419,
312,
273,
261,
4419,
13,
331,
20,
18,
2956,
861,
12,
77,
9904,
1769,
6862,
1082,
202,
2088,
18,
1289,
1046,
12,
81,
1769,
6862,
1082,
202,
430,
16051,
542,
21,
18,
12298,
12,
81,
3719,
288,
6862,
9506,
202,
17143,
31,
6862,
1082,
202,
97,
6862,
1082,
202,
6494,
353,
8956,
13148,
4164,
273,
629,
31,
6862,
1082,
202,
430,
261,
77,
411,
290,
13,
288,
6862,
9506,
202,
4419,
1024,
273,
261,
4419,
13,
331,
20,
18,
2956,
861,
12,
77,
1769,
6862,
9506,
202,
6494,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
202,
482,
1033,
5956,
12,
15876,
18256,
16,
7784,
8526,
833,
13,
288,
25083,
202,
5018,
331,
20,
273,
261,
5018,
13,
336,
4117,
12,
14168,
639,
16,
833,
16,
374,
3631,
6862,
9506,
202,
90,
21,
273,
261,
5018,
13,
336,
4117,
12,
14168,
639,
16,
833,
16,
404,
1769,
25083,
202,
430,
261,
1968,
18,
2469,
405,
576,
13,
288,
6862,
1082,
202,
12849,
3564,
18,
2704,
3061,
12,
6862,
6862,
202,
6,
17986,
8956,
737,
1119,
12,
862,
7509,
24870,
13,
486,
3260,
8863,
25083,
202,
97,
25083,
202,
430,
261,
90,
21,
18,
291,
1921,
10756,
288,
6862,
1082,
202,
2463,
331,
20,
31,
25083,
202,
97,
25083,
202,
13482,
444,
21,
273,
358,
2
] |
if(KNOWN_LOADERS.contains(grammarType)) {
|
if(KNOWN_LOADERS.containsKey(grammarType)) {
|
public boolean registerPreparser(String grammarType, XMLGrammarLoader loader) { if(loader == null) { // none specified! if(KNOWN_LOADERS.contains(grammarType)) { // got one; just instantiate it... String loaderName = (String)KNOWN_LOADERS.get(grammarType); try { ClassLoader cl = ObjectFactory.findClassLoader(); XMLGrammarLoader gl = (XMLGrammarLoader)(ObjectFactory.newInstance(loaderName, cl)); fLoaders.put(grammarType, gl); } catch (Exception e) { return false; } return true; } return false; } // were given one fLoaders.put(grammarType, loader); return true; } // registerPreparser(String, XMLGrammarLoader): boolean
|
1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/b5627796cd0894c1dc0e5799df81a2656967d329/XMLGrammarPreparser.java/buggy/src/org/apache/xerces/parsers/XMLGrammarPreparser.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1744,
1386,
4288,
12,
780,
6473,
559,
16,
3167,
18576,
2886,
4088,
13,
288,
540,
309,
12,
6714,
422,
446,
13,
288,
368,
6555,
1269,
5,
5411,
309,
12,
9308,
67,
1502,
5483,
55,
18,
12298,
653,
12,
31628,
559,
3719,
288,
7734,
368,
2363,
1245,
31,
2537,
10275,
518,
2777,
7734,
514,
4088,
461,
273,
261,
780,
13,
9308,
67,
1502,
5483,
55,
18,
588,
12,
31628,
559,
1769,
7734,
775,
288,
10792,
9403,
927,
273,
1033,
1733,
18,
4720,
7805,
5621,
10792,
3167,
18576,
2886,
5118,
273,
261,
4201,
18576,
2886,
21433,
921,
1733,
18,
2704,
1442,
12,
6714,
461,
16,
927,
10019,
10792,
284,
26801,
18,
458,
12,
31628,
559,
16,
5118,
1769,
7734,
289,
1044,
261,
503,
425,
13,
288,
10792,
327,
629,
31,
7734,
289,
7734,
327,
638,
31,
5411,
289,
5411,
327,
629,
31,
3639,
289,
3639,
368,
4591,
864,
1245,
3639,
284,
26801,
18,
458,
12,
31628,
559,
16,
4088,
1769,
3639,
327,
638,
31,
565,
289,
368,
1744,
1386,
4288,
12,
780,
16,
3167,
18576,
2886,
4672,
225,
1250,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1250,
1744,
1386,
4288,
12,
780,
6473,
559,
16,
3167,
18576,
2886,
4088,
13,
288,
540,
309,
12,
6714,
422,
446,
13,
288,
368,
6555,
1269,
5,
5411,
309,
12,
9308,
67,
1502,
5483,
55,
18,
12298,
653,
12,
31628,
559,
3719,
288,
7734,
368,
2363,
1245,
31,
2537,
10275,
518,
2777,
7734,
514,
4088,
461,
273,
261,
780,
13,
9308,
67,
1502,
5483,
55,
18,
588,
12,
31628,
559,
1769,
7734,
775,
288,
10792,
9403,
927,
273,
1033,
1733,
18,
4720,
7805,
5621,
10792,
3167,
18576,
2886,
5118,
273,
261,
4201,
18576,
2886,
21433,
921,
1733,
18,
2704,
1442,
12,
6714,
461,
16,
927,
10019,
10792,
284,
26801,
18,
458,
12,
31628,
559,
16,
5118,
1769,
2
] |
debugLog(pushScript + ": " + ls_str);
|
infoLog(pushScript + ": " + ls_str);
|
private boolean execPushScript(String id, String time) { try { String ls_str; String cli = pushScript + " " + outputDir + " " + id + " " + time; Process pushScript_proc = Runtime.getRuntime().exec(cli); // get its output (your input) stream DataInputStream ls_in = new DataInputStream(pushScript_proc.getInputStream()); try { while ((ls_str = ls_in.readLine()) != null) { debugLog(pushScript + ": " + ls_str); } } catch (IOException e) { return false; } try { pushScript_proc.waitFor(); if(pushScript_proc.exitValue()==0) return true; } catch (InterruptedException e) { e.printStackTrace(); } return false; } catch (IOException e1) { System.err.println(e1); return false; } }
|
3808 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3808/9050d7c218bc5eb51eb7cbd68bc0b214bcf9614b/Sucker.java/clean/apps/syndie/java/src/net/i2p/syndie/Sucker.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
1196,
7621,
3651,
12,
780,
612,
16,
514,
813,
13,
288,
3639,
775,
288,
5411,
514,
7180,
67,
701,
31,
5411,
514,
4942,
273,
1817,
3651,
397,
315,
315,
397,
21412,
397,
315,
315,
397,
612,
397,
315,
315,
397,
813,
31,
5411,
4389,
1817,
3651,
67,
9381,
273,
2509,
18,
588,
5576,
7675,
4177,
12,
4857,
1769,
5411,
368,
336,
2097,
876,
261,
93,
477,
810,
13,
1407,
5411,
29382,
7180,
67,
267,
273,
394,
29382,
12,
6206,
3651,
67,
9381,
18,
588,
4348,
10663,
5411,
775,
288,
7734,
1323,
14015,
3251,
67,
701,
273,
7180,
67,
267,
18,
896,
1670,
10756,
480,
446,
13,
288,
10792,
1123,
1343,
12,
6206,
3651,
397,
6398,
315,
397,
7180,
67,
701,
1769,
7734,
289,
5411,
289,
1044,
261,
14106,
425,
13,
288,
7734,
327,
629,
31,
5411,
289,
5411,
775,
288,
7734,
1817,
3651,
67,
9381,
18,
7048,
1290,
5621,
7734,
309,
12,
6206,
3651,
67,
9381,
18,
8593,
620,
1435,
631,
20,
13,
10792,
327,
638,
31,
5411,
289,
1044,
261,
24485,
503,
425,
13,
288,
7734,
425,
18,
1188,
6332,
5621,
5411,
289,
5411,
327,
629,
31,
3639,
289,
1044,
261,
14106,
425,
21,
13,
288,
5411,
2332,
18,
370,
18,
8222,
12,
73,
21,
1769,
5411,
327,
629,
31,
3639,
289,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
1196,
7621,
3651,
12,
780,
612,
16,
514,
813,
13,
288,
3639,
775,
288,
5411,
514,
7180,
67,
701,
31,
5411,
514,
4942,
273,
1817,
3651,
397,
315,
315,
397,
21412,
397,
315,
315,
397,
612,
397,
315,
315,
397,
813,
31,
5411,
4389,
1817,
3651,
67,
9381,
273,
2509,
18,
588,
5576,
7675,
4177,
12,
4857,
1769,
5411,
368,
336,
2097,
876,
261,
93,
477,
810,
13,
1407,
5411,
29382,
7180,
67,
267,
273,
394,
29382,
12,
6206,
3651,
67,
9381,
18,
588,
4348,
10663,
5411,
775,
288,
7734,
1323,
14015,
3251,
67,
701,
273,
7180,
67,
267,
18,
896,
1670,
10756,
480,
446,
13,
288,
10792,
1123,
1343,
12,
6206,
3651,
397,
6398,
315,
2
] |
} else { selectEntity(e.getId()); } } else { client.setDisplayVisible(true); client.mechD.displayEntity(e); if (e.isDeployed()) { client.bv.centerOnHex(e.getPosition()); }
|
}
|
public void selectUnit(BoardViewEvent b) { Entity e = client.game.getEntity(b.getEntityId()); if (client.isMyTurn()) { if (!e.isSelectableThisTurn(client.game)) { client.setDisplayVisible(true); client.mechD.displayEntity(e); client.bv.centerOnHex(e.getPosition()); } else { selectEntity(e.getId()); } } else { client.setDisplayVisible(true); client.mechD.displayEntity(e); if (e.isDeployed()) { client.bv.centerOnHex(e.getPosition()); } } }
|
3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/6fa7a915a9c48dac94fa163b03ae6a0e99765cad/MovementDisplay.java/clean/megamek/src/megamek/client/ui/AWT/MovementDisplay.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2027,
2802,
12,
22233,
1767,
1133,
324,
13,
288,
377,
202,
1943,
425,
273,
1004,
18,
13957,
18,
588,
1943,
12,
70,
18,
588,
18029,
10663,
377,
202,
430,
261,
2625,
18,
291,
12062,
15858,
10756,
288,
377,
202,
202,
430,
16051,
73,
18,
291,
31544,
2503,
15858,
12,
2625,
18,
13957,
3719,
288,
2398,
202,
2625,
18,
542,
4236,
6207,
12,
3767,
1769,
2398,
202,
2625,
18,
3501,
343,
40,
18,
5417,
1943,
12,
73,
1769,
2398,
202,
2625,
18,
70,
90,
18,
5693,
1398,
7037,
12,
73,
18,
588,
2555,
10663,
5411,
289,
469,
288,
202,
5411,
2027,
1943,
12,
73,
18,
26321,
10663,
377,
202,
202,
97,
377,
202,
97,
469,
288,
540,
202,
2625,
18,
542,
4236,
6207,
12,
3767,
1769,
540,
202,
2625,
18,
3501,
343,
40,
18,
5417,
1943,
12,
73,
1769,
377,
202,
202,
430,
261,
73,
18,
291,
31954,
10756,
288,
2398,
202,
2625,
18,
70,
90,
18,
5693,
1398,
7037,
12,
73,
18,
588,
2555,
10663,
377,
202,
202,
97,
377,
202,
97,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2027,
2802,
12,
22233,
1767,
1133,
324,
13,
288,
377,
202,
1943,
425,
273,
1004,
18,
13957,
18,
588,
1943,
12,
70,
18,
588,
18029,
10663,
377,
202,
430,
261,
2625,
18,
291,
12062,
15858,
10756,
288,
377,
202,
202,
430,
16051,
73,
18,
291,
31544,
2503,
15858,
12,
2625,
18,
13957,
3719,
288,
2398,
202,
2625,
18,
542,
4236,
6207,
12,
3767,
1769,
2398,
202,
2625,
18,
3501,
343,
40,
18,
5417,
1943,
12,
73,
1769,
2398,
202,
2625,
18,
70,
90,
18,
5693,
1398,
7037,
12,
73,
18,
588,
2555,
10663,
5411,
289,
469,
288,
202,
5411,
2027,
1943,
12,
73,
18,
26321,
10663,
377,
202,
202,
97,
377,
202,
97,
469,
288,
540,
2
] |
else {
|
else {
|
public void doTag(final XMLOutput output) throws Exception { AttainTag attainTag = (AttainTag) findAncestorWithClass( AttainTag.class ); Session session = null; if ( attainTag == null ) { session = new JellySession( output ); } else { session = attainTag.getSession(); } ProjectTag projectTag = (ProjectTag) findAncestorWithClass( ProjectTag.class ); Project project = projectTag.getProject(); invokeBody(output); try { project.attainGoal( getName(), session ); } catch (UnattainableGoalException e) { Throwable root = e.getRootCause(); if ( root != null ) { if ( root instanceof JellyException ) { throw (JellyException) root; } if ( root instanceof UnattainableGoalException ) { throw e; } } else { e.fillInStackTrace(); throw e; } } }
|
51800 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51800/c8b44e1979ddfc14f647677de8c6d5285b917a08/AttainGoalTag.java/buggy/src/java/org/apache/commons/jelly/tags/werkz/AttainGoalTag.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
1805,
12,
6385,
3167,
1447,
876,
13,
1216,
1185,
288,
7734,
6020,
530,
1805,
2403,
530,
1805,
273,
261,
3075,
530,
1805,
13,
1104,
15637,
1190,
797,
12,
6020,
530,
1805,
18,
1106,
11272,
3639,
3877,
1339,
273,
446,
31,
3639,
309,
261,
2403,
530,
1805,
422,
446,
262,
288,
5411,
1339,
273,
394,
804,
292,
715,
2157,
12,
876,
11272,
3639,
289,
469,
288,
5411,
1339,
273,
2403,
530,
1805,
18,
588,
2157,
5621,
3639,
289,
3639,
5420,
1805,
1984,
1805,
273,
261,
4109,
1805,
13,
1104,
15637,
1190,
797,
12,
5420,
1805,
18,
1106,
11272,
3639,
5420,
1984,
273,
1984,
1805,
18,
588,
4109,
5621,
3639,
4356,
2250,
12,
2844,
1769,
3639,
775,
3639,
288,
5411,
1984,
18,
4558,
530,
27716,
12,
1723,
9334,
27573,
1339,
11272,
3639,
289,
3639,
1044,
261,
984,
4558,
530,
429,
27716,
503,
425,
13,
3639,
288,
5411,
4206,
1365,
273,
425,
18,
588,
2375,
10683,
5621,
5411,
309,
261,
1365,
480,
446,
262,
5411,
288,
7734,
309,
261,
1365,
1276,
804,
292,
715,
503,
262,
7734,
288,
10792,
604,
261,
46,
292,
715,
503,
13,
1365,
31,
7734,
289,
7734,
309,
261,
1365,
1276,
1351,
4558,
530,
429,
27716,
503,
262,
7734,
288,
10792,
604,
425,
31,
7734,
289,
5411,
289,
5411,
469,
5411,
288,
7734,
425,
18,
5935,
382,
6332,
5621,
7734,
604,
425,
31,
5411,
289,
3639,
289,
565,
289,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
1805,
12,
6385,
3167,
1447,
876,
13,
1216,
1185,
288,
7734,
6020,
530,
1805,
2403,
530,
1805,
273,
261,
3075,
530,
1805,
13,
1104,
15637,
1190,
797,
12,
6020,
530,
1805,
18,
1106,
11272,
3639,
3877,
1339,
273,
446,
31,
3639,
309,
261,
2403,
530,
1805,
422,
446,
262,
288,
5411,
1339,
273,
394,
804,
292,
715,
2157,
12,
876,
11272,
3639,
289,
469,
288,
5411,
1339,
273,
2403,
530,
1805,
18,
588,
2157,
5621,
3639,
289,
3639,
5420,
1805,
1984,
1805,
273,
261,
4109,
1805,
13,
1104,
15637,
1190,
797,
12,
5420,
1805,
18,
1106,
11272,
3639,
5420,
1984,
273,
1984,
1805,
18,
588,
4109,
5621,
3639,
4356,
2250,
12,
2844,
1769,
3639,
775,
2
] |
protected void setContainerContext(Map containers) {
|
protected void setContainerContext(Map containers) throws UMOException {
|
protected void setContainerContext(Map containers) { if(containers.size() == 0) { //Use this as the default container SpringContainerContext container = new SpringContainerContext(); container.setBeanFactory(context); manager.setContainerContext(container); } else if (containers.size() == 1) { manager.setContainerContext((UMOContainerContext)containers.values().iterator().next()); } else { UMOContainerContext ctx = (UMOContainerContext)containers.values().iterator().next(); logger.warn("There are " + containers.size() + " container contexts in the spring context. Using the first one: " + ctx.getClass().getName()); manager.setContainerContext(ctx); } }
|
28323 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28323/67e123292b9b3ff0a0ee9089c3287dbc6a435a1a/AutowireUMOManagerFactoryBean.java/clean/mule-extras/spring/src/java/org/mule/extras/spring/config/AutowireUMOManagerFactoryBean.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
28331,
1042,
12,
863,
8475,
13,
1216,
587,
5980,
503,
288,
3639,
309,
12,
20596,
18,
1467,
1435,
422,
374,
13,
288,
5411,
368,
3727,
333,
487,
326,
805,
1478,
5411,
22751,
2170,
1042,
1478,
273,
394,
22751,
2170,
1042,
5621,
5411,
1478,
18,
542,
3381,
1733,
12,
2472,
1769,
5411,
3301,
18,
542,
2170,
1042,
12,
3782,
1769,
3639,
289,
469,
309,
261,
20596,
18,
1467,
1435,
422,
404,
13,
288,
5411,
3301,
18,
542,
2170,
1042,
12443,
2799,
51,
2170,
1042,
13,
20596,
18,
2372,
7675,
9838,
7675,
4285,
10663,
3639,
289,
469,
288,
5411,
587,
5980,
2170,
1042,
1103,
273,
261,
2799,
51,
2170,
1042,
13,
20596,
18,
2372,
7675,
9838,
7675,
4285,
5621,
5411,
1194,
18,
8935,
2932,
9828,
854,
315,
397,
8475,
18,
1467,
1435,
397,
315,
1478,
5781,
316,
326,
25974,
819,
18,
11637,
326,
1122,
1245,
30,
315,
397,
1103,
18,
588,
797,
7675,
17994,
10663,
5411,
3301,
18,
542,
2170,
1042,
12,
5900,
1769,
3639,
289,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
28331,
1042,
12,
863,
8475,
13,
1216,
587,
5980,
503,
288,
3639,
309,
12,
20596,
18,
1467,
1435,
422,
374,
13,
288,
5411,
368,
3727,
333,
487,
326,
805,
1478,
5411,
22751,
2170,
1042,
1478,
273,
394,
22751,
2170,
1042,
5621,
5411,
1478,
18,
542,
3381,
1733,
12,
2472,
1769,
5411,
3301,
18,
542,
2170,
1042,
12,
3782,
1769,
3639,
289,
469,
309,
261,
20596,
18,
1467,
1435,
422,
404,
13,
288,
5411,
3301,
18,
542,
2170,
1042,
12443,
2799,
51,
2170,
1042,
13,
20596,
18,
2372,
7675,
9838,
7675,
4285,
10663,
3639,
289,
469,
288,
5411,
587,
5980,
2170,
1042,
1103,
273,
261,
2799,
51,
2170,
1042,
13,
20596,
18,
2372,
7675,
9838,
7675,
4285,
2
] |
setAttribute(IExtensionConstants.EDITOR_SHOW_IN_DESIGNER, Boolean.TRUE); setAttribute(IExtensionConstants.EDITOR_SHOW_IN_MASTERPAGE,
|
setAttribute(IExtensionConstants.ATTRIBUTE_EDITOR_SHOW_IN_DESIGNER, Boolean.TRUE); setAttribute(IExtensionConstants.ATTRIBUTE_EDITOR_SHOW_IN_MASTERPAGE,
|
ExtendedElementUIPoint() { //Default value setAttribute(IExtensionConstants.EDITOR_SHOW_IN_DESIGNER, Boolean.TRUE); setAttribute(IExtensionConstants.EDITOR_SHOW_IN_MASTERPAGE, Boolean.TRUE); setAttribute(IExtensionConstants.EDITOR_CAN_RESIZE, Boolean.TRUE); setAttribute(IExtensionConstants.PALETTE_CATEGORY, IPreferenceConstants.PALETTE_CONTENT); }
|
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/17ca72cff29ba2ef01872bf16d726ddb22a3302d/ExtendedElementUIPoint.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/extension/ExtendedElementUIPoint.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
11456,
1046,
5370,
2148,
1435,
288,
202,
202,
759,
1868,
460,
202,
202,
542,
1499,
12,
45,
3625,
2918,
18,
13208,
67,
16677,
67,
706,
67,
1639,
11260,
654,
16,
3411,
18,
18724,
1769,
202,
202,
542,
1499,
12,
45,
3625,
2918,
18,
13208,
67,
16677,
67,
706,
67,
28045,
11219,
16,
9506,
202,
5507,
18,
18724,
1769,
202,
202,
542,
1499,
12,
45,
3625,
2918,
18,
13208,
67,
39,
1258,
67,
862,
4574,
16,
3411,
18,
18724,
1769,
202,
202,
542,
1499,
12,
45,
3625,
2918,
18,
4066,
15146,
1448,
67,
24847,
16,
9506,
202,
45,
9624,
2918,
18,
4066,
15146,
1448,
67,
9689,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
11456,
1046,
5370,
2148,
1435,
288,
202,
202,
759,
1868,
460,
202,
202,
542,
1499,
12,
45,
3625,
2918,
18,
13208,
67,
16677,
67,
706,
67,
1639,
11260,
654,
16,
3411,
18,
18724,
1769,
202,
202,
542,
1499,
12,
45,
3625,
2918,
18,
13208,
67,
16677,
67,
706,
67,
28045,
11219,
16,
9506,
202,
5507,
18,
18724,
1769,
202,
202,
542,
1499,
12,
45,
3625,
2918,
18,
13208,
67,
39,
1258,
67,
862,
4574,
16,
3411,
18,
18724,
1769,
202,
202,
542,
1499,
12,
45,
3625,
2918,
18,
4066,
15146,
1448,
67,
24847,
16,
9506,
202,
45,
9624,
2918,
18,
4066,
15146,
1448,
67,
9689,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
if (text.getSelectionCount() > 0)
|
if (text.getSelectionCount() > 0) {
|
public void performDelete() { if (text.getSelectionCount() > 0) // remove the contents of the current selection text.insert(""); //$NON-NLS-1$ else { // remove the next character int pos = text.getCaretPosition(); if (pos < text.getCharCount()) { text.setSelection(pos, pos + 1); text.insert(""); //$NON-NLS-1$ } } checkSelection(); checkDeleteable(); checkSelectable(); }
|
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/DecoratedFieldCellEditor.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/fieldassist/DecoratedFieldCellEditor.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3073,
2613,
1435,
288,
202,
202,
430,
261,
955,
18,
588,
6233,
1380,
1435,
405,
374,
13,
1082,
202,
759,
1206,
326,
2939,
434,
326,
783,
4421,
1082,
202,
955,
18,
6387,
2932,
8863,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
12107,
288,
1082,
202,
759,
1206,
326,
1024,
3351,
1082,
202,
474,
949,
273,
977,
18,
588,
39,
20731,
2555,
5621,
1082,
202,
430,
261,
917,
411,
977,
18,
588,
2156,
1380,
10756,
288,
9506,
202,
955,
18,
542,
6233,
12,
917,
16,
949,
397,
404,
1769,
9506,
202,
955,
18,
6387,
2932,
8863,
4329,
3993,
17,
5106,
17,
21,
8,
1082,
202,
97,
202,
202,
97,
202,
202,
1893,
6233,
5621,
202,
202,
1893,
2613,
429,
5621,
202,
202,
1893,
31544,
5621,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3073,
2613,
1435,
288,
202,
202,
430,
261,
955,
18,
588,
6233,
1380,
1435,
405,
374,
13,
1082,
202,
759,
1206,
326,
2939,
434,
326,
783,
4421,
1082,
202,
955,
18,
6387,
2932,
8863,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
12107,
288,
1082,
202,
759,
1206,
326,
1024,
3351,
1082,
202,
474,
949,
273,
977,
18,
588,
39,
20731,
2555,
5621,
1082,
202,
430,
261,
917,
411,
977,
18,
588,
2156,
1380,
10756,
288,
9506,
202,
955,
18,
542,
6233,
12,
917,
16,
949,
397,
404,
1769,
9506,
202,
955,
18,
6387,
2932,
8863,
4329,
3993,
17,
5106,
17,
21,
8,
1082,
202,
97,
202,
202,
97,
202,
202,
1893,
6233,
5621,
2
] |
if (name == "eval" && start == getWindow()) {
|
if ("eval".equals(name) && start == getWindow()) {
|
public Object get( final String name, final Scriptable start ) { // Hack to make eval work in other window scope when needed // see unit tests. Todo: find a clean way to handle that if (name == "eval" && start == getWindow()) { return super.get(name, start); // will return native eval function } // Some calls to get will happen during the initialization of the // superclass. At this point, we don't have enough information to // do our own initialization so we have to just pass this call // through to the superclass. if( domNode_ == null && ! isInitialized_) { final Object result = super.get(name, start); // this may help to find which properties htmlunit should impement if (result == NOT_FOUND) { getLog().debug("Property \"" + name + "\" of " + start + " not defined as pure js property"); } return result; } final JavaScriptConfiguration configuration = getJavaScriptConfiguration(); final Class clazz = getClass(); final Object result; final Method propertyMethod = configuration.getPropertyReadMethod(clazz, name); final Method functionMethod = configuration.getFunctionMethod(clazz, name); if (propertyMethod != null && functionMethod != null) { throw new IllegalStateException("Name is both a property and a function: name=[" + name + "] class=[" + clazz.getName() + "]"); } if (propertyMethod == null) { if (functionMethod == null) { result = super.get(name, start); } else { result = new FunctionObject(name, functionMethod, this); } } else { try { result = propertyMethod.invoke(this, new Object[0]); } catch (final Exception e) { throw Context.throwAsScriptRuntimeEx(e); } } // this may help to find which properties htmlunit should impement if (result == NOT_FOUND) { getLog().debug("Property \"" + name + "\" of " + start + " not defined as fixed property"); } return result; }
|
3508 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3508/52fcb223986b0f2533e9f08a34d29d149a7e39a3/SimpleScriptable.java/clean/htmlunit/src/java/com/gargoylesoftware/htmlunit/javascript/SimpleScriptable.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
336,
12,
727,
514,
508,
16,
727,
22780,
787,
262,
288,
3639,
368,
670,
484,
358,
1221,
5302,
1440,
316,
1308,
2742,
2146,
1347,
3577,
3639,
368,
2621,
2836,
7434,
18,
399,
7370,
30,
1104,
279,
2721,
4031,
358,
1640,
716,
3639,
309,
7566,
8622,
9654,
14963,
12,
529,
13,
597,
787,
422,
26156,
10756,
288,
5411,
327,
2240,
18,
588,
12,
529,
16,
787,
1769,
368,
903,
327,
6448,
5302,
445,
3639,
289,
3639,
368,
10548,
4097,
358,
336,
903,
5865,
4982,
326,
10313,
434,
326,
3639,
368,
12098,
18,
225,
2380,
333,
1634,
16,
732,
2727,
1404,
1240,
7304,
1779,
358,
3639,
368,
741,
3134,
4953,
10313,
1427,
732,
1240,
358,
2537,
1342,
333,
745,
3639,
368,
3059,
358,
326,
12098,
18,
3639,
309,
12,
24984,
67,
422,
446,
597,
401,
25359,
67,
13,
288,
5411,
727,
1033,
563,
273,
2240,
18,
588,
12,
529,
16,
787,
1769,
5411,
368,
333,
2026,
2809,
358,
1104,
1492,
1790,
1729,
4873,
1410,
709,
347,
475,
5411,
309,
261,
2088,
422,
4269,
67,
9294,
13,
288,
7734,
9189,
7675,
4148,
2932,
1396,
11843,
397,
508,
397,
7023,
434,
315,
397,
787,
397,
315,
486,
2553,
487,
16618,
3828,
1272,
8863,
5411,
289,
5411,
327,
563,
31,
3639,
289,
3639,
727,
11905,
1750,
1664,
273,
336,
16634,
1750,
5621,
3639,
727,
1659,
4003,
273,
2900,
5621,
3639,
727,
1033,
563,
31,
3639,
727,
2985,
1272,
1305,
273,
1664,
18,
588,
1396,
1994,
1305,
12,
830,
3638,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
336,
12,
727,
514,
508,
16,
727,
22780,
787,
262,
288,
3639,
368,
670,
484,
358,
1221,
5302,
1440,
316,
1308,
2742,
2146,
1347,
3577,
3639,
368,
2621,
2836,
7434,
18,
399,
7370,
30,
1104,
279,
2721,
4031,
358,
1640,
716,
3639,
309,
7566,
8622,
9654,
14963,
12,
529,
13,
597,
787,
422,
26156,
10756,
288,
5411,
327,
2240,
18,
588,
12,
529,
16,
787,
1769,
368,
903,
327,
6448,
5302,
445,
3639,
289,
3639,
368,
10548,
4097,
358,
336,
903,
5865,
4982,
326,
10313,
434,
326,
3639,
368,
12098,
18,
225,
2380,
333,
1634,
16,
732,
2727,
1404,
1240,
7304,
1779,
358,
3639,
368,
741,
3134,
4953,
10313,
1427,
732,
1240,
358,
2537,
1342,
333,
2
] |
Properties properties = System.getProperties();
|
Properties properties = getProps();
|
public void test1() throws Exception { Properties properties = System.getProperties(); properties.setProperty("extex.config", "nextex"); runCode(properties, //--- input code --- "\\catcode`{=1" + "\\catcode`}=2" + "\\escapechar=`\\\\" + "\\namespace{TeX}" + "" + "\\count1=123" + "\\showthe\\count1" + "\\namespace{abc}" + "\\showthe\namespace" + "\\showthe\\count1" + "" + "\\end ", //--- log message --- "", //--- output channel --- "\n"); }
|
9123 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9123/317d6da9eb6782589a2ea8f2b8f9f3ec46b5cdac/NamespaceTest.java/buggy/ExTeX/src/test/de/dante/extex/interpreter/primitives/namespace/NamespaceTest.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
21,
1435,
1216,
1185,
288,
3639,
6183,
1790,
273,
3570,
1121,
5621,
3639,
1790,
18,
542,
1396,
2932,
408,
338,
18,
1425,
3113,
315,
4285,
338,
8863,
3639,
1086,
1085,
12,
4738,
16,
7734,
368,
6062,
810,
981,
9948,
7734,
8422,
2574,
710,
68,
95,
33,
21,
6,
7734,
397,
8422,
2574,
710,
68,
97,
33,
22,
6,
7734,
397,
8422,
6939,
3001,
33,
68,
13011,
6,
7734,
397,
8422,
4937,
95,
21575,
60,
1532,
7734,
397,
1408,
7734,
397,
8422,
1883,
21,
33,
12936,
6,
7734,
397,
8422,
4500,
5787,
1695,
1883,
21,
6,
7734,
397,
8422,
4937,
95,
18947,
1532,
7734,
397,
8422,
4500,
5787,
64,
4937,
6,
7734,
397,
8422,
4500,
5787,
1695,
1883,
21,
6,
7734,
397,
1408,
7734,
397,
8422,
409,
3104,
7734,
368,
6062,
613,
883,
9948,
7734,
23453,
7734,
368,
6062,
876,
1904,
9948,
7734,
1548,
82,
8863,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1842,
21,
1435,
1216,
1185,
288,
3639,
6183,
1790,
273,
3570,
1121,
5621,
3639,
1790,
18,
542,
1396,
2932,
408,
338,
18,
1425,
3113,
315,
4285,
338,
8863,
3639,
1086,
1085,
12,
4738,
16,
7734,
368,
6062,
810,
981,
9948,
7734,
8422,
2574,
710,
68,
95,
33,
21,
6,
7734,
397,
8422,
2574,
710,
68,
97,
33,
22,
6,
7734,
397,
8422,
6939,
3001,
33,
68,
13011,
6,
7734,
397,
8422,
4937,
95,
21575,
60,
1532,
7734,
397,
1408,
7734,
397,
8422,
1883,
21,
33,
12936,
6,
7734,
397,
8422,
4500,
5787,
1695,
1883,
21,
6,
7734,
397,
8422,
4937,
95,
18947,
1532,
7734,
397,
8422,
4500,
5787,
64,
4937,
6,
7734,
397,
8422,
4500,
5787,
2
] |
mAllResultsQuery = false; mLuceneOp = op; }
|
mAllResultsQuery = false; mLuceneOp = op; }
|
void addLuceneOp(LuceneQueryOperation op) { mAllResultsQuery = false; mLuceneOp = op; }
|
6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/0ec2190ab8c436e948da98372bccf88c668ffbd4/DBQueryOperation.java/clean/ZimbraServer/src/java/com/zimbra/cs/index/DBQueryOperation.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
527,
19763,
3817,
12,
19763,
1138,
2988,
1061,
13,
288,
3639,
312,
1595,
3447,
1138,
273,
629,
31,
3639,
312,
19763,
3817,
273,
1061,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
918,
527,
19763,
3817,
12,
19763,
1138,
2988,
1061,
13,
288,
3639,
312,
1595,
3447,
1138,
273,
629,
31,
3639,
312,
19763,
3817,
273,
1061,
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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
stringBuffer.append(TEXT_34);
|
stringBuffer.append(TEXT_56);
|
public String generate(Object argument) { StringBuffer stringBuffer = new StringBuffer(); GenDiagram genDiagram = (GenDiagram) ((Object[]) argument)[0]; stringBuffer.append(TEXT_1); String copyrightText = genDiagram.getEditorGen().getCopyrightText();if (copyrightText != null && copyrightText.trim().length() > 0) { stringBuffer.append(TEXT_2); stringBuffer.append(copyrightText.replaceAll("\n", "\n * ")); stringBuffer.append(TEXT_3); } stringBuffer.append(TEXT_4); stringBuffer.append(genDiagram.getProvidersPackageName()); stringBuffer.append(TEXT_5); ImportUtil importManager = new ImportUtil(genDiagram.getProvidersPackageName()); stringBuffer.append(TEXT_6); importManager.markImportLocation(stringBuffer); stringBuffer.append(TEXT_7); stringBuffer.append(genDiagram.getElementTypesClassName()); stringBuffer.append(TEXT_8); stringBuffer.append(genDiagram.getElementTypesClassName()); stringBuffer.append(TEXT_9); String pluginClassName = importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName()); stringBuffer.append(TEXT_10); stringBuffer.append(pluginClassName); stringBuffer.append(TEXT_11); GenClass diagramElement = genDiagram.getDomainDiagramElement();if (diagramElement != null) { String semanticPackageInterfaceName = importManager.getImportedName(diagramElement.getGenPackage().getQualifiedPackageInterfaceName()); stringBuffer.append(TEXT_12); stringBuffer.append(genDiagram.getUniqueIdentifier()); stringBuffer.append(TEXT_13); stringBuffer.append(semanticPackageInterfaceName); stringBuffer.append(TEXT_14); stringBuffer.append(diagramElement.getClassifierAccessorName()); stringBuffer.append(TEXT_15); }for (Iterator contents = genDiagram.eAllContents(); contents.hasNext(); ) { Object next = contents.next(); String id = null; ModelFacet modelFacet = null; if (next instanceof GenNode) { id = ((GenNode) next).getUniqueIdentifier(); modelFacet = ((GenNode) next).getModelFacet(); } else if (next instanceof GenLink) { id = ((GenLink) next).getUniqueIdentifier(); modelFacet = ((GenLink) next).getModelFacet(); } if (modelFacet instanceof TypeModelFacet) { GenClass metaClass = ((TypeModelFacet) modelFacet).getMetaClass(); String semanticPackageInterfaceName = importManager.getImportedName(metaClass.getGenPackage().getQualifiedPackageInterfaceName()); stringBuffer.append(TEXT_16); stringBuffer.append(id); stringBuffer.append(TEXT_17); stringBuffer.append(semanticPackageInterfaceName); stringBuffer.append(TEXT_18); stringBuffer.append(metaClass.getClassifierAccessorName()); stringBuffer.append(TEXT_19); } else if (modelFacet instanceof FeatureModelFacet) { GenFeature metaFeature = ((FeatureModelFacet) modelFacet).getMetaFeature(); String semanticPackageInterfaceName = importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()); stringBuffer.append(TEXT_20); stringBuffer.append(id); stringBuffer.append(TEXT_21); stringBuffer.append(semanticPackageInterfaceName); stringBuffer.append(TEXT_22); stringBuffer.append(metaFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_23); }} stringBuffer.append(TEXT_24); stringBuffer.append(genDiagram.getUniqueIdentifier()); stringBuffer.append(TEXT_25); stringBuffer.append(genDiagram.getUniqueIdentifier()); stringBuffer.append(TEXT_26); int elementInitializerCount = 0;for (Iterator contents = genDiagram.eAllContents(); contents.hasNext(); ) { Object next = contents.next(); String id; TypeModelFacet typeModelFacet = null; if (next instanceof GenNode) { id = ((GenNode) next).getUniqueIdentifier(); typeModelFacet = ((GenNode) next).getModelFacet(); } else if (next instanceof GenLink) { id = ((GenLink) next).getUniqueIdentifier(); ModelFacet modelFacet = ((GenLink) next).getModelFacet(); if (modelFacet instanceof TypeLinkModelFacet) { typeModelFacet = (TypeLinkModelFacet) ((GenLink) next).getModelFacet(); } } else { continue; } if (typeModelFacet != null && typeModelFacet.getModelElementInitializer() != null) { elementInitializerCount++; } stringBuffer.append(TEXT_27); stringBuffer.append(id); stringBuffer.append(TEXT_28); stringBuffer.append(id); stringBuffer.append(TEXT_29); } stringBuffer.append(TEXT_30); if(elementInitializerCount > 0) { stringBuffer.append(TEXT_31); for (Iterator it = genDiagram.eAllContents(); it.hasNext(); ) { Object next = it.next(); String id = null; TypeModelFacet modelFacet = null; if (next instanceof GenNode) { id = ((GenNode) next).getUniqueIdentifier(); modelFacet = ((GenNode) next).getModelFacet(); } else if (next instanceof GenLink && ((GenLink) next).getModelFacet() instanceof TypeLinkModelFacet) { id = ((GenLink) next).getUniqueIdentifier(); modelFacet = (TypeLinkModelFacet) ((GenLink) next).getModelFacet(); } if (modelFacet != null && modelFacet.getModelElementInitializer() instanceof GenFeatureSeqInitializer) { GenFeatureSeqInitializer ftInitializer = (GenFeatureSeqInitializer)modelFacet.getModelElementInitializer(); stringBuffer.append(TEXT_32); stringBuffer.append(id); stringBuffer.append(TEXT_33); for(Iterator featInitIt = ftInitializer.getInitializers().iterator(); featInitIt.hasNext();) { GenFeatureValueSpec featureValSpec = (GenFeatureValueSpec)featInitIt.next(); stringBuffer.append(TEXT_34); stringBuffer.append(featureValSpec.getBody()); stringBuffer.append(TEXT_35); stringBuffer.append(importManager.getImportedName(ftInitializer.getElementQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_36); stringBuffer.append(ftInitializer.getElementClassAccessorName()); stringBuffer.append(TEXT_37); stringBuffer.append(importManager.getImportedName(featureValSpec.getFeatureQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_38); stringBuffer.append(featureValSpec.getFeature().getFeatureAccessorName() ); stringBuffer.append(TEXT_39); stringBuffer.append(featInitIt.hasNext() ? "," : ""); stringBuffer.append(TEXT_40); } // end of GenFeatureValueSpec iteration stringBuffer.append(TEXT_41); } // end of GenFeatureSeqInitializer } // end of getGenEntities iteration stringBuffer.append(TEXT_42); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_43); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass")); stringBuffer.append(TEXT_44); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); stringBuffer.append(TEXT_45); stringBuffer.append(importManager.getImportedName("java.lang.String")); stringBuffer.append(TEXT_46); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ocl.query.Query")); stringBuffer.append(TEXT_47); stringBuffer.append(importManager.getImportedName("java.lang.String")); stringBuffer.append(TEXT_48); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass")); stringBuffer.append(TEXT_49); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); stringBuffer.append(TEXT_50); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_51); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ocl.query.QueryFactory")); stringBuffer.append(TEXT_52); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EEnum")); stringBuffer.append(TEXT_53); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EEnumLiteral")); stringBuffer.append(TEXT_54); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EEnumLiteral")); stringBuffer.append(TEXT_55); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(TEXT_56); stringBuffer.append(importManager.getImportedName("java.util.Collection")); stringBuffer.append(TEXT_57); } stringBuffer.append(TEXT_58); importManager.emitSortedImports(); stringBuffer.append(TEXT_59); return stringBuffer.toString(); }
|
7409 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7409/c551c44d499e35b033bf7b7276a457d91952c426/ElementTypesGenerator.java/buggy/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ElementTypesGenerator.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
2103,
12,
921,
1237,
13,
225,
288,
565,
6674,
533,
1892,
273,
394,
6674,
5621,
565,
10938,
14058,
1940,
3157,
14058,
1940,
273,
261,
7642,
14058,
1940,
13,
14015,
921,
63,
5717,
1237,
25146,
20,
15533,
565,
533,
1892,
18,
6923,
12,
5151,
67,
21,
1769,
565,
514,
22245,
1528,
273,
3157,
14058,
1940,
18,
588,
6946,
7642,
7675,
588,
2951,
4083,
1528,
5621,
430,
261,
29187,
1528,
480,
446,
597,
22245,
1528,
18,
5290,
7675,
2469,
1435,
405,
374,
13,
288,
565,
533,
1892,
18,
6923,
12,
5151,
67,
22,
1769,
565,
533,
1892,
18,
6923,
12,
29187,
1528,
18,
2079,
1595,
31458,
82,
3113,
1548,
82,
380,
9369,
1769,
565,
533,
1892,
18,
6923,
12,
5151,
67,
23,
1769,
565,
289,
565,
533,
1892,
18,
6923,
12,
5151,
67,
24,
1769,
565,
533,
1892,
18,
6923,
12,
4507,
14058,
1940,
18,
588,
10672,
18308,
10663,
565,
533,
1892,
18,
6923,
12,
5151,
67,
25,
1769,
565,
6164,
1304,
1930,
1318,
273,
394,
6164,
1304,
12,
4507,
14058,
1940,
18,
588,
10672,
18308,
10663,
565,
533,
1892,
18,
6923,
12,
5151,
67,
26,
1769,
565,
1930,
1318,
18,
3355,
5010,
2735,
12,
1080,
1892,
1769,
565,
533,
1892,
18,
6923,
12,
5151,
67,
27,
1769,
565,
533,
1892,
18,
6923,
12,
4507,
14058,
1940,
18,
21336,
2016,
3834,
10663,
565,
533,
1892,
18,
6923,
12,
5151,
67,
28,
1769,
565,
533,
1892,
18,
6923,
12,
4507,
14058,
1940,
18,
21336,
2016,
3834,
10663,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
2103,
12,
921,
1237,
13,
225,
288,
565,
6674,
533,
1892,
273,
394,
6674,
5621,
565,
10938,
14058,
1940,
3157,
14058,
1940,
273,
261,
7642,
14058,
1940,
13,
14015,
921,
63,
5717,
1237,
25146,
20,
15533,
565,
533,
1892,
18,
6923,
12,
5151,
67,
21,
1769,
565,
514,
22245,
1528,
273,
3157,
14058,
1940,
18,
588,
6946,
7642,
7675,
588,
2951,
4083,
1528,
5621,
430,
261,
29187,
1528,
480,
446,
597,
22245,
1528,
18,
5290,
7675,
2469,
1435,
405,
374,
13,
288,
565,
533,
1892,
18,
6923,
12,
5151,
67,
22,
1769,
565,
533,
1892,
18,
6923,
12,
29187,
1528,
18,
2079,
1595,
31458,
82,
3113,
1548,
82,
380,
9369,
1769,
565,
533,
1892,
18,
6923,
2
] |
Level level, Member startMember, Member endMember) { Hierarchy hierarchy = level.getHierarchy();
|
Level level, Member startMember, Member endMember) { Hierarchy hierarchy = level.getHierarchy();
|
public void crop( Level level, Member startMember, Member endMember) { // Form the cropping expression. If we have a range, include all // descendents of the ends of the range, because ':' only includes // members at the same level. Hierarchy hierarchy = level.getHierarchy(); Exp expCrop = startMember.equals(endMember) ? // e.g. {[Beverages]} new FunCall("{}", Syntax.Braces, new Exp[] {startMember}) : // e.g. // Generate([Beverages]:[Breakfast Foods], // Descendants([Products].CurrentMember, // [Products].[(All)], // SELF_BEFORE_AFTER)) new FunCall("Generate", Syntax.Function, new Exp[] { new FunCall(":", Syntax.Infix, new Exp[] { startMember, endMember}), new FunCall("Descendants", Syntax.Function, new Exp[] { new FunCall("CurrentMember", Syntax.Property, new Exp[] { hierarchy}), Util.lookupHierarchyLevel(hierarchy, "(All)"), Literal.createSymbol("SELF_BEFORE_AFTER") }) }); crop(level, expCrop); }
|
4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/b5b5168edc3af09cb74945a80b0c36e6630ed502/Query.java/clean/src/main/mondrian/olap/Query.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
7987,
12,
202,
202,
2355,
1801,
16,
8596,
787,
4419,
16,
8596,
679,
4419,
13,
202,
95,
202,
202,
759,
2748,
326,
7987,
1382,
2652,
18,
225,
971,
732,
1240,
279,
1048,
16,
2341,
777,
202,
202,
759,
10653,
4877,
434,
326,
3930,
434,
326,
1048,
16,
2724,
3921,
1338,
6104,
202,
202,
759,
4833,
622,
326,
1967,
1801,
18,
202,
202,
12074,
9360,
273,
1801,
18,
588,
12074,
5621,
3639,
7784,
1329,
19729,
273,
7734,
787,
4419,
18,
14963,
12,
409,
4419,
13,
7734,
692,
7734,
368,
425,
18,
75,
18,
288,
63,
1919,
502,
1023,
18322,
7734,
394,
478,
318,
1477,
2932,
9338,
16,
11517,
18,
38,
354,
764,
16,
394,
7784,
8526,
288,
1937,
4419,
6792,
7734,
294,
7734,
368,
425,
18,
75,
18,
7734,
368,
6654,
3816,
1919,
502,
1023,
14542,
63,
7634,
8076,
478,
4773,
87,
6487,
7734,
368,
1850,
13913,
409,
4388,
3816,
13344,
8009,
3935,
4419,
16,
7734,
368,
8227,
306,
13344,
8009,
63,
12,
1595,
13,
6487,
7734,
368,
8227,
29918,
67,
19152,
67,
18249,
3719,
7734,
394,
478,
318,
1477,
2932,
4625,
3113,
11517,
18,
2083,
16,
394,
7784,
8526,
288,
10792,
394,
478,
318,
1477,
2932,
2773,
16,
11517,
18,
382,
904,
16,
394,
7784,
8526,
288,
13491,
787,
4419,
16,
679,
4419,
97,
3631,
10792,
394,
478,
318,
1477,
2932,
30385,
3113,
11517,
18,
2083,
16,
394,
7784,
8526,
288,
13491,
394,
478,
318,
1477,
2932,
3935,
4419,
3113,
11517,
18,
1396,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7987,
12,
202,
202,
2355,
1801,
16,
8596,
787,
4419,
16,
8596,
679,
4419,
13,
202,
95,
202,
202,
759,
2748,
326,
7987,
1382,
2652,
18,
225,
971,
732,
1240,
279,
1048,
16,
2341,
777,
202,
202,
759,
10653,
4877,
434,
326,
3930,
434,
326,
1048,
16,
2724,
3921,
1338,
6104,
202,
202,
759,
4833,
622,
326,
1967,
1801,
18,
202,
202,
12074,
9360,
273,
1801,
18,
588,
12074,
5621,
3639,
7784,
1329,
19729,
273,
7734,
787,
4419,
18,
14963,
12,
409,
4419,
13,
7734,
692,
7734,
368,
425,
18,
75,
18,
288,
63,
1919,
502,
1023,
18322,
7734,
394,
478,
318,
1477,
2932,
9338,
16,
11517,
18,
38,
354,
764,
16,
394,
7784,
8526,
2
] |
RubyClass bignumClass = ruby.defineClass("Bignum", ruby.getClasses().getIntegerClass());
|
RubyClass bignumClass = ruby.defineClass("Bignum", ruby.getClasses().getIntegerClass());
|
public static RubyClass createBignumClass(Ruby ruby) { RubyClass bignumClass = ruby.defineClass("Bignum", ruby.getClasses().getIntegerClass()); bignumClass.defineMethod("to_s", CallbackFactory.getMethod(RubyBignum.class, "to_s")); bignumClass.defineMethod("hash", CallbackFactory.getMethod(RubyBignum.class, "hash")); bignumClass.defineMethod("+", CallbackFactory.getMethod(RubyBignum.class, "op_plus", RubyObject.class)); bignumClass.defineMethod("-", CallbackFactory.getMethod(RubyBignum.class, "op_minus", RubyObject.class)); bignumClass.defineMethod("*", CallbackFactory.getMethod(RubyBignum.class, "op_mul", RubyObject.class)); bignumClass.defineMethod("/", CallbackFactory.getMethod(RubyBignum.class, "op_div", RubyObject.class)); bignumClass.defineMethod("%", CallbackFactory.getMethod(RubyBignum.class, "op_mod", RubyObject.class)); bignumClass.defineMethod("**", CallbackFactory.getMethod(RubyBignum.class, "op_pow", RubyObject.class)); bignumClass.defineMethod("==", CallbackFactory.getMethod(RubyBignum.class, "op_equal", RubyObject.class)); bignumClass.defineMethod("<=>", CallbackFactory.getMethod(RubyBignum.class, "op_cmp", RubyObject.class)); bignumClass.defineMethod(">", CallbackFactory.getMethod(RubyBignum.class, "op_gt", RubyObject.class)); bignumClass.defineMethod(">=", CallbackFactory.getMethod(RubyBignum.class, "op_ge", RubyObject.class)); bignumClass.defineMethod("<", CallbackFactory.getMethod(RubyBignum.class, "op_lt", RubyObject.class)); bignumClass.defineMethod("<=", CallbackFactory.getMethod(RubyBignum.class, "op_le", RubyObject.class)); return bignumClass; }
|
49476 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49476/1cc89bd397c0f049e6fa3045916fd6d9a3cdada8/RubyBignum.java/clean/org/jruby/RubyBignum.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
752,
38,
724,
379,
797,
12,
54,
10340,
22155,
13,
288,
3639,
19817,
797,
324,
724,
379,
797,
273,
22155,
18,
11255,
797,
2932,
38,
724,
379,
3113,
22155,
18,
588,
4818,
7675,
588,
4522,
797,
10663,
7682,
324,
724,
379,
797,
18,
11255,
1305,
2932,
869,
67,
87,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
38,
724,
379,
18,
1106,
16,
315,
869,
67,
87,
7923,
1769,
3639,
324,
724,
379,
797,
18,
11255,
1305,
2932,
2816,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
38,
724,
379,
18,
1106,
16,
315,
2816,
7923,
1769,
3639,
324,
724,
379,
797,
18,
11255,
1305,
2932,
15,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
38,
724,
379,
18,
1106,
16,
315,
556,
67,
10103,
3113,
19817,
921,
18,
1106,
10019,
3639,
324,
724,
379,
797,
18,
11255,
1305,
2932,
17,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
38,
724,
379,
18,
1106,
16,
315,
556,
67,
19601,
3113,
19817,
921,
18,
1106,
10019,
3639,
324,
724,
379,
797,
18,
11255,
1305,
2932,
14,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
38,
724,
379,
18,
1106,
16,
315,
556,
67,
16411,
3113,
19817,
921,
18,
1106,
10019,
3639,
324,
724,
379,
797,
18,
11255,
1305,
2932,
19,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
38,
724,
379,
18,
1106,
16,
315,
556,
67,
2892,
3113,
19817,
921,
18,
1106,
10019,
3639,
324,
724,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
752,
38,
724,
379,
797,
12,
54,
10340,
22155,
13,
288,
3639,
19817,
797,
324,
724,
379,
797,
273,
22155,
18,
11255,
797,
2932,
38,
724,
379,
3113,
22155,
18,
588,
4818,
7675,
588,
4522,
797,
10663,
7682,
324,
724,
379,
797,
18,
11255,
1305,
2932,
869,
67,
87,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
38,
724,
379,
18,
1106,
16,
315,
869,
67,
87,
7923,
1769,
3639,
324,
724,
379,
797,
18,
11255,
1305,
2932,
2816,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
38,
724,
379,
18,
1106,
16,
315,
2816,
7923,
1769,
3639,
324,
724,
379,
797,
18,
11255,
1305,
2932,
15,
3113,
8444,
1733,
18,
588,
2
] |
this.traverse(new ResetSateForCodeGenerationVisitor(), classScope);
|
this.traverse(new ResetStateForCodeGenerationVisitor(), classScope);
|
public void generateCode(ClassScope classScope, ClassFile classFile) { int problemResetPC = 0; classFile.codeStream.wideMode = false; // reset wideMode to false if (ignoreFurtherInvestigation) { // method is known to have errors, dump a problem method if (this.binding == null) return; // handle methods with invalid signature or duplicates int problemsLength; IProblem[] problems = scope.referenceCompilationUnit().compilationResult.getProblems(); IProblem[] problemsCopy = new IProblem[problemsLength = problems.length]; System.arraycopy(problems, 0, problemsCopy, 0, problemsLength); classFile.addProblemMethod(this, binding, problemsCopy); return; } // regular code generation try { problemResetPC = classFile.contentsOffset; this.generateCode(classFile); } catch (AbortMethod e) { // a fatal error was detected during code generation, need to restart code gen if possible if (e.compilationResult == CodeStream.RESTART_IN_WIDE_MODE) { // a branch target required a goto_w, restart code gen in wide mode. try { this.traverse(new ResetSateForCodeGenerationVisitor(), classScope); classFile.contentsOffset = problemResetPC; classFile.methodCount--; classFile.codeStream.wideMode = true; // request wide mode this.generateCode(classFile); // restart method generation } catch(AbortMethod e2) { int problemsLength; IProblem[] problems = scope.referenceCompilationUnit().compilationResult.getProblems(); IProblem[] problemsCopy = new IProblem[problemsLength = problems.length]; System.arraycopy(problems, 0, problemsCopy, 0, problemsLength); classFile.addProblemMethod(this, binding, problemsCopy, problemResetPC); } } else { // produce a problem method accounting for this fatal error int problemsLength; IProblem[] problems = scope.referenceCompilationUnit().compilationResult.getProblems(); IProblem[] problemsCopy = new IProblem[problemsLength = problems.length]; System.arraycopy(problems, 0, problemsCopy, 0, problemsLength); classFile.addProblemMethod(this, binding, problemsCopy, problemResetPC); } }}
|
10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/a3efe8911ebefcf4623800a4adbf70bc0cb709d6/AbstractMethodDeclaration.java/clean/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
2103,
1085,
12,
797,
3876,
667,
3876,
16,
30614,
29728,
13,
288,
202,
474,
6199,
7013,
3513,
273,
374,
31,
202,
1106,
812,
18,
710,
1228,
18,
26767,
2309,
273,
629,
31,
368,
2715,
14812,
2309,
358,
629,
202,
430,
261,
6185,
42,
8753,
3605,
25999,
367,
13,
288,
202,
202,
759,
707,
353,
4846,
358,
1240,
1334,
16,
4657,
279,
6199,
707,
202,
202,
430,
261,
2211,
18,
7374,
422,
446,
13,
327,
31,
368,
1640,
2590,
598,
2057,
3372,
578,
11211,
202,
202,
474,
9688,
1782,
31,
202,
202,
45,
13719,
8526,
9688,
273,
2146,
18,
6180,
19184,
2802,
7675,
2919,
6613,
1253,
18,
588,
626,
19122,
5621,
202,
202,
45,
13719,
8526,
9688,
2951,
273,
394,
467,
13719,
63,
29812,
1782,
273,
9688,
18,
2469,
15533,
202,
202,
3163,
18,
1126,
3530,
12,
29812,
16,
374,
16,
9688,
2951,
16,
374,
16,
9688,
1782,
1769,
202,
202,
1106,
812,
18,
1289,
13719,
1305,
12,
2211,
16,
5085,
16,
9688,
2951,
1769,
202,
202,
2463,
31,
202,
97,
202,
759,
6736,
981,
9377,
202,
698,
288,
202,
202,
18968,
7013,
3513,
273,
29728,
18,
3980,
2335,
31,
202,
202,
2211,
18,
7163,
1085,
12,
1106,
812,
1769,
202,
97,
1044,
261,
13572,
1305,
425,
13,
288,
202,
202,
759,
279,
10081,
555,
1703,
8316,
4982,
981,
9377,
16,
1608,
358,
7870,
981,
3157,
309,
3323,
202,
202,
430,
261,
73,
18,
2919,
6613,
1253,
422,
3356,
1228,
18,
862,
7570,
67,
706,
67,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
2103,
1085,
12,
797,
3876,
667,
3876,
16,
30614,
29728,
13,
288,
202,
474,
6199,
7013,
3513,
273,
374,
31,
202,
1106,
812,
18,
710,
1228,
18,
26767,
2309,
273,
629,
31,
368,
2715,
14812,
2309,
358,
629,
202,
430,
261,
6185,
42,
8753,
3605,
25999,
367,
13,
288,
202,
202,
759,
707,
353,
4846,
358,
1240,
1334,
16,
4657,
279,
6199,
707,
202,
202,
430,
261,
2211,
18,
7374,
422,
446,
13,
327,
31,
368,
1640,
2590,
598,
2057,
3372,
578,
11211,
202,
202,
474,
9688,
1782,
31,
202,
202,
45,
13719,
8526,
9688,
273,
2146,
18,
6180,
19184,
2802,
7675,
2919,
6613,
1253,
18,
588,
626,
19122,
5621,
202,
202,
45,
13719,
8526,
9688,
2951,
2
] |
_loop2434:
|
_loop2435:
|
public final void sql_col_def(AST _t) throws RecognitionException { AST sql_col_def_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t2424 = _t; AST tmp2390_AST_in = (AST)_t; match(_t,ID); _t = _t.getFirstChild(); AST tmp2391_AST_in = (AST)_t; if ( _t==null ) throw new MismatchedTokenException(); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case PRECISION: { AST tmp2392_AST_in = (AST)_t; match(_t,PRECISION); _t = _t.getNextSibling(); break; } case 3: case CASESENSITIVE: case COLUMNLABEL: case DEFAULT: case FORMAT: case LABEL: case LEFTPAREN: case Not_casesens: case Not_null: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LEFTPAREN: { AST tmp2393_AST_in = (AST)_t; match(_t,LEFTPAREN); _t = _t.getNextSibling(); AST tmp2394_AST_in = (AST)_t; match(_t,NUMBER); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case COMMA: { AST tmp2395_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); AST tmp2396_AST_in = (AST)_t; match(_t,NUMBER); _t = _t.getNextSibling(); break; } case RIGHTPAREN: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp2397_AST_in = (AST)_t; match(_t,RIGHTPAREN); _t = _t.getNextSibling(); break; } case 3: case CASESENSITIVE: case COLUMNLABEL: case DEFAULT: case FORMAT: case LABEL: case Not_casesens: case Not_null: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case Not_null: { AST __t2429 = _t; AST tmp2398_AST_in = (AST)_t; match(_t,Not_null); _t = _t.getFirstChild(); AST tmp2399_AST_in = (AST)_t; match(_t,NOT); _t = _t.getNextSibling(); AST tmp2400_AST_in = (AST)_t; match(_t,NULL_KW); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case UNIQUE: { AST tmp2401_AST_in = (AST)_t; match(_t,UNIQUE); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t2429; _t = _t.getNextSibling(); break; } case 3: case CASESENSITIVE: case COLUMNLABEL: case DEFAULT: case FORMAT: case LABEL: case Not_casesens: { break; } default: { throw new NoViableAltException(_t); } } } { _loop2434: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case COLUMNLABEL: case LABEL: { label_constant(_t); _t = _retTree; break; } case DEFAULT: { AST __t2432 = _t; AST tmp2402_AST_in = (AST)_t; match(_t,DEFAULT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2432; _t = _t.getNextSibling(); break; } case FORMAT: { AST __t2433 = _t; AST tmp2403_AST_in = (AST)_t; match(_t,FORMAT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2433; _t = _t.getNextSibling(); break; } case CASESENSITIVE: case Not_casesens: { casesens_or_not(_t); _t = _retTree; break; } default: { break _loop2434; } } } while (true); } _t = __t2424; _t = _t.getNextSibling(); _retTree = _t; }
|
13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/865876f0e6319c071fef156818ff116c276cfdff/JPTreeParser.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparserbase/JPTreeParser.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1847,
67,
1293,
67,
536,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
1847,
67,
1293,
67,
536,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
13,
67,
88,
31,
9506,
202,
9053,
1001,
88,
3247,
3247,
273,
389,
88,
31,
202,
202,
9053,
1853,
4366,
9349,
67,
9053,
67,
267,
273,
261,
9053,
13,
67,
88,
31,
202,
202,
1916,
24899,
88,
16,
734,
1769,
202,
202,
67,
88,
273,
389,
88,
18,
588,
3759,
1763,
5621,
202,
202,
9053,
1853,
4366,
12416,
67,
9053,
67,
267,
273,
261,
9053,
13,
67,
88,
31,
202,
202,
430,
261,
389,
88,
631,
2011,
262,
604,
394,
26454,
1345,
503,
5621,
202,
202,
67,
88,
273,
389,
88,
18,
588,
2134,
10291,
5621,
202,
202,
95,
202,
202,
430,
261,
67,
88,
631,
2011,
13,
389,
88,
33,
9053,
8560,
31,
202,
202,
9610,
261,
389,
88,
18,
588,
559,
10756,
288,
202,
202,
3593,
7071,
26913,
30,
202,
202,
95,
1082,
202,
9053,
1853,
4366,
9975,
67,
9053,
67,
267,
273,
261,
9053,
13,
67,
88,
31,
1082,
202,
1916,
24899,
88,
16,
3670,
26913,
1769,
1082,
202,
67,
88,
273,
389,
88,
18,
588,
2134,
10291,
5621,
1082,
202,
8820,
31,
202,
202,
97,
202,
202,
3593,
890,
30,
202,
202,
3593,
18403,
26753,
16325,
30,
202,
202,
3593,
13473,
13545,
30,
202,
202,
3593,
3331,
30,
202,
202,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1847,
67,
1293,
67,
536,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
1847,
67,
1293,
67,
536,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
13,
67,
88,
31,
9506,
202,
9053,
1001,
88,
3247,
3247,
273,
389,
88,
31,
202,
202,
9053,
1853,
4366,
9349,
67,
9053,
67,
267,
273,
261,
9053,
13,
67,
88,
31,
202,
202,
1916,
24899,
88,
16,
734,
1769,
202,
202,
67,
88,
273,
389,
88,
18,
588,
3759,
1763,
5621,
202,
202,
9053,
1853,
4366,
12416,
67,
9053,
67,
267,
273,
261,
9053,
13,
67,
88,
31,
202,
202,
430,
261,
389,
88,
631,
2
] |
if (markerDeltas == null) return;
|
if (markerDeltas == null) { return; }
|
public void resourceChanged(final IResourceChangeEvent event) { /* * gather all marker changes from the delta. be sure to do this in the * calling thread, as the delta is destroyed when this method returns */ IMarkerDelta[] markerDeltas = event.findMarkerDeltas(null, true); if (markerDeltas == null) return; int oldTotal = totalMarkerCount; final List additions = new ArrayList(); final List removals = new ArrayList(); final List changes = new ArrayList(); for (int i = 0; i < markerDeltas.length; i++) { IMarkerDelta markerDelta = markerDeltas[i]; if (markerDelta == null) continue; int iKind = markerDelta.getKind(); for (int j = 0; j < TasksFilter.ROOT_TYPES.length; j++) { if (markerDelta.isSubtypeOf(TasksFilter.ROOT_TYPES[j])) { /* * Updates the total count of markers given the applicable * marker deltas. */ if (totalMarkerCount != -1) { switch (iKind) { case IResourceDelta.ADDED: totalMarkerCount++; break; case IResourceDelta.REMOVED: totalMarkerCount--; break; } } /* * Partition the marker deltas into one of the three given * lists depending on * the type of delta (add, remove, or change). * The resulting lists contain the corresponding markers, * not the deltas. * Deltas which are not under the current focus resource are * discarded. * This also updates the marker counts. */ IResource resource = markerDelta.getResource(); if (resource == null) continue; boolean affectedBy = taskList.checkResource(resource) && taskList.getFilter().select(markerDelta); if (affectedBy) { IMarker marker = markerDelta.getMarker(); switch (iKind) { case IResourceDelta.ADDED: additions.add(marker); updateMarkerCounts(markerDelta, +1); break; case IResourceDelta.REMOVED: removals.add(marker); updateMarkerCounts(markerDelta, -1); break; case IResourceDelta.CHANGED: changes.add(marker); /* * Assume attribute changes don't affect marker * counts. This is only true if problem severities * can't change. */ break; } } break; } } } if (oldTotal == totalMarkerCount && additions.size() + removals.size() + changes.size() == 0) { // no changes to markers that we care about return; } /* * do the required viewer updates in the UI thread need to use syncExec; * see 1G95PU8: ITPUI:WIN2000 - Changing task description flashes old * description */ viewer.getControl().getDisplay().syncExec(new Runnable() { public void run() { if (getFilterOnMarkerLimit() && sum(visibleMarkerCounts) > getMarkerLimit()) { if (!isMarkerLimitExceeded()) { setMarkerLimitExceeded(true); viewer.refresh(); } } else if (taskList.isMarkerLimitExceeded()) { setMarkerLimitExceeded(false); viewer.refresh(); } else { updateViewer(additions, removals, changes); } /* Update the task list's status message. * XXX: Quick and dirty solution here. * Would be better to have a separate model for the tasks and * have both the content provider and the task list register for * updates. XXX: Do this inside the syncExec, since we're * talking to status line widget. */ taskList.markersChanged(); } }); }
|
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/TaskListContentProvider.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/TaskListContentProvider.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1058,
5033,
12,
6385,
467,
1420,
20930,
871,
13,
288,
3639,
1748,
540,
380,
11090,
777,
5373,
3478,
628,
326,
3622,
18,
506,
3071,
358,
741,
333,
316,
326,
1850,
380,
4440,
2650,
16,
487,
326,
3622,
353,
17689,
1347,
333,
707,
1135,
540,
1195,
3639,
467,
7078,
9242,
8526,
5373,
2837,
9158,
273,
871,
18,
4720,
7078,
2837,
9158,
12,
2011,
16,
638,
1769,
3639,
309,
261,
11145,
2837,
9158,
422,
446,
13,
5411,
327,
31,
3639,
509,
1592,
5269,
273,
2078,
7078,
1380,
31,
3639,
727,
987,
26260,
273,
394,
2407,
5621,
3639,
727,
987,
2797,
1031,
273,
394,
2407,
5621,
3639,
727,
987,
3478,
273,
394,
2407,
5621,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
5373,
2837,
9158,
18,
2469,
31,
277,
27245,
288,
5411,
467,
7078,
9242,
5373,
9242,
273,
5373,
2837,
9158,
63,
77,
15533,
5411,
309,
261,
11145,
9242,
422,
446,
13,
7734,
1324,
31,
5411,
509,
277,
5677,
273,
5373,
9242,
18,
588,
5677,
5621,
5411,
364,
261,
474,
525,
273,
374,
31,
525,
411,
20350,
1586,
18,
9185,
67,
10564,
18,
2469,
31,
525,
27245,
288,
7734,
309,
261,
11145,
9242,
18,
291,
1676,
723,
951,
12,
6685,
1586,
18,
9185,
67,
10564,
63,
78,
22643,
288,
10792,
1748,
8227,
380,
15419,
326,
2078,
1056,
434,
11754,
864,
326,
12008,
8227,
380,
5373,
20113,
18,
8227,
1195,
10792,
309,
261,
4963,
7078,
1380,
480,
300,
21,
13,
288,
13491,
1620,
261,
77,
5677,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1058,
5033,
12,
6385,
467,
1420,
20930,
871,
13,
288,
3639,
1748,
540,
380,
11090,
777,
5373,
3478,
628,
326,
3622,
18,
506,
3071,
358,
741,
333,
316,
326,
1850,
380,
4440,
2650,
16,
487,
326,
3622,
353,
17689,
1347,
333,
707,
1135,
540,
1195,
3639,
467,
7078,
9242,
8526,
5373,
2837,
9158,
273,
871,
18,
4720,
7078,
2837,
9158,
12,
2011,
16,
638,
1769,
3639,
309,
261,
11145,
2837,
9158,
422,
446,
13,
5411,
327,
31,
3639,
509,
1592,
5269,
273,
2078,
7078,
1380,
31,
3639,
727,
987,
26260,
273,
394,
2407,
5621,
3639,
727,
987,
2797,
1031,
273,
394,
2407,
5621,
3639,
727,
987,
3478,
273,
394,
2407,
5621,
3639,
364,
261,
474,
277,
2
] |
public org.quickfix.field.SettlLocation getSettlLocation() throws FieldNotFound { org.quickfix.field.SettlLocation value = new org.quickfix.field.SettlLocation();
|
public quickfix.field.SettlLocation getSettlLocation() throws FieldNotFound { quickfix.field.SettlLocation value = new quickfix.field.SettlLocation();
|
public org.quickfix.field.SettlLocation getSettlLocation() throws FieldNotFound { org.quickfix.field.SettlLocation value = new org.quickfix.field.SettlLocation(); getField(value); return value; }
|
5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/SettlementInstructions.java/clean/src/java/src/quickfix/fix42/SettlementInstructions.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
694,
6172,
2735,
336,
694,
6172,
2735,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
694,
6172,
2735,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
18,
694,
6172,
2735,
5621,
565,
5031,
12,
1132,
1769,
327,
460,
31,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2358,
18,
19525,
904,
18,
1518,
18,
694,
6172,
2735,
336,
694,
6172,
2735,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
694,
6172,
2735,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
18,
694,
6172,
2735,
5621,
565,
5031,
12,
1132,
1769,
327,
460,
31,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
assertEquals("Received: " + message, result.getPayload());
|
assertEquals("Received: " + message, ((ActiveMQTextMessage)result.getPayload()).getText());
|
public void testReplyToChain() throws UMOException { String message = "test"; MuleClient client = new MuleClient(); Map props = new HashMap(); props.put(MuleProperties.MULE_REMOTE_SYNC_PROPERTY, "false"); UMOMessage result = client.send("vm://pojo1", message, null); assertNotNull(result); // Te assertEquals("Received: " + message, result.getPayload()); }
|
28323 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28323/b656e0806058d87c5db05880209b51a8d57416d0/ReplytoChainIntegrationTestCase.java/buggy/tests/integration/src/test/java/org/mule/test/integration/routing/replyto/ReplytoChainIntegrationTestCase.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
7817,
774,
3893,
1435,
1216,
587,
5980,
503,
565,
288,
3639,
514,
883,
273,
315,
3813,
14432,
3639,
490,
725,
1227,
1004,
273,
394,
490,
725,
1227,
5621,
3639,
1635,
3458,
273,
394,
4317,
5621,
3639,
3458,
18,
458,
12,
49,
725,
2297,
18,
49,
5595,
67,
15790,
67,
25142,
67,
9900,
16,
315,
5743,
8863,
3639,
587,
5980,
1079,
563,
273,
1004,
18,
4661,
2932,
3489,
2207,
1631,
30952,
21,
3113,
883,
16,
446,
1769,
3639,
25395,
12,
2088,
1769,
3639,
368,
28602,
3639,
1815,
8867,
2932,
8872,
30,
315,
397,
883,
16,
14015,
3896,
9682,
1528,
1079,
13,
2088,
18,
588,
6110,
1435,
2934,
588,
1528,
10663,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1842,
7817,
774,
3893,
1435,
1216,
587,
5980,
503,
565,
288,
3639,
514,
883,
273,
315,
3813,
14432,
3639,
490,
725,
1227,
1004,
273,
394,
490,
725,
1227,
5621,
3639,
1635,
3458,
273,
394,
4317,
5621,
3639,
3458,
18,
458,
12,
49,
725,
2297,
18,
49,
5595,
67,
15790,
67,
25142,
67,
9900,
16,
315,
5743,
8863,
3639,
587,
5980,
1079,
563,
273,
1004,
18,
4661,
2932,
3489,
2207,
1631,
30952,
21,
3113,
883,
16,
446,
1769,
3639,
25395,
12,
2088,
1769,
3639,
368,
28602,
3639,
1815,
8867,
2932,
8872,
30,
315,
397,
883,
16,
14015,
3896,
9682,
1528,
1079,
13,
2088,
18,
588,
6110,
1435,
2934,
588,
1528,
10663,
565,
289,
2,
-100,
-100,
-100,
-100
] |
return engine.isPropertySetted(Properties.EXPANSION_USE_VALUE); }
|
return engine.isPropertySetted(Properties.EXPANSION_USE_VALUE); }
|
public final boolean isExpansionUseValueSetted() { return engine.isPropertySetted(Properties.EXPANSION_USE_VALUE); }
|
6232 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6232/1f1850be471d4b8bfd2f3c50aa61bc39bf91259a/TreeComponent.java/clean/org.rcfaces.core/src/org/rcfaces/core/component/TreeComponent.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
1250,
353,
2966,
12162,
3727,
620,
694,
2344,
1435,
288,
3639,
327,
4073,
18,
291,
1396,
694,
2344,
12,
2297,
18,
16109,
1258,
3686,
67,
8001,
67,
4051,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
1250,
353,
2966,
12162,
3727,
620,
694,
2344,
1435,
288,
3639,
327,
4073,
18,
291,
1396,
694,
2344,
12,
2297,
18,
16109,
1258,
3686,
67,
8001,
67,
4051,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
public boolean isSet(org.quickfix.field.AllocID field)
|
public boolean isSet(quickfix.field.AllocID field)
|
public boolean isSet(org.quickfix.field.AllocID field) { return isSetField(field); }
|
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/Allocation.java/clean/src/java/src/quickfix/fix41/Allocation.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
13532,
12,
19525,
904,
18,
1518,
18,
8763,
734,
652,
13,
225,
288,
327,
13532,
974,
12,
1518,
1769,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
13532,
12,
19525,
904,
18,
1518,
18,
8763,
734,
652,
13,
225,
288,
327,
13532,
974,
12,
1518,
1769,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
} else if (cand.inWeight < nextChoice.inWeight ||
|
} else if (cand.inWeight > nextChoice.inWeight ||
|
private void doPettisHansenAlgo2(OPT_IR ir) { // (1) Setup: // (a) Count the blocks // (b) Create a sorted set of CFG edges // (c) Create a set of blocks // (d) Make fallthroughs explict by adding GOTOs int numBlocks = 0; SortedSet edges = new TreeSet(); Set chainHeads = new HashSet(); OPT_BasicBlock entry = ir.cfg.entry(); if (VM.VerifyAssertions) VM._assert(ir.cfg.entry() == ir.cfg.firstInCodeOrder()); for (OPT_BasicBlock bb = entry; bb != null; bb = bb.nextBasicBlockInCodeOrder()) { numBlocks++; chainHeads.add(bb); bb.scratchObject = bb; OPT_BasicBlock ft = bb.getFallThroughBlock(); if (ft != null) { bb.appendInstruction(Goto.create(GOTO, ft.makeJumpTarget())); } float bw = bb.getExecutionFrequency(); for (OPT_WeightedBranchTargets wbt = new OPT_WeightedBranchTargets(bb); wbt.hasMoreElements(); wbt.advance()) { edges.add(new Edge(bb, wbt.curBlock(), wbt.curWeight() * bw)); } } if (DEBUG) VM.sysWriteln("Edges = "+edges); // (2) Build chains ir.cfg.clearCodeOrder(); for (Iterator edgesI = edges.iterator(); edgesI.hasNext();) { Edge e = (Edge)edgesI.next(); // If the source of the edge is the last block in its chain // and the target of the edge is the first block in its chain // then merge the chains. if (DEBUG) VM.sysWriteln("Processing edge "+e); if (e.target == entry) { if (DEBUG) VM.sysWriteln("\tCan't put entry block in interior of chain"); continue; } if (e.source.nextBasicBlockInCodeOrder() != null) { if (DEBUG) VM.sysWriteln("\tSource is not at end of a chain"); continue; } if (e.target.prevBasicBlockInCodeOrder() != null) { if (DEBUG) VM.sysWriteln("\tTarget is not at start of a chain"); continue; } if (e.source.scratchObject == e.target.scratchObject) { if (DEBUG) VM.sysWriteln("\tSource and target are in same chain"); continue; } if (DEBUG) VM.sysWriteln("\tMerging chains"); chainHeads.remove(e.target); ir.cfg.linkInCodeOrder(e.source, e.target); // Yuck....we should really use near-linear time union find here // Doing this crappy thing makes us O(N^2) in the worst case. OPT_BasicBlock newChain = (OPT_BasicBlock)e.source.scratchObject; for (OPT_BasicBlock ptr = e.target; ptr != null; ptr = ptr.nextBasicBlockInCodeOrder()) { ptr.scratchObject = newChain; } } if (DEBUG) VM.sysWriteln("Chains constructed "); Map chainInfo = new HashMap(); for (Iterator chainI = chainHeads.iterator(); chainI.hasNext();) { OPT_BasicBlock head = (OPT_BasicBlock)chainI.next(); if (DEBUG) dumpChain(head); chainInfo.put(head, new ChainInfo(head)); } // (3) Summarize inter-chain edges. for (Iterator edgesI = edges.iterator(); edgesI.hasNext();) { Edge e = (Edge)edgesI.next(); if (e.source.scratchObject != e.target.scratchObject) { Object sourceChain = e.source.scratchObject; Object targetChain = e.target.scratchObject; ChainInfo sourceInfo = (ChainInfo)chainInfo.get(sourceChain); ChainInfo targetInfo = (ChainInfo)chainInfo.get(targetChain); if (DEBUG) VM.sysWriteln("Inter-chain edge "+sourceChain+"->"+targetChain+" ("+e.weight+")"); Object value = sourceInfo.outWeights.get(targetInfo); float weight = e.weight; if (value != null) { weight += ((Float)value).floatValue(); } sourceInfo.outWeights.put(targetInfo, new Float(weight)); targetInfo.inWeight += e.weight; if (DEBUG) VM.sysWriteln("\t"+targetInfo + ","+sourceInfo.outWeights.get(targetInfo)); } } if (DEBUG) VM.sysWriteln("Chain Info "+chainInfo); // (4) Construct a total order of the chains, guided by the interchain edge weights. // Constructing an optimal order is NP-Hard, so we apply the following heuristic. // The chain that starts with the entry node is placed first. // At each step, pick the chain with the maximal placedWeight (incoming edges from chains // that are already placed) and minimal inWeight (incoming edges from chains that are not // already placed). Prefer a node with non-zero placedWeight and inWeight to one that has // zeros for both. (A node with both zero placedWeight and zero inWeight is something that // the profile data predicts is not reachable via normal control flow from the entry node). OPT_BasicBlock lastNode = null; ChainInfo nextChoice = (ChainInfo)chainInfo.get(entry); int numPlaced = 0; ir.cfg._firstNode = entry; while (true) { if (DEBUG) VM.sysWriteln("Placing chain "+nextChoice); // Append nextChoice to the previous chain if (lastNode != null) ir.cfg.linkInCodeOrder(lastNode, nextChoice.head); for (OPT_BasicBlock ptr = nextChoice.head; ptr != null; ptr = ptr.nextBasicBlockInCodeOrder()) { numPlaced++; lastNode = ptr; } // update ChainInfo chainInfo.remove(nextChoice.head); if (chainInfo.isEmpty()) break; // no chains left to place. for (Iterator i = nextChoice.outWeights.keySet().iterator(); i.hasNext();) { ChainInfo target = (ChainInfo)i.next(); if (DEBUG) VM.sysWrite("\toutedge "+target); float weight = ((Float)nextChoice.outWeights.get(target)).floatValue(); if (DEBUG) VM.sysWriteln(" = "+weight); target.placedWeight += weight; target.inWeight -= weight; } if (DEBUG) VM.sysWriteln("Chain Info "+chainInfo); // Find the next chain to append. nextChoice = null; float placedWeight = 0f; for (Iterator i = chainInfo.values().iterator(); i.hasNext();) { ChainInfo cand = (ChainInfo)i.next(); if (cand.placedWeight > 0f) { if (nextChoice == null) { if (DEBUG) VM.sysWriteln("First reachable candidate "+cand); nextChoice = cand; } else if (cand.inWeight < nextChoice.inWeight || (cand.inWeight == nextChoice.inWeight && cand.placedWeight > nextChoice.placedWeight)) { if (DEBUG) VM.sysWriteln(cand + " is a better choice than "+nextChoice); nextChoice = cand; } } } if (nextChoice != null) continue; // All remaining chains are fluff (not reachable from entry). // Pick one with minimal inWeight and continue. for (Iterator i = chainInfo.values().iterator(); i.hasNext();) { ChainInfo cand = (ChainInfo)i.next(); if (nextChoice == null) { if (DEBUG) VM.sysWriteln("First candidate "+cand); nextChoice = cand; } else if (cand.inWeight < nextChoice.inWeight) { if (DEBUG) VM.sysWriteln(cand + " is a better choice than "+nextChoice); nextChoice = cand; } } } if (VM.VerifyAssertions) VM._assert(numPlaced == numBlocks); // Don't lose blocks!! ir.cfg._lastNode = lastNode; }
|
5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/a2e7a58c619e28657a0b4e690c744aece7b01bc2/OPT_ReorderingPhase.java/clean/rvm/src/vm/compilers/optimizing/optimizations/control/OPT_ReorderingPhase.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
741,
52,
278,
88,
291,
44,
634,
275,
22430,
22,
12,
15620,
67,
7937,
9482,
13,
288,
565,
368,
261,
21,
13,
10939,
30,
565,
368,
377,
261,
69,
13,
6974,
326,
4398,
565,
368,
377,
261,
70,
13,
1788,
279,
3115,
444,
434,
7577,
5231,
565,
368,
377,
261,
71,
13,
1788,
279,
444,
434,
4398,
565,
368,
377,
261,
72,
13,
4344,
13103,
87,
22991,
933,
635,
6534,
611,
1974,
15112,
565,
509,
818,
6450,
273,
374,
31,
565,
22123,
5231,
273,
394,
19461,
5621,
565,
1000,
2687,
1414,
87,
273,
394,
6847,
5621,
565,
16456,
67,
8252,
1768,
1241,
273,
9482,
18,
7066,
18,
4099,
5621,
565,
309,
261,
7397,
18,
8097,
8213,
1115,
13,
8251,
6315,
11231,
12,
481,
18,
7066,
18,
4099,
1435,
422,
9482,
18,
7066,
18,
3645,
382,
1085,
2448,
10663,
565,
364,
261,
15620,
67,
8252,
1768,
7129,
273,
1241,
31,
540,
7129,
480,
446,
31,
1850,
7129,
273,
7129,
18,
4285,
8252,
1768,
382,
1085,
2448,
10756,
288,
1377,
818,
6450,
9904,
31,
1377,
2687,
1414,
87,
18,
1289,
12,
9897,
1769,
1377,
7129,
18,
24638,
505,
921,
273,
7129,
31,
1377,
16456,
67,
8252,
1768,
11038,
273,
7129,
18,
588,
42,
454,
14287,
1768,
5621,
1377,
309,
261,
1222,
480,
446,
13,
288,
540,
7129,
18,
6923,
11983,
12,
43,
6302,
18,
2640,
12,
43,
27019,
16,
11038,
18,
6540,
26743,
2326,
1435,
10019,
1377,
289,
1377,
1431,
12986,
273,
7129,
18,
588,
3210,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
741,
52,
278,
88,
291,
44,
634,
275,
22430,
22,
12,
15620,
67,
7937,
9482,
13,
288,
565,
368,
261,
21,
13,
10939,
30,
565,
368,
377,
261,
69,
13,
6974,
326,
4398,
565,
368,
377,
261,
70,
13,
1788,
279,
3115,
444,
434,
7577,
5231,
565,
368,
377,
261,
71,
13,
1788,
279,
444,
434,
4398,
565,
368,
377,
261,
72,
13,
4344,
13103,
87,
22991,
933,
635,
6534,
611,
1974,
15112,
565,
509,
818,
6450,
273,
374,
31,
565,
22123,
5231,
273,
394,
19461,
5621,
565,
1000,
2687,
1414,
87,
273,
394,
6847,
5621,
565,
16456,
67,
8252,
1768,
1241,
273,
9482,
18,
7066,
18,
4099,
5621,
565,
309,
261,
7397,
18,
8097,
8213,
2
] |
default:
|
default :
|
protected void startPortElement(Attributes attributes) { switch (current_state) { case STATE_INSIDE_EXECUTE_QUERY: current_value.setLength(0); current_state = LDAPTransformer.STATE_INSIDE_PORT_ELEMENT; break; case STATE_INSIDE_EXECUTE_INCREMENT: current_value.setLength(0); current_state = LDAPTransformer.STATE_INSIDE_PORT_ELEMENT; break; default: throwIllegalStateException("Not expecting a start port element"); } }
|
46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/52ffdd8b732294554bcca0d4e0574ce6a20c35bc/LDAPTransformer.java/buggy/src/blocks/naming/java/org/apache/cocoon/transformation/LDAPTransformer.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
787,
2617,
1046,
12,
2498,
1677,
13,
288,
3639,
1620,
261,
2972,
67,
2019,
13,
288,
5411,
648,
7442,
67,
706,
26498,
67,
15271,
9099,
67,
10753,
30,
7734,
783,
67,
1132,
18,
542,
1782,
12,
20,
1769,
7734,
783,
67,
2019,
273,
11916,
8319,
18,
7998,
67,
706,
26498,
67,
6354,
67,
10976,
31,
7734,
898,
31,
5411,
648,
7442,
67,
706,
26498,
67,
15271,
9099,
67,
29836,
30,
7734,
783,
67,
1132,
18,
542,
1782,
12,
20,
1769,
7734,
783,
67,
2019,
273,
11916,
8319,
18,
7998,
67,
706,
26498,
67,
6354,
67,
10976,
31,
7734,
898,
31,
2398,
805,
294,
7734,
604,
12195,
5060,
2932,
1248,
17012,
279,
787,
1756,
930,
8863,
3639,
289,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
787,
2617,
1046,
12,
2498,
1677,
13,
288,
3639,
1620,
261,
2972,
67,
2019,
13,
288,
5411,
648,
7442,
67,
706,
26498,
67,
15271,
9099,
67,
10753,
30,
7734,
783,
67,
1132,
18,
542,
1782,
12,
20,
1769,
7734,
783,
67,
2019,
273,
11916,
8319,
18,
7998,
67,
706,
26498,
67,
6354,
67,
10976,
31,
7734,
898,
31,
5411,
648,
7442,
67,
706,
26498,
67,
15271,
9099,
67,
29836,
30,
7734,
783,
67,
1132,
18,
542,
1782,
12,
20,
1769,
7734,
783,
67,
2019,
273,
11916,
8319,
18,
7998,
67,
706,
26498,
67,
6354,
67,
10976,
31,
7734,
898,
31,
2398,
805,
294,
7734,
604,
12195,
5060,
2932,
1248,
17012,
279,
787,
1756,
930,
8863,
3639,
2
] |
private static void MIROptimizations(Vector p) {
|
private static void MIROptimizations(ArrayList p) {
|
private static void MIROptimizations(Vector p) { //////////////////// // MIR OPTS(1) (before register allocation) //////////////////// // INSTRUCTION SCHEDULING (PRE-PASS --- PRIOR TO REGISTER ALLOCATION) addComponent(p, new OPT_PrePassScheduler()); // NullCheck combining and validation operand removal. addComponent(p, new OPT_NullCheckCombining()); //////////////////// // GCMapping part1 and RegisterAllocation //////////////////// composeComponents(p, "Register Mapping", new Object[] { // MANDATORY: Expand calling convention new OPT_ExpandCallingConvention(), // MANDATORY: Perform Live analysis and create GC maps new OPT_LiveAnalysis(true, false), // MANDATORY: Perform register allocation new OPT_RegisterAllocator(), // MANDATORY: Add prologue and epilogue new OPT_PrologueEpilogueCreator(), }); //////////////////// // MIR OPTS(2) (after register allocation) // NOTE: GCMapping part 1 has created the GC maps already. // From now until the end of compilation, we cannot change // the set of live references at a GC point // without updating the GCMaps. // Effectively this means that we can only do the // most trivial optimizations from // here on out without having to some potentially complex bookkeeping. //////////////////// // Peephole branch optimizations addComponent(p, new OPT_MIRBranchOptimizations(1)); }
|
49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/32e80a6e3f4fb06979f006e75487f4e1ebceaa8f/OPT_MIROptimizationPlanner.java/buggy/rvm/src/vm/arch/powerPC/compilers/optimizing/OPT_MIROptimizationPlanner.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
20806,
1457,
337,
381,
7089,
12,
19558,
293,
13,
288,
565,
368,
3517,
759,
565,
368,
490,
7937,
16456,
55,
12,
21,
13,
261,
5771,
1744,
13481,
13,
565,
368,
3517,
759,
565,
368,
2120,
3902,
27035,
348,
15023,
1506,
1360,
261,
3670,
17,
10884,
9948,
10365,
916,
8493,
11980,
19957,
7981,
15277,
13,
565,
15218,
12,
84,
16,
394,
16456,
67,
1386,
6433,
11870,
10663,
565,
368,
4112,
1564,
29189,
471,
3379,
9886,
14817,
18,
565,
15218,
12,
84,
16,
394,
16456,
67,
2041,
1564,
24107,
310,
10663,
565,
368,
3517,
759,
565,
368,
15085,
3233,
1087,
21,
471,
5433,
17353,
565,
368,
3517,
759,
565,
11458,
7171,
12,
84,
16,
315,
3996,
9408,
3113,
394,
1033,
8526,
288,
1377,
368,
490,
4307,
3575,
61,
30,
16429,
4440,
15797,
1377,
394,
16456,
67,
12271,
19677,
25947,
9334,
1377,
368,
490,
4307,
3575,
61,
30,
11217,
21559,
6285,
471,
752,
15085,
7565,
1377,
394,
16456,
67,
12328,
9418,
12,
3767,
16,
629,
3631,
1377,
368,
490,
4307,
3575,
61,
30,
11217,
1744,
13481,
1377,
394,
16456,
67,
3996,
21156,
9334,
1377,
368,
490,
4307,
3575,
61,
30,
1436,
450,
1330,
344,
471,
5529,
21947,
344,
1377,
394,
16456,
67,
626,
1330,
344,
18918,
21947,
344,
10636,
9334,
565,
15549,
565,
368,
3517,
759,
565,
368,
490,
7937,
16456,
55,
12,
22,
13,
261,
5205,
1744,
13481,
13,
565,
368,
5219,
30,
15085,
3233,
1087,
404,
711,
2522,
326,
15085,
7565,
1818,
18,
565,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
20806,
1457,
337,
381,
7089,
12,
19558,
293,
13,
288,
565,
368,
3517,
759,
565,
368,
490,
7937,
16456,
55,
12,
21,
13,
261,
5771,
1744,
13481,
13,
565,
368,
3517,
759,
565,
368,
2120,
3902,
27035,
348,
15023,
1506,
1360,
261,
3670,
17,
10884,
9948,
10365,
916,
8493,
11980,
19957,
7981,
15277,
13,
565,
15218,
12,
84,
16,
394,
16456,
67,
1386,
6433,
11870,
10663,
565,
368,
4112,
1564,
29189,
471,
3379,
9886,
14817,
18,
565,
15218,
12,
84,
16,
394,
16456,
67,
2041,
1564,
24107,
310,
10663,
565,
368,
3517,
759,
565,
368,
15085,
3233,
1087,
21,
471,
5433,
17353,
565,
368,
3517,
759,
565,
11458,
7171,
12,
84,
16,
315,
3996,
9408,
2
] |
ElectronContainer ec = new ElectronContainer();
|
ElectronContainer ec = builder.newElectronContainer();
|
public void testSetElectronCount_int() { ElectronContainer ec = new ElectronContainer(); ec.setElectronCount(3); assertEquals(3, ec.getElectronCount()); }
|
45254 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45254/4402993b4912186cc96bb80f3a37dcdaef3c924f/ElectronContainerTest.java/buggy/src/org/openscience/cdk/test/ElectronContainerTest.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
694,
28621,
1380,
67,
474,
1435,
288,
3639,
512,
1582,
1949,
2170,
6557,
273,
2089,
18,
2704,
28621,
2170,
5621,
3639,
6557,
18,
542,
28621,
1380,
12,
23,
1769,
3639,
1815,
8867,
12,
23,
16,
6557,
18,
588,
28621,
1380,
10663,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1842,
694,
28621,
1380,
67,
474,
1435,
288,
3639,
512,
1582,
1949,
2170,
6557,
273,
2089,
18,
2704,
28621,
2170,
5621,
3639,
6557,
18,
542,
28621,
1380,
12,
23,
1769,
3639,
1815,
8867,
12,
23,
16,
6557,
18,
588,
28621,
1380,
10663,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
{ m_resWordsTable = new Hashtable(); iMaxResword = 0; initResword(ParserSym.AND ,"AND"); initResword(ParserSym.AS ,"AS"); initResword(ParserSym.AXIS ,"AXIS"); initResword(ParserSym.CASE ,"CASE"); initResword(ParserSym.CELL ,"CELL"); initResword(ParserSym.DIMENSION ,"DIMENSION"); initResword(ParserSym.ELSE ,"ELSE"); initResword(ParserSym.EMPTY ,"EMPTY"); initResword(ParserSym.END ,"END"); initResword(ParserSym.FORMATTED_VALUE ,"FORMATTED_VALUE"); initResword(ParserSym.FROM ,"FROM"); initResword(ParserSym.MEMBER ,"MEMBER"); initResword(ParserSym.NON ,"NON"); initResword(ParserSym.NOT ,"NOT"); initResword(ParserSym.ON ,"ON"); initResword(ParserSym.OR ,"OR"); initResword(ParserSym.PROPERTIES ,"PROPERTIES"); initResword(ParserSym.SELECT ,"SELECT"); initResword(ParserSym.SET ,"SET"); initResword(ParserSym.THEN ,"THEN"); initResword(ParserSym.VALUE ,"VALUE"); initResword(ParserSym.WHEN ,"WHEN"); initResword(ParserSym.WHERE ,"WHERE"); initResword(ParserSym.WITH ,"WITH"); initResword(ParserSym.XOR ,"XOR");
|
{ m_resWordsTable = new Hashtable(); iMaxResword = 0; initResword(ParserSym.AND ,"AND"); initResword(ParserSym.AS ,"AS"); initResword(ParserSym.AXIS ,"AXIS"); initResword(ParserSym.CASE ,"CASE"); initResword(ParserSym.CELL ,"CELL"); initResword(ParserSym.DIMENSION ,"DIMENSION"); initResword(ParserSym.ELSE ,"ELSE"); initResword(ParserSym.EMPTY ,"EMPTY"); initResword(ParserSym.END ,"END"); initResword(ParserSym.FORMATTED_VALUE ,"FORMATTED_VALUE"); initResword(ParserSym.FROM ,"FROM"); initResword(ParserSym.MEMBER ,"MEMBER"); initResword(ParserSym.NON ,"NON"); initResword(ParserSym.NOT ,"NOT"); initResword(ParserSym.ON ,"ON"); initResword(ParserSym.OR ,"OR"); initResword(ParserSym.PROPERTIES ,"PROPERTIES"); initResword(ParserSym.SELECT ,"SELECT"); initResword(ParserSym.SET ,"SET"); initResword(ParserSym.THEN ,"THEN"); initResword(ParserSym.VALUE ,"VALUE"); initResword(ParserSym.WHEN ,"WHEN"); initResword(ParserSym.WHERE ,"WHERE"); initResword(ParserSym.WITH ,"WITH"); initResword(ParserSym.XOR ,"XOR");
|
private void initReswords() { // This list generated by piping the 'terminal' declaration in mdx.cup // through: // grep -list // | // sed -e 's/,//' | // awk '{printf "initResword(%20s,%c%s%c);",$1,34,$1,34}' m_resWordsTable = new Hashtable(); iMaxResword = 0;// initResword(ParserSym.ALL ,"ALL"); initResword(ParserSym.AND ,"AND"); initResword(ParserSym.AS ,"AS");// initResword(ParserSym.ASC ,"ASC"); initResword(ParserSym.AXIS ,"AXIS");// initResword(ParserSym.BACK_COLOR ,"BACK_COLOR");// initResword(ParserSym.BASC ,"BASC");// initResword(ParserSym.BDESC ,"BDESC"); initResword(ParserSym.CASE ,"CASE"); initResword(ParserSym.CELL ,"CELL");// initResword(ParserSym.CELL_ORDINAL ,"CELL_ORDINAL");// initResword(ParserSym.CHAPTERS ,"CHAPTERS");// initResword(ParserSym.CHILDREN ,"CHILDREN");// initResword(ParserSym.COLUMNS ,"COLUMNS");// initResword(ParserSym.DESC ,"DESC"); initResword(ParserSym.DIMENSION ,"DIMENSION"); initResword(ParserSym.ELSE ,"ELSE"); initResword(ParserSym.EMPTY ,"EMPTY"); initResword(ParserSym.END ,"END");// initResword(ParserSym.FIRSTCHILD ,"FIRSTCHILD");// initResword(ParserSym.FIRSTSIBLING ,"FIRSTSIBLING");// initResword(ParserSym.FONT_FLAGS ,"FONT_FLAGS");// initResword(ParserSym.FONT_NAME ,"FONT_NAME");// initResword(ParserSym.FONT_SIZE ,"FONT_SIZE");// initResword(ParserSym.FORE_COLOR ,"FORE_COLOR"); initResword(ParserSym.FORMATTED_VALUE ,"FORMATTED_VALUE");// initResword(ParserSym.FORMAT_STRING ,"FORMAT_STRING"); initResword(ParserSym.FROM ,"FROM");// initResword(ParserSym.LAG ,"LAG");// initResword(ParserSym.LASTCHILD ,"LASTCHILD");// initResword(ParserSym.LASTSIBLING ,"LASTSIBLING");// initResword(ParserSym.LEAD ,"LEAD"); initResword(ParserSym.MEMBER ,"MEMBER");// initResword(ParserSym.MEMBERS ,"MEMBERS");// initResword(ParserSym.NEXTMEMBER ,"NEXTMEMBER"); initResword(ParserSym.NON ,"NON"); initResword(ParserSym.NOT ,"NOT"); initResword(ParserSym.ON ,"ON"); initResword(ParserSym.OR ,"OR");// initResword(ParserSym.PAGES ,"PAGES");// initResword(ParserSym.PARENT ,"PARENT");// initResword(ParserSym.PREVMEMBER ,"PREVMEMBER"); initResword(ParserSym.PROPERTIES ,"PROPERTIES");// initResword(ParserSym.RECURSIVE ,"RECURSIVE");// initResword(ParserSym.ROWS ,"ROWS");// initResword(ParserSym.SECTIONS ,"SECTIONS"); initResword(ParserSym.SELECT ,"SELECT"); initResword(ParserSym.SET ,"SET");// initResword(ParserSym.SOLVE_ORDER ,"SOLVE_ORDER"); initResword(ParserSym.THEN ,"THEN"); initResword(ParserSym.VALUE ,"VALUE"); initResword(ParserSym.WHEN ,"WHEN"); initResword(ParserSym.WHERE ,"WHERE"); initResword(ParserSym.WITH ,"WITH"); initResword(ParserSym.XOR ,"XOR"); m_aResWords = new String[iMaxResword + 1]; Enumeration e = m_resWordsTable.keys(); while (e.hasMoreElements()) { Object o = e.nextElement(); String s = (String) o; int i = ((Integer) m_resWordsTable.get(s)).intValue(); m_aResWords[i] = s; } }
|
4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/b5b5168edc3af09cb74945a80b0c36e6630ed502/Scanner.java/buggy/src/main/mondrian/olap/Scanner.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1208,
607,
3753,
1435,
202,
95,
202,
202,
759,
1220,
666,
4374,
635,
8341,
310,
326,
296,
15979,
11,
8266,
316,
3481,
92,
18,
71,
416,
202,
202,
759,
3059,
30,
202,
202,
759,
282,
23366,
300,
1098,
368,
571,
202,
202,
759,
282,
24336,
300,
73,
296,
87,
19,
16,
759,
11,
571,
202,
202,
759,
282,
1690,
79,
2292,
1461,
315,
2738,
607,
1095,
9275,
3462,
87,
15529,
71,
9,
87,
9,
71,
1769,
3113,
8,
21,
16,
5026,
16,
8,
21,
16,
5026,
1713,
202,
202,
81,
67,
455,
7363,
1388,
273,
394,
18559,
5621,
202,
202,
77,
2747,
607,
1095,
273,
374,
31,
759,
202,
202,
2738,
607,
1095,
12,
2678,
11901,
18,
4685,
1171,
269,
6,
4685,
8863,
202,
202,
2738,
607,
1095,
12,
2678,
11901,
18,
4307,
1171,
269,
6,
4307,
8863,
202,
202,
2738,
607,
1095,
12,
2678,
11901,
18,
3033,
5375,
269,
6,
3033,
8863,
759,
202,
202,
2738,
607,
1095,
12,
2678,
11901,
18,
8633,
1171,
269,
6,
8633,
8863,
202,
202,
2738,
607,
1095,
12,
2678,
11901,
18,
25614,
7734,
269,
6,
25614,
8863,
759,
202,
202,
2738,
607,
1095,
12,
2678,
11901,
18,
8720,
67,
10989,
1850,
269,
6,
8720,
67,
10989,
8863,
759,
202,
202,
2738,
607,
1095,
12,
2678,
11901,
18,
38,
8633,
7734,
269,
6,
38,
8633,
8863,
759,
202,
202,
2738,
607,
1095,
12,
2678,
11901,
18,
38,
10964,
9079,
269,
6,
38,
10964,
8863,
202,
202,
2738,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1208,
607,
3753,
1435,
202,
95,
202,
202,
759,
1220,
666,
4374,
635,
8341,
310,
326,
296,
15979,
11,
8266,
316,
3481,
92,
18,
71,
416,
202,
202,
759,
3059,
30,
202,
202,
759,
282,
23366,
300,
1098,
368,
571,
202,
202,
759,
282,
24336,
300,
73,
296,
87,
19,
16,
759,
11,
571,
202,
202,
759,
282,
1690,
79,
2292,
1461,
315,
2738,
607,
1095,
9275,
3462,
87,
15529,
71,
9,
87,
9,
71,
1769,
3113,
8,
21,
16,
5026,
16,
8,
21,
16,
5026,
1713,
202,
202,
81,
67,
455,
7363,
1388,
273,
394,
18559,
5621,
202,
202,
77,
2747,
607,
1095,
273,
374,
31,
759,
202,
202,
2738,
607,
1095,
12,
2678,
2
] |
case Id_setMilliseconds: return wrap_double (jsFunction_setMilliseconds(cx, thisObj, args, f));
|
case Id_setMilliseconds: return wrap_double(realThis(thisObj, f, false). jsFunction_setMilliseconds(args));
|
public Object execMethod (int methodId, IdFunction f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { switch (methodId) { case ConstructorId_UTC: return wrap_double (jsStaticFunction_UTC(cx, thisObj, args, f)); case ConstructorId_parse: return wrap_double (jsStaticFunction_parse(ScriptRuntime.toString(args, 0))); case CONSTRUCTOR_ID: return jsConstructor(cx, args, f, thisObj == null); case Id_toString: return realThis(thisObj, f, true). jsFunction_toString(); case Id_toTimeString: return realThis(thisObj, f, true). jsFunction_toTimeString(); case Id_toDateString: return realThis(thisObj, f, true). jsFunction_toDateString(); case Id_toLocaleString: return realThis(thisObj, f, true). jsFunction_toLocaleString(); case Id_toLocaleTimeString: return realThis(thisObj, f, true). jsFunction_toLocaleTimeString(); case Id_toLocaleDateString: return realThis(thisObj, f, true). jsFunction_toLocaleDateString(); case Id_toUTCString: return realThis(thisObj, f, true). jsFunction_toUTCString(); case Id_valueOf: return wrap_double(realThis(thisObj, f, true). jsFunction_valueOf()); case Id_getTime: return wrap_double(realThis(thisObj, f, true). jsFunction_getTime()); case Id_getYear: return wrap_double(realThis(thisObj, f, true). jsFunction_getYear()); case Id_getFullYear: return wrap_double(realThis(thisObj, f, true). jsFunction_getFullYear()); case Id_getUTCFullYear: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCFullYear()); case Id_getMonth: return wrap_double(realThis(thisObj, f, true). jsFunction_getMonth()); case Id_getUTCMonth: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCMonth()); case Id_getDate: return wrap_double(realThis(thisObj, f, true). jsFunction_getDate()); case Id_getUTCDate: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCDate()); case Id_getDay: return wrap_double(realThis(thisObj, f, true). jsFunction_getDay()); case Id_getUTCDay: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCDay()); case Id_getHours: return wrap_double(realThis(thisObj, f, true). jsFunction_getHours()); case Id_getUTCHours: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCHours()); case Id_getMinutes: return wrap_double(realThis(thisObj, f, true). jsFunction_getMinutes()); case Id_getUTCMinutes: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCMinutes()); case Id_getSeconds: return wrap_double(realThis(thisObj, f, true). jsFunction_getSeconds()); case Id_getUTCSeconds: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCSeconds()); case Id_getMilliseconds: return wrap_double(realThis(thisObj, f, true). jsFunction_getMilliseconds()); case Id_getUTCMilliseconds: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCMilliseconds()); case Id_getTimezoneOffset: return wrap_double(realThis(thisObj, f, true). jsFunction_getTimezoneOffset()); case Id_setTime: return wrap_double(realThis(thisObj, f, true). jsFunction_setTime(ScriptRuntime.toNumber(args, 0))); case Id_setMilliseconds: return wrap_double (jsFunction_setMilliseconds(cx, thisObj, args, f)); case Id_setUTCMilliseconds: return wrap_double( jsFunction_setUTCMilliseconds(cx, thisObj, args, f)); case Id_setSeconds: return wrap_double( jsFunction_setSeconds(cx, thisObj, args, f)); case Id_setUTCSeconds: return wrap_double( jsFunction_setUTCSeconds(cx, thisObj, args, f)); case Id_setMinutes: return wrap_double( jsFunction_setMinutes(cx, thisObj, args, f)); case Id_setUTCMinutes: return wrap_double( jsFunction_setUTCMinutes(cx, thisObj, args, f)); case Id_setHours: return wrap_double( jsFunction_setHours(cx, thisObj, args, f)); case Id_setUTCHours: return wrap_double( jsFunction_setUTCHours(cx, thisObj, args, f)); case Id_setDate: return wrap_double( jsFunction_setDate(cx, thisObj, args, f)); case Id_setUTCDate: return wrap_double( jsFunction_setUTCDate(cx, thisObj, args, f)); case Id_setMonth: return wrap_double( jsFunction_setMonth(cx, thisObj, args, f)); case Id_setUTCMonth: return wrap_double( jsFunction_setUTCMonth(cx, thisObj, args, f)); case Id_setFullYear: return wrap_double( jsFunction_setFullYear(cx, thisObj, args, f)); case Id_setUTCFullYear: return wrap_double( jsFunction_setUTCFullYear(cx, thisObj, args, f)); case Id_setYear: return wrap_double(realThis(thisObj, f, true). jsFunction_setYear(ScriptRuntime.toNumber(args, 0))); } return Scriptable.NOT_FOUND; }
|
51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/1f40b84b6c54487dd6f26829d1ebda36a7567a38/NativeDate.java/buggy/js/rhino/src/org/mozilla/javascript/NativeDate.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
3639,
261,
474,
707,
548,
16,
3124,
2083,
284,
16,
540,
1772,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
1620,
261,
2039,
548,
13,
288,
3639,
648,
11417,
548,
67,
11471,
30,
327,
2193,
67,
9056,
5411,
261,
2924,
5788,
2083,
67,
11471,
12,
71,
92,
16,
15261,
16,
833,
16,
284,
10019,
3639,
648,
11417,
548,
67,
2670,
30,
327,
2193,
67,
9056,
5411,
261,
2924,
5788,
2083,
67,
2670,
12,
3651,
5576,
18,
10492,
12,
1968,
16,
374,
3719,
1769,
3639,
648,
3492,
13915,
916,
67,
734,
30,
5411,
327,
3828,
6293,
12,
71,
92,
16,
833,
16,
284,
16,
15261,
422,
446,
1769,
3639,
648,
3124,
67,
10492,
30,
327,
2863,
2503,
12,
2211,
2675,
16,
284,
16,
638,
2934,
5411,
3828,
2083,
67,
10492,
5621,
3639,
648,
3124,
67,
869,
950,
780,
30,
327,
2863,
2503,
12,
2211,
2675,
16,
284,
16,
638,
2934,
5411,
3828,
2083,
67,
869,
950,
780,
5621,
3639,
648,
3124,
67,
869,
1626,
780,
30,
327,
2863,
2503,
12,
2211,
2675,
16,
284,
16,
638,
2934,
5411,
3828,
2083,
67,
869,
1626,
780,
5621,
3639,
648,
3124,
67,
869,
3916,
780,
30,
327,
2863,
2503,
12,
2211,
2675,
16,
284,
16,
638,
2934,
5411,
3828,
2083,
67,
869,
3916,
780,
5621,
3639,
648,
3124,
67,
869,
3916,
950,
780,
30,
327,
2863,
2503,
12,
2211,
2675,
16,
284,
16,
638,
2934,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
3639,
261,
474,
707,
548,
16,
3124,
2083,
284,
16,
540,
1772,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
1620,
261,
2039,
548,
13,
288,
3639,
648,
11417,
548,
67,
11471,
30,
327,
2193,
67,
9056,
5411,
261,
2924,
5788,
2083,
67,
11471,
12,
71,
92,
16,
15261,
16,
833,
16,
284,
10019,
3639,
648,
11417,
548,
67,
2670,
30,
327,
2193,
67,
9056,
5411,
261,
2924,
5788,
2083,
67,
2670,
12,
3651,
5576,
18,
10492,
12,
1968,
16,
374,
3719,
1769,
3639,
648,
3492,
13915,
916,
67,
734,
30,
5411,
327,
3828,
6293,
12,
71,
92,
16,
833,
16,
284,
16,
2
] |
if ((flags & 8) == 0) { writeLeInt((int) entry.getCrc()); writeLeInt((int) entry.getCompressedSize()); writeLeInt((int) entry.getSize()); } else {
|
if ((flags & 8) == 0) { writeLeInt((int)entry.getCrc()); writeLeInt((int)entry.getCompressedSize()); writeLeInt((int)entry.getSize()); } else {
|
public void putNextEntry(ZipEntry entry) throws IOException { if (entries == null) throw new ZipException("ZipOutputStream was finished"); int method = entry.getMethod(); int flags = 0; if (method == -1) method = defaultMethod; if (method == STORED) { if (entry.getCompressedSize() >= 0) { if (entry.getSize() < 0) entry.setSize(entry.getCompressedSize()); else if (entry.getSize() != entry.getCompressedSize()) throw new ZipException("Method STORED, but compressed size != size"); } else entry.setCompressedSize(entry.getSize()); if (entry.getSize() < 0) throw new ZipException("Method STORED, but size not set"); if (entry.getCrc() < 0) throw new ZipException("Method STORED, but crc not set"); } else if (method == DEFLATED) { if (entry.getCompressedSize() < 0 || entry.getSize() < 0 || entry.getCrc() < 0) flags |= 8; } if (curEntry != null) closeEntry(); if (entry.getTime() < 0) entry.setTime(System.currentTimeMillis()); entry.flags = flags; entry.offset = offset; entry.setMethod(method); curMethod = method; /* Write the local file header */ writeLeInt(LOCSIG); writeLeShort(method == STORED ? ZIP_STORED_VERSION : ZIP_DEFLATED_VERSION); writeLeShort(flags); writeLeShort(method); writeLeInt(entry.getDOSTime()); if ((flags & 8) == 0) { writeLeInt((int) entry.getCrc()); writeLeInt((int) entry.getCompressedSize()); writeLeInt((int) entry.getSize()); } else { writeLeInt(0); writeLeInt(0); writeLeInt(0); } byte[] name = entry.getName().getBytes(); if (name.length > 0xffff) throw new ZipException("Name too long."); byte[] extra = entry.getExtra(); if (extra == null) extra = new byte[0]; writeLeShort(name.length); writeLeShort(extra.length); out.write(name); out.write(extra); offset += LOCHDR + name.length + extra.length; /* Activate the entry. */ curEntry = entry; crc.reset(); if (method == DEFLATED) def.reset(); size = 0; }
|
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/ZipOutputStream.java/clean/core/src/classpath/java/java/util/zip/ZipOutputStream.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1378,
2134,
1622,
12,
9141,
1622,
1241,
13,
1216,
1860,
288,
202,
202,
430,
261,
8219,
422,
446,
13,
1082,
202,
12849,
394,
8603,
503,
2932,
9141,
4632,
1703,
6708,
8863,
202,
202,
474,
707,
273,
1241,
18,
588,
1305,
5621,
202,
202,
474,
2943,
273,
374,
31,
202,
202,
430,
261,
2039,
422,
300,
21,
13,
1082,
202,
2039,
273,
805,
1305,
31,
202,
202,
430,
261,
2039,
422,
2347,
51,
5879,
13,
288,
1082,
202,
430,
261,
4099,
18,
588,
16841,
1225,
1435,
1545,
374,
13,
288,
9506,
202,
430,
261,
4099,
18,
588,
1225,
1435,
411,
374,
13,
6862,
202,
4099,
18,
542,
1225,
12,
4099,
18,
588,
16841,
1225,
10663,
9506,
202,
12107,
309,
261,
4099,
18,
588,
1225,
1435,
480,
1241,
18,
588,
16841,
1225,
10756,
6862,
202,
12849,
394,
8603,
503,
2932,
1305,
2347,
51,
5879,
16,
1496,
8968,
963,
480,
963,
8863,
1082,
202,
97,
469,
9506,
202,
4099,
18,
542,
16841,
1225,
12,
4099,
18,
588,
1225,
10663,
1082,
202,
430,
261,
4099,
18,
588,
1225,
1435,
411,
374,
13,
9506,
202,
12849,
394,
8603,
503,
2932,
1305,
2347,
51,
5879,
16,
1496,
963,
486,
444,
8863,
1082,
202,
430,
261,
4099,
18,
588,
39,
1310,
1435,
411,
374,
13,
9506,
202,
12849,
394,
8603,
503,
2932,
1305,
2347,
51,
5879,
16,
1496,
10619,
486,
444,
8863,
202,
202,
97,
469,
309,
261,
2039,
422,
2030,
19054,
6344,
13,
288,
1082,
202,
430,
261,
4099,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1378,
2134,
1622,
12,
9141,
1622,
1241,
13,
1216,
1860,
288,
202,
202,
430,
261,
8219,
422,
446,
13,
1082,
202,
12849,
394,
8603,
503,
2932,
9141,
4632,
1703,
6708,
8863,
202,
202,
474,
707,
273,
1241,
18,
588,
1305,
5621,
202,
202,
474,
2943,
273,
374,
31,
202,
202,
430,
261,
2039,
422,
300,
21,
13,
1082,
202,
2039,
273,
805,
1305,
31,
202,
202,
430,
261,
2039,
422,
2347,
51,
5879,
13,
288,
1082,
202,
430,
261,
4099,
18,
588,
16841,
1225,
1435,
1545,
374,
13,
288,
9506,
202,
430,
261,
4099,
18,
588,
1225,
1435,
411,
374,
13,
6862,
202,
4099,
18,
542,
1225,
12,
4099,
18,
588,
16841,
1225,
10663,
9506,
2
] |
ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall);
|
ExpBase exp = (ExpBase) getArgNoEval(args, 1, valueFunCall);
|
protected void defineFunctions() { defineReserved("NULL"); // first char: p=Property, m=Method, i=Infix, P=Prefix // 2nd: // ARRAY FUNCTIONS if (false) define(new FunDefBase("SetToArray", "SetToArray(<Set>[, <Set>]...[, <Numeric Expression>])", "Converts one or more sets to an array for use in a user-if (false) defined function.", "fa*")); // // DIMENSION FUNCTIONS define(new FunDefBase("Dimension", "<Hierarchy>.Dimension", "Returns the dimension that contains a specified hierarchy.", "pdh") { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = getHierarchyArg(evaluator, args, 0, true); return hierarchy.getDimension(); } }); //??Had to add this to get <Hierarchy>.Dimension to work? define(new FunDefBase("Dimension", "<Dimension>.Dimension", "Returns the dimension that contains a specified hierarchy.", "pdd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = getDimensionArg(evaluator, args, 0, true); return dimension; } public void testDimensionHierarchy(FoodMartTestCase test) { String s = test.executeExpr("[Time].Dimension.Name"); Assert.assertEquals("Time", s); } }); define(new FunDefBase("Dimension", "<Level>.Dimension", "Returns the dimension that contains a specified level.", "pdl") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, true); return level.getDimension(); } public void testLevelDimension(FoodMartTestCase test) { String s = test.executeExpr("[Time].[Year].Dimension"); Assert.assertEquals("[Time]", s); } }); define(new FunDefBase("Dimension", "<Member>.Dimension", "Returns the dimension that contains a specified member.", "pdm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.getDimension(); } public void testMemberDimension(FoodMartTestCase test) { String s = test.executeExpr( "[Time].[1997].[Q2].Dimension"); Assert.assertEquals("[Time]", s); } }); define(new FunDefBase("Dimensions", "Dimensions(<Numeric Expression>)", "Returns the dimension whose zero-based position within the cube is specified by a numeric expression.", "fdn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Cube cube = evaluator.getCube(); Dimension[] dimensions = cube.getDimensions(); int n = getIntArg(evaluator, args, 0); if ((n > dimensions.length) || (n < 1)) { throw newEvalException( this, "Index '" + n + "' out of bounds"); } return dimensions[n - 1]; } public void testDimensionsNumeric(FoodMartTestCase test) { String s = test.executeExpr("Dimensions(2).Name"); Assert.assertEquals("Store", s); } }); define(new FunDefBase("Dimensions", "Dimensions(<String Expression>)", "Returns the dimension whose name is specified by a string.", "fdS") { public Object evaluate(Evaluator evaluator, Exp[] args) { String defValue = "Default Value"; String s = getStringArg(evaluator, args, 0, defValue); if (s.indexOf("[") == -1) { s = Util.quoteMdxIdentifier(s); } OlapElement o = lookupCompound(evaluator.getSchemaReader(), evaluator.getCube(), explode(s), false, Category.Dimension); if (o instanceof Dimension) { return (Dimension) o; } else if (o == null) { throw newEvalException(this, "Dimension '" + s + "' not found"); } else { throw newEvalException(this, "Dimensions(" + s + ") found " + o); } } public void testDimensionsString(FoodMartTestCase test) { String s = test.executeExpr( "Dimensions(\"Store\").UniqueName"); Assert.assertEquals("[Store]", s); } }); // // HIERARCHY FUNCTIONS define(new FunDefBase("Hierarchy", "<Level>.Hierarchy", "Returns a level's hierarchy.", "phl") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, true); return level.getHierarchy(); } }); define(new FunDefBase("Hierarchy", "<Member>.Hierarchy", "Returns a member's hierarchy.", "phm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.getHierarchy(); } public void testTime(FoodMartTestCase test) { String s = test.executeExpr( "[Time].[1997].[Q1].[1].Hierarchy"); Assert.assertEquals("[Time]", s); } public void testBasic9(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].[All Gender].[F].Hierarchy"); Assert.assertEquals("[Gender]", s); } public void testFirstInLevel9(FoodMartTestCase test) { String s = test.executeExpr( "[Education Level].[All Education Levels].[Bachelors Degree].Hierarchy"); Assert.assertEquals("[Education Level]", s); } public void testHierarchyAll(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].[All Gender].Hierarchy"); Assert.assertEquals("[Gender]", s); } public void testHierarchyNull(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].[All Gender].Parent.Hierarchy"); Assert.assertEquals("[Gender]", s); // MSOLAP gives "#ERR" } }); // // LEVEL FUNCTIONS define(new FunDefBase("Level", "<Member>.Level", "Returns a member's level.", "plm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.getLevel(); } public void testMemberLevel(FoodMartTestCase test) { String s = test.executeExpr( "[Time].[1997].[Q1].[1].Level.UniqueName"); Assert.assertEquals("[Time].[Month]", s); } }); define(new FunDefBase("Levels", "<Hierarchy>.Levels(<Numeric Expression>)", "Returns the level whose position in a hierarchy is specified by a numeric expression.", "mlhn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = getHierarchyArg(evaluator, args, 0, true); Level[] levels = hierarchy.getLevels(); int n = getIntArg(evaluator, args, 1); if ((n > levels.length) || (n < 1)) { throw newEvalException( this, "Index '" + n + "' out of bounds"); } return levels[n - 1]; } public void testLevelsNumeric(FoodMartTestCase test) { String s = test.executeExpr("[Time].Levels(2).Name"); Assert.assertEquals("Quarter", s); } public void testLevelsTooSmall(FoodMartTestCase test) { test.assertExprThrows( "[Time].Levels(0).Name", "Index '0' out of bounds"); } public void testLevelsTooLarge(FoodMartTestCase test) { test.assertExprThrows( "[Time].Levels(8).Name", "Index '8' out of bounds"); } }); define(new FunDefBase("Levels", "Levels(<String Expression>)", "Returns the level whose name is specified by a string expression.", "flS") { public Object evaluate(Evaluator evaluator, Exp[] args) { String s = getStringArg(evaluator, args, 0, null); Cube cube = evaluator.getCube(); OlapElement o = null; if (s.startsWith("[")) { o = lookupCompound(evaluator.getSchemaReader(), cube, explode(s), false, Category.Level); } else { // lookupCompound barfs if "s" doesn't have matching // brackets, so don't even try o = null; } if (o instanceof Level) { return (Level) o; } else if (o == null) { throw newEvalException(this, "Level '" + s + "' not found"); } else { throw newEvalException(this, "Levels('" + s + "') found " + o); } } public void testLevelsString(FoodMartTestCase test) { String s = test.executeExpr( "Levels(\"[Time].[Year]\").UniqueName"); Assert.assertEquals("[Time].[Year]", s); } public void testLevelsStringFail(FoodMartTestCase test) { test.assertExprThrows( "Levels(\"nonexistent\").UniqueName", "Level 'nonexistent' not found"); } }); // // LOGICAL FUNCTIONS define(new FunkResolver("IsEmpty", "IsEmpty(<Value Expression>)", "Determines if an expression evaluates to the empty cell value.", new String[] {"fbS", "fbn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { Object o = getScalarArg(evaluator, args, 0); if (o == Util.nullValue) { return Boolean.TRUE; } else { return Boolean.FALSE; } } public void testIsEmpty(FoodMartTestCase test) { test.runQueryCheckResult( "WITH MEMBER [Measures].[Foo] AS 'Iif(IsEmpty([Measures].[Unit Sales]), 5, [Measures].[Unit Sales])'" + nl + "SELECT {[Store].[USA].[WA].children} on columns" + nl + "FROM Sales" + nl + "WHERE ( [Time].[1997].[Q4].[12]," + nl + " [Product].[All Products].[Drink].[Alcoholic Beverages].[Beer and Wine].[Beer].[Portsmouth].[Portsmouth Imported Beer]," + nl + " [Measures].[Foo])", "Axis #0:" + nl + "{[Time].[1997].[Q4].[12], [Product].[All Products].[Drink].[Alcoholic Beverages].[Beer and Wine].[Beer].[Portsmouth].[Portsmouth Imported Beer], [Measures].[Foo]}" + nl + "Axis #1:" + nl + "{[Store].[All Stores].[USA].[WA].[Bellingham]}" + nl + "{[Store].[All Stores].[USA].[WA].[Bremerton]}" + nl + "{[Store].[All Stores].[USA].[WA].[Seattle]}" + nl + "{[Store].[All Stores].[USA].[WA].[Spokane]}" + nl + "{[Store].[All Stores].[USA].[WA].[Tacoma]}" + nl + "{[Store].[All Stores].[USA].[WA].[Walla Walla]}" + nl + "{[Store].[All Stores].[USA].[WA].[Yakima]}" + nl + "Row #0: 5" + nl + "Row #0: 5" + nl + "Row #0: 2" + nl + "Row #0: 5" + nl + "Row #0: 11" + nl + "Row #0: 5" + nl + "Row #0: 4" + nl); } })); define(new FunDefBase("IsEmpty", "IsEmpty(<Value Expression>)", "Determines if an expression evaluates to the empty cell value.", "fbn")); // // MEMBER FUNCTIONS define(new FunDefBase("Ancestor", "Ancestor(<Member>, <Level>)", "Returns the ancestor of a member at a specified level.", "fmml") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, false); Level level = getLevelArg(evaluator, args, 1, false); if (member.getHierarchy() != level.getHierarchy()) { throw newEvalException( this, "member '" + member + "' is not in the same hierarchy as level '" + level + "'"); } if (member.getLevel().equals(level)) { return member; } Member[] members = member.getAncestorMembers(); for (int i = 0; i < members.length; i++) { if (members[i].getLevel().equals(level)) return members[i]; } return member.getHierarchy().getNullMember(); // not found } public void testAncestor(FoodMartTestCase test) { Member member = test.executeAxis( "Ancestor([Store].[USA].[CA].[Los Angeles],[Store Country])"); Assert.assertEquals("USA", member.getName()); } public void testAncestorHigher(FoodMartTestCase test) { Member member = test.executeAxis( "Ancestor([Store].[USA],[Store].[Store City])"); Assert.assertNull(member); // MSOLAP returns null } public void testAncestorSameLevel(FoodMartTestCase test) { Member member = test.executeAxis( "Ancestor([Store].[Canada],[Store].[Store Country])"); Assert.assertEquals("Canada", member.getName()); } public void testAncestorWrongHierarchy(FoodMartTestCase test) { // MSOLAP gives error "Formula error - dimensions are not // valid (they do not match) - in the Ancestor function" test.assertAxisThrows( "Ancestor([Gender].[M],[Store].[Store Country])", "member '[Gender].[All Gender].[M]' is not in the same hierarchy as level '[Store].[Store Country]'"); } public void testAncestorAllLevel(FoodMartTestCase test) { Member member = test.executeAxis( "Ancestor([Store].[USA].[CA],[Store].Levels(1))"); Assert.assertTrue(member.isAll()); } }); define(new FunDefBase("ClosingPeriod", "ClosingPeriod([<Level>[, <Member>]])", "Returns the last sibling among the descendants of a member at a level.", "fm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Cube cube = evaluator.getCube(); Dimension timeDimension = cube.getYearLevel().getDimension(); Member member = evaluator.getContext(timeDimension); Level level = member.getLevel().getChildLevel(); return openClosingPeriod(evaluator, this, member, level); } public void testClosingPeriodNoArgs(FoodMartTestCase test) { // MSOLAP returns [1997].[Q4], because [Time].CurrentMember = // [1997]. Member member = test.executeAxis("ClosingPeriod()"); Assert.assertEquals("[Time].[1997].[Q4]", member.getUniqueName()); } }); define(new FunDefBase("ClosingPeriod", "ClosingPeriod([<Level>[, <Member>]])", "Returns the last sibling among the descendants of a member at a level.", "fml") { public Object evaluate(Evaluator evaluator, Exp[] args) { Cube cube = evaluator.getCube(); Dimension timeDimension = cube.getYearLevel().getDimension(); Member member = evaluator.getContext(timeDimension); Level level = getLevelArg(evaluator, args, 0, true); return openClosingPeriod(evaluator, this, member, level); } public void testClosingPeriodLevel(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([Month])"); Assert.assertEquals("[Time].[1997].[Q4].[12]", member.getUniqueName()); } public void testClosingPeriodLevelNotInTimeFails(FoodMartTestCase test) { test.assertAxisThrows( "ClosingPeriod([Store].[Store City])", "member '[Time].[1997]' must be in same hierarchy as level '[Store].[Store City]'"); } }); define(new FunDefBase("ClosingPeriod", "ClosingPeriod([<Level>[, <Member>]])", "Returns the last sibling among the descendants of a member at a level.", "fmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Level level = member.getLevel().getChildLevel(); return openClosingPeriod(evaluator, this, member, level); } public void testClosingPeriodMember(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([USA])"); Assert.assertEquals("WA", member.getName()); } public void testClosingPeriodMemberLeaf(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([Time].[1997].[Q3].[8])"); Assert.assertNull(member); } }); define(new FunDefBase("ClosingPeriod", "ClosingPeriod([<Level>[, <Member>]])", "Returns the last sibling among the descendants of a member at a level.", "fmlm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, true); Member member = getMemberArg(evaluator, args, 1, true); return openClosingPeriod(evaluator, this, member, level); } public void testClosingPeriod(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([Month],[1997])"); Assert.assertEquals("[Time].[1997].[Q4].[12]", member.getUniqueName()); } public void testClosingPeriodBelow(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([Quarter],[1997].[Q3].[8])"); Assert.assertNull(member); } }); define(new FunDefBase("Cousin", "Cousin(<Member1>, <Member2>)", "Returns the member with the same relative position under a member as the member specified.", "fmmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member1 = getMemberArg(evaluator, args, 0, true); Member member2 = getMemberArg(evaluator, args, 1, true); Member cousin = cousin(evaluator.getSchemaReader(), member1, member2); if (cousin == null) { cousin = member1.getHierarchy().getNullMember(); } return cousin; } private Member cousin(SchemaReader schemaReader, Member member1, Member member2) { if (member1.getHierarchy() != member2.getHierarchy()) { throw newEvalException( this, "Members '" + member1 + "' and '" + member2 + "' are not compatible as cousins"); } if (member1.getLevel().getDepth() < member2.getLevel().getDepth()) { return null; } return cousin2(schemaReader, member1, member2); } private Member cousin2(SchemaReader schemaReader, Member member1, Member member2) { if (member1.getLevel() == member2.getLevel()) { return member2; } Member uncle = cousin2(schemaReader, member1.getParentMember(), member2); if (uncle == null) { return null; } int ordinal = Util.getMemberOrdinalInParent(schemaReader, member1); Member[] cousins = schemaReader.getMemberChildren(uncle); if (cousins.length <= ordinal) { return null; } return cousins[ordinal]; } public void testCousin1(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([1997].[Q4],[1998])"); Assert.assertEquals("[Time].[1998].[Q4]", member.getUniqueName()); } public void testCousin2(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([1997].[Q4].[12],[1998].[Q1])"); Assert.assertEquals("[Time].[1998].[Q1].[3]", member.getUniqueName()); } public void testCousinOverrun(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([Customers].[USA].[CA].[San Jose], [Customers].[USA].[OR])"); // CA has more cities than OR Assert.assertNull(member); } public void testCousinThreeDown(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([Customers].[USA].[CA].[Berkeley].[Alma Shelton], [Customers].[Mexico])"); // Alma Shelton is the 3rd child // of the 4th child (Berkeley) // of the 1st child (CA) // of USA Assert.assertEquals("[Customers].[All Customers].[Mexico].[DF].[Tixapan].[Albert Clouse]", member.getUniqueName()); } public void testCousinSameLevel(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([Gender].[M], [Gender].[F])"); Assert.assertEquals("F", member.getName()); } public void testCousinHigherLevel(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([Time].[1997], [Time].[1998].[Q1])"); Assert.assertNull(member); } public void testCousinWrongHierarchy(FoodMartTestCase test) { test.assertAxisThrows( "Cousin([Time].[1997], [Gender].[M])", "Members '[Time].[1997]' and '[Gender].[All Gender].[M]' are not compatible as cousins"); } }); define(new FunDefBase("CurrentMember", "<Dimension>.CurrentMember", "Returns the current member along a dimension during an iteration.", "pmd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = getDimensionArg(evaluator, args, 0, true); return evaluator.getContext(dimension); } public void testCurrentMemberFromSlicer(FoodMartTestCase test) { Result result = test.runQuery( "with member [Measures].[Foo] as '[Gender].CurrentMember.Name'" + nl + "select {[Measures].[Foo]} on columns" + nl + "from Sales where ([Gender].[F])"); Assert.assertEquals("F", result.getCell(new int[] {0}).getValue()); } public void testCurrentMemberFromDefaultMember(FoodMartTestCase test) { Result result = test.runQuery( "with member [Measures].[Foo] as '[Time].CurrentMember.Name'" + nl + "select {[Measures].[Foo]} on columns" + nl + "from Sales"); Assert.assertEquals("1997", result.getCell(new int[] {0}).getValue()); } public void testCurrentMemberFromAxis(FoodMartTestCase test) { Result result = test.runQuery( "with member [Measures].[Foo] as '[Gender].CurrentMember.Name || [Marital Status].CurrentMember.Name'" + nl + "select {[Measures].[Foo]} on columns," + nl + " CrossJoin({[Gender].children}, {[Marital Status].children}) on rows" + nl + "from Sales"); Assert.assertEquals("FM", result.getCell(new int[] {0,0}).getValue()); } /** * When evaluating a calculated member, MSOLAP regards that * calculated member as the current member of that dimension, so it * cycles in this case. But I disagree; it is the previous current * member, before the calculated member was expanded. */ public void testCurrentMemberInCalcMember(FoodMartTestCase test) { Result result = test.runQuery( "with member [Measures].[Foo] as '[Measures].CurrentMember.Name'" + nl + "select {[Measures].[Foo]} on columns" + nl + "from Sales"); Assert.assertEquals("Unit Sales", result.getCell(new int[] {0}).getValue()); } }); define(new FunDefBase("DefaultMember", "<Dimension>.DefaultMember", "Returns the default member of a dimension.", "pmd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = getDimensionArg(evaluator, args, 0, true); return evaluator.getSchemaReader().getHierarchyDefaultMember( dimension.getHierarchy()); } public void testDimensionDefaultMember(FoodMartTestCase test) { Member member = test.executeAxis("[Measures].DefaultMember"); Assert.assertEquals("Unit Sales", member.getName()); } }); define(new FunDefBase("FirstChild", "<Member>.FirstChild", "Returns the first child of a member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member[] children = evaluator.getSchemaReader().getMemberChildren(member); if (children.length == 0) { return member.getHierarchy().getNullMember(); } else { return children[0]; } } public void testFirstChildFirstInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q4].FirstChild"); Assert.assertEquals("10", member.getName()); } public void testFirstChildAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].FirstChild"); Assert.assertEquals("F", member.getName()); } public void testFirstChildOfChildless(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].[F].FirstChild"); Assert.assertNull(member); } }); define(new FunDefBase("FirstSibling", "<Member>.FirstSibling", "Returns the first child of the parent of a member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member parent = member.getParentMember(); Member[] children; if (parent == null) { if (member.isNull()) { return member; } children = evaluator.getSchemaReader().getHierarchyRootMembers(member.getHierarchy()); } else { children = evaluator.getSchemaReader().getMemberChildren(parent); } return children[0]; } public void testFirstSiblingFirstInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].FirstSibling"); Assert.assertEquals("F", member.getName()); } public void testFirstSiblingLastInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q4].FirstSibling"); Assert.assertEquals("Q1", member.getName()); } public void testFirstSiblingAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].FirstSibling"); Assert.assertTrue(member.isAll()); } public void testFirstSiblingRoot(FoodMartTestCase test) { // The [Measures] hierarchy does not have an 'all' member, so // [Unit Sales] does not have a parent. Member member = test.executeAxis( "[Measures].[Store Sales].FirstSibling"); Assert.assertEquals("Unit Sales", member.getName()); } public void testFirstSiblingNull(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].FirstChild.FirstSibling"); Assert.assertNull(member); } }); if (false) define(new FunDefBase("Item", "<Tuple>.Item(<Numeric Expression>)", "Returns a member from a tuple.", "mm*")); define(new FunkResolver( "Lag", "<Member>.Lag(<Numeric Expression>)", "Returns a member further along the specified member's dimension.", new String[]{"mmmn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); int n = getIntArg(evaluator, args, 1); return evaluator.getSchemaReader().getLeadMember(member, -n); } public void testLag(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q4].[12].Lag(4)"); Assert.assertEquals("8", member.getName()); } public void testLagFirstInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].Lag(1)"); Assert.assertNull(member); } public void testLagAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].DefaultMember.Lag(2)"); Assert.assertNull(member); } public void testLagRoot(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1998].Lag(1)"); Assert.assertEquals("1997", member.getName()); } public void testLagRootTooFar(FoodMartTestCase test) { Member member = test.executeAxis("[Time].[1998].Lag(2)"); Assert.assertNull(member); } })); define(new FunDefBase("LastChild", "<Member>.LastChild", "Returns the last child of a member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member[] children = evaluator.getSchemaReader().getMemberChildren(member); if (children.length == 0) { return member.getHierarchy().getNullMember(); } else { return children[children.length - 1]; } } public void testLastChild(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].LastChild"); Assert.assertEquals("M", member.getName()); } public void testLastChildLastInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q4].LastChild"); Assert.assertEquals("12", member.getName()); } public void testLastChildAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].LastChild"); Assert.assertEquals("M", member.getName()); } public void testLastChildOfChildless(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[M].LastChild"); Assert.assertNull(member); } }); define(new FunDefBase("LastSibling", "<Member>.LastSibling", "Returns the last child of the parent of a member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member parent = member.getParentMember(); Member[] children; if (parent == null) { if (member.isNull()) { return member; } children = evaluator.getSchemaReader().getHierarchyRootMembers(member.getHierarchy()); } else { children = evaluator.getSchemaReader().getMemberChildren(parent); } return children[children.length - 1]; } public void testLastSibling(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].LastSibling"); Assert.assertEquals("M", member.getName()); } public void testLastSiblingFirstInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q1].LastSibling"); Assert.assertEquals("Q4", member.getName()); } public void testLastSiblingAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].LastSibling"); Assert.assertTrue(member.isAll()); } public void testLastSiblingRoot(FoodMartTestCase test) { // The [Time] hierarchy does not have an 'all' member, so // [1997], [1998] do not have parents. Member member = test.executeAxis( "[Time].[1998].LastSibling"); Assert.assertEquals("1998", member.getName()); } public void testLastSiblingNull(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].FirstChild.LastSibling"); Assert.assertNull(member); } }); define(new FunkResolver( "Lead", "<Member>.Lead(<Numeric Expression>)", "Returns a member further along the specified member's dimension.", new String[]{"mmmn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); int n = getIntArg(evaluator, args, 1); return evaluator.getSchemaReader().getLeadMember(member, n); } public void testLead(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q2].[4].Lead(4)"); Assert.assertEquals("8", member.getName()); } public void testLeadNegative(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[M].Lead(-1)"); Assert.assertEquals("F", member.getName()); } public void testLeadLastInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[M].Lead(3)"); Assert.assertNull(member); } })); define(new FunDefBase("Members", "Members(<String Expression>)", "Returns the member whose name is specified by a string expression.", "fmS")); define(new FunDefBase( "NextMember", "<Member>.NextMember", "Returns the next member in the level that contains a specified member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return evaluator.getSchemaReader().getLeadMember(member, +1); } public void testBasic2(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].[F].NextMember} ON COLUMNS from Sales"); Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("M")); } public void testFirstInLevel2(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].[M].NextMember} ON COLUMNS from Sales"); Assert.assertTrue(result.getAxes()[0].positions.length == 0); } public void testAll2(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].PrevMember} ON COLUMNS from Sales"); // previous to [Gender].[All] is null, so no members are returned Assert.assertTrue(result.getAxes()[0].positions.length == 0); } }); if (false) define(new FunDefBase("OpeningPeriod", "OpeningPeriod([<Level>[, <Member>]])", "Returns the first sibling among the descendants of a member at a level.", "fm*")); if (false) define(new FunDefBase("ParallelPeriod", "ParallelPeriod([<Level>[, <Numeric Expression>[, <Member>]]])", "Returns a member from a prior period in the same relative position as a specified member.", "fm*")); define(new FunDefBase("Parent", "<Member>.Parent", "Returns the parent of a member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member parent = member.getParentMember(); if (parent == null || !evaluator.getSchemaReader().getRole().canAccess(parent)) { parent = member.getHierarchy().getNullMember(); } return parent; } public void testBasic5(FoodMartTestCase test) { Result result = test.runQuery( "select{ [Product].[All Products].[Drink].Parent} on columns from Sales"); Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("All Products")); } public void testFirstInLevel5(FoodMartTestCase test) { Result result = test.runQuery( "select {[Time].[1997].[Q2].[4].Parent} on columns,{[Gender].[M]} on rows from Sales"); Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("Q2")); } public void testAll5(FoodMartTestCase test) { Result result = test.runQuery( "select {[Time].[1997].[Q2].Parent} on columns,{[Gender].[M]} on rows from Sales"); // previous to [Gender].[All] is null, so no members are returned Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("1997")); } }); define(new FunDefBase("PrevMember", "<Member>.PrevMember", "Returns the previous member in the level that contains a specified member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return evaluator.getSchemaReader().getLeadMember(member, -1); } public void testBasic(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].[M].PrevMember} ON COLUMNS from Sales"); Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("F")); } public void testFirstInLevel(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].[F].PrevMember} ON COLUMNS from Sales"); Assert.assertTrue(result.getAxes()[0].positions.length == 0); } public void testAll(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].PrevMember} ON COLUMNS from Sales"); // previous to [Gender].[All] is null, so no members are returned Assert.assertTrue(result.getAxes()[0].positions.length == 0); } }); if (false) define(new FunDefBase("ValidMeasure", "ValidMeasure(<Tuple>)", "Returns a valid measure in a virtual cube by forcing inapplicable dimensions to their top level.", "fm*")); // // NUMERIC FUNCTIONS define(new FunkResolver("Aggregate", "Aggregate(<Set>[, <Numeric Expression>])", "Returns a calculated value using the appropriate aggregate function, based on the context of the query.", new String[] {"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); Aggregator aggregator = (Aggregator) evaluator.getProperty(Property.PROPERTY_AGGREGATION_TYPE); if (aggregator == null) { throw newEvalException(null, "Could not find an aggregator in the current evaluation context"); } Aggregator rollup = aggregator.getRollup(); if (rollup == null) { throw newEvalException(null, "Don't know how to rollup aggregator '" + aggregator + "'"); } return rollup.aggregate(evaluator.push(), members, exp); } public void testAggregate(FoodMartTestCase test) { test.runQueryCheckResult( "WITH MEMBER [Store].[CA plus OR] AS 'AGGREGATE({[Store].[USA].[CA], [Store].[USA].[OR]})'" + nl + "SELECT {[Measures].[Unit Sales], [Measures].[Store Sales]} ON COLUMNS," + nl + " {[Store].[USA].[CA], [Store].[USA].[OR], [Store].[CA plus OR]} ON ROWS" + nl + "FROM Sales" + nl + "WHERE ([1997].[Q1])", "Axis #0:" + nl + "{[Time].[1997].[Q1]}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "{[Measures].[Store Sales]}" + nl + "Axis #2:" + nl + "{[Store].[All Stores].[USA].[CA]}" + nl + "{[Store].[All Stores].[USA].[OR]}" + nl + "{[Store].[CA plus OR]}" + nl + "Row #0: 16,890" + nl + "Row #0: 36,175.20" + nl + "Row #1: 19,287" + nl + "Row #1: 40,170.29" + nl + "Row #2: 36,177" + nl + "Row #2: 76,345.49" + nl); } public void testAggregate2(FoodMartTestCase test) { test.runQueryCheckResult( "WITH" + nl + " MEMBER [Time].[1st Half Sales] AS 'Aggregate({Time.[1997].[Q1], Time.[1997].[Q2]})'" + nl + " MEMBER [Time].[2nd Half Sales] AS 'Aggregate({Time.[1997].[Q3], Time.[1997].[Q4]})'" + nl + " MEMBER [Time].[Difference] AS 'Time.[2nd Half Sales] - Time.[1st Half Sales]'" + nl + "SELECT" + nl + " { [Store].[Store State].Members} ON COLUMNS," + nl + " { Time.[1st Half Sales], Time.[2nd Half Sales], Time.[Difference]} ON ROWS" + nl + "FROM Sales" + nl + "WHERE [Measures].[Store Sales]", "Axis #0:" + nl + "{[Measures].[Store Sales]}" + nl + "Axis #1:" + nl + "{[Store].[All Stores].[Canada].[BC]}" + nl + "{[Store].[All Stores].[Mexico].[DF]}" + nl + "{[Store].[All Stores].[Mexico].[Guerrero]}" + nl + "{[Store].[All Stores].[Mexico].[Jalisco]}" + nl + "{[Store].[All Stores].[Mexico].[Veracruz]}" + nl + "{[Store].[All Stores].[Mexico].[Yucatan]}" + nl + "{[Store].[All Stores].[Mexico].[Zacatecas]}" + nl + "{[Store].[All Stores].[USA].[CA]}" + nl + "{[Store].[All Stores].[USA].[OR]}" + nl + "{[Store].[All Stores].[USA].[WA]}" + nl + "Axis #2:" + nl + "{[Time].[1st Half Sales]}" + nl + "{[Time].[2nd Half Sales]}" + nl + "{[Time].[Difference]}" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: 74,571.95" + nl + "Row #0: 71,943.17" + nl + "Row #0: 125,779.50" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: 84,595.89" + nl + "Row #1: 70,333.90" + nl + "Row #1: 138,013.72" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: 10,023.94" + nl + "Row #2: -1,609.27" + nl + "Row #2: 12,234.22" + nl); } public void testAggregateToSimulateCompoundSlicer(FoodMartTestCase test) { test.runQueryCheckResult( "WITH MEMBER [Time].[1997 H1] as 'Aggregate({[Time].[1997].[Q1], [Time].[1997].[Q2]})'" + nl + " MEMBER [Education Level].[College or higher] as 'Aggregate({[Education Level].[Bachelors Degree], [Education Level].[Graduate Degree]})'" + nl + "SELECT {[Measures].[Unit Sales], [Measures].[Store Sales]} on columns," + nl + " {[Product].children} on rows" + nl + "FROM [Sales]" + nl + "WHERE ([Time].[1997 H1], [Education Level].[College or higher], [Gender].[F])", "Axis #0:" + nl + "{[Time].[1997 H1], [Education Level].[College or higher], [Gender].[All Gender].[F]}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "{[Measures].[Store Sales]}" + nl + "Axis #2:" + nl + "{[Product].[All Products].[Drink]}" + nl + "{[Product].[All Products].[Food]}" + nl + "{[Product].[All Products].[Non-Consumable]}" + nl + "Row #0: 1,797" + nl + "Row #0: 3,620.49" + nl + "Row #1: 15,002" + nl + "Row #1: 31,931.88" + nl + "Row #2: 3,845" + nl + "Row #2: 8,173.22" + nl); } })); define(new FunkResolver("$AggregateChildren", "$AggregateChildren(<Hierarchy>)", "Equivalent to 'Aggregate(<Hierarchy>.CurrentMember.Children); for internal use.", new String[] {"Inh"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = getHierarchyArg(evaluator, args, 0, true); Member member = evaluator.getParent().getContext(hierarchy.getDimension()); List members = (List) member.getPropertyValue(Property.PROPERTY_CONTRIBUTING_CHILDREN); Aggregator aggregator = (Aggregator) evaluator.getProperty(Property.PROPERTY_AGGREGATION_TYPE); if (aggregator == null) { throw newEvalException(null, "Could not find an aggregator in the current evaluation context"); } Aggregator rollup = aggregator.getRollup(); if (rollup == null) { throw newEvalException(null, "Don't know how to rollup aggregator '" + aggregator + "'"); } return rollup.aggregate(evaluator.push(), members, valueFunCall); } })); define(new FunkResolver( "Avg", "Avg(<Set>[, <Numeric Expression>])", "Returns the average value of a numeric expression evaluated over a set.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return avg(evaluator.push(), members, exp); } public void testAvg(FoodMartTestCase test) { String result = test.executeExpr( "AVG({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("188,412.71", result); } //todo: testAvgWithNulls })); define(new FunkResolver( "Correlation", "Correlation(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Returns the correlation of two series evaluated over a set.", new String[]{"fnxn","fnxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp1 = (ExpBase) getArg(evaluator, args, 1); ExpBase exp2 = (ExpBase) getArg(evaluator, args, 2, valueFunCall); return correlation(evaluator.push(), members, exp1, exp2); } public void testCorrelation(FoodMartTestCase test) { String result = test.executeExpr("Correlation({[Store].[All Stores].[USA].children}, [Measures].[Unit Sales], [Measures].[Store Sales]) * 1000000"); Assert.assertEquals("999,906", result); } })); defineReserved(new String[] {"EXCLUDEEMPTY","INCLUDEEMPTY"}); define(new FunkResolver( "Count", "Count(<Set>[, EXCLUDEEMPTY | INCLUDEEMPTY])", "Returns the number of tuples in a set, empty cells included unless the optional EXCLUDEEMPTY flag is used.", new String[]{"fnx", "fnxy"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); String empties = getLiteralArg(args, 1, "INCLUDEEMPTY", new String[] {"INCLUDEEMPTY", "EXCLUDEEMPTY"}, null); final boolean includeEmpty = empties.equals("INCLUDEEMPTY"); return count(evaluator, members, includeEmpty); } public void testCount(FoodMartTestCase test) { String result = test.executeExpr( "count({[Promotion Media].[Media Type].members})"); Assert.assertEquals("14", result); } public void testCountExcludeEmpty(FoodMartTestCase test) { test.runQueryCheckResult( "with member [Measures].[Promo Count] as " + nl + " ' Count(Crossjoin({[Measures].[Unit Sales]}," + nl + " {[Promotion Media].[Media Type].members}), EXCLUDEEMPTY)'" + nl + "select {[Measures].[Unit Sales], [Measures].[Promo Count]} on columns," + nl + " {[Product].[Drink].[Beverages].[Carbonated Beverages].[Soda].children} on rows" + nl + "from Sales", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "{[Measures].[Promo Count]}" + nl + "Axis #2:" + nl + "{[Product].[All Products].[Drink].[Beverages].[Carbonated Beverages].[Soda].[Excellent]}" + nl + "{[Product].[All Products].[Drink].[Beverages].[Carbonated Beverages].[Soda].[Fabulous]}" + nl + "{[Product].[All Products].[Drink].[Beverages].[Carbonated Beverages].[Soda].[Skinner]}" + nl + "{[Product].[All Products].[Drink].[Beverages].[Carbonated Beverages].[Soda].[Token]}" + nl + "{[Product].[All Products].[Drink].[Beverages].[Carbonated Beverages].[Soda].[Washington]}" + nl + "Row #0: 738" + nl + "Row #0: 14" + nl + "Row #1: 632" + nl + "Row #1: 13" + nl + "Row #2: 655" + nl + "Row #2: 14" + nl + "Row #3: 735" + nl + "Row #3: 14" + nl + "Row #4: 647" + nl + "Row #4: 12" + nl); } //todo: testCountNull, testCountNoExp })); define(new FunkResolver( "Covariance", "Covariance(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Returns the covariance of two series evaluated over a set (biased).", new String[]{"fnxn","fnxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp1 = (ExpBase) getArg(evaluator, args, 1); ExpBase exp2 = (ExpBase) getArg(evaluator, args, 2); return covariance(evaluator.push(), members, exp1, exp2, true); } public void testCovariance(FoodMartTestCase test) { String result = test.executeExpr("Covariance({[Store].[All Stores].[USA].children}, [Measures].[Unit Sales], [Measures].[Store Sales])"); Assert.assertEquals("1,355,761,899", result); } })); define(new FunkResolver( "CovarianceN", "CovarianceN(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Returns the covariance of two series evaluated over a set (unbiased).", new String[]{"fnxn","fnxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp1 = (ExpBase) getArg(evaluator, args, 1); ExpBase exp2 = (ExpBase) getArg(evaluator, args, 2, valueFunCall); return covariance(evaluator.push(), members, exp1, exp2, false); } public void testCovarianceN(FoodMartTestCase test) { String result = test.executeExpr("CovarianceN({[Store].[All Stores].[USA].children}, [Measures].[Unit Sales], [Measures].[Store Sales])"); Assert.assertEquals("2,033,642,849", result); } })); define(new FunDefBase("IIf", "IIf(<Logical Expression>, <Numeric Expression1>, <Numeric Expression2>)", "Returns one of two numeric values determined by a logical test.", "fnbnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { boolean logical = getBooleanArg(evaluator, args, 0); return getDoubleArg(evaluator, args, logical ? 1 : 2); } public void testIIfNumeric(FoodMartTestCase test) { String s = test.executeExpr( "IIf(([Measures].[Unit Sales],[Product].[Drink].[Alcoholic Beverages].[Beer and Wine]) > 100, 45, 32)"); Assert.assertEquals("45", s); } }); if (false) define(new FunDefBase("LinRegIntercept", "LinRegIntercept(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Calculates the linear regression of a set and returns the value of b in the regression line y = ax + b.", "fn*")); if (false) define(new FunDefBase("LinRegPoint", "LinRegPoint(<Numeric Expression>, <Set>, <Numeric Expression>[, <Numeric Expression>])", "Calculates the linear regression of a set and returns the value of y in the regression line y = ax + b.", "fn*")); if (false) define(new FunDefBase("LinRegR2", "LinRegR2(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Calculates the linear regression of a set and returns R2 (the coefficient of determination).", "fn*")); if (false) define(new FunDefBase("LinRegSlope", "LinRegSlope(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Calculates the linear regression of a set and returns the value of a in the regression line y = ax + b.", "fn*")); if (false) define(new FunDefBase("LinRegVariance", "LinRegVariance(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Calculates the linear regression of a set and returns the variance associated with the regression line y = ax + b.", "fn*")); define(new FunkResolver( "Max", "Max(<Set>[, <Numeric Expression>])", "Returns the maximum value of a numeric expression evaluated over a set.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return max(evaluator.push(), members, exp); } public void testMax(FoodMartTestCase test) { String result = test.executeExpr( "MAX({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("263,793.22", result); } })); define(new FunkResolver( "Median", "Median(<Set>[, <Numeric Expression>])", "Returns the median value of a numeric expression evaluated over a set.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); //todo: ignore nulls, do we need to ignore the List? return median(evaluator.push(), members, exp); } public void testMedian(FoodMartTestCase test) { String result = test.executeExpr( "MEDIAN({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("159,167.84", result); } public void testMedian2(FoodMartTestCase test) { test.runQueryCheckResult( "WITH" + nl + " MEMBER [Time].[1st Half Sales] AS 'Sum({[Time].[1997].[Q1], [Time].[1997].[Q2]})'" + nl + " MEMBER [Time].[2nd Half Sales] AS 'Sum({[Time].[1997].[Q3], [Time].[1997].[Q4]})'" + nl + " MEMBER [Time].[Median] AS 'Median(Time.Members)'" + nl + "SELECT" + nl + " NON EMPTY { [Store].[Store Name].Members} ON COLUMNS," + nl + " { [Time].[1st Half Sales], [Time].[2nd Half Sales], [Time].[Median]} ON ROWS" + nl + "FROM Sales" + nl + "WHERE [Measures].[Store Sales]", "Axis #0:" + nl + "{[Measures].[Store Sales]}" + nl + "Axis #1:" + nl + "{[Store].[All Stores].[USA].[CA].[Beverly Hills].[Store 6]}" + nl + "{[Store].[All Stores].[USA].[CA].[Los Angeles].[Store 7]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Diego].[Store 24]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Francisco].[Store 14]}" + nl + "{[Store].[All Stores].[USA].[OR].[Portland].[Store 11]}" + nl + "{[Store].[All Stores].[USA].[OR].[Salem].[Store 13]}" + nl + "{[Store].[All Stores].[USA].[WA].[Bellingham].[Store 2]}" + nl + "{[Store].[All Stores].[USA].[WA].[Bremerton].[Store 3]}" + nl + "{[Store].[All Stores].[USA].[WA].[Seattle].[Store 15]}" + nl + "{[Store].[All Stores].[USA].[WA].[Spokane].[Store 16]}" + nl + "{[Store].[All Stores].[USA].[WA].[Tacoma].[Store 17]}" + nl + "{[Store].[All Stores].[USA].[WA].[Walla Walla].[Store 22]}" + nl + "{[Store].[All Stores].[USA].[WA].[Yakima].[Store 23]}" + nl + "Axis #2:" + nl + "{[Time].[1st Half Sales]}" + nl + "{[Time].[2nd Half Sales]}" + nl + "{[Time].[Median]}" + nl + "Row #0: 20,801.04" + nl + "Row #0: 25,421.41" + nl + "Row #0: 26,275.11" + nl + "Row #0: 2,074.39" + nl + "Row #0: 28,519.18" + nl + "Row #0: 43,423.99" + nl + "Row #0: 2,140.99" + nl + "Row #0: 25,502.08" + nl + "Row #0: 25,293.50" + nl + "Row #0: 23,265.53" + nl + "Row #0: 34,926.91" + nl + "Row #0: 2,159.60" + nl + "Row #0: 12,490.89" + nl + "Row #1: 24,949.20" + nl + "Row #1: 29,123.87" + nl + "Row #1: 28,156.03" + nl + "Row #1: 2,366.79" + nl + "Row #1: 26,539.61" + nl + "Row #1: 43,794.29" + nl + "Row #1: 2,598.24" + nl + "Row #1: 27,394.22" + nl + "Row #1: 27,350.57" + nl + "Row #1: 26,368.93" + nl + "Row #1: 39,917.05" + nl + "Row #1: 2,546.37" + nl + "Row #1: 11,838.34" + nl + "Row #2: 4,577.35" + nl + "Row #2: 5,211.38" + nl + "Row #2: 4,722.87" + nl + "Row #2: 398.24" + nl + "Row #2: 5,039.50" + nl + "Row #2: 7,374.59" + nl + "Row #2: 410.22" + nl + "Row #2: 4,924.04" + nl + "Row #2: 4,569.13" + nl + "Row #2: 4,511.68" + nl + "Row #2: 6,630.91" + nl + "Row #2: 419.51" + nl + "Row #2: 2,169.48" + nl); } })); define(new FunkResolver( "Min", "Min(<Set>[, <Numeric Expression>])", "Returns the minimum value of a numeric expression evaluated over a set.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return min(evaluator.push(), members, exp); } public void testMin(FoodMartTestCase test) { String result = test.executeExpr( "MIN({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("142,277.07", result); } })); define(new FunDefBase("Ordinal", "<Level>.Ordinal", "Returns the zero-based ordinal value associated with a level.", "pnl")); if (false) define(new FunDefBase("Rank", "Rank(<Tuple>, <Set>)", "Returns the one-based rank of a tuple in a set.", "fn*")); define(new FunkResolver( "Stddev", "Stddev(<Set>[, <Numeric Expression>])", "Alias for Stdev.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return stdev(evaluator.push(), members, exp, false); } })); define(new FunkResolver( "Stdev", "Stdev(<Set>[, <Numeric Expression>])", "Returns the standard deviation of a numeric expression evaluated over a set (unbiased).", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return stdev(evaluator.push(), members, exp, false); } public void testStdev(FoodMartTestCase test) { String result = test.executeExpr( "STDEV({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("65,825.45", result); } })); define(new FunkResolver( "StddevP", "StddevP(<Set>[, <Numeric Expression>])", "Alias for StdevP.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return stdev(evaluator.push(), members, exp, true); } })); define(new FunkResolver( "StdevP", "StdevP(<Set>[, <Numeric Expression>])", "Returns the standard deviation of a numeric expression evaluated over a set (biased).", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return stdev(evaluator.push(), members, exp, true); } public void testStdevP(FoodMartTestCase test) { String result = test.executeExpr( "STDEVP({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("53,746.26", result); } })); define(new FunkResolver( "Sum", "Sum(<Set>[, <Numeric Expression>])", "Returns the sum of a numeric expression evaluated over a set.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return sum(evaluator.push(), members, exp); } public void testSumNoExp(FoodMartTestCase test) { String result = test.executeExpr( "SUM({[Promotion Media].[Media Type].members})"); Assert.assertEquals("266,773", result); } })); define(new FunDefBase("Value", "<Measure>.Value", "Returns the value of a measure.", "pnm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.evaluateScalar(evaluator); } }); define(new FunDefBase("_Value", "_Value(<Tuple>)", "Returns the value of the current measure within the context of a tuple.", "fnt") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member[] members = getTupleArg(evaluator, args, 0); Evaluator evaluator2 = evaluator.push(members); return evaluator2.evaluateCurrent(); } }); define(new FunDefBase("_Value", "_Value()", "Returns the value of the current measure.", "fn") { public Object evaluate(Evaluator evaluator, Exp[] args) { return evaluator.evaluateCurrent(); } }); // _Value is a pseudo-function which evaluates a tuple to a number. // It needs a custom resolver. if (false) define(new ResolverBase("_Value", null, null, Syntax.Parentheses) { public FunDef resolve(Exp[] args, int[] conversionCount) { if (args.length == 1 && args[0].getType() == Category.Tuple) { return new ValueFunDef(new int[] {Category.Tuple}); } for (int i = 0; i < args.length; i++) { Exp arg = args[i]; if (!canConvert(arg, Category.Member, conversionCount)) { return null; } } int[] argTypes = new int[args.length]; for (int i = 0; i < argTypes.length; i++) { argTypes[i] = Category.Member; } return new ValueFunDef(argTypes); } }); define(new FunkResolver( "Var", "Var(<Set>[, <Numeric Expression>])", "Returns the variance of a numeric expression evaluated over a set (unbiased).", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return var(evaluator.push(), members, exp, false); } public void testVar(FoodMartTestCase test) { String result = test.executeExpr( "VAR({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("4,332,990,493.69", result); } })); define(new FunkResolver( "Variance", "Variance(<Set>[, <Numeric Expression>])", "Alias for Var.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return var(evaluator.push(), members, exp, false); } })); define(new FunkResolver( "VarianceP", "VarianceP(<Set>[, <Numeric Expression>])", "Alias for VarP.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return var(evaluator.push(), members, exp, true); } })); define(new FunkResolver( "VarP", "VarP(<Set>[, <Numeric Expression>])", "Returns the variance of a numeric expression evaluated over a set (biased).", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return var(evaluator.push(), members, exp, true); } public void testVarP(FoodMartTestCase test) { String result = test.executeExpr( "VARP({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("2,888,660,329.13", result); } })); // // SET FUNCTIONS if (false) define(new FunDefBase("AddCalculatedMembers", "AddCalculatedMembers(<Set>)", "Adds calculated members to a set.", "fx*")); define(new FunDefBase("Ascendants", "Ascendants(<Member>)", "Returns the set of the ascendants of a specified member.", "fxm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, false); if (member.isNull()) { return new ArrayList(); } Member[] members = member.getAncestorMembers(); final ArrayList result = new ArrayList(members.length + 1); result.add(member); addAll(result, members); return result; } public void testAscendants(FoodMartTestCase test) { test.assertAxisReturns( "Ascendants([Store].[USA].[CA])", "[Store].[All Stores].[USA].[CA]" + nl + "[Store].[All Stores].[USA]" + nl + "[Store].[All Stores]"); } public void testAscendantsAll(FoodMartTestCase test) { test.assertAxisReturns( "Ascendants([Store].DefaultMember)", "[Store].[All Stores]"); } public void testAscendantsNull(FoodMartTestCase test) { test.assertAxisReturns( "Ascendants([Gender].[F].PrevMember)", ""); } }); define(new FunkResolver( "BottomCount", "BottomCount(<Set>, <Count>[, <Numeric Expression>])", "Returns a specified number of items from the bottom of a set, optionally ordering the set first.", new String[]{"fxxnn", "fxxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List list = (List) getArg(evaluator, args, 0); int n = getIntArg(evaluator, args, 1); ExpBase exp = (ExpBase) getArg(evaluator, args, 2, null); if (exp != null) { boolean desc = false, brk = true; sort(evaluator, list, exp, desc, brk); } if (n < list.size()) { list = list.subList(0, n); } return list; } public void testBottomCount(FoodMartTestCase test) { test.assertAxisReturns("BottomCount({[Promotion Media].[Media Type].members}, 2, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[Radio]" + nl + "[Promotion Media].[All Media].[Sunday Paper, Radio, TV]"); } //todo: test unordered })); define(new FunkResolver( "BottomPercent", "BottomPercent(<Set>, <Percentage>, <Numeric Expression>)", "Sorts a set and returns the bottom N elements whose cumulative total is at least a specified percentage.", new String[]{"fxxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 2); Double n = getDoubleArg(evaluator, args, 1); return topOrBottom(evaluator.push(), members, exp, false, true, n.doubleValue()); } public void testBottomPercent(FoodMartTestCase test) { test.assertAxisReturns("BottomPercent({[Promotion Media].[Media Type].members}, 1, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[Radio]" + nl + "[Promotion Media].[All Media].[Sunday Paper, Radio, TV]"); } //todo: test precision })); define(new FunkResolver( "BottomSum", "BottomSum(<Set>, <Value>, <Numeric Expression>)", "Sorts a set and returns the bottom N elements whose cumulative total is at least a specified value.", new String[]{"fxxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 2); Double n = getDoubleArg(evaluator, args, 1); return topOrBottom(evaluator.push(), members, exp, false, false, n.doubleValue()); } public void testBottomSum(FoodMartTestCase test) { test.assertAxisReturns("BottomSum({[Promotion Media].[Media Type].members}, 5000, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[Radio]" + nl + "[Promotion Media].[All Media].[Sunday Paper, Radio, TV]"); } })); define(new FunDefBase("Children", "<Member>.Children", "Returns the children of a member.", "pxm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member[] children = evaluator.getSchemaReader().getMemberChildren(member); return Arrays.asList(children); } }); define(new MultiResolver( "Crossjoin", "Crossjoin(<Set1>, <Set2>)", "Returns the cross product of two sets.", new String[]{"fxxx"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { return new CrossJoinFunDef(dummyFunDef); } public void testCrossjoinNested(FoodMartTestCase test) { test.assertAxisReturns( " CrossJoin(" + nl + " CrossJoin(" + nl + " [Gender].members," + nl + " [Marital Status].members)," + nl + " {[Store], [Store].children})", "{[Gender].[All Gender], [Marital Status].[All Marital Status], [Store].[All Stores]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[M], [Store].[All Stores]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[S], [Store].[All Stores]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[USA]}"); } public void testCrossjoinSingletonTuples(FoodMartTestCase test) { test.assertAxisReturns("CrossJoin({([Gender].[M])}, {([Marital Status].[S])})", "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S]}"); } public void testCrossjoinSingletonTuplesNested(FoodMartTestCase test) { test.assertAxisReturns("CrossJoin({([Gender].[M])}, CrossJoin({([Marital Status].[S])}, [Store].children))", "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[USA]}"); } }); define(new MultiResolver( "*", "<Set1> * <Set2>", "Returns the cross product of two sets.", new String[]{"ixxx", "ixmx", "ixxm", "ixmm"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { return new CrossJoinFunDef(dummyFunDef); } public void testCrossjoinAsterisk(FoodMartTestCase test) { test.assertAxisReturns("{[Gender].[M]} * {[Marital Status].[S]}", "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S]}"); } public void testCrossjoinAsteriskAssoc(FoodMartTestCase test) { test.assertAxisReturns("Order({[Gender].Children} * {[Marital Status].Children} * {[Time].[1997].[Q2].Children}," + "[Measures].[Unit Sales])", "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[4]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[6]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[5]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[4]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[5]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[6]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[4]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[5]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[6]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[6]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[4]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[5]}"); } public void testCrossjoinAsteriskInsideBraces(FoodMartTestCase test) { test.assertAxisReturns("{[Gender].[M] * [Marital Status].[S] * [Time].[1997].[Q2].Children}", "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[4]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[5]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[6]}"); } public void testCrossJoinAsteriskQuery(FoodMartTestCase test) { test.runQueryCheckResult( "SELECT {[Measures].members * [1997].children} ON COLUMNS," + nl + " {[Store].[USA].children * [Position].[All Position].children} DIMENSION PROPERTIES [Store].[Store SQFT] ON ROWS" + nl + "FROM [HR]", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Org Salary], [Time].[1997].[Q1]}" + nl + "{[Measures].[Org Salary], [Time].[1997].[Q2]}" + nl + "{[Measures].[Org Salary], [Time].[1997].[Q3]}" + nl + "{[Measures].[Org Salary], [Time].[1997].[Q4]}" + nl + "{[Measures].[Count], [Time].[1997].[Q1]}" + nl + "{[Measures].[Count], [Time].[1997].[Q2]}" + nl + "{[Measures].[Count], [Time].[1997].[Q3]}" + nl + "{[Measures].[Count], [Time].[1997].[Q4]}" + nl + "{[Measures].[Number of Employees], [Time].[1997].[Q1]}" + nl + "{[Measures].[Number of Employees], [Time].[1997].[Q2]}" + nl + "{[Measures].[Number of Employees], [Time].[1997].[Q3]}" + nl + "{[Measures].[Number of Employees], [Time].[1997].[Q4]}" + nl + "Axis #2:" + nl + "{[Store].[All Stores].[USA].[CA], [Position].[All Position].[Middle Management]}" + nl + "{[Store].[All Stores].[USA].[CA], [Position].[All Position].[Senior Management]}" + nl + "{[Store].[All Stores].[USA].[CA], [Position].[All Position].[Store Full Time Staf]}" + nl + "{[Store].[All Stores].[USA].[CA], [Position].[All Position].[Store Management]}" + nl + "{[Store].[All Stores].[USA].[CA], [Position].[All Position].[Store Temp Staff]}" + nl + "{[Store].[All Stores].[USA].[OR], [Position].[All Position].[Middle Management]}" + nl + "{[Store].[All Stores].[USA].[OR], [Position].[All Position].[Senior Management]}" + nl + "{[Store].[All Stores].[USA].[OR], [Position].[All Position].[Store Full Time Staf]}" + nl + "{[Store].[All Stores].[USA].[OR], [Position].[All Position].[Store Management]}" + nl + "{[Store].[All Stores].[USA].[OR], [Position].[All Position].[Store Temp Staff]}" + nl + "{[Store].[All Stores].[USA].[WA], [Position].[All Position].[Middle Management]}" + nl + "{[Store].[All Stores].[USA].[WA], [Position].[All Position].[Senior Management]}" + nl + "{[Store].[All Stores].[USA].[WA], [Position].[All Position].[Store Full Time Staf]}" + nl + "{[Store].[All Stores].[USA].[WA], [Position].[All Position].[Store Management]}" + nl + "{[Store].[All Stores].[USA].[WA], [Position].[All Position].[Store Temp Staff]}" + nl + "Row #0: $275.40" + nl + "Row #0: $275.40" + nl + "Row #0: $275.40" + nl + "Row #0: $275.40" + nl + "Row #0: 27" + nl + "Row #0: 27" + nl + "Row #0: 27" + nl + "Row #0: 27" + nl + "Row #0: 9" + nl + "Row #0: 9" + nl + "Row #0: 9" + nl + "Row #0: 9" + nl + "Row #1: $837.00" + nl + "Row #1: $837.00" + nl + "Row #1: $837.00" + nl + "Row #1: $837.00" + nl + "Row #1: 24" + nl + "Row #1: 24" + nl + "Row #1: 24" + nl + "Row #1: 24" + nl + "Row #1: 8" + nl + "Row #1: 8" + nl + "Row #1: 8" + nl + "Row #1: 8" + nl + "Row #2: $1,728.45" + nl + "Row #2: $1,727.02" + nl + "Row #2: $1,727.72" + nl + "Row #2: $1,726.55" + nl + "Row #2: 357" + nl + "Row #2: 357" + nl + "Row #2: 357" + nl + "Row #2: 357" + nl + "Row #2: 119" + nl + "Row #2: 119" + nl + "Row #2: 119" + nl + "Row #2: 119" + nl + "Row #3: $473.04" + nl + "Row #3: $473.04" + nl + "Row #3: $473.04" + nl + "Row #3: $473.04" + nl + "Row #3: 51" + nl + "Row #3: 51" + nl + "Row #3: 51" + nl + "Row #3: 51" + nl + "Row #3: 17" + nl + "Row #3: 17" + nl + "Row #3: 17" + nl + "Row #3: 17" + nl + "Row #4: $401.35" + nl + "Row #4: $405.73" + nl + "Row #4: $400.61" + nl + "Row #4: $402.31" + nl + "Row #4: 120" + nl + "Row #4: 120" + nl + "Row #4: 120" + nl + "Row #4: 120" + nl + "Row #4: 40" + nl + "Row #4: 40" + nl + "Row #4: 40" + nl + "Row #4: 40" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #7: $1,343.62" + nl + "Row #7: $1,342.61" + nl + "Row #7: $1,342.57" + nl + "Row #7: $1,343.65" + nl + "Row #7: 279" + nl + "Row #7: 279" + nl + "Row #7: 279" + nl + "Row #7: 279" + nl + "Row #7: 93" + nl + "Row #7: 93" + nl + "Row #7: 93" + nl + "Row #7: 93" + nl + "Row #8: $286.74" + nl + "Row #8: $286.74" + nl + "Row #8: $286.74" + nl + "Row #8: $286.74" + nl + "Row #8: 30" + nl + "Row #8: 30" + nl + "Row #8: 30" + nl + "Row #8: 30" + nl + "Row #8: 10" + nl + "Row #8: 10" + nl + "Row #8: 10" + nl + "Row #8: 10" + nl + "Row #9: $333.20" + nl + "Row #9: $332.65" + nl + "Row #9: $331.28" + nl + "Row #9: $332.43" + nl + "Row #9: 99" + nl + "Row #9: 99" + nl + "Row #9: 99" + nl + "Row #9: 99" + nl + "Row #9: 33" + nl + "Row #9: 33" + nl + "Row #9: 33" + nl + "Row #9: 33" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #12: $2,768.60" + nl + "Row #12: $2,769.18" + nl + "Row #12: $2,766.78" + nl + "Row #12: $2,769.50" + nl + "Row #12: 579" + nl + "Row #12: 579" + nl + "Row #12: 579" + nl + "Row #12: 579" + nl + "Row #12: 193" + nl + "Row #12: 193" + nl + "Row #12: 193" + nl + "Row #12: 193" + nl + "Row #13: $736.29" + nl + "Row #13: $736.29" + nl + "Row #13: $736.29" + nl + "Row #13: $736.29" + nl + "Row #13: 81" + nl + "Row #13: 81" + nl + "Row #13: 81" + nl + "Row #13: 81" + nl + "Row #13: 27" + nl + "Row #13: 27" + nl + "Row #13: 27" + nl + "Row #13: 27" + nl + "Row #14: $674.70" + nl + "Row #14: $674.54" + nl + "Row #14: $676.25" + nl + "Row #14: $676.48" + nl + "Row #14: 201" + nl + "Row #14: 201" + nl + "Row #14: 201" + nl + "Row #14: 201" + nl + "Row #14: 67" + nl + "Row #14: 67" + nl + "Row #14: 67" + nl + "Row #14: 67" + nl); } }); defineReserved(DescendantsFlags.instance); define(new MultiResolver( "Descendants", "Descendants(<Member>[, <Level>[, <Desc_flag>]])", "Returns the set of descendants of a member at a specified level, optionally including or excluding descendants in other levels.", new String[]{"fxm", "fxml", "fxmly", "fxmn", "fxmny"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { int depthLimit = -1; // unlimited boolean depthSpecified = false; int flag = DescendantsFlags.SELF; if (args.length == 1) { depthLimit = -1; flag = DescendantsFlags.SELF_BEFORE_AFTER; } if (args.length >= 2) { if (args[1] instanceof Literal) { Literal literal = (Literal) args[1]; if (literal.getValue() instanceof Number) { Number number = (Number) literal.getValue(); depthLimit = number.intValue(); depthSpecified = true; } } } if (args.length >= 3) { flag = getLiteralArg(args, 2, DescendantsFlags.SELF, DescendantsFlags.instance, dummyFunDef); } final int depthLimitFinal = depthLimit < 0 ? Integer.MAX_VALUE : depthLimit; final int flagFinal = flag; final boolean depthSpecifiedFinal = depthSpecified; return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Level level; if (depthSpecifiedFinal) { level = null; } else if (args.length > 1) { level = getLevelArg(evaluator, args, 1, true); } else { level = member.getLevel(); } // Expand member to its children, until we get to the right // level. We assume that all children are in the same // level. final SchemaReader schemaReader = evaluator.getSchemaReader(); Member[] children = {member}; int depth = 0; List result = new ArrayList(); while (true) { final int currentDepth; final int targetDepth; if (level == null) { currentDepth = depth++; targetDepth = depthLimitFinal; } else { final Member firstChild = children[0]; currentDepth = firstChild.getLevel().getDepth(); targetDepth = level.getDepth(); } if (currentDepth == targetDepth) { if ((flagFinal & DescendantsFlags.SELF) == DescendantsFlags.SELF) { Util.addAll(result, children); } if ((flagFinal & DescendantsFlags.AFTER) != DescendantsFlags.AFTER) { break; // no more results after this level } } else if (currentDepth < targetDepth) { if ((flagFinal & DescendantsFlags.BEFORE) == DescendantsFlags.BEFORE) { Util.addAll(result, children); } } else { if ((flagFinal & DescendantsFlags.AFTER) == DescendantsFlags.AFTER) { Util.addAll(result, children); } else { break; // no more results after this level } } children = schemaReader.getMemberChildren(children); if (children.length == 0) { break; } } return result; } }; } public void testDescendantsM(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997].[Q1])", "[Time].[1997].[Q1]" + nl + "[Time].[1997].[Q1].[1]" + nl + "[Time].[1997].[Q1].[2]" + nl + "[Time].[1997].[Q1].[3]"); } public void testDescendantsML(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Month])", months); } public void testDescendantsMLSelf(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], SELF)", quarters); } public void testDescendantsMLSelfBefore(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], SELF_AND_BEFORE)", year1997 + nl + quarters); } public void testDescendantsMLSelfBeforeAfter(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], SELF_BEFORE_AFTER)", year1997 + nl + quarters + nl + months); } public void testDescendantsMLBefore(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], BEFORE)", year1997); } public void testDescendantsMLBeforeAfter(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], BEFORE_AND_AFTER)", year1997 + nl + months); } public void testDescendantsMLAfter(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], AFTER)", months); } public void testDescendantsMLAfterEnd(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Month], AFTER)", ""); } public void _testDescendantsMLLeaves(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Month], LEAVES)", "foo"); } public void testDescendantsM0(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], 0)", year1997); } public void testDescendantsM2(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], 2)", months); } public void testDescendantsMNY(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], 1, BEFORE_AND_AFTER)", year1997 + nl + months); } public void testDescendantsParentChild(FoodMartTestCase test) { test.assertAxisReturns("HR", "Descendants([Employees], 2)", "[Employees].[All Employees].[Sheri Nowmer].[Derrick Whelply]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Michael Spence]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Maya Gutierrez]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Roberta Damstra]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Rebecca Kanagaki]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Darren Stanz]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Donna Arnold]"); } public void testDescendantsParentChildBefore(FoodMartTestCase test) { test.assertAxisReturns("HR", "Descendants([Employees], 2, BEFORE)", "[Employees].[All Employees]" + nl + "[Employees].[All Employees].[Sheri Nowmer]"); } }); if (false) define(new FunDefBase("Distinct", "Distinct(<Set>)", "Eliminates duplicate tuples from a set.", "fxx")); define(new FunkResolver("DrilldownLevel", "DrilldownLevel(<Set>[, <Level>]) or DrilldownLevel(<Set>, , <Index>)", "Drills down the members of a set, at a specified level, to one level below. Alternatively, drills down on a specified dimension in the set.", new String[]{"fxx", "fxxl"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { //todo add fssl functionality List set0 = (List) getArg(evaluator, args, 0); int[] depthArray = new int[set0.size()]; List drilledSet = new ArrayList(); for (int i = 0, m = set0.size(); i < m; i++) { Member member = (Member) set0.get(i); depthArray[i] = member.getLevel().getDepth(); // Object o0 = set0.get(i); // depthList.addElement(new Object[] {o0}); } Arrays.sort(depthArray); int maxDepth = depthArray[depthArray.length - 1]; for (int i = 0, m = set0.size(); i < m; i++) { Member member = (Member) set0.get(i); drilledSet.add(member); if (member.getLevel().getDepth() == maxDepth) { Member[] childMembers = evaluator.getSchemaReader().getMemberChildren(member); for (int j = 0; j < childMembers.length; j++) { drilledSet.add(childMembers[j]); } } } return drilledSet; } } )); if (false) define(new FunDefBase("DrilldownLevelBottom", "DrilldownLevelBottom(<Set>, <Count>[, [<Level>][, <Numeric Expression>]])", "Drills down the bottom N members of a set, at a specified level, to one level below.", "fx*")); if (false) define(new FunDefBase("DrilldownLevelTop", "DrilldownLevelTop(<Set>, <Count>[, [<Level>][, <Numeric Expression>]])", "Drills down the top N members of a set, at a specified level, to one level below.", "fx*")); if (false) define(new FunDefBase("DrilldownMember", "DrilldownMember(<Set1>, <Set2>[, RECURSIVE])", "Drills down the members in a set that are present in a second specified set.", "fx*")); if (false) define(new FunDefBase("DrilldownMemberBottom", "DrilldownMemberBottom(<Set1>, <Set2>, <Count>[, [<Numeric Expression>][, RECURSIVE]])", "Like DrilldownMember except that it includes only the bottom N children.", "fx*")); if (false) define(new FunDefBase("DrilldownMemberTop", "DrilldownMemberTop(<Set1>, <Set2>, <Count>[, [<Numeric Expression>][, RECURSIVE]])", "Like DrilldownMember except that it includes only the top N children.", "fx*")); if (false) define(new FunDefBase("DrillupLevel", "DrillupLevel(<Set>[, <Level>])", "Drills up the members of a set that are below a specified level.", "fx*")); if (false) define(new FunDefBase("DrillupMember", "DrillupMember(<Set1>, <Set2>)", "Drills up the members in a set that are present in a second specified set.", "fx*")); define(new FunkResolver( "Except", "Except(<Set1>, <Set2>[, ALL])", "Finds the difference between two sets, optionally retaining duplicates.", new String[]{"fxxx", "fxxxs"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { // todo: implement ALL HashSet set = new HashSet(); set.addAll((List) getArg(evaluator, args, 1)); List set1 = (List) getArg(evaluator, args, 0); List result = new ArrayList(); for (int i = 0, count = set1.size(); i < count; i++) { Object o = set1.get(i); if (!set.contains(o)) { result.add(o); } } return result; } })); if (false) define(new FunDefBase("Extract", "Extract(<Set>, <Dimension>[, <Dimension>...])", "Returns a set of tuples from extracted dimension elements. The opposite of Crossjoin.", "fx*")); define(new FunDefBase("Filter", "Filter(<Set>, <Search Condition>)", "Returns the set resulting from filtering a set based on a search condition.", "fxxb") { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); Exp exp = args[1]; List result = new ArrayList(); Evaluator evaluator2 = evaluator.push(); for (int i = 0, count = members.size(); i < count; i++) { Object o = members.get(i); if (o instanceof Member) { evaluator2.setContext((Member) o); } else if (o instanceof Member[]) { evaluator2.setContext((Member[]) o); } else { throw Util.newInternal( "unexpected type in set: " + o.getClass()); } Boolean b = (Boolean) exp.evaluateScalar(evaluator2); if (b.booleanValue()) { result.add(o); } } return result; } /** * Make sure that slicer is in force when expression is applied * on axis, E.g. select filter([Customers].members, [Unit Sales] > 100) * from sales where ([Time].[1998]) **/ public void testFilterWithSlicer(FoodMartTestCase test) { Result result = test.execute( "select {[Measures].[Unit Sales]} on columns," + nl + " filter([Customers].[USA].children," + nl + " [Measures].[Unit Sales] > 20000) on rows" + nl + "from Sales" + nl + "where ([Time].[1997].[Q1])"); Axis rows = result.getAxes()[1]; // if slicer were ignored, there would be 3 rows Assert.assertEquals(1, rows.positions.length); Cell cell = result.getCell(new int[] {0,0}); Assert.assertEquals("30,114", cell.getFormattedValue()); } public void testFilterCompound(FoodMartTestCase test) { Result result = test.execute( "select {[Measures].[Unit Sales]} on columns," + nl + " Filter(" + nl + " CrossJoin(" + nl + " [Gender].Children," + nl + " [Customers].[USA].Children)," + nl + " [Measures].[Unit Sales] > 9500) on rows" + nl + "from Sales" + nl + "where ([Time].[1997].[Q1])"); Position[] rows = result.getAxes()[1].positions; Assert.assertTrue(rows.length == 3); Assert.assertEquals("F", rows[0].members[0].getName()); Assert.assertEquals("WA", rows[0].members[1].getName()); Assert.assertEquals("M", rows[1].members[0].getName()); Assert.assertEquals("OR", rows[1].members[1].getName()); Assert.assertEquals("M", rows[2].members[0].getName()); Assert.assertEquals("WA", rows[2].members[1].getName()); } }); define(new MultiResolver( "Generate", "Generate(<Set1>, <Set2>[, ALL])", "Applies a set to each member of another set and joins the resulting sets by union.", new String[] {"fxxx", "fxxxy"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { final boolean all = getLiteralArg(args, 2, "", new String[] {"ALL"}, dummyFunDef).equalsIgnoreCase("ALL"); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); List result = new ArrayList(); HashSet emitted = all ? null : new HashSet(); for (int i = 0; i < members.size(); i++) { Object o = members.get(i); if (o instanceof Member) { evaluator.setContext((Member) o); } else { evaluator.setContext((Member[]) o); } final List result2 = (List) args[1].evaluate(evaluator); if (all) { result.addAll(result2); } else { for (int j = 0; j < result2.size(); j++) { Object row = result2.get(j); if (emitted.add(row)) { result.add(row); } } } } return result; } }; } public void testGenerate(FoodMartTestCase test) { test.assertAxisReturns( "Generate({[Store].[USA], [Store].[USA].[CA]}, {[Store].CurrentMember.Children})", "[Store].[All Stores].[USA].[CA]" + nl + "[Store].[All Stores].[USA].[OR]" + nl + "[Store].[All Stores].[USA].[WA]" + nl + "[Store].[All Stores].[USA].[CA].[Alameda]" + nl + "[Store].[All Stores].[USA].[CA].[Beverly Hills]" + nl + "[Store].[All Stores].[USA].[CA].[Los Angeles]" + nl + "[Store].[All Stores].[USA].[CA].[San Diego]" + nl + "[Store].[All Stores].[USA].[CA].[San Francisco]"); } public void testGenerateAll(FoodMartTestCase test) { test.assertAxisReturns( "Generate({[Store].[USA].[CA], [Store].[USA].[OR].[Portland]}," + " Ascendants([Store].CurrentMember)," + " ALL)", "[Store].[All Stores].[USA].[CA]" + nl + "[Store].[All Stores].[USA]" + nl + "[Store].[All Stores]" + nl + "[Store].[All Stores].[USA].[OR].[Portland]" + nl + "[Store].[All Stores].[USA].[OR]" + nl + "[Store].[All Stores].[USA]" + nl + "[Store].[All Stores]"); } public void testGenerateUnique(FoodMartTestCase test) { test.assertAxisReturns( "Generate({[Store].[USA].[CA], [Store].[USA].[OR].[Portland]}," + " Ascendants([Store].CurrentMember))", "[Store].[All Stores].[USA].[CA]" + nl + "[Store].[All Stores].[USA]" + nl + "[Store].[All Stores]" + nl + "[Store].[All Stores].[USA].[OR].[Portland]" + nl + "[Store].[All Stores].[USA].[OR]"); } public void testGenerateCrossJoin(FoodMartTestCase test) { // Note that the different regions have different Top 2. test.assertAxisReturns( "Generate({[Store].[USA].[CA], [Store].[USA].[CA].[San Francisco]}," + nl + " CrossJoin({[Store].CurrentMember}," + nl + " TopCount([Product].[Brand Name].members, " + nl + " 2," + nl + " [Measures].[Unit Sales])))", "{[Store].[All Stores].[USA].[CA], [Product].[All Products].[Food].[Produce].[Vegetables].[Fresh Vegetables].[Hermanos]}" + nl + "{[Store].[All Stores].[USA].[CA], [Product].[All Products].[Food].[Produce].[Vegetables].[Fresh Vegetables].[Tell Tale]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Francisco], [Product].[All Products].[Food].[Produce].[Vegetables].[Fresh Vegetables].[Ebony]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Francisco], [Product].[All Products].[Food].[Produce].[Vegetables].[Fresh Vegetables].[High Top]}"); } }); define(new FunkResolver( "Head", "Head(<Set>[, < Numeric Expression >])", "Returns the first specified number of elements in a set.", new String[] {"fxx", "fxxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); final int count = args.length < 2 ? 1 : getIntArg(evaluator, args, 1); if (count >= members.size()) { return members; } if (count <= 0) { return new ArrayList(); } return members.subList(0, count); } public void testHead(FoodMartTestCase test) { test.assertAxisReturns("Head([Store].Children, 2)", "[Store].[All Stores].[Canada]" + nl + "[Store].[All Stores].[Mexico]"); } public void testHeadNegative(FoodMartTestCase test) { test.assertAxisReturns("Head([Store].Children, 2 - 3)", ""); } public void testHeadDefault(FoodMartTestCase test) { test.assertAxisReturns("Head([Store].Children)", "[Store].[All Stores].[Canada]"); } public void testHeadOvershoot(FoodMartTestCase test) { test.assertAxisReturns("Head([Store].Children, 2 + 2)", "[Store].[All Stores].[Canada]" + nl + "[Store].[All Stores].[Mexico]" + nl + "[Store].[All Stores].[USA]"); } public void testHeadEmpty(FoodMartTestCase test) { test.assertAxisReturns("Head([Gender].[F].Children, 2)", ""); } })); defineReserved(new String[] {"PRE","POST"}); define(new MultiResolver( "Hierarchize", "Hierarchize(<Set>[, POST])", "Orders the members of a set in a hierarchy.", new String[] {"fxx", "fxxy"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { String order = getLiteralArg(args, 1, "PRE", new String[] {"PRE", "POST"}, dummyFunDef); final boolean post = order.equals("POST"); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); hierarchize(members, post); return members; } }; } public void testHierarchize(FoodMartTestCase test) { test.assertAxisReturns( "Hierarchize(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Drink]," + nl + " [Product].[Non-Consumable]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]})", "[Product].[All Products]" + nl + "[Product].[All Products].[Drink]" + nl + "[Product].[All Products].[Drink].[Dairy]" + nl + "[Product].[All Products].[Food]" + nl + "[Product].[All Products].[Food].[Eggs]" + nl + "[Product].[All Products].[Non-Consumable]"); } public void testHierarchizePost(FoodMartTestCase test) { test.assertAxisReturns( "Hierarchize(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]}," + nl + " POST)", "[Product].[All Products].[Drink].[Dairy]" + nl + "[Product].[All Products].[Food].[Eggs]" + nl + "[Product].[All Products].[Food]" + nl + "[Product].[All Products]"); } public void testHierarchizeCrossJoinPre(FoodMartTestCase test) { test.assertAxisReturns( "Hierarchize(" + nl + " CrossJoin(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]}," + nl + " [Gender].MEMBERS)," + nl + " PRE)", "{[Product].[All Products], [Gender].[All Gender]}" + nl + "{[Product].[All Products], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender]}" + nl + "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender].[M]}"); } public void testHierarchizeCrossJoinPost(FoodMartTestCase test) { test.assertAxisReturns( "Hierarchize(" + nl + " CrossJoin(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]}," + nl + " [Gender].MEMBERS)," + nl + " POST)", "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender]}" + nl + "{[Product].[All Products], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products], [Gender].[All Gender]}"); } }); define(new MultiResolver( "Intersect", "Intersect(<Set1>, <Set2>[, ALL])", "Returns the intersection of two input sets, optionally retaining duplicates.", new String[] {"fxxxy", "fxxx"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { final boolean all = getLiteralArg(args, 2, "", new String[] {"ALL"}, dummyFunDef).equalsIgnoreCase("ALL"); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { List left = (List) getArg(evaluator, args, 0); if (left == null) { left = Collections.EMPTY_LIST; } List right = (List) getArg(evaluator, args, 1); if (right == null) { right = Collections.EMPTY_LIST; } ArrayList result = new ArrayList(); for (Iterator i = left.iterator(); i.hasNext();) { Object leftObject = i.next(); if (right.contains(leftObject)) { if (all || !result.contains(leftObject)) { result.add(leftObject); } } } return result; } }; } public void testIntersect(FoodMartTestCase test) { // Note: duplicates retained from left, not from right; and order is preserved. test.assertAxisReturns("Intersect({[Time].[1997].[Q2], [Time].[1997], [Time].[1997].[Q1], [Time].[1997].[Q2]}, " + "{[Time].[1998], [Time].[1997], [Time].[1997].[Q2], [Time].[1997]}, " + "ALL)", "[Time].[1997].[Q2]" + nl + "[Time].[1997]" + nl + "[Time].[1997].[Q2]"); } public void testIntersectRightEmpty(FoodMartTestCase test) { test.assertAxisReturns("Intersect({[Time].[1997]}, {})", ""); } public void testIntersectLeftEmpty(FoodMartTestCase test) { test.assertAxisReturns("Intersect({}, {[Store].[USA].[CA]})", ""); } }); if (false) define(new FunDefBase("LastPeriods", "LastPeriods(<Index>[, <Member>])", "Returns a set of members prior to and including a specified member.", "fx*")); define(new FunDefBase("Members", "<Dimension>.Members", "Returns the set of all members in a dimension.", "pxd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = (Dimension) getArg(evaluator, args, 0); Hierarchy hierarchy = dimension.getHierarchy(); return addMembers(evaluator.getSchemaReader(), new ArrayList(), hierarchy); } }); define(new FunDefBase("Members", "<Hierarchy>.Members", "Returns the set of all members in a hierarchy.", "pxh") { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = (Hierarchy) getArg(evaluator, args, 0); return addMembers(evaluator.getSchemaReader(), new ArrayList(), hierarchy); } }); define(new FunDefBase("Members", "<Level>.Members", "Returns the set of all members in a level.", "pxl") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = (Level) getArg(evaluator, args, 0); return Arrays.asList(evaluator.getSchemaReader().getLevelMembers(level)); } }); define(new FunkResolver( "Mtd", "Mtd([<Member>])", "A shortcut function for the PeriodsToDate function that specifies the level to be Month.", new String[]{"fx", "fxm"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { return periodsToDate( evaluator, evaluator.getCube().getMonthLevel(), getMemberArg(evaluator, args, 0, false)); } })); defineReserved(OrderFlags.instance); define(new MultiResolver( "Order", "Order(<Set>, <Value Expression>[, ASC | DESC | BASC | BDESC])", "Arranges members of a set, optionally preserving or breaking the hierarchy.", new String[]{"fxxvy", "fxxv"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { int order = getLiteralArg(args, 2, OrderFlags.ASC, OrderFlags.instance, dummyFunDef); final boolean desc = OrderFlags.isDescending(order); final boolean brk = OrderFlags.isBreak(order); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArgNoEval(args, 1); sort(evaluator, members, exp, desc, brk); return members; } }; } public void testOrder(FoodMartTestCase test) { test.runQueryCheckResult( "select {[Measures].[Unit Sales]} on columns," + nl + " order({" + nl + " [Product].[All Products].[Drink]," + nl + " [Product].[All Products].[Drink].[Beverages]," + nl + " [Product].[All Products].[Drink].[Dairy]," + nl + " [Product].[All Products].[Food]," + nl + " [Product].[All Products].[Food].[Baked Goods]," + nl + " [Product].[All Products].[Food].[Eggs]," + nl + " [Product].[All Products]}," + nl + " [Measures].[Unit Sales]) on rows" + nl + "from Sales", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Product].[All Products]}" + nl + "{[Product].[All Products].[Drink]}" + nl + "{[Product].[All Products].[Drink].[Dairy]}" + nl + "{[Product].[All Products].[Drink].[Beverages]}" + nl + "{[Product].[All Products].[Food]}" + nl + "{[Product].[All Products].[Food].[Eggs]}" + nl + "{[Product].[All Products].[Food].[Baked Goods]}" + nl + "Row #0: 266,773" + nl + "Row #1: 24,597" + nl + "Row #2: 4,186" + nl + "Row #3: 13,573" + nl + "Row #4: 191,940" + nl + "Row #5: 4,132" + nl + "Row #6: 7,870" + nl); } public void testOrderParentsMissing(FoodMartTestCase test) { // Paradoxically, [Alcoholic Beverages] comes before // [Eggs] even though it has a larger value, because // its parent [Drink] has a smaller value than [Food]. test.runQueryCheckResult( "select {[Measures].[Unit Sales]} on columns," + " order({" + nl + " [Product].[All Products].[Drink].[Alcoholic Beverages]," + nl + " [Product].[All Products].[Food].[Eggs]}," + nl + " [Measures].[Unit Sales], ASC) on rows" + nl + "from Sales", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Product].[All Products].[Food].[Eggs]}" + nl + "Row #0: 6,838" + nl + "Row #1: 4,132" + nl); } public void testOrderCrossJoinBreak(FoodMartTestCase test) { test.runQueryCheckResult( "select {[Measures].[Unit Sales]} on columns," + nl + " Order(" + nl + " CrossJoin(" + nl + " [Gender].children," + nl + " [Marital Status].children)," + nl + " [Measures].[Unit Sales]," + nl + " BDESC) on rows" + nl + "from Sales" + nl + "where [Time].[1997].[Q1]", "Axis #0:" + nl + "{[Time].[1997].[Q1]}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S]}" + nl + "Row #0: 17,070" + nl + "Row #1: 16,790" + nl + "Row #2: 16,311" + nl + "Row #3: 16,120" + nl); } public void testOrderCrossJoin(FoodMartTestCase test) { // Note: // 1. [Alcoholic Beverages] collates before [Eggs] and // [Seafood] because its parent, [Drink], is less // than [Food] // 2. [Seattle] generally sorts after [CA] and [OR] // because invisible parent [WA] is greater. test.runQueryCheckResult( "select CrossJoin(" + nl + " {[Time].[1997]," + nl + " [Time].[1997].[Q1]}," + nl + " {[Measures].[Unit Sales]}) on columns," + nl + " Order(" + nl + " CrossJoin( " + nl + " {[Product].[All Products].[Food].[Eggs]," + nl + " [Product].[All Products].[Food].[Seafood]," + nl + " [Product].[All Products].[Drink].[Alcoholic Beverages]}," + nl + " {[Store].[USA].[WA].[Seattle]," + nl + " [Store].[USA].[CA]," + nl + " [Store].[USA].[OR]})," + nl + " ([Time].[1997].[Q1], [Measures].[Unit Sales])," + nl + " ASC) on rows" + nl + "from Sales", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Time].[1997], [Measures].[Unit Sales]}" + nl + "{[Time].[1997].[Q1], [Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Product].[All Products].[Drink].[Alcoholic Beverages], [Store].[All Stores].[USA].[OR]}" + nl + "{[Product].[All Products].[Drink].[Alcoholic Beverages], [Store].[All Stores].[USA].[CA]}" + nl + "{[Product].[All Products].[Drink].[Alcoholic Beverages], [Store].[All Stores].[USA].[WA].[Seattle]}" + nl + "{[Product].[All Products].[Food].[Seafood], [Store].[All Stores].[USA].[CA]}" + nl + "{[Product].[All Products].[Food].[Seafood], [Store].[All Stores].[USA].[OR]}" + nl + "{[Product].[All Products].[Food].[Seafood], [Store].[All Stores].[USA].[WA].[Seattle]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Store].[All Stores].[USA].[CA]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Store].[All Stores].[USA].[OR]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Store].[All Stores].[USA].[WA].[Seattle]}" + nl + "Row #0: 1,680" + nl + "Row #0: 393" + nl + "Row #1: 1,936" + nl + "Row #1: 431" + nl + "Row #2: 635" + nl + "Row #2: 142" + nl + "Row #3: 441" + nl + "Row #3: 91" + nl + "Row #4: 451" + nl + "Row #4: 107" + nl + "Row #5: 217" + nl + "Row #5: 44" + nl + "Row #6: 1,116" + nl + "Row #6: 240" + nl + "Row #7: 1,119" + nl + "Row #7: 251" + nl + "Row #8: 373" + nl + "Row #8: 57" + nl); } public void testOrderHierarchicalDesc(FoodMartTestCase test) { test.assertAxisReturns( "Order(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Drink]," + nl + " [Product].[Non-Consumable]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]}," + nl + " [Measures].[Unit Sales]," + nl + " DESC)", "[Product].[All Products]" + nl + "[Product].[All Products].[Food]" + nl + "[Product].[All Products].[Food].[Eggs]" + nl + "[Product].[All Products].[Non-Consumable]" + nl + "[Product].[All Products].[Drink]" + nl + "[Product].[All Products].[Drink].[Dairy]"); } public void testOrderCrossJoinDesc(FoodMartTestCase test) { test.assertAxisReturns( "Order(" + nl + " CrossJoin(" + nl + " {[Gender].[M], [Gender].[F]}," + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Drink]," + nl + " [Product].[Non-Consumable]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]})," + nl + " [Measures].[Unit Sales]," + nl + " DESC)", "{[Gender].[All Gender].[M], [Product].[All Products]}" + nl + "{[Gender].[All Gender].[M], [Product].[All Products].[Food]}" + nl + "{[Gender].[All Gender].[M], [Product].[All Products].[Food].[Eggs]}" + nl + "{[Gender].[All Gender].[M], [Product].[All Products].[Non-Consumable]}" + nl + "{[Gender].[All Gender].[M], [Product].[All Products].[Drink]}" + nl + "{[Gender].[All Gender].[M], [Product].[All Products].[Drink].[Dairy]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products].[Food]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products].[Food].[Eggs]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products].[Non-Consumable]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products].[Drink]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products].[Drink].[Dairy]}"); } public void testOrderBug656802(FoodMartTestCase test) { // Note: // 1. [Alcoholic Beverages] collates before [Eggs] and // [Seafood] because its parent, [Drink], is less // than [Food] // 2. [Seattle] generally sorts after [CA] and [OR] // because invisible parent [WA] is greater. test.runQueryCheckResult( "select {[Measures].[Unit Sales], [Measures].[Store Cost], [Measures].[Store Sales]} ON columns, " + nl + "Order(" + nl + " ToggleDrillState(" + nl + " {([Promotion Media].[All Media], [Product].[All Products])}," + nl + " {[Product].[All Products]} ), " + nl + " [Measures].[Unit Sales], DESC) ON rows " + nl + "from [Sales] where ([Time].[1997])", "Axis #0:" + nl + "{[Time].[1997]}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "{[Measures].[Store Cost]}" + nl + "{[Measures].[Store Sales]}" + nl + "Axis #2:" + nl + "{[Promotion Media].[All Media], [Product].[All Products]}" + nl + "{[Promotion Media].[All Media], [Product].[All Products].[Food]}" + nl + "{[Promotion Media].[All Media], [Product].[All Products].[Non-Consumable]}" + nl + "{[Promotion Media].[All Media], [Product].[All Products].[Drink]}" + nl + "Row #0: 266,773" + nl + "Row #0: 225,627.23" + nl + "Row #0: 565,238.13" + nl + "Row #1: 191,940" + nl + "Row #1: 163,270.72" + nl + "Row #1: 409,035.59" + nl + "Row #2: 50,236" + nl + "Row #2: 42,879.28" + nl + "Row #2: 107,366.33" + nl + "Row #3: 24,597" + nl + "Row #3: 19,477.23" + nl + "Row #3: 48,836.21" + nl); } public void testOrderBug712702_Simplified(FoodMartTestCase test) { test.runQueryCheckResult("SELECT Order({[Time].[Year].members}, [Measures].[Unit Sales]) on columns" + nl + "from [Sales]", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Time].[1998]}" + nl + "{[Time].[1997]}" + nl + "Row #0: (null)" + nl + "Row #0: 266,773" + nl); } public void testOrderBug712702_Original(FoodMartTestCase test) { test.runQueryCheckResult("with member [Measures].[Average Unit Sales] as 'Avg(Descendants([Time].CurrentMember, [Time].[Month]), " + nl + "[Measures].[Unit Sales])' " + nl + "member [Measures].[Max Unit Sales] as 'Max(Descendants([Time].CurrentMember, [Time].[Month]), [Measures].[Unit Sales])' " + nl + "select {[Measures].[Average Unit Sales], [Measures].[Max Unit Sales], [Measures].[Unit Sales]} ON columns, " + nl + " NON EMPTY Order(" + nl + " Crossjoin( " + nl + " {[Store].[All Stores].[USA].[OR].[Portland]," + nl + " [Store].[All Stores].[USA].[OR].[Salem]," + nl + " [Store].[All Stores].[USA].[OR].[Salem].[Store 13]," + nl + " [Store].[All Stores].[USA].[CA].[San Francisco]," + nl + " [Store].[All Stores].[USA].[CA].[San Diego]," + nl + " [Store].[All Stores].[USA].[CA].[Beverly Hills]," + nl + " [Store].[All Stores].[USA].[CA].[Los Angeles]," + nl + " [Store].[All Stores].[USA].[WA].[Walla Walla]," + nl + " [Store].[All Stores].[USA].[WA].[Bellingham]," + nl + " [Store].[All Stores].[USA].[WA].[Yakima]," + nl + " [Store].[All Stores].[USA].[WA].[Spokane]," + nl + " [Store].[All Stores].[USA].[WA].[Seattle], " + nl + " [Store].[All Stores].[USA].[WA].[Bremerton]," + nl + " [Store].[All Stores].[USA].[WA].[Tacoma]}," + nl + " [Time].[Year].Members), " + nl + " [Measures].[Average Unit Sales], ASC) ON rows" + nl + "from [Sales] ", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Average Unit Sales]}" + nl + "{[Measures].[Max Unit Sales]}" + nl + "{[Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Store].[All Stores].[USA].[OR].[Portland], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[OR].[Salem], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[OR].[Salem].[Store 13], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Francisco], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[CA].[Beverly Hills], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Diego], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[CA].[Los Angeles], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Walla Walla], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Bellingham], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Yakima], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Spokane], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Bremerton], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Seattle], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Tacoma], [Time].[1997]}" + nl + "Row #0: 2,173" + nl + "Row #0: 2,933" + nl + "Row #0: 26,079" + nl + "Row #1: 3,465" + nl + "Row #1: 5,891" + nl + "Row #1: 41,580" + nl + "Row #2: 3,465" + nl + "Row #2: 5,891" + nl + "Row #2: 41,580" + nl + "Row #3: 176" + nl + "Row #3: 222" + nl + "Row #3: 2,117" + nl + "Row #4: 1,778" + nl + "Row #4: 2,545" + nl + "Row #4: 21,333" + nl + "Row #5: 2,136" + nl + "Row #5: 2,686" + nl + "Row #5: 25,635" + nl + "Row #6: 2,139" + nl + "Row #6: 2,669" + nl + "Row #6: 25,663" + nl + "Row #7: 184" + nl + "Row #7: 301" + nl + "Row #7: 2,203" + nl + "Row #8: 186" + nl + "Row #8: 275" + nl + "Row #8: 2,237" + nl + "Row #9: 958" + nl + "Row #9: 1,163" + nl + "Row #9: 11,491" + nl + "Row #10: 1,966" + nl + "Row #10: 2,634" + nl + "Row #10: 23,591" + nl + "Row #11: 2,048" + nl + "Row #11: 2,623" + nl + "Row #11: 24,576" + nl + "Row #12: 2,084" + nl + "Row #12: 2,304" + nl + "Row #12: 25,011" + nl + "Row #13: 2,938" + nl + "Row #13: 3,818" + nl + "Row #13: 35,257" + nl); } }); define(new FunkResolver( "PeriodsToDate", "PeriodsToDate([<Level>[, <Member>]])", "Returns a set of periods (members) from a specified level starting with the first period and ending with a specified member.", new String[]{"fx", "fxl", "fxlm"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, false); Member member = getMemberArg(evaluator, args, 1, false); return periodsToDate(evaluator, level, member); } })); define(new FunkResolver( "Qtd", "Qtd([<Member>])", "A shortcut function for the PeriodsToDate function that specifies the level to be Quarter.", new String[]{"fx", "fxm"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { return periodsToDate( evaluator, evaluator.getCube().getQuarterLevel(), getMemberArg(evaluator, args, 0, false)); } })); if (false) define(new FunDefBase("StripCalculatedMembers", "StripCalculatedMembers(<Set>)", "Removes calculated members from a set.", "fx*")); // "Siblings" is not a standard MDX function. define(new FunDefBase("Siblings", "<Member>.Siblings", "Returns the set of siblings of the specified member.", "pxm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member parent = member.getParentMember(); final SchemaReader schemaReader = evaluator.getSchemaReader(); Member[] siblings; if (parent == null) { siblings = schemaReader.getHierarchyRootMembers(member.getHierarchy()); } else { siblings = schemaReader.getMemberChildren(parent); } return Arrays.asList(siblings); } public void testSiblingsA(FoodMartTestCase test) { test.assertAxisReturns("{[Time].[1997].Siblings}", "[Time].[1997]" + nl + "[Time].[1998]"); } public void testSiblingsB(FoodMartTestCase test) { test.assertAxisReturns("{[Store].Siblings}", "[Store].[All Stores]"); } public void testSiblingsC(FoodMartTestCase test) { test.assertAxisReturns("{[Store].[USA].[CA].Siblings}", "[Store].[All Stores].[USA].[CA]" + nl + "[Store].[All Stores].[USA].[OR]" + nl + "[Store].[All Stores].[USA].[WA]"); } }); define(new FunDefBase("StrToSet", "StrToSet(<String Expression>)", "Constructs a set from a string expression.", "fxS") { public Hierarchy getHierarchy(Exp[] args) { // StrToSet(s, <Hie1>, ... <HieN>) is of type [Hie1] x ... x [HieN]; // so, for example, So StrToTuple("[Time].[1997]", [Time]) is of type // [Time]. But if n > 1, we cannot represent the compound type, and we // return null. return (args.length == 2) ? (Hierarchy) args[1] : null; } }); define(new FunkResolver( "Subset", "Subset(<Set>, <Start>[, <Count>])", "Returns a subset of elements from a set.", new String[] {"fxxn", "fxxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); final int start = getIntArg(evaluator, args, 1); final int end; if (args.length < 3) { end = members.size(); } else { final int count = getIntArg(evaluator, args, 2); end = start + count; } if (start >= end || start < 0) { return new ArrayList(); } if (start == 0 && end >= members.size()) { return members; } return members.subList(start, end); } public void testSubset(FoodMartTestCase test) { test.assertAxisReturns("Subset([Promotion Media].Children, 7, 2)", "[Promotion Media].[All Media].[Product Attachment]" + nl + "[Promotion Media].[All Media].[Radio]"); } public void testSubsetNegativeCount(FoodMartTestCase test) { test.assertAxisReturns("Subset([Promotion Media].Children, 3, -1)", ""); } public void testSubsetNegativeStart(FoodMartTestCase test) { test.assertAxisReturns("Subset([Promotion Media].Children, -2, 4)", ""); } public void testSubsetDefault(FoodMartTestCase test) { test.assertAxisReturns("Subset([Promotion Media].Children, 11)", "[Promotion Media].[All Media].[Sunday Paper, Radio]" + nl + "[Promotion Media].[All Media].[Sunday Paper, Radio, TV]" + nl + "[Promotion Media].[All Media].[TV]"); } public void testSubsetOvershoot(FoodMartTestCase test) { test.assertAxisReturns("Subset([Promotion Media].Children, 15)", ""); } public void testSubsetEmpty(FoodMartTestCase test) { test.assertAxisReturns("Subset([Gender].[F].Children, 1)", ""); } })); define(new FunkResolver( "Tail", "Tail(<Set>[, <Count>])", "Returns a subset from the end of a set.", new String[] {"fxx", "fxxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); final int count = args.length < 2 ? 1 : getIntArg(evaluator, args, 1); if (count >= members.size()) { return members; } if (count <= 0) { return new ArrayList(); } return members.subList(members.size() - count, members.size()); } public void testTail(FoodMartTestCase test) { test.assertAxisReturns("Tail([Store].Children, 2)", "[Store].[All Stores].[Mexico]" + nl + "[Store].[All Stores].[USA]"); } public void testTailNegative(FoodMartTestCase test) { test.assertAxisReturns("Tail([Store].Children, 2 - 3)", ""); } public void testTailDefault(FoodMartTestCase test) { test.assertAxisReturns("Tail([Store].Children)", "[Store].[All Stores].[USA]"); } public void testTailOvershoot(FoodMartTestCase test) { test.assertAxisReturns("Tail([Store].Children, 2 + 2)", "[Store].[All Stores].[Canada]" + nl + "[Store].[All Stores].[Mexico]" + nl + "[Store].[All Stores].[USA]"); } public void testTailEmpty(FoodMartTestCase test) { test.assertAxisReturns("Tail([Gender].[F].Children, 2)", ""); } })); defineReserved("RECURSIVE"); define(new FunkResolver( "ToggleDrillState", "ToggleDrillState(<Set1>, <Set2>[, RECURSIVE])", "Toggles the drill state of members. This function is a combination of DrillupMember and DrilldownMember.", new String[]{"fxxx", "fxxx#"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List v0 = (List) getArg(evaluator, args, 0), v1 = (List) getArg(evaluator, args, 1); if (args.length > 2) { throw Util.newInternal( "ToggleDrillState(RECURSIVE) not supported"); } if (v1.isEmpty()) { return v0; } if (v0.isEmpty()) { return v0; } HashSet set = new HashSet(); set.addAll(v1); HashSet set1 = set; List result = new ArrayList(); int i = 0, n = v0.size(); while (i < n) { Object o = v0.get(i++); result.add(o); Member m = null; int k = -1; if (o instanceof Member) { if (!set1.contains(o)) { continue; } m = (Member) o; k = -1; } else { Util.assertTrue(o instanceof Member[]); Member[] members = (Member[]) o; for (int j = 0; j < members.length; j++) { Member member = members[j]; if (set1.contains(member)) { k = j; m = member; break; } } if (k == -1) { continue; } } boolean isDrilledDown = false; if (i < n) { Object next = v0.get(i); Member nextMember = (k < 0) ? (Member) next : ((Member[]) next)[k]; boolean strict = true; if (isAncestorOf(m, nextMember, strict)) { isDrilledDown = true; } } if (isDrilledDown) { // skip descendants of this member do { Object next = v0.get(i); Member nextMember = (k < 0) ? (Member) next : ((Member[]) next)[k]; boolean strict = true; if (isAncestorOf(m, nextMember, strict)) { i++; } else { break; } } while (i < n); } else { Member[] children = evaluator.getSchemaReader().getMemberChildren(m); for (int j = 0; j < children.length; j++) { if (k < 0) { result.add(children[j]); } else { Member[] members = (Member[]) ((Member[]) o).clone(); members[k] = children[j]; result.add(members); } } } } return result; } public void testToggleDrillState(FoodMartTestCase test) { test.assertAxisReturns("ToggleDrillState({[Customers].[USA],[Customers].[Canada]},{[Customers].[USA],[Customers].[USA].[CA]})", "[Customers].[All Customers].[USA]" + nl + "[Customers].[All Customers].[USA].[CA]" + nl + "[Customers].[All Customers].[USA].[OR]" + nl + "[Customers].[All Customers].[USA].[WA]" + nl + "[Customers].[All Customers].[Canada]"); } public void testToggleDrillState2(FoodMartTestCase test) { test.assertAxisReturns("ToggleDrillState([Product].[Product Department].members, {[Product].[All Products].[Food].[Snack Foods]})", "[Product].[All Products].[Drink].[Alcoholic Beverages]" + nl + "[Product].[All Products].[Drink].[Beverages]" + nl + "[Product].[All Products].[Drink].[Dairy]" + nl + "[Product].[All Products].[Food].[Baked Goods]" + nl + "[Product].[All Products].[Food].[Baking Goods]" + nl + "[Product].[All Products].[Food].[Breakfast Foods]" + nl + "[Product].[All Products].[Food].[Canned Foods]" + nl + "[Product].[All Products].[Food].[Canned Products]" + nl + "[Product].[All Products].[Food].[Dairy]" + nl + "[Product].[All Products].[Food].[Deli]" + nl + "[Product].[All Products].[Food].[Eggs]" + nl + "[Product].[All Products].[Food].[Frozen Foods]" + nl + "[Product].[All Products].[Food].[Meat]" + nl + "[Product].[All Products].[Food].[Produce]" + nl + "[Product].[All Products].[Food].[Seafood]" + nl + "[Product].[All Products].[Food].[Snack Foods]" + nl + "[Product].[All Products].[Food].[Snack Foods].[Snack Foods]" + nl + "[Product].[All Products].[Food].[Snacks]" + nl + "[Product].[All Products].[Food].[Starchy Foods]" + nl + "[Product].[All Products].[Non-Consumable].[Carousel]" + nl + "[Product].[All Products].[Non-Consumable].[Checkout]" + nl + "[Product].[All Products].[Non-Consumable].[Health and Hygiene]" + nl + "[Product].[All Products].[Non-Consumable].[Household]" + nl + "[Product].[All Products].[Non-Consumable].[Periodicals]"); } public void testToggleDrillState3(FoodMartTestCase test) { test.assertAxisReturns( "ToggleDrillState(" + "{[Time].[1997].[Q1]," + " [Time].[1997].[Q2]," + " [Time].[1997].[Q2].[4]," + " [Time].[1997].[Q2].[6]," + " [Time].[1997].[Q3]}," + "{[Time].[1997].[Q2]})", "[Time].[1997].[Q1]" + nl + "[Time].[1997].[Q2]" + nl + "[Time].[1997].[Q3]"); } // bug 634860 public void testToggleDrillStateTuple(FoodMartTestCase test) { test.assertAxisReturns( "ToggleDrillState(" + nl + "{([Store].[All Stores].[USA].[CA]," + " [Product].[All Products].[Drink].[Alcoholic Beverages])," + nl + " ([Store].[All Stores].[USA]," + " [Product].[All Products].[Drink])}," + nl + "{[Store].[All stores].[USA].[CA]})", "{[Store].[All Stores].[USA].[CA], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA].[CA].[Alameda], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA].[CA].[Beverly Hills], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA].[CA].[Los Angeles], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Diego], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Francisco], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA], [Product].[All Products].[Drink]}"); } })); define(new FunkResolver( "TopCount", "TopCount(<Set>, <Count>[, <Numeric Expression>])", "Returns a specified number of items from the top of a set, optionally ordering the set first.", new String[]{"fxxnn", "fxxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List list = (List) getArg(evaluator, args, 0); int n = getIntArg(evaluator, args, 1); ExpBase exp = (ExpBase) getArg(evaluator, args, 2, null); if (exp != null) { boolean desc = true, brk = true; sort(evaluator, list, exp, desc, brk); } if (n < list.size()) { list = list.subList(0, n); } return list; } public void testTopCount(FoodMartTestCase test) { test.assertAxisReturns("TopCount({[Promotion Media].[Media Type].members}, 2, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[No Media]" + nl + "[Promotion Media].[All Media].[Daily Paper, Radio, TV]"); } })); define(new FunkResolver( "TopPercent", "TopPercent(<Set>, <Percentage>, <Numeric Expression>)", "Sorts a set and returns the top N elements whose cumulative total is at least a specified percentage.", new String[]{"fxxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 2); Double n = getDoubleArg(evaluator, args, 1); return topOrBottom(evaluator.push(), members, exp, true, true, n.doubleValue()); } public void testTopPercent(FoodMartTestCase test) { test.assertAxisReturns("TopPercent({[Promotion Media].[Media Type].members}, 70, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[No Media]"); } //todo: test precision })); define(new FunkResolver( "TopSum", "TopSum(<Set>, <Value>, <Numeric Expression>)", "Sorts a set and returns the top N elements whose cumulative total is at least a specified value.", new String[]{"fxxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 2); Double n = getDoubleArg(evaluator, args, 1); return topOrBottom(evaluator.push(), members, exp, true, false, n.doubleValue()); } public void testTopSum(FoodMartTestCase test) { test.assertAxisReturns("TopSum({[Promotion Media].[Media Type].members}, 200000, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[No Media]" + nl + "[Promotion Media].[All Media].[Daily Paper, Radio, TV]"); } })); defineReserved(new String[] {"ALL", "DISTINCT"}); define(new MultiResolver( "Union", "Union(<Set1>, <Set2>[, ALL])", "Returns the union of two sets, optionally retaining duplicates.", new String[] {"fxxx", "fxxxy"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { String allString = getLiteralArg(args, 2, "DISTINCT", new String[] {"ALL", "DISTINCT"}, dummyFunDef); final boolean all = allString.equalsIgnoreCase("ALL"); checkCompatible(args[0], args[1], dummyFunDef); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { List left = (List) getArg(evaluator, args, 0), right = (List) getArg(evaluator, args, 1); if (all) { if (left == null || left.isEmpty()) { return right; } left.addAll(right); return left; } else { HashSet added = new HashSet(); List result = new ArrayList(); addUnique(result, left, added); addUnique(result, right, added); return result; } } }; } public void testUnionAll(FoodMartTestCase test) { test.assertAxisReturns("Union({[Gender].[M]}, {[Gender].[F]}, ALL)", "[Gender].[All Gender].[M]" + nl + "[Gender].[All Gender].[F]"); // order is preserved } public void testUnion(FoodMartTestCase test) { test.assertAxisReturns("Union({[Store].[USA], [Store].[USA], [Store].[USA].[OR]}, {[Store].[USA].[CA], [Store].[USA]})", "[Store].[All Stores].[USA]" + nl + "[Store].[All Stores].[USA].[OR]" + nl + "[Store].[All Stores].[USA].[CA]"); } public void testUnionEmptyBoth(FoodMartTestCase test) { test.assertAxisReturns("Union({}, {})", ""); } public void testUnionEmptyRight(FoodMartTestCase test) { test.assertAxisReturns("Union({[Gender].[M]}, {})", "[Gender].[All Gender].[M]"); } public void testUnionTuple(FoodMartTestCase test) { test.assertAxisReturns( "Union({" + " ([Gender].[M], [Marital Status].[S])," + " ([Gender].[F], [Marital Status].[S])" + "}, {" + " ([Gender].[M], [Marital Status].[M])," + " ([Gender].[M], [Marital Status].[S])" + "})", "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M]}"); } public void testUnionQuery(FoodMartTestCase test) { Result result = test.runQuery( "select {[Measures].[Unit Sales], [Measures].[Store Cost], [Measures].[Store Sales]} on columns," + nl + " Hierarchize( " + nl + " Union(" + nl + " Crossjoin(" + nl + " Crossjoin([Gender].[All Gender].children," + nl + " [Marital Status].[All Marital Status].children )," + nl + " Crossjoin([Customers].[All Customers].children," + nl + " [Product].[All Products].children ) ) ," + nl + " Crossjoin( {([Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M] )}," + nl + " Crossjoin(" + nl + " [Customers].[All Customers].[USA].children," + nl + " [Product].[All Products].children ) ) )) on rows" +nl + "from Sales where ([Time].[1997])"); final Axis rowsAxis = result.getAxes()[1]; Assert.assertEquals(45, rowsAxis.positions.length); } }); if (false) define(new FunDefBase("VisualTotals", "VisualTotals(<Set>, <Pattern>)", "Dynamically totals child members specified in a set using a pattern for the total label in the result set.", "fx*")); define(new FunkResolver( "Wtd", "Wtd([<Member>])", "A shortcut function for the PeriodsToDate function that specifies the level to be Week.", new String[]{"fx", "fxm"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { return periodsToDate( evaluator, evaluator.getCube().getWeekLevel(), getMemberArg(evaluator, args, 0, false)); } })); define(new FunkResolver( "Ytd", "Ytd([<Member>])", "A shortcut function for the PeriodsToDate function that specifies the level to be Year.", new String[]{"fx", "fxm"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { return periodsToDate( evaluator, evaluator.getCube().getYearLevel(), getMemberArg(evaluator, args, 0, false)); } })); define(new FunDefBase( ":", "<Member>:<Member>", "Infix colon operator returns the set of members between a given pair of members.", "ixmm") { // implement FunDef public Object evaluate(Evaluator evaluator, Exp[] args) { final Member member0 = getMemberArg(evaluator, args, 0, true); final Member member1 = getMemberArg(evaluator, args, 1, true); if (member0.isNull() || member1.isNull()) { return Collections.EMPTY_LIST; } if (member0.getLevel() != member1.getLevel()) { throw newEvalException(this, "Members must belong to the same level"); } return FunUtil.memberRange(evaluator, member0, member1); } public void testRange(FoodMartTestCase test) { test.assertAxisReturns("[Time].[1997].[Q1].[2] : [Time].[1997].[Q2].[5]", "[Time].[1997].[Q1].[2]" + nl + "[Time].[1997].[Q1].[3]" + nl + "[Time].[1997].[Q2].[4]" + nl + "[Time].[1997].[Q2].[5]"); // not parents } /** * Large dimensions use a different member reader, therefore need to * be tested separately. */ public void testRangeLarge(FoodMartTestCase test) { test.assertAxisReturns("[Customers].[USA].[CA].[San Francisco] : [Customers].[USA].[WA].[Bellingham]", "[Customers].[All Customers].[USA].[CA].[San Francisco]" + nl + "[Customers].[All Customers].[USA].[CA].[San Gabriel]" + nl + "[Customers].[All Customers].[USA].[CA].[San Jose]" + nl + "[Customers].[All Customers].[USA].[CA].[Santa Cruz]" + nl + "[Customers].[All Customers].[USA].[CA].[Santa Monica]" + nl + "[Customers].[All Customers].[USA].[CA].[Spring Valley]" + nl + "[Customers].[All Customers].[USA].[CA].[Torrance]" + nl + "[Customers].[All Customers].[USA].[CA].[West Covina]" + nl + "[Customers].[All Customers].[USA].[CA].[Woodland Hills]" + nl + "[Customers].[All Customers].[USA].[OR].[Albany]" + nl + "[Customers].[All Customers].[USA].[OR].[Beaverton]" + nl + "[Customers].[All Customers].[USA].[OR].[Corvallis]" + nl + "[Customers].[All Customers].[USA].[OR].[Lake Oswego]" + nl + "[Customers].[All Customers].[USA].[OR].[Lebanon]" + nl + "[Customers].[All Customers].[USA].[OR].[Milwaukie]" + nl + "[Customers].[All Customers].[USA].[OR].[Oregon City]" + nl + "[Customers].[All Customers].[USA].[OR].[Portland]" + nl + "[Customers].[All Customers].[USA].[OR].[Salem]" + nl + "[Customers].[All Customers].[USA].[OR].[W. Linn]" + nl + "[Customers].[All Customers].[USA].[OR].[Woodburn]" + nl + "[Customers].[All Customers].[USA].[WA].[Anacortes]" + nl + "[Customers].[All Customers].[USA].[WA].[Ballard]" + nl + "[Customers].[All Customers].[USA].[WA].[Bellingham]"); } public void testRangeStartEqualsEnd(FoodMartTestCase test) { test.assertAxisReturns("[Time].[1997].[Q3].[7] : [Time].[1997].[Q3].[7]", "[Time].[1997].[Q3].[7]"); } public void testRangeStartEqualsEndLarge(FoodMartTestCase test) { test.assertAxisReturns("[Customers].[USA].[CA] : [Customers].[USA].[CA]", "[Customers].[All Customers].[USA].[CA]"); } public void testRangeEndBeforeStart(FoodMartTestCase test) { test.assertAxisReturns("[Time].[1997].[Q3].[7] : [Time].[1997].[Q2].[5]", "[Time].[1997].[Q2].[5]" + nl + "[Time].[1997].[Q2].[6]" + nl + "[Time].[1997].[Q3].[7]"); // same as if reversed } public void testRangeEndBeforeStartLarge(FoodMartTestCase test) { test.assertAxisReturns("[Customers].[USA].[WA] : [Customers].[USA].[CA]", "[Customers].[All Customers].[USA].[CA]" + nl + "[Customers].[All Customers].[USA].[OR]" + nl + "[Customers].[All Customers].[USA].[WA]"); } public void testRangeBetweenDifferentLevelsIsError(FoodMartTestCase test) { test.assertAxisThrows("[Time].[1997].[Q2] : [Time].[1997].[Q2].[5]", "Members must belong to the same level"); } public void testRangeBoundedByAll(FoodMartTestCase test) { test.assertAxisReturns("[Gender] : [Gender]", "[Gender].[All Gender]"); } public void testRangeBoundedByAllLarge(FoodMartTestCase test) { test.assertAxisReturns("[Customers].DefaultMember : [Customers]", "[Customers].[All Customers]"); } public void testRangeBoundedByNull(FoodMartTestCase test) { test.assertAxisReturns("[Gender].[F] : [Gender].[M].NextMember", ""); } public void testRangeBoundedByNullLarge(FoodMartTestCase test) { test.assertAxisReturns("[Customers].PrevMember : [Customers].[USA].[OR]", ""); } }); // special resolver for the "{...}" operator define(new ResolverBase( "{}", "{<Member> [, <Member>]...}", "Brace operator constructs a set.", Syntax.Braces) { public FunDef resolve(Exp[] args, int[] conversionCount) { int[] parameterTypes = new int[args.length]; for (int i = 0; i < args.length; i++) { if (canConvert( args[i], Category.Member, conversionCount)) { parameterTypes[i] = Category.Member; continue; } if (canConvert( args[i], Category.Set, conversionCount)) { parameterTypes[i] = Category.Set; continue; } if (canConvert( args[i], Category.Tuple, conversionCount)) { parameterTypes[i] = Category.Tuple; continue; } return null; } return new SetFunDef(this, parameterTypes); } public void testSetContainingLevelFails(FoodMartTestCase test) { test.assertAxisThrows( "[Store].[Store City]", "no function matches signature '{<Level>}'"); } public void testBug715177(FoodMartTestCase test) { test.runQueryCheckResult( "WITH MEMBER [Product].[All Products].[Non-Consumable].[Other] AS" + nl + " 'Sum( Except( [Product].[Product Department].Members," + nl + " TopCount( [Product].[Product Department].Members, 3 ))," + nl + " Measures.[Unit Sales] )'" + nl + "SELECT" + nl + " { [Measures].[Unit Sales] } ON COLUMNS ," + nl + " { TopCount( [Product].[Product Department].Members,3 )," + nl + " [Product].[All Products].[Non-Consumable].[Other] } ON ROWS" + nl + "FROM [Sales]", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Product].[All Products].[Drink].[Beverages]}" + nl + "{[Product].[All Products].[Drink].[Dairy]}" + nl + "{[Product].[All Products].[Non-Consumable].[Other]}" + nl + "Row #0: 6,838" + nl + "Row #1: 13,573" + nl + "Row #2: 4,186" + nl + "Row #3: 242,176" + nl); } public void testBug714707(FoodMartTestCase test) { // Same issue as bug 715177 -- "children" returns immutable // list, which set operator must make mutable. test.assertAxisReturns("{[Store].[USA].[CA].children, [Store].[USA]}", "[Store].[All Stores].[USA].[CA].[Alameda]" + nl + "[Store].[All Stores].[USA].[CA].[Beverly Hills]" + nl + "[Store].[All Stores].[USA].[CA].[Los Angeles]" + nl + "[Store].[All Stores].[USA].[CA].[San Diego]" + nl + "[Store].[All Stores].[USA].[CA].[San Francisco]" + nl + "[Store].[All Stores].[USA]"); } public void todo_testBug715177c(FoodMartTestCase test) { test.assertAxisReturns("Order(TopCount({[Store].[USA].[CA].children}, [Measures].[Unit Sales], 2), [Measures].[Unit Sales])", "foo"); } }); // // STRING FUNCTIONS define(new MultiResolver("Format", "Format(<Numeric Expression>, <String Expression>)", "Formats a number to string.", new String[] { "fSmS", "fSnS" }) { protected FunDef createFunDef(final Exp[] args, final FunDef dummyFunDef) { final Locale locale = Locale.getDefault(); // todo: use connection's locale if (args[1] instanceof Literal) { // Constant string expression: optimize by compiling // format string. String formatString = (String) ((Literal) args[1]).getValue(); final Format format = new Format(formatString, locale); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o = getDoubleArg(evaluator, args, 0); return format.format(o); } }; } else { // Variable string expression return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o = getDoubleArg(evaluator, args, 0); String formatString = getStringArg(evaluator, args, 1, null); final Format format = new Format(formatString, locale); return format.format(o); } }; } } public void testFormatFixed(FoodMartTestCase test) { String s = test.executeExpr("Format(12.2, \"#,##0.00\")"); Assert.assertEquals("12.20", s); } public void testFormatVariable(FoodMartTestCase test) { String s = test.executeExpr("Format(1234.5, \"#,#\" || \"#0.00\")"); Assert.assertEquals("1,234.50", s); } }); define(new FunDefBase("IIf", "IIf(<Logical Expression>, <String Expression1>, <String Expression2>)", "Returns one of two string values determined by a logical test.", "fSbSS") { public Object evaluate(Evaluator evaluator, Exp[] args) { boolean logical = getBooleanArg(evaluator, args, 0); return getStringArg(evaluator, args, logical ? 1 : 2, null); } public void testIIf(FoodMartTestCase test) { String s = test.executeExpr( "IIf(([Measures].[Unit Sales],[Product].[Drink].[Alcoholic Beverages].[Beer and Wine]) > 100, \"Yes\",\"No\")"); Assert.assertEquals("Yes", s); } }); define(new FunDefBase("Name", "<Dimension>.Name", "Returns the name of a dimension.", "pSd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = getDimensionArg(evaluator, args, 0, true); return dimension.getName(); } public void testDimensionName(FoodMartTestCase test) { String s = test.executeExpr("[Time].[1997].Dimension.Name"); Assert.assertEquals("Time", s); } }); define(new FunDefBase("Name", "<Hierarchy>.Name", "Returns the name of a hierarchy.", "pSh") { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = getHierarchyArg(evaluator, args, 0, true); return hierarchy.getName(); } public void testHierarchyName(FoodMartTestCase test) { String s = test.executeExpr( "[Time].[1997].Hierarchy.Name"); Assert.assertEquals("Time", s); } }); define(new FunDefBase("Name", "<Level>.Name", "Returns the name of a level.", "pSl") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, true); return level.getName(); } public void testLevelName(FoodMartTestCase test) { String s = test.executeExpr("[Time].[1997].Level.Name"); Assert.assertEquals("Year", s); } }); define(new FunDefBase("Name", "<Member>.Name", "Returns the name of a member.", "pSm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.getName(); } public void testMemberName(FoodMartTestCase test) { String s = test.executeExpr("[Time].[1997].Name"); Assert.assertEquals("1997", s); } }); define(new FunDefBase("SetToStr", "SetToStr(<Set>)", "Constructs a string from a set.", "fSx")); define(new FunDefBase("TupleToStr", "TupleToStr(<Tuple>)", "Constructs a string from a tuple.", "fSt")); define(new FunDefBase("UniqueName", "<Dimension>.UniqueName", "Returns the unique name of a dimension.", "pSd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = getDimensionArg(evaluator, args, 0, true); return dimension.getUniqueName(); } public void testDimensionUniqueName(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].DefaultMember.Dimension.UniqueName"); Assert.assertEquals("[Gender]", s); } }); define(new FunDefBase("UniqueName", "<Hierarchy>.UniqueName", "Returns the unique name of a hierarchy.", "pSh") { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = getHierarchyArg(evaluator, args, 0, true); return hierarchy.getUniqueName(); } public void testHierarchyUniqueName(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].DefaultMember.Hierarchy.UniqueName"); Assert.assertEquals("[Gender]", s); } }); define(new FunDefBase("UniqueName", "<Level>.UniqueName", "Returns the unique name of a level.", "pSl") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, true); return level.getUniqueName(); } public void testLevelUniqueName(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].DefaultMember.Level.UniqueName"); Assert.assertEquals("[Gender].[(All)]", s); } }); define(new FunDefBase("UniqueName", "<Member>.UniqueName", "Returns the unique name of a member.", "pSm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.getUniqueName(); } public void testMemberUniqueName(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].DefaultMember.UniqueName"); Assert.assertEquals("[Gender].[All Gender]", s); } public void testMemberUniqueNameOfNull(FoodMartTestCase test) { String s = test.executeExpr( "[Measures].[Unit Sales].FirstChild.UniqueName"); Assert.assertEquals("[Measures].[#Null]", s); // MSOLAP gives "" here } }); // // TUPLE FUNCTIONS define(new FunDefBase("Current", "<Set>.Current", "Returns the current tuple from a set during an iteration.", "ptx")); if (false) define(new FunDefBase("Item", "<Set>.Item(<String Expression>[, <String Expression>...] | <Index>)", "Returns a tuple from a set.", "mt*")); define(new FunDefBase("StrToTuple", "StrToTuple(<String Expression>)", "Constructs a tuple from a string.", "ftS") { public Hierarchy getHierarchy(Exp[] args) { // StrToTuple(s, <Hie1>, ... <HieN>) is of type [Hie1] x // ... x [HieN]; so, for example, So // StrToTuple("[Time].[1997]", [Time]) is of type [Time]. // But if n > 1, we cannot represent the compound type, and // we return null. return (args.length == 2) ? (Hierarchy) args[1] : null; } }); // special resolver for "()" define(new ResolverBase("()", null, null, Syntax.Parentheses) { public FunDef resolve(Exp[] args, int[] conversionCount) { // Compare with TupleFunDef.getReturnType(). For example, // ([Gender].members) is a set, // ([Gender].[M]) is a member, // (1 + 2) is a numeric, // but // ([Gender].[M], [Marital Status].[S]) is a tuple. if (args.length == 1) { return new ParenthesesFunDef(args[0].getType()); } else { return new TupleFunDef(ExpBase.getTypes(args)); } } }); // // GENERIC VALUE FUNCTIONS define(new ResolverBase( "CoalesceEmpty", "CoalesceEmpty(<Value Expression>[, <Value Expression>]...)", "Coalesces an empty cell value to a different value. All of the expressions must be of the same type (number or string).", Syntax.Function) { public FunDef resolve(Exp[] args, int[] conversionCount) { if (args.length < 1) { return null; } final int[] types = {Category.Numeric, Category.String}; for (int j = 0; j < types.length; j++) { int type = types[j]; int matchingArgs = 0; conversionCount[0] = 0; for (int i = 0; i < args.length; i++) { if (canConvert(args[i], type, conversionCount)) { matchingArgs++; } } if (matchingArgs == args.length) { return new FunDefBase(this, type, ExpBase.getTypes(args)); } } return null; } public boolean requiresExpression(int k) { return true; } }); define(new ResolverBase( "_CaseTest", "Case When <Logical Expression> Then <Expression> [...] [Else <Expression>] End", "Evaluates various conditions, and returns the corresponding expression for the first which evaluates to true.", Syntax.Case) { public FunDef resolve(Exp[] args, int[] conversionCount) { if (args.length < 1) { return null; } int j = 0, clauseCount = args.length / 2, mismatchingArgs = 0; int returnType = args[1].getType(); for (int i = 0; i < clauseCount; i++) { if (!canConvert(args[j++], Category.Logical, conversionCount)) { mismatchingArgs++; } if (!canConvert(args[j++], returnType, conversionCount)) { mismatchingArgs++; } } if (j < args.length) { if (!canConvert(args[j++], returnType, conversionCount)) { mismatchingArgs++; } } Util.assertTrue(j == args.length); if (mismatchingArgs == 0) { return new FunDefBase(this, returnType, ExpBase.getTypes(args)) { // implement FunDef public Object evaluate(Evaluator evaluator, Exp[] args) { return evaluateCaseTest(evaluator, args); } }; } else { return null; } } public boolean requiresExpression(int k) { return true; } Object evaluateCaseTest(Evaluator evaluator, Exp[] args) { int clauseCount = args.length / 2, j = 0; for (int i = 0; i < clauseCount; i++) { boolean logical = getBooleanArg(evaluator, args, j++); if (logical) { return getArg(evaluator, args, j); } else { j++; } } if (j < args.length) { return getArg(evaluator, args, j); // ELSE } else { return null; } } public void testCaseTestMatch(FoodMartTestCase test) { String s = test.executeExpr( "CASE WHEN 1=0 THEN \"first\" WHEN 1=1 THEN \"second\" WHEN 1=2 THEN \"third\" ELSE \"fourth\" END"); Assert.assertEquals("second", s); } public void testCaseTestMatchElse(FoodMartTestCase test) { String s = test.executeExpr( "CASE WHEN 1=0 THEN \"first\" ELSE \"fourth\" END"); Assert.assertEquals("fourth", s); } public void testCaseTestMatchNoElse(FoodMartTestCase test) { String s = test.executeExpr( "CASE WHEN 1=0 THEN \"first\" END"); Assert.assertEquals("(null)", s); } }); define(new ResolverBase( "_CaseMatch", "Case <Expression> When <Expression> Then <Expression> [...] [Else <Expression>] End", "Evaluates various expressions, and returns the corresponding expression for the first which matches a particular value.", Syntax.Case) { public FunDef resolve(Exp[] args, int[] conversionCount) { if (args.length < 3) { return null; } int valueType = args[0].getType(); int returnType = args[2].getType(); int j = 0, clauseCount = (args.length - 1) / 2, mismatchingArgs = 0; if (!canConvert(args[j++], valueType, conversionCount)) { mismatchingArgs++; } for (int i = 0; i < clauseCount; i++) { if (!canConvert(args[j++], valueType, conversionCount)) { mismatchingArgs++; } if (!canConvert(args[j++], returnType, conversionCount)) { mismatchingArgs++; } } if (j < args.length) { if (!canConvert(args[j++], returnType, conversionCount)) { mismatchingArgs++; } } Util.assertTrue(j == args.length); if (mismatchingArgs == 0) { return new FunDefBase(this, returnType, ExpBase.getTypes(args)) { // implement FunDef public Object evaluate(Evaluator evaluator, Exp[] args) { return evaluateCaseMatch(evaluator, args); } }; } else { return null; } } public boolean requiresExpression(int k) { return true; } Object evaluateCaseMatch(Evaluator evaluator, Exp[] args) { int clauseCount = (args.length - 1)/ 2, j = 0; Object value = getArg(evaluator, args, j++); for (int i = 0; i < clauseCount; i++) { Object match = getArg(evaluator, args, j++); if (match.equals(value)) { return getArg(evaluator, args, j); } else { j++; } } if (j < args.length) { return getArg(evaluator, args, j); // ELSE } else { return null; } } public void testCaseMatch(FoodMartTestCase test) { String s = test.executeExpr( "CASE 2 WHEN 1 THEN \"first\" WHEN 2 THEN \"second\" WHEN 3 THEN \"third\" ELSE \"fourth\" END"); Assert.assertEquals("second", s); } public void testCaseMatchElse(FoodMartTestCase test) { String s = test.executeExpr( "CASE 7 WHEN 1 THEN \"first\" ELSE \"fourth\" END"); Assert.assertEquals("fourth", s); } public void testCaseMatchNoElse(FoodMartTestCase test) { String s = test.executeExpr( "CASE 8 WHEN 0 THEN \"first\" END"); Assert.assertEquals("(null)", s); } }); define(new ResolverBase( "Properties", "<Member>.Properties(<String Expression>)", "Returns the value of a member property.", Syntax.Method) { public FunDef resolve(Exp[] args, int[] conversionCount) { final int[] argTypes = new int[]{Category.Member, Category.String}; if (args.length != 2 || args[0].getType() != Category.Member || args[1].getType() != Category.String) { return null; } int returnType; if (args[1] instanceof Literal) { String propertyName = (String) ((Literal) args[1]).getValue(); Hierarchy hierarchy = args[0].getHierarchy(); Level[] levels = hierarchy.getLevels(); Property property = lookupProperty( levels[levels.length - 1], propertyName); if (property == null) { // we'll likely get a runtime error returnType = Category.Value; } else { switch (property.getType()) { case Property.TYPE_BOOLEAN: returnType = Category.Logical; break; case Property.TYPE_NUMERIC: returnType = Category.Numeric; break; case Property.TYPE_STRING: returnType = Category.String; break; default: throw Util.newInternal("Unknown property type " + property.getType()); } } } else { returnType = Category.Value; } return new PropertiesFunDef(name, signature, description, syntax, returnType, argTypes); } public boolean requiresExpression(int k) { return true; } public void testPropertiesExpr(FoodMartTestCase test) { String s = test.executeExpr( "[Store].[USA].[CA].[Beverly Hills].[Store 6].Properties(\"Store Type\")"); Assert.assertEquals("Gourmet Supermarket", s); } /** Tests that non-existent property throws an error. **/ public void testPropertiesNonExistent(FoodMartTestCase test) { test.assertExprThrows( "[Store].[USA].[CA].[Beverly Hills].[Store 6].Properties(\"Foo\")", "Property 'Foo' is not valid for"); } public void testPropertiesFilter(FoodMartTestCase test) { Result result = test.execute( "SELECT { [Store Sales] } ON COLUMNS," + nl + " TOPCOUNT( Filter( [Store].[Store Name].Members," + nl + " [Store].CurrentMember.Properties(\"Store Type\") = \"Supermarket\" )," + nl + " 10, [Store Sales]) ON ROWS" + nl + "FROM [Sales]"); Assert.assertEquals(8, result.getAxes()[1].positions.length); } public void testPropertyInCalculatedMember(FoodMartTestCase test) { Result result = test.execute( "WITH MEMBER [Measures].[Store Sales per Sqft]" + nl + "AS '[Measures].[Store Sales] / " + " [Store].CurrentMember.Properties(\"Store Sqft\")'" + nl + "SELECT " + nl + " {[Measures].[Unit Sales], [Measures].[Store Sales per Sqft]} ON COLUMNS," + nl + " {[Store].[Store Name].members} ON ROWS" + nl + "FROM Sales"); Member member; Cell cell; member = result.getAxes()[1].positions[18].members[0]; Assert.assertEquals("[Store].[All Stores].[USA].[WA].[Bellingham].[Store 2]", member.getUniqueName()); cell = result.getCell(new int[] {0,18}); Assert.assertEquals("2,237", cell.getFormattedValue()); cell = result.getCell(new int[] {1,18}); Assert.assertEquals(".17", cell.getFormattedValue()); member = result.getAxes()[1].positions[3].members[0]; Assert.assertEquals("[Store].[All Stores].[Mexico].[DF].[San Andres].[Store 21]", member.getUniqueName()); cell = result.getCell(new int[] {0,3}); Assert.assertEquals("(null)", cell.getFormattedValue()); cell = result.getCell(new int[] {1,3}); Assert.assertEquals("NaN", cell.getFormattedValue()); } }); // // PARAMETER FUNCTIONS defineReserved(new String[] {"NUMERIC","STRING"}); define(new MultiResolver("Parameter", "Parameter(<Name>, <Type>, <DefaultValue>, <Description>)", "Returns default value of parameter.", new String[] { "fS#yS#", "fs#yS", // Parameter(string const, symbol, string[, string const]): string "fn#yn#", "fn#yn", // Parameter(string const, symbol, numeric[, string const]): numeric "fm#hm#", "fm#hm", // Parameter(string const, hierarchy constant, member[, string const]): member }) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { String parameterName; if (args[0] instanceof Literal && args[0].getType() == Category.String) { parameterName = (String) ((Literal) args[0]).getValue(); } else { throw newEvalException(dummyFunDef, "Parameter name must be a string constant"); } Exp typeArg = args[1]; Hierarchy hierarchy; int type; switch (typeArg.getType()) { case Category.Hierarchy: case Category.Dimension: hierarchy = typeArg.getHierarchy(); if (hierarchy == null || !isConstantHierarchy(typeArg)) { throw newEvalException(dummyFunDef, "Invalid hierarchy for parameter '" + parameterName + "'"); } type = Category.Member; break; case Category.Symbol: hierarchy = null; String s = (String) ((Literal) typeArg).getValue(); if (s.equalsIgnoreCase("NUMERIC")) { type = Category.Numeric; break; } else if (s.equalsIgnoreCase("STRING")) { type = Category.String; break; } // fall through and throw error default: // Error is internal because the function call has already been // type-checked. throw newEvalException(dummyFunDef, "Invalid type for parameter '" + parameterName + "'; expecting NUMERIC, STRING or a hierarchy"); } Exp exp = args[2]; if (exp.getType() != type) { String typeName = Category.instance.getName(type).toUpperCase(); throw newEvalException(dummyFunDef, "Default value of parameter '" + parameterName + "' is inconsistent with its type, " + typeName); } if (type == Category.Member) { Hierarchy expHierarchy = exp.getHierarchy(); if (expHierarchy != hierarchy) { throw newEvalException(dummyFunDef, "Default value of parameter '" + parameterName + "' must belong to the hierarchy " + hierarchy); } } String parameterDescription = null; if (args.length > 3) { if (args[3] instanceof Literal && args[3].getType() == Category.String) { parameterDescription = (String) ((Literal) args[3]).getValue(); } else { throw newEvalException(dummyFunDef, "Description of parameter '" + parameterName + "' must be a string constant"); } } return new ParameterFunDef(dummyFunDef, parameterName, hierarchy, type, exp, parameterDescription); } }); define(new MultiResolver("ParamRef", "ParamRef(<Name>)", "Returns current value of parameter. If it's null, returns default.", new String[] {"fv#"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { String parameterName; if (args[0] instanceof Literal && args[0].getType() == Category.String) { parameterName = (String) ((Literal) args[0]).getValue(); } else { throw newEvalException(dummyFunDef, "Parameter name must be a string constant"); } return new ParameterFunDef(dummyFunDef, parameterName, null, Category.Unknown, null, null); } }); // // OPERATORS define(new FunDefBase("+", "<Numeric Expression> + <Numeric Expression>", "Adds two numbers.", "innn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return new Double(o0.doubleValue() + o1.doubleValue()); } public void testPlus(FoodMartTestCase test) { String s = test.executeExpr("1+2"); Assert.assertEquals("3", s); } }); define(new FunDefBase("-", "<Numeric Expression> - <Numeric Expression>", "Subtracts two numbers.", "innn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return new Double(o0.doubleValue() - o1.doubleValue()); } public void testMinus(FoodMartTestCase test) { String s = test.executeExpr("1-3"); Assert.assertEquals("-2", s); } public void testMinusAssociativity(FoodMartTestCase test) { String s = test.executeExpr("11-7-5"); // right-associative would give 11-(7-5) = 9, which is wrong Assert.assertEquals("-1", s); } }); define(new FunDefBase("*", "<Numeric Expression> * <Numeric Expression>", "Multiplies two numbers.", "innn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return new Double(o0.doubleValue() * o1.doubleValue()); } public void testMultiply(FoodMartTestCase test) { String s = test.executeExpr("4*7"); Assert.assertEquals("28", s); } public void testMultiplyPrecedence(FoodMartTestCase test) { String s = test.executeExpr("3 + 4 * 5 + 6"); Assert.assertEquals("29", s); } /** Bug 774807 caused expressions to be mistaken for the crossjoin * operator. */ public void testMultiplyBug774807(FoodMartTestCase test) { final String desiredResult = "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Store].[All Stores]}" + nl + "Axis #2:" + nl + "{[Measures].[Store Sales]}" + nl + "{[Measures].[A]}" + nl + "Row #0: 565,238.13" + nl + "Row #1: 319,494,143,605.90" + nl; test.runQueryCheckResult( "WITH MEMBER [Measures].[A] AS" + nl + " '([Measures].[Store Sales] * [Measures].[Store Sales])'" + nl + "SELECT {[Store]} ON COLUMNS," + nl + " {[Measures].[Store Sales], [Measures].[A]} ON ROWS" + nl + "FROM Sales", desiredResult); // as above, no parentheses test.runQueryCheckResult( "WITH MEMBER [Measures].[A] AS" + nl + " '[Measures].[Store Sales] * [Measures].[Store Sales]'" + nl + "SELECT {[Store]} ON COLUMNS," + nl + " {[Measures].[Store Sales], [Measures].[A]} ON ROWS" + nl + "FROM Sales", desiredResult); // as above, plus 0 test.runQueryCheckResult( "WITH MEMBER [Measures].[A] AS" + nl + " '[Measures].[Store Sales] * [Measures].[Store Sales] + 0'" + nl + "SELECT {[Store]} ON COLUMNS," + nl + " {[Measures].[Store Sales], [Measures].[A]} ON ROWS" + nl + "FROM Sales", desiredResult); } }); define(new FunDefBase("/", "<Numeric Expression> / <Numeric Expression>", "Divides two numbers.", "innn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); Double result = new Double(o0.doubleValue() / o1.doubleValue()); return result; } // todo: use this, via reflection public double evaluate(double d1, double d2) { return d1 / d2; } public void testDivide(FoodMartTestCase test) { String s = test.executeExpr("10 / 5"); Assert.assertEquals("2", s); } public void testDivideByZero(FoodMartTestCase test) { String s = test.executeExpr("-3 / (2 - 2)"); Assert.assertEquals("-Infinity", s); } public void testDividePrecedence(FoodMartTestCase test) { String s = test.executeExpr("24 / 4 / 2 * 10 - -1"); Assert.assertEquals("31", s); } }); define(new FunDefBase("-", "- <Numeric Expression>", "Returns the negative of a number.", "Pnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0); return new Double(- o0.doubleValue()); } public void testUnaryMinus(FoodMartTestCase test) { String s = test.executeExpr("-3"); Assert.assertEquals("-3", s); } public void testUnaryMinusMember(FoodMartTestCase test) { String s = test.executeExpr("- ([Measures].[Unit Sales],[Gender].[F])"); Assert.assertEquals("-131,558", s); } public void testUnaryMinusPrecedence(FoodMartTestCase test) { String s = test.executeExpr("1 - -10.5 * 2 -3"); Assert.assertEquals("19", s); } }); define(new FunDefBase("||", "<String Expression> || <String Expression>", "Concatenates two strings.", "iSSS") { public Object evaluate(Evaluator evaluator, Exp[] args) { String o0 = getStringArg(evaluator, args, 0, null), o1 = getStringArg(evaluator, args, 1, null); return o0 + o1; } public void testStringConcat(FoodMartTestCase test) { String s = test.executeExpr(" \"foo\" || \"bar\" "); Assert.assertEquals("foobar", s); } public void testStringConcat2(FoodMartTestCase test) { String s = test.executeExpr(" \"foo\" || [Gender].[M].Name || \"\" "); Assert.assertEquals("fooM", s); } }); define(new FunDefBase("AND", "<Logical Expression> AND <Logical Expression>", "Returns the conjunction of two conditions.", "ibbb") { public Object evaluate(Evaluator evaluator, Exp[] args) { return toBoolean( getBooleanArg(evaluator, args, 0) && getBooleanArg(evaluator, args, 1)); } public void testAnd(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 AND 2=2 "); Assert.assertEquals("true", s); } public void testAnd2(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 AND 2=0 "); Assert.assertEquals("false", s); } }); define(new FunDefBase("OR", "<Logical Expression> OR <Logical Expression>", "Returns the disjunction of two conditions.", "ibbb") { public Object evaluate(Evaluator evaluator, Exp[] args) { // Only evaluate 2nd if first is false. return toBoolean( getBooleanArg(evaluator, args, 0) || getBooleanArg(evaluator, args, 1)); } public void testOr(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=0 OR 2=0 "); Assert.assertEquals("false", s); } public void testOr2(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=0 OR 0=0 "); Assert.assertEquals("true", s); } public void testOrAssociativity1(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 AND 1=0 OR 1=1 "); // Would give 'false' if OR were stronger than AND (wrong!) Assert.assertEquals("true", s); } public void testOrAssociativity2(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 OR 1=0 AND 1=1 "); // Would give 'false' if OR were stronger than AND (wrong!) Assert.assertEquals("true", s); } public void testOrAssociativity3(FoodMartTestCase test) { String s = test.executeBooleanExpr(" (1=0 OR 1=1) AND 1=1 "); Assert.assertEquals("true", s); } }); define(new FunDefBase("XOR", "<Logical Expression> XOR <Logical Expression>", "Returns whether two conditions are mutually exclusive.", "ibbb") { public Object evaluate(Evaluator evaluator, Exp[] args) { final boolean b0 = getBooleanArg(evaluator, args, 0); final boolean b1 = getBooleanArg(evaluator, args, 1); return toBoolean(b0 != b1); } public void testXor(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 XOR 2=2 "); Assert.assertEquals("false", s); } public void testXorAssociativity(FoodMartTestCase test) { // Would give 'false' if XOR were stronger than AND (wrong!) String s = test.executeBooleanExpr(" 1 = 1 AND 1 = 1 XOR 1 = 0 "); Assert.assertEquals("true", s); } }); define(new FunDefBase("NOT", "NOT <Logical Expression>", "Returns the negation of a condition.", "Pbb") { public Object evaluate(Evaluator evaluator, Exp[] args) { return toBoolean(!getBooleanArg(evaluator, args, 0)); } public void testNot(FoodMartTestCase test) { String s = test.executeBooleanExpr(" NOT 1=1 "); Assert.assertEquals("false", s); } public void testNotNot(FoodMartTestCase test) { String s = test.executeBooleanExpr(" NOT NOT 1=1 "); Assert.assertEquals("true", s); } public void testNotAssociativity(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 AND NOT 1=1 OR NOT 1=1 AND 1=1 "); Assert.assertEquals("false", s); } }); define(new FunDefBase("=", "<String Expression> = <String Expression>", "Returns whether two expressions are equal.", "ibSS") { public Object evaluate(Evaluator evaluator, Exp[] args) { String o0 = getStringArg(evaluator, args, 0, null), o1 = getStringArg(evaluator, args, 1, null); return toBoolean(o0.equals(o1)); } public void testStringEquals(FoodMartTestCase test) { String s = test.executeBooleanExpr(" \"foo\" = \"bar\" "); Assert.assertEquals("false", s); } public void testStringEqualsAssociativity(FoodMartTestCase test) { String s = test.executeBooleanExpr(" \"foo\" = \"fo\" || \"o\" "); Assert.assertEquals("true", s); } public void testStringEqualsEmpty(FoodMartTestCase test) { String s = test.executeBooleanExpr(" \"\" = \"\" "); Assert.assertEquals("true", s); } }); define(new FunDefBase("=", "<Numeric Expression> = <Numeric Expression>", "Returns whether two expressions are equal.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(o0.equals(o1)); } public void testEq(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1.0 = 1 "); Assert.assertEquals("true", s); } }); define(new FunDefBase("<>", "<String Expression> <> <String Expression>", "Returns whether two expressions are not equal.", "ibSS") { public Object evaluate(Evaluator evaluator, Exp[] args) { String o0 = getStringArg(evaluator, args, 0, null), o1 = getStringArg(evaluator, args, 1, null); return toBoolean(!o0.equals(o1)); } public void testStringNe(FoodMartTestCase test) { String s = test.executeBooleanExpr(" \"foo\" <> \"bar\" "); Assert.assertEquals("true", s); } }); define(new FunDefBase("<>", "<Numeric Expression> <> <Numeric Expression>", "Returns whether two expressions are not equal.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(!o0.equals(o1)); } public void testNe(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 2 <> 1.0 + 1.0 "); Assert.assertEquals("false", s); } public void testNeInfinity(FoodMartTestCase test) { String s = test.executeBooleanExpr("(1 / 0) <> (1 / 0)"); // Infinity does not equal itself Assert.assertEquals("false", s); } }); define(new FunDefBase("<", "<Numeric Expression> < <Numeric Expression>", "Returns whether an expression is less than another.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(o0.compareTo(o1) < 0); } public void testLt(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 2 < 1.0 + 1.0 "); Assert.assertEquals("false", s); } }); define(new FunDefBase("<=", "<Numeric Expression> <= <Numeric Expression>", "Returns whether an expression is less than or equal to another.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(o0.compareTo(o1) <= 0); } public void testLe(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 2 <= 1.0 + 1.0 "); Assert.assertEquals("true", s); } }); define(new FunDefBase(">", "<Numeric Expression> > <Numeric Expression>", "Returns whether an expression is greater than another.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(o0.compareTo(o1) > 0); } public void testGt(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 2 > 1.0 + 1.0 "); Assert.assertEquals("false", s); } }); define(new FunDefBase(">=", "<Numeric Expression> >= <Numeric Expression>", "Returns whether an expression is greater than or equal to another.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(o0.compareTo(o1) >= 0); } public void testGe(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 2 > 1.0 + 1.0 "); Assert.assertEquals("false", s); } }); }
|
37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/0ab3be7797c0940dd5a113451bfd9a43186433e0/BuiltinFunTable.java/clean/src/main/mondrian/olap/fun/BuiltinFunTable.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
4426,
7503,
1435,
288,
202,
202,
11255,
10435,
2932,
8560,
8863,
202,
202,
759,
1122,
1149,
30,
293,
33,
1396,
16,
312,
33,
1305,
16,
277,
33,
382,
904,
16,
453,
33,
2244,
202,
202,
759,
576,
4880,
30,
202,
202,
759,
14884,
13690,
55,
202,
202,
430,
261,
5743,
13,
4426,
12,
2704,
478,
318,
3262,
2171,
2932,
694,
11698,
3113,
315,
694,
11698,
12,
32,
694,
23224,
16,
411,
694,
34,
65,
2777,
63,
16,
411,
9902,
5371,
34,
65,
2225,
16,
315,
5692,
1245,
578,
1898,
1678,
358,
392,
526,
364,
999,
316,
279,
729,
17,
430,
261,
5743,
13,
2553,
445,
1199,
16,
315,
507,
7388,
10019,
202,
202,
759,
202,
202,
759,
463,
3114,
3156,
1146,
13690,
55,
202,
202,
11255,
12,
2704,
478,
318,
3262,
2171,
2932,
8611,
3113,
3532,
12074,
18652,
8611,
3113,
315,
1356,
326,
4968,
716,
1914,
279,
1269,
9360,
1199,
16,
315,
84,
19153,
7923,
288,
1082,
202,
482,
1033,
5956,
12,
15876,
18256,
16,
7784,
8526,
833,
13,
288,
9506,
202,
12074,
9360,
273,
7628,
6000,
4117,
12,
14168,
639,
16,
833,
16,
374,
16,
638,
1769,
9506,
202,
2463,
9360,
18,
588,
8611,
5621,
1082,
202,
97,
202,
202,
22938,
202,
202,
759,
14646,
44,
361,
358,
527,
333,
358,
336,
411,
12074,
18652,
8611,
358,
1440,
35,
202,
202,
11255,
12,
2704,
478,
318,
3262,
2171,
2932,
8611,
3113,
3532,
8611,
18652,
8611,
3113,
315,
1356,
326,
4968,
716,
1914,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4426,
7503,
1435,
288,
202,
202,
11255,
10435,
2932,
8560,
8863,
202,
202,
759,
1122,
1149,
30,
293,
33,
1396,
16,
312,
33,
1305,
16,
277,
33,
382,
904,
16,
453,
33,
2244,
202,
202,
759,
576,
4880,
30,
202,
202,
759,
14884,
13690,
55,
202,
202,
430,
261,
5743,
13,
4426,
12,
2704,
478,
318,
3262,
2171,
2932,
694,
11698,
3113,
315,
694,
11698,
12,
32,
694,
23224,
16,
411,
694,
34,
65,
2777,
63,
16,
411,
9902,
5371,
34,
65,
2225,
16,
315,
5692,
1245,
578,
1898,
1678,
358,
392,
526,
364,
999,
316,
279,
729,
17,
430,
261,
5743,
13,
2553,
445,
1199,
16,
315,
507,
7388,
10019,
202,
202,
759,
202,
2
] |
return this; }
|
return this; }
|
public RubyModule alias_method(RubyObject newId, RubyObject oldId) { aliasMethod(newId.toId(), oldId.toId()); return this; }
|
48300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48300/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/clean/org/jruby/RubyModule.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
3120,
2308,
67,
2039,
12,
54,
10340,
921,
27598,
16,
19817,
921,
1592,
548,
13,
288,
202,
202,
4930,
1305,
12,
2704,
548,
18,
869,
548,
9334,
1592,
548,
18,
869,
548,
10663,
202,
202,
2463,
333,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
19817,
3120,
2308,
67,
2039,
12,
54,
10340,
921,
27598,
16,
19817,
921,
1592,
548,
13,
288,
202,
202,
4930,
1305,
12,
2704,
548,
18,
869,
548,
9334,
1592,
548,
18,
869,
548,
10663,
202,
202,
2463,
333,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
int transferType = getTransferType(); if (getTransferType() != data.getDataType()) { throw new IllegalArgumentException("transfer type ("+ getTransferType()+"), "+ "does not match data "+ "buffer type (" + data.getDataType() + ")."); } try { switch (transferType) { case DataBuffer.TYPE_BYTE: { DataBufferByte out = (DataBufferByte) data; byte[] in = (byte[]) obj; out.getData()[offset] = in[0]; return; } case DataBuffer.TYPE_USHORT: { DataBufferUShort out = (DataBufferUShort) data; short[] in = (short[]) obj; out.getData()[offset] = in[0]; return; } case DataBuffer.TYPE_INT: { DataBufferInt out = (DataBufferInt) data; int[] in = (int[]) obj; out.getData()[offset] = in[0]; return; } default: throw new InternalError(); } } catch (ArrayIndexOutOfBoundsException aioobe) { String msg = "While writing data elements" + ", x="+x+", y="+y+ ", width="+width+", height="+height+ ", scanlineStride="+scanlineStride+ ", offset="+offset+ ", data.getSize()="+data.getSize()+ ", data.getOffset()="+data.getOffset()+ ": " + aioobe; throw new ArrayIndexOutOfBoundsException(msg); }
|
Object pixelData; switch (getTransferType()) { case DataBuffer.TYPE_BYTE: pixelData = ((DataBufferByte) data).getData(); break; case DataBuffer.TYPE_USHORT: pixelData = ((DataBufferUShort) data).getData(); break; case DataBuffer.TYPE_INT: pixelData = ((DataBufferInt) data).getData(); break; default: throw new ClassCastException();
|
public void setDataElements(int x, int y, Object obj, DataBuffer data) { int offset = scanlineStride*y + x + data.getOffset(); int transferType = getTransferType(); if (getTransferType() != data.getDataType()) { throw new IllegalArgumentException("transfer type ("+ getTransferType()+"), "+ "does not match data "+ "buffer type (" + data.getDataType() + ")."); } try { switch (transferType) { case DataBuffer.TYPE_BYTE: { DataBufferByte out = (DataBufferByte) data; byte[] in = (byte[]) obj; out.getData()[offset] = in[0]; return; } case DataBuffer.TYPE_USHORT: { DataBufferUShort out = (DataBufferUShort) data; short[] in = (short[]) obj; out.getData()[offset] = in[0]; return; } case DataBuffer.TYPE_INT: { DataBufferInt out = (DataBufferInt) data; int[] in = (int[]) obj; out.getData()[offset] = in[0]; return; } // FIXME: Fill in the other possible types. default: throw new InternalError(); } } catch (ArrayIndexOutOfBoundsException aioobe) { String msg = "While writing data elements" + ", x="+x+", y="+y+ ", width="+width+", height="+height+ ", scanlineStride="+scanlineStride+ ", offset="+offset+ ", data.getSize()="+data.getSize()+ ", data.getOffset()="+data.getOffset()+ ": " + aioobe; throw new ArrayIndexOutOfBoundsException(msg); } }
|
56365 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56365/77090107412af73369ca78ff37cc42ab7072570b/SinglePixelPackedSampleModel.java/clean/libjava/java/awt/image/SinglePixelPackedSampleModel.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
7929,
3471,
12,
474,
619,
16,
509,
677,
16,
1033,
1081,
16,
1910,
1892,
501,
13,
225,
288,
565,
509,
1384,
273,
4135,
1369,
1585,
831,
14,
93,
397,
619,
397,
501,
18,
588,
2335,
5621,
3639,
509,
7412,
559,
273,
336,
5912,
559,
5621,
565,
309,
261,
588,
5912,
559,
1435,
480,
501,
18,
588,
6273,
10756,
1377,
288,
202,
12849,
394,
2754,
2932,
13866,
618,
7566,
15,
25083,
282,
336,
5912,
559,
1435,
9078,
3631,
13773,
25083,
282,
315,
20657,
486,
845,
501,
13773,
25083,
282,
315,
4106,
618,
7566,
397,
25083,
282,
501,
18,
588,
6273,
1435,
397,
25083,
282,
9369,
1199,
1769,
1377,
289,
565,
775,
1377,
288,
202,
9610,
261,
13866,
559,
13,
202,
225,
288,
202,
225,
648,
1910,
1892,
18,
2399,
67,
15377,
30,
202,
565,
288,
202,
1377,
1910,
1892,
3216,
596,
273,
261,
751,
1892,
3216,
13,
501,
31,
202,
1377,
1160,
8526,
316,
273,
261,
7229,
63,
5717,
1081,
31,
202,
1377,
596,
18,
588,
751,
1435,
63,
3348,
65,
273,
316,
63,
20,
15533,
202,
1377,
327,
31,
202,
565,
289,
202,
225,
648,
1910,
1892,
18,
2399,
67,
57,
15993,
30,
202,
565,
288,
202,
1377,
1910,
1892,
57,
4897,
596,
273,
261,
751,
1892,
57,
4897,
13,
501,
31,
202,
1377,
3025,
8526,
316,
273,
261,
6620,
63,
5717,
1081,
31,
202,
1377,
596,
18,
588,
751,
1435,
63,
3348,
65,
273,
316,
63,
20,
15533,
202,
1377,
327,
31,
202,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7929,
3471,
12,
474,
619,
16,
509,
677,
16,
1033,
1081,
16,
1910,
1892,
501,
13,
225,
288,
565,
509,
1384,
273,
4135,
1369,
1585,
831,
14,
93,
397,
619,
397,
501,
18,
588,
2335,
5621,
3639,
509,
7412,
559,
273,
336,
5912,
559,
5621,
565,
309,
261,
588,
5912,
559,
1435,
480,
501,
18,
588,
6273,
10756,
1377,
288,
202,
12849,
394,
2754,
2932,
13866,
618,
7566,
15,
25083,
282,
336,
5912,
559,
1435,
9078,
3631,
13773,
25083,
282,
315,
20657,
486,
845,
501,
13773,
25083,
282,
315,
4106,
618,
7566,
397,
25083,
282,
501,
18,
588,
6273,
1435,
397,
25083,
282,
9369,
1199,
1769,
1377,
289,
565,
775,
1377,
288,
202,
9610,
261,
13866,
2
] |
private boolean unloadUnit( Entity unloader, Targetable unloaded, Coords pos, int facing, int elevation ) { // We can only unload Entities. Entity unit = null; if ( unloaded instanceof Entity ) { unit = (Entity) unloaded; } else { return false; } // Unload the unit. if ( !unloader.unload( unit ) ) { return false; } // The unloaded unit is no longer being carried. unit.setTransportId( Entity.NONE ); // Place the unloaded unit onto the screen. unit.setPosition( pos ); // Units unloaded onto the screen are deployed. if ( pos != null ) { unit.setDeployed( true ); } // Point the unloaded unit in the given direction. unit.setFacing( facing ); unit.setSecondaryFacing( facing ); IHex hex = game.getBoard().getHex(pos); boolean isBridge = hex.containsTerrain(Terrains.PAVEMENT); if (unloader.getMovementMode() == IEntityMovementMode.VTOL) { if (unit.getMovementMode() == IEntityMovementMode.VTOL) { // Flying units onload to the same elevation as the flying transport unit.setElevation(elevation); } else if (game.getBoard().getBuildingAt(pos) != null) { // non-flying unit onloaded from a flying onto a building // -> sit on the roff unit.setElevation(hex.terrainLevel(Terrains.BLDG_ELEV)); } } else if (game.getBoard().getBuildingAt(pos) != null) { // non flying unit unloading units into a building // -> sit in the building at the same elevation unit.setElevation(elevation); } else if (hex.terrainLevel(Terrains.WATER)>0) { if (unit.getMovementMode() == IEntityMovementMode.HOVER || unit.getMovementMode() == IEntityMovementMode.HYDROFOIL || unit.getMovementMode() == IEntityMovementMode.NAVAL || unit.getMovementMode() == IEntityMovementMode.SUBMARINE || hex.containsTerrain(Terrains.ICE) || isBridge) { // units that can float stay on the surface, or we go on the bridge // this means elevation 0, because elevation is relative to the surface unit.setElevation(0); } } else { // default to the floor of the hex. // unit elevation is relative to the surface unit.setElevation(hex.floor() - hex.surface()); } doSetLocationsExposure(unit, hex, false, unit.getElevation()); // Update the unloaded unit. this.entityUpdate( unit.getId() ); // Unloaded successfully. return true; }
|
4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/cbe74d020e74a85c0e3b8ebf32d1ebc85c1ba62f/Server.java/buggy/megamek/src/megamek/server/Server.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
27060,
2802,
12,
3887,
640,
6714,
16,
5916,
429,
640,
4230,
16,
11794,
10320,
87,
949,
16,
509,
284,
5330,
16,
509,
19051,
262,
288,
3639,
368,
1660,
848,
1338,
27060,
16216,
18,
3639,
3887,
2836,
273,
446,
31,
3639,
309,
261,
640,
4230,
1276,
3887,
262,
288,
5411,
2836,
273,
261,
1943,
13,
640,
4230,
31,
3639,
289,
469,
288,
5411,
327,
629,
31,
3639,
289,
3639,
368,
1351,
945,
326,
2836,
18,
3639,
309,
261,
401,
318,
6714,
18,
318,
945,
12,
2836,
262,
262,
288,
5411,
327,
629,
31,
3639,
289,
3639,
368,
1021,
640,
4230,
2836,
353,
1158,
7144,
3832,
5926,
24012,
18,
3639,
2836,
18,
542,
6568,
548,
12,
3887,
18,
9826,
11272,
3639,
368,
13022,
326,
640,
4230,
2836,
10170,
326,
5518,
18,
3639,
2836,
18,
542,
2555,
12,
949,
11272,
3639,
368,
27845,
640,
4230,
10170,
326,
5518,
854,
19357,
18,
3639,
309,
261,
949,
480,
446,
262,
288,
5411,
2836,
18,
542,
31954,
12,
638,
11272,
3639,
289,
3639,
368,
4686,
326,
640,
4230,
2836,
316,
326,
864,
4068,
18,
3639,
2836,
18,
542,
42,
5330,
12,
284,
5330,
11272,
3639,
2836,
18,
542,
14893,
42,
5330,
12,
284,
5330,
11272,
7734,
467,
7037,
3827,
273,
7920,
18,
588,
22233,
7675,
588,
7037,
12,
917,
1769,
3639,
1250,
353,
13691,
273,
3827,
18,
12298,
56,
264,
7596,
12,
56,
264,
354,
2679,
18,
4066,
3412,
3212,
1769,
3639,
309,
261,
318,
6714,
18,
588,
49,
26140,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
27060,
2802,
12,
3887,
640,
6714,
16,
5916,
429,
640,
4230,
16,
11794,
10320,
87,
949,
16,
509,
284,
5330,
16,
509,
19051,
262,
288,
3639,
368,
1660,
848,
1338,
27060,
16216,
18,
3639,
3887,
2836,
273,
446,
31,
3639,
309,
261,
640,
4230,
1276,
3887,
262,
288,
5411,
2836,
273,
261,
1943,
13,
640,
4230,
31,
3639,
289,
469,
288,
5411,
327,
629,
31,
3639,
289,
3639,
368,
1351,
945,
326,
2836,
18,
3639,
309,
261,
401,
318,
6714,
18,
318,
945,
12,
2836,
262,
262,
288,
5411,
327,
629,
31,
3639,
289,
3639,
368,
1021,
640,
4230,
2836,
353,
1158,
7144,
3832,
5926,
24012,
18,
3639,
2836,
18,
542,
6568,
548,
12,
3887,
18,
2
] |
||
AST tmp1143_AST_in = (AST)_t;
|
AST tmp1142_AST_in = (AST)_t;
|
public final void inputoutputthroughstate(AST _t) throws RecognitionException { AST inputoutputthroughstate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t1557 = _t; AST tmp1142_AST_in = (AST)_t; match(_t,INPUTOUTPUT); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case STREAM: { stream_name(_t); _t = _retTree; break; } case THROUGH: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp1143_AST_in = (AST)_t; match(_t,THROUGH); _t = _t.getNextSibling(); io_phrase(_t); _t = _retTree; state_end(_t); _t = _retTree; _t = __t1557; _t = _t.getNextSibling(); _retTree = _t; }
|
13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser03.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser03/TreeParser03.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
810,
2844,
10064,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
810,
2844,
10064,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
13,
67,
88,
31,
9506,
202,
9053,
1001,
88,
23643,
27,
273,
389,
88,
31,
202,
202,
9053,
1853,
2499,
9452,
67,
9053,
67,
267,
273,
261,
9053,
13,
67,
88,
31,
202,
202,
1916,
24899,
88,
16,
15934,
15527,
1769,
202,
202,
67,
88,
273,
389,
88,
18,
588,
3759,
1763,
5621,
202,
202,
95,
202,
202,
430,
261,
67,
88,
631,
2011,
13,
389,
88,
33,
9053,
8560,
31,
202,
202,
9610,
261,
389,
88,
18,
588,
559,
10756,
288,
202,
202,
3593,
19917,
30,
202,
202,
95,
1082,
202,
3256,
67,
529,
24899,
88,
1769,
1082,
202,
67,
88,
273,
389,
1349,
2471,
31,
1082,
202,
8820,
31,
202,
202,
97,
202,
202,
3593,
7662,
1457,
57,
16715,
30,
202,
202,
95,
1082,
202,
8820,
31,
202,
202,
97,
202,
202,
1886,
30,
202,
202,
95,
1082,
202,
12849,
394,
17114,
24899,
88,
1769,
202,
202,
97,
202,
202,
97,
202,
202,
97,
202,
202,
9053,
1853,
2499,
8942,
67,
9053,
67,
267,
273,
261,
9053,
13,
67,
88,
31,
202,
202,
1916,
24899,
88,
16,
2455,
1457,
57,
16715,
1769,
202,
202,
67,
88,
273,
389,
88,
18,
588,
2134,
10291,
5621,
202,
202,
1594,
67,
9429,
24899,
88,
1769,
202,
202,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
810,
2844,
10064,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
810,
2844,
10064,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
13,
67,
88,
31,
9506,
202,
9053,
1001,
88,
23643,
27,
273,
389,
88,
31,
202,
202,
9053,
1853,
2499,
9452,
67,
9053,
67,
267,
273,
261,
9053,
13,
67,
88,
31,
202,
202,
1916,
24899,
88,
16,
15934,
15527,
1769,
202,
202,
67,
88,
273,
389,
88,
18,
588,
3759,
1763,
5621,
202,
202,
95,
202,
202,
430,
261,
67,
88,
631,
2011,
13,
389,
88,
33,
9053,
8560,
31,
202,
202,
9610,
261,
389,
88,
18,
2
] |
require ("version"); parseEq (); checkLegalVersion (version = readLiteral (flags)); if (!version.equals ("1.0")){ if(version.equals ("1.1")){ handler.warn ("expected XML version 1.0, not: " + version); xmlVersion = XML_11; }else { error("illegal XML version", version, "1.0 or 1.1"); } } else xmlVersion = XML_10; boolean white = tryWhitespace ();
|
skipWhitespace(); require("?>");
|
private String parseXMLDecl (boolean ignoreEncoding) throws SAXException, IOException { String version; String encodingName = null; String standalone = null; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; String inputEncoding = null; switch (this.encoding) { case ENCODING_EXTERNAL: case ENCODING_UTF_8: inputEncoding = "UTF-8"; break; case ENCODING_ISO_8859_1: inputEncoding = "ISO-8859-1"; break; case ENCODING_UCS_2_12: inputEncoding = "UTF-16BE"; break; case ENCODING_UCS_2_21: inputEncoding = "UTF-16LE"; break; } // Read the version. require ("version"); parseEq (); checkLegalVersion (version = readLiteral (flags)); if (!version.equals ("1.0")){ if(version.equals ("1.1")){ handler.warn ("expected XML version 1.0, not: " + version); xmlVersion = XML_11; }else { error("illegal XML version", version, "1.0 or 1.1"); } } else xmlVersion = XML_10; // Try reading an encoding declaration. boolean white = tryWhitespace (); if (tryRead ("encoding")) { if (!white) error ("whitespace required before 'encoding='"); parseEq (); encodingName = readLiteral (flags); if (!ignoreEncoding) setupDecoding (encodingName); } // Try reading a standalone declaration if (encodingName != null) white = tryWhitespace (); if (tryRead ("standalone")) { if (!white) error ("whitespace required before 'standalone='"); parseEq (); standalone = readLiteral (flags); if ("yes".equals (standalone)) docIsStandalone = true; else if (!"no".equals (standalone)) error ("standalone flag must be 'yes' or 'no'"); } skipWhitespace (); require ("?>"); if (inputEncoding == null) { inputEncoding = encodingName; } handler.xmlDecl(version, encodingName, "yes".equals(standalone), inputEncoding); return encodingName; }
|
1043 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1043/7fb7568e63c3fe14af521de4699cb37898923ca7/XmlParser.java/clean/libjava/gnu/xml/aelfred2/XmlParser.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
1109,
4201,
3456,
261,
6494,
2305,
4705,
13,
565,
1216,
14366,
16,
1860,
565,
288,
202,
780,
202,
1589,
31,
202,
780,
202,
5999,
461,
273,
446,
31,
202,
780,
202,
10145,
12451,
273,
446,
31,
202,
474,
202,
7133,
273,
511,
1285,
67,
13498,
2782,
67,
5458,
42,
571,
511,
1285,
67,
13498,
2782,
67,
1423,
571,
511,
1285,
67,
13498,
2782,
67,
654,
26897,
31,
3639,
514,
810,
4705,
273,
446,
31,
7734,
1620,
261,
2211,
18,
5999,
13,
1850,
288,
1850,
648,
22810,
67,
2294,
11702,
30,
1850,
648,
22810,
67,
5159,
67,
28,
30,
5411,
810,
4705,
273,
315,
5159,
17,
28,
14432,
5411,
898,
31,
1850,
648,
22810,
67,
12609,
67,
17258,
67,
21,
30,
5411,
810,
4705,
273,
315,
12609,
17,
17258,
17,
21,
14432,
5411,
898,
31,
1850,
648,
22810,
67,
57,
4596,
67,
22,
67,
2138,
30,
5411,
810,
4705,
273,
315,
5159,
17,
2313,
5948,
14432,
5411,
898,
31,
1850,
648,
22810,
67,
57,
4596,
67,
22,
67,
5340,
30,
5411,
810,
4705,
273,
315,
5159,
17,
2313,
900,
14432,
5411,
898,
31,
1850,
289,
202,
759,
2720,
326,
1177,
18,
202,
6528,
7566,
1589,
8863,
202,
2670,
19508,
261,
1769,
202,
1893,
30697,
1444,
261,
1589,
273,
855,
6177,
261,
7133,
10019,
202,
430,
16051,
1589,
18,
14963,
7566,
21,
18,
20,
6,
3719,
95,
202,
565,
309,
12,
1589,
18,
14963,
7566,
21,
18,
21,
6,
3719,
95,
202,
377,
202,
4176,
18,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
1109,
4201,
3456,
261,
6494,
2305,
4705,
13,
565,
1216,
14366,
16,
1860,
565,
288,
202,
780,
202,
1589,
31,
202,
780,
202,
5999,
461,
273,
446,
31,
202,
780,
202,
10145,
12451,
273,
446,
31,
202,
474,
202,
7133,
273,
511,
1285,
67,
13498,
2782,
67,
5458,
42,
571,
511,
1285,
67,
13498,
2782,
67,
1423,
571,
511,
1285,
67,
13498,
2782,
67,
654,
26897,
31,
3639,
514,
810,
4705,
273,
446,
31,
7734,
1620,
261,
2211,
18,
5999,
13,
1850,
288,
1850,
648,
22810,
67,
2294,
11702,
30,
1850,
648,
22810,
67,
5159,
67,
28,
30,
5411,
810,
4705,
273,
315,
5159,
17,
28,
14432,
5411,
898,
31,
1850,
648,
22810,
67,
12609,
67,
2
] |
if (end < 0) end = 0; else if (end > length) end = length;
|
if (end < 0) end = 0; else if (end > length) end = length;
|
public static String jsFunction_substring(Context cx, Scriptable thisObj, Object[] args, Function funObj) { if (args.length < 1) args = ScriptRuntime.padArguments(args, 1); String target = ScriptRuntime.toString(thisObj); int length = target.length(); double start = ScriptRuntime.toInteger(args[0]); double end; if (start < 0) start = 0; else if (start > length) start = length; if (args.length == 1) { end = length; } else { end = ScriptRuntime.toInteger(args[1]); if (end < 0) end = 0; else if (end > length) end = length; // swap if end < start if (end < start) { if (cx.getLanguageVersion() != Context.VERSION_1_2) { double temp = start; start = end; end = temp; } else { // Emulate old JDK1.0 java.lang.String.substring() end = start; } } } return target.substring((int)start, (int)end); }
|
19042 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19042/b631b3e8574543a4d24a0048cc710f305deb8ff5/NativeString.java/clean/src/org/mozilla/javascript/NativeString.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
3828,
2083,
67,
28023,
12,
1042,
9494,
16,
22780,
15261,
16,
4766,
2868,
1033,
8526,
833,
16,
4284,
9831,
2675,
13,
565,
288,
3639,
309,
261,
1968,
18,
2469,
411,
404,
13,
5411,
833,
273,
7739,
5576,
18,
6982,
4628,
12,
1968,
16,
404,
1769,
3639,
514,
1018,
273,
7739,
5576,
18,
10492,
12,
2211,
2675,
1769,
3639,
509,
769,
273,
1018,
18,
2469,
5621,
3639,
1645,
787,
273,
7739,
5576,
18,
869,
4522,
12,
1968,
63,
20,
19226,
3639,
1645,
679,
31,
202,
430,
261,
1937,
411,
374,
13,
202,
565,
787,
273,
374,
31,
202,
12107,
309,
261,
1937,
405,
769,
13,
202,
565,
787,
273,
769,
31,
202,
430,
261,
1968,
18,
2469,
422,
404,
13,
288,
202,
565,
679,
273,
769,
31,
202,
97,
469,
288,
5411,
679,
273,
7739,
5576,
18,
869,
4522,
12,
1968,
63,
21,
19226,
202,
565,
309,
261,
409,
411,
374,
13,
202,
202,
409,
273,
374,
31,
202,
565,
469,
309,
261,
409,
405,
769,
13,
202,
202,
409,
273,
769,
31,
5411,
368,
7720,
309,
679,
411,
787,
5411,
309,
261,
409,
411,
787,
13,
288,
7734,
309,
261,
71,
92,
18,
588,
3779,
1444,
1435,
480,
1772,
18,
5757,
67,
21,
67,
22,
13,
288,
10792,
1645,
1906,
273,
787,
31,
10792,
787,
273,
679,
31,
10792,
679,
273,
1906,
31,
7734,
289,
469,
288,
10792,
368,
7377,
6243,
1592,
24387,
21,
18,
20,
2252,
18,
4936,
18,
780,
18,
28023,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
3828,
2083,
67,
28023,
12,
1042,
9494,
16,
22780,
15261,
16,
4766,
2868,
1033,
8526,
833,
16,
4284,
9831,
2675,
13,
565,
288,
3639,
309,
261,
1968,
18,
2469,
411,
404,
13,
5411,
833,
273,
7739,
5576,
18,
6982,
4628,
12,
1968,
16,
404,
1769,
3639,
514,
1018,
273,
7739,
5576,
18,
10492,
12,
2211,
2675,
1769,
3639,
509,
769,
273,
1018,
18,
2469,
5621,
3639,
1645,
787,
273,
7739,
5576,
18,
869,
4522,
12,
1968,
63,
20,
19226,
3639,
1645,
679,
31,
202,
430,
261,
1937,
411,
374,
13,
202,
565,
787,
273,
374,
31,
202,
12107,
309,
261,
1937,
405,
769,
13,
202,
565,
787,
273,
769,
31,
202,
430,
261,
1968,
18,
2
] |
attrPSVI.fSchemaDefault = normalized;
|
void addDefaultAttributes(QName element, XMLAttributes attributes, XSAttributeGroupDecl attrGrp) { // Check after all specified attrs are scanned // (1) report error for REQUIRED attrs that are missing (V_TAGc) // REVISIT: should we check prohibited attributes? // (2) report error for PROHIBITED attrs that are present (V_TAGc) // (3) add default attrs (FIXED and NOT_FIXED) // if (DEBUG) { System.out.println("==>addDefaultAttributes: " + element); } XSObjectList attrUses = attrGrp.getAttributeUses(); int useCount = attrUses.getLength(); XSAttributeUseImpl currUse; XSAttributeDecl currDecl; short constType; ValidatedInfo defaultValue; boolean isSpecified; QName attName; // for each attribute use for (int i = 0; i < useCount; i++) { currUse = (XSAttributeUseImpl)attrUses.item(i); currDecl = currUse.fAttrDecl; // get value constraint constType = currUse.fConstraintType; defaultValue = currUse.fDefault; if (constType == XSConstants.VC_NONE) { constType = currDecl.getConstraintType(); defaultValue = currDecl.fDefault; } // whether this attribute is specified isSpecified = attributes.getValue(currDecl.fTargetNamespace, currDecl.fName) != null; // Element Locally Valid (Complex Type) // 4 The {attribute declaration} of each attribute use in the {attribute uses} whose // {required} is true matches one of the attribute information items in the element // information item's [attributes] as per clause 3.1 above. if (currUse.fUse == SchemaSymbols.USE_REQUIRED) { if (!isSpecified) reportSchemaError("cvc-complex-type.4", new Object[]{element.rawname, currDecl.fName}); } // if the attribute is not specified, then apply the value constraint if (!isSpecified && constType != XSConstants.VC_NONE) { attName = new QName(null, currDecl.fName, currDecl.fName, currDecl.fTargetNamespace); String normalized = (defaultValue!=null)?defaultValue.stringValue():""; int attrIndex = attributes.addAttribute(attName, "CDATA", normalized); if (attributes instanceof XMLAttributesImpl) { XMLAttributesImpl attrs = (XMLAttributesImpl)attributes; boolean schemaId = defaultValue != null && defaultValue.memberType != null ? defaultValue.memberType.isIDType() : currDecl.fType.isIDType(); attrs.setSchemaId(attrIndex, schemaId); } if (fAugPSVI) { // PSVI: attribute is "schema" specified Augmentations augs = attributes.getAugmentations(attrIndex); AttributePSVImpl attrPSVI = new AttributePSVImpl(); augs.putItem(Constants.ATTRIBUTE_PSVI, attrPSVI); attrPSVI.fDeclaration = currDecl; attrPSVI.fTypeDecl = currDecl.fType; attrPSVI.fMemberType = defaultValue.memberType; attrPSVI.fNormalizedValue = normalized; attrPSVI.fSchemaDefault = normalized; attrPSVI.fValidationContext = fValidationRoot; attrPSVI.fValidity = AttributePSVI.VALIDITY_VALID; attrPSVI.fValidationAttempted = AttributePSVI.VALIDATION_FULL; attrPSVI.fSpecified = true; } } } // for } // addDefaultAttributes
|
46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/7392bd92a4fbb068fb68a41a3d0b1412cdedfbf3/XMLSchemaValidator.java/clean/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
28297,
2498,
12,
13688,
930,
16,
3167,
2498,
1677,
16,
1139,
55,
1499,
1114,
3456,
1604,
43,
13832,
13,
288,
3639,
368,
2073,
1839,
777,
1269,
3422,
854,
22711,
3639,
368,
261,
21,
13,
2605,
555,
364,
15810,
3422,
716,
854,
3315,
261,
58,
67,
7927,
71,
13,
3639,
368,
2438,
26780,
1285,
30,
1410,
732,
866,
450,
29993,
1677,
35,
3639,
368,
261,
22,
13,
2605,
555,
364,
4629,
44,
13450,
1285,
2056,
3422,
716,
854,
3430,
261,
58,
67,
7927,
71,
13,
3639,
368,
261,
23,
13,
527,
805,
3422,
261,
30406,
471,
4269,
67,
30406,
13,
3639,
368,
3639,
309,
261,
9394,
13,
288,
5411,
2332,
18,
659,
18,
8222,
2932,
631,
34,
1289,
1868,
2498,
30,
315,
397,
930,
1769,
3639,
289,
3639,
1139,
55,
25979,
1604,
15128,
273,
1604,
43,
13832,
18,
588,
1499,
15128,
5621,
3639,
509,
999,
1380,
273,
1604,
15128,
18,
588,
1782,
5621,
3639,
1139,
55,
1499,
3727,
2828,
4306,
3727,
31,
3639,
1139,
55,
1499,
3456,
4306,
3456,
31,
3639,
3025,
1866,
559,
31,
3639,
2364,
690,
966,
4593,
31,
3639,
1250,
353,
17068,
31,
3639,
16723,
2403,
461,
31,
3639,
368,
364,
1517,
1566,
999,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
999,
1380,
31,
277,
27245,
288,
5411,
4306,
3727,
273,
261,
60,
55,
1499,
3727,
2828,
13,
1747,
15128,
18,
1726,
12,
77,
1769,
5411,
4306,
3456,
273,
4306,
3727,
18,
74,
3843,
3456,
31,
5411,
368,
336,
460,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
28297,
2498,
12,
13688,
930,
16,
3167,
2498,
1677,
16,
1139,
55,
1499,
1114,
3456,
1604,
43,
13832,
13,
288,
3639,
368,
2073,
1839,
777,
1269,
3422,
854,
22711,
3639,
368,
261,
21,
13,
2605,
555,
364,
15810,
3422,
716,
854,
3315,
261,
58,
67,
7927,
71,
13,
3639,
368,
2438,
26780,
1285,
30,
1410,
732,
866,
450,
29993,
1677,
35,
3639,
368,
261,
22,
13,
2605,
555,
364,
4629,
44,
13450,
1285,
2056,
3422,
716,
854,
3430,
261,
58,
67,
7927,
71,
13,
3639,
368,
261,
23,
13,
527,
805,
3422,
261,
30406,
471,
4269,
67,
30406,
13,
3639,
368,
3639,
309,
261,
9394,
13,
288,
5411,
2332,
18,
659,
18,
8222,
2932,
631,
34,
1289,
2
] |
|
namespace = XmlNamespace.getInstance(name, literal);
|
namespace = XmlNamespace.getInstance(name, literal);
|
public boolean scanForDefinitions (Pair st, java.util.Vector forms, ScopeExp defs, Translator tr) { Pair p1, p2; if (! (st.cdr instanceof Pair) || ! ((p1 = (Pair) st.cdr).car instanceof String) || ! (p1.cdr instanceof Pair) || (p2 = (Pair) p1.cdr).cdr != LList.Empty) { tr.error('e', "invalid syntax for define-namespace"); return false; } String name = (String) p1.car; Declaration decl = defs.getDefine(name, 'w', tr); tr.push(decl); decl.setFlag(Declaration.IS_CONSTANT|Declaration.IS_NAMESPACE_PREFIX); if (makePrivate) { decl.setFlag(Declaration.PRIVATE_SPECIFIED); decl.setPrivate(true); } else if (defs instanceof ModuleExp) decl.setCanRead(true); Translator.setLine(decl, p1); Expression value; String literal = null; if (p2.car instanceof FString) { literal = p2.car.toString(); Namespace namespace; if (literal.startsWith("class:")) { String cname = literal.substring(6); namespace = ClassNamespace.getInstance(literal, ClassType.make(cname)); decl.setType(ClassType.make("gnu.kawa.lispexpr.ClassNamespace")); } else if (makeXML) { namespace = XmlNamespace.getInstance(name, literal); decl.setType(ClassType.make("gnu.kawa.lispexpr.XmlNamespace")); } else { namespace = Namespace.getInstance(literal); decl.setType(ClassType.make("gnu.mapping.Namespace")); } value = new QuoteExp(namespace); decl.setFlag(Declaration.TYPE_SPECIFIED); } else value = tr.rewrite_car (p2, false); decl.noteValue(value); forms.addElement(SetExp.makeDefinition(decl, value)); return true; }
|
41089 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41089/0323e96a8b6880d5ca171e2a99d3a1f8efc91526/DefineNamespace.java/buggy/gnu/kawa/lispexpr/DefineNamespace.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
4135,
1290,
7130,
261,
4154,
384,
16,
2252,
18,
1367,
18,
5018,
10138,
16,
19694,
5468,
2966,
17588,
16,
18669,
433,
13,
225,
288,
565,
8599,
293,
21,
16,
293,
22,
31,
565,
309,
16051,
261,
334,
18,
71,
3069,
1276,
8599,
13,
3639,
747,
401,
14015,
84,
21,
273,
261,
4154,
13,
384,
18,
71,
3069,
2934,
9815,
1276,
514,
13,
202,
20081,
401,
261,
84,
21,
18,
71,
3069,
1276,
8599,
13,
202,
20081,
261,
84,
22,
273,
261,
4154,
13,
293,
21,
18,
71,
3069,
2934,
71,
3069,
480,
511,
682,
18,
1921,
13,
1377,
288,
202,
313,
18,
1636,
2668,
73,
2187,
315,
5387,
6279,
364,
4426,
17,
4937,
8863,
202,
2463,
629,
31,
1377,
289,
565,
514,
508,
273,
261,
780,
13,
293,
21,
18,
9815,
31,
565,
16110,
4302,
3496,
273,
17588,
18,
588,
11644,
12,
529,
16,
296,
91,
2187,
433,
1769,
565,
433,
18,
6206,
12,
8840,
1769,
565,
3496,
18,
542,
4678,
12,
6094,
18,
5127,
67,
25878,
96,
6094,
18,
5127,
67,
11368,
67,
6307,
1769,
565,
309,
261,
6540,
6014,
13,
1377,
288,
3639,
3496,
18,
542,
4678,
12,
6094,
18,
20055,
67,
13847,
13519,
1769,
3639,
3496,
18,
542,
6014,
12,
3767,
1769,
1377,
289,
565,
469,
309,
261,
12537,
1276,
5924,
2966,
13,
1377,
3496,
18,
542,
2568,
1994,
12,
3767,
1769,
565,
18669,
18,
542,
1670,
12,
8840,
16,
293,
21,
1769,
565,
5371,
460,
31,
565,
514,
7158,
273,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
4135,
1290,
7130,
261,
4154,
384,
16,
2252,
18,
1367,
18,
5018,
10138,
16,
19694,
5468,
2966,
17588,
16,
18669,
433,
13,
225,
288,
565,
8599,
293,
21,
16,
293,
22,
31,
565,
309,
16051,
261,
334,
18,
71,
3069,
1276,
8599,
13,
3639,
747,
401,
14015,
84,
21,
273,
261,
4154,
13,
384,
18,
71,
3069,
2934,
9815,
1276,
514,
13,
202,
20081,
401,
261,
84,
21,
18,
71,
3069,
1276,
8599,
13,
202,
20081,
261,
84,
22,
273,
261,
4154,
13,
293,
21,
18,
71,
3069,
2934,
71,
3069,
480,
511,
682,
18,
1921,
13,
1377,
288,
202,
313,
18,
1636,
2668,
73,
2187,
315,
5387,
6279,
364,
4426,
17,
4937,
8863,
202,
2463,
2
] |
public org.quickfix.field.OrderID getOrderID() throws FieldNotFound { org.quickfix.field.OrderID value = new org.quickfix.field.OrderID();
|
public quickfix.field.OrderID getOrderID() throws FieldNotFound { quickfix.field.OrderID value = new quickfix.field.OrderID();
|
public org.quickfix.field.OrderID getOrderID() throws FieldNotFound { org.quickfix.field.OrderID value = new org.quickfix.field.OrderID(); getField(value); return value; }
|
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/OrderCancelRequest.java/clean/src/java/src/quickfix/fix40/OrderCancelRequest.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
2448,
734,
11973,
734,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
2448,
734,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
18,
2448,
734,
5621,
565,
5031,
12,
1132,
1769,
327,
460,
31,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2358,
18,
19525,
904,
18,
1518,
18,
2448,
734,
11973,
734,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
2448,
734,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
18,
2448,
734,
5621,
565,
5031,
12,
1132,
1769,
327,
460,
31,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
if (tokens.size() > 0) { sqlStr += "AND meta.activate = 1\n" ; sqlStr += "AND meta.disable_search = 0\n" ; } sqlStr += "AND meta.doc_type != 6 --Browserdoc\n" ; sqlStr += "AND EXISTS -- docs which is not in a menu\n" ; sqlStr += "\t (SELECT meta.meta_id\n" ; sqlStr += "\t FROM childs, meta\n" ; sqlStr += "\t WHERE childs.to_meta_id = meta.meta_id )\n" ; if (search_area.equals("not_archived")) { sqlStr += "AND meta.archive = 0\n" ; } if (search_area.equals("archived")) { sqlStr += "AND meta.archive = 1\n" ; } sqlStr += "GROUP BY meta.meta_id, meta.meta_headline, meta.meta_text, meta.date_modified\n" ; if(search_prep.equalsIgnoreCase("AND")) { sqlStr += "HAVING (COUNT(class.code) >= " + tokens.size() + ")\n" ; } else { sqlStr += "HAVING (COUNT(class.code) >= 1)\n " ; } if ( tokens.size() > 0 ) { sqlStr += "ORDER BY date_modified DESC" ; } } else { sqlStr = "SELECT meta.meta_id, meta.meta_headline, meta.meta_text, meta.date_modified\n" ; sqlStr += "FROM meta\n" ; sqlStr += "JOIN meta_classification mc\n" ; sqlStr += "ON meta.meta_id = mc.meta_id\n" ; sqlStr += "JOIN classification AS class\n" ; sqlStr += "ON mc.class_id = class.class_id\n" ; sqlStr += "AND (" ; for ( int i = 0 ; i < tokens.size() ; i++ ) { String sWord = tokens.elementAt(i).toString() ; sqlStr += "( class.code LIKE '" + match + sWord + match + "' )\n" ; if ( i < tokens.size() -1 ) { sqlStr += " " + "OR" + " " ; } }
|
if (tokens.size() > 0) { sqlStr += "AND meta.activate = 1\n" ; sqlStr += "AND meta.disable_search = 0\n" ; } sqlStr += "AND meta.doc_type != 6 --Browserdoc\n" ; sqlStr += "AND EXISTS -- docs which is not in a menu\n" ; sqlStr += "\t (SELECT meta.meta_id\n" ; sqlStr += "\t FROM childs, meta\n" ; sqlStr += "\t WHERE childs.to_meta_id = meta.meta_id )\n" ; if (search_area.equals("not_archived")) { sqlStr += "AND meta.archive = 0\n" ; } if (search_area.equals("archived")) { sqlStr += "AND meta.archive = 1\n" ; } sqlStr += "GROUP BY meta.meta_id, meta.meta_headline, meta.meta_text, meta.date_modified\n" ; if(search_prep.equalsIgnoreCase("AND")) { sqlStr += "HAVING (COUNT(class.code) >= " + tokens.size() + ")\n" ; } else { sqlStr += "HAVING (COUNT(class.code) >= 1)\n " ; } if ( tokens.size() > 0 ) { sqlStr += "ORDER BY date_modified DESC" ; } } else { sqlStr = "SELECT meta.meta_id, meta.meta_headline, meta.meta_text, meta.date_modified\n" ; sqlStr += "FROM meta\n" ; sqlStr += "JOIN meta_classification mc\n" ; sqlStr += "ON meta.meta_id = mc.meta_id\n" ; sqlStr += "JOIN classification AS class\n" ; sqlStr += "ON mc.class_id = class.class_id\n" ; sqlStr += "AND (" ; for ( int i = 0 ; i < tokens.size() ; i++ ) { String sWord = tokens.elementAt(i).toString() ; sqlStr += "( class.code LIKE '" + match + sWord + match + "' )\n" ; if ( i < tokens.size() -1 ) { sqlStr += " " + "OR" + " " ; } }
|
public String buildSqlStr(String question_str, String search_type, String search_prep,String string_match,String search_area) { // search_area : all,not_archived,archived String sqlStr = "" ; Vector tokens = new Vector() ; Vector meta_docs = new Vector() ; String match = "%" ; if ( string_match.equals("match") ) match = "" ; StringTokenizer parser = new StringTokenizer(question_str.trim()," ") ; while ( parser.hasMoreTokens() ) tokens.addElement(parser.nextToken()) ; // Lets NOT search on codes if ( !search_type.equals("atc_icd10") ) { //log ("--- NU SKER VI P ALLT") ; // text fields // texts.meta_id if (tokens.size() > 0) { sqlStr += "SELECT DISTINCT meta.meta_id,meta.meta_headline,meta.meta_text,meta.date_modified " + '\n' ; sqlStr += "FROM texts, meta\n" ; sqlStr += "WHERE (" ; } for ( int i = 0 ; i < tokens.size() ; i++ ) { sqlStr += " text LIKE '%" + tokens.elementAt(i).toString() + match + "%'" ; //sqlStr += " text LIKE '%" + tokens.elementAt(i).toString() + match + "'" ; if ( i < tokens.size() -1 ) sqlStr += " " + search_prep + " " ; } sqlStr += ")\n" ; if (tokens.size() > 0) { sqlStr += "AND meta.meta_id = texts.meta_id\n" ; sqlStr += "AND meta.activate = 1\n" ; sqlStr += "AND meta.disable_search = 0\n" ; } if (search_area.equals("not_archived")) { sqlStr += "AND meta.archive = 0\n" ; } if (search_area.equals("archived")) { sqlStr += "AND meta.archive = 1\n" ; } if ( tokens.size() > 0 ) { sqlStr += "UNION\n" ; } // Lets create the select and from statement if (tokens.size() > 0) { sqlStr += "SELECT DISTINCT meta.meta_id,meta.meta_headline,meta.meta_text,meta.date_modified \n" ; sqlStr += "FROM meta ,childs \n" ; sqlStr += "WHERE " ; } // Lets create the where statement for ( int i = 0 ; i < tokens.size() ; i++ ) { sqlStr += "(meta_headline LIKE '%" + tokens.elementAt(i).toString() + "%' \n" ; sqlStr += "OR meta_text LIKE '%" + tokens.elementAt(i).toString() + "%') \n" ; // sqlStr += "OR classification LIKE '%" + tokens.elementAt(i).toString() + match + "') \n " ; if ( i < tokens.size() -1 ) sqlStr += " " + search_prep + " " ; } // Lets append with our new conditions sqlStr += "AND activate = 1\n " ; sqlStr += "AND disable_search = 0\n" ; sqlStr += "AND meta.doc_type != 6 --Browserdoc\n" ; // sqlStr += "AND meta.doc_type != 7 --Framesetdoc\n" ; sqlStr += "AND NOT EXISTS -- docs which is not in a menu\n" ; sqlStr += "\t (SELECT meta_id\n" ; sqlStr += "\t FROM childs meta\n" ; sqlStr += "\t WHERE childs.to_meta_id = meta.meta_id )\n" ; if (search_area.equals("not_archived")) { sqlStr += "AND meta.archive = 0\n" ; } if (search_area.equals("archived")) { sqlStr += "AND meta.archive = 1\n" ; } if ( tokens.size() > 0 ) { sqlStr += "UNION\n" ; } // THE NEW CLASSIFICATION STYLE sqlStr += "SELECT meta.meta_id, meta.meta_headline, meta.meta_text, meta.date_modified\n" ; sqlStr += "FROM meta\n" ; sqlStr += "JOIN meta_classification mc\n" ; sqlStr += "ON meta.meta_id = mc.meta_id\n" ; sqlStr += "JOIN classification AS class\n" ; sqlStr += "ON mc.class_id = class.class_id\n" ; sqlStr += "AND (" ; for ( int i = 0 ; i < tokens.size() ; i++ ) { String sWord = tokens.elementAt(i).toString() ; //sqlStr += "( class.code LIKE '" + match + sWord + match + "' OR class.code LIKE '" + match + sWord + match + "' )\n" ; sqlStr += "( class.code LIKE '" + match + sWord + match + "' )\n" ; // sqlStr += " classification LIKE '%" + tokens.elementAt(i).toString() + match + "'" ; // Ok, if we search for more than 1 word, then should we always add OR if ( i < tokens.size() -1 ) { sqlStr += " " + "OR" + " " ; //sqlStr += " " + search_prep + " " ; } } sqlStr += ") \n" ; if (tokens.size() > 0) { sqlStr += "AND meta.activate = 1\n" ; sqlStr += "AND meta.disable_search = 0\n" ; } // Lets append with our new conditions sqlStr += "AND meta.doc_type != 6 --Browserdoc\n" ; // sqlStr += "AND meta.doc_type != 7 --Framesetdoc\n" ; sqlStr += "AND EXISTS -- docs which is not in a menu\n" ; sqlStr += "\t (SELECT meta.meta_id\n" ; sqlStr += "\t FROM childs, meta\n" ; sqlStr += "\t WHERE childs.to_meta_id = meta.meta_id )\n" ; if (search_area.equals("not_archived")) { sqlStr += "AND meta.archive = 0\n" ; } if (search_area.equals("archived")) { sqlStr += "AND meta.archive = 1\n" ; } // Lets add the Group by statement sqlStr += "GROUP BY meta.meta_id, meta.meta_headline, meta.meta_text, meta.date_modified\n" ; // Lets check if we have an 'AND' selection. If so, then the 'HAVING COUNT' // must be equal to the number of parameters we are searching for // If we have added an 'OR' selection, then the 'HAVING COUNT' can be if(search_prep.equalsIgnoreCase("AND")) { sqlStr += "HAVING (COUNT(class.code) >= " + tokens.size() + ")\n" ; } else { sqlStr += "HAVING (COUNT(class.code) >= 1)\n " ; } if ( tokens.size() > 0 ) { sqlStr += "ORDER BY date_modified DESC" ; //log("Sker p koder...\n") ; //log(sqlStr + "\n") ; //log("-----------------------\n") ; } /// END OF SEARCH AMONG ALL FIELDS } else { // Lets search on ICD 10 CODES // This searchfunktion is for the classification fields // log("Running the new search question") ; // THE NEW CLASSIFICATION STYLE sqlStr = "SELECT meta.meta_id, meta.meta_headline, meta.meta_text, meta.date_modified\n" ; sqlStr += "FROM meta\n" ; sqlStr += "JOIN meta_classification mc\n" ; sqlStr += "ON meta.meta_id = mc.meta_id\n" ; sqlStr += "JOIN classification AS class\n" ; sqlStr += "ON mc.class_id = class.class_id\n" ; sqlStr += "AND (" ; for ( int i = 0 ; i < tokens.size() ; i++ ) { String sWord = tokens.elementAt(i).toString() ; //sqlStr += "( class.code LIKE '" + match + sWord + match + "' OR class.code LIKE '" + match + sWord + match + "' )\n" ; sqlStr += "( class.code LIKE '" + match + sWord + match + "' )\n" ; // sqlStr += " classification LIKE '%" + tokens.elementAt(i).toString() + match + "'" ; // Ok, if we search for more than 1 word, then should we always add OR if ( i < tokens.size() -1 ) { sqlStr += " " + "OR" + " " ; //sqlStr += " " + search_prep + " " ; } } sqlStr += ") \n" ; if (tokens.size() > 0) { sqlStr += "AND meta.activate = 1\n" ; sqlStr += "AND meta.disable_search = 0\n" ; } // Lets append with our new conditions sqlStr += "AND meta.doc_type != 6 --Browserdoc\n" ; // sqlStr += "AND meta.doc_type != 7 --Framesetdoc\n" ; sqlStr += "AND EXISTS -- docs which is not in a menu\n" ; sqlStr += "\t (SELECT meta.meta_id\n" ; sqlStr += "\t FROM childs, meta\n" ; sqlStr += "\t WHERE childs.to_meta_id = meta.meta_id )\n" ; if (search_area.equals("not_archived")) { sqlStr += "AND meta.archive = 0\n" ; } if (search_area.equals("archived")) { sqlStr += "AND meta.archive = 1\n" ; } // Lets add the Group by statement sqlStr += "GROUP BY meta.meta_id, meta.meta_headline, meta.meta_text, meta.date_modified\n" ; // Lets check if we have an 'AND' selection. If so, then the 'HAVING COUNT' // must be equal to the number of parameters we are searching for // If we have added an 'OR' selection, then the 'HAVING COUNT' can be if(search_prep.equalsIgnoreCase("AND")) { sqlStr += "HAVING (COUNT(class.code) >= " + tokens.size() + ")\n" ; } else { sqlStr += "HAVING (COUNT(class.code) >= 1)\n " ; } if ( tokens.size() > 0 ) { sqlStr += "ORDER BY date_modified DESC" ; //log("Sker p koder...\n") ; //log(sqlStr + "\n") ; //log("-----------------------\n") ; } } // End else return sqlStr ;} // End buildsqlStr
|
8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/ff3e4538b226da7dc2bc978e76d28f19f028c207/SearchDocuments.java/buggy/servlets/SearchDocuments.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1361,
5101,
1585,
12,
780,
5073,
67,
701,
16,
514,
1623,
67,
723,
16,
1850,
514,
1623,
67,
19109,
16,
780,
533,
67,
1916,
16,
780,
1623,
67,
5036,
13,
288,
202,
202,
759,
1623,
67,
5036,
294,
777,
16,
902,
67,
991,
2950,
16,
991,
2950,
3196,
202,
780,
1847,
1585,
273,
1408,
274,
202,
202,
5018,
2430,
273,
394,
5589,
1435,
274,
202,
202,
5018,
2191,
67,
8532,
273,
394,
5589,
1435,
274,
3196,
202,
780,
845,
273,
20880,
274,
202,
202,
430,
261,
533,
67,
1916,
18,
14963,
2932,
1916,
7923,
262,
1082,
202,
1916,
273,
1408,
274,
202,
202,
780,
10524,
2082,
273,
394,
16370,
12,
4173,
67,
701,
18,
5290,
9334,
6,
9369,
274,
202,
202,
17523,
261,
2082,
18,
5332,
7417,
5157,
1435,
262,
1082,
202,
7860,
18,
1289,
1046,
12,
4288,
18,
4285,
1345,
10756,
274,
1377,
368,
511,
2413,
4269,
1623,
603,
6198,
1082,
225,
309,
261,
401,
3072,
67,
723,
18,
14963,
2932,
270,
71,
67,
335,
72,
2163,
7923,
262,
288,
3639,
368,
1330,
7566,
6062,
423,
57,
12038,
654,
12596,
453,
8061,
56,
7923,
274,
9506,
225,
368,
977,
1466,
1171,
368,
15219,
18,
3901,
67,
350,
9506,
225,
309,
261,
7860,
18,
1467,
1435,
405,
374,
13,
288,
9506,
30378,
1847,
1585,
1011,
315,
4803,
23286,
2191,
18,
3901,
67,
350,
16,
3901,
18,
3901,
67,
1978,
1369,
16,
3901,
18,
3901,
67,
955,
16,
3901,
18,
712,
67,
7342,
315,
2
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1361,
5101,
1585,
12,
780,
5073,
67,
701,
16,
514,
1623,
67,
723,
16,
1850,
514,
1623,
67,
19109,
16,
780,
533,
67,
1916,
16,
780,
1623,
67,
5036,
13,
288,
202,
202,
759,
1623,
67,
5036,
294,
777,
16,
902,
67,
991,
2950,
16,
991,
2950,
3196,
202,
780,
1847,
1585,
273,
1408,
274,
202,
202,
5018,
2430,
273,
394,
5589,
1435,
274,
202,
202,
5018,
2191,
67,
8532,
273,
394,
5589,
1435,
274,
3196,
202,
780,
845,
273,
20880,
274,
202,
202,
430,
261,
533,
67,
1916,
18,
14963,
2932,
1916,
7923,
262,
1082,
202,
1916,
273,
1408,
274,
202,
202,
780,
10524,
2082,
273,
394,
16370,
12,
4173,
67,
701,
18,
5290,
2
] |
System.err.println("client: Socket error (server closed?)");
|
System.err.println("client: Socket error (server closed?)");
|
private Packet readPacket() { try { if (in == null) { in = new ObjectInputStream(socket.getInputStream()); } Packet packet = (Packet)in.readObject(); /* Packet debug code if (packet == null) { System.out.println("c: received null packet"); } else if (packet.getData() == null) { System.out.println("c: received empty packet"); } else { System.out.println("c: received command #" + packet.getCommand() + " with " + packet.getData().length + " zipped entries totaling " + packet.byteLength + " bytes in size"); } */ // All went well. Reset the failure count. this.connFailures = 0; return packet; } catch (SocketException ex) { // assume client is shutting down System.err.println("client: Socket error (server closed?)"); if (this.connFailures > MAX_CONN_FAILURES) { disconnected(); } else { this.connFailures++; } return null; } catch (IOException ex) { System.err.println("client: IO error reading command:"); disconnected(); return null; } catch (ClassNotFoundException ex) { System.err.println("client: class not found error reading command:"); ex.printStackTrace(); disconnected(); return null; } }
|
4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/c9f0f1d2e5ceb1c577004355102dc4109baf3a49/Client.java/clean/megamek/src/megamek/client/Client.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
11114,
855,
6667,
1435,
288,
3639,
775,
288,
5411,
309,
261,
267,
422,
446,
13,
288,
7734,
316,
273,
394,
22726,
12,
7814,
18,
588,
4348,
10663,
5411,
289,
5411,
11114,
4414,
273,
261,
6667,
13,
267,
18,
896,
921,
5621,
5411,
1748,
11114,
1198,
981,
5411,
309,
261,
11482,
422,
446,
13,
288,
7734,
2332,
18,
659,
18,
8222,
2932,
71,
30,
5079,
446,
4414,
8863,
5411,
289,
469,
309,
261,
11482,
18,
588,
751,
1435,
422,
446,
13,
288,
7734,
2332,
18,
659,
18,
8222,
2932,
71,
30,
5079,
1008,
4414,
8863,
5411,
289,
469,
288,
7734,
2332,
18,
659,
18,
8222,
2932,
71,
30,
5079,
1296,
31526,
397,
4414,
18,
588,
2189,
1435,
397,
315,
598,
315,
397,
4414,
18,
588,
751,
7675,
2469,
397,
315,
3144,
1845,
3222,
2078,
310,
315,
397,
4414,
18,
7229,
1782,
397,
315,
1731,
316,
963,
8863,
5411,
289,
1195,
5411,
368,
4826,
16343,
5492,
18,
225,
7151,
326,
5166,
1056,
18,
5411,
333,
18,
4646,
14479,
273,
374,
31,
5411,
327,
4414,
31,
3639,
289,
1044,
261,
4534,
503,
431,
13,
288,
5411,
368,
6750,
1004,
353,
24376,
2588,
5411,
2332,
18,
370,
18,
8222,
2932,
2625,
30,
8758,
555,
261,
3567,
4375,
35,
2225,
1769,
5411,
309,
261,
2211,
18,
4646,
14479,
405,
4552,
67,
27733,
67,
17623,
55,
13,
288,
7734,
17853,
5621,
5411,
289,
469,
288,
7734,
333,
18,
4646,
14479,
9904,
31,
5411,
289,
5411,
327,
446,
31,
3639,
289,
1044,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11114,
855,
6667,
1435,
288,
3639,
775,
288,
5411,
309,
261,
267,
422,
446,
13,
288,
7734,
316,
273,
394,
22726,
12,
7814,
18,
588,
4348,
10663,
5411,
289,
5411,
11114,
4414,
273,
261,
6667,
13,
267,
18,
896,
921,
5621,
5411,
1748,
11114,
1198,
981,
5411,
309,
261,
11482,
422,
446,
13,
288,
7734,
2332,
18,
659,
18,
8222,
2932,
71,
30,
5079,
446,
4414,
8863,
5411,
289,
469,
309,
261,
11482,
18,
588,
751,
1435,
422,
446,
13,
288,
7734,
2332,
18,
659,
18,
8222,
2932,
71,
30,
5079,
1008,
4414,
8863,
5411,
289,
469,
288,
7734,
2332,
18,
659,
18,
8222,
2932,
71,
30,
5079,
1296,
31526,
397,
4414,
18,
588,
2189,
1435,
397,
2
] |
return (RefactoringDescriptorProxy[]) list.toArray(new RefactoringDescriptorProxy[list.size()]);
|
public static RefactoringDescriptorProxy[] readRefactoringDescriptorProxies(final InputStream stream, final String project, final long start, final long end, final int flags) throws IOException { final List list= new ArrayList(); final BufferedReader reader= new BufferedReader(new InputStreamReader(stream, IRefactoringSerializationConstants.OUTPUT_ENCODING)); while (reader.ready()) { final String line= reader.readLine(); if (line != null) { final int index= line.indexOf(DELIMITER_COMPONENT); if (index > 0) { try { final long stamp= new Long(line.substring(0, index)).longValue(); if (stamp >= start && stamp <= end) list.add(new DefaultRefactoringDescriptorProxy(unescapeString(line.substring(index + 1)), project, stamp)); } catch (NumberFormatException exception) { // Just skip } } } } return (RefactoringDescriptorProxy[]) list.toArray(new RefactoringDescriptorProxy[list.size()]); }
|
9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/51ad372b1ef7a74df0a7160608f5c79ced8f757b/RefactoringHistoryManager.java/buggy/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/history/RefactoringHistoryManager.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
868,
3493,
6053,
3187,
3886,
8526,
855,
426,
3493,
6053,
3187,
21488,
12,
6385,
5037,
1407,
16,
727,
514,
1984,
16,
727,
1525,
787,
16,
727,
1525,
679,
16,
727,
509,
2943,
13,
1216,
1860,
288,
202,
202,
6385,
987,
666,
33,
394,
2407,
5621,
202,
202,
6385,
10633,
2949,
33,
394,
10633,
12,
2704,
15322,
12,
3256,
16,
467,
426,
3493,
6053,
16764,
2918,
18,
15527,
67,
14672,
10019,
202,
202,
17523,
261,
10530,
18,
1672,
10756,
288,
1082,
202,
6385,
514,
980,
33,
2949,
18,
896,
1670,
5621,
1082,
202,
430,
261,
1369,
480,
446,
13,
288,
9506,
202,
6385,
509,
770,
33,
980,
18,
31806,
12,
19722,
67,
22922,
1769,
9506,
202,
430,
261,
1615,
405,
374,
13,
288,
6862,
202,
698,
288,
25083,
202,
6385,
1525,
14429,
33,
394,
3407,
12,
1369,
18,
28023,
12,
20,
16,
770,
13,
2934,
5748,
620,
5621,
25083,
202,
430,
261,
14317,
1545,
787,
597,
14429,
1648,
679,
13,
6862,
1082,
202,
1098,
18,
1289,
12,
2704,
2989,
426,
3493,
6053,
3187,
3886,
12,
318,
6939,
780,
12,
1369,
18,
28023,
12,
1615,
397,
404,
13,
3631,
1984,
16,
14429,
10019,
6862,
202,
97,
1044,
261,
1854,
9291,
1520,
13,
288,
25083,
202,
759,
12526,
2488,
6862,
202,
97,
9506,
202,
97,
1082,
202,
97,
202,
202,
97,
202,
202,
2463,
261,
426,
3493,
6053,
3187,
3886,
63,
5717,
666,
18,
31447,
12,
2704,
868,
3493,
6053,
3187,
3886,
63,
1098,
18,
1467,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
868,
3493,
6053,
3187,
3886,
8526,
855,
426,
3493,
6053,
3187,
21488,
12,
6385,
5037,
1407,
16,
727,
514,
1984,
16,
727,
1525,
787,
16,
727,
1525,
679,
16,
727,
509,
2943,
13,
1216,
1860,
288,
202,
202,
6385,
987,
666,
33,
394,
2407,
5621,
202,
202,
6385,
10633,
2949,
33,
394,
10633,
12,
2704,
15322,
12,
3256,
16,
467,
426,
3493,
6053,
16764,
2918,
18,
15527,
67,
14672,
10019,
202,
202,
17523,
261,
10530,
18,
1672,
10756,
288,
1082,
202,
6385,
514,
980,
33,
2949,
18,
896,
1670,
5621,
1082,
202,
430,
261,
1369,
480,
446,
13,
288,
9506,
202,
6385,
509,
770,
33,
980,
18,
31806,
12,
19722,
67,
22922,
1769,
9506,
202,
2
] |
|
public void setLcbUsp(int field_214_lcbUsp)
|
public void setLcbUsp(int field_213_lcbUsp)
|
public void setLcbUsp(int field_214_lcbUsp) { this.field_214_lcbUsp = field_214_lcbUsp; }
|
509 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/509/944c40af98f9912ed6835ed6cbadaea6cc8815cf/FIBAbstractType.java/clean/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/FIBAbstractType.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
48,
7358,
57,
1752,
12,
474,
652,
67,
22,
3437,
67,
80,
7358,
57,
1752,
13,
565,
288,
3639,
333,
18,
1518,
67,
22,
3461,
67,
80,
7358,
57,
1752,
273,
652,
67,
22,
3461,
67,
80,
7358,
57,
1752,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
48,
7358,
57,
1752,
12,
474,
652,
67,
22,
3437,
67,
80,
7358,
57,
1752,
13,
565,
288,
3639,
333,
18,
1518,
67,
22,
3461,
67,
80,
7358,
57,
1752,
273,
652,
67,
22,
3461,
67,
80,
7358,
57,
1752,
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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(name)) { name = name.trim(); return m_userDriver.createGroup(dbc, id, name, description, flags, parent, null); } else { throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_GROUPNAME_1, name)); }
|
CmsGroup.checkGroupName(name); name = name.trim(); return m_userDriver.createGroup(dbc, id, name, description, flags, parent, null);
|
public CmsGroup createGroup(CmsDbContext dbc, CmsUUID id, String name, String description, int flags, String parent) throws CmsIllegalArgumentException, CmsDataAccessException { // check the lenght of the groupname if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(name)) { name = name.trim(); return m_userDriver.createGroup(dbc, id, name, description, flags, parent, null); } else { throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_GROUPNAME_1, name)); } }
|
8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/686bec519120846e98ec922a3c7d5e003105581e/CmsDriverManager.java/buggy/src/org/opencms/db/CmsDriverManager.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2149,
1114,
752,
1114,
12,
4747,
4331,
1042,
9881,
16,
15792,
612,
16,
514,
508,
16,
514,
2477,
16,
509,
2943,
16,
514,
982,
13,
565,
1216,
2149,
31237,
16,
2149,
751,
9773,
288,
3639,
368,
866,
326,
562,
75,
647,
434,
326,
25329,
3639,
309,
261,
4747,
13565,
18,
291,
18431,
22125,
12,
529,
3719,
288,
5411,
508,
273,
508,
18,
5290,
5621,
5411,
327,
312,
67,
1355,
4668,
18,
2640,
1114,
12,
9137,
16,
612,
16,
508,
16,
2477,
16,
2943,
16,
982,
16,
446,
1769,
3639,
289,
469,
288,
5411,
604,
394,
2149,
31237,
12,
5058,
18,
588,
7675,
3782,
12,
5058,
18,
9712,
67,
16234,
67,
8468,
1985,
67,
21,
16,
508,
10019,
3639,
289,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2149,
1114,
752,
1114,
12,
4747,
4331,
1042,
9881,
16,
15792,
612,
16,
514,
508,
16,
514,
2477,
16,
509,
2943,
16,
514,
982,
13,
565,
1216,
2149,
31237,
16,
2149,
751,
9773,
288,
3639,
368,
866,
326,
562,
75,
647,
434,
326,
25329,
3639,
309,
261,
4747,
13565,
18,
291,
18431,
22125,
12,
529,
3719,
288,
5411,
508,
273,
508,
18,
5290,
5621,
5411,
327,
312,
67,
1355,
4668,
18,
2640,
1114,
12,
9137,
16,
612,
16,
508,
16,
2477,
16,
2943,
16,
982,
16,
446,
1769,
3639,
289,
469,
288,
5411,
604,
394,
2149,
31237,
12,
5058,
18,
588,
7675,
3782,
12,
5058,
18,
9712,
67,
16234,
67,
8468,
1985,
67,
21,
16,
508,
10019,
2
] |
(m_CompareCombo.getSelectedIndex() < 0)) {
|
(!comparisonFieldSet)) {
|
public void setInstances(Instances newInstances) { m_Instances = newInstances; m_TTester.setInstances(m_Instances); m_FromLab.setText("Got " + m_Instances.numInstances() + " results"); // Do other stuff m_DatasetKeyModel.removeAllElements(); m_ResultKeyModel.removeAllElements(); m_CompareModel.removeAllElements(); m_SortModel.removeAllElements(); m_SortModel.addElement("<default>"); m_TTester.setSortColumn(-1); int datasetCol = -1; String selectedList = ""; String selectedListDataset = ""; for (int i = 0; i < m_Instances.numAttributes(); i++) { String name = m_Instances.attribute(i).name(); if (name.toLowerCase().startsWith("key_", 0)) { m_DatasetKeyModel.addElement(name.substring(4)); m_ResultKeyModel.addElement(name.substring(4)); m_CompareModel.addElement(name.substring(4)); } else { m_DatasetKeyModel.addElement(name); m_ResultKeyModel.addElement(name); m_CompareModel.addElement(name); if (m_Instances.attribute(i).isNumeric()) m_SortModel.addElement(name); } if (name.toLowerCase().equals("key_dataset")) { m_DatasetKeyList.addSelectionInterval(i, i); selectedListDataset += "," + (i + 1); } else if (name.toLowerCase().equals("key_run")) { m_TTester.setRunColumn(i); } else if (name.toLowerCase().equals("key_fold")) { m_TTester.setFoldColumn(i); } else if (name.toLowerCase().equals("key_scheme") || name.toLowerCase().equals("key_scheme_options") || name.toLowerCase().equals("key_scheme_version_id")) { m_ResultKeyList.addSelectionInterval(i, i); selectedList += "," + (i + 1); } else if (name.toLowerCase().indexOf("percent_correct") != -1) { m_CompareCombo.setSelectedIndex(i); // break; } else if ((name.toLowerCase().indexOf("root_relative_squared_error") != -1) && (m_CompareCombo.getSelectedIndex() < 0)) { m_CompareCombo.setSelectedIndex(i); } } m_TesterClasses.setEnabled(true); m_DatasetKeyBut.setEnabled(true); m_ResultKeyBut.setEnabled(true); m_CompareCombo.setEnabled(true); m_SortCombo.setEnabled(true); Range generatorRange = new Range(); if (selectedList.length() != 0) { try { generatorRange.setRanges(selectedList); } catch (Exception ex) { ex.printStackTrace(); System.err.println(ex.getMessage()); } } m_TTester.setResultsetKeyColumns(generatorRange); generatorRange = new Range(); if (selectedListDataset.length() != 0) { try { generatorRange.setRanges(selectedListDataset); } catch (Exception ex) { ex.printStackTrace(); System.err.println(ex.getMessage()); } } m_TTester.setDatasetKeyColumns(generatorRange); m_SigTex.setEnabled(true); setTTester(); }
|
4773 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4773/7c29a8061f31b7f783a8405053281cc8797979c5/ResultsPanel.java/clean/weka/gui/experiment/ResultsPanel.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
5361,
12,
5361,
394,
5361,
13,
288,
565,
312,
67,
5361,
273,
394,
5361,
31,
565,
312,
67,
1470,
7654,
18,
542,
5361,
12,
81,
67,
5361,
1769,
565,
312,
67,
1265,
14506,
18,
542,
1528,
2932,
15617,
315,
397,
312,
67,
5361,
18,
2107,
5361,
1435,
397,
315,
1686,
8863,
3639,
368,
2256,
1308,
10769,
565,
312,
67,
10656,
653,
1488,
18,
4479,
1595,
3471,
5621,
565,
312,
67,
1253,
653,
1488,
18,
4479,
1595,
3471,
5621,
565,
312,
67,
8583,
1488,
18,
4479,
1595,
3471,
5621,
565,
312,
67,
4416,
1488,
18,
4479,
1595,
3471,
5621,
565,
312,
67,
4416,
1488,
18,
1289,
1046,
2932,
32,
1886,
2984,
1769,
565,
312,
67,
1470,
7654,
18,
542,
4416,
1494,
19236,
21,
1769,
565,
509,
3709,
914,
273,
300,
21,
31,
565,
514,
3170,
682,
273,
1408,
31,
565,
514,
3170,
682,
10656,
273,
1408,
31,
565,
364,
261,
474,
277,
273,
374,
31,
277,
411,
312,
67,
5361,
18,
2107,
2498,
5621,
277,
27245,
288,
1377,
514,
508,
273,
312,
67,
5361,
18,
4589,
12,
77,
2934,
529,
5621,
1377,
309,
261,
529,
18,
869,
5630,
7675,
17514,
1190,
2932,
856,
67,
3113,
374,
3719,
288,
202,
81,
67,
10656,
653,
1488,
18,
1289,
1046,
12,
529,
18,
28023,
12,
24,
10019,
202,
81,
67,
1253,
653,
1488,
18,
1289,
1046,
12,
529,
18,
28023,
12,
24,
10019,
202,
81,
67,
8583,
1488,
18,
1289,
1046,
12,
529,
18,
28023,
12,
24,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
5361,
12,
5361,
394,
5361,
13,
288,
565,
312,
67,
5361,
273,
394,
5361,
31,
565,
312,
67,
1470,
7654,
18,
542,
5361,
12,
81,
67,
5361,
1769,
565,
312,
67,
1265,
14506,
18,
542,
1528,
2932,
15617,
315,
397,
312,
67,
5361,
18,
2107,
5361,
1435,
397,
315,
1686,
8863,
3639,
368,
2256,
1308,
10769,
565,
312,
67,
10656,
653,
1488,
18,
4479,
1595,
3471,
5621,
565,
312,
67,
1253,
653,
1488,
18,
4479,
1595,
3471,
5621,
565,
312,
67,
8583,
1488,
18,
4479,
1595,
3471,
5621,
565,
312,
67,
4416,
1488,
18,
4479,
1595,
3471,
5621,
565,
312,
67,
4416,
1488,
18,
1289,
1046,
2932,
32,
1886,
2984,
1769,
565,
312,
67,
1470,
2
] |
public void setVisible(boolean visible) { super.setVisible(visible); if (scontainer != null) { scontainer.setPerformActionEnabled(true); } if (visible && firstTime) { firstTime = false; // delay the execution so the dialog's progress bar is visible when // the attributes are updated Display.getDefault().asyncExec(new Runnable() { public void run() { if (getControl() != null && !getControl().isDisposed()) { updateAttributesFromRepository(false); } } }); } }
|
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/274437b4d19b9be426e498c372eff3a61fd6ff4b/TracCustomQueryPage.java/buggy/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracCustomQueryPage.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
16697,
12,
6494,
6021,
13,
288,
202,
202,
9565,
18,
542,
6207,
12,
8613,
1769,
9506,
202,
430,
261,
87,
3782,
480,
446,
13,
288,
1082,
202,
87,
3782,
18,
542,
4990,
1803,
1526,
12,
3767,
1769,
202,
202,
97,
9506,
202,
430,
261,
8613,
597,
1122,
950,
13,
288,
1082,
202,
3645,
950,
273,
629,
31,
1082,
202,
759,
4624,
326,
4588,
1427,
326,
6176,
1807,
4007,
4653,
353,
6021,
1347,
1082,
202,
759,
326,
1677,
854,
3526,
1082,
202,
4236,
18,
588,
1868,
7675,
3810,
1905,
12,
2704,
10254,
1435,
288,
9506,
202,
482,
918,
1086,
1435,
288,
6862,
202,
430,
261,
588,
3367,
1435,
480,
446,
597,
401,
588,
3367,
7675,
291,
1669,
7423,
10756,
288,
25083,
202,
2725,
2498,
1265,
3305,
12,
5743,
1769,
6862,
202,
97,
9506,
202,
97,
1082,
202,
22938,
202,
202,
97,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
16697,
12,
6494,
6021,
13,
288,
202,
202,
9565,
18,
542,
6207,
12,
8613,
1769,
9506,
202,
430,
261,
87,
3782,
480,
446,
13,
288,
1082,
202,
87,
3782,
18,
542,
4990,
1803,
1526,
12,
3767,
1769,
202,
202,
97,
9506,
202,
430,
261,
8613,
597,
1122,
950,
13,
288,
1082,
202,
3645,
950,
273,
629,
31,
1082,
202,
759,
4624,
326,
4588,
1427,
326,
6176,
1807,
4007,
4653,
353,
6021,
1347,
1082,
202,
759,
326,
1677,
854,
3526,
1082,
202,
4236,
18,
588,
1868,
7675,
3810,
1905,
12,
2704,
10254,
1435,
288,
9506,
202,
482,
918,
1086,
1435,
288,
6862,
202,
430,
261,
588,
3367,
1435,
480,
446,
597,
401,
588,
3367,
7675,
291,
2
] |
||
if(javaElt == null){
|
if (javaElt == null) {
|
protected static IJavaElement getElementAt(int position, IClassFile iClass) throws JavaModelException { SourceMapper mapper = getSourceMapper(iClass); if (mapper == null) { return null; } // ensure this class file's buffer is open so that source ranges are computed iClass.getBuffer(); IType type = iClass.getType(); IJavaElement javaElt = findElement(type, position, mapper); if(javaElt == null){ javaElt = type; } return javaElt; }
|
2697 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2697/fd19bc74dba4e4810f9cc170df9e970cc2d06b7b/JdtUtils.java/buggy/eclipse/plugin/src/de/loskutov/bco/ui/JdtUtils.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
760,
467,
5852,
1046,
7426,
861,
12,
474,
1754,
16,
467,
797,
812,
277,
797,
13,
540,
1216,
5110,
1488,
503,
288,
3639,
4998,
4597,
5815,
273,
7889,
4597,
12,
77,
797,
1769,
3639,
309,
261,
13919,
422,
446,
13,
288,
5411,
327,
446,
31,
3639,
289,
3639,
368,
3387,
333,
667,
585,
1807,
1613,
353,
1696,
1427,
716,
1084,
7322,
854,
8470,
3639,
277,
797,
18,
588,
1892,
5621,
3639,
467,
559,
618,
273,
277,
797,
18,
588,
559,
5621,
3639,
467,
5852,
1046,
2252,
15899,
273,
1104,
1046,
12,
723,
16,
1754,
16,
5815,
1769,
3639,
309,
261,
6290,
15899,
422,
446,
13,
288,
5411,
2252,
15899,
273,
618,
31,
3639,
289,
3639,
327,
2252,
15899,
31,
377,
289,
377,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
760,
467,
5852,
1046,
7426,
861,
12,
474,
1754,
16,
467,
797,
812,
277,
797,
13,
540,
1216,
5110,
1488,
503,
288,
3639,
4998,
4597,
5815,
273,
7889,
4597,
12,
77,
797,
1769,
3639,
309,
261,
13919,
422,
446,
13,
288,
5411,
327,
446,
31,
3639,
289,
3639,
368,
3387,
333,
667,
585,
1807,
1613,
353,
1696,
1427,
716,
1084,
7322,
854,
8470,
3639,
277,
797,
18,
588,
1892,
5621,
3639,
467,
559,
618,
273,
277,
797,
18,
588,
559,
5621,
3639,
467,
5852,
1046,
2252,
15899,
273,
1104,
1046,
12,
723,
16,
1754,
16,
5815,
1769,
3639,
309,
261,
6290,
15899,
422,
446,
13,
288,
5411,
2252,
15899,
273,
618,
31,
3639,
289,
3639,
327,
2252,
2
] |
if (descriptor.hasOverridingExtensions())
|
if (descriptor.hasOverridingExtensions()) {
|
public Set findOverrideableContentExtensionsForPossibleChild( Object anElement) { Set overrideableExtensions = new TreeSet( ExtensionPriorityComparator.INSTANCE); Set descriptors = findDescriptorsWithPossibleChild(anElement); for (Iterator iter = descriptors.iterator(); iter.hasNext();) { INavigatorContentDescriptor descriptor = (INavigatorContentDescriptor) iter .next(); if (descriptor.hasOverridingExtensions()) overrideableExtensions.add(getExtension(descriptor)); } return overrideableExtensions; }
|
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/NavigatorContentService.java/clean/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentService.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1000,
1104,
6618,
429,
1350,
7513,
1290,
13576,
1763,
12,
1082,
202,
921,
392,
1046,
13,
288,
202,
202,
694,
3849,
429,
7513,
273,
394,
19461,
12,
9506,
202,
3625,
8183,
5559,
18,
13341,
1769,
202,
202,
694,
14215,
273,
1104,
12705,
1190,
13576,
1763,
12,
304,
1046,
1769,
202,
202,
1884,
261,
3198,
1400,
273,
14215,
18,
9838,
5621,
1400,
18,
5332,
2134,
5621,
13,
288,
1082,
202,
706,
13061,
1350,
3187,
4950,
273,
261,
706,
13061,
1350,
3187,
13,
1400,
6862,
202,
18,
4285,
5621,
1082,
202,
430,
261,
12628,
18,
5332,
22042,
10415,
7513,
10756,
9506,
202,
10601,
429,
7513,
18,
1289,
12,
588,
3625,
12,
12628,
10019,
202,
202,
97,
202,
202,
2463,
3849,
429,
7513,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1000,
1104,
6618,
429,
1350,
7513,
1290,
13576,
1763,
12,
1082,
202,
921,
392,
1046,
13,
288,
202,
202,
694,
3849,
429,
7513,
273,
394,
19461,
12,
9506,
202,
3625,
8183,
5559,
18,
13341,
1769,
202,
202,
694,
14215,
273,
1104,
12705,
1190,
13576,
1763,
12,
304,
1046,
1769,
202,
202,
1884,
261,
3198,
1400,
273,
14215,
18,
9838,
5621,
1400,
18,
5332,
2134,
5621,
13,
288,
1082,
202,
706,
13061,
1350,
3187,
4950,
273,
261,
706,
13061,
1350,
3187,
13,
1400,
6862,
202,
18,
4285,
5621,
1082,
202,
430,
261,
12628,
18,
5332,
22042,
10415,
7513,
10756,
9506,
202,
10601,
429,
7513,
18,
1289,
12,
588,
3625,
12,
12628,
10019,
202,
202,
97,
202,
202,
2
] |
public void radarSwitch(boolean setting) { if (setting) { // Turn radar on if off if (m_RadarStatusWME.GetValue().equalsIgnoreCase(kOff)) { // Radar is off m_Agent.Update(m_RadarStatusWME, kOn); cellIDs = new Identifier[3][14]; tankColors = new StringElement[3][14]; } } else { // Turn radar off if on if (m_RadarStatusWME.GetValue().equalsIgnoreCase(kOn)) { // Radar is on m_Agent.Update(m_RadarStatusWME, kOff); for (int i = 0; i < cellIDs.length; ++i) { for (int j = 0; j < cellIDs[i].length; ++j) { if (cellIDs[i][j] != null) { m_Agent.DestroyWME(cellIDs[i][j]); cellIDs[i][j] = null; } if (tankColors[i][j] != null) { m_Agent.DestroyWME(tankColors[i][j]); tankColors[i][j] = null; } } } } } }
|
47007 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47007/8303ae1dd73ed9c9b47ad5cf72ee701f4e79aa19/Tank.java/clean/SoarSuite/Environments/JavaTankSoar/source/tanksoar/Tank.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
6459,
6012,
297,
10200,
12,
6494,
8920,
15329,
1082,
202,
430,
12,
8920,
15329,
9506,
202,
759,
15858,
6012,
297,
265,
430,
3674,
9506,
202,
430,
12,
81,
67,
6621,
297,
1482,
59,
958,
18,
967,
620,
7675,
14963,
5556,
12,
79,
7210,
3719,
95,
6862,
202,
759,
6621,
297,
291,
3674,
6862,
202,
81,
67,
3630,
18,
1891,
12,
81,
67,
6621,
297,
1482,
59,
958,
16,
79,
1398,
1769,
6862,
202,
3855,
5103,
33,
2704,
3004,
63,
23,
6362,
3461,
15533,
6862,
202,
88,
2304,
12570,
33,
2704,
780,
1046,
63,
23,
6362,
3461,
15533,
9506,
202,
97,
1082,
202,
97,
12107,
95,
9506,
202,
759,
15858,
6012,
297,
3674,
430,
265,
9506,
202,
430,
12,
81,
67,
6621,
297,
1482,
59,
958,
18,
967,
620,
7675,
14963,
5556,
12,
79,
1398,
3719,
95,
6862,
202,
759,
6621,
297,
4530,
6862,
202,
81,
67,
3630,
18,
1891,
12,
81,
67,
6621,
297,
1482,
59,
958,
16,
79,
7210,
1769,
6862,
202,
1884,
12,
474,
77,
33,
20,
31,
77,
32,
3855,
5103,
18,
2469,
31,
9904,
77,
15329,
25083,
202,
1884,
12,
474,
78,
33,
20,
31,
78,
32,
3855,
5103,
63,
77,
8009,
2469,
31,
9904,
78,
15329,
6862,
1082,
202,
430,
12,
3855,
5103,
63,
77,
6362,
78,
65,
5,
33,
2011,
15329,
6862,
9506,
202,
81,
67,
3630,
18,
10740,
59,
958,
12,
3855,
5103,
63,
77,
6362,
78,
19226,
6862,
9506,
202,
3855,
5103,
63,
77,
6362,
78,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
6459,
6012,
297,
10200,
12,
6494,
8920,
15329,
1082,
202,
430,
12,
8920,
15329,
9506,
202,
759,
15858,
6012,
297,
265,
430,
3674,
9506,
202,
430,
12,
81,
67,
6621,
297,
1482,
59,
958,
18,
967,
620,
7675,
14963,
5556,
12,
79,
7210,
3719,
95,
6862,
202,
759,
6621,
297,
291,
3674,
6862,
202,
81,
67,
3630,
18,
1891,
12,
81,
67,
6621,
297,
1482,
59,
958,
16,
79,
1398,
1769,
6862,
202,
3855,
5103,
33,
2704,
3004,
63,
23,
6362,
3461,
15533,
6862,
202,
88,
2304,
12570,
33,
2704,
780,
1046,
63,
23,
6362,
3461,
15533,
9506,
202,
97,
1082,
202,
97,
12107,
95,
9506,
202,
759,
15858,
6012,
297,
3674,
430,
265,
9506,
202,
2
] |
||
new IndexMerger(fs, fs.listFiles(indexes), index, tmpDir).merge();
|
new IndexMerger(fs, fs.listFiles(indexes), index, tmpDir, nutchConf).merge();
|
public static void main(String args[]) throws Exception { if (args.length < 1) { System.out.println ("Usage: Crawl <urlDir> [-dir d] [-threads n] [-depth i] [-topN N]"); return; } JobConf conf = new JobConf(NutchConf.get()); //conf.addConfResource("crawl-tool.xml"); File rootUrlDir = null; File dir = new File("crawl-" + getDate()); int threads = conf.getInt("fetcher.threads.fetch", 10); int depth = 5; int topN = Integer.MAX_VALUE; for (int i = 0; i < args.length; i++) { if ("-dir".equals(args[i])) { dir = new File(args[i+1]); i++; } else if ("-threads".equals(args[i])) { threads = Integer.parseInt(args[i+1]); i++; } else if ("-depth".equals(args[i])) { depth = Integer.parseInt(args[i+1]); i++; } else if ("-topN".equals(args[i])) { topN = Integer.parseInt(args[i+1]); i++; } else if (args[i] != null) { rootUrlDir = new File(args[i]); } } NutchFileSystem fs = NutchFileSystem.get(conf); if (fs.exists(dir)) { throw new RuntimeException(dir + " already exists."); } LOG.info("crawl started in: " + dir); LOG.info("rootUrlDir = " + rootUrlDir); LOG.info("threads = " + threads); LOG.info("depth = " + depth); if (topN != Integer.MAX_VALUE) LOG.info("topN = " + topN); File crawlDb = new File(dir + "/crawldb"); File linkDb = new File(dir + "/linkdb"); File segments = new File(dir + "/segments"); File indexes = new File(dir + "/indexes"); File index = new File(dir + "/index"); File tmpDir = conf.getLocalFile("crawl", getDate()); // initialize crawlDb new Injector(conf).inject(crawlDb, rootUrlDir); for (int i = 0; i < depth; i++) { // generate new segment File segment = new Generator(conf).generate(crawlDb, segments, -1, topN, System.currentTimeMillis()); new Fetcher(conf).fetch(segment, threads, Fetcher.isParsing(conf)); // fetch it if (!Fetcher.isParsing(conf)) { new ParseSegment(conf).parse(segment); // parse it, if needed } new CrawlDb(conf).update(crawlDb, segment); // update crawldb } new LinkDb(conf).invert(linkDb, segments); // invert links // index, dedup & merge new Indexer(conf).index(indexes, crawlDb, linkDb, fs.listFiles(segments)); new DeleteDuplicates(conf).dedup(new File[] { indexes }); new IndexMerger(fs, fs.listFiles(indexes), index, tmpDir).merge(); LOG.info("crawl finished: " + dir); }
|
57484 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57484/329ff64e9d7295aff108f85e9a8103f5e5f8f398/Crawl.java/clean/src/java/org/apache/nutch/crawl/Crawl.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
833,
63,
5717,
1216,
1185,
288,
565,
309,
261,
1968,
18,
2469,
411,
404,
13,
288,
1377,
2332,
18,
659,
18,
8222,
3639,
7566,
5357,
30,
385,
15161,
411,
718,
1621,
34,
23059,
1214,
302,
65,
23059,
12495,
290,
65,
23059,
5979,
277,
65,
23059,
3669,
50,
423,
4279,
1769,
1377,
327,
31,
565,
289,
565,
3956,
3976,
2195,
273,
394,
3956,
3976,
12,
50,
322,
343,
3976,
18,
588,
10663,
565,
368,
3923,
18,
1289,
3976,
1420,
2932,
71,
15161,
17,
6738,
18,
2902,
8863,
565,
1387,
1365,
1489,
1621,
273,
446,
31,
565,
1387,
1577,
273,
394,
1387,
2932,
71,
15161,
10951,
397,
10713,
10663,
565,
509,
7403,
273,
2195,
18,
588,
1702,
2932,
5754,
264,
18,
12495,
18,
5754,
3113,
1728,
1769,
565,
509,
3598,
273,
1381,
31,
565,
509,
1760,
50,
273,
2144,
18,
6694,
67,
4051,
31,
565,
364,
261,
474,
277,
273,
374,
31,
277,
411,
833,
18,
2469,
31,
277,
27245,
288,
1377,
309,
7566,
17,
1214,
9654,
14963,
12,
1968,
63,
77,
22643,
288,
3639,
1577,
273,
394,
1387,
12,
1968,
63,
77,
15,
21,
19226,
3639,
277,
9904,
31,
1377,
289,
469,
309,
7566,
17,
12495,
9654,
14963,
12,
1968,
63,
77,
22643,
288,
3639,
7403,
273,
2144,
18,
2670,
1702,
12,
1968,
63,
77,
15,
21,
19226,
3639,
277,
9904,
31,
1377,
289,
469,
309,
7566,
17,
5979,
9654,
14963,
12,
1968,
63,
77,
22643,
288,
3639,
3598,
273,
2144,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
833,
63,
5717,
1216,
1185,
288,
565,
309,
261,
1968,
18,
2469,
411,
404,
13,
288,
1377,
2332,
18,
659,
18,
8222,
3639,
7566,
5357,
30,
385,
15161,
411,
718,
1621,
34,
23059,
1214,
302,
65,
23059,
12495,
290,
65,
23059,
5979,
277,
65,
23059,
3669,
50,
423,
4279,
1769,
1377,
327,
31,
565,
289,
565,
3956,
3976,
2195,
273,
394,
3956,
3976,
12,
50,
322,
343,
3976,
18,
588,
10663,
565,
368,
3923,
18,
1289,
3976,
1420,
2932,
71,
15161,
17,
6738,
18,
2902,
8863,
565,
1387,
1365,
1489,
1621,
273,
446,
31,
565,
1387,
1577,
273,
394,
1387,
2932,
71,
15161,
10951,
397,
10713,
10663,
565,
509,
7403,
273,
2195,
2
] |
XJAlert.display("Connection Error", "Cannot launch the debugger.\nTime-out waiting to connect to the remote parser.");
|
XJAlert.display(editor.getWindowComponent(), "Connection Error", "Cannot launch the debugger.\nTime-out waiting to connect to the remote parser.");
|
public void debuggerLaunch(String address, int port) { if(!debuggerLaunchGrammar()) { XJAlert.display("Error", "Cannot launch the debugger.\nException while parsing grammar."); return; } if(!recorder.start(address, port)) { XJAlert.display("Connection Error", "Cannot launch the debugger.\nTime-out waiting to connect to the remote parser."); return; } XJNotificationCenter.defaultCenter().postNotification(this, NOTIF_DEBUG_STARTED); editor.getTextPane().setEditable(false); editor.getTextPane().requestFocus(false); previousGrammarAttributeSet = null; player.resetPlayEvents(true); }
|
51505 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51505/eb41a813838c5c58e0c81bd6db522264bdba0612/Debugger.java/clean/src/org/antlr/works/debugger/Debugger.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
19977,
9569,
12,
780,
1758,
16,
509,
1756,
13,
288,
3639,
309,
12,
5,
4148,
693,
9569,
18576,
10756,
288,
5411,
1139,
46,
13298,
18,
5417,
2932,
668,
3113,
315,
4515,
8037,
326,
19977,
8403,
82,
503,
1323,
5811,
6473,
1199,
1769,
5411,
327,
31,
3639,
289,
3639,
309,
12,
5,
3366,
264,
18,
1937,
12,
2867,
16,
1756,
3719,
288,
5411,
1139,
46,
13298,
18,
5417,
12,
9177,
18,
588,
3829,
1841,
9334,
315,
1952,
1068,
3113,
315,
4515,
8037,
326,
19977,
8403,
82,
950,
17,
659,
7336,
358,
3077,
358,
326,
2632,
2082,
1199,
1769,
5411,
327,
31,
3639,
289,
3639,
1139,
46,
4386,
8449,
18,
1886,
8449,
7675,
2767,
4386,
12,
2211,
16,
4269,
5501,
67,
9394,
67,
20943,
6404,
1769,
3639,
4858,
18,
588,
1528,
8485,
7675,
542,
15470,
12,
5743,
1769,
3639,
4858,
18,
588,
1528,
8485,
7675,
2293,
9233,
12,
5743,
1769,
3639,
2416,
18576,
1499,
694,
273,
446,
31,
3639,
7291,
18,
6208,
11765,
3783,
12,
3767,
1769,
5411,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
19977,
9569,
12,
780,
1758,
16,
509,
1756,
13,
288,
3639,
309,
12,
5,
4148,
693,
9569,
18576,
10756,
288,
5411,
1139,
46,
13298,
18,
5417,
2932,
668,
3113,
315,
4515,
8037,
326,
19977,
8403,
82,
503,
1323,
5811,
6473,
1199,
1769,
5411,
327,
31,
3639,
289,
3639,
309,
12,
5,
3366,
264,
18,
1937,
12,
2867,
16,
1756,
3719,
288,
5411,
1139,
46,
13298,
18,
5417,
12,
9177,
18,
588,
3829,
1841,
9334,
315,
1952,
1068,
3113,
315,
4515,
8037,
326,
19977,
8403,
82,
950,
17,
659,
7336,
358,
3077,
358,
326,
2632,
2082,
1199,
1769,
5411,
327,
31,
3639,
289,
3639,
1139,
46,
4386,
8449,
18,
1886,
8449,
7675,
2767,
4386,
12,
2211,
16,
2
] |
calendar_field = Calendar.DST_OFFSET;
|
calendar_field = Calendar.ZONE_OFFSET;
|
public Date parse (String dateStr, ParsePosition pos) { int fmt_index = 0; int fmt_max = pattern.length(); calendar.clear(); boolean saw_timezone = false; int quote_start = -1; boolean is2DigitYear = false; try { for (; fmt_index < fmt_max; ++fmt_index) { char ch = pattern.charAt(fmt_index); if (ch == '\'') { int index = pos.getIndex(); if (fmt_index < fmt_max - 1 && pattern.charAt(fmt_index + 1) == '\'') { if (! expect (dateStr, pos, ch)) return null; ++fmt_index; } else quote_start = quote_start < 0 ? fmt_index : -1; continue; } if (quote_start != -1 || ((ch < 'a' || ch > 'z') && (ch < 'A' || ch > 'Z'))) { if (! expect (dateStr, pos, ch)) return null; continue; } // We've arrived at a potential pattern character in the // pattern. int fmt_count = 1; while (++fmt_index < fmt_max && pattern.charAt(fmt_index) == ch) { ++fmt_count; } // We might need to limit the number of digits to parse in // some cases. We look to the next pattern character to // decide. boolean limit_digits = false; if (fmt_index < fmt_max && standardChars.indexOf(pattern.charAt(fmt_index)) >= 0) limit_digits = true; --fmt_index; // We can handle most fields automatically: most either are // numeric or are looked up in a string vector. In some cases // we need an offset. When numeric, `offset' is added to the // resulting value. When doing a string lookup, offset is the // initial index into the string array. int calendar_field; boolean is_numeric = true; int offset = 0; boolean maybe2DigitYear = false; Integer simpleOffset; String[] set1 = null; String[] set2 = null; switch (ch) { case 'd': calendar_field = Calendar.DATE; break; case 'D': calendar_field = Calendar.DAY_OF_YEAR; break; case 'F': calendar_field = Calendar.DAY_OF_WEEK_IN_MONTH; break; case 'E': is_numeric = false; offset = 1; calendar_field = Calendar.DAY_OF_WEEK; set1 = formatData.getWeekdays(); set2 = formatData.getShortWeekdays(); break; case 'w': calendar_field = Calendar.WEEK_OF_YEAR; break; case 'W': calendar_field = Calendar.WEEK_OF_MONTH; break; case 'M': calendar_field = Calendar.MONTH; if (fmt_count <= 2) offset = -1; else { is_numeric = false; set1 = formatData.getMonths(); set2 = formatData.getShortMonths(); } break; case 'y': calendar_field = Calendar.YEAR; if (fmt_count <= 2) maybe2DigitYear = true; break; case 'K': calendar_field = Calendar.HOUR; break; case 'h': calendar_field = Calendar.HOUR; break; case 'H': calendar_field = Calendar.HOUR_OF_DAY; break; case 'k': calendar_field = Calendar.HOUR_OF_DAY; break; case 'm': calendar_field = Calendar.MINUTE; break; case 's': calendar_field = Calendar.SECOND; break; case 'S': calendar_field = Calendar.MILLISECOND; break; case 'a': is_numeric = false; calendar_field = Calendar.AM_PM; set1 = formatData.getAmPmStrings(); break; case 'z': case 'Z': // We need a special case for the timezone, because it // uses a different data structure than the other cases. is_numeric = false; calendar_field = Calendar.DST_OFFSET; String[][] zoneStrings = formatData.getZoneStrings(); int zoneCount = zoneStrings.length; int index = pos.getIndex(); boolean found_zone = false; simpleOffset = computeOffset(dateStr.substring(index)); if (simpleOffset != null) { found_zone = true; saw_timezone = true; offset = simpleOffset.intValue(); } else { for (int j = 0; j < zoneCount; j++) { String[] strings = zoneStrings[j]; int k; for (k = 0; k < strings.length; ++k) { if (dateStr.startsWith(strings[k], index)) break; } if (k != strings.length) { found_zone = true; saw_timezone = true; TimeZone tz = TimeZone.getTimeZone (strings[0]); calendar.set (Calendar.ZONE_OFFSET, tz.getRawOffset ()); offset = tz.getDSTSavings(); pos.setIndex(index + strings[k].length()); break; } } } if (! found_zone) { pos.setErrorIndex(pos.getIndex()); return null; } break; default: pos.setErrorIndex(pos.getIndex()); return null; } // Compute the value we should assign to the field. int value; int index = -1; if (is_numeric) { numberFormat.setMinimumIntegerDigits(fmt_count); if (limit_digits) numberFormat.setMaximumIntegerDigits(fmt_count); if (maybe2DigitYear) index = pos.getIndex(); Number n = numberFormat.parse(dateStr, pos); if (pos == null || ! (n instanceof Long)) return null; value = n.intValue() + offset; } else if (set1 != null) { index = pos.getIndex(); int i; boolean found = false; for (i = offset; i < set1.length; ++i) { if (set1[i] != null) if (dateStr.toUpperCase().startsWith(set1[i].toUpperCase(), index)) { found = true; pos.setIndex(index + set1[i].length()); break; } } if (!found && set2 != null) { for (i = offset; i < set2.length; ++i) { if (set2[i] != null) if (dateStr.toUpperCase().startsWith(set2[i].toUpperCase(), index)) { found = true; pos.setIndex(index + set2[i].length()); break; } } } if (!found) { pos.setErrorIndex(index); return null; } value = i; } else value = offset; if (maybe2DigitYear) { // Parse into default century if the numeric year string has // exactly 2 digits. int digit_count = pos.getIndex() - index; if (digit_count == 2) is2DigitYear = true; } // Assign the value and move on. calendar.set(calendar_field, value); } if (is2DigitYear) { // Apply the 80-20 heuristic to dermine the full year based on // defaultCenturyStart. int year = defaultCentury + calendar.get(Calendar.YEAR); calendar.set(Calendar.YEAR, year); if (calendar.getTime().compareTo(defaultCenturyStart) < 0) calendar.set(Calendar.YEAR, year + 100); } if (! saw_timezone) { // Use the real rules to determine whether or not this // particular time is in daylight savings. calendar.clear (Calendar.DST_OFFSET); calendar.clear (Calendar.ZONE_OFFSET); } return calendar.getTime(); } catch (IllegalArgumentException x) { pos.setErrorIndex(pos.getIndex()); return null; } }
|
45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/4ddb6802d178a77eafa5dec0166cde4731e3c8ff/SimpleDateFormat.java/clean/libraries/javalib/java/text/SimpleDateFormat.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2167,
1109,
261,
780,
1509,
1585,
16,
2884,
2555,
949,
13,
225,
288,
565,
509,
1325,
67,
1615,
273,
374,
31,
565,
509,
1325,
67,
1896,
273,
1936,
18,
2469,
5621,
565,
5686,
18,
8507,
5621,
565,
1250,
19821,
67,
12690,
273,
629,
31,
565,
509,
3862,
67,
1937,
273,
300,
21,
31,
565,
1250,
353,
22,
10907,
5593,
273,
629,
31,
565,
775,
1377,
288,
202,
1884,
261,
31,
1325,
67,
1615,
411,
1325,
67,
1896,
31,
965,
8666,
67,
1615,
13,
202,
225,
288,
202,
565,
1149,
462,
273,
1936,
18,
3001,
861,
12,
8666,
67,
1615,
1769,
202,
565,
309,
261,
343,
422,
14118,
6134,
202,
1377,
288,
202,
202,
474,
770,
273,
949,
18,
588,
1016,
5621,
202,
202,
430,
261,
8666,
67,
1615,
411,
1325,
67,
1896,
300,
404,
1082,
565,
597,
1936,
18,
3001,
861,
12,
8666,
67,
1615,
397,
404,
13,
422,
14118,
6134,
1082,
225,
288,
1082,
565,
309,
16051,
4489,
261,
712,
1585,
16,
949,
16,
462,
3719,
1082,
1377,
327,
446,
31,
1082,
565,
965,
8666,
67,
1615,
31,
1082,
225,
289,
202,
202,
12107,
1082,
225,
3862,
67,
1937,
273,
3862,
67,
1937,
411,
374,
692,
1325,
67,
1615,
294,
300,
21,
31,
202,
202,
17143,
31,
202,
1377,
289,
202,
377,
202,
565,
309,
261,
6889,
67,
1937,
480,
300,
21,
202,
202,
20081,
14015,
343,
411,
296,
69,
11,
747,
462,
405,
296,
94,
6134,
1082,
565,
597,
261,
343,
411,
296,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2167,
1109,
261,
780,
1509,
1585,
16,
2884,
2555,
949,
13,
225,
288,
565,
509,
1325,
67,
1615,
273,
374,
31,
565,
509,
1325,
67,
1896,
273,
1936,
18,
2469,
5621,
565,
5686,
18,
8507,
5621,
565,
1250,
19821,
67,
12690,
273,
629,
31,
565,
509,
3862,
67,
1937,
273,
300,
21,
31,
565,
1250,
353,
22,
10907,
5593,
273,
629,
31,
565,
775,
1377,
288,
202,
1884,
261,
31,
1325,
67,
1615,
411,
1325,
67,
1896,
31,
965,
8666,
67,
1615,
13,
202,
225,
288,
202,
565,
1149,
462,
273,
1936,
18,
3001,
861,
12,
8666,
67,
1615,
1769,
202,
565,
309,
261,
343,
422,
14118,
6134,
202,
1377,
288,
202,
202,
474,
770,
273,
949,
2
] |
if (validateParams != null && validateParams.size() > 0 && validateParamMap == null)
|
if (validateParams != null && validateParams.size() > 0)
|
private void addRuleField(XMLElement spec) { Vector forPacks = spec.getChildrenNamed(SELECTEDPACKS); Vector forOs = spec.getChildrenNamed(OS); XMLElement element = spec.getFirstChildNamed(SPEC); String variable = spec.getAttribute(VARIABLE); RuleInputField field = null; JLabel label; String layout; String set; String separator; String format; String validator = null; String message = null; boolean hasParams = false; String paramName = null; String paramValue = null; HashMap validateParamMap = null; Vector validateParams = null; String processor = null; int resultFormat = RuleInputField.DISPLAY_FORMAT; // ---------------------------------------------------- // extract the specification details // ---------------------------------------------------- if (element != null) { label = new JLabel(getText(element)); layout = element.getAttribute(RULE_LAYOUT); set = element.getAttribute(SET); // retrieve value of variable if not specified // (does not work here because of special format for set attribute) // if (set == null) // { // set = idata.getVariable (variable); // } separator = element.getAttribute(RULE_SEPARATOR); format = element.getAttribute(RULE_RESULT_FORMAT); if (format != null) { if (format.equals(RULE_PLAIN_STRING)) { resultFormat = RuleInputField.PLAIN_STRING; } else if (format.equals(RULE_DISPLAY_FORMAT)) { resultFormat = RuleInputField.DISPLAY_FORMAT; } else if (format.equals(RULE_SPECIAL_SEPARATOR)) { resultFormat = RuleInputField.SPECIAL_SEPARATOR; } else if (format.equals(RULE_ENCRYPTED)) { resultFormat = RuleInputField.ENCRYPTED; } } } // ---------------------------------------------------- // if there is no specification element, return without // doing anything. // ---------------------------------------------------- else { return; } // ---------------------------------------------------- // get the description and add it to the list of UI // elements if it exists. // ---------------------------------------------------- element = spec.getFirstChildNamed(DESCRIPTION); addDescription(element, forPacks, forOs); // ---------------------------------------------------- // get the validator and processor if they are defined // ---------------------------------------------------- element = spec.getFirstChildNamed(VALIDATOR); if (element != null) { validator = element.getAttribute(CLASS); message = getText(element); // ---------------------------------------------------------- // check and see if we have any parameters for this validator. // If so, then add them to validateParamMap. // ---------------------------------------------------------- validateParams = element.getChildrenNamed(RULE_PARAM); if (validateParams != null && validateParams.size() > 0 && validateParamMap == null) { validateParamMap = new HashMap(); hasParams = true; } for (Iterator it = validateParams.iterator(); it.hasNext();) { element = (XMLElement) it.next(); paramName = element.getAttribute(RULE_PARAM_NAME); paramValue = element.getAttribute(RULE_PARAM_VALUE); validateParamMap.put(paramName, paramValue); } } element = spec.getFirstChildNamed(PROCESSOR); if (element != null) { processor = element.getAttribute(CLASS); } // ---------------------------------------------------- // create an instance of RuleInputField based on the // extracted specifications, then add it to the list // of UI elements. // ---------------------------------------------------- if (hasParams) { field = new RuleInputField(layout, set, separator, validator, validateParamMap, processor, resultFormat, getToolkit(), idata); } else { field = new RuleInputField(layout, set, separator, validator, processor, resultFormat, getToolkit(), idata); } TwoColumnConstraints constraints = new TwoColumnConstraints(); constraints.position = TwoColumnConstraints.WEST; uiElements .add(new Object[] { null, FIELD_LABEL, null, constraints, label, forPacks, forOs}); TwoColumnConstraints constraints2 = new TwoColumnConstraints(); constraints2.position = TwoColumnConstraints.EAST; uiElements.add(new Object[] { null, RULE_FIELD, variable, constraints2, field, forPacks, forOs, null, null, message}); }
|
28044 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28044/3eee5d38a1d4b4e7c587e74f8cb9f1b6650c0d54/UserInputPanel.java/clean/src/lib/com/izforge/izpack/panels/UserInputPanel.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
21264,
974,
12,
15223,
857,
13,
565,
288,
3639,
5589,
364,
4420,
87,
273,
857,
18,
588,
4212,
7604,
12,
4803,
2056,
12231,
55,
1769,
3639,
5589,
364,
15112,
273,
857,
18,
588,
4212,
7604,
12,
4618,
1769,
3639,
1139,
11155,
930,
273,
857,
18,
588,
3759,
1763,
7604,
12,
13847,
1769,
3639,
514,
2190,
273,
857,
18,
588,
1499,
12,
16444,
1769,
3639,
6781,
1210,
974,
652,
273,
446,
31,
3639,
21403,
1433,
31,
3639,
514,
3511,
31,
3639,
514,
444,
31,
3639,
514,
4182,
31,
3639,
514,
740,
31,
3639,
514,
4213,
273,
446,
31,
3639,
514,
883,
273,
446,
31,
3639,
1250,
711,
1370,
273,
629,
31,
3639,
514,
11466,
273,
446,
31,
3639,
514,
20250,
273,
446,
31,
3639,
4317,
1954,
786,
863,
273,
446,
31,
3639,
5589,
1954,
1370,
273,
446,
31,
3639,
514,
6659,
273,
446,
31,
3639,
509,
563,
1630,
273,
6781,
1210,
974,
18,
17463,
67,
7254,
31,
3639,
368,
13420,
6062,
3639,
368,
2608,
326,
7490,
3189,
3639,
368,
13420,
6062,
3639,
309,
261,
2956,
480,
446,
13,
3639,
288,
5411,
1433,
273,
394,
21403,
12,
588,
1528,
12,
2956,
10019,
5411,
3511,
273,
930,
18,
588,
1499,
12,
14920,
67,
7868,
5069,
1769,
5411,
444,
273,
930,
18,
588,
1499,
12,
4043,
1769,
5411,
368,
4614,
460,
434,
2190,
309,
486,
1269,
5411,
368,
261,
20657,
486,
1440,
2674,
2724,
434,
4582,
740,
364,
444,
1566,
13,
5411,
368,
309,
261,
542,
422,
446,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21264,
974,
12,
15223,
857,
13,
565,
288,
3639,
5589,
364,
4420,
87,
273,
857,
18,
588,
4212,
7604,
12,
4803,
2056,
12231,
55,
1769,
3639,
5589,
364,
15112,
273,
857,
18,
588,
4212,
7604,
12,
4618,
1769,
3639,
1139,
11155,
930,
273,
857,
18,
588,
3759,
1763,
7604,
12,
13847,
1769,
3639,
514,
2190,
273,
857,
18,
588,
1499,
12,
16444,
1769,
3639,
6781,
1210,
974,
652,
273,
446,
31,
3639,
21403,
1433,
31,
3639,
514,
3511,
31,
3639,
514,
444,
31,
3639,
514,
4182,
31,
3639,
514,
740,
31,
3639,
514,
4213,
273,
446,
31,
3639,
514,
883,
273,
446,
31,
3639,
1250,
711,
1370,
273,
629,
31,
3639,
514,
11466,
273,
446,
31,
2
] |
return(getVisibleAmount());
|
return visibleAmount;
|
getVisible(){ return(getVisibleAmount());}
|
47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/ae8c30ebd4d7b20832df50745efebf628509add4/Scrollbar.java/clean/java/awt/Scrollbar.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
31564,
1435,
95,
225,
327,
12,
588,
6207,
6275,
10663,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
31564,
1435,
95,
225,
327,
12,
588,
6207,
6275,
10663,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
private static String bytecodeStr(byte code)
|
private static String bytecodeStr(int code)
|
private static String bytecodeStr(byte code) { if (DEBUGSTACK || DEBUGCODE) { switch (code) { case ByteCode.NOP: return "nop"; case ByteCode.ACONST_NULL: return "aconst_null"; case ByteCode.ICONST_M1: return "iconst_m1"; case ByteCode.ICONST_0: return "iconst_0"; case ByteCode.ICONST_1: return "iconst_1"; case ByteCode.ICONST_2: return "iconst_2"; case ByteCode.ICONST_3: return "iconst_3"; case ByteCode.ICONST_4: return "iconst_4"; case ByteCode.ICONST_5: return "iconst_5"; case ByteCode.LCONST_0: return "lconst_0"; case ByteCode.LCONST_1: return "lconst_1"; case ByteCode.FCONST_0: return "fconst_0"; case ByteCode.FCONST_1: return "fconst_1"; case ByteCode.FCONST_2: return "fconst_2"; case ByteCode.DCONST_0: return "dconst_0"; case ByteCode.DCONST_1: return "dconst_1"; case ByteCode.BIPUSH: return "bipush"; case ByteCode.SIPUSH: return "sipush"; case ByteCode.LDC: return "ldc"; case ByteCode.LDC_W: return "ldc_w"; case ByteCode.LDC2_W: return "ldc2_w"; case ByteCode.ILOAD: return "iload"; case ByteCode.LLOAD: return "lload"; case ByteCode.FLOAD: return "fload"; case ByteCode.DLOAD: return "dload"; case ByteCode.ALOAD: return "aload"; case ByteCode.ILOAD_0: return "iload_0"; case ByteCode.ILOAD_1: return "iload_1"; case ByteCode.ILOAD_2: return "iload_2"; case ByteCode.ILOAD_3: return "iload_3"; case ByteCode.LLOAD_0: return "lload_0"; case ByteCode.LLOAD_1: return "lload_1"; case ByteCode.LLOAD_2: return "lload_2"; case ByteCode.LLOAD_3: return "lload_3"; case ByteCode.FLOAD_0: return "fload_0"; case ByteCode.FLOAD_1: return "fload_1"; case ByteCode.FLOAD_2: return "fload_2"; case ByteCode.FLOAD_3: return "fload_3"; case ByteCode.DLOAD_0: return "dload_0"; case ByteCode.DLOAD_1: return "dload_1"; case ByteCode.DLOAD_2: return "dload_2"; case ByteCode.DLOAD_3: return "dload_3"; case ByteCode.ALOAD_0: return "aload_0"; case ByteCode.ALOAD_1: return "aload_1"; case ByteCode.ALOAD_2: return "aload_2"; case ByteCode.ALOAD_3: return "aload_3"; case ByteCode.IALOAD: return "iaload"; case ByteCode.LALOAD: return "laload"; case ByteCode.FALOAD: return "faload"; case ByteCode.DALOAD: return "daload"; case ByteCode.AALOAD: return "aaload"; case ByteCode.BALOAD: return "baload"; case ByteCode.CALOAD: return "caload"; case ByteCode.SALOAD: return "saload"; case ByteCode.ISTORE: return "istore"; case ByteCode.LSTORE: return "lstore"; case ByteCode.FSTORE: return "fstore"; case ByteCode.DSTORE: return "dstore"; case ByteCode.ASTORE: return "astore"; case ByteCode.ISTORE_0: return "istore_0"; case ByteCode.ISTORE_1: return "istore_1"; case ByteCode.ISTORE_2: return "istore_2"; case ByteCode.ISTORE_3: return "istore_3"; case ByteCode.LSTORE_0: return "lstore_0"; case ByteCode.LSTORE_1: return "lstore_1"; case ByteCode.LSTORE_2: return "lstore_2"; case ByteCode.LSTORE_3: return "lstore_3"; case ByteCode.FSTORE_0: return "fstore_0"; case ByteCode.FSTORE_1: return "fstore_1"; case ByteCode.FSTORE_2: return "fstore_2"; case ByteCode.FSTORE_3: return "fstore_3"; case ByteCode.DSTORE_0: return "dstore_0"; case ByteCode.DSTORE_1: return "dstore_1"; case ByteCode.DSTORE_2: return "dstore_2"; case ByteCode.DSTORE_3: return "dstore_3"; case ByteCode.ASTORE_0: return "astore_0"; case ByteCode.ASTORE_1: return "astore_1"; case ByteCode.ASTORE_2: return "astore_2"; case ByteCode.ASTORE_3: return "astore_3"; case ByteCode.IASTORE: return "iastore"; case ByteCode.LASTORE: return "lastore"; case ByteCode.FASTORE: return "fastore"; case ByteCode.DASTORE: return "dastore"; case ByteCode.AASTORE: return "aastore"; case ByteCode.BASTORE: return "bastore"; case ByteCode.CASTORE: return "castore"; case ByteCode.SASTORE: return "sastore"; case ByteCode.POP: return "pop"; case ByteCode.POP2: return "pop2"; case ByteCode.DUP: return "dup"; case ByteCode.DUP_X1: return "dup_x1"; case ByteCode.DUP_X2: return "dup_x2"; case ByteCode.DUP2: return "dup2"; case ByteCode.DUP2_X1: return "dup2_x1"; case ByteCode.DUP2_X2: return "dup2_x2"; case ByteCode.SWAP: return "swap"; case ByteCode.IADD: return "iadd"; case ByteCode.LADD: return "ladd"; case ByteCode.FADD: return "fadd"; case ByteCode.DADD: return "dadd"; case ByteCode.ISUB: return "isub"; case ByteCode.LSUB: return "lsub"; case ByteCode.FSUB: return "fsub"; case ByteCode.DSUB: return "dsub"; case ByteCode.IMUL: return "imul"; case ByteCode.LMUL: return "lmul"; case ByteCode.FMUL: return "fmul"; case ByteCode.DMUL: return "dmul"; case ByteCode.IDIV: return "idiv"; case ByteCode.LDIV: return "ldiv"; case ByteCode.FDIV: return "fdiv"; case ByteCode.DDIV: return "ddiv"; case ByteCode.IREM: return "irem"; case ByteCode.LREM: return "lrem"; case ByteCode.FREM: return "frem"; case ByteCode.DREM: return "drem"; case ByteCode.INEG: return "ineg"; case ByteCode.LNEG: return "lneg"; case ByteCode.FNEG: return "fneg"; case ByteCode.DNEG: return "dneg"; case ByteCode.ISHL: return "ishl"; case ByteCode.LSHL: return "lshl"; case ByteCode.ISHR: return "ishr"; case ByteCode.LSHR: return "lshr"; case ByteCode.IUSHR: return "iushr"; case ByteCode.LUSHR: return "lushr"; case ByteCode.IAND: return "iand"; case ByteCode.LAND: return "land"; case ByteCode.IOR: return "ior"; case ByteCode.LOR: return "lor"; case ByteCode.IXOR: return "ixor"; case ByteCode.LXOR: return "lxor"; case ByteCode.IINC: return "iinc"; case ByteCode.I2L: return "i2l"; case ByteCode.I2F: return "i2f"; case ByteCode.I2D: return "i2d"; case ByteCode.L2I: return "l2i"; case ByteCode.L2F: return "l2f"; case ByteCode.L2D: return "l2d"; case ByteCode.F2I: return "f2i"; case ByteCode.F2L: return "f2l"; case ByteCode.F2D: return "f2d"; case ByteCode.D2I: return "d2i"; case ByteCode.D2L: return "d2l"; case ByteCode.D2F: return "d2f"; case ByteCode.I2B: return "i2b"; case ByteCode.I2C: return "i2c"; case ByteCode.I2S: return "i2s"; case ByteCode.LCMP: return "lcmp"; case ByteCode.FCMPL: return "fcmpl"; case ByteCode.FCMPG: return "fcmpg"; case ByteCode.DCMPL: return "dcmpl"; case ByteCode.DCMPG: return "dcmpg"; case ByteCode.IFEQ: return "ifeq"; case ByteCode.IFNE: return "ifne"; case ByteCode.IFLT: return "iflt"; case ByteCode.IFGE: return "ifge"; case ByteCode.IFGT: return "ifgt"; case ByteCode.IFLE: return "ifle"; case ByteCode.IF_ICMPEQ: return "if_icmpeq"; case ByteCode.IF_ICMPNE: return "if_icmpne"; case ByteCode.IF_ICMPLT: return "if_icmplt"; case ByteCode.IF_ICMPGE: return "if_icmpge"; case ByteCode.IF_ICMPGT: return "if_icmpgt"; case ByteCode.IF_ICMPLE: return "if_icmple"; case ByteCode.IF_ACMPEQ: return "if_acmpeq"; case ByteCode.IF_ACMPNE: return "if_acmpne"; case ByteCode.GOTO: return "goto"; case ByteCode.JSR: return "jsr"; case ByteCode.RET: return "ret"; case ByteCode.TABLESWITCH: return "tableswitch"; case ByteCode.LOOKUPSWITCH: return "lookupswitch"; case ByteCode.IRETURN: return "ireturn"; case ByteCode.LRETURN: return "lreturn"; case ByteCode.FRETURN: return "freturn"; case ByteCode.DRETURN: return "dreturn"; case ByteCode.ARETURN: return "areturn"; case ByteCode.RETURN: return "return"; case ByteCode.GETSTATIC: return "getstatic"; case ByteCode.PUTSTATIC: return "putstatic"; case ByteCode.GETFIELD: return "getfield"; case ByteCode.PUTFIELD: return "putfield"; case ByteCode.INVOKEVIRTUAL: return "invokevirtual"; case ByteCode.INVOKESPECIAL: return "invokespecial"; case ByteCode.INVOKESTATIC: return "invokestatic"; case ByteCode.INVOKEINTERFACE: return "invokeinterface"; case ByteCode.NEW: return "new"; case ByteCode.NEWARRAY: return "newarray"; case ByteCode.ANEWARRAY: return "anewarray"; case ByteCode.ARRAYLENGTH: return "arraylength"; case ByteCode.ATHROW: return "athrow"; case ByteCode.CHECKCAST: return "checkcast"; case ByteCode.INSTANCEOF: return "instanceof"; case ByteCode.MONITORENTER: return "monitorenter"; case ByteCode.MONITOREXIT: return "monitorexit"; case ByteCode.WIDE: return "wide"; case ByteCode.MULTIANEWARRAY: return "multianewarray"; case ByteCode.IFNULL: return "ifnull"; case ByteCode.IFNONNULL: return "ifnonnull"; case ByteCode.GOTO_W: return "goto_w"; case ByteCode.JSR_W: return "jsr_w"; case ByteCode.BREAKPOINT: return "breakpoint"; case ByteCode.IMPDEP1: return "impdep1"; case ByteCode.IMPDEP2: return "impdep2"; } } return ""; }
|
51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/d3a2da86ba78c764eb7e4799c50871b182929d40/ClassFileWriter.java/buggy/js/rhino/src/org/mozilla/classfile/ClassFileWriter.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
22801,
1585,
12,
474,
981,
13,
565,
288,
3639,
309,
261,
9394,
21971,
747,
6369,
5572,
13,
288,
5411,
1620,
261,
710,
13,
288,
7734,
648,
3506,
1085,
18,
3417,
52,
30,
2868,
327,
315,
82,
556,
14432,
7734,
648,
3506,
1085,
18,
2226,
673,
882,
67,
8560,
30,
1377,
327,
315,
69,
10248,
67,
2011,
14432,
7734,
648,
3506,
1085,
18,
21745,
882,
67,
49,
21,
30,
3639,
327,
315,
3950,
334,
67,
81,
21,
14432,
7734,
648,
3506,
1085,
18,
21745,
882,
67,
20,
30,
540,
327,
315,
3950,
334,
67,
20,
14432,
7734,
648,
3506,
1085,
18,
21745,
882,
67,
21,
30,
540,
327,
315,
3950,
334,
67,
21,
14432,
7734,
648,
3506,
1085,
18,
21745,
882,
67,
22,
30,
540,
327,
315,
3950,
334,
67,
22,
14432,
7734,
648,
3506,
1085,
18,
21745,
882,
67,
23,
30,
540,
327,
315,
3950,
334,
67,
23,
14432,
7734,
648,
3506,
1085,
18,
21745,
882,
67,
24,
30,
540,
327,
315,
3950,
334,
67,
24,
14432,
7734,
648,
3506,
1085,
18,
21745,
882,
67,
25,
30,
540,
327,
315,
3950,
334,
67,
25,
14432,
7734,
648,
3506,
1085,
18,
48,
26411,
67,
20,
30,
540,
327,
315,
80,
10248,
67,
20,
14432,
7734,
648,
3506,
1085,
18,
48,
26411,
67,
21,
30,
540,
327,
315,
80,
10248,
67,
21,
14432,
7734,
648,
3506,
1085,
18,
42,
26411,
67,
20,
30,
540,
327,
315,
74,
10248,
67,
20,
14432,
7734,
648,
3506,
1085,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
22801,
1585,
12,
474,
981,
13,
565,
288,
3639,
309,
261,
9394,
21971,
747,
6369,
5572,
13,
288,
5411,
1620,
261,
710,
13,
288,
7734,
648,
3506,
1085,
18,
3417,
52,
30,
2868,
327,
315,
82,
556,
14432,
7734,
648,
3506,
1085,
18,
2226,
673,
882,
67,
8560,
30,
1377,
327,
315,
69,
10248,
67,
2011,
14432,
7734,
648,
3506,
1085,
18,
21745,
882,
67,
49,
21,
30,
3639,
327,
315,
3950,
334,
67,
81,
21,
14432,
7734,
648,
3506,
1085,
18,
21745,
882,
67,
20,
30,
540,
327,
315,
3950,
334,
67,
20,
14432,
7734,
648,
3506,
1085,
18,
21745,
882,
67,
21,
30,
540,
327,
315,
3950,
334,
67,
21,
14432,
7734,
648,
2
] |
ErrorReporter err = new ErrorReporter(rb);
|
ErrorReporter err = new ErrorReporter();
|
protected void doErrorReport(HttpServletRequest req, HttpServletResponse res) throws ToolException, IOException { setupForward(req, res, null, null); ErrorReporter err = new ErrorReporter(rb); err.postResponse(req, res); }
|
2021 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2021/e0accbccf5df7486f8bd372e94e42d6a2bd1e954/CharonPortal.java/buggy/portal/portal-impl/impl/src/java/org/sakaiproject/portal/charon/CharonPortal.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
741,
668,
4820,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
1216,
13288,
503,
16,
1860,
202,
95,
202,
202,
8401,
8514,
12,
3658,
16,
400,
16,
446,
16,
446,
1769,
202,
202,
668,
13289,
393,
273,
394,
1068,
13289,
12,
6731,
1769,
202,
202,
370,
18,
2767,
1064,
12,
3658,
16,
400,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
741,
668,
4820,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
1216,
13288,
503,
16,
1860,
202,
95,
202,
202,
8401,
8514,
12,
3658,
16,
400,
16,
446,
16,
446,
1769,
202,
202,
668,
13289,
393,
273,
394,
1068,
13289,
12,
6731,
1769,
202,
202,
370,
18,
2767,
1064,
12,
3658,
16,
400,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
private boolean performMoveOperation(boolean isFolder) throws CmsException { // on folder move operation display "please wait" screen, not for simple file move operation if (isFolder && ! DIALOG_WAIT.equals(getParamAction())) { // return false, this will trigger the "please wait" screen return false; } // get the target name String target = getParamTarget(); if (target == null) { target = ""; } boolean restoreSiteRoot = false; try { // check if a site root was added to the target name String sitePrefix = ""; if (CmsSiteManager.getSiteRoot(target) != null) { String siteRootFolder = getCms().getRequestContext().getSiteRoot(); if (siteRootFolder.endsWith("/")) { siteRootFolder = siteRootFolder.substring(0, siteRootFolder.length()-1); } sitePrefix = siteRootFolder; getCms().getRequestContext().saveSiteRoot(); getCms().getRequestContext().setSiteRoot("/"); restoreSiteRoot = true; } // get the source name String source = getParamResource(); // calculate the target name target = CmsLinkManager.getAbsoluteUri(target, CmsResource.getParentFolder(getParamResource())); if (target.equals(source)) { throw new CmsVfsException(Messages.get().container(Messages.ERR_MOVE_ONTO_ITSELF_1, target)); } try { CmsResource res = getCms().readResource(target, CmsResourceFilter.ALL); if (res.isFolder()) { // target folder already exists, so we add the current folder name if (! target.endsWith("/")) { target += "/"; } target = target + CmsResource.getName(getParamResource()); if (target.endsWith("/")) { target = target.substring(0, target.length()-1); } } } catch (CmsVfsResourceNotFoundException e) { // target folder does not already exist, so target name is o.k. if (LOG.isInfoEnabled()) { LOG.info(e.getLocalizedMessage()); } } // set the target parameter value setParamTarget(target); // check if target already exists, if so, throw exception to show confirmation dialog CmsResource targetRes = null; try { targetRes = getCms().readResource(target, CmsResourceFilter.ALL); } catch (CmsException e) { // can usually be ignored if (LOG.isInfoEnabled()) { LOG.info(e.getLocalizedMessage()); } } if (targetRes != null) { if (DIALOG_CONFIRMED.equals(getParamAction())) { // delete existing target resource if confirmed by the user getCms().deleteResource(target, I_CmsConstants.C_DELETE_OPTION_PRESERVE_SIBLINGS); } else { // throw exception to indicate that the target exists throw new CmsException(Messages.get().container( Messages.ERR_MOVE_FAILED_TARGET_EXISTS_2, getParamResource(), getJsp().getRequestContext().removeSiteRoot(target))); } } // lock resource if autolock is enabled checkLock(sitePrefix + getParamResource()); // move the resource getCms().moveResource(sitePrefix + getParamResource(), target); } finally { if (restoreSiteRoot) { getCms().getRequestContext().restoreSiteRoot(); } } return true; }
|
8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/2fa0efcae8f9aa5971c7763269a3b033e9256d4b/CmsMove.java/buggy/src/org/opencms/workplace/commons/CmsMove.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
3073,
7607,
2988,
12,
6494,
31137,
13,
1216,
11228,
288,
3639,
368,
603,
3009,
3635,
1674,
2562,
315,
1802,
448,
2529,
6,
5518,
16,
486,
364,
4143,
585,
3635,
1674,
3639,
309,
261,
291,
3899,
597,
401,
3690,
18683,
67,
19046,
18,
14963,
12,
588,
786,
1803,
1435,
3719,
288,
5411,
368,
327,
629,
16,
333,
903,
3080,
326,
315,
1802,
448,
2529,
6,
5518,
5411,
327,
629,
31,
3639,
289,
3639,
368,
336,
326,
1018,
508,
3639,
514,
1018,
273,
9027,
2326,
5621,
3639,
309,
261,
3299,
422,
446,
13,
288,
5411,
1018,
273,
1408,
31,
3639,
289,
7734,
1250,
5217,
21889,
273,
629,
31,
3639,
775,
288,
5411,
368,
866,
309,
279,
2834,
1365,
1703,
3096,
358,
326,
1018,
508,
5411,
514,
2834,
2244,
273,
1408,
31,
5411,
309,
261,
4747,
4956,
1318,
18,
588,
21889,
12,
3299,
13,
480,
446,
13,
288,
1171,
514,
25512,
3899,
273,
14413,
7675,
588,
21426,
7675,
588,
21889,
5621,
7734,
309,
261,
4256,
2375,
3899,
18,
5839,
1190,
2932,
4898,
3719,
288,
10792,
25512,
3899,
273,
25512,
3899,
18,
28023,
12,
20,
16,
25512,
3899,
18,
2469,
1435,
17,
21,
1769,
7734,
289,
5375,
2834,
2244,
273,
25512,
3899,
31,
7734,
14413,
7675,
588,
21426,
7675,
5688,
21889,
5621,
7734,
14413,
7675,
588,
21426,
7675,
542,
21889,
2932,
4898,
1769,
7734,
5217,
21889,
273,
638,
31,
5411,
289,
5411,
368,
336,
326,
1084,
508,
2398,
514,
1084,
273,
9027,
1420,
5621,
13491,
368,
4604,
326,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
3073,
7607,
2988,
12,
6494,
31137,
13,
1216,
11228,
288,
3639,
368,
603,
3009,
3635,
1674,
2562,
315,
1802,
448,
2529,
6,
5518,
16,
486,
364,
4143,
585,
3635,
1674,
3639,
309,
261,
291,
3899,
597,
401,
3690,
18683,
67,
19046,
18,
14963,
12,
588,
786,
1803,
1435,
3719,
288,
5411,
368,
327,
629,
16,
333,
903,
3080,
326,
315,
1802,
448,
2529,
6,
5518,
5411,
327,
629,
31,
3639,
289,
3639,
368,
336,
326,
1018,
508,
3639,
514,
1018,
273,
9027,
2326,
5621,
3639,
309,
261,
3299,
422,
446,
13,
288,
5411,
1018,
273,
1408,
31,
3639,
289,
7734,
1250,
5217,
21889,
273,
629,
31,
3639,
775,
288,
5411,
368,
866,
309,
279,
2834,
1365,
2
] |
||
public SVNDirectory addDirectory(String path, File file, boolean recursive, boolean lock) throws SVNException { if (myDirectories != null) { SVNDirectory dir = new SVNDirectory(this, path, file); if (myDirectories.put(path, dir) == null && lock && !dir.isLocked()) { dir.lock(); } if (recursive) { File[] dirs = file.listFiles(); for (int i = 0; i < dirs.length; i++) { File childDir = dirs[i]; if (".svn".equals(childDir)) { continue; } SVNFileType fType = SVNFileType.getType(childDir); if (fType == SVNFileType.DIRECTORY && SVNWCAccess.isVersionedDirectory(childDir)) { String childPath = SVNPathUtil.append(path, childDir .getName()); addDirectory(childPath, childDir, recursive, lock); } } } return dir; } return null;
|
public SVNDirectory addDirectory(String path, File file) throws SVNException { return addDirectory(path, file, false, false);
|
public SVNDirectory addDirectory(String path, File file, boolean recursive, boolean lock) throws SVNException { if (myDirectories != null) { SVNDirectory dir = new SVNDirectory(this, path, file); if (myDirectories.put(path, dir) == null && lock && !dir.isLocked()) { dir.lock(); } if (recursive) { File[] dirs = file.listFiles(); for (int i = 0; i < dirs.length; i++) { File childDir = dirs[i]; if (".svn".equals(childDir)) { continue; } SVNFileType fType = SVNFileType.getType(childDir); if (fType == SVNFileType.DIRECTORY && SVNWCAccess.isVersionedDirectory(childDir)) { // recurse String childPath = SVNPathUtil.append(path, childDir .getName()); addDirectory(childPath, childDir, recursive, lock); } } } return dir; } return null; }
|
2776 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2776/28381179e464d7990498164d52693487f9dddb79/SVNWCAccess.java/buggy/javasvn/src/org/tmatesoft/svn/core/internal/wc/SVNWCAccess.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
29537,
50,
2853,
527,
2853,
12,
780,
589,
16,
1387,
585,
16,
1250,
5904,
16,
5411,
1250,
2176,
13,
1216,
29537,
50,
503,
288,
3639,
309,
261,
4811,
13071,
480,
446,
13,
288,
5411,
29537,
50,
2853,
1577,
273,
394,
29537,
50,
2853,
12,
2211,
16,
589,
16,
585,
1769,
5411,
309,
261,
4811,
13071,
18,
458,
12,
803,
16,
1577,
13,
422,
446,
597,
2176,
597,
401,
1214,
18,
291,
8966,
10756,
288,
7734,
1577,
18,
739,
5621,
5411,
289,
5411,
309,
261,
10543,
13,
288,
7734,
1387,
8526,
7717,
273,
585,
18,
1098,
2697,
5621,
7734,
364,
261,
474,
277,
273,
374,
31,
277,
411,
7717,
18,
2469,
31,
277,
27245,
288,
10792,
1387,
1151,
1621,
273,
7717,
63,
77,
15533,
10792,
309,
7566,
18,
31505,
9654,
14963,
12,
3624,
1621,
3719,
288,
13491,
1324,
31,
10792,
289,
10792,
29537,
50,
28941,
284,
559,
273,
29537,
50,
28941,
18,
588,
559,
12,
3624,
1621,
1769,
10792,
309,
261,
74,
559,
422,
29537,
50,
28941,
18,
17229,
18701,
597,
29537,
50,
59,
39,
1862,
18,
291,
23676,
2853,
12,
3624,
1621,
3719,
288,
13491,
368,
11502,
13491,
514,
1151,
743,
273,
29537,
50,
743,
1304,
18,
6923,
12,
803,
16,
1151,
1621,
27573,
263,
17994,
10663,
13491,
527,
2853,
12,
3624,
743,
16,
1151,
1621,
16,
5904,
16,
2176,
1769,
10792,
289,
7734,
289,
5411,
289,
5411,
327,
1577,
31,
3639,
289,
3639,
327,
446,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
29537,
50,
2853,
527,
2853,
12,
780,
589,
16,
1387,
585,
16,
1250,
5904,
16,
5411,
1250,
2176,
13,
1216,
29537,
50,
503,
288,
3639,
309,
261,
4811,
13071,
480,
446,
13,
288,
5411,
29537,
50,
2853,
1577,
273,
394,
29537,
50,
2853,
12,
2211,
16,
589,
16,
585,
1769,
5411,
309,
261,
4811,
13071,
18,
458,
12,
803,
16,
1577,
13,
422,
446,
597,
2176,
597,
401,
1214,
18,
291,
8966,
10756,
288,
7734,
1577,
18,
739,
5621,
5411,
289,
5411,
309,
261,
10543,
13,
288,
7734,
1387,
8526,
7717,
273,
585,
18,
1098,
2697,
5621,
7734,
364,
261,
474,
277,
273,
374,
31,
277,
411,
7717,
18,
2469,
31,
277,
27245,
288,
10792,
1387,
1151,
2
] |
dos.writeUTF(docName);
|
if(!keyType.equals("CHK")) dos.writeUTF(docName);
|
private void writeFullBinaryKey(DataOutputStream dos) throws IOException { if(keyType.equals("CHK")) { dos.writeByte(CHK); } else if(keyType.equals("SSK")) { dos.writeByte(SSK); } else throw new MalformedURLException("Cannot write key of type "+keyType+" - do not know how"); if(routingKey.length != 32) throw new MalformedURLException("Routing key must be of length 32"); if(cryptoKey.length != 32) throw new MalformedURLException("Crypto key must be of length 32"); if(keyType.equals("CHK") && extra.length != ClientCHK.EXTRA_LENGTH) throw new MalformedURLException("Wrong number of extra bytes for CHK"); if(keyType.equals("SSK")) throw new UnsupportedOperationException("SSK support not yet implemented"); dos.write(extra); dos.writeUTF(docName); if(metaStr != null) { dos.writeInt(metaStr.length); for(int i=0;i<metaStr.length;i++) dos.writeUTF(metaStr[i]); } else dos.writeInt(0); }
|
48807 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48807/5f6cd14357e2fd98f1b8e460aa78526429387ea0/FreenetURI.java/buggy/src/freenet/keys/FreenetURI.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1045,
5080,
5905,
653,
12,
751,
4632,
16153,
13,
1216,
1860,
288,
202,
202,
430,
12,
856,
559,
18,
14963,
2932,
1792,
47,
6,
3719,
288,
1082,
202,
19219,
18,
2626,
3216,
12,
1792,
47,
1769,
202,
202,
97,
469,
309,
12,
856,
559,
18,
14963,
2932,
1260,
47,
6,
3719,
288,
1082,
202,
19219,
18,
2626,
3216,
12,
1260,
47,
1769,
202,
202,
97,
469,
1082,
202,
12849,
394,
20710,
2932,
4515,
1045,
498,
434,
618,
13773,
856,
559,
9078,
300,
741,
486,
5055,
3661,
8863,
202,
202,
430,
12,
16529,
653,
18,
2469,
480,
3847,
13,
1082,
202,
12849,
394,
20710,
2932,
13966,
498,
1297,
506,
434,
769,
3847,
8863,
202,
202,
430,
12,
18489,
653,
18,
2469,
480,
3847,
13,
1082,
202,
12849,
394,
20710,
2932,
18048,
498,
1297,
506,
434,
769,
3847,
8863,
202,
202,
430,
12,
856,
559,
18,
14963,
2932,
1792,
47,
7923,
597,
2870,
18,
2469,
480,
2445,
1792,
47,
18,
22639,
67,
7096,
13,
1082,
202,
12849,
394,
20710,
2932,
13634,
1300,
434,
2870,
1731,
364,
6469,
47,
8863,
202,
202,
430,
12,
856,
559,
18,
14963,
2932,
1260,
47,
6,
3719,
1082,
202,
12849,
394,
13172,
2932,
1260,
47,
2865,
486,
4671,
8249,
8863,
202,
202,
19219,
18,
2626,
12,
7763,
1769,
202,
202,
19219,
18,
2626,
5159,
12,
2434,
461,
1769,
202,
202,
430,
12,
3901,
1585,
480,
446,
13,
288,
1082,
202,
19219,
18,
2626,
1702,
12,
3901,
1585,
18,
2469,
1769,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1045,
5080,
5905,
653,
12,
751,
4632,
16153,
13,
1216,
1860,
288,
202,
202,
430,
12,
856,
559,
18,
14963,
2932,
1792,
47,
6,
3719,
288,
1082,
202,
19219,
18,
2626,
3216,
12,
1792,
47,
1769,
202,
202,
97,
469,
309,
12,
856,
559,
18,
14963,
2932,
1260,
47,
6,
3719,
288,
1082,
202,
19219,
18,
2626,
3216,
12,
1260,
47,
1769,
202,
202,
97,
469,
1082,
202,
12849,
394,
20710,
2932,
4515,
1045,
498,
434,
618,
13773,
856,
559,
9078,
300,
741,
486,
5055,
3661,
8863,
202,
202,
430,
12,
16529,
653,
18,
2469,
480,
3847,
13,
1082,
202,
12849,
394,
20710,
2932,
13966,
498,
1297,
506,
434,
769,
3847,
8863,
202,
202,
430,
2
] |
this.filename = new String(jEdit.getSettingsDirectory() + File.separator + "qn.txt"); jEdit.setProperty( QuickNotepadPlugin.OPTION_PREFIX + "filepath", this.filename);
|
this.filename = jEdit.getProperty( QuickNotepadPlugin.OPTION_PREFIX + "filepath"); if(this.filename == null || this.filename.length() == 0) { this.filename = new String(jEdit.getSettingsDirectory() + File.separator + "qn.txt"); jEdit.setProperty( QuickNotepadPlugin.OPTION_PREFIX + "filepath", this.filename); } this.defaultFilename = this.filename;
|
public QuickNotepad(View view, String position) { super(new BorderLayout()); this.view = view; this.floating = position.equals(DockableWindowManager.FLOATING); this.filename = jEdit.getProperty( QuickNotepadPlugin.OPTION_PREFIX + "filepath"); if(this.filename == null || this.filename.length() == 0) { this.filename = new String(jEdit.getSettingsDirectory() + File.separator + "qn.txt"); jEdit.setProperty( QuickNotepadPlugin.OPTION_PREFIX + "filepath", this.filename); } this.defaultFilename = new String(this.filename); this.toolPanel = new QuickNotepadToolPanel(this); add(BorderLayout.NORTH, this.toolPanel); if(floating) this.setPreferredSize(new Dimension(500, 250)); textArea = new QuickNotepadTextArea(); textArea.setFont(QuickNotepadOptionPane.makeFont()); textArea.addKeyListener(new KeyHandler()); textArea.addAncestorListener(new AncestorHandler()); JScrollPane pane = new JScrollPane(textArea); add(BorderLayout.CENTER, pane); readFile(); }
|
8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/ddcee29fe61f20b094813d0b0cba5541edc2b6db/QuickNotepad.java/buggy/jars/QuickNotepad/QuickNotepad.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19884,
1248,
881,
361,
12,
1767,
1476,
16,
514,
1754,
13,
202,
95,
202,
202,
9565,
12,
2704,
30814,
10663,
202,
202,
2211,
18,
1945,
273,
1476,
31,
202,
202,
2211,
18,
5659,
310,
225,
273,
1754,
18,
14963,
12,
40,
975,
429,
3829,
1318,
18,
15640,
1360,
1769,
202,
202,
2211,
18,
3459,
273,
525,
4666,
18,
588,
1396,
12,
1082,
202,
13663,
1248,
881,
361,
3773,
18,
7425,
67,
6307,
397,
315,
10561,
8863,
202,
202,
430,
12,
2211,
18,
3459,
422,
446,
747,
333,
18,
3459,
18,
2469,
1435,
422,
374,
13,
202,
202,
95,
1082,
202,
2211,
18,
3459,
273,
394,
514,
12,
78,
4666,
18,
588,
2628,
2853,
1435,
9506,
202,
15,
1387,
18,
11287,
397,
315,
15785,
18,
5830,
8863,
1082,
202,
78,
4666,
18,
542,
1396,
12,
9506,
202,
13663,
1248,
881,
361,
3773,
18,
7425,
67,
6307,
397,
315,
10561,
3113,
9506,
202,
2211,
18,
3459,
1769,
202,
202,
97,
202,
202,
2211,
18,
1886,
5359,
273,
394,
514,
12,
2211,
18,
3459,
1769,
202,
202,
2211,
18,
6738,
5537,
273,
394,
19884,
1248,
881,
361,
6364,
5537,
12,
2211,
1769,
202,
202,
1289,
12,
8107,
3744,
18,
50,
28212,
16,
333,
18,
6738,
5537,
1769,
202,
202,
430,
12,
5659,
310,
13,
1082,
202,
2211,
18,
542,
16028,
1225,
12,
2704,
13037,
12,
12483,
16,
16927,
10019,
202,
202,
955,
5484,
273,
394,
19884,
1248,
881,
361,
1528,
5484,
5621,
202,
202,
955,
5484,
18,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19884,
1248,
881,
361,
12,
1767,
1476,
16,
514,
1754,
13,
202,
95,
202,
202,
9565,
12,
2704,
30814,
10663,
202,
202,
2211,
18,
1945,
273,
1476,
31,
202,
202,
2211,
18,
5659,
310,
225,
273,
1754,
18,
14963,
12,
40,
975,
429,
3829,
1318,
18,
15640,
1360,
1769,
202,
202,
2211,
18,
3459,
273,
525,
4666,
18,
588,
1396,
12,
1082,
202,
13663,
1248,
881,
361,
3773,
18,
7425,
67,
6307,
397,
315,
10561,
8863,
202,
202,
430,
12,
2211,
18,
3459,
422,
446,
747,
333,
18,
3459,
18,
2469,
1435,
422,
374,
13,
202,
202,
95,
1082,
202,
2211,
18,
3459,
273,
394,
514,
12,
78,
4666,
18,
588,
2628,
2853,
1435,
9506,
202,
2
] |
void pushFrame(StackFrame frame) {
|
private void pushFrame(StackFrame frame) {
|
void pushFrame(StackFrame frame) { frameStack.push(frame); }
|
11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/2d4fc75b74d717c754829dde488ff0a7456682cc/Dim.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Dim.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
918,
1817,
3219,
12,
2624,
3219,
2623,
13,
288,
5411,
2623,
2624,
18,
6206,
12,
3789,
1769,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
540,
3238,
918,
1817,
3219,
12,
2624,
3219,
2623,
13,
288,
5411,
2623,
2624,
18,
6206,
12,
3789,
1769,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
activitiesViewer.setInput(getCategoryActivities(categoryId));
|
if (!categoryId.equals(lastCategory)) { lastCategory = categoryId; activitiesViewer.setInput( getCategoryActivities(categoryId)); }
|
public Control createControl(Composite parent) { Composite mainComposite = new Composite(parent, SWT.NONE); mainComposite.setLayout(new GridLayout(2, true)); Label label = new Label(mainComposite, SWT.NONE); label.setText(ActivityMessages.getString("ActivityEnabler.categories")); //$NON-NLS-1$ label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); label = new Label(mainComposite, SWT.NONE); label.setText(ActivityMessages.getString("ActivityEnabler.activities")); //$NON-NLS-1$ label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); { categoryViewer = new CheckboxTableViewer(mainComposite); categoryViewer.getControl().setLayoutData( new GridData(GridData.FILL_BOTH)); categoryViewer.setContentProvider(new CategoryContentProvider()); categoryViewer.setLabelProvider(new CategoryLabelProvider(activityManager)); categoryViewer.setSorter(new ViewerSorter()); categoryViewer.setInput(activityManager); categoryViewer.setSelection(new StructuredSelection()); setCategoryStates(); } { activitiesViewer = new ListViewer(mainComposite); activitiesViewer.getControl().setLayoutData( new GridData(GridData.FILL_BOTH)); activitiesViewer.setContentProvider(new ActivityContentProvider()); activitiesViewer.setLabelProvider( new ActivityLabelProvider(activityManager)); activitiesViewer.setSorter(new ViewerSorter()); activitiesViewer.setInput(Collections.EMPTY_SET); } categoryViewer .addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection selection = (IStructuredSelection) event.getSelection(); if (!selection.isEmpty()) { String categoryId = (String) selection.getFirstElement(); activitiesViewer.setInput(getCategoryActivities(categoryId)); } } }); categoryViewer.addCheckStateListener(new ICheckStateListener() { public void checkStateChanged(CheckStateChangedEvent event) { Object element = event.getElement(); if (event.getChecked()) { if (!uncheckedInSession.remove(element)) { checkedInSession.add(element); } } else { if (!checkedInSession.remove(element)) { uncheckedInSession.add(element); } } } }); return mainComposite; }
|
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/c21a4a206182a67a234197985ca2fcc10001305b/ActivityEnabler.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ui/ActivityEnabler.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8888,
752,
3367,
12,
9400,
982,
13,
288,
202,
202,
9400,
2774,
9400,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
9826,
1769,
202,
202,
5254,
9400,
18,
542,
3744,
12,
2704,
7145,
3744,
12,
22,
16,
638,
10019,
202,
202,
2224,
1433,
273,
394,
5287,
12,
5254,
9400,
16,
348,
8588,
18,
9826,
1769,
202,
202,
1925,
18,
542,
1528,
12,
6193,
5058,
18,
588,
780,
2932,
6193,
664,
27371,
18,
8995,
7923,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
1925,
18,
542,
3744,
751,
12,
2704,
7145,
751,
12,
6313,
751,
18,
29818,
67,
44,
20344,
10019,
202,
202,
1925,
273,
394,
5287,
12,
5254,
9400,
16,
348,
8588,
18,
9826,
1769,
202,
202,
1925,
18,
542,
1528,
12,
6193,
5058,
18,
588,
780,
2932,
6193,
664,
27371,
18,
24745,
7923,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
1925,
18,
542,
3744,
751,
12,
2704,
7145,
751,
12,
6313,
751,
18,
29818,
67,
44,
20344,
10019,
202,
202,
95,
1082,
202,
4743,
18415,
273,
394,
29213,
1388,
18415,
12,
5254,
9400,
1769,
1082,
202,
4743,
18415,
18,
588,
3367,
7675,
542,
3744,
751,
12,
9506,
202,
2704,
7145,
751,
12,
6313,
751,
18,
29818,
67,
38,
18307,
10019,
1082,
202,
4743,
18415,
18,
542,
1350,
2249,
12,
2704,
9856,
1350,
2249,
10663,
1082,
202,
4743,
18415,
18,
542,
2224,
2249,
12,
2704,
9856,
2224,
2249,
12,
9653,
1318,
10019,
1082,
202,
4743,
18415,
18,
542,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8888,
752,
3367,
12,
9400,
982,
13,
288,
202,
202,
9400,
2774,
9400,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
9826,
1769,
202,
202,
5254,
9400,
18,
542,
3744,
12,
2704,
7145,
3744,
12,
22,
16,
638,
10019,
202,
202,
2224,
1433,
273,
394,
5287,
12,
5254,
9400,
16,
348,
8588,
18,
9826,
1769,
202,
202,
1925,
18,
542,
1528,
12,
6193,
5058,
18,
588,
780,
2932,
6193,
664,
27371,
18,
8995,
7923,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
1925,
18,
542,
3744,
751,
12,
2704,
7145,
751,
12,
6313,
751,
18,
29818,
67,
44,
20344,
10019,
202,
202,
1925,
273,
394,
5287,
12,
5254,
9400,
16,
348,
8588,
18,
2
] |
MylarPlugin.getContextManager().contextActivated(task.getHandleIdentifier(), task.getContextPath());
|
MylarPlugin.getContextManager().contextActivated(task.getHandleIdentifier());
|
public void tasksActivated(List<ITask> tasks) { for (ITask task : tasks) { MylarPlugin.getContextManager().contextActivated(task.getHandleIdentifier(), task.getContextPath()); } }
|
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/7d100b41d7eaa401e4972ad2611ee9b6f3c9ccdf/MylarTaskListPlugin.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/MylarTaskListPlugin.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
4592,
28724,
12,
682,
32,
1285,
835,
34,
4592,
13,
288,
1082,
202,
1884,
261,
1285,
835,
1562,
294,
4592,
13,
288,
9506,
202,
12062,
7901,
3773,
18,
29120,
1318,
7675,
2472,
28724,
12,
4146,
18,
588,
3259,
3004,
9334,
1562,
18,
29120,
743,
10663,
1082,
202,
97,
202,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
4592,
28724,
12,
682,
32,
1285,
835,
34,
4592,
13,
288,
1082,
202,
1884,
261,
1285,
835,
1562,
294,
4592,
13,
288,
9506,
202,
12062,
7901,
3773,
18,
29120,
1318,
7675,
2472,
28724,
12,
4146,
18,
588,
3259,
3004,
9334,
1562,
18,
29120,
743,
10663,
1082,
202,
97,
202,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
if (!"next".equals(methodName)) {
|
if(!"next".equals(methodName)){
|
public void visitMethodCallExpression(PsiMethodCallExpression callExpression) { super.visitMethodCallExpression(callExpression); final PsiReferenceExpression methodExpression = callExpression.getMethodExpression(); if (methodExpression == null) { return; } final String methodName = methodExpression.getReferenceName(); if (!"next".equals(methodName)) { return; } final PsiExpression qualifier = methodExpression.getQualifierExpression(); if (qualifier == null) { return; } final String qualifierText = qualifier.getText(); if (!iteratorName.equals(qualifierText)) { return; } numCallsToIteratorNext++; }
|
56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/dba8b183fc1b08e7ad664812bfc0c64d1e4abd3c/ForCanBeForeachInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/verbose/ForCanBeForeachInspection.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
12592,
2300,
12,
52,
7722,
12592,
2300,
745,
2300,
13,
288,
5411,
2240,
18,
11658,
12592,
2300,
12,
1991,
2300,
1769,
5411,
727,
453,
7722,
2404,
2300,
707,
2300,
273,
10792,
745,
2300,
18,
588,
1305,
2300,
5621,
5411,
309,
261,
2039,
2300,
422,
446,
13,
288,
7734,
327,
31,
5411,
289,
5411,
727,
514,
4918,
273,
707,
2300,
18,
588,
2404,
461,
5621,
5411,
309,
12,
4442,
4285,
9654,
14963,
12,
2039,
461,
3719,
95,
7734,
327,
31,
5411,
289,
5411,
727,
453,
7722,
2300,
12327,
273,
707,
2300,
18,
588,
16185,
2300,
5621,
5411,
309,
261,
28157,
422,
446,
13,
288,
7734,
327,
31,
5411,
289,
5411,
727,
514,
12327,
1528,
273,
12327,
18,
588,
1528,
5621,
5411,
309,
16051,
9838,
461,
18,
14963,
12,
28157,
1528,
3719,
288,
7734,
327,
31,
5411,
289,
5411,
818,
10125,
774,
3198,
2134,
9904,
31,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
540,
1071,
918,
3757,
12592,
2300,
12,
52,
7722,
12592,
2300,
745,
2300,
13,
288,
5411,
2240,
18,
11658,
12592,
2300,
12,
1991,
2300,
1769,
5411,
727,
453,
7722,
2404,
2300,
707,
2300,
273,
10792,
745,
2300,
18,
588,
1305,
2300,
5621,
5411,
309,
261,
2039,
2300,
422,
446,
13,
288,
7734,
327,
31,
5411,
289,
5411,
727,
514,
4918,
273,
707,
2300,
18,
588,
2404,
461,
5621,
5411,
309,
12,
4442,
4285,
9654,
14963,
12,
2039,
461,
3719,
95,
7734,
327,
31,
5411,
289,
5411,
727,
453,
7722,
2300,
12327,
273,
707,
2300,
18,
588,
16185,
2300,
5621,
5411,
309,
261,
28157,
422,
446,
13,
288,
7734,
327,
31,
5411,
289,
5411,
727,
514,
12327,
1528,
273,
12327,
2
] |
public final int getSampleModelTranslateY() {
|
public final int getSampleModelTranslateY() {
|
public final int getSampleModelTranslateY() { return sampleModelTranslateY; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/2d7debfa0b9e176eb89b1dd2089f53cb5079cc16/Raster.java/buggy/core/src/classpath/java/java/awt/image/Raster.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
509,
26078,
1488,
12818,
61,
1435,
288,
202,
202,
2463,
3296,
1488,
12818,
61,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
727,
509,
26078,
1488,
12818,
61,
1435,
288,
202,
202,
2463,
3296,
1488,
12818,
61,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
String last = ""; int repetitions = 1; int counter = 0; int line = 1; String current; while (t.hasMoreTokens()) { current = t.nextToken(); counter++; if (last.equals(current) && repetitions < MAX_REP) { repetitions++; } else { addToThreeBiggest(threeBiggest, line, repetitions); repetitions = 1; last = current; line = counter; } } addToThreeBiggest(threeBiggest, line, repetitions);
|
private static Repetition[] threeBiggestRepetitions(String str) { StringTokenizer t = new StringTokenizer(str, "\n"); Repetition[] threeBiggest = new Repetition[3]; //force the repetition count to be > 1 for (int i = 0; i < 3; i++) threeBiggest[i] = new Repetition(-1, 1); String last = ""; //the current number of repetitions for the sequence int repetitions = 1; //the total lines seen so far int counter = 0; //the starting line of the sequence we are currently at int line = 1; String current; while (t.hasMoreTokens()) { //get the next route instruction current = t.nextToken(); counter++; if (last.equals(current) && repetitions < MAX_REP) { repetitions++; } else { //see if the repetition count is larger than any of the previous addToThreeBiggest(threeBiggest, line, repetitions); repetitions = 1; last = current; line = counter; } } //see if the repetition count is larger for the last sequence addToThreeBiggest(threeBiggest, line, repetitions); return threeBiggest; }
|
47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/31aff989277324400ed1080dc1f4597a89d20d2b/SwitchCode.java/clean/streams/src/at/dms/kjc/spacedynamic/SwitchCode.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
868,
6951,
608,
8526,
8925,
9901,
17592,
426,
6951,
5029,
12,
780,
609,
13,
288,
202,
780,
10524,
268,
273,
394,
16370,
12,
701,
16,
1548,
82,
8863,
202,
426,
6951,
608,
8526,
8925,
9901,
17592,
273,
394,
868,
6951,
608,
63,
23,
15533,
202,
759,
5734,
326,
31239,
1056,
358,
506,
405,
404,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
890,
31,
277,
27245,
3196,
565,
8925,
9901,
17592,
63,
77,
65,
273,
394,
868,
6951,
608,
19236,
21,
16,
404,
1769,
202,
202,
780,
1142,
273,
1408,
31,
202,
759,
5787,
783,
1300,
434,
22265,
5029,
364,
326,
3102,
202,
474,
22265,
5029,
273,
404,
31,
202,
759,
5787,
2078,
2362,
5881,
1427,
10247,
202,
474,
3895,
273,
374,
31,
202,
759,
5787,
5023,
980,
434,
326,
3102,
732,
854,
4551,
622,
202,
474,
980,
273,
404,
31,
202,
780,
783,
31,
202,
202,
17523,
261,
88,
18,
5332,
7417,
5157,
10756,
288,
202,
565,
368,
588,
326,
1024,
1946,
7592,
202,
565,
783,
273,
268,
18,
4285,
1345,
5621,
202,
565,
3895,
9904,
31,
202,
565,
309,
261,
2722,
18,
14963,
12,
2972,
13,
597,
225,
22265,
5029,
411,
4552,
67,
28879,
13,
288,
202,
202,
266,
6951,
5029,
9904,
31,
202,
565,
289,
202,
565,
469,
288,
202,
202,
759,
5946,
309,
326,
31239,
1056,
353,
10974,
2353,
1281,
434,
326,
2416,
7734,
9604,
28019,
9901,
17592,
12,
451,
992,
9901,
17592,
16,
980,
16,
22265,
5029,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
868,
6951,
608,
8526,
8925,
9901,
17592,
426,
6951,
5029,
12,
780,
609,
13,
288,
202,
780,
10524,
268,
273,
394,
16370,
12,
701,
16,
1548,
82,
8863,
202,
426,
6951,
608,
8526,
8925,
9901,
17592,
273,
394,
868,
6951,
608,
63,
23,
15533,
202,
759,
5734,
326,
31239,
1056,
358,
506,
405,
404,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
890,
31,
277,
27245,
3196,
565,
8925,
9901,
17592,
63,
77,
65,
273,
394,
868,
6951,
608,
19236,
21,
16,
404,
1769,
202,
202,
780,
1142,
273,
1408,
31,
202,
759,
5787,
783,
1300,
434,
22265,
5029,
364,
326,
3102,
202,
474,
22265,
5029,
273,
404,
31,
202,
759,
5787,
2078,
2362,
2
] |
|
ProjectManager.getManager().setNeedsSave(true);
|
ArgoEventPump.fireEvent(new ArgoProjectSaveEvent(ArgoEventTypes.NEEDS_PROJECTSAVE_EVENT, this));
|
public void itemStateChanged(ItemEvent e) { if (!refreshTransaction) { Object src = e.getSource(); // If it was the check box, reset it, otherwise invoke the parent. if (src == epCheckBox) { FigUseCase target = (FigUseCase) getTarget(); target.setExtensionPointVisible(epCheckBox.isSelected()); ProjectManager.getManager().setNeedsSave(true); } else { super.itemStateChanged(e); } } }
|
7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/b16e19ea47f1cd79c47708044f910152d9a3f812/StylePanelFigUseCase.java/clean/src_new/org/argouml/uml/diagram/use_case/ui/StylePanelFigUseCase.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
761,
1119,
5033,
12,
1180,
1133,
425,
13,
288,
3639,
309,
16051,
9144,
3342,
13,
288,
5411,
1033,
1705,
273,
425,
18,
588,
1830,
5621,
5411,
368,
971,
518,
1703,
326,
866,
3919,
16,
2715,
518,
16,
3541,
4356,
326,
982,
18,
5411,
309,
261,
4816,
422,
5529,
19174,
13,
288,
7734,
478,
360,
3727,
2449,
1018,
273,
261,
42,
360,
3727,
2449,
13,
8571,
5621,
7734,
1018,
18,
542,
3625,
2148,
6207,
12,
881,
19174,
18,
291,
7416,
10663,
9079,
1201,
3240,
1133,
52,
2801,
18,
12179,
1133,
12,
2704,
1201,
3240,
4109,
4755,
1133,
12,
686,
3240,
1133,
2016,
18,
5407,
2056,
55,
67,
17147,
25242,
67,
10454,
16,
333,
10019,
5411,
289,
469,
288,
7734,
2240,
18,
1726,
1119,
5033,
12,
73,
1769,
5411,
289,
3639,
289,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
761,
1119,
5033,
12,
1180,
1133,
425,
13,
288,
3639,
309,
16051,
9144,
3342,
13,
288,
5411,
1033,
1705,
273,
425,
18,
588,
1830,
5621,
5411,
368,
971,
518,
1703,
326,
866,
3919,
16,
2715,
518,
16,
3541,
4356,
326,
982,
18,
5411,
309,
261,
4816,
422,
5529,
19174,
13,
288,
7734,
478,
360,
3727,
2449,
1018,
273,
261,
42,
360,
3727,
2449,
13,
8571,
5621,
7734,
1018,
18,
542,
3625,
2148,
6207,
12,
881,
19174,
18,
291,
7416,
10663,
9079,
1201,
3240,
1133,
52,
2801,
18,
12179,
1133,
12,
2704,
1201,
3240,
4109,
4755,
1133,
12,
686,
3240,
1133,
2016,
18,
5407,
2056,
55,
67,
17147,
25242,
67,
10454,
16,
333,
10019,
5411,
289,
469,
2
] |
public Tag(long num) { this(Class.CONTEXT_SPECIFIC, num); }
|
private Tag() { }
|
public Tag(long num) { this(Class.CONTEXT_SPECIFIC, num); }
|
54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/3634d4d94b208431471fe506f413f97d460c7602/Tag.java/buggy/security/jss/org/mozilla/jss/asn1/Tag.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4034,
12,
5748,
818,
13,
288,
3639,
333,
12,
797,
18,
13181,
67,
13847,
22183,
16,
818,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
4034,
12,
5748,
818,
13,
288,
3639,
333,
12,
797,
18,
13181,
67,
13847,
22183,
16,
818,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
NatSettings getNatSettings();
|
public NatSettingsWrapper getNatSettings();
|
NatSettings getNatSettings();
|
49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/f195f519648c05c4a5317cfd8293b1d4f20c13eb/Nat.java/buggy/tran/nat/main/com/metavize/tran/nat/Nat.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
423,
270,
2628,
11069,
270,
2628,
5621,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
423,
270,
2628,
11069,
270,
2628,
5621,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
public BugzillaReport getBug() {
|
public RepositoryReport getBug() {
|
public BugzillaReport getBug() { return bug; }
|
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/9997dcc57f87e43fc7474dc75044166879a7512a/NewBugEditor.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugEditor.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
16907,
15990,
4820,
2882,
637,
1435,
288,
202,
202,
2463,
7934,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
16907,
15990,
4820,
2882,
637,
1435,
288,
202,
202,
2463,
7934,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
this.hfield = hfield;
|
this.label = label;
|
public PreallocAP(HField hfield, AllocationProperties formerAP) { super(formerAP); this.hfield = hfield; }
|
2866 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2866/af3c6411149d3b2164e26abe8ca2c5f6890b1963/PreallocOpt.java/buggy/Analysis/MemOpt/PreallocOpt.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2962,
9853,
2203,
12,
44,
974,
366,
1518,
16,
24242,
2297,
27313,
2203,
13,
288,
202,
565,
2240,
12,
7208,
2203,
1769,
202,
565,
333,
18,
76,
1518,
273,
366,
1518,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2962,
9853,
2203,
12,
44,
974,
366,
1518,
16,
24242,
2297,
27313,
2203,
13,
288,
202,
565,
2240,
12,
7208,
2203,
1769,
202,
565,
333,
18,
76,
1518,
273,
366,
1518,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
String condition;
|
StringBuffer condition = new StringBuffer(64); condition.append(parentId);
|
private String makeChildMemberSql_PCRoot(RolapMember member, Connection jdbcConnection) { SqlQuery sqlQuery = newQuery( jdbcConnection, "while generating query to retrieve children of parent/child hierarchy member " + member); Util.assertTrue(member.isAll(), "In the current implementation, parent/child hierarchies must have only one level (plus the 'All' level)."); RolapLevel level = (RolapLevel) member.getLevel().getChildLevel(); Util.assertTrue(!level.isAll(), "all level cannot be parent-child"); Util.assertTrue(level.unique, "parent-child level '" + level + "' must be unique"); hierarchy.addToFrom(sqlQuery, level.parentExp, null); String parentId = level.parentExp.getExpression(sqlQuery); String condition; if (level.nullParentValue == null || level.nullParentValue.equalsIgnoreCase("NULL")) { condition = parentId + " IS NULL"; } else { // Quote the value if it doesn't seem to be a number. try { Util.discard(Double.parseDouble(level.nullParentValue)); condition = parentId + " = " + level.nullParentValue; } catch (NumberFormatException e) { condition = parentId + " = " + RolapUtil.singleQuoteForSql(level.nullParentValue); } } sqlQuery.addWhere(condition); hierarchy.addToFrom(sqlQuery, level.keyExp, null); String childId = level.keyExp.getExpression(sqlQuery); sqlQuery.addSelect(childId); sqlQuery.addGroupBy(childId); hierarchy.addToFrom(sqlQuery, level.ordinalExp, null); String orderBy = level.ordinalExp.getExpression(sqlQuery); sqlQuery.addOrderBy(orderBy); if (!orderBy.equals(childId)) { sqlQuery.addGroupBy(orderBy); } for (int j = 0; j < level.properties.length; j++) { RolapProperty property = level.properties[j]; final MondrianDef.Expression exp = property.exp; hierarchy.addToFrom(sqlQuery, exp, null); final String s = exp.getExpression(sqlQuery); sqlQuery.addSelect(s); sqlQuery.addGroupBy(s); } return sqlQuery.toString(); }
|
4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/0cc18052c959f8014f772086b193e28d7a6dd66a/SqlMemberSource.java/buggy/src/main/mondrian/rolap/SqlMemberSource.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
1221,
1763,
4419,
5101,
67,
3513,
2375,
12,
4984,
438,
4419,
3140,
16,
5411,
4050,
16579,
1952,
13,
288,
3639,
8855,
1138,
24451,
273,
22955,
12,
7734,
16579,
1952,
16,
315,
17523,
12516,
843,
358,
4614,
2325,
434,
982,
19,
3624,
9360,
3140,
315,
397,
3140,
1769,
3639,
3564,
18,
11231,
5510,
12,
5990,
18,
291,
1595,
9334,
315,
382,
326,
783,
4471,
16,
982,
19,
3624,
366,
5148,
606,
1297,
1240,
1338,
1245,
1801,
261,
10103,
326,
296,
1595,
11,
1801,
14944,
1769,
3639,
11714,
438,
2355,
1801,
273,
261,
4984,
438,
2355,
13,
3140,
18,
588,
2355,
7675,
588,
1763,
2355,
5621,
3639,
3564,
18,
11231,
5510,
12,
5,
2815,
18,
291,
1595,
9334,
315,
454,
1801,
2780,
506,
982,
17,
3624,
8863,
3639,
3564,
18,
11231,
5510,
12,
2815,
18,
6270,
16,
315,
2938,
17,
3624,
1801,
2119,
397,
1801,
397,
2491,
1297,
506,
3089,
8863,
3639,
9360,
18,
1289,
774,
1265,
12,
4669,
1138,
16,
1801,
18,
2938,
2966,
16,
446,
1769,
3639,
514,
11582,
273,
1801,
18,
2938,
2966,
18,
588,
2300,
12,
4669,
1138,
1769,
3639,
6674,
2269,
273,
394,
6674,
12,
1105,
1769,
2269,
18,
6923,
12,
2938,
548,
1769,
3639,
309,
261,
2815,
18,
2011,
3054,
620,
422,
446,
747,
7734,
1801,
18,
2011,
3054,
620,
18,
14963,
5556,
2932,
8560,
6,
3719,
288,
5411,
2269,
273,
11582,
397,
315,
4437,
3206,
14432,
3639,
289,
469,
288,
5411,
368,
21695,
326,
460,
309,
518,
3302,
1404,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
1221,
1763,
4419,
5101,
67,
3513,
2375,
12,
4984,
438,
4419,
3140,
16,
5411,
4050,
16579,
1952,
13,
288,
3639,
8855,
1138,
24451,
273,
22955,
12,
7734,
16579,
1952,
16,
315,
17523,
12516,
843,
358,
4614,
2325,
434,
982,
19,
3624,
9360,
3140,
315,
397,
3140,
1769,
3639,
3564,
18,
11231,
5510,
12,
5990,
18,
291,
1595,
9334,
315,
382,
326,
783,
4471,
16,
982,
19,
3624,
366,
5148,
606,
1297,
1240,
1338,
1245,
1801,
261,
10103,
326,
296,
1595,
11,
1801,
14944,
1769,
3639,
11714,
438,
2355,
1801,
273,
261,
4984,
438,
2355,
13,
3140,
18,
588,
2355,
7675,
588,
1763,
2355,
5621,
3639,
3564,
18,
11231,
5510,
12,
5,
2815,
18,
291,
1595,
9334,
2
] |
case IGame.PHASE_END :/*
|
case IGame.PHASE_END :
|
public void changePhase(int phase) { super.changePhase(phase); try { switch (phase) { case IGame.PHASE_LOUNGE : sendChat(Messages.getString("BotClient.Hi")); //$NON-NLS-1$ break; case IGame.PHASE_DEPLOYMENT : initialize(); break; case IGame.PHASE_MOVEMENT : if (game.getEntitiesOwnedBy(this.getLocalPlayer()) == 0) { sendChat(Messages.getString("BotClient.HowAbout")); //$NON-NLS-1$ this.die(); } if (!(game.getOptions().booleanOption("double_blind")) //$NON-NLS-1$ && game.getEntitiesOwnedBy(this.getLocalPlayer()) - game.getNoOfEntities() == 0) { this.die(); } initMovement(); break; case IGame.PHASE_FIRING : initFiring(); break; case IGame.PHASE_PHYSICAL : break; case IGame.PHASE_INITIATIVE : case IGame.PHASE_MOVEMENT_REPORT : case IGame.PHASE_FIRING_REPORT : case IGame.PHASE_END :/* case IGame.PHASE_OFFBOARD_REPORT : case IGame.PHASE_SET_ARTYAUTOHITHEXES: case IGame.PHASE_OFFBOARD: case IGame.PHASE_TARGETING:*/ sendDone(true); break; case IGame.PHASE_VICTORY : break; } } catch (Throwable t) { t.printStackTrace(); } }
|
3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/ccef5df4bc6a7f2f34b625c8b1f0272c94faf197/BotClient.java/buggy/megamek/src/megamek/client/bot/BotClient.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2549,
11406,
12,
474,
6855,
13,
288,
3639,
2240,
18,
3427,
11406,
12,
13961,
1769,
7734,
775,
288,
5411,
1620,
261,
13961,
13,
288,
5411,
648,
467,
12496,
18,
8939,
4429,
67,
1502,
2124,
7113,
294,
7734,
1366,
14163,
12,
5058,
18,
588,
780,
2932,
6522,
1227,
18,
25009,
7923,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
5411,
898,
31,
5411,
648,
467,
12496,
18,
8939,
4429,
67,
1639,
22971,
3212,
294,
7734,
4046,
5621,
5411,
898,
31,
5411,
648,
467,
12496,
18,
8939,
4429,
67,
16537,
3212,
294,
7734,
309,
261,
13957,
18,
588,
8108,
5460,
18696,
12,
2211,
18,
588,
2042,
12148,
10756,
422,
374,
13,
288,
10792,
1366,
14163,
12,
5058,
18,
588,
780,
2932,
6522,
1227,
18,
44,
543,
24813,
7923,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
10792,
333,
18,
72,
1385,
5621,
7734,
289,
5411,
309,
16051,
12,
13957,
18,
588,
1320,
7675,
6494,
1895,
2932,
9056,
67,
3083,
728,
6,
3719,
4329,
3993,
17,
5106,
17,
21,
8,
10792,
597,
7920,
18,
588,
8108,
5460,
18696,
12,
2211,
18,
588,
2042,
12148,
10756,
300,
7920,
18,
588,
2279,
951,
8108,
1435,
422,
374,
13,
288,
7734,
333,
18,
72,
1385,
5621,
5411,
289,
5411,
1208,
49,
26140,
5621,
5411,
898,
31,
5411,
648,
467,
12496,
18,
8939,
4429,
67,
1653,
54,
1360,
294,
7734,
1208,
42,
11256,
5621,
5411,
898,
31,
5411,
648,
467,
12496,
18,
8939,
4429,
67,
8939,
61,
2320,
7913,
294,
7734,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2549,
11406,
12,
474,
6855,
13,
288,
3639,
2240,
18,
3427,
11406,
12,
13961,
1769,
7734,
775,
288,
5411,
1620,
261,
13961,
13,
288,
5411,
648,
467,
12496,
18,
8939,
4429,
67,
1502,
2124,
7113,
294,
7734,
1366,
14163,
12,
5058,
18,
588,
780,
2932,
6522,
1227,
18,
25009,
7923,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
5411,
898,
31,
5411,
648,
467,
12496,
18,
8939,
4429,
67,
1639,
22971,
3212,
294,
7734,
4046,
5621,
5411,
898,
31,
5411,
648,
467,
12496,
18,
8939,
4429,
67,
16537,
3212,
294,
7734,
309,
261,
13957,
18,
588,
8108,
5460,
18696,
12,
2211,
18,
588,
2042,
12148,
10756,
422,
374,
13,
288,
10792,
1366,
14163,
12,
5058,
18,
2
] |
public String toString() { StringBuffer sb = new StringBuffer(); if (year > 0) { sb.append(year); } if (month > 0) { sb.append('-').append(fleshOut(month)); } if (day > 0) { sb.append('-').append(fleshOut(day)); } if (hours > 0) { sb.append("T") .append(fleshOut(hours)) .append(':') .append(fleshOut(minutes)) .append(':') .append(fleshOut(seconds)); } return (sb.toString()); }
|
49711 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49711/02572dde50bc4c0b06971a882bd6281204aefcbe/DCDate.java/buggy/dspace/src/org/dspace/content/DCDate.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
565,
288,
3639,
6674,
2393,
273,
394,
6674,
5621,
3639,
309,
261,
6874,
405,
374,
13,
3639,
288,
5411,
2393,
18,
6923,
12,
6874,
1769,
3639,
289,
3639,
309,
261,
7496,
405,
374,
13,
3639,
288,
5411,
2393,
18,
6923,
2668,
6627,
2934,
6923,
12,
74,
1040,
76,
1182,
12,
7496,
10019,
3639,
289,
7734,
309,
261,
2881,
405,
374,
13,
3639,
288,
5411,
2393,
18,
6923,
2668,
6627,
2934,
6923,
12,
74,
1040,
76,
1182,
12,
2881,
10019,
3639,
289,
3639,
309,
261,
16814,
405,
374,
13,
3639,
288,
5411,
2393,
18,
6923,
2932,
56,
7923,
7734,
263,
6923,
12,
74,
1040,
76,
1182,
12,
16814,
3719,
7734,
263,
6923,
2668,
2497,
13,
7734,
263,
6923,
12,
74,
1040,
76,
1182,
12,
17916,
3719,
7734,
263,
6923,
2668,
2497,
13,
7734,
263,
6923,
12,
74,
1040,
76,
1182,
12,
7572,
10019,
3639,
289,
3639,
327,
261,
18366,
18,
10492,
10663,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1762,
1435,
565,
288,
3639,
6674,
2393,
273,
394,
6674,
5621,
3639,
309,
261,
6874,
405,
374,
13,
3639,
288,
5411,
2393,
18,
6923,
12,
6874,
1769,
3639,
289,
3639,
309,
261,
7496,
405,
374,
13,
3639,
288,
5411,
2393,
18,
6923,
2668,
6627,
2934,
6923,
12,
74,
1040,
76,
1182,
12,
7496,
10019,
3639,
289,
7734,
309,
261,
2881,
405,
374,
13,
3639,
288,
5411,
2393,
18,
6923,
2668,
6627,
2934,
6923,
12,
74,
1040,
76,
1182,
12,
2881,
10019,
3639,
289,
3639,
309,
261,
16814,
405,
374,
13,
3639,
288,
5411,
2393,
18,
6923,
2932,
56,
7923,
7734,
263,
6923,
12,
74,
1040,
76,
1182,
12,
16814,
3719,
7734,
263,
6923,
2668,
2497,
13,
2
] |
||
scanner = scannerClass.newInstance();
|
scanner = (Scanner) scannerClass.newInstance();
|
public void process(Connection conn) throws Exception { tranDir.mkdir(); File imagesDir = new File(tranDir, "images"); File globalImagesDir = new File(tranDir, "../images"); MvvmTransformHandler mth = new MvvmTransformHandler(null); Object scanner = null; InputStream is = ucl.getResourceAsStream("META-INF/report-files"); if (null == is) { logger.warn("No reports for: " + ucl.getURLs()[0]); return; } else { logger.info("Beginning generation for: " + tranName); } // Need to do the parameters & scanners first. BufferedReader br = new BufferedReader(new InputStreamReader(is)); for (String line = br.readLine(); null != line; line = br.readLine()) { if (line.startsWith("#")) continue; StringTokenizer tok = new StringTokenizer(line, ":"); if (!tok.hasMoreTokens()) { continue; } String resourceOrClassname = tok.nextToken(); if (!tok.hasMoreTokens()) { continue; } String type = tok.nextToken(); if (type.equalsIgnoreCase("parameter")) { String paramName = resourceOrClassname; if (!tok.hasMoreTokens()) throw new Error("Missing parameter value"); // XXX String only right now. String paramValue = tok.nextToken(); extraParams.put(paramName, paramValue); } else if (type.equalsIgnoreCase("scanner")) { ClassLoader cl = Thread.currentThread().getContextClassLoader(); try { Class scannerClass = cl.loadClass(resourceOrClassname); scanner = scannerClass.newInstance(); } catch (Exception x) { logger.warn("No such class: " + resourceOrClassname); } extraParams.put("scanner", scanner); } } is.close(); // Now do everything else. is = ucl.getResourceAsStream("META-INF/report-files"); br = new BufferedReader(new InputStreamReader(is)); for (String line = br.readLine(); null != line; line = br.readLine()) { if (line.startsWith("#")) continue; StringTokenizer tok = new StringTokenizer(line, ":"); if (!tok.hasMoreTokens()) { continue; } String resourceOrClassname = tok.nextToken(); if (!tok.hasMoreTokens()) { continue; } String type = tok.nextToken(); if (type.equalsIgnoreCase("parameter") || type.equalsIgnoreCase("scanner")) { continue; } else if (type.equalsIgnoreCase("summarizer")) { String className = resourceOrClassname; ClassLoader cl = Thread.currentThread().getContextClassLoader(); try { Class reportClass = cl.loadClass(className); ReportSummarizer reportSummarizer; reportSummarizer = (ReportSummarizer) reportClass.newInstance(); logger.debug("Found summarizer: " + className); String dailyFile = new File(tranDir, SUMMARY_FRAGMENT_DAILY).getCanonicalPath(); processReportSummarizer(reportSummarizer, conn, dailyFile, Util.lastday, Util.midnight); reportSummarizer = (ReportSummarizer) reportClass.newInstance(); String weeklyFile = new File(tranDir, SUMMARY_FRAGMENT_WEEKLY).getCanonicalPath(); processReportSummarizer(reportSummarizer, conn, weeklyFile, Util.lastweek, Util.midnight); reportSummarizer = (ReportSummarizer) reportClass.newInstance(); String monthlyFile = new File(tranDir, SUMMARY_FRAGMENT_MONTHLY).getCanonicalPath(); processReportSummarizer(reportSummarizer, conn, monthlyFile, Util.lastmonth, Util.midnight); } catch (Exception x) { logger.error("Unable to summarize", x); } } else if (type.equalsIgnoreCase("summaryGraph")) { String className = resourceOrClassname; ClassLoader cl = Thread.currentThread().getContextClassLoader(); String outputName = type; try { Class reportClass = cl.loadClass(className); ReportGraph reportGraph; String name = tok.nextToken(); reportGraph = (ReportGraph) reportClass.newInstance(); logger.debug("Found graph: " + className); String dailyFile = new File(tranDir, name + "--daily.jpg").getCanonicalPath(); processReportGraph(reportGraph, conn, dailyFile, Util.REPORT_TYPE_DAILY, Util.lastday, Util.midnight); String weeklyFile = new File(tranDir, name + "--weekly.jpg").getCanonicalPath(); processReportGraph(reportGraph, conn, weeklyFile, Util.REPORT_TYPE_WEEKLY, Util.lastweek, Util.midnight); String monthlyFile = new File(tranDir, name + "--monthly.jpg").getCanonicalPath(); processReportGraph(reportGraph, conn, monthlyFile, Util.REPORT_TYPE_MONTHLY, Util.lastmonth, Util.midnight); } catch (Exception x) { logger.error("Unable to generate summary graph", x); } } else { String resource = resourceOrClassname; String outputName = type; String outputFile = new File(tranDir, outputName).getCanonicalPath(); String outputImages = globalImagesDir.getCanonicalPath(); processReport(resource, conn, outputFile + "--daily", outputImages, Util.lastday, Util.midnight); processReport(resource, conn, outputFile + "--weekly", outputImages, Util.lastweek, Util.midnight); processReport(resource, conn, outputFile + "--monthly", outputImages, Util.lastmonth, Util.midnight); } } is.close(); // We can't use ucl.getResourceAsStream(ICON_ORG); since we don't know the path. for (Enumeration e = jf.entries(); e.hasMoreElements(); ) { JarEntry je = (JarEntry)e.nextElement(); String name = je.getName(); // System.out.println("Jar contains " + name); if (name.endsWith(File.separator + ICON_ORG)) { is = jf.getInputStream(je); imagesDir.mkdir(); FileOutputStream fos = new FileOutputStream(new File(imagesDir, ICON_ORG)); byte[] buf = new byte[256]; int count; while ((count = is.read(buf)) > 0) { fos.write(buf, 0, count); } fos.close(); is.close(); } else if (name.endsWith(File.separator + ICON_DESC)) { is = jf.getInputStream(je); imagesDir.mkdir(); FileOutputStream fos = new FileOutputStream(new File(imagesDir, ICON_DESC)); byte[] buf = new byte[256]; int count; while ((count = is.read(buf)) > 0) { fos.write(buf, 0, count); } fos.close(); is.close(); } } is = ucl.getResourceAsStream("META-INF/mvvm-transform.xml"); XMLReader xr = XMLReaderFactory.createXMLReader(); xr.setContentHandler(mth); xr.parse(new InputSource(is)); is.close(); String mktName = mth.getTransformDesc(new Tid()).getDisplayName(); // HACK O RAMA XXXXXXXXX if (mktName.startsWith("EdgeReport")) mktName = "EdgeGuard Appliance"; logger.debug("Writing transform name: " + mktName); FileOutputStream fos = new FileOutputStream(new File(tranDir, "name")); PrintWriter pw = new PrintWriter(fos); pw.println(mktName); pw.close(); logger.debug("copying report-files"); is = ucl.getResourceAsStream("META-INF/report-files"); br = new BufferedReader(new InputStreamReader(is)); fos = new FileOutputStream(new File(tranDir, "report-files")); pw = new PrintWriter(fos); for (String line = br.readLine(); null != line; line = br.readLine()) { pw.println(line); } is.close(); pw.close(); }
|
49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/a3171797b18cfa7f563395c08212f33ebee237bf/TranReporter.java/buggy/mvvm/main/com/metavize/mvvm/reporting/TranReporter.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1207,
12,
1952,
1487,
13,
1216,
1185,
565,
288,
3639,
13637,
1621,
18,
26686,
5621,
3639,
1387,
4602,
1621,
273,
394,
1387,
12,
13171,
1621,
16,
315,
7369,
8863,
3639,
1387,
2552,
8946,
1621,
273,
394,
1387,
12,
13171,
1621,
16,
315,
6216,
7369,
8863,
3639,
490,
90,
3489,
4059,
1503,
312,
451,
273,
394,
490,
90,
3489,
4059,
1503,
12,
2011,
1769,
3639,
1033,
7683,
273,
446,
31,
3639,
5037,
353,
273,
582,
830,
18,
588,
1420,
17052,
2932,
19294,
17,
19212,
19,
6006,
17,
2354,
8863,
3639,
309,
261,
2011,
422,
353,
13,
288,
5411,
1194,
18,
8935,
2932,
2279,
10557,
364,
30,
315,
397,
582,
830,
18,
588,
15749,
1435,
63,
20,
19226,
5411,
327,
31,
3639,
289,
469,
288,
5411,
1194,
18,
1376,
2932,
8149,
2093,
9377,
364,
30,
315,
397,
13637,
461,
1769,
3639,
289,
3639,
368,
12324,
358,
741,
326,
1472,
473,
888,
19637,
1122,
18,
3639,
10633,
5186,
273,
394,
10633,
12,
2704,
15322,
12,
291,
10019,
3639,
364,
261,
780,
980,
273,
5186,
18,
896,
1670,
5621,
446,
480,
980,
31,
980,
273,
5186,
18,
896,
1670,
10756,
288,
5411,
309,
261,
1369,
18,
17514,
1190,
2932,
17133,
3719,
7734,
1324,
31,
5411,
16370,
946,
273,
394,
16370,
12,
1369,
16,
6153,
1769,
5411,
309,
16051,
17692,
18,
5332,
7417,
5157,
10756,
288,
1324,
31,
289,
5411,
514,
1058,
1162,
20531,
273,
946,
18,
4285,
1345,
5621,
5411,
309,
16051,
17692,
18,
5332,
7417,
5157,
10756,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1952,
1487,
13,
1216,
1185,
565,
288,
3639,
13637,
1621,
18,
26686,
5621,
3639,
1387,
4602,
1621,
273,
394,
1387,
12,
13171,
1621,
16,
315,
7369,
8863,
3639,
1387,
2552,
8946,
1621,
273,
394,
1387,
12,
13171,
1621,
16,
315,
6216,
7369,
8863,
3639,
490,
90,
3489,
4059,
1503,
312,
451,
273,
394,
490,
90,
3489,
4059,
1503,
12,
2011,
1769,
3639,
1033,
7683,
273,
446,
31,
3639,
5037,
353,
273,
582,
830,
18,
588,
1420,
17052,
2932,
19294,
17,
19212,
19,
6006,
17,
2354,
8863,
3639,
309,
261,
2011,
422,
353,
13,
288,
5411,
1194,
18,
8935,
2932,
2279,
10557,
364,
30,
315,
397,
582,
830,
18,
588,
15749,
1435,
63,
20,
19226,
2
] |
return "Integrating (speciation/extinction) Likelihood Calculator for Categorical Data";
|
return "BCSE Integrating Likelihood Calculator";
|
public String getName() { // TODO Auto-generated method stub return "Integrating (speciation/extinction) Likelihood Calculator for Categorical Data"; }
|
55939 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55939/8e2e207489a89689f33da6c97b210c587f309a34/SpExtCategCharMLCalculator.java/clean/Source/mesquite/diverse/SpExtCategCharMLCalculator/SpExtCategCharMLCalculator.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1723,
1435,
288,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
202,
202,
2463,
315,
11476,
1776,
261,
2793,
7072,
19,
408,
267,
349,
13,
511,
1766,
11318,
15994,
639,
364,
385,
14341,
1910,
14432,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
514,
1723,
1435,
288,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
202,
202,
2463,
315,
11476,
1776,
261,
2793,
7072,
19,
408,
267,
349,
13,
511,
1766,
11318,
15994,
639,
364,
385,
14341,
1910,
14432,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
final PsiElement secondAsPsiElement = SourceTreeToPsiMap.treeElementToPsi(second);
|
final PsiElement secondAsPsiElement = transformToPsiElement(second);
|
public static String getStringWhiteSpaceBetweenTokens(ASTNode first, ASTNode second, Language language) { final FormattingModelBuilder modelBuilder = language.getFormattingModelBuilder(); if (modelBuilder == null) { final LeafElement leafElement = ParseUtil.nextLeaf((TreeElement) first, null); if (leafElement != second) { return leafElement.getText(); } else { return null; } } else { final PsiElement secondAsPsiElement = SourceTreeToPsiMap.treeElementToPsi(second); LOG.assertTrue(secondAsPsiElement != null); final PsiFile file = secondAsPsiElement.getContainingFile(); final Project project = secondAsPsiElement.getProject(); final CodeStyleSettings settings = CodeStyleSettingsManager.getInstance(project).getCurrentSettings(); return getWhiteSpaceBeforeToken(second, language, true).generateNewWhiteSpace(settings.getIndentOptions(file.getFileType())); } }
|
12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/1275ec977ca41eba8dc854de6acbbbf9b282a5dd/CodeEditUtil.java/buggy/source/com/intellij/psi/impl/source/codeStyle/CodeEditUtil.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
514,
4997,
23108,
11831,
5157,
12,
9053,
907,
1122,
16,
9183,
907,
2205,
16,
9889,
2653,
13,
288,
565,
727,
4077,
1787,
1488,
1263,
938,
1263,
273,
2653,
18,
588,
23974,
1488,
1263,
5621,
565,
309,
261,
2284,
1263,
422,
446,
13,
288,
1377,
727,
23383,
1046,
7839,
1046,
273,
2884,
1304,
18,
4285,
9858,
12443,
2471,
1046,
13,
1122,
16,
446,
1769,
1377,
309,
261,
12070,
1046,
480,
2205,
13,
288,
3639,
327,
7839,
1046,
18,
588,
1528,
5621,
1377,
289,
469,
288,
3639,
327,
446,
31,
1377,
289,
565,
289,
469,
288,
1377,
727,
453,
7722,
1046,
2205,
1463,
52,
7722,
1046,
273,
2510,
774,
52,
7722,
1046,
12,
8538,
1769,
1377,
2018,
18,
11231,
5510,
12,
8538,
1463,
52,
7722,
1046,
480,
446,
1769,
1377,
727,
453,
7722,
812,
585,
273,
2205,
1463,
52,
7722,
1046,
18,
588,
24344,
812,
5621,
1377,
727,
5420,
1984,
273,
2205,
1463,
52,
7722,
1046,
18,
588,
4109,
5621,
1377,
727,
3356,
2885,
2628,
1947,
273,
3356,
2885,
2628,
1318,
18,
588,
1442,
12,
4406,
2934,
588,
3935,
2628,
5621,
1377,
327,
336,
23108,
4649,
1345,
12,
8538,
16,
2653,
16,
638,
2934,
7163,
1908,
23108,
12,
4272,
18,
588,
7790,
1320,
12,
768,
18,
588,
28941,
1435,
10019,
565,
289,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
514,
4997,
23108,
11831,
5157,
12,
9053,
907,
1122,
16,
9183,
907,
2205,
16,
9889,
2653,
13,
288,
565,
727,
4077,
1787,
1488,
1263,
938,
1263,
273,
2653,
18,
588,
23974,
1488,
1263,
5621,
565,
309,
261,
2284,
1263,
422,
446,
13,
288,
1377,
727,
23383,
1046,
7839,
1046,
273,
2884,
1304,
18,
4285,
9858,
12443,
2471,
1046,
13,
1122,
16,
446,
1769,
1377,
309,
261,
12070,
1046,
480,
2205,
13,
288,
3639,
327,
7839,
1046,
18,
588,
1528,
5621,
1377,
289,
469,
288,
3639,
327,
446,
31,
1377,
289,
565,
289,
469,
288,
1377,
727,
453,
7722,
1046,
2205,
1463,
52,
7722,
1046,
273,
2510,
774,
52,
7722,
1046,
12,
8538,
1769,
1377,
2018,
18,
2
] |
if ( isAnonymous( env ) && ! env.containsKey( ANONYMOUS_ENV ) )
|
if ( isAnonymous( env ) && env.containsKey( DISABLE_ANONYMOUS_ENV ) )
|
public Context getInitialContext( Hashtable env ) throws NamingException { env = ( Hashtable ) env.clone(); Context ctx = null; if ( env.containsKey( SHUTDOWN_OP_ENV ) ) { if ( this.provider == null ) { // monitor.shutDownCalledOnStoppedProvider() return new DeadContext(); } try { this.provider.shutdown(); if ( this.fe != null ) { this.fe.stop(); } } catch( Throwable t ) { t.printStackTrace(); } finally { ctx = new DeadContext(); provider = null; initialEnv = null; } return ctx; } if ( env.containsKey( SYNC_OP_ENV ) ) { provider.sync(); return provider.getLdapContext( env ); } checkSecuritySettings( env ); if ( isAnonymous( env ) ) { env.put( PRINCIPAL, "" ); } // fire up the backend subsystem if we need to if ( null == provider ) { // we need to check this here instead of in AuthenticationService // because otherwise we are going to start up the system incorrectly if ( isAnonymous( env ) && ! env.containsKey( ANONYMOUS_ENV ) ) { throw new LdapNoPermissionException( "cannot bind as anonymous " + " on startup without enabling anonymous bind property: " + ANONYMOUS_ENV ); } this.initialEnv = env; initialize(); boolean createMode = createAdminAccount(); if ( createMode ) { importLdif(); } // fire up the front end if we have not explicitly disabled it if ( ! initialEnv.containsKey( DISABLE_PROTOCOL ) ) { startUpWireProtocol(); } } ctx = ( EveContext ) provider.getLdapContext( env ); return ctx; }
|
10677 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10677/e0868acd383e877279cbf1a94b145890f501edea/EveContextFactory.java/clean/jndi-provider/src/java/org/apache/eve/jndi/EveContextFactory.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1772,
24044,
1042,
12,
18559,
1550,
262,
1216,
26890,
565,
288,
3639,
1550,
273,
261,
18559,
262,
1550,
18,
14056,
5621,
3639,
1772,
1103,
273,
446,
31,
3639,
309,
261,
1550,
18,
12298,
653,
12,
6122,
1693,
12711,
67,
3665,
67,
11986,
262,
262,
3639,
288,
5411,
309,
261,
333,
18,
6778,
422,
446,
262,
5411,
288,
7734,
368,
6438,
18,
674,
322,
4164,
8185,
1398,
15294,
2249,
1435,
7734,
327,
394,
23967,
1042,
5621,
5411,
289,
5411,
775,
5411,
288,
7734,
333,
18,
6778,
18,
15132,
5621,
7734,
309,
261,
333,
18,
3030,
480,
446,
262,
7734,
288,
10792,
333,
18,
3030,
18,
5681,
5621,
7734,
289,
5411,
289,
5411,
1044,
12,
4206,
268,
262,
5411,
288,
7734,
268,
18,
1188,
6332,
5621,
5411,
289,
5411,
3095,
5411,
288,
7734,
1103,
273,
394,
23967,
1042,
5621,
7734,
2893,
273,
446,
31,
7734,
2172,
3491,
273,
446,
31,
5411,
289,
5411,
327,
1103,
31,
3639,
289,
3639,
309,
261,
1550,
18,
12298,
653,
12,
7068,
10346,
67,
3665,
67,
11986,
262,
262,
3639,
288,
5411,
2893,
18,
8389,
5621,
5411,
327,
2893,
18,
588,
18437,
1042,
12,
1550,
11272,
3639,
289,
3639,
866,
4368,
2628,
12,
1550,
11272,
3639,
309,
261,
353,
18792,
12,
1550,
262,
262,
3639,
288,
5411,
1550,
18,
458,
12,
11770,
23213,
2579,
1013,
16,
1408,
11272,
3639,
289,
3639,
368,
4452,
731,
326,
4221,
15359,
309,
732,
1608,
358,
3639,
309,
261,
446,
422,
2893,
262,
3639,
288,
5411,
368,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1772,
24044,
1042,
12,
18559,
1550,
262,
1216,
26890,
565,
288,
3639,
1550,
273,
261,
18559,
262,
1550,
18,
14056,
5621,
3639,
1772,
1103,
273,
446,
31,
3639,
309,
261,
1550,
18,
12298,
653,
12,
6122,
1693,
12711,
67,
3665,
67,
11986,
262,
262,
3639,
288,
5411,
309,
261,
333,
18,
6778,
422,
446,
262,
5411,
288,
7734,
368,
6438,
18,
674,
322,
4164,
8185,
1398,
15294,
2249,
1435,
7734,
327,
394,
23967,
1042,
5621,
5411,
289,
5411,
775,
5411,
288,
7734,
333,
18,
6778,
18,
15132,
5621,
7734,
309,
261,
333,
18,
3030,
480,
446,
262,
7734,
288,
10792,
333,
18,
3030,
18,
5681,
5621,
7734,
289,
5411,
289,
5411,
1044,
12,
4206,
268,
262,
5411,
2
] |
while (treepath[index] == this.path[index2]) {
|
while (treepath[index] == this.path[index2]) {
|
public boolean isDescendant(TreePath path) { // Variables Object[] treepath; int index; int index2; // Get Descendant path treepath = path.getPath(); // Locate Start Index index = 0; index2 = 0; while (treepath[index] != this.path[index2]) { index++; } // while // Verify Paths while (treepath[index] == this.path[index2]) { index++; index2++; } // while // Check for descendant if (index2 != this.path.length) { return false; } // if // Is Descendant return true; } // isDescendant()
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/307c62a404c75cfe6d08b0eae748fea5c1b5a741/TreePath.java/buggy/core/src/classpath/javax/javax/swing/tree/TreePath.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
353,
29014,
12,
2471,
743,
589,
13,
288,
202,
202,
759,
23536,
202,
202,
921,
8526,
202,
3413,
803,
31,
202,
202,
474,
1082,
202,
1615,
31,
202,
202,
474,
1082,
202,
1615,
22,
31,
202,
202,
759,
968,
13913,
409,
970,
589,
202,
202,
3413,
803,
273,
589,
18,
588,
743,
5621,
202,
202,
759,
2851,
340,
3603,
3340,
202,
202,
1615,
273,
374,
31,
202,
202,
1615,
22,
273,
374,
31,
202,
202,
17523,
261,
3413,
803,
63,
1615,
65,
480,
333,
18,
803,
63,
1615,
22,
5717,
288,
1082,
202,
1615,
9904,
31,
202,
202,
97,
368,
1323,
202,
202,
759,
8553,
16643,
202,
202,
17523,
261,
3413,
803,
63,
1615,
65,
422,
333,
18,
803,
63,
1615,
22,
5717,
288,
1082,
202,
1615,
9904,
31,
1082,
202,
1615,
22,
9904,
31,
202,
202,
97,
368,
1323,
202,
202,
759,
2073,
364,
17465,
202,
202,
430,
261,
1615,
22,
480,
333,
18,
803,
18,
2469,
13,
288,
1082,
202,
2463,
629,
31,
202,
202,
97,
368,
309,
202,
202,
759,
2585,
13913,
409,
970,
202,
202,
2463,
638,
31,
202,
97,
368,
353,
29014,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
29014,
12,
2471,
743,
589,
13,
288,
202,
202,
759,
23536,
202,
202,
921,
8526,
202,
3413,
803,
31,
202,
202,
474,
1082,
202,
1615,
31,
202,
202,
474,
1082,
202,
1615,
22,
31,
202,
202,
759,
968,
13913,
409,
970,
589,
202,
202,
3413,
803,
273,
589,
18,
588,
743,
5621,
202,
202,
759,
2851,
340,
3603,
3340,
202,
202,
1615,
273,
374,
31,
202,
202,
1615,
22,
273,
374,
31,
202,
202,
17523,
261,
3413,
803,
63,
1615,
65,
480,
333,
18,
803,
63,
1615,
22,
5717,
288,
1082,
202,
1615,
9904,
31,
202,
202,
97,
368,
1323,
202,
202,
759,
8553,
16643,
202,
202,
17523,
261,
3413,
803,
63,
1615,
65,
2
] |
void updateLayoutState()
|
protected void updateLayoutState()
|
void updateLayoutState() { int nrows = list.getModel().getSize(); cellHeight = -1; cellWidth = -1; if (cellHeights == null || cellHeights.length != nrows) cellHeights = new int[nrows]; if (list.getFixedCellHeight() == -1 || list.getFixedCellWidth() == -1) { ListCellRenderer rend = list.getCellRenderer(); for (int i = 0; i < nrows; ++i) { Component flyweight = rend.getListCellRendererComponent(list, list.getModel() .getElementAt(i), 0, false, false); Dimension dim = flyweight.getPreferredSize(); cellHeights[i] = dim.height; cellWidth = Math.max(cellWidth, dim.width); } } else { cellHeight = list.getFixedCellHeight(); cellWidth = list.getFixedCellWidth(); } }
|
25352 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25352/7878167de36c868f3f4b0f507094bb155efbb199/BasicListUI.java/clean/libjava/javax/swing/plaf/basic/BasicListUI.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1089,
3744,
1119,
1435,
225,
288,
565,
509,
18871,
273,
666,
18,
588,
1488,
7675,
588,
1225,
5621,
565,
2484,
2686,
273,
300,
21,
31,
565,
2484,
2384,
273,
300,
21,
31,
565,
309,
261,
3855,
2686,
87,
422,
446,
747,
2484,
2686,
87,
18,
2469,
480,
18871,
13,
1377,
2484,
2686,
87,
273,
394,
509,
63,
82,
3870,
15533,
565,
309,
261,
1098,
18,
588,
7505,
4020,
2686,
1435,
422,
300,
21,
747,
666,
18,
588,
7505,
4020,
2384,
1435,
422,
300,
21,
13,
1377,
288,
3639,
987,
4020,
6747,
1654,
72,
273,
666,
18,
588,
4020,
6747,
5621,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
18871,
31,
965,
77,
13,
1850,
288,
5411,
5435,
21434,
4865,
273,
1654,
72,
18,
588,
682,
4020,
6747,
1841,
12,
1098,
16,
28524,
565,
666,
18,
588,
1488,
1435,
28524,
3639,
263,
21336,
861,
12,
77,
3631,
28524,
565,
374,
16,
629,
16,
28524,
565,
629,
1769,
5411,
13037,
2464,
273,
21434,
4865,
18,
588,
16028,
1225,
5621,
5411,
2484,
2686,
87,
63,
77,
65,
273,
2464,
18,
4210,
31,
5411,
2484,
2384,
273,
2361,
18,
1896,
12,
3855,
2384,
16,
2464,
18,
2819,
1769,
1850,
289,
1377,
289,
565,
469,
1377,
288,
3639,
2484,
2686,
273,
666,
18,
588,
7505,
4020,
2686,
5621,
3639,
2484,
2384,
273,
666,
18,
588,
7505,
4020,
2384,
5621,
1377,
289,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1089,
3744,
1119,
1435,
225,
288,
565,
509,
18871,
273,
666,
18,
588,
1488,
7675,
588,
1225,
5621,
565,
2484,
2686,
273,
300,
21,
31,
565,
2484,
2384,
273,
300,
21,
31,
565,
309,
261,
3855,
2686,
87,
422,
446,
747,
2484,
2686,
87,
18,
2469,
480,
18871,
13,
1377,
2484,
2686,
87,
273,
394,
509,
63,
82,
3870,
15533,
565,
309,
261,
1098,
18,
588,
7505,
4020,
2686,
1435,
422,
300,
21,
747,
666,
18,
588,
7505,
4020,
2384,
1435,
422,
300,
21,
13,
1377,
288,
3639,
987,
4020,
6747,
1654,
72,
273,
666,
18,
588,
4020,
6747,
5621,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
18871,
31,
965,
77,
13,
1850,
2
] |
JOptionPane .showMessageDialog(JOptionPane.getRootFrame(), e.getMessage(), CommonBundle.getErrorTitle(), JOptionPane.INFORMATION_MESSAGE);
|
if (Main.isHeadless()) { getLogger().error(e); } else { JOptionPane .showMessageDialog(JOptionPane.getRootFrame(), e.getMessage(), CommonBundle.getErrorTitle(), JOptionPane.INFORMATION_MESSAGE); }
|
public UrlClassLoader initClassloader(final List<URL> classpathElements) { PathManager.loadProperties(); try { addParentClasspath(classpathElements); addIDEALibraries(classpathElements); addAdditionalClassPath(classpathElements); } catch (IllegalArgumentException e) { JOptionPane .showMessageDialog(JOptionPane.getRootFrame(), e.getMessage(), CommonBundle.getErrorTitle(), JOptionPane.INFORMATION_MESSAGE); System.exit(1); } catch (MalformedURLException e) { JOptionPane .showMessageDialog(JOptionPane.getRootFrame(), e.getMessage(), CommonBundle.getErrorTitle(), JOptionPane.INFORMATION_MESSAGE); System.exit(1); } filterClassPath(classpathElements); UrlClassLoader newClassLoader = null; try { newClassLoader = new UrlClassLoader(classpathElements, null, true, true); // prepare plugins if (!isLoadingOfExternalPluginsDisabled()) { PluginInstaller.initPluginClasses(); StartupActionScriptManager.executeActionScript(); } Thread.currentThread().setContextClassLoader(newClassLoader); } catch (Exception e) { Logger logger = getLogger(); if (logger == null) { e.printStackTrace(System.err); } else { logger.error(e); } } return newClassLoader; }
|
12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/d0598e3e620da9802779e890a638ede440889158/PluginManager.java/buggy/plugins-management/src/com/intellij/ide/plugins/PluginManager.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
6816,
7805,
1208,
797,
6714,
12,
6385,
987,
32,
1785,
34,
10006,
3471,
13,
288,
565,
2666,
1318,
18,
945,
2297,
5621,
565,
775,
288,
1377,
527,
3054,
17461,
12,
26302,
3471,
1769,
1377,
527,
10385,
1013,
495,
11042,
12,
26302,
3471,
1769,
1377,
527,
10552,
22158,
12,
26302,
3471,
1769,
565,
289,
565,
1044,
261,
31237,
425,
13,
288,
1377,
804,
1895,
8485,
3639,
263,
4500,
1079,
6353,
12,
46,
1895,
8485,
18,
588,
2375,
3219,
9334,
425,
18,
24906,
9334,
5658,
3405,
18,
588,
668,
4247,
9334,
804,
1895,
8485,
18,
706,
23805,
67,
8723,
1769,
1377,
2332,
18,
8593,
12,
21,
1769,
565,
289,
565,
1044,
261,
18695,
20160,
425,
13,
288,
1377,
804,
1895,
8485,
3639,
263,
4500,
1079,
6353,
12,
46,
1895,
8485,
18,
588,
2375,
3219,
9334,
425,
18,
24906,
9334,
5658,
3405,
18,
588,
668,
4247,
9334,
804,
1895,
8485,
18,
706,
23805,
67,
8723,
1769,
1377,
2332,
18,
8593,
12,
21,
1769,
565,
289,
565,
1034,
22158,
12,
26302,
3471,
1769,
565,
6816,
7805,
394,
7805,
273,
446,
31,
565,
775,
288,
1377,
394,
7805,
273,
394,
6816,
7805,
12,
26302,
3471,
16,
446,
16,
638,
16,
638,
1769,
1377,
368,
2911,
4799,
1377,
309,
16051,
291,
10515,
951,
6841,
9461,
8853,
10756,
288,
3639,
6258,
18678,
18,
2738,
3773,
4818,
5621,
3639,
3603,
416,
1803,
3651,
1318,
18,
8837,
1803,
3651,
5621,
1377,
289,
1377,
4884,
18,
2972,
3830,
7675,
542,
1042,
7805,
12,
2704,
7805,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6816,
7805,
1208,
797,
6714,
12,
6385,
987,
32,
1785,
34,
10006,
3471,
13,
288,
565,
2666,
1318,
18,
945,
2297,
5621,
565,
775,
288,
1377,
527,
3054,
17461,
12,
26302,
3471,
1769,
1377,
527,
10385,
1013,
495,
11042,
12,
26302,
3471,
1769,
1377,
527,
10552,
22158,
12,
26302,
3471,
1769,
565,
289,
565,
1044,
261,
31237,
425,
13,
288,
1377,
804,
1895,
8485,
3639,
263,
4500,
1079,
6353,
12,
46,
1895,
8485,
18,
588,
2375,
3219,
9334,
425,
18,
24906,
9334,
5658,
3405,
18,
588,
668,
4247,
9334,
804,
1895,
8485,
18,
706,
23805,
67,
8723,
1769,
1377,
2332,
18,
8593,
12,
21,
1769,
565,
289,
565,
1044,
261,
18695,
20160,
425,
13,
288,
1377,
804,
2
] |
FSHooks.runPreRevPropChangeHook(myReposRootDir, propertyName, propertyValue, userName, revision, action);
|
if (FSHooks.isHooksEnabled()) { FSHooks.runPreRevPropChangeHook(myReposRootDir, propertyName, propertyValue, userName, revision, action); }
|
public void setRevisionPropertyValue(long revision, String propertyName, String propertyValue) throws SVNException { assertValidRevision(revision); try { openRepository(); if (!SVNProperty.isRegularProperty(propertyName)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_BAD_ARGS, "Storage of non-regular property ''{0}'' is disallowed through the repository interface, and could indicate a bug in your client", propertyName); SVNErrorManager.error(err); } String userName = getUserName(); Map revProps = myFSFS.getRevisionProperties(revision); String oldValue = (String)revProps.get(propertyName); String action = null; if (propertyValue == null) { action = FSHooks.REVPROP_DELETE; } else if (oldValue == null) { action = FSHooks.REVPROP_ADD; } else { action = FSHooks.REVPROP_MODIFY; } FSHooks.runPreRevPropChangeHook(myReposRootDir, propertyName, propertyValue, userName, revision, action); myFSFS.setRevisionProperty(revision, propertyName, propertyValue); FSHooks.runPostRevPropChangeHook(myReposRootDir, propertyName, propertyValue, userName, revision, action); } finally { closeRepository(); } }
|
2776 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2776/fde534a648a729478b8c9d929410319f25bf1c89/FSRepository.java/buggy/svnkit/src/org/tmatesoft/svn/core/internal/io/fs/FSRepository.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
7939,
16107,
12,
5748,
6350,
16,
514,
5470,
16,
514,
12337,
13,
1216,
29537,
50,
503,
288,
3639,
1815,
1556,
7939,
12,
13057,
1769,
3639,
775,
288,
5411,
1696,
3305,
5621,
5411,
309,
16051,
23927,
50,
1396,
18,
291,
17974,
1396,
12,
4468,
461,
3719,
288,
7734,
29537,
50,
14935,
393,
273,
29537,
50,
14935,
18,
2640,
12,
23927,
50,
12012,
18,
862,
7057,
67,
16234,
67,
22439,
16,
13491,
315,
3245,
434,
1661,
17,
16819,
1272,
875,
95,
20,
1713,
11,
353,
24729,
3059,
326,
3352,
1560,
16,
471,
3377,
10768,
279,
7934,
316,
3433,
1004,
3113,
5470,
1769,
7734,
29537,
50,
668,
1318,
18,
1636,
12,
370,
1769,
5411,
289,
5411,
514,
12065,
273,
30456,
5621,
5411,
1635,
5588,
5047,
273,
3399,
4931,
4931,
18,
588,
7939,
2297,
12,
13057,
1769,
5411,
514,
11144,
273,
261,
780,
13,
9083,
5047,
18,
588,
12,
4468,
461,
1769,
5411,
514,
1301,
273,
446,
31,
5411,
309,
261,
4468,
620,
422,
446,
13,
288,
7734,
1301,
273,
478,
2664,
1184,
87,
18,
862,
58,
15811,
67,
6460,
31,
5411,
289,
469,
309,
261,
1673,
620,
422,
446,
13,
288,
7734,
1301,
273,
478,
2664,
1184,
87,
18,
862,
58,
15811,
67,
8355,
31,
5411,
289,
469,
288,
7734,
1301,
273,
478,
2664,
1184,
87,
18,
862,
58,
15811,
67,
6720,
12096,
31,
5411,
289,
5411,
309,
261,
42,
2664,
1184,
87,
18,
291,
13620,
1526,
10756,
288,
478,
2664,
1184,
87,
18,
2681,
1386,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
7939,
16107,
12,
5748,
6350,
16,
514,
5470,
16,
514,
12337,
13,
1216,
29537,
50,
503,
288,
3639,
1815,
1556,
7939,
12,
13057,
1769,
3639,
775,
288,
5411,
1696,
3305,
5621,
5411,
309,
16051,
23927,
50,
1396,
18,
291,
17974,
1396,
12,
4468,
461,
3719,
288,
7734,
29537,
50,
14935,
393,
273,
29537,
50,
14935,
18,
2640,
12,
23927,
50,
12012,
18,
862,
7057,
67,
16234,
67,
22439,
16,
13491,
315,
3245,
434,
1661,
17,
16819,
1272,
875,
95,
20,
1713,
11,
353,
24729,
3059,
326,
3352,
1560,
16,
471,
3377,
10768,
279,
7934,
316,
3433,
1004,
3113,
5470,
1769,
7734,
29537,
50,
668,
1318,
18,
1636,
12,
370,
1769,
5411,
289,
5411,
514,
12065,
2
] |
newVector. addElement(new Option("\tNumber of attributes to randomly investigate\n" +"\t(<1 = int(log(#attributes)+1)).", "K", 1, "-K <number of attributes>"));
|
newVector.addElement(new Option( "\tNumber of attributes to randomly investigate\n" +"\t(<1 = int(log(#attributes)+1)).", "K", 1, "-K <number of attributes>"));
|
public Enumeration listOptions() { Vector newVector = new Vector(6); newVector. addElement(new Option("\tNumber of attributes to randomly investigate\n" +"\t(<1 = int(log(#attributes)+1)).", "K", 1, "-K <number of attributes>")); newVector. addElement(new Option("\tSet minimum number of instances per leaf.", "M", 1, "-M <minimum number of instances>")); newVector. addElement(new Option("\tTurns debugging info on.", "D", 0, "-D")); newVector .addElement(new Option("\tSeed for random number generator.\n" + "\t(default 1)", "S", 1, "-S")); return newVector.elements(); }
|
48918 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48918/6c69bff7a93ee24f0857d64e15f77c9cfadb97eb/RandomTree.java/buggy/weka/classifiers/trees/RandomTree.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13864,
666,
1320,
1435,
288,
3639,
5589,
394,
5018,
273,
394,
5589,
12,
26,
1769,
565,
394,
5018,
18,
1377,
9335,
12,
2704,
2698,
31458,
88,
1854,
434,
1677,
358,
20153,
2198,
25999,
340,
64,
82,
6,
18701,
397,
12691,
88,
12,
32,
21,
273,
509,
12,
1330,
12,
7,
4350,
27921,
21,
3719,
1199,
16,
9506,
565,
315,
47,
3113,
404,
16,
3701,
47,
411,
2696,
434,
1677,
2984,
10019,
565,
394,
5018,
18,
1377,
9335,
12,
2704,
2698,
31458,
88,
694,
5224,
1300,
434,
3884,
1534,
7839,
1199,
16,
9506,
565,
315,
49,
3113,
404,
16,
3701,
49,
411,
15903,
1300,
434,
3884,
2984,
10019,
565,
394,
5018,
18,
1377,
9335,
12,
2704,
2698,
31458,
88,
31873,
10450,
1123,
603,
1199,
16,
9506,
565,
315,
40,
3113,
374,
16,
3701,
40,
7923,
1769,
565,
394,
5018,
1377,
263,
1289,
1046,
12,
2704,
2698,
31458,
88,
12702,
364,
2744,
1300,
4456,
8403,
82,
6,
9506,
377,
397,
1548,
88,
12,
1886,
404,
2225,
16,
9506,
377,
315,
55,
3113,
404,
16,
3701,
55,
7923,
1769,
565,
327,
394,
5018,
18,
6274,
5621,
225,
289,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
13864,
666,
1320,
1435,
288,
3639,
5589,
394,
5018,
273,
394,
5589,
12,
26,
1769,
565,
394,
5018,
18,
1377,
9335,
12,
2704,
2698,
31458,
88,
1854,
434,
1677,
358,
20153,
2198,
25999,
340,
64,
82,
6,
18701,
397,
12691,
88,
12,
32,
21,
273,
509,
12,
1330,
12,
7,
4350,
27921,
21,
3719,
1199,
16,
9506,
565,
315,
47,
3113,
404,
16,
3701,
47,
411,
2696,
434,
1677,
2984,
10019,
565,
394,
5018,
18,
1377,
9335,
12,
2704,
2698,
31458,
88,
694,
5224,
1300,
434,
3884,
1534,
7839,
1199,
16,
9506,
565,
315,
49,
3113,
404,
16,
3701,
49,
411,
15903,
1300,
434,
3884,
2984,
10019,
565,
394,
5018,
18,
1377,
9335,
12,
2704,
2698,
31458,
2
] |
DispatchQueue.shutdown();
|
EventDispatcher.shutdown();
|
public synchronized void start( MutablePropertyResolver configMutable, List activatorList) { if (m_frameworkStatus != INITIAL_STATUS) { throw new IllegalStateException("Invalid framework status: " + m_frameworkStatus); } // The framework is now in its startup sequence. m_frameworkStatus = STARTING_STATUS; // Initialize member variables. m_factory = null; m_configMutable = (configMutable == null) ? new MutablePropertyResolverImpl(new StringMap(false)) : configMutable; m_activeStartLevel = FelixConstants.FRAMEWORK_INACTIVE_STARTLEVEL; m_installRequestMap = new HashMap(); m_installedBundleMap = new HashMap(); m_uninstalledBundles = null; m_cache = null; m_nextId = 1L; m_dispatchQueue = null; m_bundleStreamHandler = new URLHandlersBundleStreamHandler(this); m_registry = new ServiceRegistry(m_logger); // Add a listener to the service registry; this is // used to distribute service registry events to // service listeners. m_registry.addServiceListener(new ServiceListener() { public void serviceChanged(ServiceEvent event) { fireServiceEvent(event); } }); try { m_cache = new BundleCache(m_config, m_logger); } catch (Exception ex) { System.err.println("Error creating bundle cache:"); ex.printStackTrace(); // Only shutdown the JVM if the framework is running stand-alone. String embedded = m_config.get( FelixConstants.EMBEDDED_EXECUTION_PROP); boolean isEmbedded = (embedded == null) ? false : embedded.equals("true"); if (!isEmbedded) { if (System.getSecurityManager() != null) { java.security.AccessController.doPrivileged( new java.security.PrivilegedAction() { public Object run() { System.exit(-1); return null; } }); } else { System.exit(-1); } } else { throw new RuntimeException(ex.toString()); } } // Create search policy for module loader. m_policyCore = new R4SearchPolicyCore(m_logger, m_config); // Add a resolver listener to the search policy // so that we will be notified when modules are resolved // in order to update the bundle state. m_policyCore.addResolverListener(new ResolveListener() { public void moduleResolved(ModuleEvent event) { BundleImpl bundle = null; try { long id = Util.getBundleIdFromModuleId( event.getModule().getId()); if (id >= 0) { // Update the bundle's state to resolved when the // current module is resolved; just ignore resolve // events for older revisions since this only occurs // when an update is done on an unresolved bundle // and there was no refresh performed. bundle = (BundleImpl) getBundle(id); // Lock the bundle first. try { acquireBundleLock(bundle); if (bundle.getInfo().getCurrentModule() == event.getModule()) { bundle.getInfo().setState(Bundle.RESOLVED); } } finally { releaseBundleLock(bundle); } } } catch (NumberFormatException ex) { // Ignore. } } public void moduleUnresolved(ModuleEvent event) { // We can ignore this, because the only time it // should happen is when a refresh occurs. The // refresh operation resets the bundle's state // by calling BundleInfo.reset(), thus it is not // necessary for us to reset the bundle's state // here. } }); m_factory = new ModuleFactoryImpl(m_logger); m_policyCore.setModuleFactory(m_factory); // Initialize dispatch queue. m_dispatchQueue = new FelixDispatchQueue(m_logger); // Initialize framework properties. initializeFrameworkProperties(); // Before we reload any cached bundles, let's create a system // bundle that is responsible for providing specific container // related services. SystemBundle systembundle = null; try { // Create a simple bundle info for the system bundle. BundleInfo info = new BundleInfo( m_logger, new SystemBundleArchive(), null); systembundle = new SystemBundle(this, info, activatorList); // Create a module for the system bundle. IModuleDefinition md = new ModuleDefinition( systembundle.getExports(), null, null, null); systembundle.getInfo().addModule(m_factory.createModule("0", md)); systembundle.getContentLoader().setSearchPolicy( new R4SearchPolicy( m_policyCore, systembundle.getInfo().getCurrentModule())); m_factory.setContentLoader( systembundle.getInfo().getCurrentModule(), systembundle.getContentLoader()); m_installedBundleMap.put( systembundle.getInfo().getLocation(), systembundle); // Manually resolve the System Bundle, which will cause its // state to be set to RESOLVED. try { m_policyCore.resolve(systembundle.getInfo().getCurrentModule()); } catch (ResolveException ex) { // This should never happen. throw new BundleException( "Unresolved package in System Bundle:" + ex.getPackage()); } // Start the system bundle; this will set its state // to STARTING, we must set its state to ACTIVE after // all bundles are restarted below according to the spec. systembundle.start(); } catch (Exception ex) { m_factory = null; DispatchQueue.shutdown(); m_logger.log(Logger.LOG_ERROR, "Unable to start system bundle.", ex); throw new RuntimeException("Unable to start system bundle."); } // Reload and cached bundles. BundleArchive[] archives = null; // First get cached bundle identifiers. try { archives = m_cache.getArchives(); } catch (Exception ex) { m_logger.log( Logger.LOG_ERROR, "Unable to list saved bundles: " + ex, ex); archives = null; } BundleImpl bundle = null; // Now install all cached bundles. for (int i = 0; (archives != null) && (i < archives.length); i++) { try { // Make sure our id generator is not going to overlap. // TODO: This is not correct since it may lead to re-used // ids, which is not okay according to OSGi. m_nextId = Math.max(m_nextId, archives[i].getId() + 1); // It is possible that a bundle in the cache was previously // uninstalled, but not completely deleted (perhaps because // of a crash or a locked file), so if we see an archive // with an UNINSTALLED persistent state, then try to remove // it now. if (archives[i].getPersistentState() == Bundle.UNINSTALLED) { m_cache.remove(archives[i]); } // Otherwise re-install the cached bundle. else { // Install the cached bundle. bundle = (BundleImpl) installBundle( archives[i].getId(), archives[i].getLocation(), null); } } catch (Exception ex) { fireFrameworkEvent(FrameworkEvent.ERROR, bundle, ex); try { m_logger.log( Logger.LOG_ERROR, "Unable to re-install " + archives[i].getLocation(), ex); } catch (Exception ex2) { m_logger.log( Logger.LOG_ERROR, "Unable to re-install cached bundle.", ex); } // TODO: Perhaps we should remove the cached bundle? } } // Get the framework's default start level. int startLevel = FelixConstants.FRAMEWORK_DEFAULT_STARTLEVEL; String s = m_config.get(FelixConstants.FRAMEWORK_STARTLEVEL_PROP); if (s != null) { try { startLevel = Integer.parseInt(s); } catch (NumberFormatException ex) { startLevel = FelixConstants.FRAMEWORK_DEFAULT_STARTLEVEL; } } // Load bundles from auto-install and auto-start properties; processAutoProperties(); // Set the start level using the start level service; // this ensures that all start level requests are // serialized. // NOTE: There is potentially a specification compliance // issue here, since the start level request is asynchronous; // this means that the framework will fire its STARTED event // before all bundles have officially been restarted and it // is not clear if this is really an issue or not. try { StartLevel sl = (StartLevel) getService( getBundle(0), getServiceReferences((BundleImpl) getBundle(0), StartLevel.class.getName(), null)[0]); sl.setStartLevel(startLevel); } catch (InvalidSyntaxException ex) { // Should never happen. } // The framework is now running. m_frameworkStatus = RUNNING_STATUS; // Set the system bundle state to ACTIVE. systembundle.getInfo().setState(Bundle.ACTIVE); // Fire started event for system bundle. fireBundleEvent(BundleEvent.STARTED, systembundle); // Send a framework event to indicate the framework has started. fireFrameworkEvent(FrameworkEvent.STARTED, getBundle(0), null); }
|
45948 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45948/9277063766411e10916c384200b74f4fffefa9e9/Felix.java/buggy/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
787,
12,
3639,
10960,
1396,
4301,
642,
19536,
16,
3639,
987,
5981,
639,
682,
13,
565,
288,
3639,
309,
261,
81,
67,
12303,
1482,
480,
28226,
67,
8608,
13,
3639,
288,
5411,
604,
394,
5477,
2932,
1941,
8257,
1267,
30,
315,
397,
312,
67,
12303,
1482,
1769,
3639,
289,
3639,
368,
1021,
8257,
353,
2037,
316,
2097,
11850,
3102,
18,
3639,
312,
67,
12303,
1482,
273,
10485,
1360,
67,
8608,
31,
3639,
368,
9190,
3140,
3152,
18,
3639,
312,
67,
6848,
273,
446,
31,
3639,
312,
67,
1425,
19536,
273,
261,
1425,
19536,
422,
446,
13,
5411,
692,
394,
10960,
1396,
4301,
2828,
12,
2704,
514,
863,
12,
5743,
3719,
294,
642,
19536,
31,
3639,
312,
67,
3535,
1685,
2355,
273,
478,
26342,
2918,
18,
15072,
10566,
67,
706,
13301,
67,
7570,
10398,
31,
3639,
312,
67,
5425,
691,
863,
273,
394,
4317,
5621,
3639,
312,
67,
13435,
3405,
863,
273,
394,
4317,
5621,
3639,
312,
67,
318,
13435,
16151,
273,
446,
31,
3639,
312,
67,
2493,
273,
446,
31,
3639,
312,
67,
4285,
548,
273,
404,
48,
31,
3639,
312,
67,
10739,
3183,
273,
446,
31,
3639,
312,
67,
9991,
1228,
1503,
273,
394,
1976,
6919,
3405,
1228,
1503,
12,
2211,
1769,
3639,
312,
67,
9893,
273,
394,
1956,
4243,
12,
81,
67,
4901,
1769,
3639,
368,
1436,
279,
2991,
358,
326,
1156,
4023,
31,
333,
353,
3639,
368,
1399,
358,
25722,
1156,
4023,
2641,
358,
3639,
368,
1156,
4679,
18,
3639,
2
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3852,
918,
787,
12,
3639,
10960,
1396,
4301,
642,
19536,
16,
3639,
987,
5981,
639,
682,
13,
565,
288,
3639,
309,
261,
81,
67,
12303,
1482,
480,
28226,
67,
8608,
13,
3639,
288,
5411,
604,
394,
5477,
2932,
1941,
8257,
1267,
30,
315,
397,
312,
67,
12303,
1482,
1769,
3639,
289,
3639,
368,
1021,
8257,
353,
2037,
316,
2097,
11850,
3102,
18,
3639,
312,
67,
12303,
1482,
273,
10485,
1360,
67,
8608,
31,
3639,
368,
9190,
3140,
3152,
18,
3639,
312,
67,
6848,
273,
446,
31,
3639,
312,
67,
1425,
19536,
273,
261,
1425,
19536,
422,
446,
13,
5411,
692,
394,
10960,
1396,
4301,
2828,
12,
2704,
514,
863,
12,
5743,
3719,
294,
642,
19536,
31,
3639,
2
] |
return ReflectionValueExtractor.evaluate( expression, root );
|
return ReflectionValueExtractor.evaluate( expression, root, false );
|
public Object getValue( String expression ) { try { return ReflectionValueExtractor.evaluate( expression, root ); } catch ( Exception e ) { return null; } }
|
53014 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53014/df5063726850034b8ea49f6f25ab1dcb17564f3b/ObjectBasedValueSource.java/buggy/src/main/java/org/codehaus/plexus/util/interpolation/ObjectBasedValueSource.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
2366,
12,
514,
2652,
262,
565,
288,
3639,
775,
3639,
288,
5411,
327,
5685,
620,
10958,
18,
21024,
12,
2652,
16,
1365,
16,
629,
11272,
3639,
289,
3639,
1044,
261,
1185,
425,
262,
3639,
288,
5411,
327,
446,
31,
3639,
289,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
2366,
12,
514,
2652,
262,
565,
288,
3639,
775,
3639,
288,
5411,
327,
5685,
620,
10958,
18,
21024,
12,
2652,
16,
1365,
16,
629,
11272,
3639,
289,
3639,
1044,
261,
1185,
425,
262,
3639,
288,
5411,
327,
446,
31,
3639,
289,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
public GnuDSAPrivateKey(BigInteger x, BigInteger p, BigInteger q, BigInteger g )
|
public GnuDSAPrivateKey(BigInteger x, BigInteger p, BigInteger q, BigInteger g )
|
public GnuDSAPrivateKey(BigInteger x, BigInteger p, BigInteger q, BigInteger g ) { this.x = x; this.p = p; this.q = q; this.g = g; }
|
1023 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1023/7d27864ffb9b4cf63db1bfad84983248326cfb51/GnuDSAPrivateKey.java/buggy/libjava/gnu/java/security/provider/GnuDSAPrivateKey.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
611,
13053,
19748,
10824,
12,
24198,
619,
16,
10246,
293,
16,
10246,
1043,
16,
10246,
314,
262,
282,
288,
565,
333,
18,
92,
273,
619,
31,
565,
333,
18,
84,
273,
293,
31,
565,
333,
18,
85,
273,
1043,
31,
565,
333,
18,
75,
273,
314,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
611,
13053,
19748,
10824,
12,
24198,
619,
16,
10246,
293,
16,
10246,
1043,
16,
10246,
314,
262,
282,
288,
565,
333,
18,
92,
273,
619,
31,
565,
333,
18,
84,
273,
293,
31,
565,
333,
18,
85,
273,
1043,
31,
565,
333,
18,
75,
273,
314,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
dstPix[i] =(int)((kk1*srcPix[i]*dstPix[i]) + k2*srcPix[i] + k3*dstPix[i] + kk4); if (dstPix[i] < 0) dstPix[i] = 0; else if (dstPix[i] > 255) dstPix[i] = 255;
|
val =(int)((kk1*srcPix[i]*dstPix[i]) + k2*srcPix[i] + k3*dstPix[i] + kk4); if ((val & 0xFFFFFF00) != 0) if ((val & 0x80000000) != 0) val = 0; else val = 255; dstPix[i] = val;
|
public void precompose(Raster src, Raster dstIn, WritableRaster dstOut) { int [] srcPix = null; int [] dstPix = null; int x=dstOut.getMinX(); int w=dstOut.getWidth(); int y0=dstOut.getMinY(); int y1=y0 + dstOut.getHeight(); float kk1 = k1/255.0f; float kk4 = k4*255.0f+0.5f; for (int y = y0; y<y1; y++) { srcPix = src.getPixels (x, y, w, 1, srcPix); dstPix = dstIn.getPixels(x, y, w, 1, dstPix); for (int i=0; i<srcPix.length; i++) { dstPix[i] =(int)((kk1*srcPix[i]*dstPix[i]) + k2*srcPix[i] + k3*dstPix[i] + kk4); if (dstPix[i] < 0) dstPix[i] = 0; else if (dstPix[i] > 255) dstPix[i] = 255; } dstOut.setPixels(x, y, w, 1, dstPix); } }
|
46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/a669441158b3bb824a6476f27eb024eccb02db94/SVGComposite.java/buggy/sources/org/apache/batik/ext/awt/image/renderable/SVGComposite.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
675,
23658,
12,
18637,
1705,
16,
30757,
3046,
382,
16,
27573,
14505,
18637,
3046,
1182,
13,
288,
5411,
509,
5378,
1705,
21816,
273,
446,
31,
5411,
509,
5378,
3046,
21816,
273,
446,
31,
5411,
509,
619,
33,
11057,
1182,
18,
588,
2930,
60,
5621,
5411,
509,
341,
33,
11057,
1182,
18,
588,
2384,
5621,
5411,
509,
677,
20,
33,
11057,
1182,
18,
588,
2930,
61,
5621,
5411,
509,
677,
21,
33,
93,
20,
397,
3046,
1182,
18,
588,
2686,
5621,
13491,
1431,
17654,
21,
273,
417,
21,
19,
10395,
18,
20,
74,
31,
5411,
1431,
17654,
24,
273,
417,
24,
14,
10395,
18,
20,
74,
15,
20,
18,
25,
74,
31,
5411,
364,
261,
474,
677,
273,
677,
20,
31,
677,
32,
93,
21,
31,
677,
27245,
288,
7734,
1705,
21816,
273,
1705,
18,
588,
18079,
225,
261,
92,
16,
677,
16,
341,
16,
404,
16,
1705,
21816,
1769,
7734,
3046,
21816,
273,
3046,
382,
18,
588,
18079,
12,
92,
16,
677,
16,
341,
16,
404,
16,
3046,
21816,
1769,
7734,
364,
261,
474,
277,
33,
20,
31,
277,
32,
4816,
21816,
18,
2469,
31,
277,
27245,
288,
10792,
3046,
21816,
63,
77,
65,
273,
12,
474,
13,
12443,
79,
79,
21,
14,
4816,
21816,
63,
77,
5772,
11057,
21816,
63,
77,
5717,
397,
19694,
417,
22,
14,
4816,
21816,
63,
77,
65,
397,
417,
23,
14,
11057,
21816,
63,
77,
65,
397,
17654,
24,
1769,
10792,
309,
1377,
261,
11057,
21816,
63,
77,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
675,
23658,
12,
18637,
1705,
16,
30757,
3046,
382,
16,
27573,
14505,
18637,
3046,
1182,
13,
288,
5411,
509,
5378,
1705,
21816,
273,
446,
31,
5411,
509,
5378,
3046,
21816,
273,
446,
31,
5411,
509,
619,
33,
11057,
1182,
18,
588,
2930,
60,
5621,
5411,
509,
341,
33,
11057,
1182,
18,
588,
2384,
5621,
5411,
509,
677,
20,
33,
11057,
1182,
18,
588,
2930,
61,
5621,
5411,
509,
677,
21,
33,
93,
20,
397,
3046,
1182,
18,
588,
2686,
5621,
13491,
1431,
17654,
21,
273,
417,
21,
19,
10395,
18,
20,
74,
31,
5411,
1431,
17654,
24,
273,
417,
24,
14,
10395,
18,
20,
74,
15,
20,
18,
25,
74,
31,
5411,
364,
261,
474,
677,
2
] |
integerClass.defineMethod("to_i", CallbackFactory.getMethod(RubyInteger.class, "to_i")); integerClass.defineMethod("to_int", CallbackFactory.getMethod(RubyInteger.class, "to_i")); integerClass.defineMethod("ceil", CallbackFactory.getMethod(RubyInteger.class, "to_i")); integerClass.defineMethod("floor", CallbackFactory.getMethod(RubyInteger.class, "to_i")); integerClass.defineMethod("round", CallbackFactory.getMethod(RubyInteger.class, "to_i")); integerClass.defineMethod("truncate", CallbackFactory.getMethod(RubyInteger.class, "to_i"));
|
integerClass.defineMethod("to_i", CallbackFactory.getSelfMethod()); integerClass.defineMethod("to_int", CallbackFactory.getSelfMethod()); integerClass.defineMethod("ceil", CallbackFactory.getSelfMethod()); integerClass.defineMethod("floor", CallbackFactory.getSelfMethod()); integerClass.defineMethod("round", CallbackFactory.getSelfMethod()); integerClass.defineMethod("truncate", CallbackFactory.getSelfMethod());
|
public static RubyClass createIntegerClass(Ruby ruby) { RubyClass integerClass = ruby.defineClass("Integer", ruby.getClasses().getNumericClass()); integerClass.defineSingletonMethod("induced_from", CallbackFactory.getSingletonMethod(RubyInteger.class, "induced_from", RubyObject.class)); integerClass.defineMethod("chr", CallbackFactory.getMethod(RubyInteger.class, "chr")); integerClass.defineMethod("integer?", CallbackFactory.getMethod(RubyInteger.class, "int_p")); integerClass.defineMethod("to_i", CallbackFactory.getMethod(RubyInteger.class, "to_i")); integerClass.defineMethod("to_int", CallbackFactory.getMethod(RubyInteger.class, "to_i")); integerClass.defineMethod("ceil", CallbackFactory.getMethod(RubyInteger.class, "to_i")); integerClass.defineMethod("floor", CallbackFactory.getMethod(RubyInteger.class, "to_i")); integerClass.defineMethod("round", CallbackFactory.getMethod(RubyInteger.class, "to_i")); integerClass.defineMethod("truncate", CallbackFactory.getMethod(RubyInteger.class, "to_i")); integerClass.defineMethod("next", CallbackFactory.getMethod(RubyInteger.class, "succ")); integerClass.defineMethod("succ", CallbackFactory.getMethod(RubyInteger.class, "succ")); integerClass.defineMethod("downto", CallbackFactory.getMethod(RubyInteger.class, "downto", RubyNumeric.class)); integerClass.defineMethod("step", CallbackFactory.getMethod(RubyInteger.class, "step", RubyNumeric.class, RubyNumeric.class)); integerClass.defineMethod("times", CallbackFactory.getMethod(RubyInteger.class, "times")); integerClass.defineMethod("upto", CallbackFactory.getMethod(RubyInteger.class, "upto", RubyNumeric.class)); return integerClass; }
|
46258 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46258/4e4c0a90262b62b83d3fc5717371745bcc928c2b/RubyInteger.java/clean/org/jruby/RubyInteger.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
752,
4522,
797,
12,
54,
10340,
22155,
13,
288,
3639,
19817,
797,
3571,
797,
273,
22155,
18,
11255,
797,
2932,
4522,
3113,
22155,
18,
588,
4818,
7675,
588,
9902,
797,
10663,
3639,
3571,
797,
18,
11255,
19571,
1305,
2932,
728,
26372,
67,
2080,
3113,
8444,
1733,
18,
588,
19571,
1305,
12,
54,
10340,
4522,
18,
1106,
16,
315,
728,
26372,
67,
2080,
3113,
19817,
921,
18,
1106,
10019,
3639,
3571,
797,
18,
11255,
1305,
2932,
15182,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
4522,
18,
1106,
16,
315,
15182,
7923,
1769,
3639,
3571,
797,
18,
11255,
1305,
2932,
7745,
35,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
4522,
18,
1106,
16,
315,
474,
67,
84,
7923,
1769,
3639,
3571,
797,
18,
11255,
1305,
2932,
869,
67,
77,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
4522,
18,
1106,
16,
315,
869,
67,
77,
7923,
1769,
3639,
3571,
797,
18,
11255,
1305,
2932,
869,
67,
474,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
4522,
18,
1106,
16,
315,
869,
67,
77,
7923,
1769,
3639,
3571,
797,
18,
11255,
1305,
2932,
311,
330,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
4522,
18,
1106,
16,
315,
869,
67,
77,
7923,
1769,
3639,
3571,
797,
18,
11255,
1305,
2932,
74,
5807,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
4522,
18,
1106,
16,
315,
869,
67,
77,
7923,
1769,
3639,
3571,
797,
18,
11255,
1305,
2932,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
752,
4522,
797,
12,
54,
10340,
22155,
13,
288,
3639,
19817,
797,
3571,
797,
273,
22155,
18,
11255,
797,
2932,
4522,
3113,
22155,
18,
588,
4818,
7675,
588,
9902,
797,
10663,
3639,
3571,
797,
18,
11255,
19571,
1305,
2932,
728,
26372,
67,
2080,
3113,
8444,
1733,
18,
588,
19571,
1305,
12,
54,
10340,
4522,
18,
1106,
16,
315,
728,
26372,
67,
2080,
3113,
19817,
921,
18,
1106,
10019,
3639,
3571,
797,
18,
11255,
1305,
2932,
15182,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
4522,
18,
1106,
16,
315,
15182,
7923,
1769,
3639,
3571,
797,
18,
11255,
1305,
2932,
7745,
35,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
4522,
18,
1106,
2
] |
setCoolItemSize(coolItem); updatePerspectiveBar();
|
private void addShowTextItem(Menu menu) { final MenuItem showtextMenuItem = new MenuItem(menu, SWT.CHECK); showtextMenuItem.setText(WorkbenchMessages.getString("PerspectiveBar.showText")); //$NON-NLS-1$ showtextMenuItem.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if (perspectiveBar == null) return; boolean preference = showtextMenuItem.getSelection(); PrefUtil.getAPIPreferenceStore() .setValue(IWorkbenchPreferenceConstants.SHOW_TEXT_ON_PERSPECTIVE_BAR, preference); setCoolItemSize(coolItem); updatePerspectiveBar(); } }); }
|
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/f770c05df0cc0ea3e7608e074e7602d4ad5dd3eb/PerspectiveSwitcher.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
527,
5706,
1528,
1180,
12,
4599,
3824,
13,
288,
202,
202,
6385,
25085,
2405,
955,
12958,
273,
394,
25085,
12,
5414,
16,
348,
8588,
18,
10687,
1769,
202,
202,
4500,
955,
12958,
18,
542,
1528,
12,
2421,
22144,
5058,
18,
588,
780,
2932,
14781,
16772,
5190,
18,
4500,
1528,
7923,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
4500,
955,
12958,
18,
1289,
6233,
2223,
12,
2704,
12977,
4216,
1435,
288,
1082,
202,
482,
918,
3604,
7416,
12,
6233,
1133,
425,
13,
288,
9506,
565,
309,
261,
10422,
16772,
5190,
422,
446,
13,
9506,
3639,
327,
31,
9506,
202,
6494,
11555,
273,
2405,
955,
12958,
18,
588,
6233,
5621,
7734,
28184,
1304,
18,
588,
2557,
9624,
2257,
1435,
13491,
263,
542,
620,
12,
45,
2421,
22144,
9624,
2918,
18,
16677,
67,
5151,
67,
673,
67,
3194,
23810,
1268,
5354,
67,
21908,
16,
11555,
1769,
7734,
11440,
1371,
1180,
1225,
12,
71,
1371,
1180,
1769,
7734,
1089,
14781,
16772,
5190,
5621,
1082,
202,
97,
202,
202,
22938,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
527,
5706,
1528,
1180,
12,
4599,
3824,
13,
288,
202,
202,
6385,
25085,
2405,
955,
12958,
273,
394,
25085,
12,
5414,
16,
348,
8588,
18,
10687,
1769,
202,
202,
4500,
955,
12958,
18,
542,
1528,
12,
2421,
22144,
5058,
18,
588,
780,
2932,
14781,
16772,
5190,
18,
4500,
1528,
7923,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
4500,
955,
12958,
18,
1289,
6233,
2223,
12,
2704,
12977,
4216,
1435,
288,
1082,
202,
482,
918,
3604,
7416,
12,
6233,
1133,
425,
13,
288,
9506,
565,
309,
261,
10422,
16772,
5190,
422,
446,
13,
9506,
3639,
327,
31,
9506,
202,
6494,
11555,
273,
2405,
955,
12958,
18,
588,
6233,
5621,
7734,
28184,
1304,
18,
2
] |
|
return new Point(5,5);
|
return new Point(5, 5);
|
public static void main(String[] args) { final Display display = new Display (); Shell shell = new Shell (display); shell.setLayout(new FillLayout()); TableViewer v = new TableViewer(shell,SWT.FULL_SELECTION); v.getTable().setLinesVisible(true); v.getTable().setHeaderVisible(true); v.activateCustomTooltips(); v.setContentProvider(new MyContentProvider()); CellLabelProvider labelProvider = new CellLabelProvider() { /* (non-Javadoc) * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipText(java.lang.Object) */ public String getToolTipText(Object element) { return "Tooltip (" + element + ")"; } /* (non-Javadoc) * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipShift(java.lang.Object) */ public Point getToolTipShift(Object object) { return new Point(5,5); } /* (non-Javadoc) * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipDisplayDelayTime(java.lang.Object) */ public int getToolTipDisplayDelayTime(Object object) { return 2000; } /* (non-Javadoc) * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipTimeDisplayed(java.lang.Object) */ public int getToolTipTimeDisplayed(Object object) { return 5000; } /* (non-Javadoc) * @see org.eclipse.jface.viewers.CellLabelProvider#update(org.eclipse.jface.viewers.ViewerCell) */ public void update(ViewerCell cell) { cell.setText(cell.getElement().toString()); } }; TableViewerColumn column = new TableViewerColumn(v,SWT.NONE); column.setLabelProvider(labelProvider); column.getColumn().setText("Column 1"); column.getColumn().setWidth(100); v.setInput(""); shell.setSize(200,200); shell.open (); while (!shell.isDisposed()) { if (!display.readAndDispatch ()) { display.sleep (); } } display.dispose (); }
|
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/e8377b71f3cf1bbeaf66b1b6a87a864e93333fda/Snippet011CustomTooltips.java/clean/examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet011CustomTooltips.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
202,
202,
6385,
9311,
2562,
273,
394,
9311,
261,
1769,
202,
202,
13220,
5972,
273,
394,
19433,
261,
5417,
1769,
202,
565,
5972,
18,
542,
3744,
12,
2704,
14192,
3744,
10663,
202,
377,
202,
565,
3555,
18415,
331,
273,
394,
3555,
18415,
12,
10304,
16,
55,
8588,
18,
18111,
67,
1090,
15445,
1769,
202,
565,
331,
18,
588,
1388,
7675,
542,
5763,
6207,
12,
3767,
1769,
202,
565,
331,
18,
588,
1388,
7675,
542,
1864,
6207,
12,
3767,
1769,
202,
565,
331,
18,
10014,
3802,
774,
4397,
7146,
5621,
202,
565,
331,
18,
542,
1350,
2249,
12,
2704,
8005,
1350,
2249,
10663,
202,
377,
202,
565,
8614,
2224,
2249,
1433,
2249,
273,
394,
8614,
2224,
2249,
1435,
288,
25083,
202,
20308,
261,
5836,
17,
24060,
13,
9506,
380,
632,
5946,
2358,
18,
20416,
18,
78,
865,
18,
1945,
414,
18,
4020,
2224,
2249,
7,
588,
29250,
1528,
12,
6290,
18,
4936,
18,
921,
13,
9506,
1195,
1082,
202,
482,
514,
336,
29250,
1528,
12,
921,
930,
13,
288,
9506,
202,
2463,
315,
22444,
7566,
397,
930,
397,
7310,
31,
1082,
202,
97,
6862,
202,
20308,
261,
5836,
17,
24060,
13,
9506,
380,
632,
5946,
2358,
18,
20416,
18,
78,
865,
18,
1945,
414,
18,
4020,
2224,
2249,
7,
588,
29250,
10544,
12,
6290,
18,
4936,
18,
921,
13,
9506,
1195,
1082,
202,
482,
4686,
336,
29250,
10544,
12,
921,
733,
13,
288,
9506,
202,
2463,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
202,
202,
6385,
9311,
2562,
273,
394,
9311,
261,
1769,
202,
202,
13220,
5972,
273,
394,
19433,
261,
5417,
1769,
202,
565,
5972,
18,
542,
3744,
12,
2704,
14192,
3744,
10663,
202,
377,
202,
565,
3555,
18415,
331,
273,
394,
3555,
18415,
12,
10304,
16,
55,
8588,
18,
18111,
67,
1090,
15445,
1769,
202,
565,
331,
18,
588,
1388,
7675,
542,
5763,
6207,
12,
3767,
1769,
202,
565,
331,
18,
588,
1388,
7675,
542,
1864,
6207,
12,
3767,
1769,
202,
565,
331,
18,
10014,
3802,
774,
4397,
7146,
5621,
202,
565,
331,
18,
542,
1350,
2249,
12,
2704,
8005,
1350,
2249,
10663,
202,
377,
202,
565,
8614,
2
] |
eNotify(new ENotificationImpl(this, Notification.SET, DataPackage.SERIES_GROUPING__GROUP_TYPE, oldGroupType, groupType));
|
eNotify(new ENotificationImpl(this, Notification.SET, DataPackage.SERIES_GROUPING__GROUP_TYPE, oldGroupType, groupType));
|
public void setGroupType(String newGroupType) { String oldGroupType = groupType; groupType = newGroupType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DataPackage.SERIES_GROUPING__GROUP_TYPE, oldGroupType, groupType)); }
|
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/SeriesGroupingImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/data/impl/SeriesGroupingImpl.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
1114,
559,
12,
780,
394,
1114,
559,
13,
565,
288,
3639,
514,
1592,
1114,
559,
273,
1041,
559,
31,
3639,
1041,
559,
273,
394,
1114,
559,
31,
3639,
309,
261,
73,
21107,
10756,
5411,
22596,
12,
2704,
19953,
12,
2211,
16,
8050,
18,
4043,
16,
1910,
2261,
18,
2123,
8805,
67,
8468,
1360,
972,
8468,
67,
2399,
16,
1592,
1114,
559,
16,
1041,
559,
10019,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1114,
559,
12,
780,
394,
1114,
559,
13,
565,
288,
3639,
514,
1592,
1114,
559,
273,
1041,
559,
31,
3639,
1041,
559,
273,
394,
1114,
559,
31,
3639,
309,
261,
73,
21107,
10756,
5411,
22596,
12,
2704,
19953,
12,
2211,
16,
8050,
18,
4043,
16,
1910,
2261,
18,
2123,
8805,
67,
8468,
1360,
972,
8468,
67,
2399,
16,
1592,
1114,
559,
16,
1041,
559,
10019,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
if (_navHistory.size() == 0) _navHistory.addElement(ProjectBrowser.TheInstance.getTarget()); while (_navHistory.size() -1 > _historyIndex) { _navHistory.removeElementAt(_navHistory.size() - 1);
|
if (_navHistory.size() == 0) _navHistory.addElement(ProjectBrowser.TheInstance.getTarget()); while (_navHistory.size() - 1 > _historyIndex) { _navHistory.removeElementAt(_navHistory.size() - 1); } if (_navHistory.size() > MAX_HISTORY) { _navHistory.removeElementAt(0); } _navHistory.addElement(sel); _historyIndex = _navHistory.size() - 1;
|
public void addToHistory(Object sel) { if (_navHistory.size() == 0) _navHistory.addElement(ProjectBrowser.TheInstance.getTarget()); while (_navHistory.size() -1 > _historyIndex) { _navHistory.removeElementAt(_navHistory.size() - 1); } if (_navHistory.size() > MAX_HISTORY) { _navHistory.removeElementAt(0); } _navHistory.addElement(sel); _historyIndex = _navHistory.size() - 1; }
|
7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/57bdf2f7566bdfce4e17c1658a0540fd7217bdf6/NavigatorPane.java/clean/src_new/org/argouml/ui/NavigatorPane.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
9604,
5623,
12,
921,
357,
13,
288,
565,
309,
261,
67,
11589,
5623,
18,
1467,
1435,
422,
374,
13,
1377,
389,
11589,
5623,
18,
1289,
1046,
12,
4109,
9132,
18,
1986,
1442,
18,
588,
2326,
10663,
565,
1323,
261,
67,
11589,
5623,
18,
1467,
1435,
300,
21,
405,
389,
8189,
1016,
13,
288,
1377,
389,
11589,
5623,
18,
4479,
1046,
861,
24899,
11589,
5623,
18,
1467,
1435,
300,
404,
1769,
565,
289,
565,
309,
261,
67,
11589,
5623,
18,
1467,
1435,
405,
4552,
67,
31746,
13,
288,
1377,
389,
11589,
5623,
18,
4479,
1046,
861,
12,
20,
1769,
565,
289,
565,
389,
11589,
5623,
18,
1289,
1046,
12,
1786,
1769,
565,
389,
8189,
1016,
273,
389,
11589,
5623,
18,
1467,
1435,
300,
404,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
9604,
5623,
12,
921,
357,
13,
288,
565,
309,
261,
67,
11589,
5623,
18,
1467,
1435,
422,
374,
13,
1377,
389,
11589,
5623,
18,
1289,
1046,
12,
4109,
9132,
18,
1986,
1442,
18,
588,
2326,
10663,
565,
1323,
261,
67,
11589,
5623,
18,
1467,
1435,
300,
21,
405,
389,
8189,
1016,
13,
288,
1377,
389,
11589,
5623,
18,
4479,
1046,
861,
24899,
11589,
5623,
18,
1467,
1435,
300,
404,
1769,
565,
289,
565,
309,
261,
67,
11589,
5623,
18,
1467,
1435,
405,
4552,
67,
31746,
13,
288,
1377,
389,
11589,
5623,
18,
4479,
1046,
861,
12,
20,
1769,
565,
289,
565,
389,
11589,
5623,
18,
1289,
1046,
12,
1786,
1769,
565,
389,
8189,
1016,
273,
389,
2
] |
label_35:
|
label_38:
|
final public void list_for() throws ParseException { /*@bgen(jjtree) list_for */ SimpleNode jjtn000 = (SimpleNode)SimpleNode.jjtCreate(this, JJTLIST_FOR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); try { jj_consume_token(FOR); exprlist(); jj_consume_token(IN); SmartTestList(); label_35: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IF: ; break; default: jj_la1[88] = jj_gen; break label_35; } list_if(); } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } }
|
6527 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6527/2b47cff319e0a469e540c356f904a833b9b33cd7/PythonGrammar.java/clean/org/python/parser/PythonGrammar.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
918,
666,
67,
1884,
1435,
1216,
10616,
288,
5375,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
666,
67,
1884,
1195,
225,
4477,
907,
10684,
5088,
3784,
273,
261,
5784,
907,
13,
5784,
907,
18,
78,
78,
88,
1684,
12,
2211,
16,
804,
46,
56,
7085,
67,
7473,
1769,
225,
1250,
10684,
5111,
3784,
273,
638,
31,
225,
10684,
3413,
18,
3190,
907,
3876,
12,
78,
78,
5088,
3784,
1769,
225,
10684,
3413,
3678,
907,
3876,
12,
78,
78,
5088,
3784,
1769,
565,
775,
288,
1377,
10684,
67,
21224,
67,
2316,
12,
7473,
1769,
1377,
3065,
1098,
5621,
1377,
10684,
67,
21224,
67,
2316,
12,
706,
1769,
1377,
19656,
4709,
682,
5621,
1377,
1433,
67,
7414,
30,
1377,
1323,
261,
3767,
13,
288,
3639,
1620,
14015,
78,
78,
67,
496,
79,
631,
17,
21,
9945,
78,
78,
67,
496,
79,
13332,
78,
78,
67,
496,
79,
13,
288,
3639,
648,
11083,
30,
1850,
274,
1850,
898,
31,
3639,
805,
30,
1850,
10684,
67,
11821,
21,
63,
5482,
65,
273,
10684,
67,
4507,
31,
1850,
898,
1433,
67,
4763,
31,
3639,
289,
3639,
666,
67,
430,
5621,
1377,
289,
565,
289,
1044,
261,
15155,
10684,
736,
3784,
13,
288,
565,
309,
261,
78,
78,
5111,
3784,
13,
288,
1377,
10684,
3413,
18,
8507,
907,
3876,
12,
78,
78,
5088,
3784,
1769,
1377,
10684,
5111,
3784,
273,
629,
31,
565,
289,
469,
288,
1377,
10684,
3413,
18,
5120,
907,
5621,
565,
289,
565,
309,
261,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
918,
666,
67,
1884,
1435,
1216,
10616,
288,
5375,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
666,
67,
1884,
1195,
225,
4477,
907,
10684,
5088,
3784,
273,
261,
5784,
907,
13,
5784,
907,
18,
78,
78,
88,
1684,
12,
2211,
16,
804,
46,
56,
7085,
67,
7473,
1769,
225,
1250,
10684,
5111,
3784,
273,
638,
31,
225,
10684,
3413,
18,
3190,
907,
3876,
12,
78,
78,
5088,
3784,
1769,
225,
10684,
3413,
3678,
907,
3876,
12,
78,
78,
5088,
3784,
1769,
565,
775,
288,
1377,
10684,
67,
21224,
67,
2316,
12,
7473,
1769,
1377,
3065,
1098,
5621,
1377,
10684,
67,
21224,
67,
2316,
12,
706,
1769,
1377,
19656,
4709,
682,
5621,
1377,
1433,
67,
2
] |
v = (CSSPrimitiveValue)cssDecl.getPropertyCSSValueInternal (CSS_GLYPH_ORIENTATION_VERTICAL_PROPERTY); s = v.getCssText(); switch (s.charAt(0)) { case 'a':
|
val = CSSUtilities.getComputedStyle (element, SVGCSSEngine.GLYPH_ORIENTATION_VERTICAL_INDEX); switch (val.getPrimitiveType()) { case CSSPrimitiveValue.CSS_IDENT:
|
protected Map getAttributeMap(BridgeContext ctx, Element element, GraphicsNode node, TextPath textPath) { CSSOMReadOnlyStyleDeclaration cssDecl = CSSUtilities.getComputedStyle(element); UnitProcessor.Context uctx = UnitProcessor.createContext(ctx, element); Map result = new HashMap(); CSSPrimitiveValue v; String s; float f; short t; boolean verticalText = false; result.put(GVTAttributedCharacterIterator.TextAttribute.TEXT_COMPOUND_DELIMITER, element); if (element.getTagName().equals(SVG_ALT_GLYPH_TAG)) { result.put(GVTAttributedCharacterIterator.TextAttribute.ALT_GLYPH_HANDLER, new SVGAltGlyphHandler(ctx, element)); } if (textPath != null) { result.put(GVTAttributedCharacterIterator.TextAttribute.TEXTPATH, textPath); } // Text-anchor v = (CSSPrimitiveValue)cssDecl.getPropertyCSSValueInternal (CSS_TEXT_ANCHOR_PROPERTY); s = v.getStringValue(); TextNode.Anchor a; switch (s.charAt(0)) { case 's': a = TextNode.Anchor.START; break; case 'm': a = TextNode.Anchor.MIDDLE; break; default: a = TextNode.Anchor.END; } result.put(GVTAttributedCharacterIterator.TextAttribute.ANCHOR_TYPE, a); // Font size, in user space units. float fs = TextUtilities.convertFontSize(element, ctx, cssDecl, uctx); result.put(TextAttribute.SIZE, new Float(fs)); // Font weight // TODO: improve support for relative values // (e.g. "lighter", "bolder") v = (CSSPrimitiveValue)cssDecl.getPropertyCSSValueInternal (CSS_FONT_WEIGHT_PROPERTY); String fontWeightString; if (v.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) { fontWeightString = v.getStringValue(); //System.out.println("CSS Font Weight "+v.getStringValue()); if (v.getStringValue().charAt(0) == 'n') { result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_REGULAR); } else if (v.getStringValue().charAt(0) == 'l') { result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_LIGHT); } else { result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD); } } else { //System.out.println("CSS Font Weight "+v.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)); fontWeightString = "" + v.getFloatValue(CSSPrimitiveValue.CSS_NUMBER); switch ((int)v.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)) { case 100: result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_EXTRA_LIGHT); break; case 200: result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_LIGHT); break; case 300: result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_DEMILIGHT); break; case 400: result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_REGULAR); break; case 500: result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_SEMIBOLD); break; case 600: result.put(TextAttribute.WEIGHT, //TextAttribute.WEIGHT_DEMIBOLD); TextAttribute.WEIGHT_BOLD); break; case 700: result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD); break; case 800: result.put(TextAttribute.WEIGHT, //TextAttribute.WEIGHT_EXTRABOLD); TextAttribute.WEIGHT_BOLD); break; case 900: result.put(TextAttribute.WEIGHT, //TextAttribute.WEIGHT_ULTRABOLD); TextAttribute.WEIGHT_BOLD); } } // Font style v = (CSSPrimitiveValue)cssDecl.getPropertyCSSValueInternal (CSS_FONT_STYLE_PROPERTY); String fontStyleString = v.getStringValue(); switch (fontStyleString.charAt(0)) { case 'n': result.put(TextAttribute.POSTURE, TextAttribute.POSTURE_REGULAR); break; case 'o': case 'i': result.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); } // Font stretch v = (CSSPrimitiveValue)cssDecl.getPropertyCSSValueInternal (CSS_FONT_STRETCH_PROPERTY); String fontStretchString = v.getStringValue(); switch (fontStretchString.charAt(0)) { case 'u': if (fontStretchString.charAt(6) == 'c') { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_CONDENSED); } else { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_EXTENDED); } break; case 'e': if (fontStretchString.charAt(6) == 'c') { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_CONDENSED); } else { if (fontStretchString.length() == 8) { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_SEMI_EXTENDED); } else { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_EXTENDED); } } break; case 's': if (fontStretchString.charAt(6) == 'c') { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_SEMI_CONDENSED); } else { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_SEMI_EXTENDED); } break; default: result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_REGULAR); } // Font family CSSValueList ff = (CSSValueList)cssDecl.getPropertyCSSValueInternal (CSS_FONT_FAMILY_PROPERTY); // make a list of GVTFontFamily objects Vector fontFamilyList = new Vector(); for (int i = 0; i < ff.getLength(); i++) { v = (CSSPrimitiveValue)ff.item(i); String fontFamilyName = v.getStringValue(); GVTFontFamily fontFamily = SVGFontUtilities.getFontFamily(element, ctx, fontFamilyName, fontWeightString, fontStyleString); fontFamilyList.add(fontFamily); } result.put(GVTAttributedCharacterIterator.TextAttribute.GVT_FONT_FAMILIES, fontFamilyList); // Text baseline adjustment. v = (CSSPrimitiveValue)cssDecl.getPropertyCSSValueInternal (CSS_BASELINE_SHIFT_PROPERTY); if (v.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) { s = v.getStringValue(); //System.out.println("Baseline-shift: "+s); switch (s.charAt(2)) { case 'p': //suPerscript result.put(GVTAttributedCharacterIterator. TextAttribute.BASELINE_SHIFT, TextAttribute.SUPERSCRIPT_SUPER); break; case 'b': //suBscript result.put(GVTAttributedCharacterIterator. TextAttribute.BASELINE_SHIFT, TextAttribute.SUPERSCRIPT_SUB); break; case 's': //baSeline break; } } else if (v.getPrimitiveType() == CSSPrimitiveValue.CSS_PERCENTAGE) { f = v.getFloatValue(v.getPrimitiveType()); result.put(GVTAttributedCharacterIterator.TextAttribute.BASELINE_SHIFT, new Float(f*fs/100f)); } else { f = UnitProcessor.cssOtherLengthToUserSpace (v, CSS_BASELINE_SHIFT_PROPERTY, uctx); result.put(GVTAttributedCharacterIterator.TextAttribute.BASELINE_SHIFT, new Float(f)); } // Unicode-bidi mode v = (CSSPrimitiveValue)cssDecl.getPropertyCSSValueInternal (CSS_UNICODE_BIDI_PROPERTY); s = v.getStringValue(); if (s.charAt(0) == 'n') { result.put(TextAttribute.BIDI_EMBEDDING, new Integer(0)); } else { // Text direction // XXX: this needs to coordinate with the unicode-bidi // property, so that when an explicit reversal // occurs, the BIDI_EMBEDDING level is // appropriately incremented or decremented. // Note that direction is implicitly handled by unicode // BiDi algorithm in most cases, this property // is only needed when one wants to override the // normal writing direction for a string/substring. v = (CSSPrimitiveValue)cssDecl.getPropertyCSSValueInternal (CSS_DIRECTION_PROPERTY); String rs = v.getStringValue(); switch (rs.charAt(0)) { case 'l': result.put(TextAttribute.RUN_DIRECTION, TextAttribute.RUN_DIRECTION_LTR); switch (s.charAt(0)) { case 'b': // bidi-override result.put(TextAttribute.BIDI_EMBEDDING, new Integer(-2)); break; case 'e': // embed result.put(TextAttribute.BIDI_EMBEDDING, new Integer(2)); break; } break; case 'r': result.put(TextAttribute.RUN_DIRECTION, TextAttribute.RUN_DIRECTION_RTL); switch (s.charAt(0)) { case 'b': // bidi-override result.put(TextAttribute.BIDI_EMBEDDING, new Integer(-1)); break; case 'e': // embed result.put(TextAttribute.BIDI_EMBEDDING, new Integer(1)); break; } break; } } // Writing mode boolean horizontal = true; v = (CSSPrimitiveValue)cssDecl.getPropertyCSSValueInternal (CSS_WRITING_MODE_PROPERTY); s = v.getStringValue(); switch (s.charAt(0)) { case 'l': result.put(GVTAttributedCharacterIterator. TextAttribute.WRITING_MODE, GVTAttributedCharacterIterator. TextAttribute.WRITING_MODE_LTR); break; case 'r': result.put(GVTAttributedCharacterIterator. TextAttribute.WRITING_MODE, GVTAttributedCharacterIterator. TextAttribute.WRITING_MODE_RTL); break; case 't': result.put(GVTAttributedCharacterIterator. TextAttribute.WRITING_MODE, GVTAttributedCharacterIterator. TextAttribute.WRITING_MODE_TTB); horizontal = false; break; } // glyph-orientation-vertical v = (CSSPrimitiveValue)cssDecl.getPropertyCSSValueInternal (CSS_GLYPH_ORIENTATION_VERTICAL_PROPERTY); // why is it that getStringValue() throws an exception? s = v.getCssText(); switch (s.charAt(0)) { case 'a': result.put(GVTAttributedCharacterIterator. TextAttribute.VERTICAL_ORIENTATION, GVTAttributedCharacterIterator. TextAttribute.ORIENTATION_AUTO); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '.': result.put(GVTAttributedCharacterIterator. TextAttribute.VERTICAL_ORIENTATION, GVTAttributedCharacterIterator. TextAttribute.ORIENTATION_ANGLE); result.put(GVTAttributedCharacterIterator. TextAttribute.VERTICAL_ORIENTATION_ANGLE, new Float(s)); break; } // Font stretch v = (CSSPrimitiveValue)cssDecl.getPropertyCSSValueInternal (CSS_FONT_STRETCH_PROPERTY); s = v.getStringValue(); switch (s.charAt(0)) { case 'u': if (s.charAt(6) == 'c') { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_CONDENSED); } else { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_EXTENDED); } break; case 'e': if (s.charAt(6) == 'c') { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_CONDENSED); } else { if (s.length() == 8) { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_SEMI_EXTENDED); } else { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_EXTENDED); } } break; case 's': if (s.charAt(6) == 'c') { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_SEMI_CONDENSED); } else { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_SEMI_EXTENDED); } break; default: result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_REGULAR); } // text spacing properties... // Letter Spacing v = (CSSPrimitiveValue)cssDecl.getPropertyCSSValueInternal (CSS_LETTER_SPACING_PROPERTY); t = v.getPrimitiveType(); if (t != CSSPrimitiveValue.CSS_IDENT) { if (horizontal) { f = UnitProcessor.cssHorizontalCoordinateToUserSpace (v, CSS_LETTER_SPACING_PROPERTY, uctx); } else { f = UnitProcessor.cssVerticalCoordinateToUserSpace (v, CSS_LETTER_SPACING_PROPERTY, uctx); } result.put(GVTAttributedCharacterIterator. TextAttribute.LETTER_SPACING, new Float(f)); result.put(GVTAttributedCharacterIterator. TextAttribute.CUSTOM_SPACING, Boolean.TRUE); } // Word spacing v = (CSSPrimitiveValue)cssDecl.getPropertyCSSValueInternal (CSS_WORD_SPACING_PROPERTY); t = v.getPrimitiveType(); if (t != CSSPrimitiveValue.CSS_IDENT) { if (horizontal) { f = UnitProcessor.cssHorizontalCoordinateToUserSpace (v, CSS_WORD_SPACING_PROPERTY, uctx); } else { f = UnitProcessor.cssVerticalCoordinateToUserSpace (v, CSS_WORD_SPACING_PROPERTY, uctx); } result.put(GVTAttributedCharacterIterator.TextAttribute.WORD_SPACING, new Float(f)); result.put(GVTAttributedCharacterIterator. TextAttribute.CUSTOM_SPACING, Boolean.TRUE); } // Kerning s = element.getAttributeNS(null, SVG_KERNING_ATTRIBUTE); if (s.length() != 0) { if (horizontal) { f = UnitProcessor.svgHorizontalLengthToUserSpace (s, SVG_KERNING_ATTRIBUTE, uctx); } else { f = UnitProcessor.svgVerticalLengthToUserSpace (s, SVG_KERNING_ATTRIBUTE, uctx); } result.put(GVTAttributedCharacterIterator.TextAttribute.KERNING, new Float(f)); result.put(GVTAttributedCharacterIterator. TextAttribute.CUSTOM_SPACING, Boolean.TRUE); } // textLength s = element.getAttributeNS(null, SVG_TEXT_LENGTH_ATTRIBUTE); if (s.length() != 0) { if (horizontal) { f = UnitProcessor.svgHorizontalLengthToUserSpace (s, SVG_TEXT_LENGTH_ATTRIBUTE, uctx); } else { f = UnitProcessor.svgVerticalLengthToUserSpace (s, SVG_TEXT_LENGTH_ATTRIBUTE, uctx); } result.put(GVTAttributedCharacterIterator.TextAttribute.BBOX_WIDTH, new Float(f)); // lengthAdjust s = element.getAttributeNS(null, SVG_LENGTH_ADJUST_ATTRIBUTE); if (s.length() < 10) { result.put(GVTAttributedCharacterIterator. TextAttribute.LENGTH_ADJUST, GVTAttributedCharacterIterator.TextAttribute.ADJUST_SPACING); result.put(GVTAttributedCharacterIterator. TextAttribute.CUSTOM_SPACING, Boolean.TRUE); } else { result.put(GVTAttributedCharacterIterator. TextAttribute.LENGTH_ADJUST, GVTAttributedCharacterIterator.TextAttribute.ADJUST_ALL); } } return result; }
|
45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/0e8fac772791a058755ef5ad1de71c14544b11bb/SVGTextElementBridge.java/buggy/sources/org/apache/batik/bridge/SVGTextElementBridge.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1635,
4061,
863,
12,
13691,
1042,
1103,
16,
21394,
3010,
930,
16,
21394,
16830,
907,
756,
16,
21394,
3867,
743,
977,
743,
13,
288,
3639,
6765,
1872,
12066,
2885,
6094,
3747,
3456,
5411,
273,
6765,
11864,
18,
588,
17934,
2885,
12,
2956,
1769,
3639,
8380,
5164,
18,
1042,
582,
5900,
273,
8380,
5164,
18,
2640,
1042,
12,
5900,
16,
930,
1769,
3639,
1635,
563,
273,
394,
4317,
5621,
3639,
6765,
9840,
620,
331,
31,
3639,
514,
272,
31,
3639,
1431,
284,
31,
3639,
3025,
268,
31,
3639,
1250,
9768,
1528,
273,
629,
31,
3639,
563,
18,
458,
12,
25269,
56,
861,
11050,
7069,
3198,
18,
1528,
1499,
18,
5151,
67,
4208,
2419,
5240,
67,
19722,
16,
930,
1769,
3639,
309,
261,
2956,
18,
588,
8520,
7675,
14963,
12,
26531,
67,
18255,
67,
43,
7076,
8939,
67,
7927,
3719,
288,
5411,
563,
18,
458,
12,
25269,
56,
861,
11050,
7069,
3198,
18,
1528,
1499,
18,
18255,
67,
43,
7076,
8939,
67,
19937,
16,
15604,
394,
11281,
10655,
15141,
1503,
12,
5900,
16,
930,
10019,
3639,
289,
3639,
309,
261,
955,
743,
480,
446,
13,
288,
5411,
563,
18,
458,
12,
25269,
56,
861,
11050,
7069,
3198,
18,
1528,
1499,
18,
5151,
4211,
16,
977,
743,
1769,
3639,
289,
3639,
368,
3867,
17,
16215,
3639,
331,
273,
261,
10276,
9840,
620,
13,
5212,
3456,
18,
588,
1396,
10276,
620,
3061,
5411,
261,
10276,
67,
5151,
67,
20360,
916,
67,
9900,
1769,
3639,
272,
273,
331,
18,
588,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1635,
4061,
863,
12,
13691,
1042,
1103,
16,
21394,
3010,
930,
16,
21394,
16830,
907,
756,
16,
21394,
3867,
743,
977,
743,
13,
288,
3639,
6765,
1872,
12066,
2885,
6094,
3747,
3456,
5411,
273,
6765,
11864,
18,
588,
17934,
2885,
12,
2956,
1769,
3639,
8380,
5164,
18,
1042,
582,
5900,
273,
8380,
5164,
18,
2640,
1042,
12,
5900,
16,
930,
1769,
3639,
1635,
563,
273,
394,
4317,
5621,
3639,
6765,
9840,
620,
331,
31,
3639,
514,
272,
31,
3639,
1431,
284,
31,
3639,
3025,
268,
31,
3639,
1250,
9768,
1528,
273,
629,
31,
3639,
563,
18,
458,
12,
25269,
56,
861,
11050,
7069,
3198,
18,
1528,
1499,
18,
5151,
67,
4208,
2419,
5240,
67,
19722,
16,
930,
2
] |
this.baseName = baseName; }
|
this.baseName = baseName; }
|
public void setBaseName(String baseName) { this.baseName = baseName; }
|
5620 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5620/6cdb2be35ea94f551e78fb3c24c1dddc24f68216/ULocale.java/buggy/icu4j/src/com/ibm/icu/util/ULocale.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
26435,
461,
12,
780,
16162,
13,
288,
3639,
333,
18,
1969,
461,
273,
16162,
31,
1377,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
26435,
461,
12,
780,
16162,
13,
288,
3639,
333,
18,
1969,
461,
273,
16162,
31,
1377,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
((PeerNode)m.getSource()).sendAsync(DMT.createFNPRoutedRejected(id, (short)(htl-1)));
|
((PeerNode)m.getSource()).sendAsync(DMT.createFNPRoutedRejected(id, (short)(htl-1)), null);
|
boolean handleRouted(Message m) { Logger.minor(this, "handleRouted("+m+")"); if(m.getSource() != null && (!(m.getSource() instanceof PeerNode))) { Logger.error(this, "Routed message but source "+m.getSource()+" not a PeerNode!"); return true; } long id = m.getLong(DMT.UID); Long lid = new Long(id); PeerNode pn = (PeerNode) (m.getSource()); short htl = m.getShort(DMT.HTL); if(pn != null) htl = pn.decrementHTL(htl); RoutedContext ctx; ctx = (RoutedContext)routedContexts.get(lid); if(ctx != null) { try { ((PeerNode)m.getSource()).sendAsync(DMT.createFNPRoutedRejected(id, (short)(htl-1))); } catch (NotConnectedException e) { Logger.minor(this, "Lost connection rejecting "+m); } return true; } ctx = new RoutedContext(m); routedContexts.put(lid, ctx); // pn == null => originated locally, keep full htl double target = m.getDouble(DMT.TARGET_LOCATION); Logger.minor(this, "id "+id+" from "+pn+" htl "+htl+" target "+target); if(node.lm.getLocation().getValue() == target) { Logger.minor(this, "Dispatching "+m.getSpec()+" on "+node.portNumber); // Handle locally // Message type specific processing dispatchRoutedMessage(m, pn, id); return true; } else if(htl == 0) { Message reject = DMT.createFNPRoutedRejected(id, (short)0); if(pn != null) try { pn.sendAsync(reject); } catch (NotConnectedException e) { Logger.minor(this, "Lost connection rejecting "+m); } return true; } else { return forward(m, id, pn, htl, target, ctx); } }
|
50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/f48ad5c9057903788f63aaa8ccd26e567faf4317/NodeDispatcher.java/buggy/src/freenet/node/NodeDispatcher.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1250,
1640,
4583,
329,
12,
1079,
312,
13,
288,
3639,
4242,
18,
17364,
12,
2211,
16,
315,
4110,
4583,
329,
2932,
15,
81,
9078,
2225,
1769,
3639,
309,
12,
81,
18,
588,
1830,
1435,
480,
446,
597,
16051,
12,
81,
18,
588,
1830,
1435,
1276,
10669,
907,
20349,
288,
5411,
4242,
18,
1636,
12,
2211,
16,
315,
4583,
329,
883,
1496,
1084,
13773,
81,
18,
588,
1830,
1435,
9078,
486,
279,
10669,
907,
4442,
1769,
5411,
327,
638,
31,
3639,
289,
3639,
1525,
612,
273,
312,
18,
588,
3708,
12,
40,
6152,
18,
3060,
1769,
3639,
3407,
328,
350,
273,
394,
3407,
12,
350,
1769,
3639,
10669,
907,
11059,
273,
261,
6813,
907,
13,
261,
81,
18,
588,
1830,
10663,
3639,
3025,
366,
6172,
273,
312,
18,
588,
4897,
12,
40,
6152,
18,
5062,
48,
1769,
3639,
309,
12,
7449,
480,
446,
13,
366,
6172,
273,
11059,
18,
323,
3702,
5062,
48,
12,
647,
80,
1769,
3639,
7271,
329,
1042,
1103,
31,
3639,
1103,
273,
261,
4583,
329,
1042,
13,
303,
4817,
15518,
18,
588,
12,
80,
350,
1769,
3639,
309,
12,
5900,
480,
446,
13,
288,
5411,
775,
288,
7734,
14015,
6813,
907,
13,
81,
18,
588,
1830,
1435,
2934,
4661,
2771,
12,
40,
6152,
18,
2640,
19793,
52,
4583,
329,
19902,
12,
350,
16,
261,
6620,
21433,
647,
80,
17,
21,
13,
3631,
446,
1769,
5411,
289,
1044,
261,
1248,
8932,
503,
425,
13,
288,
7734,
4242,
18,
17364,
12,
2211,
16,
315,
19024,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1250,
1640,
4583,
329,
12,
1079,
312,
13,
288,
3639,
4242,
18,
17364,
12,
2211,
16,
315,
4110,
4583,
329,
2932,
15,
81,
9078,
2225,
1769,
3639,
309,
12,
81,
18,
588,
1830,
1435,
480,
446,
597,
16051,
12,
81,
18,
588,
1830,
1435,
1276,
10669,
907,
20349,
288,
5411,
4242,
18,
1636,
12,
2211,
16,
315,
4583,
329,
883,
1496,
1084,
13773,
81,
18,
588,
1830,
1435,
9078,
486,
279,
10669,
907,
4442,
1769,
5411,
327,
638,
31,
3639,
289,
3639,
1525,
612,
273,
312,
18,
588,
3708,
12,
40,
6152,
18,
3060,
1769,
3639,
3407,
328,
350,
273,
394,
3407,
12,
350,
1769,
3639,
10669,
907,
11059,
273,
261,
6813,
907,
13,
261,
81,
18,
588,
2
] |
}
|
public static String resolveToURL(Context context, String handle) throws SQLException { TableRow dbhandle = findHandleInternal(context, handle); if (dbhandle == null) return null; int handletypeid = dbhandle.getIntColumn("resource_type_id"); if (handletypeid == Constants.ITEM) { String prefix = ConfigurationManager.getProperty("dspace.url"); String url = prefix + "/item/" + handle; if (log.isDebugEnabled()) log.debug("Resolved " + handle + " to " + url); return url; } if (handletypeid == Constants.COLLECTION) { String prefix = ConfigurationManager.getProperty("dspace.url"); String url = prefix + "/collection/" + handle; if (log.isDebugEnabled()) log.debug("Resolved " + handle + " to " + url); return url; } if (handletypeid == Constants.COMMUNITY) { String prefix = ConfigurationManager.getProperty("dspace.url"); String url = prefix + "/community/" + handle; if (log.isDebugEnabled()) log.debug("Resolved " + handle + " to " + url); return url; } throw new IllegalArgumentException("Unsupported handle type" + Constants.typetext[handletypeid]); }
|
52457 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52457/688ba352821e16d14790347ffe795de02ec3144e/HandleManager.java/clean/dspace/src/org/dspace/handle/HandleManager.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
289,
225,
289,
225,
289,
225,
289,
225,
1071,
97,
225,
760,
97,
225,
514,
97,
225,
2245,
774,
1785,
12,
1042,
97,
225,
819,
29531,
225,
514,
97,
225,
1640,
16869,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
1216,
97,
225,
6483,
97,
225,
289,
225,
289,
225,
289,
225,
2618,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
3555,
1999,
97,
225,
1319,
4110,
97,
225,
273,
97,
225,
1104,
3259,
3061,
12,
2472,
29531,
225,
1640,
1769,
97,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
309,
97,
225,
261,
1966,
4110,
97,
225,
422,
97,
225,
446,
16869,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
327,
97,
225,
446,
31,
97,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
509,
97,
225,
948,
1810,
388,
350,
97,
225,
273,
97,
225,
1319,
4110,
18,
588,
1702,
1494,
2932,
3146,
67,
723,
67,
350,
8863,
97,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
309,
97,
225,
261,
2349,
1810,
388,
350,
97,
225,
422,
97,
225,
5245,
18,
12674,
16869,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
2618,
225,
289,
225,
289,
225,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
289,
225,
289,
225,
289,
225,
289,
225,
1071,
97,
225,
760,
97,
225,
514,
97,
225,
2245,
774,
1785,
12,
1042,
97,
225,
819,
29531,
225,
514,
97,
225,
1640,
16869,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
1216,
97,
225,
6483,
97,
225,
289,
225,
289,
225,
289,
225,
2618,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
3555,
1999,
97,
225,
1319,
4110,
97,
225,
273,
97,
225,
1104,
3259,
3061,
12,
2472,
29531,
225,
1640,
1769,
97,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
289,
225,
309,
97,
225,
261,
1966,
4110,
97,
225,
2
] |
|
public synchronized void createApplet() {
|
void createApplet() {
|
public synchronized void createApplet() { panel = new KJASAppletPanel( appletSize ); add( "Center", panel ); pack(); setVisible(true); loader.addStatusListener(panel); runThread = new Thread ( new Runnable() { public void run() { //this order is very important and took a long time //to figure out- don't modify it unless there are //real bug fixes // till 2002 09 18 // commented out the synchronized block because // it leads to a deadlock of the JVM with // j2re 1.4.1 //synchronized( me ) { active = true; try { appletClass = loader.loadClass( className ); } catch (Exception e) { Main.kjas_err("Class could not be loaded: " + className, e); } if( appletClass == null ) { Main.info( "Could not load applet class " + className); panel.showFailed(); return; } try { synchronized (appletClass) { Main.debug("Applet " + appletName + " id=" + appletID + " instantiating..."); app = (Applet) appletClass.newInstance(); Main.debug("Applet " + appletName + " id=" + appletID + " instantiated."); } app.setStub( me ); } catch( InstantiationException e ) { Main.kjas_err( "Could not instantiate applet", e ); panel.showFailed(); return; } catch( IllegalAccessException e ) { Main.kjas_err( "Could not instantiate applet", e ); panel.showFailed(); return; } //} // synchronized app.setVisible(false); Main.debug("panel.add( \"Center\", app );"); panel.setApplet( app ); Main.debug("app.setSize(appletSize);"); app.setSize(appletSize); context.showStatus("Initializing Applet " + appletName + " ..."); Main.debug("Applet " + appletName + " id=" + appletID + " initializing..."); try { app.init(); } catch (Error e) { Main.info("Error " + e.toString() + " during applet initialization"); e.printStackTrace(); return; } loader.removeStatusListener(panel); app.setVisible(true); Main.debug("Applet " + appletName + " id=" + appletID + " initialized."); Main.debug("app.setSize(appletSize);"); app.setSize(appletSize); app.validate(); Main.debug("app.setVisible(true);"); app.setVisible(true); Main.debug("panel.setVisible(true);"); panel.setVisible(true); Main.debug("setVisible(true);"); setVisible(true); //repaint(1L); //panel.repaint(1L); //--Main.debug("app.repaint(1L);"); app.repaint(0L); context.showStatus("Starting Applet " + appletName + " ..."); // create a new thread, so we know, when the applet was started Main.debug("Applet " + appletName + " id=" + appletID + " starting..."); Thread appletThread = new KJASAppletThread(app, "KJAS-Applet-" + appletID + "-" + appletName); panel.stopAnimation(); appletThread.start(); Main.debug("Applet " + appletName + " id=" + appletID + " started."); context.showStatus("Applet " + appletName + " started."); //setVisible(true); } } , "KJAS-AppletStub-" + appletID + "-" + appletName); runThread.setContextClassLoader(loader); runThread.start(); }
|
45545 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45545/3ea62068168d1d5e148e98e6c40ca7f4f9a004b0/KJASAppletStub.java/clean/khtml/java/org/kde/kjas/server/KJASAppletStub.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
752,
23696,
1435,
288,
3639,
6594,
273,
394,
1475,
46,
3033,
23696,
5537,
12,
21853,
1225,
11272,
3639,
527,
12,
315,
8449,
3113,
6594,
11272,
3639,
2298,
5621,
3639,
16697,
12,
3767,
1769,
3639,
4088,
18,
1289,
1482,
2223,
12,
13916,
1769,
3639,
1086,
3830,
273,
394,
4884,
3639,
261,
3639,
394,
10254,
1435,
288,
5411,
1071,
918,
1086,
1435,
288,
7734,
368,
2211,
1353,
353,
8572,
10802,
471,
23151,
279,
1525,
813,
7734,
368,
869,
7837,
596,
17,
2727,
1404,
5612,
518,
3308,
1915,
854,
7734,
368,
7688,
7934,
24436,
27573,
368,
21364,
4044,
22,
21058,
6549,
7734,
368,
31813,
596,
326,
3852,
1203,
2724,
7734,
368,
518,
5871,
87,
358,
279,
8363,
739,
434,
326,
14131,
598,
7734,
368,
525,
22,
266,
404,
18,
24,
18,
21,
7734,
368,
22043,
12,
1791,
262,
288,
10792,
2695,
273,
638,
31,
10792,
775,
288,
13491,
21853,
797,
273,
4088,
18,
945,
797,
12,
2658,
11272,
10792,
289,
1044,
261,
503,
425,
13,
288,
13491,
12740,
18,
79,
78,
345,
67,
370,
2932,
797,
3377,
486,
506,
4203,
30,
315,
397,
2658,
16,
425,
1769,
10792,
289,
10792,
309,
12,
21853,
797,
422,
446,
262,
288,
13491,
12740,
18,
1376,
12,
315,
4445,
486,
1262,
21853,
667,
315,
397,
2658,
1769,
13491,
6594,
18,
4500,
2925,
5621,
13491,
327,
31,
10792,
289,
4766,
565,
775,
288,
13491,
3852,
261,
438,
1469,
797,
13,
288,
18701,
12740,
18,
4148,
2932,
23696,
315,
397,
21853,
461,
397,
315,
2
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
752,
23696,
1435,
288,
3639,
6594,
273,
394,
1475,
46,
3033,
23696,
5537,
12,
21853,
1225,
11272,
3639,
527,
12,
315,
8449,
3113,
6594,
11272,
3639,
2298,
5621,
3639,
16697,
12,
3767,
1769,
3639,
4088,
18,
1289,
1482,
2223,
12,
13916,
1769,
3639,
1086,
3830,
273,
394,
4884,
3639,
261,
3639,
394,
10254,
1435,
288,
5411,
1071,
918,
1086,
1435,
288,
7734,
368,
2211,
1353,
353,
8572,
10802,
471,
23151,
279,
1525,
813,
7734,
368,
869,
7837,
596,
17,
2727,
1404,
5612,
518,
3308,
1915,
854,
7734,
368,
7688,
7934,
24436,
27573,
368,
21364,
4044,
22,
21058,
6549,
7734,
368,
31813,
596,
326,
3852,
1203,
2724,
7734,
368,
518,
5871,
87,
358,
279,
8363,
739,
434,
326,
2
] |
scOA.computeTicks(ids, la, axOverlay.getLabelPosition(), aax.getOrientation(), dStart, dEnd, false, null);
|
scOA.computeTicks(ids, la, axOverlay.getLabelPosition(), aax.getOrientation(), dStart, dEnd, false, null);
|
private final void updateOverlayAxes(AllAxes aax) throws DataFormatException, GenerationException, UnexpectedInputException { int iDirection = (aax.getOrientation() == HORIZONTAL) ? 1 : -1; final Axis[] axa = cwa.getPrimaryBaseAxes(); final Axis axPrimaryBase = axa[0]; // NOTE: FOR REL 1 AXIS RENDERS, WE // SUPPORT A SINGLE PRIMARY BASE AXIS // ONLY final Axis[] axaOverlayOrthogonal = cwa.getOrthogonalAxes(axPrimaryBase, false); OneAxis axOverlay, axPrimary = aax.getPrimaryOrthogonal(); AutoScale scOA, sc = axPrimary.getScale(); double dMaxSS = Math.max(sc.getStartShift(), aax.getMaxStartShift()); double dMaxES = Math.max(sc.getEndShift(), aax.getMaxEndShift()); double dStart, dEnd; Object[] oaMinMax; FontDefinition fd = null; Object oaData; int iAxisType = (aax.getOverlayCount() > 0) ? aax.getOverlay(0).getScale().getType() : 0; Label la; for (int i = 0; i < aax.getOverlayCount(); i++) { axOverlay = aax.getOverlay(i); la = axOverlay.getLabel(); fd = la.getCaption().getFont(); scOA = axOverlay.getScale(); scOA.setEndPoints(scOA.getStart() - scOA.getStartShift() * iDirection, scOA.getEnd() + scOA.getEndShift() * iDirection); /* * dStart = scOA.getStart() + dMaxSS * iDirection; dEnd = scOA.getEnd() - dMaxES * iDirection; */ dStart = sc.getStart(); dEnd = sc.getEnd(); scOA.setEndPoints(dStart, dEnd); scOA.computeTicks(ids, la, axOverlay.getLabelPosition(), aax.getOrientation(), dStart, dEnd, false, null); if (!scOA.isStepFixed()) { oaMinMax = scOA.getMinMax(); while (!scOA.checkFit(ids, la, axOverlay.getLabelPosition())) { scOA.zoomOut(); scOA.updateAxisMinMax(oaMinMax[0], oaMinMax[1]); scOA.computeTicks(ids, la, axOverlay.getLabelPosition(), aax.getOrientation(), dStart, dEnd, false, null); } } // SETUP THE FULL DATASET FOR THE PRIMARY ORTHOGONAL AXIS scOA.setData(getTypedDataSet(axaOverlayOrthogonal[i], iAxisType, 0)); } /* * if (aax.areAxesSwapped()) { final AutoScale scPrimaryHorizontal = aax.getPrimaryOrthogonal().getScale(); * scPrimaryHorizontal.setEndPoints( scPrimaryHorizontal.getStart() + scPrimaryHorizontal.getEndShift(), * scPrimaryHorizontal.getEnd() - scPrimaryHorizontal.getStartShift() ); } else { final AutoScale * scPrimaryHorizontal = aax.getPrimaryBase().getScale(); scPrimaryHorizontal.setEndPoints( * scPrimaryHorizontal.getStart() + scPrimaryHorizontal.getEndShift(), scPrimaryHorizontal.getEnd() - * scPrimaryHorizontal.getStartShift() ); } */ }
|
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/PlotWith2DAxes.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/withaxes/PlotWith2DAxes.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
727,
918,
1089,
11627,
26494,
12,
1595,
26494,
279,
651,
13,
1216,
1910,
9291,
16,
23234,
503,
16,
3639,
9649,
20518,
565,
288,
3639,
509,
277,
8212,
273,
261,
69,
651,
18,
588,
14097,
1435,
422,
24606,
13,
692,
404,
294,
300,
21,
31,
3639,
727,
15509,
8526,
1740,
69,
273,
14098,
69,
18,
588,
6793,
2171,
26494,
5621,
3639,
727,
15509,
1740,
6793,
2171,
273,
1740,
69,
63,
20,
15533,
368,
5219,
30,
12108,
15375,
404,
29539,
5127,
28332,
55,
16,
13880,
3639,
368,
16459,
6354,
432,
15915,
20058,
10250,
29539,
5127,
3639,
368,
20747,
3639,
727,
15509,
8526,
1740,
69,
11627,
1162,
451,
28396,
273,
14098,
69,
18,
588,
1162,
451,
28396,
26494,
12,
651,
6793,
2171,
16,
629,
1769,
3639,
6942,
6558,
1740,
11627,
16,
1740,
6793,
273,
279,
651,
18,
588,
6793,
1162,
451,
28396,
5621,
3639,
8064,
5587,
888,
28202,
16,
888,
273,
1740,
6793,
18,
588,
5587,
5621,
3639,
1645,
302,
2747,
1260,
273,
2361,
18,
1896,
12,
1017,
18,
588,
1685,
10544,
9334,
279,
651,
18,
588,
2747,
1685,
10544,
10663,
3639,
1645,
302,
2747,
3991,
273,
2361,
18,
1896,
12,
1017,
18,
588,
1638,
10544,
9334,
279,
651,
18,
588,
2747,
1638,
10544,
10663,
3639,
1645,
302,
1685,
16,
302,
1638,
31,
3639,
1033,
8526,
320,
69,
17454,
31,
3639,
10063,
1852,
5194,
273,
446,
31,
3639,
1033,
320,
69,
751,
31,
3639,
509,
277,
6558,
559,
273,
261,
69,
651,
18,
588,
11627,
1380,
1435,
405,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
727,
918,
1089,
11627,
26494,
12,
1595,
26494,
279,
651,
13,
1216,
1910,
9291,
16,
23234,
503,
16,
3639,
9649,
20518,
565,
288,
3639,
509,
277,
8212,
273,
261,
69,
651,
18,
588,
14097,
1435,
422,
24606,
13,
692,
404,
294,
300,
21,
31,
3639,
727,
15509,
8526,
1740,
69,
273,
14098,
69,
18,
588,
6793,
2171,
26494,
5621,
3639,
727,
15509,
1740,
6793,
2171,
273,
1740,
69,
63,
20,
15533,
368,
5219,
30,
12108,
15375,
404,
29539,
5127,
28332,
55,
16,
13880,
3639,
368,
16459,
6354,
432,
15915,
20058,
10250,
29539,
5127,
3639,
368,
20747,
3639,
727,
15509,
8526,
1740,
69,
11627,
1162,
451,
28396,
273,
14098,
69,
18,
588,
1162,
451,
28396,
26494,
12,
651,
2
] |
public void initialize(Scheduler scheduler, SchedulingContext schedCtxt) throws SchedulerConfigException;
|
void initialize(Scheduler scheduler, SchedulingContext schedCtxt) throws SchedulerConfigException;
|
public void initialize(Scheduler scheduler, SchedulingContext schedCtxt) throws SchedulerConfigException;
|
3431 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3431/0ca5d7d851637eb8695746dba9608de14253a225/JobRunShellFactory.java/buggy/src/java/org/quartz/core/JobRunShellFactory.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4046,
12,
11870,
8129,
16,
348,
13252,
1042,
23964,
28866,
13,
5411,
1216,
12620,
18625,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
4046,
12,
11870,
8129,
16,
348,
13252,
1042,
23964,
28866,
13,
5411,
1216,
12620,
18625,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
boolean superclasses = TypeConversionUtil.stringToBoolean(attributes.getProperty("superclasses"), false); boolean sort = TypeConversionUtil.stringToBoolean(attributes.getProperty("sort"), true);
|
boolean superclasses = TypeConversionUtil.stringToBoolean(attributes.getProperty("superclasses"), false); boolean sort = TypeConversionUtil.stringToBoolean(attributes.getProperty("sort"), true);
|
protected void forAllMembersEx(XClass currentClass, String template, Properties attributes, int forType, String prefix) throws XDocletException { boolean superclasses = TypeConversionUtil.stringToBoolean(attributes.getProperty("superclasses"), false); boolean sort = TypeConversionUtil.stringToBoolean(attributes.getProperty("sort"), true); Collection members = null; switch (forType) { case FOR_METHOD: members = currentClass.getMethods(superclasses); break; default: throw new XDocletException("Bad type: " + forType); } if (sort) { // sort fields, but we should make a copy first, because members is // not a new copy, it's shared by all List sortedMembers = new ArrayList(members); members = sortedMembers; } for (Iterator j = members.iterator(); j.hasNext();) { XMember member = (XMember) j.next(); switch (forType) { case FOR_METHOD: setCurrentMethod((XMethod) member); break; default: throw new XDocletException("Bad type: " + forType); } XMethod getter = (XMethod) member; if (super.isGetterMethod(getter)) { Properties pro = new Properties(); //iterate through sub-components only pro.setProperty("tagName", "hibernate.component"); if (super.hasTag(pro, FOR_METHOD)) { Type type = getter.getReturnType(); String temp = prefix + ("get" + type.getType().getName() + "Form()."); forAllMembersEx(type.getType(), template, attributes, forType, temp); } setCurrentClass(member.getContainingClass()); curprefix = prefix; generate(template); } } setCurrentClass(currentClass); }
|
30015 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/30015/32bd04120f5991d105083dd6dd3fad977b746b6d/MethodExTagsHandler.java/buggy/extras/appgen/src/org/example/antbook/xdoclet/MethodExTagsHandler.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
364,
1595,
6918,
424,
12,
60,
797,
28742,
16,
514,
1542,
16,
4766,
282,
6183,
1677,
16,
509,
364,
559,
16,
4766,
282,
514,
1633,
13,
1216,
1139,
1759,
1810,
503,
288,
3639,
1250,
2240,
4701,
273,
5411,
1412,
6814,
1304,
18,
1080,
774,
5507,
12,
4350,
18,
588,
1396,
2932,
9565,
4701,
6,
3631,
4766,
9079,
629,
1769,
3639,
1250,
1524,
273,
5411,
1412,
6814,
1304,
18,
1080,
774,
5507,
12,
4350,
18,
588,
1396,
2932,
3804,
6,
3631,
4766,
9079,
638,
1769,
3639,
2200,
4833,
273,
446,
31,
3639,
1620,
261,
1884,
559,
13,
288,
5411,
648,
12108,
67,
5327,
30,
7734,
4833,
273,
28742,
18,
588,
4712,
12,
9565,
4701,
1769,
7734,
898,
31,
5411,
805,
30,
7734,
604,
394,
1139,
1759,
1810,
503,
2932,
6434,
618,
30,
315,
397,
364,
559,
1769,
3639,
289,
3639,
309,
261,
3804,
13,
288,
5411,
368,
1524,
1466,
16,
1496,
732,
1410,
1221,
279,
1610,
1122,
16,
2724,
4833,
353,
5411,
368,
486,
279,
394,
1610,
16,
518,
1807,
5116,
635,
777,
5411,
987,
3115,
6918,
273,
394,
2407,
12,
7640,
1769,
5411,
4833,
273,
3115,
6918,
31,
3639,
289,
3639,
364,
261,
3198,
525,
273,
4833,
18,
9838,
5621,
525,
18,
5332,
2134,
5621,
13,
288,
5411,
1139,
4419,
3140,
273,
261,
60,
4419,
13,
525,
18,
4285,
5621,
5411,
1620,
261,
1884,
559,
13,
288,
7734,
648,
12108,
67,
5327,
30,
10792,
12589,
1305,
12443,
60,
1305,
13,
3140,
1769,
10792,
898,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
364,
1595,
6918,
424,
12,
60,
797,
28742,
16,
514,
1542,
16,
4766,
282,
6183,
1677,
16,
509,
364,
559,
16,
4766,
282,
514,
1633,
13,
1216,
1139,
1759,
1810,
503,
288,
3639,
1250,
2240,
4701,
273,
5411,
1412,
6814,
1304,
18,
1080,
774,
5507,
12,
4350,
18,
588,
1396,
2932,
9565,
4701,
6,
3631,
4766,
9079,
629,
1769,
3639,
1250,
1524,
273,
5411,
1412,
6814,
1304,
18,
1080,
774,
5507,
12,
4350,
18,
588,
1396,
2932,
3804,
6,
3631,
4766,
9079,
638,
1769,
3639,
2200,
4833,
273,
446,
31,
3639,
1620,
261,
1884,
559,
13,
288,
5411,
648,
12108,
67,
5327,
30,
7734,
4833,
273,
28742,
18,
588,
4712,
12,
9565,
4701,
1769,
7734,
898,
2
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.