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
|
|---|---|---|---|---|---|---|
ImageCacheValue imageCacheValue1 = imageCache .getDisabledImage(imageDescriptor1); ImageCacheValue imageCacheValue2 = imageCache .getDisabledImage(imageDescriptor2);
|
ImageCacheValue imageCacheValue1 = imageCache .getDisabledImage(imageDescriptor1); ImageCacheValue imageCacheValue2 = imageCache .getDisabledImage(imageDescriptor2);
|
public void testGetDisabledImageForSameDescriptor() { ImageDescriptor imageDescriptor1 = getImageDescriptor(imageName); ImageDescriptor imageDescriptor2 = getImageDescriptor(imageName); ImageCacheValue imageCacheValue1 = imageCache .getDisabledImage(imageDescriptor1); ImageCacheValue imageCacheValue2 = imageCache .getDisabledImage(imageDescriptor2); Image image1 = imageCache.getDisabledImage(imageDescriptor1).getImage(); Image image2 = imageCache.getDisabledImage(imageDescriptor2).getImage(); assertSame(imageCacheValue1.getImage(), imageCacheValue2.getImage()); assertSame(imageCacheValue1.getImageDescriptor(), imageCacheValue2 .getImageDescriptor()); }
|
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/c7a7ac8adf47655ae8f464f116999526a88cb658/ImageCacheTest.java/buggy/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/images/ImageCacheTest.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
967,
8853,
2040,
1290,
8650,
3187,
1435,
288,
202,
202,
2040,
3187,
1316,
3187,
21,
273,
10567,
3187,
12,
2730,
461,
1769,
202,
202,
2040,
3187,
1316,
3187,
22,
273,
10567,
3187,
12,
2730,
461,
1769,
202,
202,
2040,
1649,
620,
1316,
1649,
620,
21,
273,
1316,
1649,
9506,
202,
18,
588,
8853,
2040,
12,
2730,
3187,
21,
1769,
202,
202,
2040,
1649,
620,
1316,
1649,
620,
22,
273,
1316,
1649,
9506,
202,
18,
588,
8853,
2040,
12,
2730,
3187,
22,
1769,
202,
202,
2040,
1316,
21,
273,
1316,
1649,
18,
588,
8853,
2040,
12,
2730,
3187,
21,
2934,
588,
2040,
5621,
202,
202,
2040,
1316,
22,
273,
1316,
1649,
18,
588,
8853,
2040,
12,
2730,
3187,
22,
2934,
588,
2040,
5621,
202,
202,
11231,
8650,
12,
2730,
1649,
620,
21,
18,
588,
2040,
9334,
1316,
1649,
620,
22,
18,
588,
2040,
10663,
202,
202,
11231,
8650,
12,
2730,
1649,
620,
21,
18,
588,
2040,
3187,
9334,
1316,
1649,
620,
22,
9506,
202,
18,
588,
2040,
3187,
10663,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
967,
8853,
2040,
1290,
8650,
3187,
1435,
288,
202,
202,
2040,
3187,
1316,
3187,
21,
273,
10567,
3187,
12,
2730,
461,
1769,
202,
202,
2040,
3187,
1316,
3187,
22,
273,
10567,
3187,
12,
2730,
461,
1769,
202,
202,
2040,
1649,
620,
1316,
1649,
620,
21,
273,
1316,
1649,
9506,
202,
18,
588,
8853,
2040,
12,
2730,
3187,
21,
1769,
202,
202,
2040,
1649,
620,
1316,
1649,
620,
22,
273,
1316,
1649,
9506,
202,
18,
588,
8853,
2040,
12,
2730,
3187,
22,
1769,
202,
202,
2040,
1316,
21,
273,
1316,
1649,
18,
588,
8853,
2040,
12,
2730,
3187,
21,
2934,
588,
2040,
5621,
202,
202,
2040,
1316,
22,
273,
1316,
1649,
18,
588,
8853,
2040,
2
] |
Rectangle rv = new Rectangle(); getBounds(rv); YAMM.setProperty("writex", new Integer(rv.x).toString()); YAMM.setProperty("writey", new Integer(rv.y).toString()); YAMM.setProperty("writew", new Integer(rv.width).toString()); YAMM.setProperty("writeh", new Integer(rv.height).toString()); dispose();
|
quit();
|
public void windowClosing(WindowEvent event) { Rectangle rv = new Rectangle(); getBounds(rv); YAMM.setProperty("writex", new Integer(rv.x).toString()); YAMM.setProperty("writey", new Integer(rv.y).toString()); YAMM.setProperty("writew", new Integer(rv.width).toString()); YAMM.setProperty("writeh", new Integer(rv.height).toString()); dispose(); }
|
3248 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3248/883da8c8ecd4bb6545bac82e2c13fa7ca21ded2d/YAMMWrite.java/clean/YAMMWrite.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
2742,
15745,
12,
3829,
1133,
871,
13,
288,
1082,
202,
19463,
5633,
273,
394,
13264,
5621,
1082,
202,
588,
5694,
12,
4962,
1769,
1082,
202,
61,
2192,
49,
18,
542,
1396,
2932,
5363,
338,
3113,
9506,
202,
2704,
2144,
12,
4962,
18,
92,
2934,
10492,
10663,
1082,
202,
61,
2192,
49,
18,
542,
1396,
2932,
5363,
402,
3113,
9506,
202,
2704,
2144,
12,
4962,
18,
93,
2934,
10492,
10663,
1082,
202,
61,
2192,
49,
18,
542,
1396,
2932,
5363,
359,
3113,
9506,
202,
2704,
2144,
12,
4962,
18,
2819,
2934,
10492,
10663,
1082,
202,
61,
2192,
49,
18,
542,
1396,
2932,
2626,
76,
3113,
9506,
202,
2704,
2144,
12,
4962,
18,
4210,
2934,
10492,
10663,
1082,
202,
2251,
4150,
5621,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
2742,
15745,
12,
3829,
1133,
871,
13,
288,
1082,
202,
19463,
5633,
273,
394,
13264,
5621,
1082,
202,
588,
5694,
12,
4962,
1769,
1082,
202,
61,
2192,
49,
18,
542,
1396,
2932,
5363,
338,
3113,
9506,
202,
2704,
2144,
12,
4962,
18,
92,
2934,
10492,
10663,
1082,
202,
61,
2192,
49,
18,
542,
1396,
2932,
5363,
402,
3113,
9506,
202,
2704,
2144,
12,
4962,
18,
93,
2934,
10492,
10663,
1082,
202,
61,
2192,
49,
18,
542,
1396,
2932,
5363,
359,
3113,
9506,
202,
2704,
2144,
12,
4962,
18,
2819,
2934,
10492,
10663,
1082,
202,
61,
2192,
49,
18,
542,
1396,
2932,
2626,
76,
3113,
9506,
202,
2704,
2144,
12,
4962,
18,
4210,
2934,
10492,
10663,
2
] |
myConsumer_ = StructuredProxyPushConsumerHelper.narrow(supplierAdmin.obtain_notification_push_consumer(ClientType.STRUCTURED_EVENT, myConsumerId_));
|
myConsumer_ = StructuredProxyPushConsumerHelper.narrow(supplierAdmin.obtain_notification_push_consumer(ClientType.STRUCTURED_EVENT, myConsumerId_));
|
public Dispatcher(ORB orb, WhiteBoard master, SupplierAdmin supplierAdmin) throws AdminLimitExceeded { master_ = master; orb_ = orb; myConsumer_ = StructuredProxyPushConsumerHelper.narrow(supplierAdmin.obtain_notification_push_consumer(ClientType.STRUCTURED_EVENT, myConsumerId_)); connected_ = tryConnect(); }
|
46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/71eff46281211f1bff50767ad57311e85483cc45/WhiteBoard.java/clean/demo/notification/whiteboard/WhiteBoard.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
16710,
12,
916,
38,
16823,
16,
30233,
22233,
4171,
16,
17216,
4446,
17402,
4446,
13,
1216,
7807,
3039,
10069,
288,
202,
7525,
67,
273,
4171,
31,
202,
16640,
67,
273,
16823,
31,
202,
4811,
5869,
67,
273,
7362,
2862,
3886,
7621,
5869,
2276,
18,
82,
7815,
12,
2859,
5742,
4446,
18,
947,
5977,
67,
9927,
67,
6206,
67,
13230,
12,
1227,
559,
18,
13915,
4830,
40,
67,
10454,
16,
3399,
5869,
548,
67,
10019,
202,
8537,
67,
273,
775,
5215,
5621,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
16710,
12,
916,
38,
16823,
16,
30233,
22233,
4171,
16,
17216,
4446,
17402,
4446,
13,
1216,
7807,
3039,
10069,
288,
202,
7525,
67,
273,
4171,
31,
202,
16640,
67,
273,
16823,
31,
202,
4811,
5869,
67,
273,
7362,
2862,
3886,
7621,
5869,
2276,
18,
82,
7815,
12,
2859,
5742,
4446,
18,
947,
5977,
67,
9927,
67,
6206,
67,
13230,
12,
1227,
559,
18,
13915,
4830,
40,
67,
10454,
16,
3399,
5869,
548,
67,
10019,
202,
8537,
67,
273,
775,
5215,
5621,
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
] |
int escapeVal = 0;
|
escapeVal = 0;
|
public int getToken() throws IOException { int c; tokenno++; // Check for pushed-back token if (this.pushbackToken != EOF) { int result = this.pushbackToken; this.pushbackToken = EOF; return result; } // Eat whitespace, possibly sensitive to newlines. for (;;) { c = getChar(); if (c == EOF_CHAR) { return EOF; } else if (c == '\n') { flags &= ~TSF_DIRTYLINE; if ((flags & TSF_NEWLINES) != 0) { break; } } else if (!isJSSpace(c)) { if (c != '-') { flags |= TSF_DIRTYLINE; } break; } } // identifier/keyword/instanceof? // watch out for starting with a <backslash> boolean identifierStart; boolean isUnicodeEscapeStart = false; if (c == '\\') { c = getChar(); if (c == 'u') { identifierStart = true; isUnicodeEscapeStart = true; stringBufferTop = 0; } else { identifierStart = false; ungetChar(c); c = '\\'; } } else { identifierStart = Character.isJavaIdentifierStart((char)c); if (identifierStart) { stringBufferTop = 0; addToString(c); } } if (identifierStart) { boolean containsEscape = isUnicodeEscapeStart; for (;;) { if (isUnicodeEscapeStart) { // strictly speaking we should probably push-back // all the bad characters if the <backslash>uXXXX // sequence is malformed. But since there isn't a // correct context(is there?) for a bad Unicode // escape sequence in an identifier, we can report // an error here. int escapeVal = 0; for (int i = 0; i != 4; ++i) { c = getChar(); escapeVal = (escapeVal << 4) | xDigitToInt(c); // Next check takes care about c < 0 and bad escape if (escapeVal < 0) { break; } } if (escapeVal < 0) { reportSyntaxError("msg.invalid.escape", null); return ERROR; } addToString(escapeVal); isUnicodeEscapeStart = false; } else { c = getChar(); if (c == '\\') { c = getChar(); if (c == 'u') { isUnicodeEscapeStart = true; containsEscape = true; } else { reportSyntaxError("msg.illegal.character", null); return ERROR; } } else { if (c == EOF_CHAR || !Character.isJavaIdentifierPart((char)c)) { break; } addToString(c); } } } ungetChar(c); String str = getStringFromBuffer(); if (!containsEscape) { // OPT we shouldn't have to make a string (object!) to // check if it's a keyword. // Return the corresponding token if it's a keyword int result = stringToKeyword(str); if (result != EOF) { if (result != RESERVED) { return result; } else if (!Context.getContext().hasFeature( Context.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER)) { return result; } else { // If implementation permits to use future reserved // keywords in violation with the EcmaScript standard, // treat it as name but issue warning Object[] errArgs = { str }; reportSyntaxWarning("msg.reserved.keyword", errArgs); } } } this.string = (String)allStrings.intern(str); return NAME; } // is it a number? if (isDigit(c) || (c == '.' && isDigit(peekChar()))) { stringBufferTop = 0; int base = 10; if (c == '0') { c = getChar(); if (c == 'x' || c == 'X') { base = 16; c = getChar(); } else if (isDigit(c)) { base = 8; } else { addToString('0'); } } if (base == 16) { while (0 <= xDigitToInt(c)) { addToString(c); c = getChar(); } } else { while ('0' <= c && c <= '9') { /* * We permit 08 and 09 as decimal numbers, which * makes our behavior a superset of the ECMA * numeric grammar. We might not always be so * permissive, so we warn about it. */ if (base == 8 && c >= '8') { Object[] errArgs = { c == '8' ? "8" : "9" }; reportSyntaxWarning("msg.bad.octal.literal", errArgs); base = 10; } addToString(c); c = getChar(); } } boolean isInteger = true; if (base == 10 && (c == '.' || c == 'e' || c == 'E')) { isInteger = false; if (c == '.') { do { addToString(c); c = getChar(); } while (isDigit(c)); } if (c == 'e' || c == 'E') { addToString(c); c = getChar(); if (c == '+' || c == '-') { addToString(c); c = getChar(); } if (!isDigit(c)) { reportSyntaxError("msg.missing.exponent", null); return ERROR; } do { addToString(c); c = getChar(); } while (isDigit(c)); } } ungetChar(c); String numString = getStringFromBuffer(); double dval; if (base == 10 && !isInteger) { try { // Use Java conversion to number from string... dval = (Double.valueOf(numString)).doubleValue(); } catch (NumberFormatException ex) { Object[] errArgs = { ex.getMessage() }; reportSyntaxError("msg.caught.nfe", errArgs); return ERROR; } } else { dval = ScriptRuntime.stringToNumber(numString, 0, base); } this.number = dval; return NUMBER; } // is it a string? if (c == '"' || c == '\'') { // We attempt to accumulate a string the fast way, by // building it directly out of the reader. But if there // are any escaped characters in the string, we revert to // building it out of a StringBuffer. int quoteChar = c; int val = 0; stringBufferTop = 0; c = getChar(); strLoop: while (c != quoteChar) { if (c == '\n' || c == EOF_CHAR) { ungetChar(c); reportSyntaxError("msg.unterminated.string.lit", null); return ERROR; } if (c == '\\') { // We've hit an escaped character c = getChar(); switch (c) { case 'b': c = '\b'; break; case 'f': c = '\f'; break; case 'n': c = '\n'; break; case 'r': c = '\r'; break; case 't': c = '\t'; break; // \v a late addition to the ECMA spec, // it is not in Java, so use 0xb case 'v': c = 0xb; break; case 'u': { /* * Get 4 hex digits; if the u escape is not * followed by 4 hex digits, use 'u' + the literal * character sequence that follows. */ int escapeStart = stringBufferTop; addToString('u'); int escapeVal = 0; for (int i = 0; i != 4; ++i) { c = getChar(); escapeVal = (escapeVal << 4) | xDigitToInt(c); if (escapeVal < 0) { continue strLoop; } addToString(c); } // prepare for replace of stored 'u' sequence // by escape value stringBufferTop = escapeStart; c = escapeVal; } break; case 'x': { /* Get 2 hex digits, defaulting to 'x' + literal * sequence, as above. */ c = getChar(); int escapeVal = xDigitToInt(c); if (escapeVal < 0) { addToString('x'); continue strLoop; } else { int c1 = c; c = getChar(); escapeVal = (escapeVal << 4) | xDigitToInt(c); if (escapeVal < 0) { addToString('x'); addToString(c1); continue strLoop; } else { // got 2 hex digits c = escapeVal; } } } break; default: if ('0' <= c && c < '8') { val = c - '0'; c = getChar(); if ('0' <= c && c < '8') { val = 8 * val + c - '0'; c = getChar(); if ('0' <= c && c < '8' && val <= 037) { // c is 3rd char of octal sequence only if // the resulting val <= 0377 val = 8 * val + c - '0'; c = getChar(); } } ungetChar(c); c = val; } } } addToString(c); c = getChar(); } String str = getStringFromBuffer(); this.string = (String)allStrings.intern(str); return STRING; } switch (c) { case '\n': return EOL; case ';': return SEMI; case '[': return LB; case ']': return RB; case '{': return LC; case '}': return RC; case '(': return LP; case ')': return RP; case ',': return COMMA; case '?': return HOOK; case ':': return COLON; case '.': return DOT; case '|': if (matchChar('|')) { return OR; } else if (matchChar('=')) { this.op = BITOR; return ASSIGN; } else { return BITOR; } case '^': if (matchChar('=')) { this.op = BITXOR; return ASSIGN; } else { return BITXOR; } case '&': if (matchChar('&')) { return AND; } else if (matchChar('=')) { this.op = BITAND; return ASSIGN; } else { return BITAND; } case '=': if (matchChar('=')) { if (matchChar('=')) this.op = SHEQ; else this.op = EQ; return EQOP; } else { this.op = NOP; return ASSIGN; } case '!': if (matchChar('=')) { if (matchChar('=')) this.op = SHNE; else this.op = NE; return EQOP; } else { this.op = NOT; return UNARYOP; } case '<': /* NB:treat HTML begin-comment as comment-till-eol */ if (matchChar('!')) { if (matchChar('-')) { if (matchChar('-')) { skipLine(); return getToken(); // in place of 'goto retry' } ungetChar('-'); } ungetChar('!'); } if (matchChar('<')) { if (matchChar('=')) { this.op = LSH; return ASSIGN; } else { this.op = LSH; return SHOP; } } else { if (matchChar('=')) { this.op = LE; return RELOP; } else { this.op = LT; return RELOP; } } case '>': if (matchChar('>')) { if (matchChar('>')) { if (matchChar('=')) { this.op = URSH; return ASSIGN; } else { this.op = URSH; return SHOP; } } else { if (matchChar('=')) { this.op = RSH; return ASSIGN; } else { this.op = RSH; return SHOP; } } } else { if (matchChar('=')) { this.op = GE; return RELOP; } else { this.op = GT; return RELOP; } } case '*': if (matchChar('=')) { this.op = MUL; return ASSIGN; } else { return MUL; } case '/': // is it a // comment? if (matchChar('/')) { skipLine(); return getToken(); } if (matchChar('*')) { while ((c = getChar()) != -1 && !(c == '*' && matchChar('/'))) { ; // empty loop body } if (c == EOF_CHAR) { reportSyntaxError("msg.unterminated.comment", null); return ERROR; } return getToken(); // `goto retry' } // is it a regexp? if ((flags & TSF_REGEXP) != 0) { stringBufferTop = 0; while ((c = getChar()) != '/') { if (c == '\n' || c == EOF_CHAR) { ungetChar(c); reportSyntaxError("msg.unterminated.re.lit", null); return ERROR; } if (c == '\\') { addToString(c); c = getChar(); } addToString(c); } int reEnd = stringBufferTop; while (true) { if (matchChar('g')) addToString('g'); else if (matchChar('i')) addToString('i'); else if (matchChar('m')) addToString('m'); else break; } if (isAlpha(peekChar())) { reportSyntaxError("msg.invalid.re.flag", null); return ERROR; } this.string = new String(stringBuffer, 0, reEnd); this.regExpFlags = new String(stringBuffer, reEnd, stringBufferTop - reEnd); return REGEXP; } if (matchChar('=')) { this.op = DIV; return ASSIGN; } else { return DIV; } case '%': this.op = MOD; if (matchChar('=')) { return ASSIGN; } else { return MOD; } case '~': this.op = BITNOT; return UNARYOP; case '+': if (matchChar('=')) { this.op = ADD; return ASSIGN; } else if (matchChar('+')) { return INC; } else { return ADD; } case '-': if (matchChar('=')) { this.op = SUB; c = ASSIGN; } else if (matchChar('-')) { if (0 == (flags & TSF_DIRTYLINE)) { // treat HTML end-comment after possible whitespace // after line start as comment-utill-eol if (matchChar('>')) { skipLine(); return getToken(); } } c = DEC; } else { c = SUB; } flags |= TSF_DIRTYLINE; return c; default: reportSyntaxError("msg.illegal.character", null); return ERROR; } }
|
12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/b1de655726ffc5e0dce2133a442d2908e9efa092/TokenStream.java/clean/js/rhino/src/org/mozilla/javascript/TokenStream.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
9162,
1435,
1216,
1860,
288,
3639,
509,
276,
31,
3639,
1147,
2135,
9904,
31,
3639,
368,
2073,
364,
18543,
17,
823,
1147,
3639,
309,
261,
2211,
18,
6206,
823,
1345,
480,
6431,
13,
288,
5411,
509,
563,
273,
333,
18,
6206,
823,
1345,
31,
5411,
333,
18,
6206,
823,
1345,
273,
6431,
31,
5411,
327,
563,
31,
3639,
289,
3639,
368,
512,
270,
7983,
16,
10016,
16692,
358,
19181,
18,
3639,
364,
261,
25708,
13,
288,
5411,
276,
273,
23577,
5621,
5411,
309,
261,
71,
422,
6431,
67,
7305,
13,
288,
7734,
327,
6431,
31,
5411,
289,
469,
309,
261,
71,
422,
2337,
82,
6134,
288,
7734,
2943,
12058,
4871,
8047,
42,
67,
4537,
5538,
5997,
31,
7734,
309,
14015,
7133,
473,
15508,
42,
67,
12917,
5997,
55,
13,
480,
374,
13,
288,
10792,
898,
31,
7734,
289,
5411,
289,
469,
309,
16051,
291,
46,
1260,
909,
12,
71,
3719,
288,
7734,
309,
261,
71,
480,
4014,
13,
288,
10792,
2943,
5626,
15508,
42,
67,
4537,
5538,
5997,
31,
7734,
289,
7734,
898,
31,
5411,
289,
3639,
289,
3639,
368,
2756,
19,
11041,
19,
1336,
792,
35,
3639,
368,
4267,
596,
364,
5023,
598,
279,
411,
823,
12877,
34,
3639,
1250,
2756,
1685,
31,
3639,
1250,
353,
16532,
8448,
1685,
273,
629,
31,
3639,
309,
261,
71,
422,
5282,
13,
288,
5411,
276,
273,
23577,
5621,
5411,
309,
261,
71,
422,
296,
89,
6134,
288,
7734,
2756,
1685,
273,
638,
31,
7734,
353,
16532,
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,
509,
9162,
1435,
1216,
1860,
288,
3639,
509,
276,
31,
3639,
1147,
2135,
9904,
31,
3639,
368,
2073,
364,
18543,
17,
823,
1147,
3639,
309,
261,
2211,
18,
6206,
823,
1345,
480,
6431,
13,
288,
5411,
509,
563,
273,
333,
18,
6206,
823,
1345,
31,
5411,
333,
18,
6206,
823,
1345,
273,
6431,
31,
5411,
327,
563,
31,
3639,
289,
3639,
368,
512,
270,
7983,
16,
10016,
16692,
358,
19181,
18,
3639,
364,
261,
25708,
13,
288,
5411,
276,
273,
23577,
5621,
5411,
309,
261,
71,
422,
6431,
67,
7305,
13,
288,
7734,
327,
6431,
31,
5411,
289,
469,
309,
261,
71,
422,
2337,
82,
6134,
288,
7734,
2943,
12058,
4871,
8047,
42,
67,
4537,
5538,
5997,
2
] |
case ACL.GRANTEE_COS: return mGrantee.equals(getId(acct.getCOS())); case ACL.GRANTEE_DOMAIN: return mGrantee.equals(getId(acct.getDomain()));
|
case ACL.GRANTEE_COS: return mGrantee.equals(getId(prov.getCOS(acct))); case ACL.GRANTEE_DOMAIN: return mGrantee.equals(getId(prov.getDomain(acct)));
|
private boolean matches(Account acct) throws ServiceException { if (acct == null) return mType == ACL.GRANTEE_PUBLIC; switch (mType) { case ACL.GRANTEE_PUBLIC: return true; case ACL.GRANTEE_AUTHUSER: return !acct.equals(ANONYMOUS_ACCT); case ACL.GRANTEE_COS: return mGrantee.equals(getId(acct.getCOS())); case ACL.GRANTEE_DOMAIN: return mGrantee.equals(getId(acct.getDomain())); case ACL.GRANTEE_GROUP: return acct.inDistributionList(mGrantee); case ACL.GRANTEE_USER: return mGrantee.equals(acct.getId()); default: throw ServiceException.FAILURE("unknown ACL grantee type: " + mType, null); } }
|
6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/ea36adae065acdef10efff9efe3ff866b9cf7d77/ACL.java/clean/ZimbraServer/src/java/com/zimbra/cs/mailbox/ACL.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
1250,
1885,
12,
3032,
20774,
13,
1216,
16489,
288,
5411,
309,
261,
1077,
299,
422,
446,
13,
7734,
327,
312,
559,
422,
10098,
18,
6997,
1258,
1448,
41,
67,
14939,
31,
5411,
1620,
261,
81,
559,
13,
288,
7734,
648,
10098,
18,
6997,
1258,
1448,
41,
67,
14939,
30,
282,
327,
638,
31,
7734,
648,
10098,
18,
6997,
1258,
1448,
41,
67,
7131,
4714,
30,
327,
401,
1077,
299,
18,
14963,
12,
1258,
673,
61,
5980,
3378,
67,
2226,
1268,
1769,
7734,
648,
10098,
18,
6997,
1258,
1448,
41,
67,
3865,
55,
30,
1377,
327,
312,
43,
2450,
22579,
18,
14963,
12,
26321,
12,
1077,
299,
18,
588,
3865,
55,
1435,
10019,
7734,
648,
10098,
18,
6997,
1258,
1448,
41,
67,
18192,
30,
282,
327,
312,
43,
2450,
22579,
18,
14963,
12,
26321,
12,
1077,
299,
18,
588,
3748,
1435,
10019,
7734,
648,
10098,
18,
6997,
1258,
1448,
41,
67,
8468,
30,
565,
327,
20774,
18,
267,
9003,
682,
12,
81,
43,
2450,
22579,
1769,
7734,
648,
10098,
18,
6997,
1258,
1448,
41,
67,
4714,
30,
377,
327,
312,
43,
2450,
22579,
18,
14963,
12,
1077,
299,
18,
26321,
10663,
7734,
805,
30,
225,
604,
16489,
18,
17623,
2932,
8172,
10098,
15889,
22579,
618,
30,
315,
397,
312,
559,
16,
446,
1769,
5411,
289,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
540,
3238,
1250,
1885,
12,
3032,
20774,
13,
1216,
16489,
288,
5411,
309,
261,
1077,
299,
422,
446,
13,
7734,
327,
312,
559,
422,
10098,
18,
6997,
1258,
1448,
41,
67,
14939,
31,
5411,
1620,
261,
81,
559,
13,
288,
7734,
648,
10098,
18,
6997,
1258,
1448,
41,
67,
14939,
30,
282,
327,
638,
31,
7734,
648,
10098,
18,
6997,
1258,
1448,
41,
67,
7131,
4714,
30,
327,
401,
1077,
299,
18,
14963,
12,
1258,
673,
61,
5980,
3378,
67,
2226,
1268,
1769,
7734,
648,
10098,
18,
6997,
1258,
1448,
41,
67,
3865,
55,
30,
1377,
327,
312,
43,
2450,
22579,
18,
14963,
12,
26321,
12,
1077,
299,
18,
588,
3865,
55,
1435,
10019,
7734,
648,
10098,
18,
6997,
2
] |
public static boolean closeInternalFrame(JInternalFrame w) { // grab a copy of the document ref OutlinerDocument doc = (OutlinerDocument) w; // we may have to send messages String msg = null; // if the document is modified .... if (doc.isModified()) { // if it's untitled, do a Save As ... if (doc.getFileName().equals("")) { if (doc.tree.isDocumentEmpty() && doc.getUndoQueue().isEmpty()) { // Do Nothing since it doesn't look like the user has touched the document. } else { // set up dialog msg = GUITreeLoader.reg.getText("error_window_monitor_untitled_save_changes"); msg = Replace.replace(msg,GUITreeComponentRegistry.PLACEHOLDER_1, doc.getTitle()); // run dialog int result = JOptionPane.showConfirmDialog(doc, msg); // deal with dialog results if (result == JOptionPane.YES_OPTION) { SaveAsFileMenuItem.saveAsOutlinerDocument(doc, Outliner.fileProtocolManager.getDefault()); } else if (result == JOptionPane.NO_OPTION) { // Do Nothing } else if (result == JOptionPane.CANCEL_OPTION) { return false; } } // else if it's not imported, do a Save } else if (! doc.getDocumentInfo().isImported()) { // set up dialog msg = GUITreeLoader.reg.getText("error_window_monitor_untitled_save_changes"); msg = Replace.replace(msg,GUITreeComponentRegistry.PLACEHOLDER_1, doc.getFileName()); // run dialog int result = JOptionPane.showConfirmDialog(doc, msg); // deal with dialog results if (result == JOptionPane.YES_OPTION) { SaveFileMenuItem item = (SaveFileMenuItem) GUITreeLoader.reg.get(GUITreeComponentRegistry.SAVE_MENU_ITEM); item.saveOutlinerDocument(doc); } else if (result == JOptionPane.NO_OPTION) { // Do Nothing } else if (result == JOptionPane.CANCEL_OPTION) { return false; } // else it IS imported, do a Save As } else { // set up dialog msg = GUITreeLoader.reg.getText("error_window_monitor_untitled_save_changes"); msg = Replace.replace(msg,GUITreeComponentRegistry.PLACEHOLDER_1, doc.getFileName()); // run dialog int result = JOptionPane.showConfirmDialog(doc, msg); // deal with dialog results if (result == JOptionPane.YES_OPTION) { SaveAsFileMenuItem.saveAsOutlinerDocument(doc, Outliner.fileProtocolManager.getProtocol(doc.getDocumentInfo().getProtocolName())); } else if (result == JOptionPane.NO_OPTION) { // Do Nothing } else if (result == JOptionPane.CANCEL_OPTION) { return false; } } } // Record current state into DocumentInfo in the RecentFileList if we can DocumentInfo docInfo = RecentFilesList.getDocumentInfo(doc.getFileName()); if (docInfo != null) { docInfo.recordWindowPositioning(doc); } // Hide the document doc.setVisible(false); // Remove the document. Outliner.documents.removeDocument(doc); // Explicitly Destroy since Swing has problems letting go. // Seems to make a difference when we also use -Xincgc. Ginsu.sliceAndDice(doc); return true; }
|
49473 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49473/521b0c8f5404c23578997f9cac8c5f923304fcf1/OutlinerWindowMonitor.java/buggy/outliner/src/com/organic/maynard/outliner/OutlinerWindowMonitor.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
1746,
3061,
3219,
12,
46,
3061,
3219,
341,
13,
288,
9506,
202,
759,
11086,
279,
1610,
434,
326,
1668,
1278,
202,
202,
1182,
7511,
264,
2519,
997,
273,
261,
1182,
7511,
264,
2519,
13,
341,
31,
9506,
202,
759,
732,
2026,
1240,
358,
1366,
2743,
202,
202,
780,
1234,
273,
446,
31,
9506,
202,
759,
309,
326,
1668,
353,
4358,
1372,
18,
202,
202,
430,
261,
2434,
18,
291,
4575,
10756,
288,
25083,
202,
759,
309,
518,
1807,
640,
88,
305,
1259,
16,
741,
279,
7074,
2970,
1372,
1082,
202,
430,
261,
2434,
18,
588,
4771,
7675,
14963,
2932,
6,
3719,
288,
9506,
202,
430,
261,
2434,
18,
3413,
18,
291,
2519,
1921,
1435,
597,
997,
18,
588,
31224,
3183,
7675,
291,
1921,
10756,
288,
6862,
202,
759,
2256,
13389,
3241,
518,
3302,
1404,
2324,
3007,
326,
729,
711,
358,
19370,
326,
1668,
18,
9506,
202,
97,
469,
288,
6862,
202,
759,
444,
731,
6176,
6862,
202,
3576,
273,
611,
57,
1285,
992,
2886,
18,
1574,
18,
588,
1528,
2932,
1636,
67,
5668,
67,
10259,
67,
10032,
305,
1259,
67,
5688,
67,
6329,
8863,
6862,
202,
3576,
273,
6910,
18,
2079,
12,
3576,
16,
30673,
1285,
992,
1841,
4243,
18,
12134,
21424,
67,
21,
16,
997,
18,
588,
4247,
10663,
6862,
25083,
202,
759,
1086,
6176,
6862,
202,
474,
563,
273,
804,
1895,
8485,
18,
4500,
11269,
6353,
12,
2434,
16,
1234,
1769,
6862,
25083,
202,
759,
10490,
598,
6176,
1686,
6862,
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,
1250,
1746,
3061,
3219,
12,
46,
3061,
3219,
341,
13,
288,
9506,
202,
759,
11086,
279,
1610,
434,
326,
1668,
1278,
202,
202,
1182,
7511,
264,
2519,
997,
273,
261,
1182,
7511,
264,
2519,
13,
341,
31,
9506,
202,
759,
732,
2026,
1240,
358,
1366,
2743,
202,
202,
780,
1234,
273,
446,
31,
9506,
202,
759,
309,
326,
1668,
353,
4358,
1372,
18,
202,
202,
430,
261,
2434,
18,
291,
4575,
10756,
288,
25083,
202,
759,
309,
518,
1807,
640,
88,
305,
1259,
16,
741,
279,
7074,
2970,
1372,
1082,
202,
430,
261,
2434,
18,
588,
4771,
7675,
14963,
2932,
6,
3719,
288,
9506,
202,
430,
261,
2434,
18,
3413,
18,
291,
2519,
1921,
1435,
2
] |
||
| SWT.READ_ONLY, clrCurrent, false, false );
|
| SWT.READ_ONLY, getContext( ), clrCurrent, false, false );
|
public void placeComponents( Composite parent ) { lblAxis = new Label( parent, SWT.NONE ); { lblAxis.setText( axisName ); lblAxis.setForeground( Display.getDefault( ) .getSystemColor( SWT.COLOR_DARK_BLUE ) ); lblAxis.addMouseListener( this ); lblAxis.addMouseTrackListener( this ); } btnVisible = new Button( parent, SWT.CHECK ); { GridData gd = new GridData( ); gd.horizontalAlignment = SWT.CENTER; btnVisible.setLayoutData( gd ); btnVisible.addSelectionListener( this ); btnVisible.setSelection( axis.getLineAttributes( ).isVisible( ) ); } cmbTypes = new Combo( parent, SWT.DROP_DOWN | SWT.READ_ONLY ); { GridData gd = new GridData( ); gd.horizontalAlignment = SWT.CENTER; cmbTypes.setLayoutData( gd ); NameSet ns = LiteralHelper.axisTypeSet; cmbTypes.setItems( ns.getDisplayNames( ) ); cmbTypes.select( ns.getSafeNameIndex( axis.getType( ).getName( ) ) ); cmbTypes.addSelectionListener( this ); } ColorDefinition clrCurrent = null; if ( axis.eIsSet( ComponentPackage.eINSTANCE.getAxis_LineAttributes( ) ) ) { clrCurrent = axis.getLineAttributes( ).getColor( ); } cmbColor = new FillChooserComposite( parent, SWT.DROP_DOWN | SWT.READ_ONLY, clrCurrent, false, false ); { GridData gd = new GridData( ); gd.widthHint = 200; cmbColor.setLayoutData( gd ); cmbColor.addListener( this ); } if ( ChartUIUtil.is3DType( getChart( ) ) ) { iscRotation = new IntegerSpinControl( parent, SWT.NONE, (int) getAxisAngle( angleType ) ); { GridData gd = new GridData( GridData.FILL_HORIZONTAL ); gd.heightHint = iscRotation.getPreferredSize( ).y; iscRotation.setLayoutData( gd ); iscRotation.setMaximum( 360 ); iscRotation.setMinimum( -360 ); iscRotation.addListener( this ); } } }
|
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/9d8486a7f0171324b11e48825eceffef31458cf9/AxisSheetImpl.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/format/axis/AxisSheetImpl.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
3166,
7171,
12,
14728,
982,
262,
202,
202,
95,
1082,
202,
31885,
6558,
273,
394,
5287,
12,
982,
16,
348,
8588,
18,
9826,
11272,
1082,
202,
95,
9506,
202,
31885,
6558,
18,
542,
1528,
12,
2654,
461,
11272,
9506,
202,
31885,
6558,
18,
542,
23206,
12,
9311,
18,
588,
1868,
12,
262,
25083,
202,
18,
588,
3163,
2957,
12,
348,
8588,
18,
10989,
67,
40,
9584,
67,
14618,
1821,
262,
11272,
9506,
202,
31885,
6558,
18,
1289,
9186,
2223,
12,
333,
11272,
9506,
202,
31885,
6558,
18,
1289,
9186,
4402,
2223,
12,
333,
11272,
1082,
202,
97,
1082,
202,
11898,
6207,
273,
394,
12569,
12,
982,
16,
348,
8588,
18,
10687,
11272,
1082,
202,
95,
9506,
202,
6313,
751,
15551,
273,
394,
7145,
751,
12,
11272,
9506,
202,
19016,
18,
18396,
11535,
273,
348,
8588,
18,
19835,
31,
9506,
202,
11898,
6207,
18,
542,
3744,
751,
12,
15551,
11272,
9506,
202,
11898,
6207,
18,
1289,
6233,
2223,
12,
333,
11272,
9506,
202,
11898,
6207,
18,
542,
6233,
12,
2654,
18,
588,
1670,
2498,
12,
262,
18,
291,
6207,
12,
262,
11272,
1082,
202,
97,
1082,
202,
71,
1627,
2016,
273,
394,
1286,
1075,
12,
982,
16,
348,
8588,
18,
18768,
67,
12711,
571,
348,
8588,
18,
6949,
67,
10857,
11272,
1082,
202,
95,
9506,
202,
6313,
751,
15551,
273,
394,
7145,
751,
12,
11272,
9506,
202,
19016,
18,
18396,
11535,
273,
348,
8588,
18,
19835,
31,
9506,
202,
71,
1627,
2016,
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,
3196,
202,
482,
918,
3166,
7171,
12,
14728,
982,
262,
202,
202,
95,
1082,
202,
31885,
6558,
273,
394,
5287,
12,
982,
16,
348,
8588,
18,
9826,
11272,
1082,
202,
95,
9506,
202,
31885,
6558,
18,
542,
1528,
12,
2654,
461,
11272,
9506,
202,
31885,
6558,
18,
542,
23206,
12,
9311,
18,
588,
1868,
12,
262,
25083,
202,
18,
588,
3163,
2957,
12,
348,
8588,
18,
10989,
67,
40,
9584,
67,
14618,
1821,
262,
11272,
9506,
202,
31885,
6558,
18,
1289,
9186,
2223,
12,
333,
11272,
9506,
202,
31885,
6558,
18,
1289,
9186,
4402,
2223,
12,
333,
11272,
1082,
202,
97,
1082,
202,
11898,
6207,
273,
394,
12569,
12,
982,
16,
348,
8588,
18,
10687,
11272,
1082,
202,
95,
2
] |
void removeStatement(JtdsStatement statement) throws SQLException { // Remove the JtdsStatement synchronized (statements) { for (int i = 0; i < statements.size(); i++) { WeakReference wr = (WeakReference) statements.get(i); if (wr != null) { Statement stmt = (Statement) wr.get(); if (stmt != null && stmt == statement) { statements.set(i, null); } } } } if (statement instanceof JtdsPreparedStatement) { // Clean up the prepared statement cache Collection handles = statementCache.getObsoleteHandles( ((JtdsPreparedStatement) statement).handles); if (handles != null) { StringBuffer cleanupSql = new StringBuffer(handles.size() * 15); for (Iterator iterator = handles.iterator(); iterator.hasNext(); ) { String handle = iterator.next().toString(); // FIXME - Add support for sp_cursorunprepare if (TdsCore.isPreparedProcedureName(handle)) { cleanupSql.append("EXEC sp_unprepare "); } else { cleanupSql.append("DROP PROC "); } cleanupSql.append(handle); cleanupSql.append('\n'); } baseTds.executeSQL(cleanupSql.toString(), null, null, true, 0, -1); baseTds.clearResponseQueue(); } } }
|
439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/feadc930c36b180a3fa2cc423b6474f399f6befc/ConnectionJDBC2.java/buggy/trunk/jtds/src/main/net/sourceforge/jtds/jdbc/ConnectionJDBC2.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1206,
3406,
12,
46,
88,
2377,
3406,
3021,
13,
1216,
6483,
288,
3639,
368,
3581,
326,
804,
88,
2377,
3406,
3639,
3852,
261,
18393,
13,
288,
5411,
364,
261,
474,
277,
273,
374,
31,
277,
411,
6317,
18,
1467,
5621,
277,
27245,
288,
7734,
23632,
2404,
12408,
273,
261,
3218,
581,
2404,
13,
6317,
18,
588,
12,
77,
1769,
7734,
309,
261,
91,
86,
480,
446,
13,
288,
10792,
8056,
3480,
273,
261,
3406,
13,
12408,
18,
588,
5621,
10792,
309,
261,
10589,
480,
446,
597,
3480,
422,
3021,
13,
288,
13491,
6317,
18,
542,
12,
77,
16,
446,
1769,
10792,
289,
7734,
289,
5411,
289,
3639,
289,
3639,
309,
261,
11516,
1276,
804,
88,
2377,
29325,
13,
288,
5411,
368,
9645,
731,
326,
8208,
3021,
1247,
5411,
2200,
7372,
273,
3021,
1649,
18,
588,
27637,
19513,
8788,
12,
10792,
14015,
46,
88,
2377,
29325,
13,
3021,
2934,
24111,
1769,
5411,
309,
261,
24111,
480,
446,
13,
288,
7734,
6674,
6686,
5101,
273,
394,
6674,
12,
24111,
18,
1467,
1435,
380,
4711,
1769,
7734,
364,
261,
3198,
2775,
273,
7372,
18,
9838,
5621,
2775,
18,
5332,
2134,
5621,
262,
288,
10792,
514,
1640,
273,
2775,
18,
4285,
7675,
10492,
5621,
10792,
368,
9852,
300,
1436,
2865,
364,
1694,
67,
9216,
318,
9366,
10792,
309,
261,
56,
2377,
4670,
18,
291,
15464,
17213,
461,
12,
4110,
3719,
288,
13491,
6686,
5101,
18,
6923,
2932,
15271,
1694,
67,
318,
9366,
315,
1769,
10792,
289,
469,
288,
13491,
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,
1206,
3406,
12,
46,
88,
2377,
3406,
3021,
13,
1216,
6483,
288,
3639,
368,
3581,
326,
804,
88,
2377,
3406,
3639,
3852,
261,
18393,
13,
288,
5411,
364,
261,
474,
277,
273,
374,
31,
277,
411,
6317,
18,
1467,
5621,
277,
27245,
288,
7734,
23632,
2404,
12408,
273,
261,
3218,
581,
2404,
13,
6317,
18,
588,
12,
77,
1769,
7734,
309,
261,
91,
86,
480,
446,
13,
288,
10792,
8056,
3480,
273,
261,
3406,
13,
12408,
18,
588,
5621,
10792,
309,
261,
10589,
480,
446,
597,
3480,
422,
3021,
13,
288,
13491,
6317,
18,
542,
12,
77,
16,
446,
1769,
10792,
289,
7734,
289,
5411,
289,
3639,
289,
3639,
309,
261,
11516,
1276,
804,
88,
2377,
29325,
2
] |
||
public BlockReservation testAndSetBlock(long blockNr) throws IOException{
|
public BlockReservation testAndSetBlock(long blockNr) throws IOException {
|
public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is not a data block but a filesystem * metadata block, as the beginning of each block group is filesystem * metadata: * superblock copy (if present) * block bitmap * inode bitmap * inode table * Free blocks begin after the inode table. */ long iNodeTableBlock = groupDescriptors[group].getInodeTable(); long firstNonMetadataBlock = iNodeTableBlock + INodeTable.getSizeInBlocks(this); if(blockNr<firstNonMetadataBlock) return new BlockReservation(false, -1, -1); //synchronize to the blockCache to avoid flushing the block between reading it //and synchronizing to it synchronized(blockCache) { byte[] bitmap= getBlock(groupDescriptors[group].getBlockBitmap()); synchronized( bitmap) { BlockReservation result = BlockBitmap.testAndSetBlock( bitmap, index ); //update the block bitmap if(result.isSuccessful()) { writeBlock(groupDescriptors[group].getBlockBitmap(), bitmap, false); modifyFreeBlocksCount(group, -1-result.getPreallocCount()); //result.setBlock( result.getBlock()+superblock.getFirstDataBlock() ); result.setBlock(blockNr); } return result; } } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4fe0410e3d1e4dea160852289195cd6981c0f456/Ext2FileSystem.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3914,
18074,
1842,
13152,
1768,
12,
5748,
1203,
18726,
13,
1216,
1860,
95,
202,
202,
430,
12,
2629,
18726,
32,
9565,
2629,
18,
588,
3759,
751,
1768,
1435,
747,
1203,
18726,
34,
33,
9565,
2629,
18,
588,
6450,
1380,
10756,
1082,
202,
2463,
394,
3914,
18074,
12,
5743,
16,
300,
21,
16,
300,
21,
1769,
202,
202,
474,
1041,
273,
4204,
774,
1114,
12,
2629,
18726,
1769,
202,
202,
474,
770,
273,
4204,
19418,
12,
2629,
18726,
1769,
202,
202,
20308,
2000,
629,
309,
326,
1203,
353,
486,
279,
501,
1203,
1496,
279,
6496,
1082,
380,
1982,
1203,
16,
487,
326,
8435,
434,
1517,
1203,
1041,
353,
6496,
1082,
380,
1982,
30,
1082,
380,
2240,
2629,
1610,
261,
430,
3430,
13,
1082,
380,
1203,
9389,
1082,
380,
17870,
9389,
1082,
380,
17870,
1014,
1082,
380,
15217,
4398,
2376,
1839,
326,
17870,
1014,
18,
1082,
1195,
202,
202,
5748,
277,
907,
1388,
1768,
273,
225,
202,
1655,
12705,
63,
1655,
8009,
588,
29897,
1388,
5621,
202,
202,
5748,
1122,
3989,
2277,
1768,
273,
277,
907,
1388,
1768,
397,
21176,
1388,
18,
588,
1225,
382,
6450,
12,
2211,
1769,
1082,
3196,
202,
430,
12,
2629,
18726,
32,
3645,
3989,
2277,
1768,
13,
1082,
202,
2463,
394,
3914,
18074,
12,
5743,
16,
300,
21,
16,
300,
21,
1769,
202,
202,
759,
87,
2600,
554,
358,
326,
1203,
1649,
358,
4543,
30121,
326,
1203,
3086,
6453,
518,
202,
202,
759,
464,
3248,
6894,
358,
518,
202,
202,
22043,
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,
3914,
18074,
1842,
13152,
1768,
12,
5748,
1203,
18726,
13,
1216,
1860,
95,
202,
202,
430,
12,
2629,
18726,
32,
9565,
2629,
18,
588,
3759,
751,
1768,
1435,
747,
1203,
18726,
34,
33,
9565,
2629,
18,
588,
6450,
1380,
10756,
1082,
202,
2463,
394,
3914,
18074,
12,
5743,
16,
300,
21,
16,
300,
21,
1769,
202,
202,
474,
1041,
273,
4204,
774,
1114,
12,
2629,
18726,
1769,
202,
202,
474,
770,
273,
4204,
19418,
12,
2629,
18726,
1769,
202,
202,
20308,
2000,
629,
309,
326,
1203,
353,
486,
279,
501,
1203,
1496,
279,
6496,
1082,
380,
1982,
1203,
16,
487,
326,
8435,
434,
1517,
1203,
1041,
353,
6496,
1082,
380,
1982,
30,
1082,
380,
2240,
2629,
2
] |
mcf.returnDbHandle(currentDbHandle);
|
mcf.returnDbHandle(currentDbHandle, cri);
|
void findIscTrHandle(Xid xid, int flags) throws XAException { currentTr = mcf.getCurrentIscTrHandle(xid, this, flags); if (currentTr.getDbHandle() != currentDbHandle) { mcf.returnDbHandle(currentDbHandle); currentDbHandle = currentTr.getDbHandle(); } }
|
6960 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6960/402a9955b35dff1a3399f48bef0caca2af4d4a2f/FBManagedConnection.java/clean/src/org/firebirdsql/jca/FBManagedConnection.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1104,
45,
1017,
1070,
3259,
12,
60,
350,
19031,
16,
509,
2943,
13,
1216,
21514,
288,
3639,
783,
1070,
273,
6108,
74,
18,
588,
3935,
45,
1017,
1070,
3259,
12,
6212,
16,
333,
16,
2943,
1769,
3639,
309,
261,
2972,
1070,
18,
588,
4331,
3259,
1435,
480,
783,
4331,
3259,
13,
288,
5411,
6108,
74,
18,
2463,
4331,
3259,
12,
2972,
4331,
3259,
16,
19990,
1769,
5411,
783,
4331,
3259,
273,
783,
1070,
18,
588,
4331,
3259,
5621,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1104,
45,
1017,
1070,
3259,
12,
60,
350,
19031,
16,
509,
2943,
13,
1216,
21514,
288,
3639,
783,
1070,
273,
6108,
74,
18,
588,
3935,
45,
1017,
1070,
3259,
12,
6212,
16,
333,
16,
2943,
1769,
3639,
309,
261,
2972,
1070,
18,
588,
4331,
3259,
1435,
480,
783,
4331,
3259,
13,
288,
5411,
6108,
74,
18,
2463,
4331,
3259,
12,
2972,
4331,
3259,
16,
19990,
1769,
5411,
783,
4331,
3259,
273,
783,
1070,
18,
588,
4331,
3259,
5621,
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
] |
tr.addLevelMembers(level, mb);
|
RolapMember[] members = arg.getMembers(); if (members != null && members.length == 1 && members[0].isCalculated()) { tr.addLevelMembers(level, mb, members[0]); } else { tr.addLevelMembers(level, mb, null); }
|
private void addLevel(TupleReader tr, CrossJoinArg arg) { RolapLevel level = arg.getLevel(); RolapHierarchy hierarchy = (RolapHierarchy) level.getHierarchy(); MemberReader mr = hierarchy.getMemberReader(schemaReader.getRole()); MemberBuilder mb = mr.getMemberBuilder(); Util.assertTrue(mb != null, "MemberBuilder not found"); tr.addLevelMembers(level, mb); }
|
51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/a2dcceb175b6588f907d0c3b6a903d1a5db93c48/RolapNativeSet.java/clean/src/main/mondrian/rolap/RolapNativeSet.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
918,
527,
2355,
12,
9038,
2514,
433,
16,
19742,
4572,
4117,
1501,
13,
288,
5411,
11714,
438,
2355,
1801,
273,
1501,
18,
588,
2355,
5621,
5411,
11714,
438,
12074,
9360,
273,
261,
4984,
438,
12074,
13,
1801,
18,
588,
12074,
5621,
5411,
8596,
2514,
9752,
273,
9360,
18,
588,
4419,
2514,
12,
4821,
2514,
18,
588,
2996,
10663,
5411,
8596,
1263,
4903,
273,
9752,
18,
588,
4419,
1263,
5621,
5411,
3564,
18,
11231,
5510,
12,
1627,
480,
446,
16,
315,
4419,
1263,
486,
1392,
8863,
2398,
11714,
438,
4419,
8526,
4833,
273,
1501,
18,
588,
6918,
5621,
309,
261,
7640,
480,
446,
597,
4833,
18,
2469,
422,
404,
597,
4833,
63,
20,
8009,
291,
4844,
690,
10756,
288,
433,
18,
1289,
2355,
6918,
12,
2815,
16,
4903,
16,
4833,
63,
20,
19226,
289,
469,
288,
433,
18,
1289,
2355,
6918,
12,
2815,
16,
4903,
16,
446,
1769,
289,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
918,
527,
2355,
12,
9038,
2514,
433,
16,
19742,
4572,
4117,
1501,
13,
288,
5411,
11714,
438,
2355,
1801,
273,
1501,
18,
588,
2355,
5621,
5411,
11714,
438,
12074,
9360,
273,
261,
4984,
438,
12074,
13,
1801,
18,
588,
12074,
5621,
5411,
8596,
2514,
9752,
273,
9360,
18,
588,
4419,
2514,
12,
4821,
2514,
18,
588,
2996,
10663,
5411,
8596,
1263,
4903,
273,
9752,
18,
588,
4419,
1263,
5621,
5411,
3564,
18,
11231,
5510,
12,
1627,
480,
446,
16,
315,
4419,
1263,
486,
1392,
8863,
2398,
11714,
438,
4419,
8526,
4833,
273,
1501,
18,
588,
6918,
5621,
309,
261,
7640,
480,
446,
597,
4833,
18,
2469,
422,
404,
597,
4833,
63,
20,
8009,
291,
4844,
690,
10756,
2
] |
} else { try {
|
} else { try {
|
public synchronized AWTEvent getNextEvent() throws InterruptedException { if (next != null) return next.getNextEvent(); ClasspathToolkit tk = ((ClasspathToolkit) Toolkit.getDefaultToolkit()); long curr = System.currentTimeMillis(); if (!tk.nativeQueueEmpty() && (curr - lastNativeQueueAccess > humanLatencyThreshold)) { tk.iterateNativeQueue(this, false); lastNativeQueueAccess = curr; } while (next_in == next_out) { // Only the EventDispatchThread associated with the top of the stack // is // allowed to get events from the native source; everyone else just // waits on the head of the queue. if (isDispatchThread()) { // We are not allowed to return null from this method, yet it // is possible that we actually have run out of native events // in the enclosing while() loop, and none of the native events // happened to cause AWT events. We therefore ought to check // the isShutdown() condition here, before risking a "native // wait". If we check it before entering this function we may // wait forever for events after the shutdown condition has // arisen. if (isShutdown()) throw new InterruptedException(); tk.iterateNativeQueue(this, true); lastNativeQueueAccess = System.currentTimeMillis(); } else { try { wait(); } catch (InterruptedException ie) { } } } AWTEvent res = queue[next_out]; if (++next_out == queue.length) next_out = 0; return res; }
|
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/bdd0bca7f46f1e8a19b790749e32f82de6de3685/EventQueue.java/buggy/core/src/classpath/java/java/awt/EventQueue.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3852,
432,
8588,
1133,
6927,
1133,
1435,
1216,
7558,
288,
3639,
309,
261,
4285,
480,
446,
13,
5411,
327,
1024,
18,
588,
2134,
1133,
5621,
3639,
1659,
803,
6364,
8691,
13030,
273,
14015,
17461,
6364,
8691,
13,
13288,
8691,
18,
588,
1868,
6364,
8691,
10663,
3639,
1525,
4306,
273,
2332,
18,
2972,
28512,
5621,
3639,
309,
16051,
16099,
18,
13635,
3183,
1921,
1435,
7734,
597,
261,
17016,
300,
1142,
9220,
3183,
1862,
405,
8672,
21461,
7614,
3719,
288,
5411,
13030,
18,
18793,
9220,
3183,
12,
2211,
16,
629,
1769,
5411,
1142,
9220,
3183,
1862,
273,
4306,
31,
3639,
289,
3639,
1323,
261,
4285,
67,
267,
422,
1024,
67,
659,
13,
288,
5411,
368,
5098,
326,
2587,
5325,
3830,
3627,
598,
326,
1760,
434,
326,
2110,
5411,
368,
353,
5411,
368,
2935,
358,
336,
2641,
628,
326,
6448,
1084,
31,
3614,
476,
469,
2537,
5411,
368,
16248,
603,
326,
910,
434,
326,
2389,
18,
5411,
309,
261,
291,
5325,
3830,
10756,
288,
7734,
368,
1660,
854,
486,
2935,
358,
327,
446,
628,
333,
707,
16,
4671,
518,
7734,
368,
353,
3323,
716,
732,
6013,
1240,
1086,
596,
434,
6448,
2641,
7734,
368,
316,
326,
16307,
1323,
1435,
2798,
16,
471,
6555,
434,
326,
6448,
2641,
7734,
368,
17497,
358,
4620,
432,
8588,
2641,
18,
1660,
13526,
320,
9540,
358,
866,
7734,
368,
326,
353,
10961,
1435,
2269,
2674,
16,
1865,
18404,
310,
279,
315,
13635,
7734,
368,
2529,
9654,
971,
732,
866,
518,
1865,
19014,
333,
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,
3852,
432,
8588,
1133,
6927,
1133,
1435,
1216,
7558,
288,
3639,
309,
261,
4285,
480,
446,
13,
5411,
327,
1024,
18,
588,
2134,
1133,
5621,
3639,
1659,
803,
6364,
8691,
13030,
273,
14015,
17461,
6364,
8691,
13,
13288,
8691,
18,
588,
1868,
6364,
8691,
10663,
3639,
1525,
4306,
273,
2332,
18,
2972,
28512,
5621,
3639,
309,
16051,
16099,
18,
13635,
3183,
1921,
1435,
7734,
597,
261,
17016,
300,
1142,
9220,
3183,
1862,
405,
8672,
21461,
7614,
3719,
288,
5411,
13030,
18,
18793,
9220,
3183,
12,
2211,
16,
629,
1769,
5411,
1142,
9220,
3183,
1862,
273,
4306,
31,
3639,
289,
3639,
1323,
261,
4285,
67,
267,
422,
1024,
67,
659,
13,
288,
5411,
368,
5098,
326,
2587,
5325,
2
] |
synchronized(requests) { requests.remove(id_obj); }
|
requests.remove(id_obj);
|
private void removeEntry(long id) { Long id_obj = new Long(id); // changed by bela Feb 28 2003 (bug fix for 690606) // changed back to use synchronization by bela June 27 2003 (bug fix for #761804), // we can do this because we now copy for iteration (viewChange() and suspect()) synchronized(requests) { requests.remove(id_obj); } }
|
51463 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51463/518afeb99e473e84aa07a96c27e0dfc450023639/RequestCorrelator.java/clean/src/org/jgroups/blocks/RequestCorrelator.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1206,
1622,
12,
5748,
612,
13,
288,
3639,
3407,
612,
67,
2603,
273,
394,
3407,
12,
350,
1769,
3639,
368,
3550,
635,
3952,
69,
5782,
70,
9131,
4044,
23,
261,
925,
2917,
364,
1666,
9349,
4848,
26,
13,
3639,
368,
3550,
1473,
358,
999,
24488,
635,
3952,
69,
804,
7556,
12732,
4044,
23,
261,
925,
2917,
364,
468,
6669,
2643,
3028,
3631,
3639,
368,
732,
848,
741,
333,
2724,
732,
2037,
1610,
364,
6532,
261,
1945,
3043,
1435,
471,
11375,
1181,
10756,
3639,
3852,
12,
11420,
13,
288,
5411,
3285,
18,
4479,
12,
350,
67,
2603,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
918,
1206,
1622,
12,
5748,
612,
13,
288,
3639,
3407,
612,
67,
2603,
273,
394,
3407,
12,
350,
1769,
3639,
368,
3550,
635,
3952,
69,
5782,
70,
9131,
4044,
23,
261,
925,
2917,
364,
1666,
9349,
4848,
26,
13,
3639,
368,
3550,
1473,
358,
999,
24488,
635,
3952,
69,
804,
7556,
12732,
4044,
23,
261,
925,
2917,
364,
468,
6669,
2643,
3028,
3631,
3639,
368,
732,
848,
741,
333,
2724,
732,
2037,
1610,
364,
6532,
261,
1945,
3043,
1435,
471,
11375,
1181,
10756,
3639,
3852,
12,
11420,
13,
288,
5411,
3285,
18,
4479,
12,
350,
67,
2603,
1769,
3639,
289,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
public void writeUser(CmsDbContext dbc, CmsUser user) throws CmsDataAccessException { PreparedStatement stmt = null; Connection conn = null; try { // get connection conn = m_sqlManager.getConnection(dbc); // write data to database stmt = m_sqlManager.getPreparedStatement(conn, "C_ORACLE_USERS_WRITE"); stmt.setString(1, m_sqlManager.validateEmpty(user.getDescription())); stmt.setString(2, m_sqlManager.validateEmpty(user.getFirstname())); stmt.setString(3, m_sqlManager.validateEmpty(user.getLastname())); stmt.setString(4, m_sqlManager.validateEmpty(user.getEmail())); stmt.setLong(5, user.getLastlogin()); stmt.setInt(6, user.getFlags()); stmt.setString(7, m_sqlManager.validateEmpty(user.getAddress())); stmt.setInt(8, user.getType()); stmt.setString(9, user.getId().toString()); stmt.executeUpdate(); stmt.close(); stmt = null; internalWriteUserInfo(dbc, user.getId(), user.getAdditionalInfo(), null); } catch (SQLException e) { throw new CmsDbSqlException(org.opencms.db.generic.Messages.get().container( org.opencms.db.generic.Messages.ERR_GENERIC_SQL_1, CmsDbSqlException.getErrorQuery(stmt)), e); } finally { m_sqlManager.closeAll(dbc, conn, stmt, null); } }
|
51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/546c122e43ad901e06bfec1c2164259c3ce08c8b/CmsUserDriver.java/buggy/src/org/opencms/db/oracle/CmsUserDriver.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1045,
1299,
12,
4747,
4331,
1042,
9881,
16,
25492,
729,
13,
1216,
2149,
751,
9773,
288,
3639,
16913,
3480,
273,
446,
31,
3639,
4050,
1487,
273,
446,
31,
7734,
775,
288,
5411,
368,
336,
1459,
5411,
1487,
273,
312,
67,
4669,
1318,
18,
588,
1952,
12,
9137,
1769,
13491,
368,
1045,
501,
358,
2063,
5411,
3480,
273,
312,
67,
4669,
1318,
18,
588,
29325,
12,
4646,
16,
315,
39,
67,
916,
2226,
900,
67,
30846,
67,
11677,
8863,
5411,
3480,
18,
542,
780,
12,
21,
16,
312,
67,
4669,
1318,
18,
5662,
1921,
12,
1355,
18,
588,
3291,
1435,
10019,
5411,
3480,
18,
542,
780,
12,
22,
16,
312,
67,
4669,
1318,
18,
5662,
1921,
12,
1355,
18,
588,
3759,
529,
1435,
10019,
5411,
3480,
18,
542,
780,
12,
23,
16,
312,
67,
4669,
1318,
18,
5662,
1921,
12,
1355,
18,
588,
3024,
529,
1435,
10019,
5411,
3480,
18,
542,
780,
12,
24,
16,
312,
67,
4669,
1318,
18,
5662,
1921,
12,
1355,
18,
588,
4134,
1435,
10019,
5411,
3480,
18,
542,
3708,
12,
25,
16,
729,
18,
588,
3024,
5819,
10663,
5411,
3480,
18,
542,
1702,
12,
26,
16,
729,
18,
588,
5094,
10663,
5411,
3480,
18,
542,
780,
12,
27,
16,
312,
67,
4669,
1318,
18,
5662,
1921,
12,
1355,
18,
588,
1887,
1435,
10019,
5411,
3480,
18,
542,
1702,
12,
28,
16,
729,
18,
588,
559,
10663,
5411,
3480,
18,
542,
780,
12,
29,
16,
729,
18,
26321,
7675,
10492,
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,
377,
1071,
918,
1045,
1299,
12,
4747,
4331,
1042,
9881,
16,
25492,
729,
13,
1216,
2149,
751,
9773,
288,
3639,
16913,
3480,
273,
446,
31,
3639,
4050,
1487,
273,
446,
31,
7734,
775,
288,
5411,
368,
336,
1459,
5411,
1487,
273,
312,
67,
4669,
1318,
18,
588,
1952,
12,
9137,
1769,
13491,
368,
1045,
501,
358,
2063,
5411,
3480,
273,
312,
67,
4669,
1318,
18,
588,
29325,
12,
4646,
16,
315,
39,
67,
916,
2226,
900,
67,
30846,
67,
11677,
8863,
5411,
3480,
18,
542,
780,
12,
21,
16,
312,
67,
4669,
1318,
18,
5662,
1921,
12,
1355,
18,
588,
3291,
1435,
10019,
5411,
3480,
18,
542,
780,
12,
22,
16,
312,
67,
4669,
1318,
18,
5662,
1921,
12,
2
] |
||
/** @todo Check!!!!! */ for(int i=0; i < v.size(); i++) { boolean present = false; m1=(Message)v.elementAt(i); if(m1 == null) { Trace.error("NAKACK.rebroadcastMsgs()", "message is null"); continue; } h1=(NakAckHeader)m1.getHeader(getName()); for(int j=0; j < final_v.size(); j++) { m2=(Message)final_v.elementAt(j); h2=(NakAckHeader)m2.getHeader(getName());
|
/** todo Check!!!!! */ for(int i=0; i < v.size(); i++) { boolean present=false; m1=(Message)v.elementAt(i); h1=m1 != null? (NakAckHeader)m1.getHeader(getName()) : null; if(m1 == null || h1 == null) { Trace.error("NAKACK.rebroadcastMsgs()", "message is null"); continue; }
|
void rebroadcastMsgs(Vector v) { Vector final_v=new Vector(); Message m1, m2; NakAckHeader h1, h2; if(v == null) return; // weed out duplicates /** @todo Check!!!!! */ for(int i=0; i < v.size(); i++) { boolean present = false; m1=(Message)v.elementAt(i); if(m1 == null) { // +++ remove Trace.error("NAKACK.rebroadcastMsgs()", "message is null"); continue; } h1=(NakAckHeader)m1.getHeader(getName()); for(int j=0; j < final_v.size(); j++) { m2=(Message)final_v.elementAt(j); h2=(NakAckHeader)m2.getHeader(getName()); if(h1.seqno == h2.seqno && m1.getSrc().equals(m2.getSrc())) { present = true; } } if (!present) final_v.addElement(m1); } if(Trace.trace) Trace.warn("NAKACK.rebroadcastMsgs()", "rebroadcasting " + final_v.size() + " messages"); /* Now re-broadcast messages using original NakAckHeader (same seqnos, same sender !) */ for(int i=0; i < final_v.size(); i++) { m1=(Message)final_v.elementAt(i); naker.resend(m1); } // Wait until all members have acked reception of outstanding msgs. This will empty our // retransmission table (AckMcastSenderWindow) naker.waitUntilAllAcksReceived(rebroadcast_timeout); passUp(new Event(Event.REBROADCAST_MSGS_OK)); }
|
48949 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48949/75359f4186603c5a949e15ffab51fb811f04ed8e/NAKACK.java/clean/src/org/jgroups/protocols/NAKACK.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
1377,
918,
283,
19805,
17949,
12,
5018,
331,
13,
288,
202,
565,
5589,
3639,
727,
67,
90,
33,
2704,
5589,
5621,
202,
565,
2350,
4202,
312,
21,
16,
312,
22,
31,
202,
565,
423,
581,
11931,
1864,
225,
366,
21,
16,
366,
22,
31,
202,
565,
309,
12,
90,
422,
446,
13,
327,
31,
202,
565,
368,
732,
329,
596,
11211,
202,
565,
1783,
632,
9012,
2073,
23045,
5,
1195,
202,
565,
364,
12,
474,
277,
33,
20,
31,
277,
411,
331,
18,
1467,
5621,
277,
27245,
288,
202,
202,
6494,
3430,
273,
629,
31,
202,
202,
81,
21,
28657,
1079,
13,
90,
18,
2956,
861,
12,
77,
1769,
202,
202,
430,
12,
81,
21,
422,
446,
13,
288,
368,
965,
15,
1206,
1082,
565,
2677,
18,
1636,
2932,
11277,
47,
3649,
18,
266,
19805,
17949,
1435,
3113,
315,
2150,
353,
446,
8863,
1082,
565,
1324,
31,
202,
202,
97,
202,
202,
76,
21,
28657,
50,
581,
11931,
1864,
13,
81,
21,
18,
588,
1864,
12,
17994,
10663,
202,
202,
1884,
12,
474,
525,
33,
20,
31,
525,
411,
727,
67,
90,
18,
1467,
5621,
525,
27245,
288,
1082,
565,
312,
22,
28657,
1079,
13,
6385,
67,
90,
18,
2956,
861,
12,
78,
1769,
1082,
565,
366,
22,
28657,
50,
581,
11931,
1864,
13,
81,
22,
18,
588,
1864,
12,
17994,
10663,
1082,
565,
309,
12,
76,
21,
18,
5436,
2135,
422,
366,
22,
18,
5436,
2135,
597,
312,
21,
18,
588,
7740,
7675,
14963,
12,
81,
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,
1377,
918,
283,
19805,
17949,
12,
5018,
331,
13,
288,
202,
565,
5589,
3639,
727,
67,
90,
33,
2704,
5589,
5621,
202,
565,
2350,
4202,
312,
21,
16,
312,
22,
31,
202,
565,
423,
581,
11931,
1864,
225,
366,
21,
16,
366,
22,
31,
202,
565,
309,
12,
90,
422,
446,
13,
327,
31,
202,
565,
368,
732,
329,
596,
11211,
202,
565,
1783,
632,
9012,
2073,
23045,
5,
1195,
202,
565,
364,
12,
474,
277,
33,
20,
31,
277,
411,
331,
18,
1467,
5621,
277,
27245,
288,
202,
202,
6494,
3430,
273,
629,
31,
202,
202,
81,
21,
28657,
1079,
13,
90,
18,
2956,
861,
12,
77,
1769,
202,
202,
430,
12,
81,
21,
422,
446,
13,
288,
2
] |
if (!(part instanceof AbstractBugEditor) && !(part instanceof BugzillaTaskEditor))
|
if (!(part instanceof AbstractRepositoryTaskEditor) && !(part instanceof BugzillaTaskEditor))
|
protected void handleWorkbenchPartSelection(IWorkbenchPart part, ISelection selection, boolean contributeToContext) { if (!(part instanceof AbstractBugEditor) && !(part instanceof BugzillaTaskEditor)) return; if (selection instanceof StructuredSelection) { StructuredSelection ss = (StructuredSelection) selection; Object object = ss.getFirstElement(); if (object instanceof BugzillaReportSelection) super.handleElementSelection(part, object, contributeToContext); } }
|
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/1da2429e2fb0aff00ed898fc426c4ca0c40145c4/BugzillaEditingMonitor.java/clean/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/bugs/BugzillaEditingMonitor.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1640,
2421,
22144,
1988,
6233,
12,
45,
2421,
22144,
1988,
1087,
16,
467,
6233,
4421,
16,
1250,
356,
887,
774,
1042,
13,
288,
202,
202,
430,
16051,
12,
2680,
1276,
4115,
19865,
6946,
13,
597,
401,
12,
2680,
1276,
16907,
15990,
2174,
6946,
3719,
1082,
202,
2463,
31,
202,
202,
430,
261,
10705,
1276,
7362,
2862,
6233,
13,
288,
1082,
202,
30733,
6233,
5202,
273,
261,
30733,
6233,
13,
4421,
31,
1082,
202,
921,
733,
273,
5202,
18,
588,
3759,
1046,
5621,
1082,
202,
430,
261,
1612,
1276,
16907,
15990,
4820,
6233,
13,
9506,
202,
9565,
18,
4110,
1046,
6233,
12,
2680,
16,
733,
16,
356,
887,
774,
1042,
1769,
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,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1640,
2421,
22144,
1988,
6233,
12,
45,
2421,
22144,
1988,
1087,
16,
467,
6233,
4421,
16,
1250,
356,
887,
774,
1042,
13,
288,
202,
202,
430,
16051,
12,
2680,
1276,
4115,
19865,
6946,
13,
597,
401,
12,
2680,
1276,
16907,
15990,
2174,
6946,
3719,
1082,
202,
2463,
31,
202,
202,
430,
261,
10705,
1276,
7362,
2862,
6233,
13,
288,
1082,
202,
30733,
6233,
5202,
273,
261,
30733,
6233,
13,
4421,
31,
1082,
202,
921,
733,
273,
5202,
18,
588,
3759,
1046,
5621,
1082,
202,
430,
261,
1612,
1276,
16907,
15990,
4820,
6233,
13,
9506,
202,
9565,
18,
4110,
1046,
6233,
12,
2680,
16,
733,
16,
356,
887,
774,
1042,
1769,
202,
202,
97,
202,
97,
2
] |
public final int hashCode() throws NotImplementedException { throw new NotImplementedException("not yet implemented");
|
public final int hashCode() { return name.hashCode() ^ getLineClass().hashCode();
|
public final int hashCode() throws NotImplementedException { throw new NotImplementedException("not yet implemented"); }
|
54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/d3f5f6a99a04d1a25bcefbb1b0a89dc8b25cb4fa/Port.java/buggy/modules/sound/src/main/java/javax/sound/sampled/Port.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
727,
509,
13374,
1435,
1216,
10051,
503,
288,
5411,
604,
394,
10051,
503,
2932,
902,
4671,
8249,
8863,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
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,
540,
1071,
727,
509,
13374,
1435,
1216,
10051,
503,
288,
5411,
604,
394,
10051,
503,
2932,
902,
4671,
8249,
8863,
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
] |
public void setFlagged(boolean value) {
|
public void setFlagged(boolean value) {
|
public void setFlagged(boolean value) { try { m.setFlags(new Flags(Flags.Flag.ANSWERED), value); } catch (MessagingException e) { } }
|
11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/0cc63cb388a13f01532486f9d178811914e6d71b/MessageExtraWrapper.java/buggy/grendel/sources/grendel/storage/MessageExtraWrapper.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
4678,
2423,
12,
6494,
460,
13,
288,
565,
775,
288,
1377,
312,
18,
542,
5094,
12,
2704,
10104,
12,
5094,
18,
4678,
18,
11607,
18839,
2056,
3631,
460,
1769,
565,
289,
1044,
261,
23389,
503,
425,
13,
288,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
282,
1071,
918,
444,
4678,
2423,
12,
6494,
460,
13,
288,
565,
775,
288,
1377,
312,
18,
542,
5094,
12,
2704,
10104,
12,
5094,
18,
4678,
18,
11607,
18839,
2056,
3631,
460,
1769,
565,
289,
1044,
261,
23389,
503,
425,
13,
288,
565,
289,
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,
-100,
-100,
-100,
-100,
-100
] |
public ThisExp(Expression context)
|
public ThisExp ()
|
public ThisExp(Expression context) { super("$this$"); this.context = context; }
|
41089 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41089/48963f17eb43e99f3343a09c24c756b0577941df/ThisExp.java/buggy/gnu/expr/ThisExp.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1220,
2966,
1832,
225,
288,
565,
2240,
2932,
8,
2211,
8,
8863,
565,
333,
18,
2472,
273,
819,
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,
0,
0,
0,
0,
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,
1220,
2966,
1832,
225,
288,
565,
2240,
2932,
8,
2211,
8,
8863,
565,
333,
18,
2472,
273,
819,
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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
connection.pushExpressionCommand((byte)IInternalExpressionConstants.INFIX_EXPRESSION);
|
connection.pushExpressionCommand(this.hashCode(), (byte)IInternalExpressionConstants.INFIX_EXPRESSION);
|
protected void pushInfixToProxy(int operator, int operandType) throws ThrowableProxy, NoExpressionValueException { try { // Format of push infix to proxy command is: // PushExpressionCommand(push infix to proxy) followed by: // byte: operator // byte: operandType connection.pushExpressionCommand((byte)IInternalExpressionConstants.INFIX_EXPRESSION); connection.pushByte((byte) operator); connection.pushByte((byte) operandType); } catch (IOException e) { connection.close(); ProxyPlugin.getPlugin().getLogger().log(e); markInvalid(e.getLocalizedMessage()); throwIllegalStateException(IO_EXCEPTION_MSG); } }
|
8196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8196/832ed8bf0a829b53209fe717a442ac2357654674/REMExpression.java/clean/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/REMExpression.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1817,
382,
904,
774,
3886,
12,
474,
3726,
16,
509,
9886,
559,
13,
1216,
4206,
3886,
16,
2631,
2300,
9738,
288,
202,
202,
698,
288,
1082,
202,
759,
4077,
434,
1817,
316,
904,
358,
2889,
1296,
353,
30,
1082,
202,
759,
202,
7621,
2300,
2189,
12,
6206,
316,
904,
358,
2889,
13,
10860,
635,
30,
1082,
202,
759,
202,
202,
7229,
30,
3726,
1082,
202,
759,
202,
202,
7229,
30,
9886,
559,
1082,
202,
4071,
18,
6206,
2300,
2189,
12443,
7229,
13,
45,
3061,
2300,
2918,
18,
706,
4563,
67,
19111,
1769,
1082,
202,
4071,
18,
6206,
3216,
12443,
7229,
13,
3726,
1769,
1082,
202,
4071,
18,
6206,
3216,
12443,
7229,
13,
9886,
559,
1769,
202,
202,
97,
1044,
261,
14106,
425,
13,
288,
1082,
202,
4071,
18,
4412,
5621,
1082,
202,
3886,
3773,
18,
588,
3773,
7675,
588,
3328,
7675,
1330,
12,
73,
1769,
1082,
202,
3355,
1941,
12,
73,
18,
588,
2042,
1235,
1079,
10663,
1082,
202,
12849,
12195,
5060,
12,
4294,
67,
12658,
67,
11210,
1769,
202,
202,
97,
1082,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1817,
382,
904,
774,
3886,
12,
474,
3726,
16,
509,
9886,
559,
13,
1216,
4206,
3886,
16,
2631,
2300,
9738,
288,
202,
202,
698,
288,
1082,
202,
759,
4077,
434,
1817,
316,
904,
358,
2889,
1296,
353,
30,
1082,
202,
759,
202,
7621,
2300,
2189,
12,
6206,
316,
904,
358,
2889,
13,
10860,
635,
30,
1082,
202,
759,
202,
202,
7229,
30,
3726,
1082,
202,
759,
202,
202,
7229,
30,
9886,
559,
1082,
202,
4071,
18,
6206,
2300,
2189,
12443,
7229,
13,
45,
3061,
2300,
2918,
18,
706,
4563,
67,
19111,
1769,
1082,
202,
4071,
18,
6206,
3216,
12443,
7229,
13,
3726,
1769,
1082,
202,
4071,
18,
6206,
3216,
12443,
7229,
13,
9886,
559,
1769,
2
] |
switch (owntype) { case UnboxedArrayType(Type elemtp): Tree apply = transform(templ.parents[0]); switch (apply) {
|
if (tree.type.symbol() == definitions.ARRAY_CLASS) { switch (templ.parents[0]) {
|
public Tree transform(Tree tree, boolean eraseFully) { assert tree.type != null : tree; Type owntype = eraseFully ? tree.type.fullErasure() : tree.type.erasure(); switch (tree) { case ClassDef(int mods, Name name, TypeDef[] tparams, ValDef[][] vparams, Tree tpe, Template impl): Symbol oldCurrentClass = currentClass; currentClass = tree.symbol(); Tree newTree = copy.ClassDef(tree, mods, name, new TypeDef[0], transform(vparams), tpe, transform(impl, tree.symbol())) .setType(owntype); currentClass = oldCurrentClass; return newTree; case DefDef(int mods, Name name, TypeDef[] tparams, ValDef[][] vparams, Tree tpe, Tree rhs): addBridges(tree.symbol()); Tree tpe1 = gen.mkType(tpe.pos, tpe.type.fullErasure()); Tree rhs1 = (rhs == Tree.Empty) ? rhs : transform(rhs, tpe1.type); return copy.DefDef( tree, mods, name, new TypeDef[0], transform(vparams), tpe1, rhs1) .setType(owntype); case ValDef(int mods, Name name, Tree tpe, Tree rhs): Tree tpe1 = transform(tpe); Tree rhs1 = (rhs == Tree.Empty) ? rhs : transform(rhs, tpe1.type); return copy.ValDef( tree, mods, name, tpe1, rhs1) .setType(owntype); case TypeDef(_, _, _): // eliminate return Tree.Empty; case Block(Tree[] stats): Tree[] newStats = new Tree[stats.length]; for (int i = 0; i < stats.length; ++i) newStats[i] = transform(stats[i], true); return copy.Block(tree, newStats).setType(owntype.fullErasure()); case Assign(Tree lhs, Tree rhs): Tree lhs1 = transformLhs(lhs); Tree rhs1 = transform(rhs, lhs1.type); return copy.Assign(tree, lhs1, rhs1).setType(owntype.fullErasure()); case If(Tree cond, Tree thenp, Tree elsep): Tree cond1 = transform(cond, Type.unboxedType(TypeTags.BOOLEAN)); Tree thenp1 = transform(thenp, owntype); Tree elsep1 = (elsep == Tree.Empty) ? elsep : transform(elsep, owntype); return copy.If(tree, cond1, thenp1, elsep1).setType(owntype); case New(Template templ): if (tree.type.symbol() == definitions.UNIT_CLASS) // !!! return Tree.Literal(UNIT, null).setType(owntype); throw Debug.abort("found unit literal"); switch (owntype) { case UnboxedArrayType(Type elemtp): Tree apply = transform(templ.parents[0]); switch (apply) { case Apply(_, Tree[] args): assert args.length == 1; switch (elemtp) { case UnboxedType(int kind): return genNewArray(tree.pos,args[0],kind); default: return genNewArray(tree.pos,args[0],elemtp); } default: throw Debug.abort("illegal case", apply); } } return super.transform(tree).setType(owntype); case Typed(Tree expr, Tree tpe): // coerce expr to tpe Tree tpe1 = gen.mkType(tpe.pos, tpe.type().erasure()); // !!! was transform(tpe); // !!! More generally, we should never transform a tree // that represents a type. We should always transform // types and then reconstruct the corresponding tree. Tree expr1 = transform(expr, tpe1.type); return noTyped ? expr1 : copy.Typed(tree, expr1, tpe1).setType(owntype); case TypeApply(Tree fun, Tree[] args): Symbol sym = fun.symbol(); if (sym == definitions.AS || sym == definitions.IS) { Type tp = args[0].type.erasure(); if (isUnboxed(tp)) { Tree qual1 = transform(getQualifier(currentClass, fun)); if (isUnboxed(qual1.type)) qual1 = box(qual1); Symbol primSym = (sym == definitions.AS) ? primitives.getUnboxValueSymbol(tp) : primitives.getInstanceTestSymbol(tp); return gen.Select(qual1, primSym); } else return copy.TypeApply(tree, transform(fun), transform(args)) .setType(owntype); } else return transform(fun); case Apply(Tree fun, Tree[] args): switch (fun) { case Select(Tree array, _): if (isUnboxedArray(array.type().erasure())) { switch (primitives.getPrimitive(fun.symbol())) { case APPLY: return transformApply(tree); case UPDATE: return transformUpdate(tree); } } } Tree fun1 = transform(fun); if (fun1.symbol() == definitions.NULL) return fun1.setType(owntype); if (global.debug) global.log("fn: " + fun1.symbol() + ":" + fun1.type);//debug switch (fun1.type) { case MethodType(Symbol[] params, Type restpe): Tree[] args1 = args; for (int i = 0; i < args.length; i++) { Tree arg = args[i]; Type pt1 = params[i].type().erasure(); Tree arg1 = cast(transform(arg, pt1), pt1); if (arg1 != arg && args1 == args) { args1 = new Tree[args.length]; System.arraycopy(args, 0, args1, 0, i); } args1[i] = arg1; } return coerce(copy.Apply(tree, fun1, args1).setType(restpe), owntype); default: global.debugPrinter.print(fun1); throw Debug.abort("bad method type: " + Debug.show(fun1.type) + " " + Debug.show(fun1.symbol())); } case Select(_, _): case Ident(_): Tree tree1 = transformLhs(tree); //global.log("id: " + tree1+": "+tree1.type+" -> "+owntype);//DEBUG return (tree1.type instanceof Type.MethodType) ? tree1 : coerce(tree1, owntype); case Empty: case PackageDef(_,_): case Template(_,_): case Tuple(_): // !!! ? case Super(_): case This(_): case Literal(_): case TypeTerm(): return super.transform(tree).setType(owntype); case Bad(): case ModuleDef(_,_,_,_): case PatDef(_,_,_): case Import(_,_): case CaseDef(_,_,_): case LabelDef(_,_): case Visitor(_): case Function(_,_): case SingletonType(_): case SelectFromType(_,_): case FunType(_,_): case CompoundType(_,_): case AppliedType(_, _): case CovariantType(_): throw Debug.abort("illegal case", tree); default: throw Debug.abort("unknown case", tree); } }
|
10130 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10130/ef591b33a89dc944b3ee41b9bbbb4f73392cbc7d/Erasure.java/buggy/sources/scalac/transformer/Erasure.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4902,
2510,
12,
2471,
2151,
16,
1250,
22038,
16999,
13,
288,
202,
11231,
2151,
18,
723,
480,
446,
294,
2151,
31,
202,
559,
2523,
496,
388,
273,
22038,
16999,
692,
2151,
18,
723,
18,
2854,
29228,
3619,
1435,
294,
2151,
18,
723,
18,
264,
3619,
5621,
202,
9610,
261,
3413,
13,
288,
202,
3593,
1659,
3262,
12,
474,
15546,
16,
1770,
508,
16,
1412,
3262,
8526,
268,
2010,
16,
12747,
3262,
63,
6362,
65,
331,
2010,
16,
4902,
268,
347,
16,
5035,
9380,
4672,
5411,
8565,
1592,
3935,
797,
273,
28742,
31,
5411,
28742,
273,
2151,
18,
7175,
5621,
5411,
4902,
394,
2471,
273,
7734,
1610,
18,
797,
3262,
12,
3413,
16,
15546,
16,
508,
16,
394,
1412,
3262,
63,
20,
6487,
17311,
2510,
12,
90,
2010,
3631,
268,
347,
16,
2510,
12,
11299,
16,
2151,
18,
7175,
1435,
3719,
202,
202,
18,
542,
559,
12,
543,
496,
388,
1769,
5411,
28742,
273,
1592,
3935,
797,
31,
5411,
327,
394,
2471,
31,
202,
3593,
10922,
3262,
12,
474,
15546,
16,
1770,
508,
16,
1412,
3262,
8526,
268,
2010,
16,
12747,
3262,
63,
6362,
65,
331,
2010,
16,
4902,
268,
347,
16,
4902,
7711,
4672,
202,
565,
527,
38,
1691,
2852,
12,
3413,
18,
7175,
10663,
202,
565,
4902,
268,
347,
21,
273,
3157,
18,
24816,
559,
12,
88,
347,
18,
917,
16,
268,
347,
18,
723,
18,
2854,
29228,
3619,
10663,
202,
565,
4902,
7711,
21,
273,
261,
86,
4487,
422,
4902,
18,
1921,
13,
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,
4902,
2510,
12,
2471,
2151,
16,
1250,
22038,
16999,
13,
288,
202,
11231,
2151,
18,
723,
480,
446,
294,
2151,
31,
202,
559,
2523,
496,
388,
273,
22038,
16999,
692,
2151,
18,
723,
18,
2854,
29228,
3619,
1435,
294,
2151,
18,
723,
18,
264,
3619,
5621,
202,
9610,
261,
3413,
13,
288,
202,
3593,
1659,
3262,
12,
474,
15546,
16,
1770,
508,
16,
1412,
3262,
8526,
268,
2010,
16,
12747,
3262,
63,
6362,
65,
331,
2010,
16,
4902,
268,
347,
16,
5035,
9380,
4672,
5411,
8565,
1592,
3935,
797,
273,
28742,
31,
5411,
28742,
273,
2151,
18,
7175,
5621,
5411,
4902,
394,
2471,
273,
7734,
1610,
18,
797,
3262,
12,
3413,
16,
15546,
16,
508,
16,
394,
2
] |
public final void add (Address node) throws InlinePragma { if (Assert.VERIFY_ASSERTIONS) Assert._assert(isNode(node)); if (lock != null) lock.acquire();
|
public final void add(Address node) throws InlinePragma { if (Assert.VERIFY_ASSERTIONS) Assert._assert(isNode(node)); if (lock != null) lock.acquire();
|
public final void add (Address node) throws InlinePragma { if (Assert.VERIFY_ASSERTIONS) Assert._assert(isNode(node)); if (lock != null) lock.acquire(); node.store(Address.zero(), PREV_OFFSET); node.store(head, NEXT_OFFSET); node.store(ObjectReference.fromObject(owner), LIST_OFFSET); if (!head.isZero()) head.store(node, PREV_OFFSET); head = node; if (lock != null) lock.release(); }
|
4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/30524c62fa391922d51289c03075f714c772951c/DoublyLinkedList.java/buggy/MMTk/src/org/mmtk/utility/DoublyLinkedList.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
527,
261,
1887,
756,
13,
1216,
16355,
2050,
9454,
288,
565,
309,
261,
8213,
18,
23756,
67,
8423,
11539,
1146,
55,
13,
5452,
6315,
11231,
12,
291,
907,
12,
2159,
10019,
565,
309,
261,
739,
480,
446,
13,
2176,
18,
1077,
1039,
5621,
565,
756,
18,
2233,
12,
1887,
18,
7124,
9334,
7071,
58,
67,
11271,
1769,
565,
756,
18,
2233,
12,
1978,
16,
19252,
67,
11271,
1769,
565,
756,
18,
2233,
12,
22101,
18,
2080,
921,
12,
8443,
3631,
15130,
67,
11271,
1769,
565,
309,
16051,
1978,
18,
291,
7170,
10756,
1377,
910,
18,
2233,
12,
2159,
16,
7071,
58,
67,
11271,
1769,
565,
910,
273,
756,
31,
565,
309,
261,
739,
480,
446,
13,
2176,
18,
9340,
5621,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
282,
1071,
727,
918,
527,
261,
1887,
756,
13,
1216,
16355,
2050,
9454,
288,
565,
309,
261,
8213,
18,
23756,
67,
8423,
11539,
1146,
55,
13,
5452,
6315,
11231,
12,
291,
907,
12,
2159,
10019,
565,
309,
261,
739,
480,
446,
13,
2176,
18,
1077,
1039,
5621,
565,
756,
18,
2233,
12,
1887,
18,
7124,
9334,
7071,
58,
67,
11271,
1769,
565,
756,
18,
2233,
12,
1978,
16,
19252,
67,
11271,
1769,
565,
756,
18,
2233,
12,
22101,
18,
2080,
921,
12,
8443,
3631,
15130,
67,
11271,
1769,
565,
309,
16051,
1978,
18,
291,
7170,
10756,
1377,
910,
18,
2233,
12,
2159,
16,
7071,
58,
67,
11271,
1769,
565,
910,
273,
756,
31,
565,
309,
261,
739,
480,
446,
2
] |
public void generateCustomerFeeSchedule() throws AccountException { generateCustomerFeeSchedule(getCustomer());
|
private void generateCustomerFeeSchedule(CustomerBO customer) throws AccountException { if (customer.getCustomerMeeting() != null && (customer.getCustomerLevel().isGroup() && customer.getCustomerStatus().getId().equals( CustomerStatus.GROUP_ACTIVE.getValue()) || customer.getCustomerLevel().isClient() && customer.getCustomerStatus().getId().equals( CustomerStatus.CLIENT_ACTIVE.getValue()) || customer .getCustomerLevel().isCenter() && customer.getCustomerStatus().getId().equals( CustomerStatus.CENTER_ACTIVE.getValue()))) { Calendar meetingStartDate = customer.getCustomerMeeting() .getMeeting().getMeetingStartDate(); if (customer.getParentCustomer() != null) { Calendar nextMeetingDate = new GregorianCalendar(); nextMeetingDate.setTime(customer.getParentCustomer() .getCustomerAccount().getNextMeetingDate()); customer.getCustomerMeeting().getMeeting().setMeetingStartDate( nextMeetingDate); } generateMeetingSchedule(); customer.getCustomerMeeting().getMeeting().setMeetingStartDate( meetingStartDate); }
|
public void generateCustomerFeeSchedule() throws AccountException { generateCustomerFeeSchedule(getCustomer()); }
|
45468 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45468/1221bd299ad4af38d080d6acce197a83a23cf03f/CustomerAccountBO.java/buggy/mifos/src/org/mifos/application/customer/business/CustomerAccountBO.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2103,
8883,
14667,
6061,
1435,
1216,
6590,
503,
288,
202,
202,
7163,
8883,
14667,
6061,
12,
588,
8883,
10663,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2103,
8883,
14667,
6061,
1435,
1216,
6590,
503,
288,
202,
202,
7163,
8883,
14667,
6061,
12,
588,
8883,
10663,
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
] |
currentHex.getDescription() +
|
getCurrentHex().getDescription() +
|
public void moveToHex(MasterHex hex) { teleported = hex.getTeleported(); entrySide = hex.getEntrySide(); Game.logEvent("Legion " + getLongMarkerName() + " in " + currentHex.getDescription() + (teleported ? (hex.isOccupied() ? " titan teleports " : " tower teleports (" + teleportingLord + ") " ) : " moves ") + "to " + hex.getDescription()); currentHex.removeLegion(this); currentHex = hex; currentHex.addLegion(this, true); moved = true; player.setLastLegionMoved(); // If we teleported, no more teleports are allowed this turn. if (teleported) { player.setTeleported(true); } }
|
51862 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51862/2cf1fff6757408f9a71bb3923ff2016f3517400b/Legion.java/clean/Colossus/Legion.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
13863,
7037,
12,
7786,
7037,
3827,
13,
565,
288,
3639,
268,
6516,
1798,
273,
3827,
18,
588,
56,
6516,
1798,
5621,
3639,
1241,
8895,
273,
3827,
18,
588,
1622,
8895,
5621,
3639,
14121,
18,
1330,
1133,
2932,
8329,
285,
315,
397,
11105,
7078,
461,
1435,
397,
315,
316,
315,
397,
5411,
5175,
7037,
7675,
588,
3291,
1435,
397,
5411,
261,
29170,
1798,
692,
7734,
261,
7118,
18,
291,
24269,
416,
2092,
1435,
692,
315,
268,
305,
304,
268,
6516,
4363,
315,
294,
10792,
315,
358,
2051,
268,
6516,
4363,
7566,
397,
26855,
310,
48,
517,
397,
9369,
315,
262,
7734,
294,
315,
13934,
9369,
397,
5411,
315,
869,
315,
397,
3827,
18,
588,
3291,
10663,
3639,
783,
7037,
18,
4479,
8329,
285,
12,
2211,
1769,
3639,
783,
7037,
273,
3827,
31,
3639,
783,
7037,
18,
1289,
8329,
285,
12,
2211,
16,
638,
1769,
3639,
10456,
273,
638,
31,
3639,
7291,
18,
542,
3024,
8329,
285,
25317,
5621,
3639,
368,
971,
732,
268,
6516,
1798,
16,
1158,
1898,
268,
6516,
4363,
854,
2935,
333,
7005,
18,
3639,
309,
261,
29170,
1798,
13,
3639,
288,
5411,
7291,
18,
542,
56,
6516,
1798,
12,
3767,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
13863,
7037,
12,
7786,
7037,
3827,
13,
565,
288,
3639,
268,
6516,
1798,
273,
3827,
18,
588,
56,
6516,
1798,
5621,
3639,
1241,
8895,
273,
3827,
18,
588,
1622,
8895,
5621,
3639,
14121,
18,
1330,
1133,
2932,
8329,
285,
315,
397,
11105,
7078,
461,
1435,
397,
315,
316,
315,
397,
5411,
5175,
7037,
7675,
588,
3291,
1435,
397,
5411,
261,
29170,
1798,
692,
7734,
261,
7118,
18,
291,
24269,
416,
2092,
1435,
692,
315,
268,
305,
304,
268,
6516,
4363,
315,
294,
10792,
315,
358,
2051,
268,
6516,
4363,
7566,
397,
26855,
310,
48,
517,
397,
9369,
315,
262,
7734,
294,
315,
13934,
9369,
397,
5411,
315,
869,
315,
397,
3827,
18,
588,
3291,
10663,
3639,
2
] |
public Object[] getSelectedObjects() { return null; }
|
public Object[] getSelectedObjects() { return selectedObjects; }
|
public Object[] getSelectedObjects() { return null; // TODO } // getSelectedObjects()
|
1043 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1043/14511e3ad21013e92c6399b2bd2ec09a8263e33a/JCheckBoxMenuItem.java/clean/libjava/javax/swing/JCheckBoxMenuItem.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
8526,
16625,
4710,
1435,
288,
202,
202,
2463,
446,
31,
368,
2660,
202,
97,
368,
16625,
4710,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
225,
202,
482,
1033,
8526,
16625,
4710,
1435,
288,
202,
202,
2463,
446,
31,
368,
2660,
202,
97,
368,
16625,
4710,
1435,
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
] |
}
|
}
|
public void testPublishPermissions() throws Throwable { CmsObject cms = getCmsObject(); echo("Testing publish permissions for a user"); String resource = "/folder1/page1.html"; cms.lockResource(resource); // modify the resource permissions for the tests // remove all "Users" group permissions cms.chacc(resource, I_CmsPrincipal.PRINCIPAL_GROUP, OpenCms.getDefaultUsers().getGroupUsers(), 0, 0, CmsAccessControlEntry.ACCESS_FLAGS_OVERWRITE); // allow read and write for user "test1" cms.chacc(resource, I_CmsPrincipal.PRINCIPAL_USER, "test1", CmsPermissionSet.PERMISSION_READ + CmsPermissionSet.PERMISSION_WRITE, 0, CmsAccessControlEntry.ACCESS_FLAGS_OVERWRITE); // allow read and write and direct publish for user "test2" cms.chacc(resource, I_CmsPrincipal.PRINCIPAL_USER, "test2", CmsPermissionSet.PERMISSION_READ + CmsPermissionSet.PERMISSION_WRITE + CmsPermissionSet.PERMISSION_DIRECT_PUBLISH, 0, CmsAccessControlEntry.ACCESS_FLAGS_OVERWRITE); cms.unlockResource(resource); cms.loginUser("test1", "test1"); cms.getRequestContext().setCurrentProject(cms.readProject("Offline")); if (cms.hasPublishPermissions(resource)) { fail("Publish permissions available but should not be available for user test1"); } cms.loginUser("test2", "test2"); cms.getRequestContext().setCurrentProject(cms.readProject("Offline")); if (! cms.hasPublishPermissions(resource)) { fail("Publish permissions unavailable but should be available for user test2"); } cms.loginUser("Admin", "admin"); cms.getRequestContext().setCurrentProject(cms.readProject("Offline")); if (! cms.hasPublishPermissions(resource)) { fail("Publish permissions unavailable but should be available for user Admin"); } // add user "test1" to project manager group cms.addUserToGroup("test1", OpenCms.getDefaultUsers().getGroupProjectmanagers()); cms.loginUser("test1", "test1"); // first check in "online" project assertEquals(CmsProject.ONLINE_PROJECT_ID, cms.getRequestContext().currentProject().getId()); if (cms.hasPublishPermissions(resource)) { fail("Publish permissions available but should not be available for user test1 in online project"); } cms.getRequestContext().setCurrentProject(cms.readProject("Offline")); if (! cms.hasPublishPermissions(resource)) { fail("Publish permissions unavailable but should be available for user test1 because he is a project manager"); } // create a new folder String folder = "/newfolder/"; cms.loginUser("Admin", "admin"); cms.getRequestContext().setCurrentProject(cms.readProject("Offline")); // create a new folder cms.createResource(folder, CmsResourceTypeFolder.getStaticTypeId()); // apply permissions to folder cms.lockResource(folder); // modify the resource permissions for the tests // remove all "Users" group permissions cms.chacc(folder, I_CmsPrincipal.PRINCIPAL_GROUP, OpenCms.getDefaultUsers().getGroupUsers(), 0, 0, CmsAccessControlEntry.ACCESS_FLAGS_OVERWRITE + CmsAccessControlEntry.ACCESS_FLAGS_INHERIT); // also for "Project managers" to avoid conflicts with other tests in this suite cms.chacc(folder, I_CmsPrincipal.PRINCIPAL_GROUP, OpenCms.getDefaultUsers().getGroupProjectmanagers(), 0, 0, CmsAccessControlEntry.ACCESS_FLAGS_OVERWRITE + CmsAccessControlEntry.ACCESS_FLAGS_INHERIT); // allow only read and write for user "test1" cms.chacc(folder, I_CmsPrincipal.PRINCIPAL_USER, "test1", CmsPermissionSet.PERMISSION_READ + CmsPermissionSet.PERMISSION_WRITE, 0, CmsAccessControlEntry.ACCESS_FLAGS_OVERWRITE + CmsAccessControlEntry.ACCESS_FLAGS_INHERIT); // allow read, write and and direct publish for user "test2" cms.chacc(folder, I_CmsPrincipal.PRINCIPAL_USER, "test2", CmsPermissionSet.PERMISSION_READ + CmsPermissionSet.PERMISSION_WRITE + CmsPermissionSet.PERMISSION_DIRECT_PUBLISH, 0, CmsAccessControlEntry.ACCESS_FLAGS_OVERWRITE + CmsAccessControlEntry.ACCESS_FLAGS_INHERIT); cms.unlockResource(folder); resource = "/newfolder/newpage.html"; cms.createResource(resource, CmsResourceTypePlain.getStaticTypeId(), "This is a test".getBytes(), Collections.EMPTY_LIST); cms.unlockResource(resource); cms.loginUser("test1", "test1"); cms.getRequestContext().setCurrentProject(cms.readProject("Offline")); if (cms.hasPublishPermissions(resource)) { fail("Publish permissions available but should not be available for user test1"); } cms.loginUser("test2", "test2"); cms.getRequestContext().setCurrentProject(cms.readProject("Offline")); if (cms.hasPublishPermissions(resource)) { fail("Publish permissions available but should be unavailable for user test2 because the parent folder is new"); } if (! cms.hasPublishPermissions(folder)) { fail("Publish permissions on new folder unavailable but should be available for user test2"); } cms.publishResource(folder); if (! cms.hasPublishPermissions(resource)) { fail("Publish permissions unavailable but should be available for user test2 because the parent folder is now published"); } }
|
51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/be6031929d4b8a365df3862b5c27a9277870225a/TestPermissions.java/clean/test/org/opencms/file/TestPermissions.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
6024,
6521,
1435,
1216,
4206,
288,
3639,
14371,
6166,
273,
28287,
5621,
2398,
3376,
2932,
22218,
3808,
4371,
364,
279,
729,
8863,
7734,
514,
1058,
273,
2206,
5609,
21,
19,
2433,
21,
18,
2620,
14432,
3639,
6166,
18,
739,
1420,
12,
3146,
1769,
3639,
368,
5612,
326,
1058,
4371,
364,
326,
7434,
3639,
368,
1206,
777,
315,
6588,
6,
1041,
4371,
540,
6166,
18,
8838,
952,
12,
3146,
16,
467,
67,
4747,
9155,
18,
8025,
23213,
2579,
1013,
67,
8468,
16,
10319,
18,
588,
1868,
6588,
7675,
588,
1114,
6588,
9334,
374,
16,
374,
16,
2149,
16541,
1622,
18,
13204,
67,
17836,
67,
12959,
11677,
1769,
3639,
368,
1699,
855,
471,
1045,
364,
729,
315,
3813,
21,
6,
3639,
6166,
18,
8838,
952,
12,
3146,
16,
467,
67,
4747,
9155,
18,
8025,
23213,
2579,
1013,
67,
4714,
16,
315,
3813,
21,
3113,
2149,
5041,
694,
18,
23330,
67,
6949,
397,
2149,
5041,
694,
18,
23330,
67,
11677,
16,
374,
16,
2149,
16541,
1622,
18,
13204,
67,
17836,
67,
12959,
11677,
1769,
3639,
368,
1699,
855,
471,
1045,
471,
2657,
3808,
364,
729,
315,
3813,
22,
6,
3639,
6166,
18,
8838,
952,
12,
3146,
16,
467,
67,
4747,
9155,
18,
8025,
23213,
2579,
1013,
67,
4714,
16,
315,
3813,
22,
3113,
2149,
5041,
694,
18,
23330,
67,
6949,
397,
2149,
5041,
694,
18,
23330,
67,
11677,
397,
2149,
5041,
694,
18,
23330,
67,
17541,
67,
22224,
16,
374,
16,
2149,
16541,
1622,
18,
13204,
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,
1842,
6024,
6521,
1435,
1216,
4206,
288,
3639,
14371,
6166,
273,
28287,
5621,
2398,
3376,
2932,
22218,
3808,
4371,
364,
279,
729,
8863,
7734,
514,
1058,
273,
2206,
5609,
21,
19,
2433,
21,
18,
2620,
14432,
3639,
6166,
18,
739,
1420,
12,
3146,
1769,
3639,
368,
5612,
326,
1058,
4371,
364,
326,
7434,
3639,
368,
1206,
777,
315,
6588,
6,
1041,
4371,
540,
6166,
18,
8838,
952,
12,
3146,
16,
467,
67,
4747,
9155,
18,
8025,
23213,
2579,
1013,
67,
8468,
16,
10319,
18,
588,
1868,
6588,
7675,
588,
1114,
6588,
9334,
374,
16,
374,
16,
2149,
16541,
1622,
18,
13204,
67,
17836,
67,
12959,
11677,
1769,
3639,
368,
1699,
855,
471,
1045,
364,
729,
315,
2
] |
limit = itemMatcher.group(3).startsWith( "<" ) ? 0 : df.parse( itemMatcher.group(3) ).intValue();
|
limit = itemMatcher.group(3).startsWith( "<" ) ? 0 : COMMA_FORMAT.parse( itemMatcher.group(3) ).intValue();
|
public static void update( String storeText, boolean isPriceManagement ) { potentialEarnings = 0; ArrayList newItems = new ArrayList(); if ( isPriceManagement ) { int itemID, quantity, price, limit, lowest; // The item matcher here examines each row in the table // displayed in the price management page. Matcher priceMatcher = Pattern.compile( "<tr><td><b>(.*?)\\ .*?<td>([\\d,]+)</td>.*?\"(\\d+)\" name=price(\\d+).*?value=\"(\\d+)\".*?<td>([\\d,]+)</td>" ).matcher( storeText ); try { while ( priceMatcher.find() ) { itemID = Integer.parseInt( priceMatcher.group(4) ); if ( TradeableItemDatabase.getItemName( itemID ) == null ) TradeableItemDatabase.registerItem( itemID, priceMatcher.group(1) ); quantity = df.parse( priceMatcher.group(2) ).intValue(); price = df.parse( priceMatcher.group(3) ).intValue(); limit = df.parse( priceMatcher.group(5) ).intValue(); lowest = df.parse( priceMatcher.group(6) ).intValue(); // Now that all the data has been retrieved, register // the item that was discovered. newItems.add( registerItem( itemID, quantity, price, limit, lowest ) ); } } catch ( Exception e ) { // This should not happen. Therefore, print // a stack trace for debug purposes. StaticEntity.printStackTrace( e ); } } else { AdventureResult item; int itemID, price, limit; // The item matcher here examines each row in the table // displayed in the standard item-addition page. Matcher itemMatcher = Pattern.compile( "<tr><td><img src.*?></td><td>(.*?)</td><td>([\\d,]+)</td><td>(.*?)</td><td.*?(\\d+)" ).matcher( storeText ); try { while ( itemMatcher.find() ) { itemID = Integer.parseInt( itemMatcher.group(4) ); if ( TradeableItemDatabase.getItemName( itemID ) == null ) { String itemName = itemMatcher.group(1); if ( itemName.indexOf( "(" ) != -1 ) itemName = itemName.substring( 0, itemName.indexOf( "(" ) ).trim(); TradeableItemDatabase.registerItem( itemID, itemName ); } // Remove parenthesized number and match again. StringTokenizer parsedItem = new StringTokenizer( itemMatcher.group(1), "()" ); String name = parsedItem.nextToken().trim(); int count = 1; if ( parsedItem.hasMoreTokens() ) { try { count = df.parse( parsedItem.nextToken() ).intValue(); } catch ( Exception e ) { // This should not happen. Therefore, print // a stack trace for debug purposes. StaticEntity.printStackTrace( e ); } } item = new AdventureResult( name, count, false ); price = df.parse( itemMatcher.group(2) ).intValue(); // In this case, the limit could appear as "unlimited", // which equates to a limit of 0. limit = itemMatcher.group(3).startsWith( "<" ) ? 0 : df.parse( itemMatcher.group(3) ).intValue(); // Now that all the data has been retrieved, register // the item that was discovered. newItems.add( registerItem( item.getItemID(), item.getCount(), price, limit, 0 ) ); } } catch ( Exception e ) { // This should not happen. Therefore, print // a stack trace for debug purposes. StaticEntity.printStackTrace( e ); } } soldItemList.retainAll( newItems ); sortedSoldItemList.retainAll( newItems ); sortItemsByName = true; soldItemList.sort(); sortItemsByName = false; sortedSoldItemList.sort(); // Now, update the title of the store manage // frame to reflect the new price. KoLFrame [] frames = new KoLFrame[ existingFrames.size() ]; existingFrames.toArray( frames ); for ( int i = 0; i < frames.length; ++i ) if ( frames[i] instanceof StoreManageFrame ) frames[i].setTitle( "Store Manager (potential earnings: " + df.format( potentialEarnings ) + " meat)" ); }
|
50364 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50364/3446151a75a0bb8756fa27b42f6ae5047201cd09/StoreManager.java/clean/src/net/sourceforge/kolmafia/StoreManager.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
1089,
12,
514,
1707,
1528,
16,
1250,
353,
5147,
10998,
262,
202,
95,
202,
202,
26451,
41,
1303,
899,
273,
374,
31,
202,
202,
19558,
394,
3126,
273,
394,
2407,
5621,
202,
202,
430,
261,
353,
5147,
10998,
262,
202,
202,
95,
1082,
202,
474,
761,
734,
16,
10457,
16,
6205,
16,
1800,
16,
11981,
31,
1082,
202,
759,
1021,
761,
4546,
2674,
19707,
1465,
1517,
1027,
316,
326,
1014,
1082,
202,
759,
10453,
316,
326,
6205,
11803,
1363,
18,
1082,
202,
6286,
6205,
6286,
273,
6830,
18,
11100,
12,
3532,
313,
4438,
4465,
4438,
70,
34,
21110,
1695,
10,
10600,
31,
23498,
32,
4465,
34,
3816,
1695,
72,
16,
7941,
1757,
4465,
34,
23498,
2412,
24480,
72,
6975,
2412,
508,
33,
8694,
24480,
72,
15,
31376,
35,
1132,
5189,
24480,
72,
6975,
2412,
23498,
32,
4465,
34,
3816,
1695,
72,
16,
7941,
1757,
4465,
2984,
262,
18,
22761,
12,
1707,
1528,
11272,
1082,
202,
698,
1082,
202,
95,
9506,
202,
17523,
261,
6205,
6286,
18,
4720,
1435,
262,
9506,
202,
95,
6862,
202,
1726,
734,
273,
2144,
18,
2670,
1702,
12,
6205,
6286,
18,
1655,
12,
24,
13,
11272,
6862,
202,
430,
261,
2197,
323,
429,
1180,
4254,
18,
588,
1180,
461,
12,
761,
734,
262,
422,
446,
262,
25083,
202,
22583,
429,
1180,
4254,
18,
4861,
1180,
12,
761,
734,
16,
6205,
6286,
18,
1655,
12,
21,
13,
11272,
6862,
202,
16172,
273,
3013,
18,
2670,
12,
6205,
6286,
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,
760,
918,
1089,
12,
514,
1707,
1528,
16,
1250,
353,
5147,
10998,
262,
202,
95,
202,
202,
26451,
41,
1303,
899,
273,
374,
31,
202,
202,
19558,
394,
3126,
273,
394,
2407,
5621,
202,
202,
430,
261,
353,
5147,
10998,
262,
202,
202,
95,
1082,
202,
474,
761,
734,
16,
10457,
16,
6205,
16,
1800,
16,
11981,
31,
1082,
202,
759,
1021,
761,
4546,
2674,
19707,
1465,
1517,
1027,
316,
326,
1014,
1082,
202,
759,
10453,
316,
326,
6205,
11803,
1363,
18,
1082,
202,
6286,
6205,
6286,
273,
6830,
18,
11100,
12,
3532,
313,
4438,
4465,
4438,
70,
34,
21110,
1695,
10,
10600,
31,
23498,
32,
4465,
34,
3816,
1695,
72,
16,
7941,
1757,
4465,
34,
2
] |
if ((seen == INVOKEVIRTUAL) || (seen == INVOKESPECIAL) || (seen == INVOKEINTERFACE) || (seen == INVOKESTATIC)) {
|
if ((seen == INVOKEVIRTUAL) || (seen == INVOKESPECIAL) || (seen == INVOKEINTERFACE) || (seen == INVOKESTATIC))
|
public void sawOpcode(int seen) { switch(seen) { case ARETURN: case IRETURN: case LRETURN: case RETURN: case DRETURN: case FRETURN: seenTransferOfControl = true; } if (seenTransferOfControl) return; if ((seen == INVOKEVIRTUAL) || (seen == INVOKESPECIAL) || (seen == INVOKEINTERFACE) || (seen == INVOKESTATIC)) { if (getClassConstantOperand().equals(getClassName()) && getNameConstantOperand().equals(getMethodName()) && getSigConstantOperand().equals(getMethodSig())) bugReporter.reportBug(new BugInstance("IL_INFINITE_RECURSIVE_LOOP", HIGH_PRIORITY) .addClassAndMethod(this)); } }
|
7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/3e2bf37e6d8f82d0a920752395bf935fb181fd6d/InfiniteRecursiveLoop.java/clean/findbugs/src/java/edu/umd/cs/findbugs/detect/InfiniteRecursiveLoop.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
19821,
22808,
12,
474,
5881,
13,
288,
202,
202,
9610,
12,
15156,
13,
288,
1082,
202,
3593,
432,
14033,
30,
1082,
202,
3593,
467,
14033,
30,
1082,
202,
3593,
511,
14033,
30,
1082,
202,
3593,
14780,
30,
1082,
202,
3593,
463,
14033,
30,
1082,
202,
3593,
478,
14033,
30,
9506,
202,
15156,
5912,
951,
3367,
273,
638,
31,
1082,
202,
97,
202,
202,
430,
261,
15156,
5912,
951,
3367,
13,
327,
31,
9506,
202,
430,
14015,
15156,
422,
29666,
26854,
13,
747,
261,
15156,
422,
20694,
3991,
10106,
6365,
13,
747,
261,
15156,
422,
29666,
18865,
13,
747,
261,
15156,
422,
20694,
11027,
11781,
3719,
288,
1082,
202,
430,
261,
588,
797,
6902,
10265,
7675,
14963,
12,
588,
3834,
10756,
9506,
565,
597,
1723,
6902,
10265,
7675,
14963,
12,
588,
11666,
10756,
9506,
565,
597,
1322,
360,
6902,
10265,
7675,
14963,
12,
588,
1305,
8267,
1435,
3719,
9506,
202,
925,
13289,
18,
6006,
19865,
12,
2704,
16907,
1442,
2932,
2627,
67,
706,
7263,
5398,
67,
862,
7509,
24870,
67,
28677,
3113,
23472,
67,
19804,
13,
6862,
3639,
263,
1289,
797,
1876,
1305,
12,
2211,
10019,
1082,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
19821,
22808,
12,
474,
5881,
13,
288,
202,
202,
9610,
12,
15156,
13,
288,
1082,
202,
3593,
432,
14033,
30,
1082,
202,
3593,
467,
14033,
30,
1082,
202,
3593,
511,
14033,
30,
1082,
202,
3593,
14780,
30,
1082,
202,
3593,
463,
14033,
30,
1082,
202,
3593,
478,
14033,
30,
9506,
202,
15156,
5912,
951,
3367,
273,
638,
31,
1082,
202,
97,
202,
202,
430,
261,
15156,
5912,
951,
3367,
13,
327,
31,
9506,
202,
430,
14015,
15156,
422,
29666,
26854,
13,
747,
261,
15156,
422,
20694,
3991,
10106,
6365,
13,
747,
261,
15156,
422,
29666,
18865,
13,
747,
261,
15156,
422,
20694,
11027,
11781,
3719,
288,
1082,
202,
430,
261,
588,
797,
6902,
10265,
7675,
2
] |
+ bytes[i + 1] << 8 + bytes[i + 2] << 16 + bytes[i + 3] << 24;
|
+ (bytes[i + 1] << 8) + (bytes[i + 2] << 16) + (bytes[i + 3] << 24);
|
public static void fillIntArrayFromBytes(byte[] bytes, int[] ints) { int ic = 0; for (int i = 0; i < (ints.length << 2); i += 4) { ints[ic++] = bytes[i] + bytes[i + 1] << 8 + bytes[i + 2] << 16 + bytes[i + 3] << 24; } }
|
50287 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50287/0400e73e7503ab43211657c44d8448afd6346cce/Util.java/clean/src/freenet/crypt/Util.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
3636,
1702,
1076,
29930,
12,
7229,
8526,
1731,
16,
509,
8526,
15542,
13,
288,
202,
202,
474,
13579,
273,
374,
31,
202,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
261,
28142,
18,
2469,
2296,
576,
1769,
277,
1011,
1059,
13,
288,
1082,
202,
28142,
63,
335,
9904,
65,
273,
9506,
202,
3890,
63,
77,
65,
6862,
202,
15,
1731,
63,
77,
397,
404,
65,
2296,
1725,
6862,
202,
15,
1731,
63,
77,
397,
576,
65,
2296,
2872,
6862,
202,
15,
1731,
63,
77,
397,
890,
65,
2296,
4248,
31,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
3636,
1702,
1076,
29930,
12,
7229,
8526,
1731,
16,
509,
8526,
15542,
13,
288,
202,
202,
474,
13579,
273,
374,
31,
202,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
261,
28142,
18,
2469,
2296,
576,
1769,
277,
1011,
1059,
13,
288,
1082,
202,
28142,
63,
335,
9904,
65,
273,
9506,
202,
3890,
63,
77,
65,
6862,
202,
15,
1731,
63,
77,
397,
404,
65,
2296,
1725,
6862,
202,
15,
1731,
63,
77,
397,
576,
65,
2296,
2872,
6862,
202,
15,
1731,
63,
77,
397,
890,
65,
2296,
4248,
31,
202,
202,
97,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
public double[][] assignGasteigerPiMarsiliFactors(ISetOfAtomContainers setAc) { //a,b,c,denom,chi,q double[][] gasteigerFactors = new double[setAc.getAtomContainerCount()][(setAc.getAtomContainer(0).getAtomCount() * (STEP_SIZE+1))]; String AtomSymbol = ""; double[] factors = new double[]{0.0, 0.0, 0.0}; for( int k = 1 ; k < setAc.getAtomContainerCount(); k ++){ IAtomContainer ac = setAc.getAtomContainer(k); for (int i = 0; i < ac.getAtomCount(); i++) { factors[0] = 0.0; factors[1] = 0.0; factors[2] = 0.0; AtomSymbol = ac.getAtomAt(i).getSymbol(); if (AtomSymbol.equals("H")) { factors[0] = 0.0; factors[1] = 0.0; factors[2] = 0.0; } else if (AtomSymbol.equals("C")) {// if (ac.getAtomAt(i).getFlag(ISCHANGEDFC)) { factors[0] = 5.60; factors[1] = 8.93; factors[2] = 2.94;// } } else if (AtomSymbol.equals("O")) {// if (ac.getAtomAt(i).getFlag(ISCHANGEDFC)) { if(ac.getMaximumBondOrder(ac.getAtomAt(i)) == 1){ factors[0] = 10.0; factors[1] = 13.86; factors[2] = 9.68; }else { factors[0] = 7.91; factors[1] = 14.76; factors[2] = 6.85; }// } } else if (AtomSymbol.equals("F")) { factors[0] = 7.34; factors[1] = 13.86; factors[2] = 9.68; } gasteigerFactors[k][STEP_SIZE * i + i] = factors[0]; gasteigerFactors[k][STEP_SIZE * i + i + 1] = factors[1]; gasteigerFactors[k][STEP_SIZE * i + i + 2] = factors[2]; if(ac.getAtomAt(i).getFlag(ISCHANGEDFC)){// System.out.println("S: "+AtomSymbol+" "+ac.getAtomAt(i).getCharge()); gasteigerFactors[k][STEP_SIZE * i + i + 5] = ac.getAtomAt(i).getCharge(); }// else{// gasteigerFactors[k][STEP_SIZE * i + i + 5] = 0.0;// ac.getAtomAt(i).setCharge(0.0);// } if (factors[0] == 0 && factors[1] == 0 && factors[2] == 0) { gasteigerFactors[k][STEP_SIZE * i + i + 3] = 1; } else { gasteigerFactors[k][STEP_SIZE * i + i + 3] = factors[0] + factors[1] + factors[2]; } } } return gasteigerFactors; }
|
45254 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45254/49e59bcf22f7181b762691cd888cbb5f25102a3d/GasteigerPEPEPartialCharges.java/clean/src/org/openscience/cdk/charges/GasteigerPEPEPartialCharges.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
9056,
63,
6362,
65,
6145,
43,
14725,
360,
264,
16539,
49,
5913,
15700,
23535,
12,
45,
694,
951,
3641,
11177,
542,
9988,
15329,
202,
202,
759,
69,
16,
70,
16,
71,
16,
13002,
362,
16,
24010,
16,
85,
202,
202,
9056,
63,
6362,
65,
75,
14725,
360,
264,
23535,
33,
2704,
9056,
63,
542,
9988,
18,
588,
3641,
2170,
1380,
1435,
6362,
12,
542,
9988,
18,
588,
3641,
2170,
12,
20,
2934,
588,
3641,
1380,
1435,
21556,
26951,
67,
4574,
15,
21,
3719,
15533,
202,
202,
780,
3641,
5335,
1546,
14432,
202,
202,
9056,
8526,
22108,
33,
2704,
9056,
63,
7073,
20,
18,
20,
16,
20,
18,
20,
16,
20,
18,
20,
20451,
202,
202,
1884,
12,
474,
79,
33,
21,
31,
79,
32,
542,
9988,
18,
588,
3641,
2170,
1380,
5621,
79,
27245,
95,
1082,
202,
45,
3641,
2170,
1077,
33,
542,
9988,
18,
588,
3641,
2170,
12,
79,
1769,
6862,
202,
1884,
12,
474,
77,
33,
20,
31,
77,
32,
1077,
18,
588,
3641,
1380,
5621,
77,
27245,
95,
1082,
202,
22108,
63,
20,
65,
33,
20,
18,
20,
31,
1082,
202,
22108,
63,
21,
65,
33,
20,
18,
20,
31,
1082,
202,
22108,
63,
22,
65,
33,
20,
18,
20,
31,
1082,
202,
3641,
5335,
33,
1077,
18,
588,
3641,
861,
12,
77,
2934,
588,
5335,
5621,
1082,
202,
430,
12,
3641,
5335,
18,
14963,
2932,
44,
6,
3719,
95,
9506,
202,
22108,
63,
20,
65,
33,
20,
18,
20,
31,
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,
9056,
63,
6362,
65,
6145,
43,
14725,
360,
264,
16539,
49,
5913,
15700,
23535,
12,
45,
694,
951,
3641,
11177,
542,
9988,
15329,
202,
202,
759,
69,
16,
70,
16,
71,
16,
13002,
362,
16,
24010,
16,
85,
202,
202,
9056,
63,
6362,
65,
75,
14725,
360,
264,
23535,
33,
2704,
9056,
63,
542,
9988,
18,
588,
3641,
2170,
1380,
1435,
6362,
12,
542,
9988,
18,
588,
3641,
2170,
12,
20,
2934,
588,
3641,
1380,
1435,
21556,
26951,
67,
4574,
15,
21,
3719,
15533,
202,
202,
780,
3641,
5335,
1546,
14432,
202,
202,
9056,
8526,
22108,
33,
2704,
9056,
63,
7073,
20,
18,
20,
16,
20,
18,
20,
16,
20,
18,
20,
20451,
202,
202,
1884,
2
] |
||
> Constants.XSLTVERSUPPORTED) || (!uri.equals(Constants.S_XSLNAMESPACEURL) && currentProcessor instanceof ProcessorStylesheetElement)))
|
> Constants.XSLTVERSUPPORTED) ||(!uri.equals(Constants.S_XSLNAMESPACEURL) && currentProcessor instanceof ProcessorStylesheetElement) || getElemVersion() > Constants.XSLTVERSUPPORTED ))
|
XSLTElementProcessor getProcessorFor( String uri, String localName, String rawName) throws org.xml.sax.SAXException { XSLTElementProcessor currentProcessor = getCurrentProcessor(); XSLTElementDef def = currentProcessor.getElemDef(); XSLTElementProcessor elemProcessor = def.getProcessorFor(uri, localName); if (null == elemProcessor && ((null == getStylesheet() || Double.valueOf(getStylesheet().getVersion()).doubleValue() > Constants.XSLTVERSUPPORTED) || (!uri.equals(Constants.S_XSLNAMESPACEURL) && currentProcessor instanceof ProcessorStylesheetElement))) { elemProcessor = def.getProcessorForUnknown(uri, localName); } if (null == elemProcessor) error(rawName + " is not allowed in this position in the stylesheet!", null); return elemProcessor; }
|
2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/654a0e9991a3656bee1bd9cfa3939c47b480d2c5/StylesheetHandler.java/clean/src/org/apache/xalan/processor/StylesheetHandler.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
20751,
1046,
5164,
336,
5164,
1290,
12,
1850,
514,
2003,
16,
514,
11927,
16,
514,
1831,
461,
13,
5411,
1216,
2358,
18,
2902,
18,
87,
651,
18,
55,
2501,
503,
225,
288,
565,
20751,
1046,
5164,
783,
5164,
273,
5175,
5164,
5621,
565,
20751,
1046,
3262,
1652,
273,
783,
5164,
18,
588,
7498,
3262,
5621,
565,
20751,
1046,
5164,
3659,
5164,
273,
1652,
18,
588,
5164,
1290,
12,
1650,
16,
11927,
1769,
565,
309,
261,
2011,
422,
3659,
5164,
5411,
597,
14015,
2011,
422,
336,
24656,
1435,
7734,
747,
3698,
18,
1132,
951,
12,
588,
24656,
7675,
588,
1444,
1435,
2934,
9056,
620,
1435,
10402,
405,
5245,
18,
60,
4559,
56,
2204,
21134,
13,
747,
4766,
27573,
16051,
1650,
18,
14963,
12,
2918,
18,
55,
67,
60,
4559,
11368,
1785,
13,
597,
7734,
783,
5164,
1276,
15476,
24656,
1046,
20349,
565,
288,
1377,
3659,
5164,
273,
1652,
18,
588,
5164,
1290,
4874,
12,
1650,
16,
11927,
1769,
565,
289,
565,
309,
261,
2011,
422,
3659,
5164,
13,
1377,
555,
12,
1899,
461,
397,
315,
353,
486,
2935,
316,
333,
1754,
316,
326,
13820,
5,
3113,
5411,
446,
1769,
10792,
327,
3659,
5164,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
20751,
1046,
5164,
336,
5164,
1290,
12,
1850,
514,
2003,
16,
514,
11927,
16,
514,
1831,
461,
13,
5411,
1216,
2358,
18,
2902,
18,
87,
651,
18,
55,
2501,
503,
225,
288,
565,
20751,
1046,
5164,
783,
5164,
273,
5175,
5164,
5621,
565,
20751,
1046,
3262,
1652,
273,
783,
5164,
18,
588,
7498,
3262,
5621,
565,
20751,
1046,
5164,
3659,
5164,
273,
1652,
18,
588,
5164,
1290,
12,
1650,
16,
11927,
1769,
565,
309,
261,
2011,
422,
3659,
5164,
5411,
597,
14015,
2011,
422,
336,
24656,
1435,
7734,
747,
3698,
18,
1132,
951,
12,
588,
24656,
7675,
588,
1444,
1435,
2934,
9056,
620,
1435,
10402,
405,
5245,
18,
60,
4559,
56,
2204,
21134,
13,
747,
4766,
27573,
16051,
2
] |
final X86RegisterPool pool = eContext.getPool(); pool.visitUsedRegisters(new RegisterVisitor() {
|
final X86RegisterPool pool = eContext.getPool(); pool.visitUsedRegisters(new RegisterVisitor() {
|
public void endInstruction() { // In debug mode, do a lot of verifications if (paranoia) { // Verify the register usage // No registers can be in use, unless they are on the virtual stack. final X86RegisterPool pool = eContext.getPool(); pool.visitUsedRegisters(new RegisterVisitor() { public void visit(Register reg) { if (!vstack.uses(reg)) { throw new InternalError("Register " + reg + " is in use outsite of the vstack in method " + currentMethod + " at bytecode address " + curAddress); } } }); // All items on the FPU stack must also be on the vstack. vstack.fpuStack.visitItems(new ItemVisitor() { public void visit(Item item) { if (!vstack.contains(item)) { throw new InternalError( "Item " + item + " is not on the vstack, but still of the fpu stack in method " + currentMethod + " at address " + curAddress); } } }); // No item on the vstack may have been released (kind==0) vstack.visitItems(new ItemVisitor() { public void visit(Item item) { if (item.getKind() == 0) { throw new InternalError("Item " + item + " is kind 0 in method " + currentMethod + " at address " + curAddress); } if (item.isRegister()) { if (item instanceof WordItem) { if (pool.getOwner(((WordItem) item).getRegister()) != item) { throw new InternalError( "Item " + item + " uses a register which is not registered in the register ppol in method " + currentMethod + " at address " + curAddress); } } else { if (pool.getOwner(((DoubleWordItem) item) .getLsbRegister()) != item) { throw new InternalError( "Item " + item + " uses an LSB register which is not registered in the register ppol in method " + currentMethod + " at address " + curAddress); } if (pool.getOwner(((DoubleWordItem) item) .getMsbRegister()) != item) { throw new InternalError( "Item " + item + " uses an MSB register which is not registered in the register ppol in method " + currentMethod + " at address " + curAddress); } } } } }); } }
|
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/4c9e1b93fdcd3878abf615621ec6a36bf839ab10/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
679,
11983,
1435,
288,
202,
202,
759,
657,
1198,
1965,
16,
741,
279,
17417,
434,
1924,
6640,
202,
202,
430,
261,
1065,
31922,
1155,
13,
288,
1082,
202,
759,
8553,
326,
1744,
4084,
1082,
202,
759,
2631,
10285,
848,
506,
316,
999,
16,
3308,
2898,
854,
603,
326,
5024,
2110,
18,
1082,
202,
6385,
1139,
5292,
3996,
2864,
2845,
273,
425,
1042,
18,
588,
2864,
5621,
1082,
202,
6011,
18,
11658,
6668,
10277,
12,
2704,
5433,
7413,
1435,
288,
9506,
202,
482,
918,
3757,
12,
3996,
960,
13,
288,
6862,
202,
430,
16051,
90,
3772,
18,
6117,
12,
1574,
3719,
288,
25083,
202,
12849,
394,
3186,
668,
2932,
3996,
315,
397,
960,
6862,
9506,
202,
15,
315,
353,
316,
999,
596,
4256,
434,
326,
19510,
316,
707,
315,
6862,
9506,
202,
15,
783,
1305,
397,
315,
622,
22801,
1758,
315,
6862,
9506,
202,
15,
662,
1887,
1769,
6862,
202,
97,
9506,
202,
97,
1082,
202,
22938,
1082,
202,
759,
4826,
1516,
603,
326,
478,
18061,
2110,
1297,
2546,
506,
603,
326,
19510,
18,
1082,
202,
90,
3772,
18,
7944,
89,
2624,
18,
11658,
3126,
12,
2704,
4342,
7413,
1435,
288,
9506,
202,
482,
918,
3757,
12,
1180,
761,
13,
288,
6862,
202,
430,
16051,
90,
3772,
18,
12298,
12,
1726,
3719,
288,
25083,
202,
12849,
394,
3186,
668,
12,
6862,
9506,
202,
6,
1180,
315,
6862,
25083,
202,
15,
761,
6862,
25083,
202,
15,
315,
353,
486,
603,
326,
19510,
16,
1496,
4859,
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,
679,
11983,
1435,
288,
202,
202,
759,
657,
1198,
1965,
16,
741,
279,
17417,
434,
1924,
6640,
202,
202,
430,
261,
1065,
31922,
1155,
13,
288,
1082,
202,
759,
8553,
326,
1744,
4084,
1082,
202,
759,
2631,
10285,
848,
506,
316,
999,
16,
3308,
2898,
854,
603,
326,
5024,
2110,
18,
1082,
202,
6385,
1139,
5292,
3996,
2864,
2845,
273,
425,
1042,
18,
588,
2864,
5621,
1082,
202,
6011,
18,
11658,
6668,
10277,
12,
2704,
5433,
7413,
1435,
288,
9506,
202,
482,
918,
3757,
12,
3996,
960,
13,
288,
6862,
202,
430,
16051,
90,
3772,
18,
6117,
12,
1574,
3719,
288,
25083,
202,
12849,
394,
3186,
668,
2932,
3996,
315,
397,
960,
6862,
9506,
202,
2
] |
ExecSQL(" ");
|
clearWarnings(); ExecSQL("show datestyle"); clearWarnings();
|
public Connection(String host, int port, Properties info, String database, String url, Driver d) throws SQLException { int len = 288; // Length of a startup packet this_driver = d; this_url = new String(url); PG_DATABASE = new String(database); PG_PASSWORD = new String(info.getProperty("password")); PG_USER = new String(info.getProperty("user")); PG_PORT = port; PG_HOST = new String(host); PG_STATUS = CONNECTION_BAD; try { pg_stream = new PG_Stream(host, port); } catch (IOException e) { throw new SQLException ("Connection failed: " + e.toString()); } // Now we need to construct and send a startup packet try { pg_stream.SendInteger(len, 4); len -= 4; pg_stream.SendInteger(STARTUP_CODE, 4); len -= 4; pg_stream.Send(database.getBytes(), 64); len -= 64; pg_stream.Send(PG_USER.getBytes(), len); } catch (IOException e) { throw new SQLException("Connection failed: " + e.toString()); } ExecSQL(" "); // Test connection PG_STATUS = CONNECTION_OK; }
|
49504 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49504/0e583068579748ad528685fa6040636b374177c6/Connection.java/clean/src/interfaces/jdbc/postgresql/Connection.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
4050,
12,
780,
1479,
16,
509,
1756,
16,
6183,
1123,
16,
514,
2063,
16,
514,
880,
16,
9396,
302,
13,
1216,
6483,
225,
288,
565,
509,
562,
273,
576,
5482,
31,
1082,
202,
759,
11311,
434,
279,
11850,
4414,
3639,
333,
67,
7407,
273,
302,
31,
565,
333,
67,
718,
273,
394,
514,
12,
718,
1769,
565,
22116,
67,
22366,
273,
394,
514,
12,
6231,
1769,
565,
22116,
67,
13784,
273,
394,
514,
12,
1376,
18,
588,
1396,
2932,
3664,
7923,
1769,
565,
22116,
67,
4714,
273,
394,
514,
12,
1376,
18,
588,
1396,
2932,
1355,
7923,
1769,
565,
22116,
67,
6354,
273,
1756,
31,
565,
22116,
67,
8908,
273,
394,
514,
12,
2564,
1769,
565,
22116,
67,
8608,
273,
20695,
67,
16234,
31,
3639,
775,
1377,
288,
202,
8365,
67,
3256,
273,
394,
22116,
67,
1228,
12,
2564,
16,
1756,
1769,
1377,
289,
1044,
261,
14106,
425,
13,
288,
202,
12849,
394,
6483,
7566,
1952,
2535,
30,
315,
397,
425,
18,
10492,
10663,
1377,
289,
5411,
368,
4494,
732,
1608,
358,
4872,
471,
1366,
279,
11850,
4414,
1377,
775,
202,
95,
202,
225,
7184,
67,
3256,
18,
3826,
4522,
12,
1897,
16,
1059,
1769,
1082,
202,
1897,
3947,
1059,
31,
202,
225,
7184,
67,
3256,
18,
3826,
4522,
12,
7570,
3079,
67,
5572,
16,
1059,
1769,
202,
202,
1897,
3947,
1059,
31,
202,
225,
7184,
67,
3256,
18,
3826,
12,
6231,
18,
588,
2160,
9334,
5178,
1769,
202,
1897,
3947,
5178,
31,
202,
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,
282,
1071,
4050,
12,
780,
1479,
16,
509,
1756,
16,
6183,
1123,
16,
514,
2063,
16,
514,
880,
16,
9396,
302,
13,
1216,
6483,
225,
288,
565,
509,
562,
273,
576,
5482,
31,
1082,
202,
759,
11311,
434,
279,
11850,
4414,
3639,
333,
67,
7407,
273,
302,
31,
565,
333,
67,
718,
273,
394,
514,
12,
718,
1769,
565,
22116,
67,
22366,
273,
394,
514,
12,
6231,
1769,
565,
22116,
67,
13784,
273,
394,
514,
12,
1376,
18,
588,
1396,
2932,
3664,
7923,
1769,
565,
22116,
67,
4714,
273,
394,
514,
12,
1376,
18,
588,
1396,
2932,
1355,
7923,
1769,
565,
22116,
67,
6354,
273,
1756,
31,
565,
22116,
67,
8908,
273,
394,
514,
12,
2564,
1769,
565,
22116,
2
] |
public void setPermissions( int perm ) { this.permissions = perm;
|
public void setPermissions( String str ) throws SyntaxException { StringTokenizer tokenizer = new StringTokenizer( str, ",= " ); String token; int shift = -1; while ( tokenizer.hasMoreTokens() ) { token = tokenizer.nextToken(); if ( token.equalsIgnoreCase( USER_STRING ) ) shift = 6; else if ( token.equalsIgnoreCase( GROUP_STRING ) ) shift = 3; else if ( token.equalsIgnoreCase( DEFAULT_STRING ) ) shift = 0; else { char modifier = token.charAt( 0 ); if ( !( modifier == '+' || modifier == '-' ) ) throw new SyntaxException( "expected modifier +|-" ); else token = token.substring( 1 ); if ( token.length() == 0 ) throw new SyntaxException( "'read', 'write' or 'update' " + "expected in permission string" ); int perm; if ( token.equalsIgnoreCase( "read" ) ) perm = READ; else if ( token.equalsIgnoreCase( "write" ) ) perm = WRITE; else perm = UPDATE; switch ( modifier ) { case '+': permissions = permissions | ( perm << shift ); break; default: permissions = permissions & ( ~( perm << shift ) ); break; } } }
|
public void setPermissions( int perm ) { this.permissions = perm; }
|
2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/9970d54c729a5d70497a762d843a9babeb685de1/Permission.java/buggy/src/org/exist/security/Permission.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
6521,
12,
509,
4641,
262,
288,
3639,
333,
18,
9612,
273,
4641,
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,
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,
444,
6521,
12,
509,
4641,
262,
288,
3639,
333,
18,
9612,
273,
4641,
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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
_t = __t2105;
|
_t = __t2106;
|
public final void titlephrase(AST _t) throws RecognitionException { AST titlephrase_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t2103 = _t; AST tmp2291_AST_in = (AST)_t; match(_t,TITLE); _t = _t.getFirstChild(); { _loop2107: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case BGCOLOR: case DCOLOR: case FGCOLOR: case PFCOLOR: { color_expr(_t); _t = _retTree; break; } case COLOR: { AST __t2105 = _t; AST tmp2292_AST_in = (AST)_t; match(_t,COLOR); _t = _t.getFirstChild(); anyorvalue(_t); _t = _retTree; _t = __t2105; _t = _t.getNextSibling(); break; } case FONT: { AST __t2106 = _t; AST tmp2293_AST_in = (AST)_t; match(_t,FONT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2106; _t = _t.getNextSibling(); break; } default: { break _loop2107; } } } while (true); } expression(_t); _t = _retTree; _t = __t2103; _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,
2077,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2077,
9429,
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,
22,
23494,
273,
389,
88,
31,
202,
202,
9053,
1853,
3787,
12416,
67,
9053,
67,
267,
273,
261,
9053,
13,
67,
88,
31,
202,
202,
1916,
24899,
88,
16,
14123,
1769,
202,
202,
67,
88,
273,
389,
88,
18,
588,
3759,
1763,
5621,
202,
202,
95,
202,
202,
67,
6498,
22,
23054,
30,
202,
202,
2896,
288,
1082,
202,
430,
261,
67,
88,
631,
2011,
13,
389,
88,
33,
9053,
8560,
31,
1082,
202,
9610,
261,
389,
88,
18,
588,
559,
10756,
288,
1082,
202,
3593,
30609,
10989,
30,
1082,
202,
3593,
463,
10989,
30,
1082,
202,
3593,
29086,
10989,
30,
1082,
202,
3593,
453,
4488,
1741,
916,
30,
1082,
202,
95,
9506,
202,
3266,
67,
8638,
24899,
88,
1769,
9506,
202,
67,
88,
273,
389,
1349,
2471,
31,
9506,
202,
8820,
31,
1082,
202,
97,
1082,
202,
3593,
15590,
30,
1082,
202,
95,
9506,
202,
9053,
1001,
88,
22,
21661,
273,
389,
88,
31,
9506,
202,
9053,
1853,
3787,
9975,
67,
9053,
67,
267,
273,
261,
9053,
13,
67,
88,
31,
9506,
202,
1916,
24899,
88,
16,
10989,
1769,
9506,
202,
67,
88,
273,
389,
88,
18,
588,
3759,
1763,
5621,
9506,
202,
2273,
280,
1132,
24899,
88,
1769,
9506,
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,
2077,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2077,
9429,
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,
22,
23494,
273,
389,
88,
31,
202,
202,
9053,
1853,
3787,
12416,
67,
9053,
67,
267,
273,
261,
9053,
13,
67,
88,
31,
202,
202,
1916,
24899,
88,
16,
14123,
1769,
202,
202,
67,
88,
273,
389,
88,
18,
588,
3759,
1763,
5621,
202,
202,
95,
202,
202,
67,
6498,
22,
23054,
30,
202,
202,
2896,
288,
1082,
202,
430,
261,
67,
88,
631,
2011,
13,
389,
88,
33,
9053,
8560,
31,
1082,
2
] |
(new com.ibm.math.DiagBigDecimal.Test("flv009")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==java.lang.Float.NEGATIVE_INFINITY;
|
(new Test("flv009")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==java.lang.Float.NEGATIVE_INFINITY;
|
public void diagfloatvalue(){ java.lang.String val; // 1999.03.07 Infinities no longer errors val="-1"; (new com.ibm.math.DiagBigDecimal.Test("flv001")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==((new java.lang.Float(val)).floatValue()); val="-0.1"; (new com.ibm.math.DiagBigDecimal.Test("flv002")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==((new java.lang.Float(val)).floatValue()); val="0"; (new com.ibm.math.DiagBigDecimal.Test("flv003")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==((new java.lang.Float(val)).floatValue()); val="0.1"; (new com.ibm.math.DiagBigDecimal.Test("flv004")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==((new java.lang.Float(val)).floatValue()); val="1"; (new com.ibm.math.DiagBigDecimal.Test("flv005")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==((new java.lang.Float(val)).floatValue()); val="1e200"; (new com.ibm.math.DiagBigDecimal.Test("flv006")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==java.lang.Float.POSITIVE_INFINITY; val="-1e200"; (new com.ibm.math.DiagBigDecimal.Test("flv007")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==java.lang.Float.NEGATIVE_INFINITY; val="1e1000"; (new com.ibm.math.DiagBigDecimal.Test("flv008")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==java.lang.Float.POSITIVE_INFINITY; val="-1e1000"; (new com.ibm.math.DiagBigDecimal.Test("flv009")).ok=((new com.ibm.math.BigDecimal(val)).floatValue())==java.lang.Float.NEGATIVE_INFINITY; summary("floatValue"); return;}
|
5620 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5620/9d7cfece10981dede4d5303274403593abc1a92d/DiagBigDecimal.java/clean/icu4j/src/com/ibm/icu/dev/test/bigdec/DiagBigDecimal.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1071,
918,
6643,
5659,
1132,
1435,
95,
225,
2252,
18,
4936,
18,
780,
1244,
31,
225,
368,
404,
11984,
18,
4630,
18,
8642,
657,
926,
1961,
1158,
7144,
1334,
225,
1244,
1546,
17,
21,
14432,
225,
261,
2704,
532,
18,
10827,
18,
15949,
18,
14058,
29436,
18,
4709,
2932,
2242,
90,
11664,
7923,
2934,
601,
33,
12443,
2704,
532,
18,
10827,
18,
15949,
18,
29436,
12,
1125,
13,
2934,
5659,
620,
10756,
631,
12443,
2704,
2252,
18,
4936,
18,
4723,
12,
1125,
13,
2934,
5659,
620,
10663,
225,
1244,
1546,
17,
20,
18,
21,
14432,
225,
261,
2704,
532,
18,
10827,
18,
15949,
18,
14058,
29436,
18,
4709,
2932,
2242,
90,
24908,
7923,
2934,
601,
33,
12443,
2704,
532,
18,
10827,
18,
15949,
18,
29436,
12,
1125,
13,
2934,
5659,
620,
10756,
631,
12443,
2704,
2252,
18,
4936,
18,
4723,
12,
1125,
13,
2934,
5659,
620,
10663,
225,
1244,
1546,
20,
14432,
225,
261,
2704,
532,
18,
10827,
18,
15949,
18,
14058,
29436,
18,
4709,
2932,
2242,
90,
25425,
7923,
2934,
601,
33,
12443,
2704,
532,
18,
10827,
18,
15949,
18,
29436,
12,
1125,
13,
2934,
5659,
620,
10756,
631,
12443,
2704,
2252,
18,
4936,
18,
4723,
12,
1125,
13,
2934,
5659,
620,
10663,
225,
1244,
1546,
20,
18,
21,
14432,
225,
261,
2704,
532,
18,
10827,
18,
15949,
18,
14058,
29436,
18,
4709,
2932,
2242,
90,
26565,
7923,
2934,
601,
33,
12443,
2704,
532,
18,
10827,
18,
15949,
18,
29436,
12,
1125,
13,
2934,
5659,
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,
1071,
918,
6643,
5659,
1132,
1435,
95,
225,
2252,
18,
4936,
18,
780,
1244,
31,
225,
368,
404,
11984,
18,
4630,
18,
8642,
657,
926,
1961,
1158,
7144,
1334,
225,
1244,
1546,
17,
21,
14432,
225,
261,
2704,
532,
18,
10827,
18,
15949,
18,
14058,
29436,
18,
4709,
2932,
2242,
90,
11664,
7923,
2934,
601,
33,
12443,
2704,
532,
18,
10827,
18,
15949,
18,
29436,
12,
1125,
13,
2934,
5659,
620,
10756,
631,
12443,
2704,
2252,
18,
4936,
18,
4723,
12,
1125,
13,
2934,
5659,
620,
10663,
225,
1244,
1546,
17,
20,
18,
21,
14432,
225,
261,
2704,
532,
18,
10827,
18,
15949,
18,
14058,
29436,
18,
4709,
2932,
2242,
90,
24908,
7923,
2934,
601,
33,
12443,
2704,
2
] |
if (root == null || node == null)
|
if (root == null || node == null || root.equals(node))
|
Object getParent(Object root, Object node) { if (root == null || node == null) return null; if (node instanceof TreeNode) return ((TreeNode) node).getParent(); return findNode(root, node); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/badba23052f905d992da7c32124c28f4339931fc/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1033,
5089,
12,
921,
1365,
16,
1033,
756,
13,
225,
288,
565,
309,
261,
3085,
422,
446,
747,
756,
422,
446,
747,
1365,
18,
14963,
12,
2159,
3719,
1377,
327,
446,
31,
565,
309,
261,
2159,
1276,
20270,
13,
1377,
327,
14015,
12513,
13,
756,
2934,
588,
3054,
5621,
565,
327,
1104,
907,
12,
3085,
16,
756,
1769,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1033,
5089,
12,
921,
1365,
16,
1033,
756,
13,
225,
288,
565,
309,
261,
3085,
422,
446,
747,
756,
422,
446,
747,
1365,
18,
14963,
12,
2159,
3719,
1377,
327,
446,
31,
565,
309,
261,
2159,
1276,
20270,
13,
1377,
327,
14015,
12513,
13,
756,
2934,
588,
3054,
5621,
565,
327,
1104,
907,
12,
3085,
16,
756,
1769,
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
] |
panel.beginSheetForDirectory(null, null, mainWindow, this, new NSSelector("savePanelDidEndReturnCode", new Class[]{NSSavePanel.class, int.class, Object.class}), null); }
|
panel.beginSheetForDirectory(null, null, mainWindow, this, new NSSelector("savePanelDidEndReturnCode", new Class[] {NSSavePanel.class, int.class, Object.class}), null); }
|
public void exportFile(Object sender) { /* IBAction */ System.out.println("exportFile: " + sender);// save(); NSSavePanel panel = NSSavePanel.savePanel(); panel.setCanSelectHiddenExtension(true); panel.setExtensionHidden(false);//panther only? panel.setMessage("Choose the name and location for the exported GEDCOM file.\n\nThe file name should end with .ged");// panel.setNameFieldLabel("Name Field Label:");// panel.setPrompt("Prompt:"); panel.setRequiredFileType("ged");// panel.setTitle("Title"); panel.beginSheetForDirectory(null, null, mainWindow, this, new NSSelector("savePanelDidEndReturnCode", new Class[]{NSSavePanel.class, int.class, Object.class}), null); }
|
6190 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6190/7b30da2f47cbda6e16406770c133332adb1b4079/MyDocument.java/clean/MacPAF/src/MyDocument.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3359,
812,
12,
921,
5793,
13,
288,
1748,
23450,
1803,
1195,
3639,
2332,
18,
659,
18,
8222,
2932,
6530,
812,
30,
315,
397,
5793,
1769,
759,
3639,
1923,
5621,
3639,
423,
1260,
836,
5537,
6594,
273,
423,
1260,
836,
5537,
18,
5688,
5537,
5621,
3639,
6594,
18,
542,
2568,
3391,
9345,
3625,
12,
3767,
1769,
3639,
6594,
18,
542,
3625,
9345,
12,
5743,
1769,
759,
7355,
1136,
1338,
35,
3639,
6594,
18,
542,
1079,
2932,
24529,
326,
508,
471,
2117,
364,
326,
11518,
611,
2056,
4208,
585,
8403,
82,
64,
82,
1986,
585,
508,
1410,
679,
598,
263,
2423,
8863,
759,
3639,
6594,
18,
542,
461,
974,
2224,
2932,
461,
2286,
5287,
2773,
1769,
759,
3639,
6594,
18,
542,
15967,
2932,
15967,
2773,
1769,
3639,
6594,
18,
542,
3705,
28941,
2932,
2423,
8863,
759,
3639,
6594,
18,
542,
4247,
2932,
4247,
8863,
3639,
6594,
18,
10086,
8229,
1290,
2853,
12,
2011,
16,
446,
16,
2774,
3829,
16,
333,
16,
394,
423,
1260,
292,
1229,
2932,
5688,
5537,
18250,
1638,
990,
1085,
3113,
394,
1659,
63,
7073,
50,
1260,
836,
5537,
18,
1106,
16,
509,
18,
1106,
16,
1033,
18,
1106,
97,
3631,
446,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3359,
812,
12,
921,
5793,
13,
288,
1748,
23450,
1803,
1195,
3639,
2332,
18,
659,
18,
8222,
2932,
6530,
812,
30,
315,
397,
5793,
1769,
759,
3639,
1923,
5621,
3639,
423,
1260,
836,
5537,
6594,
273,
423,
1260,
836,
5537,
18,
5688,
5537,
5621,
3639,
6594,
18,
542,
2568,
3391,
9345,
3625,
12,
3767,
1769,
3639,
6594,
18,
542,
3625,
9345,
12,
5743,
1769,
759,
7355,
1136,
1338,
35,
3639,
6594,
18,
542,
1079,
2932,
24529,
326,
508,
471,
2117,
364,
326,
11518,
611,
2056,
4208,
585,
8403,
82,
64,
82,
1986,
585,
508,
1410,
679,
598,
263,
2423,
8863,
759,
3639,
6594,
18,
542,
461,
974,
2224,
2932,
461,
2286,
5287,
2773,
1769,
759,
3639,
2
] |
if (exp instanceof PsiBinaryExpression) {
|
if(exp instanceof PsiBinaryExpression){
|
public static int getPrecendence(PsiExpression exp) { if (exp instanceof PsiThisExpression || exp instanceof PsiLiteralExpression || exp instanceof PsiSuperExpression || exp instanceof PsiReferenceExpression || exp instanceof PsiClassObjectAccessExpression || exp instanceof PsiArrayAccessExpression || exp instanceof PsiArrayInitializerExpression) { return LITERAL_PRECEDENCE; } if (exp instanceof PsiMethodCallExpression) { return METHOD_CALL_PRECEDENCE; } if (exp instanceof PsiTypeCastExpression || exp instanceof PsiNewExpression) { return TYPE_CAST_PRECEDENCE; } if (exp instanceof PsiPrefixExpression) { return PREFIX_PRECEDENCE; } if (exp instanceof PsiPostfixExpression) { return POSTFIX_PRECEDENCE; } if (exp instanceof PsiBinaryExpression) { final PsiJavaToken sign = ((PsiBinaryExpression) exp).getOperationSign(); return precedenceForBinaryOperator(sign); } if (exp instanceof PsiInstanceOfExpression) { return RELATIONAL_PRECEDENCE; } if (exp instanceof PsiConditionalExpression) { return CONDITIONAL_PRECEDENCE; } if (exp instanceof PsiAssignmentExpression) { return ASSIGNMENT_PRECEDENCE; } if (exp instanceof PsiParenthesizedExpression) { return PARENTHESIZED_PRECEDENCE; } return -1; }
|
56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/4dac7d77e908a20a1e98b321a920e69147be84ad/ParenthesesUtils.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/psiutils/ParenthesesUtils.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
509,
12822,
71,
409,
802,
12,
52,
7722,
2300,
1329,
13,
288,
3639,
309,
261,
2749,
1276,
453,
7722,
2503,
2300,
747,
7734,
1329,
1276,
453,
7722,
6177,
2300,
747,
7734,
1329,
1276,
453,
7722,
8051,
2300,
747,
7734,
1329,
1276,
453,
7722,
2404,
2300,
747,
7734,
1329,
1276,
453,
7722,
797,
921,
1862,
2300,
747,
7734,
1329,
1276,
453,
7722,
1076,
1862,
2300,
747,
7734,
1329,
1276,
453,
7722,
1076,
14729,
2300,
13,
288,
5411,
327,
511,
18454,
67,
3670,
23552,
7535,
31,
3639,
289,
3639,
309,
261,
2749,
1276,
453,
7722,
12592,
2300,
13,
288,
5411,
327,
10152,
67,
13730,
67,
3670,
23552,
7535,
31,
3639,
289,
3639,
309,
261,
2749,
1276,
453,
7722,
559,
9735,
2300,
747,
7734,
1329,
1276,
453,
7722,
1908,
2300,
13,
288,
5411,
327,
3463,
67,
21871,
67,
3670,
23552,
7535,
31,
3639,
289,
3639,
309,
261,
2749,
1276,
453,
7722,
2244,
2300,
13,
288,
5411,
327,
17154,
67,
3670,
23552,
7535,
31,
3639,
289,
3639,
309,
261,
2749,
1276,
453,
7722,
24505,
2300,
13,
288,
5411,
327,
5485,
4563,
67,
3670,
23552,
7535,
31,
3639,
289,
3639,
309,
12,
2749,
1276,
453,
7722,
5905,
2300,
15329,
5411,
727,
453,
7722,
5852,
1345,
1573,
273,
14015,
52,
7722,
5905,
2300,
13,
1329,
2934,
588,
2988,
2766,
5621,
5411,
327,
14172,
1290,
5905,
5592,
12,
2977,
1769,
3639,
289,
3639,
309,
261,
2749,
1276,
453,
7722,
1442,
951,
2300,
13,
288,
5411,
327,
31595,
1013,
67,
3670,
23552,
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,
509,
12822,
71,
409,
802,
12,
52,
7722,
2300,
1329,
13,
288,
3639,
309,
261,
2749,
1276,
453,
7722,
2503,
2300,
747,
7734,
1329,
1276,
453,
7722,
6177,
2300,
747,
7734,
1329,
1276,
453,
7722,
8051,
2300,
747,
7734,
1329,
1276,
453,
7722,
2404,
2300,
747,
7734,
1329,
1276,
453,
7722,
797,
921,
1862,
2300,
747,
7734,
1329,
1276,
453,
7722,
1076,
1862,
2300,
747,
7734,
1329,
1276,
453,
7722,
1076,
14729,
2300,
13,
288,
5411,
327,
511,
18454,
67,
3670,
23552,
7535,
31,
3639,
289,
3639,
309,
261,
2749,
1276,
453,
7722,
12592,
2300,
13,
288,
5411,
327,
10152,
67,
13730,
67,
3670,
23552,
7535,
31,
3639,
289,
3639,
309,
261,
2749,
1276,
453,
7722,
2
] |
cx.currentActivationScope = call.parentActivationScope;
|
public static void exitActivationFunction(Context cx) { if (cx.currentActivationDepth == 0) throw new IllegalStateException(); if (cx.currentActivationScope == null) throw new IllegalStateException(); if (cx.currentActivationCall != cx.currentActivationScope) throw new IllegalStateException(); NativeCall call = cx.currentActivationCall; cx.currentActivationCall = call.parentActivationCall; cx.currentActivationScope = call.parentActivationScope; call.parentActivationCall = null; call.parentActivationScope = null; decreaseActivationDepth(cx); }
|
51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/5f71fe6973a37b77b4615a721450340c063c12ab/ScriptRuntime.java/clean/js/rhino/src/org/mozilla/javascript/ScriptRuntime.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2427,
14857,
2083,
12,
1042,
9494,
13,
565,
288,
3639,
309,
261,
71,
92,
18,
2972,
14857,
6148,
422,
374,
13,
5411,
604,
394,
5477,
5621,
3639,
309,
261,
71,
92,
18,
2972,
14857,
3876,
422,
446,
13,
5411,
604,
394,
5477,
5621,
3639,
309,
261,
71,
92,
18,
2972,
14857,
1477,
480,
9494,
18,
2972,
14857,
3876,
13,
5411,
604,
394,
5477,
5621,
3639,
16717,
1477,
745,
273,
9494,
18,
2972,
14857,
1477,
31,
3639,
9494,
18,
2972,
14857,
1477,
273,
745,
18,
2938,
14857,
1477,
31,
2868,
745,
18,
2938,
14857,
1477,
273,
446,
31,
3639,
745,
18,
2938,
14857,
3876,
273,
446,
31,
3639,
20467,
14857,
6148,
12,
71,
92,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2427,
14857,
2083,
12,
1042,
9494,
13,
565,
288,
3639,
309,
261,
71,
92,
18,
2972,
14857,
6148,
422,
374,
13,
5411,
604,
394,
5477,
5621,
3639,
309,
261,
71,
92,
18,
2972,
14857,
3876,
422,
446,
13,
5411,
604,
394,
5477,
5621,
3639,
309,
261,
71,
92,
18,
2972,
14857,
1477,
480,
9494,
18,
2972,
14857,
3876,
13,
5411,
604,
394,
5477,
5621,
3639,
16717,
1477,
745,
273,
9494,
18,
2972,
14857,
1477,
31,
3639,
9494,
18,
2972,
14857,
1477,
273,
745,
18,
2938,
14857,
1477,
31,
2868,
745,
18,
2938,
14857,
1477,
273,
446,
31,
3639,
745,
18,
2938,
14857,
3876,
273,
446,
31,
3639,
20467,
14857,
6148,
12,
71,
92,
1769,
565,
2
] |
|
pdomBinding = new PDOMCEnumerator(pdom, parent, name, (PDOMCEnumeration)pdomEnumeration);
|
pdomBinding = new PDOMCEnumerator(pdom, parent, name, (PDOMCEnumeration)pdomEnumeration);
|
public PDOMBinding addName(IASTName name, PDOMFile file) throws CoreException { if (name == null) return null; char[] namechars = name.toCharArray(); if (namechars == null || name.toCharArray().length == 0) return null; IBinding binding = name.resolveBinding(); if (binding == null || binding instanceof IProblemBinding) // can't tell what it is return null; if (binding instanceof IParameter) // skip parameters return null; PDOMBinding pdomBinding = adaptBinding(binding); if (pdomBinding == null) { PDOMNode parent = getAdaptedParent(binding); if (parent == null) return null; if (binding instanceof IParameter) return null; // skip parameters else if (binding instanceof IField) { // must be before IVariable if (parent instanceof IPDOMMemberOwner) pdomBinding = new PDOMCField(pdom, (IPDOMMemberOwner)parent, name); } else if (binding instanceof IVariable) pdomBinding = new PDOMCVariable(pdom, parent, name); else if (binding instanceof IFunction) pdomBinding = new PDOMCFunction(pdom, parent, name); else if (binding instanceof ICompositeType) pdomBinding = new PDOMCStructure(pdom, parent, name); else if (binding instanceof IEnumeration) pdomBinding = new PDOMCEnumeration(pdom, parent, name); else if (binding instanceof IEnumerator) { try { IEnumeration enumeration = (IEnumeration)((IEnumerator)binding).getType(); PDOMBinding pdomEnumeration = adaptBinding(enumeration); if (pdomEnumeration instanceof PDOMCEnumeration) pdomBinding = new PDOMCEnumerator(pdom, parent, name, (PDOMCEnumeration)pdomEnumeration); } catch (DOMException e) { throw new CoreException(Util.createStatus(e)); } } else if (binding instanceof ITypedef) pdomBinding = new PDOMCTypedef(pdom, parent, name, (ITypedef)binding); } if (pdomBinding != null) new PDOMName(pdom, name, file, pdomBinding); return pdomBinding; }
|
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/d54cf4d243d6aeda192e76f691fe9cf9a3ee7c50/PDOMCLinkage.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCLinkage.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
453,
8168,
5250,
527,
461,
12,
45,
9053,
461,
508,
16,
453,
8168,
812,
585,
13,
1216,
30015,
288,
202,
202,
430,
261,
529,
422,
446,
13,
1082,
202,
2463,
446,
31,
9506,
202,
3001,
8526,
508,
7549,
273,
508,
18,
869,
15936,
5621,
202,
202,
430,
261,
529,
7549,
422,
446,
747,
508,
18,
869,
15936,
7675,
2469,
422,
374,
13,
1082,
202,
2463,
446,
31,
9506,
202,
45,
5250,
5085,
273,
508,
18,
10828,
5250,
5621,
202,
202,
430,
261,
7374,
422,
446,
747,
5085,
1276,
467,
13719,
5250,
13,
1082,
202,
759,
848,
1404,
9276,
4121,
518,
353,
1082,
202,
2463,
446,
31,
202,
202,
430,
261,
7374,
1276,
467,
1662,
13,
1082,
202,
759,
2488,
1472,
1082,
202,
2463,
446,
31,
1082,
202,
52,
8168,
5250,
4863,
362,
5250,
273,
5855,
5250,
12,
7374,
1769,
202,
202,
430,
261,
84,
9859,
5250,
422,
446,
13,
288,
1082,
202,
52,
8168,
907,
982,
273,
336,
13716,
329,
3054,
12,
7374,
1769,
1082,
202,
430,
261,
2938,
422,
446,
13,
9506,
202,
2463,
446,
31,
25083,
202,
430,
261,
7374,
1276,
467,
1662,
13,
9506,
202,
2463,
446,
31,
368,
2488,
1472,
1082,
202,
12107,
309,
261,
7374,
1276,
467,
974,
13,
288,
368,
1297,
506,
1865,
467,
3092,
9506,
202,
430,
261,
2938,
1276,
2971,
8168,
4419,
5541,
13,
6862,
202,
84,
9859,
5250,
273,
394,
453,
8168,
39,
974,
12,
84,
9859,
16,
261,
2579,
8168,
4419,
5541,
13,
2938,
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,
453,
8168,
5250,
527,
461,
12,
45,
9053,
461,
508,
16,
453,
8168,
812,
585,
13,
1216,
30015,
288,
202,
202,
430,
261,
529,
422,
446,
13,
1082,
202,
2463,
446,
31,
9506,
202,
3001,
8526,
508,
7549,
273,
508,
18,
869,
15936,
5621,
202,
202,
430,
261,
529,
7549,
422,
446,
747,
508,
18,
869,
15936,
7675,
2469,
422,
374,
13,
1082,
202,
2463,
446,
31,
9506,
202,
45,
5250,
5085,
273,
508,
18,
10828,
5250,
5621,
202,
202,
430,
261,
7374,
422,
446,
747,
5085,
1276,
467,
13719,
5250,
13,
1082,
202,
759,
848,
1404,
9276,
4121,
518,
353,
1082,
202,
2463,
446,
31,
202,
202,
430,
261,
7374,
1276,
467,
1662,
13,
1082,
2
] |
public static TitledBorder createTitledBorder(Border border, String title) { /* Add a title to an existing border, specifying the text of the title, using the default positioning (sitting on the top line) and default justification (left) and using the default font and text color determined by the current look and feel. Parameters: border - the Border object to add the title totitle - a String containing the text of the titleReturns: the TitledBorder object createTitledBorder */ return null; }
|
public static TitledBorder createTitledBorder (String title) { return new TitledBorder (title); }
|
public static TitledBorder createTitledBorder(Border border, String title) { /* Add a title to an existing border, specifying the text of the title, using the default positioning (sitting on the top line) and default justification (left) and using the default font and text color determined by the current look and feel. Parameters: border - the Border object to add the title totitle - a String containing the text of the titleReturns: the TitledBorder objectcreateTitledBorder */ return null; }
|
45163 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45163/d092ccafae9945813bbf1be1db3d5e5bd006a90b/BorderFactory.java/buggy/libjava/javax/swing/BorderFactory.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
760,
399,
305,
1259,
8107,
752,
56,
305,
1259,
8107,
12,
8107,
5795,
16,
4766,
2868,
514,
2077,
13,
225,
288,
1748,
565,
1436,
279,
2077,
358,
392,
2062,
5795,
16,
13664,
326,
977,
434,
326,
2077,
16,
1450,
326,
805,
1754,
310,
261,
25404,
1787,
603,
326,
1760,
980,
13,
471,
805,
2537,
1480,
261,
4482,
13,
471,
1450,
326,
805,
3512,
471,
977,
2036,
11383,
635,
326,
783,
2324,
471,
1656,
292,
18,
565,
7012,
30,
565,
5795,
300,
326,
13525,
733,
358,
527,
326,
2077,
9997,
1280,
300,
279,
514,
4191,
326,
977,
434,
326,
2077,
1356,
30,
565,
326,
399,
305,
1259,
8107,
733,
2640,
56,
305,
1259,
8107,
565,
1195,
377,
327,
446,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
760,
399,
305,
1259,
8107,
752,
56,
305,
1259,
8107,
12,
8107,
5795,
16,
4766,
2868,
514,
2077,
13,
225,
288,
1748,
565,
1436,
279,
2077,
358,
392,
2062,
5795,
16,
13664,
326,
977,
434,
326,
2077,
16,
1450,
326,
805,
1754,
310,
261,
25404,
1787,
603,
326,
1760,
980,
13,
471,
805,
2537,
1480,
261,
4482,
13,
471,
1450,
326,
805,
3512,
471,
977,
2036,
11383,
635,
326,
783,
2324,
471,
1656,
292,
18,
565,
7012,
30,
565,
5795,
300,
326,
13525,
733,
358,
527,
326,
2077,
9997,
1280,
300,
279,
514,
4191,
326,
977,
434,
326,
2077,
1356,
30,
565,
326,
399,
305,
1259,
8107,
733,
2640,
56,
305,
1259,
8107,
565,
1195,
377,
327,
446,
2
] |
Operation op = operationFactory.newAdd( userProvidedName, normalizedName, entry );
|
Operation op = operationFactory.newAdd( normalizedName, entry );
|
public void add( NextInterceptor nextInterceptor, String userProvidedName, Name normalizedName, Attributes entry ) throws NamingException { Operation op = operationFactory.newAdd( userProvidedName, normalizedName, entry ); op.execute( nexus, store ); }
|
10677 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10677/dfbbb4aa4eda71e9709a2aed04ebee1be95d1a21/ReplicationService.java/buggy/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
12,
4804,
10281,
1024,
10281,
16,
514,
729,
19254,
461,
16,
1770,
5640,
461,
16,
9055,
1241,
262,
1216,
26890,
565,
288,
3639,
4189,
1061,
273,
1674,
1733,
18,
2704,
986,
12,
5640,
461,
16,
1241,
11272,
3639,
1061,
18,
8837,
12,
290,
21029,
16,
1707,
11272,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
12,
4804,
10281,
1024,
10281,
16,
514,
729,
19254,
461,
16,
1770,
5640,
461,
16,
9055,
1241,
262,
1216,
26890,
565,
288,
3639,
4189,
1061,
273,
1674,
1733,
18,
2704,
986,
12,
5640,
461,
16,
1241,
11272,
3639,
1061,
18,
8837,
12,
290,
21029,
16,
1707,
11272,
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
] |
public void noInternetConnection() { if(_automaticallyConnecting) { // Notify the HostCatcher that it should keep any hosts it has // already used instead of discarding them only if we're down to // a small number of hosts to try. // The HostCatcher can be null in testing. if(_catcher != null && (_catcher.getNumHosts() < 50)) { _catcher.recoverHosts(); } // We've already notified the user about their connection and we're // alread retrying, so just return. return; } // If the user has used the computer in the last 30 seconds, notify // them to reconnect. Otherwise, there may have been a temporary // hiccup in the network connection, and we'll keep automatically // trying to recover the connection. if(SystemUtils.supportsIdleTime() && SystemUtils.getIdleTime() < 30*1000 && !QuestionsHandler.NO_INTERNET.getValue()) { // Notify the user that they have no internet connection. MessageService.showError("NO_INTERNET", QuestionsHandler.NO_INTERNET); } else { // Notify the user that they have no internet connection and that // we will automatically retry MessageService.showError("NO_INTERNET_RETRYING", QuestionsHandler.NO_INTERNET_RETRYING); // Try to reconnect in 10 seconds, and then every minute after // that. RouterService.schedule(new Runnable() { public void run() { // If the last time the user disconnected is more recent // than when we started automatically connecting, just // return without trying to connect. Note that the // disconnect time is reset if the user selects to connect. if(_automaticConnectTime < _disconnectTime) { return; } ConnectionManager cm = RouterService.getConnectionManager(); if(!cm.isConnected()) { cm.connect(); } } }, 10*1000, 60*1000); _automaticConnectTime = System.currentTimeMillis(); _automaticallyConnecting = true; } _noInternetConnection = true; // Kill all of the ConnectionFetchers. disconnect(); // Notify the HostCatcher that it should keep any hosts it has already // used instead of discarding them. // The HostCatcher can be null in testing. if(_catcher != null) { _catcher.recoverHosts(); } }
|
5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/c24e30f71b391bbaf8c9ea4f0e61ecd03b1cdd5a/ConnectionManager.java/clean/components/gnutella-core/src/main/java/com/limegroup/gnutella/ConnectionManager.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1158,
26562,
1952,
1435,
288,
7734,
309,
24899,
5854,
20271,
30049,
13,
288,
5411,
368,
10918,
326,
4893,
14842,
264,
716,
518,
1410,
3455,
1281,
7206,
518,
711,
2398,
368,
1818,
1399,
3560,
434,
10388,
310,
2182,
1338,
309,
732,
4565,
2588,
358,
5411,
368,
279,
5264,
1300,
434,
7206,
358,
775,
18,
2398,
368,
1021,
4893,
14842,
264,
848,
506,
446,
316,
7769,
18,
5411,
309,
24899,
14683,
264,
480,
446,
597,
261,
67,
14683,
264,
18,
588,
2578,
12172,
1435,
411,
6437,
3719,
288,
7734,
389,
14683,
264,
18,
266,
3165,
12172,
5621,
5411,
289,
17311,
368,
1660,
8081,
1818,
18791,
326,
729,
2973,
3675,
1459,
471,
732,
4565,
5411,
368,
524,
896,
21081,
16,
1427,
2537,
327,
18,
7734,
327,
31,
1850,
289,
7734,
368,
971,
326,
729,
711,
1399,
326,
26579,
316,
326,
1142,
5196,
3974,
16,
5066,
540,
368,
2182,
358,
11812,
18,
225,
5272,
16,
1915,
2026,
1240,
2118,
279,
6269,
540,
368,
366,
335,
71,
416,
316,
326,
2483,
1459,
16,
471,
732,
5614,
3455,
6635,
540,
368,
8374,
358,
5910,
326,
1459,
18,
3639,
309,
12,
3163,
1989,
18,
28064,
13834,
950,
1435,
597,
6647,
2332,
1989,
18,
588,
13834,
950,
1435,
411,
5196,
14,
18088,
597,
6647,
401,
30791,
1115,
1503,
18,
3417,
67,
706,
6519,
1584,
18,
24805,
10756,
288,
5411,
368,
10918,
326,
729,
716,
2898,
1240,
1158,
24264,
1459,
18,
5411,
2350,
1179,
18,
4500,
668,
2932,
3417,
67,
706,
6519,
1584,
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,
1158,
26562,
1952,
1435,
288,
7734,
309,
24899,
5854,
20271,
30049,
13,
288,
5411,
368,
10918,
326,
4893,
14842,
264,
716,
518,
1410,
3455,
1281,
7206,
518,
711,
2398,
368,
1818,
1399,
3560,
434,
10388,
310,
2182,
1338,
309,
732,
4565,
2588,
358,
5411,
368,
279,
5264,
1300,
434,
7206,
358,
775,
18,
2398,
368,
1021,
4893,
14842,
264,
848,
506,
446,
316,
7769,
18,
5411,
309,
24899,
14683,
264,
480,
446,
597,
261,
67,
14683,
264,
18,
588,
2578,
12172,
1435,
411,
6437,
3719,
288,
7734,
389,
14683,
264,
18,
266,
3165,
12172,
5621,
5411,
289,
17311,
368,
1660,
8081,
1818,
18791,
326,
729,
2973,
3675,
1459,
471,
732,
4565,
5411,
368,
524,
896,
21081,
2
] |
||
boolean remove_bond = false;
|
boolean removedBond = false;
|
public static AtomContainer removeHydrogens(AtomContainer atomContainer) { Map map = new HashMap(); // maps original atoms to clones. List remove = new ArrayList(); // lists removed Hs. // Clone atoms except those to be removed. Molecule mol = new Molecule(); int count = atomContainer.getAtomCount(); for (int i = 0; i < count; i++) { // Clone/remove this atom? Atom atom = atomContainer.getAtomAt(i); if (!atom.getSymbol().equals("H")) { Atom clonedAtom = (Atom) atom.clone(); clonedAtom.setHydrogenCount(0); mol.addAtom(clonedAtom); map.put(atom, clonedAtom); } else { remove.add(atom); // maintain list of removed H. } } // Clone bonds except those involving removed atoms. count = atomContainer.getBondCount(); for (int i = 0; i < count; i++) { // Check bond. final Bond bond = atomContainer.getBondAt(i); Atom[] atoms = bond.getAtoms(); boolean remove_bond = false; final int length = atoms.length; for (int k = 0; k < length; k++) { if (remove.contains(atoms[k])) { remove_bond = true; break; } } // Clone/remove this bond? if (!remove_bond) // if (!remove.contains(atoms[0]) && !remove.contains(atoms[1])) { Bond clone = (Bond) atomContainer.getBondAt(i).clone(); clone.setAtoms(new Atom[]{(Atom) map.get(atoms[0]), (Atom) map.get(atoms[1])}); mol.addBond(clone); } } // Recompute hydrogen counts of neighbours of removed Hydrogens. for (Iterator i = remove.iterator(); i.hasNext();) { // Process neighbours. for (Iterator n = atomContainer.getConnectedAtomsVector((Atom) i.next()).iterator(); n.hasNext();) { final Atom neighb = (Atom) map.get(n.next()); neighb.setHydrogenCount(neighb.getHydrogenCount() + 1); } } return (mol); }
|
45254 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45254/798e3d34b47e0a94a1182ec6bb6e9e13d23c7829/AtomContainerManipulator.java/clean/src/org/openscience/cdk/tools/manipulator/AtomContainerManipulator.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
7149,
2170,
1206,
17507,
9005,
23730,
12,
3641,
2170,
22487,
13,
565,
288,
3639,
1635,
852,
273,
394,
4317,
5621,
3639,
368,
7565,
2282,
9006,
358,
927,
5322,
18,
3639,
987,
1206,
273,
394,
2407,
5621,
225,
368,
6035,
3723,
670,
87,
18,
3639,
368,
12758,
9006,
1335,
5348,
358,
506,
3723,
18,
3639,
490,
10545,
12629,
273,
394,
490,
10545,
5621,
3639,
509,
1056,
273,
22487,
18,
588,
3641,
1380,
5621,
3639,
364,
261,
474,
277,
273,
374,
31,
7734,
277,
411,
1056,
31,
7734,
277,
27245,
3639,
288,
5411,
368,
12758,
19,
4479,
333,
3179,
35,
5411,
7149,
3179,
273,
22487,
18,
588,
3641,
861,
12,
77,
1769,
5411,
309,
16051,
7466,
18,
588,
5335,
7675,
14963,
2932,
44,
6,
3719,
5411,
288,
7734,
7149,
13027,
3641,
273,
261,
3641,
13,
3179,
18,
14056,
5621,
7734,
13027,
3641,
18,
542,
17507,
24096,
1380,
12,
20,
1769,
7734,
12629,
18,
1289,
3641,
12,
830,
8184,
3641,
1769,
7734,
852,
18,
458,
12,
7466,
16,
13027,
3641,
1769,
5411,
289,
5411,
469,
5411,
288,
7734,
1206,
18,
1289,
12,
7466,
1769,
282,
368,
17505,
666,
434,
3723,
670,
18,
5411,
289,
3639,
289,
3639,
368,
12758,
15692,
1335,
5348,
29876,
6282,
3723,
9006,
18,
3639,
1056,
273,
22487,
18,
588,
9807,
1380,
5621,
3639,
364,
261,
474,
277,
273,
374,
31,
7734,
277,
411,
1056,
31,
7734,
277,
27245,
3639,
288,
5411,
368,
2073,
8427,
18,
5411,
727,
605,
1434,
8427,
273,
22487,
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,
1071,
760,
7149,
2170,
1206,
17507,
9005,
23730,
12,
3641,
2170,
22487,
13,
565,
288,
3639,
1635,
852,
273,
394,
4317,
5621,
3639,
368,
7565,
2282,
9006,
358,
927,
5322,
18,
3639,
987,
1206,
273,
394,
2407,
5621,
225,
368,
6035,
3723,
670,
87,
18,
3639,
368,
12758,
9006,
1335,
5348,
358,
506,
3723,
18,
3639,
490,
10545,
12629,
273,
394,
490,
10545,
5621,
3639,
509,
1056,
273,
22487,
18,
588,
3641,
1380,
5621,
3639,
364,
261,
474,
277,
273,
374,
31,
7734,
277,
411,
1056,
31,
7734,
277,
27245,
3639,
288,
5411,
368,
12758,
19,
4479,
333,
3179,
35,
5411,
7149,
3179,
273,
22487,
18,
588,
3641,
861,
12,
77,
1769,
5411,
309,
16051,
7466,
18,
588,
2
] |
source.move(destinationPath, IResource.KEEP_HISTORY, new SubProgressMonitor(subMonitor, 0));
|
source.move(destinationPath, IResource.KEEP_HISTORY | IResource.SHALLOW, new SubProgressMonitor(subMonitor, 0));
|
protected void copy(IResource[] resources, IPath destination, IProgressMonitor subMonitor) throws CoreException { for (int i = 0; i < resources.length; i++) { IResource source = resources[i]; IPath destinationPath = destination.append(source.getName()); IWorkspace workspace = source.getWorkspace(); IWorkspaceRoot workspaceRoot = workspace.getRoot(); boolean isFolder = source.getType() == IResource.FOLDER; boolean exists = workspaceRoot.exists(destinationPath); if (isFolder && exists) { // the resource is a folder and it exists in the destination, copy the // children of the folder IResource[] children = ((IContainer) source).members(); copy(children, destinationPath, subMonitor); // need to explicitly delete the folder since we're not moving it delete(source, subMonitor); } else { // if we're merging folders, we could be overwriting an existing file IResource existing = workspaceRoot.findMember(destinationPath); boolean canMove = true; if (existing != null) { canMove = delete(existing, subMonitor); } // was the resource deleted successfully or was there no existing resource to delete? if (canMove) { source.move(destinationPath, IResource.KEEP_HISTORY, new SubProgressMonitor(subMonitor, 0)); } subMonitor.worked(1); if (subMonitor.isCanceled()) { throw new OperationCanceledException(); } } } }
|
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/f935785d0eccab39b419b4c3231873d91b689cc6/MoveFilesAndFoldersOperation.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/MoveFilesAndFoldersOperation.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1610,
12,
45,
1420,
8526,
2703,
16,
467,
743,
2929,
16,
467,
5491,
7187,
720,
7187,
13,
1216,
30015,
288,
202,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
2703,
18,
2469,
31,
277,
27245,
288,
1082,
202,
45,
1420,
1084,
273,
2703,
63,
77,
15533,
1082,
202,
45,
743,
30617,
273,
2929,
18,
6923,
12,
3168,
18,
17994,
10663,
1082,
202,
45,
8241,
6003,
273,
1084,
18,
588,
8241,
5621,
1082,
202,
45,
8241,
2375,
6003,
2375,
273,
6003,
18,
588,
2375,
5621,
1082,
202,
6494,
31137,
273,
1084,
18,
588,
559,
1435,
422,
467,
1420,
18,
17357,
31,
1082,
202,
6494,
1704,
273,
6003,
2375,
18,
1808,
12,
10590,
743,
1769,
1082,
202,
430,
261,
291,
3899,
597,
1704,
13,
288,
9506,
202,
759,
326,
1058,
353,
279,
3009,
471,
518,
1704,
316,
326,
2929,
16,
1610,
326,
9506,
202,
759,
2325,
434,
326,
3009,
9506,
202,
45,
1420,
8526,
2325,
273,
14015,
45,
2170,
13,
1084,
2934,
7640,
5621,
9506,
202,
3530,
12,
5906,
16,
30617,
16,
720,
7187,
1769,
9506,
202,
759,
1608,
358,
8122,
1430,
326,
3009,
3241,
732,
4565,
486,
12499,
518,
9506,
202,
3733,
12,
3168,
16,
720,
7187,
1769,
1082,
202,
97,
469,
288,
9506,
202,
759,
309,
732,
4565,
17256,
9907,
16,
732,
3377,
506,
23492,
392,
2062,
585,
9506,
202,
45,
1420,
2062,
273,
6003,
2375,
18,
4720,
4419,
12,
10590,
743,
1769,
9506,
202,
6494,
848,
7607,
273,
638,
31,
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,
1610,
12,
45,
1420,
8526,
2703,
16,
467,
743,
2929,
16,
467,
5491,
7187,
720,
7187,
13,
1216,
30015,
288,
202,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
2703,
18,
2469,
31,
277,
27245,
288,
1082,
202,
45,
1420,
1084,
273,
2703,
63,
77,
15533,
1082,
202,
45,
743,
30617,
273,
2929,
18,
6923,
12,
3168,
18,
17994,
10663,
1082,
202,
45,
8241,
6003,
273,
1084,
18,
588,
8241,
5621,
1082,
202,
45,
8241,
2375,
6003,
2375,
273,
6003,
18,
588,
2375,
5621,
1082,
202,
6494,
31137,
273,
1084,
18,
588,
559,
1435,
422,
467,
1420,
18,
17357,
31,
1082,
202,
6494,
1704,
273,
6003,
2375,
18,
1808,
12,
10590,
743,
1769,
2
] |
MBeanServer server = MBeanServerFactory.createMBeanServer();
|
Iterator i = MBeanServerFactory.findMBeanServer(null).iterator(); MBeanServer server = i.hasNext() ? (MBeanServer) i.next() : MBeanServerFactory.createMBeanServer();
|
public CruiseControlControllerAgent(CruiseControlController controller, int httpPort, int connectorServerPort, String user, String password, String xslPath) { this.httpPort = httpPort; this.connectorServerPort = connectorServerPort; path = xslPath; this.controllerAdaptor = new CruiseControlControllerJMXAdaptor(controller); this.user = user; this.password = password; MBeanServer server = MBeanServerFactory.createMBeanServer(); try { controllerAdaptor.register(server); } catch (Exception e) { LOG.error("Problem registering CruiseControlController HttpAdaptor", e); } try { registerHttpAdaptor(server); } catch (Exception e) { LOG.error("Problem registering HttpAdaptor", e); } try { registerConnectorServer(server); } catch (Exception e) { LOG.error("Problem registering ConnectorServer", e); } try { ObjectName name = new ObjectName("Logger:name=root"); server.registerMBean(new LoggerController(Logger.getRootLogger()), name); } catch (Exception e) { LOG.error("Problem registering LoggerController for root-Logger", e); } }
|
55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/b899b454e472c190062e4c92a0f97af8438bee12/CruiseControlControllerAgent.java/buggy/main/src/net/sourceforge/cruisecontrol/jmx/CruiseControlControllerAgent.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
385,
8653,
784,
3367,
2933,
3630,
12,
39,
8653,
784,
3367,
2933,
2596,
16,
509,
1062,
2617,
16,
540,
509,
8703,
2081,
2617,
16,
514,
729,
16,
514,
2201,
16,
514,
20791,
743,
13,
288,
3639,
333,
18,
2505,
2617,
273,
1062,
2617,
31,
3639,
333,
18,
23159,
2081,
2617,
273,
8703,
2081,
2617,
31,
3639,
589,
273,
20791,
743,
31,
3639,
333,
18,
5723,
29888,
273,
394,
385,
8653,
784,
3367,
2933,
46,
13874,
29888,
12,
5723,
1769,
3639,
333,
18,
1355,
273,
729,
31,
3639,
333,
18,
3664,
273,
2201,
31,
10402,
4498,
277,
273,
16622,
2081,
1733,
18,
4720,
18089,
2081,
12,
2011,
2934,
9838,
5621,
16622,
2081,
1438,
273,
277,
18,
5332,
2134,
1435,
692,
261,
18089,
2081,
13,
277,
18,
4285,
1435,
294,
16622,
2081,
1733,
18,
2640,
18089,
2081,
5621,
3639,
775,
288,
5411,
2596,
29888,
18,
4861,
12,
3567,
1769,
3639,
289,
1044,
261,
503,
425,
13,
288,
5411,
2018,
18,
1636,
2932,
13719,
22845,
385,
8653,
784,
3367,
2933,
2541,
29888,
3113,
425,
1769,
3639,
289,
3639,
775,
288,
5411,
1744,
2940,
29888,
12,
3567,
1769,
3639,
289,
1044,
261,
503,
425,
13,
288,
5411,
2018,
18,
1636,
2932,
13719,
22845,
2541,
29888,
3113,
425,
1769,
3639,
289,
3639,
775,
288,
5411,
1744,
7487,
2081,
12,
3567,
1769,
3639,
289,
1044,
261,
503,
425,
13,
288,
5411,
2018,
18,
1636,
2932,
13719,
22845,
15779,
2081,
3113,
425,
1769,
3639,
289,
3639,
775,
288,
5411,
21013,
508,
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,
377,
1071,
385,
8653,
784,
3367,
2933,
3630,
12,
39,
8653,
784,
3367,
2933,
2596,
16,
509,
1062,
2617,
16,
540,
509,
8703,
2081,
2617,
16,
514,
729,
16,
514,
2201,
16,
514,
20791,
743,
13,
288,
3639,
333,
18,
2505,
2617,
273,
1062,
2617,
31,
3639,
333,
18,
23159,
2081,
2617,
273,
8703,
2081,
2617,
31,
3639,
589,
273,
20791,
743,
31,
3639,
333,
18,
5723,
29888,
273,
394,
385,
8653,
784,
3367,
2933,
46,
13874,
29888,
12,
5723,
1769,
3639,
333,
18,
1355,
273,
729,
31,
3639,
333,
18,
3664,
273,
2201,
31,
10402,
4498,
277,
273,
16622,
2081,
1733,
18,
4720,
18089,
2081,
12,
2011,
2934,
9838,
5621,
16622,
2081,
1438,
273,
277,
18,
5332,
2134,
2
] |
Font toolbarFont = DrJava.getConfig().getSetting(FONT_TOOLBAR); boolean iconsEnabled = DrJava.getConfig().getSetting(TOOLBAR_ICONS_ENABLED).booleanValue(); boolean textEnabled = DrJava.getConfig().getSetting(TOOLBAR_TEXT_ENABLED).booleanValue();
|
private void _updateToolbarButtons() { Component[] buttons = _toolBar.getComponents(); for (int i = 0; i< buttons.length; i++) { if (buttons[i] instanceof JButton) { JButton b = (JButton) buttons[i]; Action a = b.getAction(); // Work-around for strange configuration of undo/redo buttons /**if (a == null) { ActionListener[] al = b.getActionListeners(); // 1.4 only for (int j=0; j<al.length; j++) { if (al[j] instanceof Action) { a = (Action) al[j]; break; } } } */ Font toolbarFont = DrJava.getConfig().getSetting(FONT_TOOLBAR); b.setFont(toolbarFont); if (a==null) { if (b == _undoButton) { a = _undoAction; } else if (b == _redoButton) { a = _redoAction; } else { continue; } } boolean iconsEnabled = DrJava.getConfig().getSetting(TOOLBAR_ICONS_ENABLED).booleanValue(); if (b.getIcon() == null) { if (iconsEnabled) { b.setIcon( (Icon) a.getValue(Action.SMALL_ICON)); } } else { if (!iconsEnabled && b.getText() != "") { b.setIcon(null); } } boolean textEnabled = DrJava.getConfig().getSetting(TOOLBAR_TEXT_ENABLED).booleanValue(); if (b.getText() == "") { if (textEnabled) { b.setText( (String) a.getValue(Action.DEFAULT)); } } else { if (!textEnabled && b.getIcon() != null) { b.setText(""); } } } } // Correct the vertical height of the buttons. _fixToolbarHeights(); }
|
11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/7b8e61b54c444deec40202441181317a86727c3a/MainFrame.java/clean/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
10063,
12748,
5711,
273,
11473,
5852,
18,
588,
809,
7675,
588,
5568,
12,
25221,
67,
26263,
21908,
1769,
1250,
17455,
1526,
273,
11473,
5852,
18,
588,
809,
7675,
588,
5568,
12,
26263,
21908,
67,
21745,
55,
67,
13560,
2934,
6494,
620,
5621,
1250,
977,
1526,
273,
11473,
5852,
18,
588,
809,
7675,
588,
5568,
12,
26263,
21908,
67,
5151,
67,
13560,
2934,
6494,
620,
5621,
225,
10063,
12748,
5711,
273,
11473,
5852,
18,
588,
809,
7675,
588,
5568,
12,
25221,
67,
26263,
21908,
1769,
1250,
17455,
1526,
273,
11473,
5852,
18,
588,
809,
7675,
588,
5568,
12,
26263,
21908,
67,
21745,
55,
67,
13560,
2934,
6494,
620,
5621,
1250,
977,
1526,
273,
11473,
5852,
18,
588,
809,
7675,
588,
5568,
12,
26263,
21908,
67,
5151,
67,
13560,
2934,
6494,
620,
5621,
225,
3238,
5711,
12748,
5711,
273,
11473,
5852,
18,
588,
809,
7675,
588,
5568,
12,
25221,
67,
26263,
21908,
1769,
1250,
17455,
1526,
273,
11473,
5852,
18,
588,
809,
7675,
588,
5568,
12,
26263,
21908,
67,
21745,
55,
67,
13560,
2934,
6494,
620,
5621,
1250,
977,
1526,
273,
11473,
5852,
18,
588,
809,
7675,
588,
5568,
12,
26263,
21908,
67,
5151,
67,
13560,
2934,
6494,
620,
5621,
225,
918,
5711,
12748,
5711,
273,
11473,
5852,
18,
588,
809,
7675,
588,
5568,
12,
25221,
67,
26263,
21908,
1769,
1250,
17455,
1526,
273,
11473,
5852,
18,
588,
809,
7675,
588,
5568,
12,
26263,
21908,
67,
21745,
55,
67,
13560,
2934,
6494,
620,
5621,
1250,
977,
1526,
273,
11473,
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,
10063,
12748,
5711,
273,
11473,
5852,
18,
588,
809,
7675,
588,
5568,
12,
25221,
67,
26263,
21908,
1769,
1250,
17455,
1526,
273,
11473,
5852,
18,
588,
809,
7675,
588,
5568,
12,
26263,
21908,
67,
21745,
55,
67,
13560,
2934,
6494,
620,
5621,
1250,
977,
1526,
273,
11473,
5852,
18,
588,
809,
7675,
588,
5568,
12,
26263,
21908,
67,
5151,
67,
13560,
2934,
6494,
620,
5621,
225,
10063,
12748,
5711,
273,
11473,
5852,
18,
588,
809,
7675,
588,
5568,
12,
25221,
67,
26263,
21908,
1769,
1250,
17455,
1526,
273,
11473,
5852,
18,
588,
809,
7675,
588,
5568,
12,
26263,
21908,
67,
21745,
55,
67,
13560,
2934,
6494,
620,
5621,
1250,
977,
1526,
273,
11473,
5852,
18,
588,
809,
7675,
588,
2
] |
|
private RVarmap new_dvar(ID id, VALUE value, RVarmap prev) { RVarmap map = new RVarmap(); map.id = id; map.val = value; map.next = prev; return map;
|
private RubyVarmap new_dvar(ID id, VALUE value, RubyVarmap prev) { return new RubyVarmap((RubyId)id, (RubyObject)value, prev);
|
private RVarmap new_dvar(ID id, VALUE value, RVarmap prev) { RVarmap map = new RVarmap(); map.id = id; map.val = value; map.next = prev; return map; }
|
46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/8e00ad1c7ae96f50ae0bd521483380788f891b7b/parse.java/clean/org/jruby/parser/parse.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
534,
1537,
1458,
394,
67,
72,
1401,
12,
734,
612,
16,
5848,
460,
16,
534,
1537,
1458,
2807,
13,
288,
3639,
534,
1537,
1458,
852,
273,
394,
534,
1537,
1458,
5621,
3639,
852,
18,
350,
273,
612,
31,
3639,
852,
18,
1125,
273,
460,
31,
3639,
852,
18,
4285,
273,
2807,
31,
3639,
327,
852,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
377,
3238,
534,
1537,
1458,
394,
67,
72,
1401,
12,
734,
612,
16,
5848,
460,
16,
534,
1537,
1458,
2807,
13,
288,
3639,
534,
1537,
1458,
852,
273,
394,
534,
1537,
1458,
5621,
3639,
852,
18,
350,
273,
612,
31,
3639,
852,
18,
1125,
273,
460,
31,
3639,
852,
18,
4285,
273,
2807,
31,
3639,
327,
852,
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
] |
ExpBase exp = (ExpBase) getArg(evaluator, args, 2);
|
ExpBase exp = (ExpBase) getArgNoEval(args, 2);
|
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); } }); }
|
51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/0ab3be7797c0940dd5a113451bfd9a43186433e0/BuiltinFunTable.java/buggy/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
] |
this.errorMessage = errorMessage; }
|
this.errorMessage = errorMessage; }
|
public TestFailureStub( String errorMessage ) { this.errorMessage = errorMessage; }
|
57371 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57371/c26c57f3ac4851e6bc9c5df8515ac73f4045eebf/TestFailureStub.java/buggy/jmock/core/src/org/jmock/core/stub/TestFailureStub.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
7766,
5247,
11974,
12,
514,
9324,
262,
288,
202,
202,
2211,
18,
1636,
1079,
273,
9324,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
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,
225,
202,
482,
7766,
5247,
11974,
12,
514,
9324,
262,
288,
202,
202,
2211,
18,
1636,
1079,
273,
9324,
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
] |
result.append("Dataset & \\multicolumn{3}{c}{" + getColName(0) + "}");
|
result.append("Dataset & \\multicolumn{3}{c}{" + cells[0][1] + "}");
|
public String toStringMatrix() { StringBuffer result; String[][] cells; int i; int j; int n; int size; result = new StringBuffer(); cells = toArray(); result.append( "\\begin{table}[thb]\n\\caption{\\label{labelname}" + "Table Caption}\n"); if (!getShowStdDev()) result.append("\\footnotesize\n"); else result.append("\\scriptsize\n"); // output the column alignment characters // one for the dataset name and one for the comparison column if (!getShowStdDev()) { result.append( "{\\centering \\begin{tabular}{" + "l" // dataset + "" // separator + "r" // mean ); } else { // dataset, mean, std dev result.append( "{\\centering \\begin{tabular}{" + "l" // dataset + "" // separator + "r" // mean + "@{\\hspace{0cm}}" // separator + "c" // +/- + "@{\\hspace{0cm}}" // separator + "r" // stddev ); } for (j = 1; j < getColCount(); j++) { if (getColHidden(j)) continue; if (!getShowStdDev()) result.append( "r" // mean + "@{\\hspace{0.1cm}}" // separator + "c" // significance ); else result.append( "r" // mean + "@{\\hspace{0cm}}" // separator + "c" // +/- + "@{\\hspace{0cm}}" // separator + "r" // stddev + "@{\\hspace{0.1cm}}" // separator + "c" // significance ); } result.append("}\n\\\\\n\\hline\n"); if (!getShowStdDev()) result.append("Dataset & " + getColName(0)); else result.append("Dataset & \\multicolumn{3}{c}{" + getColName(0) + "}"); // now do the column names (numbers) for (j = 1; j < getColCount(); j++) { if (getColHidden(j)) continue; if (!getShowStdDev()) result.append("& " + getColName(j) + " & "); else result.append("& \\multicolumn{4}{c}{" + getColName(j) + "} "); } result.append("\\\\\n\\hline\n"); // change "_" to "-" in names for (i = 1; i < cells.length; i++) cells[i][0] = cells[i][0].replace('_', '-'); // pad numbers for (n = 1; n < cells[0].length; n++) { size = getColSize(cells, n); for (i = 1; i < cells.length; i++) cells[i][n] = padString(cells[i][n], size, true); } // output data (w/o wins/ties/losses) for (i = 1; i < cells.length - 1; i++) { for (n = 0; n < cells[0].length; n++) { if (n == 0) { result.append(padString(cells[i][n], getRowNameWidth())); } else { if (getShowStdDev()) { if (isMean(n - 1)) { if (!cells[i][n].trim().equals("")) result.append(" & $\\pm$ & "); else result.append(" & & "); } else result.append(" & "); } else { result.append(" & "); } result.append(cells[i][n]); } } result.append("\\\\\n"); } result.append("\\hline\n\\multicolumn{" + cells[0].length + "}{c}{$\\circ$, $\\bullet$" +" statistically significant improvement or degradation}" +"\\\\\n\\end{tabular} "); if (!getShowStdDev()) result.append("\\footnotesize "); else result.append("\\scriptsize "); result.append("\\par}\n\\end{table}" +"\n"); return result.toString(); }
|
4179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4179/f047de467ed2a616441392cfd375493956c4c2f1/ResultMatrixLatex.java/buggy/trunk/weka/experiment/ResultMatrixLatex.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
1762,
4635,
1435,
288,
565,
6674,
565,
563,
31,
565,
514,
63,
6362,
65,
1377,
5983,
31,
565,
509,
2398,
277,
31,
565,
509,
2398,
525,
31,
565,
509,
2398,
290,
31,
565,
509,
2398,
963,
31,
565,
563,
225,
273,
394,
6674,
5621,
565,
5983,
282,
273,
4434,
5621,
565,
563,
18,
6923,
12,
225,
8422,
10086,
95,
2121,
20294,
451,
70,
13944,
82,
1695,
15386,
95,
1695,
1925,
95,
1925,
529,
1532,
5375,
397,
315,
1388,
25064,
6280,
82,
8863,
565,
309,
16051,
588,
5706,
10436,
8870,
10756,
1377,
563,
18,
6923,
2932,
1695,
10923,
12903,
554,
64,
82,
8863,
565,
469,
1377,
563,
18,
6923,
2932,
1695,
12827,
554,
64,
82,
8863,
565,
368,
876,
326,
1057,
8710,
3949,
565,
368,
1245,
364,
326,
3709,
508,
471,
1245,
364,
326,
5826,
1057,
565,
309,
16051,
588,
5706,
10436,
8870,
10756,
288,
1377,
563,
18,
6923,
12,
225,
4144,
1695,
5693,
310,
1736,
10086,
95,
7032,
2490,
8637,
6,
10792,
397,
315,
80,
6,
5397,
368,
3709,
10792,
397,
1408,
8227,
368,
4182,
10792,
397,
315,
86,
6,
5397,
368,
3722,
10792,
11272,
565,
289,
469,
288,
1377,
368,
3709,
16,
3722,
16,
2044,
4461,
1377,
563,
18,
6923,
12,
225,
4144,
1695,
5693,
310,
1736,
10086,
95,
7032,
2490,
8637,
6,
5397,
397,
315,
80,
6,
5397,
368,
3709,
10792,
397,
1408,
8227,
368,
4182,
10792,
397,
315,
86,
6,
5397,
368,
3722,
10792,
397,
8787,
95,
1695,
76,
2981,
95,
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,
1762,
4635,
1435,
288,
565,
6674,
565,
563,
31,
565,
514,
63,
6362,
65,
1377,
5983,
31,
565,
509,
2398,
277,
31,
565,
509,
2398,
525,
31,
565,
509,
2398,
290,
31,
565,
509,
2398,
963,
31,
565,
563,
225,
273,
394,
6674,
5621,
565,
5983,
282,
273,
4434,
5621,
565,
563,
18,
6923,
12,
225,
8422,
10086,
95,
2121,
20294,
451,
70,
13944,
82,
1695,
15386,
95,
1695,
1925,
95,
1925,
529,
1532,
5375,
397,
315,
1388,
25064,
6280,
82,
8863,
565,
309,
16051,
588,
5706,
10436,
8870,
10756,
1377,
563,
18,
6923,
2932,
1695,
10923,
12903,
554,
64,
82,
8863,
565,
469,
1377,
563,
18,
6923,
2932,
1695,
12827,
554,
64,
82,
8863,
565,
2
] |
in.mark(120);
|
in.mark(MAX_LINELENGTH);
|
public Sequence readSequence(StreamReader.Context context, SymbolParser resParser, SequenceFactory sf) throws IllegalSymbolException, IOException { final BufferedReader in = context.getReader(); StringBuffer sb = new StringBuffer(); String line; // find > for(line = in.readLine(); line != null; line = in.readLine()) { if(line.startsWith(">")) { break; } } if(line == null) { throw new IOException("File ended prematurely"); } String description = line.substring(1).trim(); // read in all the sequence up untill > or eof ArrayList resList = new ArrayList(); in.mark(120); line = in.readLine(); while(line != null && !line.startsWith(">")) { StringTokenizer st = new StringTokenizer(line, " ", false); while(st.hasMoreTokens()) { String token = st.nextToken(); resList.ensureCapacity(resList.size() + getLineWidth()); resList.addAll(resParser.parse(token).toList()); } in.mark(120); line = in.readLine(); } if(line == null) { context.streamEmpty(); } else { in.reset(); } String [] urnName = fdr.parseURNName(description); Sequence seq = sf.createSequence(new SimpleSymbolList(resParser.getAlphabet(), resList), urnName[0], urnName[1], null); fdr.parseAnnotation(description, seq.getAnnotation()); return seq; }
|
50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/ccef723900a78a4f69b5dfc7cae52bb5cefe2be7/FastaFormat.java/clean/src/org/biojava/bio/seq/io/FastaFormat.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
8370,
855,
4021,
12,
31495,
18,
1042,
819,
16,
1171,
9079,
8565,
2678,
400,
2678,
16,
1171,
9079,
8370,
1733,
9033,
13,
540,
1216,
2141,
5335,
503,
16,
1860,
288,
565,
727,
10633,
316,
273,
819,
18,
588,
2514,
5621,
565,
6674,
2393,
273,
394,
6674,
5621,
565,
514,
980,
31,
565,
368,
1104,
405,
3639,
364,
12,
1369,
273,
316,
18,
896,
1670,
5621,
980,
480,
446,
31,
980,
273,
316,
18,
896,
1670,
10756,
288,
1377,
309,
12,
1369,
18,
17514,
1190,
2932,
2984,
3719,
288,
3639,
898,
31,
1377,
289,
565,
289,
3639,
309,
12,
1369,
422,
446,
13,
288,
1377,
604,
394,
1860,
2932,
812,
16926,
23020,
1231,
715,
8863,
565,
289,
3639,
514,
2477,
273,
980,
18,
28023,
12,
21,
2934,
5290,
5621,
565,
368,
855,
316,
777,
326,
3102,
731,
640,
88,
737,
405,
578,
14813,
565,
2407,
400,
682,
273,
394,
2407,
5621,
565,
316,
18,
3355,
12,
6694,
67,
5997,
7096,
1769,
565,
980,
273,
316,
18,
896,
1670,
5621,
565,
1323,
12,
1369,
480,
446,
597,
401,
1369,
18,
17514,
1190,
2932,
2984,
3719,
288,
1377,
16370,
384,
273,
394,
16370,
12,
1369,
16,
315,
3104,
629,
1769,
1377,
1323,
12,
334,
18,
5332,
7417,
5157,
10756,
288,
3639,
514,
1147,
273,
384,
18,
4285,
1345,
5621,
3639,
400,
682,
18,
15735,
7437,
12,
455,
682,
18,
1467,
1435,
397,
9851,
2384,
10663,
3639,
400,
682,
18,
1289,
1595,
12,
455,
2678,
18,
2670,
12,
2316,
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,
8370,
855,
4021,
12,
31495,
18,
1042,
819,
16,
1171,
9079,
8565,
2678,
400,
2678,
16,
1171,
9079,
8370,
1733,
9033,
13,
540,
1216,
2141,
5335,
503,
16,
1860,
288,
565,
727,
10633,
316,
273,
819,
18,
588,
2514,
5621,
565,
6674,
2393,
273,
394,
6674,
5621,
565,
514,
980,
31,
565,
368,
1104,
405,
3639,
364,
12,
1369,
273,
316,
18,
896,
1670,
5621,
980,
480,
446,
31,
980,
273,
316,
18,
896,
1670,
10756,
288,
1377,
309,
12,
1369,
18,
17514,
1190,
2932,
2984,
3719,
288,
3639,
898,
31,
1377,
289,
565,
289,
3639,
309,
12,
1369,
422,
446,
13,
288,
1377,
604,
394,
1860,
2932,
812,
16926,
23020,
1231,
715,
8863,
565,
289,
3639,
2
] |
protected IASTName createOperatorName(OperatorTokenDuple duple, IASTName name) { IASTName aName=null; if (duple.isConversionOperator()) { aName = new CPPASTConversionName(name.toCharArray()); IASTTypeId typeId = duple.getTypeId(); typeId.setParent(aName); typeId.setPropertyInParent(ICPPASTConversionName.TYPE_ID); ((CPPASTConversionName)aName).setTypeId(typeId); } else { aName = new CPPASTOperatorName(name.toCharArray()); } if (name instanceof ICPPASTTemplateId) { ((ICPPASTTemplateId)name).setTemplateName(aName); return name; } return aName; }
|
protected IASTName createOperatorName(OperatorTokenDuple duple, IASTName name) { IASTName aName = null; if (duple.isConversionOperator()) { aName = new CPPASTConversionName(name.toCharArray()); IASTTypeId typeId = duple.getTypeId(); typeId.setParent(aName); typeId.setPropertyInParent(ICPPASTConversionName.TYPE_ID); ((CPPASTConversionName) aName).setTypeId(typeId); } else { aName = new CPPASTOperatorName(name.toCharArray()); } if (name instanceof ICPPASTTemplateId) { ((ICPPASTTemplateId) name).setTemplateName(aName); return name; } return aName; }
|
protected IASTName createOperatorName(OperatorTokenDuple duple, IASTName name) { IASTName aName=null; if (duple.isConversionOperator()) { aName = new CPPASTConversionName(name.toCharArray()); IASTTypeId typeId = duple.getTypeId(); typeId.setParent(aName); typeId.setPropertyInParent(ICPPASTConversionName.TYPE_ID); ((CPPASTConversionName)aName).setTypeId(typeId); } else { aName = new CPPASTOperatorName(name.toCharArray()); } if (name instanceof ICPPASTTemplateId) { ((ICPPASTTemplateId)name).setTemplateName(aName); return name; } return aName; }
|
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/8b59056395eb6c26e898030e7e1cd1b78d4db999/GNUCPPSourceParser.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
467,
9053,
461,
752,
5592,
461,
12,
5592,
1345,
40,
2268,
302,
2268,
16,
467,
9053,
461,
508,
13,
288,
202,
282,
467,
9053,
461,
279,
461,
33,
2011,
31,
202,
565,
202,
282,
309,
261,
72,
2268,
18,
291,
6814,
5592,
10756,
288,
1082,
282,
279,
461,
273,
394,
5181,
4066,
882,
6814,
461,
12,
529,
18,
869,
15936,
10663,
1082,
282,
467,
9053,
11731,
24361,
273,
302,
2268,
18,
588,
11731,
5621,
1082,
282,
24361,
18,
542,
3054,
12,
69,
461,
1769,
1082,
282,
24361,
18,
542,
1396,
382,
3054,
12,
2871,
52,
4066,
882,
6814,
461,
18,
2399,
67,
734,
1769,
1082,
282,
14015,
4258,
4066,
882,
6814,
461,
13,
69,
461,
2934,
542,
11731,
12,
723,
548,
1769,
202,
282,
289,
469,
288,
1082,
282,
279,
461,
273,
394,
5181,
4066,
882,
5592,
461,
12,
529,
18,
869,
15936,
10663,
202,
282,
289,
202,
565,
202,
282,
309,
261,
529,
1276,
467,
4258,
4066,
882,
2283,
548,
13,
288,
1082,
282,
14015,
2871,
52,
4066,
882,
2283,
548,
13,
529,
2934,
542,
28917,
12,
69,
461,
1769,
1082,
282,
327,
508,
31,
202,
282,
289,
202,
565,
202,
282,
327,
279,
461,
31,
282,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
467,
9053,
461,
752,
5592,
461,
12,
5592,
1345,
40,
2268,
302,
2268,
16,
467,
9053,
461,
508,
13,
288,
202,
282,
467,
9053,
461,
279,
461,
33,
2011,
31,
202,
565,
202,
282,
309,
261,
72,
2268,
18,
291,
6814,
5592,
10756,
288,
1082,
282,
279,
461,
273,
394,
5181,
4066,
882,
6814,
461,
12,
529,
18,
869,
15936,
10663,
1082,
282,
467,
9053,
11731,
24361,
273,
302,
2268,
18,
588,
11731,
5621,
1082,
282,
24361,
18,
542,
3054,
12,
69,
461,
1769,
1082,
282,
24361,
18,
542,
1396,
382,
3054,
12,
2871,
52,
4066,
882,
6814,
461,
18,
2399,
67,
734,
1769,
1082,
282,
14015,
4258,
4066,
882,
6814,
461,
13,
69,
461,
2934,
542,
2
] |
MatchBuilder priorCallBuilder = priorMockObject.lookupID(priorCallID);
|
private void setupOrderingMatchers( BuilderIdentityTable priorMockObject, String priorCallID, String priorCallDescription ) { MatchBuilder priorCallBuilder = priorMockObject.lookupID(priorCallID); InvokedRecorder priorCallRecorder = new InvokedRecorder(); priorCallBuilder.match(priorCallRecorder); mocker.addMatcher(new InvokedAfterMatcher( priorCallRecorder, priorCallDescription)); }
|
57371 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57371/2defe1eafaa463cbe1c2691fed05e4d7e6dcdb62/InvocationMockerBuilder.java/buggy/jmock/core/src/org/jmock/builder/InvocationMockerBuilder.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3875,
20493,
28061,
12,
5008,
4334,
1388,
6432,
9865,
921,
16,
17322,
202,
202,
780,
6432,
1477,
734,
16,
17322,
202,
202,
780,
6432,
1477,
3291,
262,
377,
288,
1082,
565,
202,
26215,
10777,
6432,
1477,
10777,
273,
394,
5454,
14276,
10777,
5621,
377,
202,
377,
202,
17927,
1477,
1263,
18,
1916,
12,
17927,
1477,
10777,
1769,
377,
202,
81,
6203,
18,
1289,
6286,
12,
2704,
5454,
14276,
4436,
6286,
12,
6432,
1477,
10777,
16,
377,
202,
4766,
6647,
6432,
1477,
3291,
10019,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3875,
20493,
28061,
12,
5008,
4334,
1388,
6432,
9865,
921,
16,
17322,
202,
202,
780,
6432,
1477,
734,
16,
17322,
202,
202,
780,
6432,
1477,
3291,
262,
377,
288,
1082,
565,
202,
26215,
10777,
6432,
1477,
10777,
273,
394,
5454,
14276,
10777,
5621,
377,
202,
377,
202,
17927,
1477,
1263,
18,
1916,
12,
17927,
1477,
10777,
1769,
377,
202,
81,
6203,
18,
1289,
6286,
12,
2704,
5454,
14276,
4436,
6286,
12,
6432,
1477,
10777,
16,
377,
202,
4766,
6647,
6432,
1477,
3291,
10019,
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
] |
|
null, "setFrameborder");
|
null, "setFrameborderExpr");
|
public PropertyDescriptor[] getPropertyDescriptors() { PropertyDescriptor[] result = new PropertyDescriptor[24]; try { result[0] = new PropertyDescriptor("anchor", ELFrameTag.class, null, "setAnchor"); result[1] = new PropertyDescriptor("forward", ELFrameTag.class, null, "setForward"); result[2] = new PropertyDescriptor("frameborder", ELFrameTag.class, null, "setFrameborder"); result[3] = new PropertyDescriptor("frameName", ELFrameTag.class, null, "setFrameName"); result[4] = new PropertyDescriptor("href", ELFrameTag.class, null, "setHref"); result[5] = new PropertyDescriptor("longdesc", ELFrameTag.class, null, "setLongdesc"); result[6] = new PropertyDescriptor("marginheight", ELFrameTag.class, null, "setMarginheightExpr"); result[7] = new PropertyDescriptor("marginwidth", ELFrameTag.class, null, "setMarginwidthExpr"); result[8] = new PropertyDescriptor("name", ELFrameTag.class, null, "setName"); result[9] = new PropertyDescriptor("noresize", ELFrameTag.class, null, "setNoresizeExpr"); result[10] = new PropertyDescriptor("page", ELFrameTag.class, null, "setPage"); result[11] = new PropertyDescriptor("paramId", ELFrameTag.class, null, "setParamId"); result[12] = new PropertyDescriptor("paramName", ELFrameTag.class, null, "setParamName"); result[13] = new PropertyDescriptor("paramProperty", ELFrameTag.class, null, "setParamProperty"); result[14] = new PropertyDescriptor("paramScope", ELFrameTag.class, null, "setParamScope"); result[15] = new PropertyDescriptor("property", ELFrameTag.class, null, "setProperty"); result[16] = new PropertyDescriptor("scope", ELFrameTag.class, null, "setScope"); result[17] = new PropertyDescriptor("scrolling", ELFrameTag.class, null, "setScrolling"); result[18] = new PropertyDescriptor("style", ELFrameTag.class, null, "setStyle"); result[19] = new PropertyDescriptor("styleClass", ELFrameTag.class, null, "setStyleClass"); result[20] = new PropertyDescriptor("styleId", ELFrameTag.class, null, "setStyleId"); result[21] = new PropertyDescriptor("title", ELFrameTag.class, null, "setTitle"); result[22] = new PropertyDescriptor("titleKey", ELFrameTag.class, null, "setTitleKey"); result[23] = new PropertyDescriptor("transaction", ELFrameTag.class, null, "setTransactionExpr"); } catch (IntrospectionException ex) { ex.printStackTrace(); } return (result); }
|
48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/db064e19656421b94aaf753550935d95f44bd5f9/ELFrameTagBeanInfo.java/clean/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELFrameTagBeanInfo.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
225,
26761,
8526,
3911,
12705,
1435,
565,
288,
3639,
26761,
8526,
225,
563,
282,
273,
394,
26761,
63,
3247,
15533,
3639,
775,
288,
5411,
563,
63,
20,
65,
273,
394,
26761,
2932,
16215,
3113,
14801,
3219,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
11605,
8863,
5411,
563,
63,
21,
65,
273,
394,
26761,
2932,
11565,
3113,
14801,
3219,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
8514,
8863,
5411,
563,
63,
22,
65,
273,
394,
26761,
2932,
3789,
8815,
3113,
14801,
3219,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
3219,
8815,
4742,
8863,
5411,
563,
63,
23,
65,
273,
394,
26761,
2932,
3789,
461,
3113,
14801,
3219,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
3219,
461,
8863,
5411,
563,
63,
24,
65,
273,
394,
26761,
2932,
7547,
3113,
14801,
3219,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
15962,
8863,
5411,
563,
63,
25,
65,
273,
394,
26761,
2932,
5748,
5569,
3113,
14801,
3219,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
3708,
5569,
8863,
5411,
563,
63,
26,
65,
273,
394,
26761,
2932,
10107,
4210,
3113,
14801,
3219,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
9524,
4210,
4742,
8863,
5411,
563,
63,
27,
65,
273,
394,
26761,
2932,
10107,
2819,
3113,
14801,
3219,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
9524,
2819,
4742,
8863,
5411,
563,
63,
28,
65,
273,
394,
26761,
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,
225,
26761,
8526,
3911,
12705,
1435,
565,
288,
3639,
26761,
8526,
225,
563,
282,
273,
394,
26761,
63,
3247,
15533,
3639,
775,
288,
5411,
563,
63,
20,
65,
273,
394,
26761,
2932,
16215,
3113,
14801,
3219,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
11605,
8863,
5411,
563,
63,
21,
65,
273,
394,
26761,
2932,
11565,
3113,
14801,
3219,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
8514,
8863,
5411,
563,
63,
22,
65,
273,
394,
26761,
2932,
3789,
8815,
3113,
14801,
3219,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
3219,
8815,
4742,
8863,
5411,
563,
63,
23,
65,
273,
394,
26761,
2932,
3789,
461,
3113,
14801,
3219,
1805,
18,
2
] |
for (String username : members) { groupMemberCache.remove("userGroups-" + username); }
|
public void deleteGroup(Group group) { // Make a copy of the group members. Collection<String> members = new ArrayList<String>(group.getMembers()); // Delete the group. provider.deleteGroup(group.getName()); // Expire all relevant caches. groupCache.remove(group.getName()); // Remove entries in the group membership cache for all members of the group. for (String username : members) { groupMemberCache.remove("userGroups-" + username); } }
|
6312 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6312/3ff3a501ae5075e5bfa1f1a591db80b231be1fa9/GroupManager.java/clean/src/java/org/jivesoftware/messenger/group/GroupManager.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1430,
1114,
12,
1114,
1041,
13,
288,
3639,
368,
4344,
279,
1610,
434,
326,
1041,
4833,
18,
3639,
2200,
32,
780,
34,
4833,
273,
394,
2407,
32,
780,
34,
12,
1655,
18,
588,
6918,
10663,
3639,
368,
2504,
326,
1041,
18,
3639,
2893,
18,
3733,
1114,
12,
1655,
18,
17994,
10663,
3639,
368,
7784,
577,
777,
9368,
12535,
18,
3639,
1041,
1649,
18,
4479,
12,
1655,
18,
17994,
10663,
3639,
368,
3581,
3222,
316,
326,
1041,
12459,
1247,
364,
777,
4833,
434,
326,
1041,
18,
3639,
364,
261,
780,
2718,
294,
4833,
13,
288,
5411,
1041,
4419,
1649,
18,
4479,
2932,
1355,
3621,
10951,
397,
2718,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1430,
1114,
12,
1114,
1041,
13,
288,
3639,
368,
4344,
279,
1610,
434,
326,
1041,
4833,
18,
3639,
2200,
32,
780,
34,
4833,
273,
394,
2407,
32,
780,
34,
12,
1655,
18,
588,
6918,
10663,
3639,
368,
2504,
326,
1041,
18,
3639,
2893,
18,
3733,
1114,
12,
1655,
18,
17994,
10663,
3639,
368,
7784,
577,
777,
9368,
12535,
18,
3639,
1041,
1649,
18,
4479,
12,
1655,
18,
17994,
10663,
3639,
368,
3581,
3222,
316,
326,
1041,
12459,
1247,
364,
777,
4833,
434,
326,
1041,
18,
3639,
364,
261,
780,
2718,
294,
4833,
13,
288,
5411,
1041,
4419,
1649,
18,
4479,
2932,
1355,
3621,
10951,
397,
2718,
1769,
3639,
289,
565,
289,
2,
-100,
-100,
-100,
-100,
-100
] |
|
menu.setMnemonic(KeyEvent.VK_H);
|
menu.setMnemonic(KeyEvent.VK_F);
|
private JMenu createFileMenu() { JMenu menu = new JMenu("File"); menu.setMnemonic(KeyEvent.VK_H); menu.add(new JMenuItem( controller.getAction(HiViewer.SAVE_THUMB))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewer.EXIT))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem(controller.getAction(HiViewer.REFRESH))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem(controller.getAction( HiViewer.EXIT_APPLICATION))); return menu; }
|
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64ee7ec527da3cc538fcd8d0a21183719f854676/HiViewerWin.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/HiViewerWin.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
804,
4599,
21266,
4599,
1435,
565,
288,
3639,
804,
4599,
3824,
273,
394,
804,
4599,
2932,
812,
8863,
3639,
3824,
18,
542,
29668,
20918,
12,
653,
1133,
18,
58,
47,
67,
42,
1769,
3639,
3824,
18,
1289,
12,
2704,
804,
12958,
12,
7734,
2596,
18,
588,
1803,
12,
25009,
18415,
18,
25242,
67,
2455,
2799,
38,
3719,
1769,
3639,
3824,
18,
1289,
12,
2704,
804,
6581,
12,
46,
6581,
18,
44,
20344,
10019,
3639,
3824,
18,
1289,
12,
2704,
804,
12958,
12,
7734,
2596,
18,
588,
1803,
12,
25009,
18415,
18,
28682,
3719,
1769,
3639,
3824,
18,
1289,
12,
2704,
804,
6581,
12,
46,
6581,
18,
44,
20344,
10019,
3639,
3824,
18,
1289,
12,
2704,
804,
12958,
12,
5723,
18,
588,
1803,
12,
25009,
18415,
18,
10771,
14753,
3719,
1769,
3639,
3824,
18,
1289,
12,
2704,
804,
6581,
12,
46,
6581,
18,
44,
20344,
10019,
3639,
3824,
18,
1289,
12,
2704,
804,
12958,
12,
5723,
18,
588,
1803,
12,
27573,
670,
77,
18415,
18,
28682,
67,
25039,
3719,
1769,
3639,
327,
3824,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3238,
804,
4599,
21266,
4599,
1435,
565,
288,
3639,
804,
4599,
3824,
273,
394,
804,
4599,
2932,
812,
8863,
3639,
3824,
18,
542,
29668,
20918,
12,
653,
1133,
18,
58,
47,
67,
42,
1769,
3639,
3824,
18,
1289,
12,
2704,
804,
12958,
12,
7734,
2596,
18,
588,
1803,
12,
25009,
18415,
18,
25242,
67,
2455,
2799,
38,
3719,
1769,
3639,
3824,
18,
1289,
12,
2704,
804,
6581,
12,
46,
6581,
18,
44,
20344,
10019,
3639,
3824,
18,
1289,
12,
2704,
804,
12958,
12,
7734,
2596,
18,
588,
1803,
12,
25009,
18415,
18,
28682,
3719,
1769,
3639,
3824,
18,
1289,
12,
2704,
804,
6581,
12,
46,
6581,
18,
44,
20344,
10019,
3639,
3824,
18,
1289,
12,
2704,
804,
12958,
2
] |
Server server = new CompleteSocketCustomStreamServer(new PlainClassRetriever(), new DefaultAuthenticator(), new NullServerMonitor(), new DefaultThreadPool(), ccf, 13333);
|
CompleteSocketCustomStreamServer server = new CompleteSocketCustomStreamServer(new PlainClassRetriever(), new DefaultAuthenticator(), new NullServerMonitor(), new DefaultThreadPool(), ccf, 13333);
|
public void testWithCustomContextWithRPC() throws InterruptedException, ServerException, PublicationException, ConnectionException { final HashMap hashMap = new HashMap(); AccountListener al = makeAccountListener(hashMap); ServerSideClientContextFactory ccf = new DefaultServerSideClientContextFactory(); AccountImpl one = new AccountImpl(ccf, "one", al); AccountImpl two = new AccountImpl(ccf, "two", al); final AccountManager accountManager = new AccountManagerImpl(ccf, one, two); Server server = new CompleteSocketCustomStreamServer(new PlainClassRetriever(), new DefaultAuthenticator(), new NullServerMonitor(), new DefaultThreadPool(), ccf, 13333); PublicationDescription pd = new PublicationDescription(AccountManager.class); server.publish(accountManager, "OurAccountManager", pd); server.start(); Factory factory = new ClientSideClassFactory(new SocketCustomStreamHostContext("127.0.0.1", 13333), false); final AccountManager clientSideAccountManager = (AccountManager) factory.lookup("OurAccountManager"); Thread threadOne = makeThread(clientSideAccountManager, 11); Thread threadTwo = makeThread(clientSideAccountManager, 22); threadOne.start(); threadTwo.start(); Thread.sleep(2000); ClientContext debit11 = (ClientContext) hashMap.get("one:debit:11"); ClientContext credit11 = (ClientContext) hashMap.get("two:credit:11"); basicAsserts(debit11, credit11); assertTrue("Wrong type of ClientContext", credit11 instanceof DefaultServerSideClientContext); ClientContext debit22 = (ClientContext) hashMap.get("one:debit:22"); ClientContext credit22 = (ClientContext) hashMap.get("two:credit:22"); basicAsserts(debit22, credit22); assertFalse(debit11 == credit22); }
|
6329 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6329/1c6879e94d3ad4282a0441560cc8a453c030e76d/ClientContextTestCase.java/clean/jremoting/trunk/itests/src/test/org/codehaus/jremoting/test/clientcontext/ClientContextTestCase.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1190,
3802,
1042,
1190,
8087,
1435,
1216,
7558,
16,
25305,
16,
7224,
29304,
16,
31545,
288,
3639,
727,
4317,
1651,
863,
273,
394,
4317,
5621,
3639,
6590,
2223,
524,
273,
1221,
3032,
2223,
12,
2816,
863,
1769,
3639,
3224,
8895,
1227,
29871,
4946,
74,
273,
394,
2989,
2081,
8895,
1227,
29871,
5621,
3639,
6590,
2828,
1245,
273,
394,
6590,
2828,
12,
952,
74,
16,
315,
476,
3113,
524,
1769,
3639,
6590,
2828,
2795,
273,
394,
6590,
2828,
12,
952,
74,
16,
315,
15415,
3113,
524,
1769,
3639,
727,
6590,
1318,
2236,
1318,
273,
394,
6590,
1318,
2828,
12,
952,
74,
16,
1245,
16,
2795,
1769,
3639,
14575,
4534,
3802,
1228,
2081,
1438,
273,
394,
14575,
4534,
3802,
1228,
2081,
12,
2704,
17367,
797,
30801,
9334,
394,
2989,
18977,
9334,
394,
4112,
2081,
7187,
9334,
394,
2989,
20621,
9334,
4946,
74,
16,
404,
18094,
1769,
3639,
7224,
367,
3291,
4863,
273,
394,
7224,
367,
3291,
12,
3032,
1318,
18,
1106,
1769,
3639,
1438,
18,
6543,
12,
4631,
1318,
16,
315,
51,
295,
3032,
1318,
3113,
4863,
1769,
3639,
1438,
18,
1937,
5621,
3639,
7822,
3272,
273,
394,
2445,
8895,
797,
1733,
12,
2704,
8758,
3802,
1228,
2594,
1042,
2932,
14260,
18,
20,
18,
20,
18,
21,
3113,
404,
18094,
3631,
629,
1769,
3639,
727,
6590,
1318,
1004,
8895,
3032,
1318,
273,
261,
3032,
1318,
13,
3272,
18,
8664,
2932,
51,
295,
3032,
1318,
8863,
3639,
4884,
2650,
3335,
273,
1221,
3830,
12,
2625,
8895,
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,
1842,
1190,
3802,
1042,
1190,
8087,
1435,
1216,
7558,
16,
25305,
16,
7224,
29304,
16,
31545,
288,
3639,
727,
4317,
1651,
863,
273,
394,
4317,
5621,
3639,
6590,
2223,
524,
273,
1221,
3032,
2223,
12,
2816,
863,
1769,
3639,
3224,
8895,
1227,
29871,
4946,
74,
273,
394,
2989,
2081,
8895,
1227,
29871,
5621,
3639,
6590,
2828,
1245,
273,
394,
6590,
2828,
12,
952,
74,
16,
315,
476,
3113,
524,
1769,
3639,
6590,
2828,
2795,
273,
394,
6590,
2828,
12,
952,
74,
16,
315,
15415,
3113,
524,
1769,
3639,
727,
6590,
1318,
2236,
1318,
273,
394,
6590,
1318,
2828,
12,
952,
74,
16,
1245,
16,
2795,
1769,
3639,
14575,
4534,
3802,
1228,
2081,
1438,
273,
394,
14575,
2
] |
public synchronized void updatePrototypes() { if ((System.currentTimeMillis() - lastUpdate) < 1000L) { return; } Collection protos = app.getPrototypes(); // in order to respect inter-prototype dependencies, we try to update // the global prototype before all other prototypes, and parent // prototypes before their descendants. HashSet checked = new HashSet(protos.size()*2); TypeInfo type = (TypeInfo) prototypes.get("global"); updatePrototype(type, checked); for (Iterator i = protos.iterator(); i.hasNext();) { Prototype proto = (Prototype) i.next(); if (checked.contains(proto)) { continue; } type = (TypeInfo) prototypes.get(proto.getLowerCaseName()); if (type == null) { // a prototype we don't know anything about yet. Init local update info. initPrototype(proto); } else if (type.lastUpdate > -1) { // only need to update prototype if it has already been initialized. // otherwise, this will be done on demand. updatePrototype(type, checked); } } lastUpdate = System.currentTimeMillis(); }
|
3798 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3798/21c33be366da76200210ff457e0a803f456b14b8/RhinoCore.java/clean/src/helma/scripting/rhino/RhinoCore.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
1089,
626,
3307,
989,
1435,
288,
3639,
309,
14015,
3163,
18,
2972,
28512,
1435,
300,
1142,
1891,
13,
411,
4336,
48,
13,
288,
5411,
327,
31,
3639,
289,
3639,
2200,
30284,
273,
595,
18,
588,
626,
3307,
989,
5621,
3639,
368,
316,
1353,
358,
8762,
1554,
17,
18541,
5030,
16,
732,
775,
358,
1089,
3639,
368,
326,
2552,
4409,
1865,
777,
1308,
450,
3307,
989,
16,
471,
982,
540,
368,
450,
3307,
989,
1865,
3675,
18039,
18,
3639,
6847,
5950,
273,
394,
6847,
12,
11815,
538,
18,
1467,
1435,
14,
22,
1769,
3639,
1412,
966,
618,
273,
261,
17305,
13,
450,
3307,
989,
18,
588,
2932,
6347,
8863,
3639,
1089,
15846,
12,
723,
16,
5950,
1769,
3639,
364,
261,
3198,
277,
273,
30284,
18,
9838,
5621,
277,
18,
5332,
2134,
5621,
13,
288,
5411,
1186,
3836,
3760,
273,
261,
15846,
13,
277,
18,
4285,
5621,
5411,
309,
261,
4532,
18,
12298,
12,
9393,
3719,
288,
7734,
1324,
31,
5411,
289,
5411,
618,
273,
261,
17305,
13,
450,
3307,
989,
18,
588,
12,
9393,
18,
588,
5630,
461,
10663,
5411,
309,
261,
723,
422,
446,
13,
288,
7734,
368,
279,
4409,
732,
2727,
1404,
5055,
6967,
2973,
4671,
18,
4378,
1191,
1089,
1123,
18,
7734,
1208,
15846,
12,
9393,
1769,
5411,
289,
469,
309,
261,
723,
18,
2722,
1891,
405,
300,
21,
13,
288,
7734,
368,
1338,
1608,
358,
1089,
4409,
309,
518,
711,
1818,
2118,
6454,
18,
7734,
368,
3541,
16,
333,
903,
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,
1089,
626,
3307,
989,
1435,
288,
3639,
309,
14015,
3163,
18,
2972,
28512,
1435,
300,
1142,
1891,
13,
411,
4336,
48,
13,
288,
5411,
327,
31,
3639,
289,
3639,
2200,
30284,
273,
595,
18,
588,
626,
3307,
989,
5621,
3639,
368,
316,
1353,
358,
8762,
1554,
17,
18541,
5030,
16,
732,
775,
358,
1089,
3639,
368,
326,
2552,
4409,
1865,
777,
1308,
450,
3307,
989,
16,
471,
982,
540,
368,
450,
3307,
989,
1865,
3675,
18039,
18,
3639,
6847,
5950,
273,
394,
6847,
12,
11815,
538,
18,
1467,
1435,
14,
22,
1769,
3639,
1412,
966,
618,
273,
261,
17305,
13,
450,
3307,
989,
18,
588,
2932,
6347,
8863,
3639,
1089,
15846,
12,
723,
16,
5950,
2
] |
||
public org.quickfix.field.UnderlyingStrikePrice getUnderlyingStrikePrice() throws FieldNotFound { org.quickfix.field.UnderlyingStrikePrice value = new org.quickfix.field.UnderlyingStrikePrice();
|
public quickfix.field.UnderlyingStrikePrice getUnderlyingStrikePrice() throws FieldNotFound { quickfix.field.UnderlyingStrikePrice value = new quickfix.field.UnderlyingStrikePrice();
|
public org.quickfix.field.UnderlyingStrikePrice getUnderlyingStrikePrice() throws FieldNotFound { org.quickfix.field.UnderlyingStrikePrice value = new org.quickfix.field.UnderlyingStrikePrice(); getField(value); return value; }
|
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/SecurityStatus.java/clean/src/java/src/quickfix/fix44/SecurityStatus.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
1585,
2547,
5147,
10833,
765,
6291,
1585,
2547,
5147,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
1585,
2547,
5147,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
1585,
2547,
5147,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
1585,
2547,
5147,
10833,
765,
6291,
1585,
2547,
5147,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
1585,
2547,
5147,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
1585,
2547,
5147,
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
] |
fConfiguration.setProperty(ERROR_HANDLER,
|
fConfiguration.setProperty(ERROR_HANDLER,
|
public void setErrorHandler(ErrorHandler errorHandler) { try { fConfiguration.setProperty(ERROR_HANDLER, new ErrorHandlerWrapper(errorHandler)); } catch (XMLConfigurationException e) { // do nothing } } // setErrorHandler(ErrorHandler)
|
1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/e545c88f17897471421fc916bb2f9643b0730983/AbstractSAXParser.java/clean/src/org/apache/xerces/parsers/AbstractSAXParser.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
9967,
1503,
12,
17729,
17227,
13,
288,
3639,
775,
288,
5411,
284,
1750,
18,
542,
1396,
12,
3589,
67,
19937,
16,
4766,
3639,
394,
26406,
3611,
12,
1636,
1503,
10019,
3639,
289,
3639,
1044,
261,
4201,
10737,
425,
13,
288,
5411,
368,
741,
5083,
3639,
289,
565,
289,
368,
9967,
1503,
12,
17729,
13,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
9967,
1503,
12,
17729,
17227,
13,
288,
3639,
775,
288,
5411,
284,
1750,
18,
542,
1396,
12,
3589,
67,
19937,
16,
4766,
3639,
394,
26406,
3611,
12,
1636,
1503,
10019,
3639,
289,
3639,
1044,
261,
4201,
10737,
425,
13,
288,
5411,
368,
741,
5083,
3639,
289,
565,
289,
368,
9967,
1503,
12,
17729,
13,
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
] |
public void putInContext(String menuItemName, String valueName, Object value) { Map valueMap = (Map)context.get(menuItemName); if (valueMap == null) { valueMap = new HashMap(); context.put(menuItemName, valueMap); } valueMap.put(valueName, value);
|
public void putInContext(String name, Object value) { this.context.put(name, value);
|
public void putInContext(String menuItemName, String valueName, Object value) { Map valueMap = (Map)context.get(menuItemName); if (valueMap == null) { valueMap = new HashMap(); context.put(menuItemName, valueMap); } valueMap.put(valueName, value); }
|
55411 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55411/c70ede07e03b7f2dfdb5b321828ff9e53149a4e4/HtmlMenuWrapper.java/buggy/framework/widget/src/org/ofbiz/widget/html/HtmlMenuWrapper.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1378,
29334,
12,
780,
19711,
461,
16,
514,
460,
461,
16,
225,
1033,
460,
13,
288,
3639,
1635,
460,
863,
273,
261,
863,
13,
2472,
18,
588,
12,
5414,
1180,
461,
1769,
3639,
309,
261,
1132,
863,
422,
446,
13,
288,
5411,
460,
863,
273,
394,
4317,
5621,
5411,
819,
18,
458,
12,
5414,
1180,
461,
16,
460,
863,
1769,
3639,
289,
3639,
460,
863,
18,
458,
12,
1132,
461,
16,
460,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1378,
29334,
12,
780,
19711,
461,
16,
514,
460,
461,
16,
225,
1033,
460,
13,
288,
3639,
1635,
460,
863,
273,
261,
863,
13,
2472,
18,
588,
12,
5414,
1180,
461,
1769,
3639,
309,
261,
1132,
863,
422,
446,
13,
288,
5411,
460,
863,
273,
394,
4317,
5621,
5411,
819,
18,
458,
12,
5414,
1180,
461,
16,
460,
863,
1769,
3639,
289,
3639,
460,
863,
18,
458,
12,
1132,
461,
16,
460,
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
] |
start += commentStart; end += commentStart; if(startOffset >= start && endOffset <= end){
|
start += commentStart; end += commentStart; if(startOffset >= start && endOffset <= end){
|
public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) { ITextEditor textEditor = getEditor(); if (region == null || textEditor == null || canShowMultipleHyperlinks || !(textEditor instanceof JavaEditor)) return null; IEditorSite site= textEditor.getEditorSite(); if (site == null) return null; IJavaElement javaElement= getInputJavaElement(textEditor); if (javaElement == null) return null; CompilationUnit ast= JavaPlugin.getDefault().getASTProvider().getAST(javaElement, ASTProvider.WAIT_NO, null); if (ast == null) return null; ASTNode node= NodeFinder.perform(ast, region.getOffset(), 1); if (node == null || !(node instanceof TextElement || node instanceof Block)) return null; String comment = null; int commentStart = -1; if(node instanceof TextElement){ TextElement element = (TextElement)node; comment = element.getText(); commentStart = element.getStartPosition(); } else if(node instanceof Block){ Comment c = findComment(ast.getCommentList(), region.getOffset(), 1); if(c != null){ try{ IDocument document= textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput()); String commentString = document.get(c.getStartPosition(), c.getLength()); comment = getStringFromComment(c, region.getOffset(), commentString); commentStart = getLocationFromComment(c, comment, commentString) + c.getStartPosition(); } catch (BadLocationException e){ MylarPlugin.log(e, "Failed to get text for comment"); } } } if(comment == null) return null; int startOffset= region.getOffset(); int endOffset= startOffset + region.getLength(); Pattern p = Pattern.compile("^.*bug\\s+\\d+.*"); Matcher m = p.matcher(comment.toLowerCase().trim()); boolean b = m.matches(); p = Pattern.compile("^.*bug#\\s+\\d+.*"); m = p.matcher(comment.toLowerCase().trim()); boolean b2 = m.matches(); if(b || b2){ int start = comment.toLowerCase().indexOf("bug"); int ahead = 4; if(b2) ahead = 5; String endComment = comment.substring(start+ahead, comment.length()); endComment = endComment.trim(); int endCommentStart = comment.indexOf(endComment); int end = comment.indexOf(" ", endCommentStart); if(end == -1) end = comment.length(); int bugId = Integer.parseInt(comment.substring(endCommentStart, end).trim()); start += commentStart; end += commentStart; if(startOffset >= start && endOffset <= end){ IRegion sregion= new Region(start, end-start); return new IHyperlink[] {new BugzillaHyperLink(sregion, bugId)}; } } return null; }
|
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/663df6c4160ba85eb203d8c136ba8fd1e6a134d6/BugzillaHyperLinkDetector.java/clean/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugs/java/BugzillaHyperLinkDetector.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
15996,
1232,
8526,
5966,
15996,
7135,
12,
1285,
408,
18415,
977,
18415,
16,
467,
5165,
3020,
16,
1250,
848,
5706,
8438,
15996,
7135,
13,
288,
202,
202,
1285,
408,
6946,
977,
6946,
273,
336,
6946,
5621,
202,
202,
430,
261,
6858,
422,
446,
747,
977,
6946,
422,
446,
747,
848,
5706,
8438,
15996,
7135,
747,
401,
12,
955,
6946,
1276,
5110,
6946,
3719,
1082,
202,
2463,
446,
31,
202,
202,
45,
6946,
4956,
2834,
33,
977,
6946,
18,
588,
6946,
4956,
5621,
202,
202,
430,
261,
4256,
422,
446,
13,
1082,
202,
2463,
446,
31,
202,
202,
45,
5852,
1046,
2252,
1046,
33,
12353,
5852,
1046,
12,
955,
6946,
1769,
202,
202,
430,
261,
6290,
1046,
422,
446,
13,
1082,
202,
2463,
446,
31,
202,
202,
19184,
2802,
3364,
33,
5110,
3773,
18,
588,
1868,
7675,
588,
9053,
2249,
7675,
588,
9053,
12,
6290,
1046,
16,
9183,
2249,
18,
19046,
67,
3417,
16,
446,
1769,
202,
202,
430,
261,
689,
422,
446,
13,
1082,
202,
2463,
446,
31,
202,
202,
9053,
907,
756,
33,
2029,
8441,
18,
16092,
12,
689,
16,
3020,
18,
588,
2335,
9334,
404,
1769,
1082,
202,
430,
261,
2159,
422,
446,
747,
401,
12,
2159,
1276,
3867,
1046,
747,
756,
1276,
3914,
3719,
1082,
202,
2463,
446,
31,
1082,
202,
780,
2879,
273,
446,
31,
202,
202,
474,
2879,
1685,
273,
300,
21,
31,
9506,
202,
430,
12,
2159,
1276,
3867,
1046,
15329,
1082,
202,
1528,
1046,
930,
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,
225,
202,
482,
467,
15996,
1232,
8526,
5966,
15996,
7135,
12,
1285,
408,
18415,
977,
18415,
16,
467,
5165,
3020,
16,
1250,
848,
5706,
8438,
15996,
7135,
13,
288,
202,
202,
1285,
408,
6946,
977,
6946,
273,
336,
6946,
5621,
202,
202,
430,
261,
6858,
422,
446,
747,
977,
6946,
422,
446,
747,
848,
5706,
8438,
15996,
7135,
747,
401,
12,
955,
6946,
1276,
5110,
6946,
3719,
1082,
202,
2463,
446,
31,
202,
202,
45,
6946,
4956,
2834,
33,
977,
6946,
18,
588,
6946,
4956,
5621,
202,
202,
430,
261,
4256,
422,
446,
13,
1082,
202,
2463,
446,
31,
202,
202,
45,
5852,
1046,
2252,
1046,
33,
12353,
5852,
1046,
12,
955,
6946,
1769,
202,
202,
430,
261,
6290,
2
] |
run("./ImplicitFinal.x10","ImplicitFinal","./Constructs/Final"); }
|
runHelper(); }
|
public void test_Constructs_Final_ImplicitFinal() { run("./ImplicitFinal.x10","ImplicitFinal","./Constructs/Final"); }
|
1832 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1832/1a6ea2938bd80dc14d182a8d312337db644d998d/TestCompiler.java/buggy/x10.test/src/polyglot/ext/x10/tests/TestCompiler.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
67,
13262,
67,
7951,
67,
15787,
7951,
1435,
288,
3639,
1086,
2932,
18,
19,
15787,
7951,
18,
92,
2163,
15937,
15787,
7951,
3113,
9654,
19,
13262,
19,
7951,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
67,
13262,
67,
7951,
67,
15787,
7951,
1435,
288,
3639,
1086,
2932,
18,
19,
15787,
7951,
18,
92,
2163,
15937,
15787,
7951,
3113,
9654,
19,
13262,
19,
7951,
8863,
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
] |
presentationSite.selectPart(presentablePart);
|
setSelection(part);
|
private void showPart(LayoutPart part, IPresentablePart position) { part.setContainer(this); IPresentablePart presentablePart = part.getPresentablePart(); if (presentablePart == null) { return; } part.createControl(getParent()); part.setContainer(this); part.moveAbove(getPresentation().getControl()); presentationSite.getPresentation().addPart(presentablePart, position); if (current == null) { presentationSite.selectPart(presentablePart); } }
|
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/14827ce06d2a1c73b89c11076cc8a1b4cdcb9379/PartTabFolder.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartTabFolder.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2405,
1988,
12,
3744,
1988,
1087,
16,
2971,
1581,
429,
1988,
1754,
13,
288,
9506,
202,
2680,
18,
542,
2170,
12,
2211,
1769,
9506,
202,
2579,
1581,
429,
1988,
3430,
429,
1988,
273,
1087,
18,
588,
6351,
429,
1988,
5621,
9506,
202,
430,
261,
6706,
429,
1988,
422,
446,
13,
288,
1082,
202,
2463,
31,
202,
202,
97,
9506,
202,
2680,
18,
2640,
3367,
12,
588,
3054,
10663,
202,
202,
2680,
18,
542,
2170,
12,
2211,
1769,
202,
202,
2680,
18,
8501,
25477,
12,
588,
6351,
367,
7675,
588,
3367,
10663,
9506,
202,
10364,
4956,
18,
588,
6351,
367,
7675,
1289,
1988,
12,
6706,
429,
1988,
16,
1754,
1769,
9506,
202,
430,
261,
2972,
422,
446,
13,
288,
1082,
202,
10364,
4956,
18,
4025,
1988,
12,
6706,
429,
1988,
1769,
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,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2405,
1988,
12,
3744,
1988,
1087,
16,
2971,
1581,
429,
1988,
1754,
13,
288,
9506,
202,
2680,
18,
542,
2170,
12,
2211,
1769,
9506,
202,
2579,
1581,
429,
1988,
3430,
429,
1988,
273,
1087,
18,
588,
6351,
429,
1988,
5621,
9506,
202,
430,
261,
6706,
429,
1988,
422,
446,
13,
288,
1082,
202,
2463,
31,
202,
202,
97,
9506,
202,
2680,
18,
2640,
3367,
12,
588,
3054,
10663,
202,
202,
2680,
18,
542,
2170,
12,
2211,
1769,
202,
202,
2680,
18,
8501,
25477,
12,
588,
6351,
367,
7675,
588,
3367,
10663,
9506,
202,
10364,
4956,
18,
588,
6351,
367,
7675,
1289,
1988,
12,
6706,
429,
1988,
16,
1754,
1769,
9506,
202,
430,
261,
2972,
422,
2
] |
int index, Object value)
|
Object value)
|
public static void setIndexedProperty(Object bean, String name, int index, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { if (bean == null) { throw new IllegalArgumentException("No bean specified"); } if (name == null) { throw new IllegalArgumentException("No name specified"); } // Handle DynaBean instances specially if (bean instanceof DynaBean) { DynaProperty descriptor = ((DynaBean) bean).getDynaClass().getDynaProperty(name); if (descriptor == null) { throw new NoSuchMethodException("Unknown property '" + name + "'"); } ((DynaBean) bean).set(name, index, value); return; } // Retrieve the property descriptor for the specified property PropertyDescriptor descriptor = getPropertyDescriptor(bean, name); if (descriptor == null) { throw new NoSuchMethodException("Unknown property '" + name + "'"); } // Call the indexed setter method if there is one if (descriptor instanceof IndexedPropertyDescriptor) { Method writeMethod = ((IndexedPropertyDescriptor) descriptor). getIndexedWriteMethod(); if (writeMethod != null) { Object subscript[] = new Object[2]; subscript[0] = new Integer(index); subscript[1] = value; try { writeMethod.invoke(bean, subscript); } catch (InvocationTargetException e) { if (e.getTargetException() instanceof ArrayIndexOutOfBoundsException) { throw (ArrayIndexOutOfBoundsException) e.getTargetException(); } else { throw e; } } return; } } // Otherwise, the underlying property must be an array or a list Method readMethod = descriptor.getReadMethod(); if (readMethod == null) { throw new NoSuchMethodException("Property '" + name + "' has no getter method"); } // Call the property getter to get the array or list Object array = readMethod.invoke(bean, new Object[0]); if (!array.getClass().isArray()) { if (array instanceof List) { // Modify the specified value in the List ((List) array).set(index, value); } else { throw new IllegalArgumentException("Property '" + name + "' is not indexed"); } } else { // Modify the specified value in the array Array.set(array, index, value); } }
|
54521 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54521/188d8749ef1267da12a4394c90eba976d6c3971d/PropertyUtils.java/buggy/src/java/org/apache/commons/beanutils/PropertyUtils.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
444,
15034,
1396,
12,
921,
3931,
16,
514,
508,
16,
4766,
1850,
1033,
460,
13,
5411,
1216,
11900,
16,
15342,
16,
5411,
15959,
288,
3639,
309,
261,
14496,
422,
446,
13,
288,
5411,
604,
394,
2754,
2932,
2279,
3931,
1269,
8863,
3639,
289,
3639,
309,
261,
529,
422,
446,
13,
288,
5411,
604,
394,
2754,
2932,
2279,
508,
1269,
8863,
3639,
289,
3639,
368,
5004,
463,
23041,
3381,
3884,
857,
6261,
3639,
309,
261,
14496,
1276,
463,
23041,
3381,
13,
288,
5411,
463,
23041,
1396,
4950,
273,
10792,
14015,
10419,
69,
3381,
13,
3931,
2934,
588,
10419,
69,
797,
7675,
588,
10419,
69,
1396,
12,
529,
1769,
5411,
309,
261,
12628,
422,
446,
13,
288,
7734,
604,
394,
15959,
2932,
4874,
1272,
2119,
397,
13491,
508,
397,
5862,
1769,
5411,
289,
5411,
14015,
10419,
69,
3381,
13,
3931,
2934,
542,
12,
529,
16,
770,
16,
460,
1769,
5411,
327,
31,
3639,
289,
3639,
368,
10708,
326,
1272,
4950,
364,
326,
1269,
1272,
3639,
26761,
4950,
273,
7734,
3911,
3187,
12,
14496,
16,
508,
1769,
3639,
309,
261,
12628,
422,
446,
13,
288,
5411,
604,
394,
15959,
2932,
4874,
1272,
2119,
397,
10792,
508,
397,
5862,
1769,
3639,
289,
3639,
368,
3049,
326,
8808,
7794,
707,
309,
1915,
353,
1245,
3639,
309,
261,
12628,
1276,
22524,
1396,
3187,
13,
288,
5411,
2985,
1045,
1305,
273,
14015,
15034,
1396,
3187,
13,
4950,
2934,
10792,
8088,
329,
3067,
1305,
5621,
5411,
309,
261,
2626,
1305,
480,
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,
918,
444,
15034,
1396,
12,
921,
3931,
16,
514,
508,
16,
4766,
1850,
1033,
460,
13,
5411,
1216,
11900,
16,
15342,
16,
5411,
15959,
288,
3639,
309,
261,
14496,
422,
446,
13,
288,
5411,
604,
394,
2754,
2932,
2279,
3931,
1269,
8863,
3639,
289,
3639,
309,
261,
529,
422,
446,
13,
288,
5411,
604,
394,
2754,
2932,
2279,
508,
1269,
8863,
3639,
289,
3639,
368,
5004,
463,
23041,
3381,
3884,
857,
6261,
3639,
309,
261,
14496,
1276,
463,
23041,
3381,
13,
288,
5411,
463,
23041,
1396,
4950,
273,
10792,
14015,
10419,
69,
3381,
13,
3931,
2934,
588,
10419,
69,
797,
7675,
588,
10419,
69,
1396,
12,
529,
1769,
5411,
309,
261,
12628,
422,
446,
13,
288,
2
] |
public void run() { updateGutter(); afterUpdate.run(); } }, modalityState);
|
public void run() { updateGutter(); afterUpdate.run(); } }, modalityState);
|
public void run() { if(PsiManager.getInstance(myProject).isDisposed()) return; if(!isValid()) return; DebuggerContextImpl context = DebuggerManagerEx.getInstanceEx(myProject).getContext(); final DebugProcessImpl debugProcess = context.getDebugProcess(); if(debugProcess == null || !context.getDebuggerSession().isAttached()) { updateCaches(null); updateGutter(); afterUpdate.run(); } else { final ModalityState modalityState = ModalityState.current(); debugProcess.getManagerThread().invoke(new DebuggerCommandImpl() { protected void action() throws Exception { ApplicationManager.getApplication().runReadAction(new Runnable() { public void run() { updateCaches(debugProcess); } }); DebuggerInvocationUtil.invokeLater(getProject(), new Runnable() { public void run() { updateGutter(); afterUpdate.run(); } }, modalityState); } }); } }
|
56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/a819e8aea696e5dcfbe7bd6445a13fee96cc89ee/BreakpointWithHighlighter.java/buggy/source/com/intellij/debugger/ui/breakpoints/BreakpointWithHighlighter.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1086,
1435,
288,
3639,
309,
12,
52,
7722,
1318,
18,
588,
1442,
12,
4811,
4109,
2934,
291,
1669,
7423,
10756,
327,
31,
3639,
309,
12,
5,
26810,
10756,
327,
31,
3639,
28645,
1042,
2828,
819,
273,
28645,
1318,
424,
18,
588,
1442,
424,
12,
4811,
4109,
2934,
29120,
5621,
3639,
727,
4015,
2227,
2828,
1198,
2227,
273,
819,
18,
588,
2829,
2227,
5621,
3639,
309,
12,
4148,
2227,
422,
446,
747,
401,
2472,
18,
588,
24113,
2157,
7675,
291,
14890,
10756,
288,
1850,
1089,
18755,
12,
2011,
1769,
1850,
1089,
43,
18220,
5621,
1850,
1839,
1891,
18,
2681,
5621,
3639,
289,
469,
288,
1850,
727,
3431,
7919,
1119,
681,
7919,
1119,
273,
3431,
7919,
1119,
18,
2972,
5621,
1850,
1198,
2227,
18,
588,
1318,
3830,
7675,
14407,
12,
2704,
28645,
2189,
2828,
1435,
288,
5411,
4750,
918,
1301,
1435,
1216,
1185,
288,
2868,
4257,
1318,
18,
588,
3208,
7675,
2681,
1994,
1803,
12,
2704,
10254,
1435,
288,
7734,
1071,
918,
1086,
1435,
288,
5375,
1089,
18755,
12,
4148,
2227,
1769,
7734,
289,
2868,
15549,
2868,
28645,
9267,
1304,
18,
14407,
20607,
12,
588,
4109,
9334,
394,
10254,
1435,
288,
12900,
1071,
918,
1086,
1435,
288,
18701,
1089,
43,
18220,
5621,
18701,
1839,
1891,
18,
2681,
5621,
12900,
289,
13491,
19879,
681,
7919,
1119,
1769,
5411,
289,
1850,
15549,
3639,
289,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1086,
1435,
288,
3639,
309,
12,
52,
7722,
1318,
18,
588,
1442,
12,
4811,
4109,
2934,
291,
1669,
7423,
10756,
327,
31,
3639,
309,
12,
5,
26810,
10756,
327,
31,
3639,
28645,
1042,
2828,
819,
273,
28645,
1318,
424,
18,
588,
1442,
424,
12,
4811,
4109,
2934,
29120,
5621,
3639,
727,
4015,
2227,
2828,
1198,
2227,
273,
819,
18,
588,
2829,
2227,
5621,
3639,
309,
12,
4148,
2227,
422,
446,
747,
401,
2472,
18,
588,
24113,
2157,
7675,
291,
14890,
10756,
288,
1850,
1089,
18755,
12,
2011,
1769,
1850,
1089,
43,
18220,
5621,
1850,
1839,
1891,
18,
2681,
5621,
3639,
289,
469,
288,
1850,
727,
3431,
7919,
1119,
681,
7919,
1119,
273,
3431,
7919,
1119,
18,
2
] |
return ((JRubyConstructor)ctor).runtime.newTime(((Date)SafeConstructorImpl.constructYamlTimestamp(ctor,node)).getTime());
|
return ((JRubyConstructor)ctor).runtime.newTime(((Date)SafeConstructorImpl.constructYamlTimestamp(ctor,node)).getTime()).callMethod(((JRubyConstructor)ctor).runtime.getCurrentContext(),"utc");
|
public static Object constructYamlTimestamp(final Constructor ctor, final Node node) { return ((JRubyConstructor)ctor).runtime.newTime(((Date)SafeConstructorImpl.constructYamlTimestamp(ctor,node)).getTime()); }
|
1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/a7496d30c994b238998690eb28c237de52e1a3b6/JRubyConstructor.java/buggy/src/org/jruby/yaml/JRubyConstructor.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
4872,
18802,
4921,
12,
6385,
11417,
15120,
16,
727,
2029,
756,
13,
288,
3639,
327,
14015,
46,
54,
10340,
6293,
13,
30206,
2934,
9448,
18,
2704,
950,
12443,
12,
1626,
13,
9890,
6293,
2828,
18,
10062,
18802,
4921,
12,
30206,
16,
2159,
13,
2934,
588,
950,
1435,
2934,
1991,
1305,
12443,
12,
46,
54,
10340,
6293,
13,
30206,
2934,
9448,
18,
588,
3935,
1042,
9334,
6,
17892,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
4872,
18802,
4921,
12,
6385,
11417,
15120,
16,
727,
2029,
756,
13,
288,
3639,
327,
14015,
46,
54,
10340,
6293,
13,
30206,
2934,
9448,
18,
2704,
950,
12443,
12,
1626,
13,
9890,
6293,
2828,
18,
10062,
18802,
4921,
12,
30206,
16,
2159,
13,
2934,
588,
950,
1435,
2934,
1991,
1305,
12443,
12,
46,
54,
10340,
6293,
13,
30206,
2934,
9448,
18,
588,
3935,
1042,
9334,
6,
17892,
8863,
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
] |
} else { Shape glyphBounds = glyphMetrics.getBounds2D();
|
} else { Rectangle2D glyphBounds = glyphMetrics.getBounds2D();
|
private void computeGlyphLogicalBounds() { float ascent = 0; float descent = 0; if (font != null) { // font will only be null if this glyph vector is for an altGlyph GVTLineMetrics lineMetrics = font.getLineMetrics("By", frc); ascent = lineMetrics.getAscent(); descent = lineMetrics.getDescent(); if (descent < 0) { // make descent a positive value descent = -descent; } } for (int i = 0; i < getNumGlyphs(); i++) { if (glyphVisible[i]) { AffineTransform glyphTransform = getGlyphTransform(i); GVTGlyphMetrics glyphMetrics = getGlyphMetrics(i); if (glyphTransform == null && ascent != 0) { float glyphX = (float)getGlyphPosition(i).getX(); float glyphY = (float)getGlyphPosition(i).getY() - ascent; float glyphWidth = glyphMetrics.getHorizontalAdvance(); if (i < getNumGlyphs()-1) { float nextY = (float)getGlyphPosition(i+1).getY() - ascent; if (glyphY == nextY) { float nextX = (float)getGlyphPosition(i+1).getX(); glyphWidth = Math.max(glyphWidth, nextX - glyphX); } } float glyphHeight = ascent + descent; glyphLogicalBounds[i] = new Rectangle2D.Double(glyphX, glyphY, glyphWidth, glyphHeight); } else { Shape glyphBounds = glyphMetrics.getBounds2D(); AffineTransform tr = AffineTransform.getTranslateInstance(getGlyphPosition(i).getX(), getGlyphPosition(i).getY()); if (glyphTransform != null) { tr.concatenate(glyphTransform); } glyphLogicalBounds[i] = tr.createTransformedShape(glyphBounds); } } else { // the glyph is not drawn glyphLogicalBounds[i] = null; } } }
|
46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/5087e3b31e8edaa6f454cbb5db4cf7ed425abd8f/SVGGVTGlyphVector.java/clean/sources/org/apache/batik/gvt/font/SVGGVTGlyphVector.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3671,
15141,
17955,
5694,
1435,
288,
3639,
1431,
487,
2998,
273,
374,
31,
3639,
1431,
3044,
319,
273,
374,
31,
3639,
309,
261,
5776,
480,
446,
13,
288,
5411,
368,
3512,
903,
1338,
506,
446,
309,
333,
9440,
3806,
353,
364,
392,
3770,
15141,
5411,
611,
58,
56,
1670,
5653,
980,
5653,
273,
3512,
18,
588,
1670,
5653,
2932,
858,
3113,
284,
1310,
1769,
5411,
487,
2998,
273,
980,
5653,
18,
588,
13665,
319,
5621,
5411,
3044,
319,
273,
980,
5653,
18,
588,
4217,
319,
5621,
5411,
309,
261,
5569,
319,
411,
374,
13,
288,
7734,
368,
1221,
3044,
319,
279,
6895,
460,
7734,
3044,
319,
273,
300,
5569,
319,
31,
5411,
289,
3639,
289,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
11187,
25399,
5621,
277,
27245,
288,
5411,
309,
261,
19426,
6207,
63,
77,
5717,
288,
7734,
23906,
558,
4059,
9440,
4059,
273,
7162,
6451,
4059,
12,
77,
1769,
7734,
611,
58,
56,
15141,
5653,
9440,
5653,
273,
7162,
6451,
5653,
12,
77,
1769,
7734,
309,
261,
19426,
4059,
422,
446,
597,
487,
2998,
480,
374,
13,
288,
10792,
1431,
9440,
60,
273,
261,
5659,
13,
588,
15141,
2555,
12,
77,
2934,
588,
60,
5621,
10792,
1431,
9440,
61,
273,
225,
261,
5659,
13,
588,
15141,
2555,
12,
77,
2934,
588,
61,
1435,
300,
487,
2998,
31,
10792,
1431,
9440,
2384,
273,
9440,
5653,
18,
588,
14457,
1871,
5882,
5621,
10792,
309,
261,
77,
411,
11187,
25399,
1435,
17,
21,
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,
3671,
15141,
17955,
5694,
1435,
288,
3639,
1431,
487,
2998,
273,
374,
31,
3639,
1431,
3044,
319,
273,
374,
31,
3639,
309,
261,
5776,
480,
446,
13,
288,
5411,
368,
3512,
903,
1338,
506,
446,
309,
333,
9440,
3806,
353,
364,
392,
3770,
15141,
5411,
611,
58,
56,
1670,
5653,
980,
5653,
273,
3512,
18,
588,
1670,
5653,
2932,
858,
3113,
284,
1310,
1769,
5411,
487,
2998,
273,
980,
5653,
18,
588,
13665,
319,
5621,
5411,
3044,
319,
273,
980,
5653,
18,
588,
4217,
319,
5621,
5411,
309,
261,
5569,
319,
411,
374,
13,
288,
7734,
368,
1221,
3044,
319,
279,
6895,
460,
7734,
3044,
319,
273,
300,
5569,
319,
31,
5411,
289,
3639,
289,
3639,
2
] |
Setting loadedSetting = m_impl.loadModelFile("aa", "bb");
|
Setting loadedSetting = m_impl.loadModelFile("bb", "aa");
|
public void testLoadModelFile() { SettingSet setting = new SettingSet(); setting.setValue("555"); setting.setName("bongo"); MockControl control = MockControl.createControl(ModelBuilder.class); ModelBuilder builder = (ModelBuilder) control.getMock(); builder.buildModel(getFile("aa", "bb")); control.setReturnValue(setting); control.replay(); m_impl.setModelBuilder(builder); Setting loadedSetting = m_impl.loadModelFile("aa", "bb"); assertEquals("555", loadedSetting.getValue()); assertEquals("bongo", loadedSetting.getName()); control.verify(); }
|
12962 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12962/e9da4f10fce82585660c58be4ae0e97c8c637341/ModelFilesContextImplTest.java/clean/sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/setting/ModelFilesContextImplTest.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2563,
1488,
812,
1435,
288,
3639,
13274,
694,
3637,
273,
394,
13274,
694,
5621,
3639,
3637,
18,
542,
620,
2932,
2539,
25,
8863,
3639,
3637,
18,
542,
461,
2932,
70,
5409,
8863,
3639,
7867,
3367,
3325,
273,
7867,
3367,
18,
2640,
3367,
12,
1488,
1263,
18,
1106,
1769,
3639,
3164,
1263,
2089,
273,
261,
1488,
1263,
13,
3325,
18,
588,
9865,
5621,
3639,
2089,
18,
3510,
1488,
12,
29925,
2932,
7598,
3113,
315,
9897,
7923,
1769,
3639,
3325,
18,
542,
19092,
12,
8920,
1769,
3639,
3325,
18,
266,
1601,
5621,
3639,
312,
67,
11299,
18,
542,
1488,
1263,
12,
9574,
1769,
3639,
13274,
4203,
5568,
273,
312,
67,
11299,
18,
945,
1488,
812,
2932,
9897,
3113,
315,
7598,
8863,
3639,
1815,
8867,
2932,
2539,
25,
3113,
4203,
5568,
18,
24805,
10663,
3639,
1815,
8867,
2932,
70,
5409,
3113,
4203,
5568,
18,
17994,
10663,
3639,
3325,
18,
8705,
5621,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2563,
1488,
812,
1435,
288,
3639,
13274,
694,
3637,
273,
394,
13274,
694,
5621,
3639,
3637,
18,
542,
620,
2932,
2539,
25,
8863,
3639,
3637,
18,
542,
461,
2932,
70,
5409,
8863,
3639,
7867,
3367,
3325,
273,
7867,
3367,
18,
2640,
3367,
12,
1488,
1263,
18,
1106,
1769,
3639,
3164,
1263,
2089,
273,
261,
1488,
1263,
13,
3325,
18,
588,
9865,
5621,
3639,
2089,
18,
3510,
1488,
12,
29925,
2932,
7598,
3113,
315,
9897,
7923,
1769,
3639,
3325,
18,
542,
19092,
12,
8920,
1769,
3639,
3325,
18,
266,
1601,
5621,
3639,
312,
67,
11299,
18,
542,
1488,
1263,
12,
9574,
1769,
3639,
13274,
4203,
5568,
273,
312,
67,
11299,
18,
945,
1488,
812,
2932,
9897,
2
] |
assertFalse(handle.isActive());
|
assertHandleNotActive(handle);
|
public void testCommitAbortsLast() throws Exception { DummyTransactionParticipant[] participants = { new DummyNonDurableTransactionParticipant(), new DummyNonDurableTransactionParticipant() { protected boolean prepareResult() { return true; } }, new DummyTransactionParticipant() { public void prepareAndCommit(Transaction txn) throws Exception { txn.abort(); } } }; for (TransactionParticipant participant : participants) { txn.join(participant); } try { handle.commit(); fail("Expected Exception"); } catch (Exception e) { System.err.println(e); } for (DummyTransactionParticipant participant : participants) { if (!participant.prepareReturnedTrue()) { assertEquals(State.ABORTED, participant.getState()); } } assertFalse(handle.isActive()); }
|
48631 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48631/3dbd95fabab03f566e3e4c4cb79425340a1d48bb/TestTransactionCoordinatorImpl.java/buggy/test/com/sun/sgs/test/impl/service/transaction/TestTransactionCoordinatorImpl.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
5580,
13572,
87,
3024,
1435,
1216,
1185,
288,
202,
20094,
3342,
22540,
8526,
22346,
273,
288,
202,
565,
394,
28622,
3989,
23073,
3342,
22540,
9334,
202,
565,
394,
28622,
3989,
23073,
3342,
22540,
1435,
288,
202,
202,
1117,
1250,
2911,
1253,
1435,
288,
327,
638,
31,
289,
202,
565,
19879,
202,
565,
394,
28622,
3342,
22540,
1435,
288,
202,
202,
482,
918,
2911,
1876,
5580,
12,
3342,
7827,
13,
1216,
1185,
288,
1082,
565,
7827,
18,
18623,
5621,
202,
202,
97,
202,
565,
289,
202,
20451,
202,
1884,
261,
3342,
22540,
14188,
294,
22346,
13,
288,
202,
565,
7827,
18,
5701,
12,
2680,
14265,
1769,
202,
97,
202,
698,
288,
202,
565,
1640,
18,
7371,
5621,
202,
565,
2321,
2932,
6861,
1185,
8863,
202,
97,
1044,
261,
503,
425,
13,
288,
202,
565,
2332,
18,
370,
18,
8222,
12,
73,
1769,
202,
97,
202,
1884,
261,
20094,
3342,
22540,
14188,
294,
22346,
13,
288,
202,
565,
309,
16051,
2680,
14265,
18,
9366,
22360,
5510,
10756,
288,
202,
202,
11231,
8867,
12,
1119,
18,
2090,
11245,
16,
14188,
18,
588,
1119,
10663,
202,
565,
289,
202,
97,
202,
11231,
3259,
1248,
3896,
12,
4110,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
5580,
13572,
87,
3024,
1435,
1216,
1185,
288,
202,
20094,
3342,
22540,
8526,
22346,
273,
288,
202,
565,
394,
28622,
3989,
23073,
3342,
22540,
9334,
202,
565,
394,
28622,
3989,
23073,
3342,
22540,
1435,
288,
202,
202,
1117,
1250,
2911,
1253,
1435,
288,
327,
638,
31,
289,
202,
565,
19879,
202,
565,
394,
28622,
3342,
22540,
1435,
288,
202,
202,
482,
918,
2911,
1876,
5580,
12,
3342,
7827,
13,
1216,
1185,
288,
1082,
565,
7827,
18,
18623,
5621,
202,
202,
97,
202,
565,
289,
202,
20451,
202,
1884,
261,
3342,
22540,
14188,
294,
22346,
13,
288,
202,
565,
7827,
18,
5701,
12,
2680,
14265,
1769,
202,
97,
202,
698,
288,
202,
565,
1640,
18,
7371,
2
] |
public String getPublisherName(Admin admin, int id){ debug(">getPublisherName(id: " + id + ")"); String returnval = null; PublisherDataLocal htp = null; try{ htp = publisherhome.findByPrimaryKey(new Integer(id)); if(htp != null){ returnval = htp.getName(); } }catch(FinderException e){}
|
public String getPublisherName(Admin admin, int id) { debug(">getPublisherName(id: " + id + ")"); String returnval = null; PublisherDataLocal htp = null; try { htp = publisherhome.findByPrimaryKey(new Integer(id)); if (htp != null) { returnval = htp.getName(); } } catch (FinderException e) { }
|
public String getPublisherName(Admin admin, int id){ debug(">getPublisherName(id: " + id + ")"); String returnval = null; PublisherDataLocal htp = null; try{ htp = publisherhome.findByPrimaryKey(new Integer(id)); if(htp != null){ returnval = htp.getName(); } }catch(FinderException e){} debug("<getPublisherName()"); return returnval; } // getPublisherName
|
4109 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4109/6ecbb69c2d6c05971a443e2ffb0e34da367ea460/LocalPublisherSessionBean.java/buggy/src/java/se/anatom/ejbca/ca/publisher/LocalPublisherSessionBean.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
27480,
264,
461,
12,
4446,
3981,
16,
509,
612,
15329,
202,
225,
1198,
2932,
34,
588,
15960,
461,
12,
350,
30,
315,
397,
612,
397,
7310,
1769,
202,
225,
514,
327,
1125,
273,
446,
31,
202,
225,
21932,
751,
2042,
366,
6834,
273,
446,
31,
202,
225,
775,
95,
202,
202,
647,
84,
273,
12855,
8712,
18,
4720,
858,
11575,
12,
2704,
2144,
12,
350,
10019,
202,
202,
430,
12,
647,
84,
480,
446,
15329,
1082,
225,
327,
1125,
273,
366,
6834,
18,
17994,
5621,
202,
202,
97,
202,
225,
289,
14683,
12,
8441,
503,
425,
13,
2916,
202,
225,
1198,
2932,
32,
588,
15960,
461,
1435,
8863,
202,
225,
327,
327,
1125,
31,
202,
97,
368,
27480,
264,
461,
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,
225,
202,
482,
514,
27480,
264,
461,
12,
4446,
3981,
16,
509,
612,
15329,
202,
225,
1198,
2932,
34,
588,
15960,
461,
12,
350,
30,
315,
397,
612,
397,
7310,
1769,
202,
225,
514,
327,
1125,
273,
446,
31,
202,
225,
21932,
751,
2042,
366,
6834,
273,
446,
31,
202,
225,
775,
95,
202,
202,
647,
84,
273,
12855,
8712,
18,
4720,
858,
11575,
12,
2704,
2144,
12,
350,
10019,
202,
202,
430,
12,
647,
84,
480,
446,
15329,
1082,
225,
327,
1125,
273,
366,
6834,
18,
17994,
5621,
202,
202,
97,
202,
225,
289,
14683,
12,
8441,
503,
425,
13,
2916,
202,
225,
1198,
2932,
32,
588,
15960,
461,
1435,
8863,
202,
225,
327,
327,
1125,
31,
202,
2
] |
private boolean isURL(String path){ return path != null && path.indexOf(":
|
private static boolean isURL(String path){ return PathUtil.isURL(path);
|
private boolean isURL(String path){ return path != null && path.indexOf("://")>-1; }
|
5695 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5695/b1331120b51dd132df5e168392e906aa74fa0277/SVNClient.java/buggy/javasvn/src/org/tigris/subversion/javahl/SVNClient.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
353,
1785,
12,
780,
589,
15329,
3639,
327,
589,
480,
446,
597,
589,
18,
31806,
2932,
2207,
7923,
34,
17,
21,
31,
377,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
353,
1785,
12,
780,
589,
15329,
3639,
327,
589,
480,
446,
597,
589,
18,
31806,
2932,
2207,
7923,
34,
17,
21,
31,
377,
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
] |
outBuffer = ByteBuffer.allocate(BLOCK_SIZE);
|
private void setupBufferedIO() { if (bufferedIO) { return; } outBuffer = ByteBuffer.allocate(BLOCK_SIZE); inBuffer = ByteBuffer.allocate(BLOCK_SIZE); flushInBuffer(); bufferedIO = true; }
|
45827 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45827/a6049d13f9eab0fce512fac5890ac20bf9ba9a27/IOHandlerNio.java/buggy/src/org/jruby/util/IOHandlerNio.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3875,
17947,
4294,
1435,
288,
3639,
309,
261,
26385,
4294,
13,
288,
5411,
327,
31,
3639,
289,
9079,
316,
1892,
273,
7400,
18,
16247,
12,
11403,
67,
4574,
1769,
3639,
3663,
382,
1892,
5621,
3639,
11445,
4294,
273,
638,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3875,
17947,
4294,
1435,
288,
3639,
309,
261,
26385,
4294,
13,
288,
5411,
327,
31,
3639,
289,
9079,
316,
1892,
273,
7400,
18,
16247,
12,
11403,
67,
4574,
1769,
3639,
3663,
382,
1892,
5621,
3639,
11445,
4294,
273,
638,
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
] |
|
try { PlatformUI.getWorkbench().openWorkbenchWindow(desc.getId(), ResourcesPlugin.getWorkspace().getRoot()); } catch (WorkbenchException e) { IWorkbenchWindow window = PlatformUI.getWorkbench() .getActiveWorkbenchWindow(); if (window != null) { ErrorDialog.openError(window.getShell(), WINDOW_PROBLEMS_TITLE, e.getMessage(), e.getStatus()); } } }
|
try { PlatformUI.getWorkbench().openWorkbenchWindow(desc.getId(), ResourcesPlugin.getWorkspace().getRoot()); } catch (WorkbenchException e) { IWorkbenchWindow window = PlatformUI.getWorkbench() .getActiveWorkbenchWindow(); if (window != null) { ErrorDialog.openError(window.getShell(), WINDOW_PROBLEMS_TITLE, e.getMessage(), e.getStatus()); } } }
|
private static void openInNewWindow(IPerspectiveDescriptor desc) { // Open the page. try { PlatformUI.getWorkbench().openWorkbenchWindow(desc.getId(), ResourcesPlugin.getWorkspace().getRoot()); } catch (WorkbenchException e) { IWorkbenchWindow window = PlatformUI.getWorkbench() .getActiveWorkbenchWindow(); if (window != null) { ErrorDialog.openError(window.getShell(), WINDOW_PROBLEMS_TITLE, e.getMessage(), e.getStatus()); } } }
|
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/53cada7d6d0463cdcb3aed320ea380f4aae64087/BasicNewProjectResourceWizard.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/newresource/BasicNewProjectResourceWizard.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
1696,
382,
1908,
3829,
12,
2579,
414,
16772,
3187,
3044,
13,
288,
3639,
368,
3502,
326,
1363,
18,
3639,
775,
288,
5411,
11810,
5370,
18,
588,
2421,
22144,
7675,
3190,
2421,
22144,
3829,
12,
5569,
18,
26321,
9334,
10792,
8128,
3773,
18,
588,
8241,
7675,
588,
2375,
10663,
3639,
289,
1044,
261,
2421,
22144,
503,
425,
13,
288,
5411,
467,
2421,
22144,
3829,
2742,
273,
11810,
5370,
18,
588,
2421,
22144,
1435,
10792,
263,
588,
3896,
2421,
22144,
3829,
5621,
5411,
309,
261,
5668,
480,
446,
13,
288,
7734,
1068,
6353,
18,
3190,
668,
12,
5668,
18,
588,
13220,
9334,
24482,
7306,
67,
3373,
38,
900,
3537,
67,
14123,
16,
13491,
425,
18,
24906,
9334,
425,
18,
588,
1482,
10663,
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,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
760,
918,
1696,
382,
1908,
3829,
12,
2579,
414,
16772,
3187,
3044,
13,
288,
3639,
368,
3502,
326,
1363,
18,
3639,
775,
288,
5411,
11810,
5370,
18,
588,
2421,
22144,
7675,
3190,
2421,
22144,
3829,
12,
5569,
18,
26321,
9334,
10792,
8128,
3773,
18,
588,
8241,
7675,
588,
2375,
10663,
3639,
289,
1044,
261,
2421,
22144,
503,
425,
13,
288,
5411,
467,
2421,
22144,
3829,
2742,
273,
11810,
5370,
18,
588,
2421,
22144,
1435,
10792,
263,
588,
3896,
2421,
22144,
3829,
5621,
5411,
309,
261,
5668,
480,
446,
13,
288,
7734,
1068,
6353,
18,
3190,
668,
12,
5668,
18,
588,
13220,
9334,
24482,
7306,
67,
3373,
38,
900,
3537,
67,
14123,
16,
13491,
425,
18,
24906,
9334,
2
] |
if(next == null && prev != null) {
|
if((next == null) && (prev != null)) {
|
public synchronized void update(UpdatableSortedLinkedListItem i) throws UpdatableSortedLinkedListKilledException { if(killed) throw new UpdatableSortedLinkedListKilledException(); Logger.minor(this, "Update("+i+") on "+this); checkList(); if(i.compareTo(list.tail()) > 0) { list.remove(i); list.push(i); checkList(); return; } if(i.compareTo(list.head()) < 0) { list.remove(i); list.unshift(i); checkList(); return; } if(list.head() == list.tail() && i != list.head()) { Logger.error(this, "Only 1 element: "+list.head()+" and updating "+i+" on "+this, new Exception("error")); add(i); checkList(); return; } // Forwards or backwards? UpdatableSortedLinkedListItem next = (UpdatableSortedLinkedListItem) list.next(i); UpdatableSortedLinkedListItem prev = (UpdatableSortedLinkedListItem) list.prev(i); if(next == null && prev == null) { return; } if(next != null && prev != null && next.compareTo(i) >= 0 && prev.compareTo(i) <= 0) return; // already exactly where it should be if(next == null && prev != null) { if(prev.compareTo(i) <= 0) return; // already in right place, at end } if(next != null && prev == null) { if(next.compareTo(i) >= 0) return; // already where it should be } if(next != null && i.compareTo(next) > 0) { // i > next - move forwards while(true) { prev = next; next = (UpdatableSortedLinkedListItem) list.next(next); if(next == null) { throw new NullPointerException("impossible - we checked"); } if(i.compareTo(next) < 0 && i.compareTo(prev) > 0) { list.remove(i); list.insertNext(prev, i); checkList(); return; } } } else if(prev != null && i.compareTo(prev) < 0) { // i < next - move backwards while(true) { next = prev; prev = (UpdatableSortedLinkedListItem) list.prev(prev); if(next == null) { throw new NullPointerException("impossible - we checked"); } if(i.compareTo(next) < 0 && i.compareTo(prev) > 0) { list.remove(i); list.insertNext(prev, i); checkList(); return; } } } Logger.error(this, "Could not update "+i, new Exception("error")); dump(); remove(i); add(i); checkList(); }
|
50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/ca136843ae9ecb30cadada58a33a5dc2cf8ad064/UpdatableSortedLinkedList.java/buggy/src/freenet/support/UpdatableSortedLinkedList.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
1089,
12,
1211,
3404,
429,
11739,
13174,
13575,
277,
13,
1216,
1948,
3404,
429,
11739,
13174,
682,
47,
13148,
503,
288,
377,
202,
430,
12,
79,
13148,
13,
604,
394,
1948,
3404,
429,
11739,
13174,
682,
47,
13148,
503,
5621,
3639,
4242,
18,
17364,
12,
2211,
16,
315,
1891,
2932,
15,
77,
15,
7923,
603,
13773,
2211,
1769,
3639,
866,
682,
5621,
3639,
309,
12,
77,
18,
9877,
774,
12,
1098,
18,
13101,
10756,
405,
374,
13,
288,
5411,
666,
18,
4479,
12,
77,
1769,
5411,
666,
18,
6206,
12,
77,
1769,
5411,
866,
682,
5621,
5411,
327,
31,
3639,
289,
3639,
309,
12,
77,
18,
9877,
774,
12,
1098,
18,
1978,
10756,
411,
374,
13,
288,
5411,
666,
18,
4479,
12,
77,
1769,
5411,
666,
18,
13858,
12,
77,
1769,
5411,
866,
682,
5621,
5411,
327,
31,
3639,
289,
3639,
309,
12,
1098,
18,
1978,
1435,
422,
666,
18,
13101,
1435,
597,
277,
480,
666,
18,
1978,
10756,
288,
5411,
4242,
18,
1636,
12,
2211,
16,
315,
3386,
404,
930,
30,
13773,
1098,
18,
1978,
1435,
9078,
471,
9702,
13773,
77,
9078,
603,
13773,
2211,
16,
394,
1185,
2932,
1636,
7923,
1769,
5411,
527,
12,
77,
1769,
5411,
866,
682,
5621,
5411,
327,
31,
3639,
289,
3639,
368,
2457,
6397,
578,
12727,
35,
3639,
1948,
3404,
429,
11739,
13174,
13575,
1024,
273,
261,
1211,
3404,
429,
11739,
13174,
13575,
13,
666,
18,
4285,
12,
77,
1769,
3639,
1948,
3404,
429,
11739,
13174,
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,
1089,
12,
1211,
3404,
429,
11739,
13174,
13575,
277,
13,
1216,
1948,
3404,
429,
11739,
13174,
682,
47,
13148,
503,
288,
377,
202,
430,
12,
79,
13148,
13,
604,
394,
1948,
3404,
429,
11739,
13174,
682,
47,
13148,
503,
5621,
3639,
4242,
18,
17364,
12,
2211,
16,
315,
1891,
2932,
15,
77,
15,
7923,
603,
13773,
2211,
1769,
3639,
866,
682,
5621,
3639,
309,
12,
77,
18,
9877,
774,
12,
1098,
18,
13101,
10756,
405,
374,
13,
288,
5411,
666,
18,
4479,
12,
77,
1769,
5411,
666,
18,
6206,
12,
77,
1769,
5411,
866,
682,
5621,
5411,
327,
31,
3639,
289,
3639,
309,
12,
77,
18,
9877,
774,
12,
1098,
18,
1978,
10756,
411,
374,
2
] |
public void acceptVariableReference(IASTVariableReference reference) { }
|
public void acceptVariableReference(IASTVariableReference reference) { }
|
public void acceptVariableReference(IASTVariableReference reference) { // TODO Auto-generated method stub }
|
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/d8ee61be381462fee3501e736c934e6b77efdfb5/SourceIndexerRequestor.java/clean/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexerRequestor.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2791,
3092,
2404,
12,
45,
9053,
3092,
2404,
2114,
13,
565,
288,
3639,
368,
2660,
8064,
17,
11168,
707,
7168,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2791,
3092,
2404,
12,
45,
9053,
3092,
2404,
2114,
13,
565,
288,
3639,
368,
2660,
8064,
17,
11168,
707,
7168,
5411,
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
] |
project.setSessionProperty(IndexManager.indexerIDKey, sourceIndexerID); project.setSessionProperty( SourceIndexer.activationKey, new Boolean( true ) );
|
protected void setUp() throws Exception { super.setUp(); try{ if (project == null){ cproject = CProjectHelper.createCCProject("RegressionTestProject", "bin"); //$NON-NLS-1$ //$NON-NLS-2$ project = cproject.getProject(); } project.setSessionProperty(IndexManager.indexerIDKey, sourceIndexerID); project.setSessionProperty( SourceIndexer.activationKey, new Boolean( true ) ); } catch ( CoreException e ) { //boo } TypeCacheManager typeCacheManager = TypeCacheManager.getInstance(); typeCacheManager.setProcessTypeCacheEvents(false); }
|
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/ee60cb456eafb8d7257ffc7bf1ca0166579fe32b/SelectionRegressionTest.java/clean/core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/SelectionRegressionTest.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24292,
1435,
1216,
1185,
288,
3639,
2240,
18,
542,
1211,
5621,
202,
202,
698,
95,
1082,
202,
430,
261,
4406,
422,
446,
15329,
9506,
282,
276,
4406,
273,
385,
4109,
2276,
18,
2640,
6743,
4109,
2932,
1617,
16345,
4709,
4109,
3113,
315,
4757,
8863,
4329,
3993,
17,
5106,
17,
21,
8,
4329,
3993,
17,
5106,
17,
22,
8,
9506,
282,
1984,
273,
276,
4406,
18,
588,
4109,
5621,
1082,
202,
97,
1082,
202,
4406,
18,
542,
2157,
1396,
12,
1016,
1318,
18,
24541,
734,
653,
16,
1084,
20877,
734,
1769,
1082,
565,
1984,
18,
542,
2157,
1396,
12,
4998,
20877,
18,
16908,
653,
16,
394,
3411,
12,
638,
262,
11272,
202,
202,
97,
1044,
261,
30015,
425,
262,
288,
368,
1075,
83,
202,
202,
97,
202,
202,
559,
27706,
618,
27706,
273,
1412,
27706,
18,
588,
1442,
5621,
202,
202,
723,
27706,
18,
542,
2227,
559,
1649,
3783,
12,
5743,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24292,
1435,
1216,
1185,
288,
3639,
2240,
18,
542,
1211,
5621,
202,
202,
698,
95,
1082,
202,
430,
261,
4406,
422,
446,
15329,
9506,
282,
276,
4406,
273,
385,
4109,
2276,
18,
2640,
6743,
4109,
2932,
1617,
16345,
4709,
4109,
3113,
315,
4757,
8863,
4329,
3993,
17,
5106,
17,
21,
8,
4329,
3993,
17,
5106,
17,
22,
8,
9506,
282,
1984,
273,
276,
4406,
18,
588,
4109,
5621,
1082,
202,
97,
1082,
202,
4406,
18,
542,
2157,
1396,
12,
1016,
1318,
18,
24541,
734,
653,
16,
1084,
20877,
734,
1769,
1082,
565,
1984,
18,
542,
2157,
1396,
12,
4998,
20877,
18,
16908,
653,
16,
394,
3411,
12,
638,
262,
11272,
202,
202,
97,
1044,
261,
30015,
2
] |
|
PropertyDefImpl def = getApplicablePropertyDef(name, value.getType(), false);
|
PropertyDefImpl def; try { def = getApplicablePropertyDef(name, value.getType(), false); } catch (ConstraintViolationException cve) { def = getApplicablePropertyDef(name, PropertyType.UNDEFINED, false); }
|
public boolean canSetProperty(String propertyName, Value value) { if (value == null) { // setting a property to null is equivalent of removing it return canRemoveItem(propertyName); } try { QName name = QName.fromJCRName(propertyName, nsResolver); PropertyDefImpl def = getApplicablePropertyDef(name, value.getType(), false); if (def.isProtected()) { return false; } if (def.isMultiple()) { return false; } InternalValue internalValue = InternalValue.create(value, nsResolver); checkSetPropertyValueConstraints(def, new InternalValue[]{internalValue}); return true; } catch (BaseException be) { // implementation specific exception, fall through } catch (RepositoryException re) { // fall through } return false; }
|
49304 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49304/8dbb8badd4741885412463d49191890facf22587/NodeTypeImpl.java/clean/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeImpl.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
848,
694,
1396,
12,
780,
5470,
16,
1445,
460,
13,
288,
3639,
309,
261,
1132,
422,
446,
13,
288,
5411,
368,
3637,
279,
1272,
358,
446,
353,
7680,
434,
9427,
518,
5411,
327,
848,
3288,
1180,
12,
4468,
461,
1769,
3639,
289,
3639,
775,
288,
5411,
16723,
508,
273,
16723,
18,
2080,
46,
5093,
461,
12,
4468,
461,
16,
3153,
4301,
1769,
5411,
4276,
3262,
2828,
1652,
273,
10792,
336,
27873,
1396,
3262,
12,
529,
16,
460,
18,
588,
559,
9334,
629,
1769,
5411,
309,
261,
536,
18,
291,
15933,
10756,
288,
7734,
327,
629,
31,
5411,
289,
5411,
309,
261,
536,
18,
291,
8438,
10756,
288,
7734,
327,
629,
31,
5411,
289,
5411,
3186,
620,
2713,
620,
273,
3186,
620,
18,
2640,
12,
1132,
16,
3153,
4301,
1769,
5411,
866,
694,
16107,
4878,
12,
536,
16,
394,
3186,
620,
63,
7073,
7236,
620,
22938,
5411,
327,
638,
31,
3639,
289,
1044,
261,
2171,
503,
506,
13,
288,
5411,
368,
4471,
2923,
1520,
16,
4159,
3059,
3639,
289,
1044,
261,
3305,
503,
283,
13,
288,
5411,
368,
4159,
3059,
3639,
289,
3639,
327,
629,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
848,
694,
1396,
12,
780,
5470,
16,
1445,
460,
13,
288,
3639,
309,
261,
1132,
422,
446,
13,
288,
5411,
368,
3637,
279,
1272,
358,
446,
353,
7680,
434,
9427,
518,
5411,
327,
848,
3288,
1180,
12,
4468,
461,
1769,
3639,
289,
3639,
775,
288,
5411,
16723,
508,
273,
16723,
18,
2080,
46,
5093,
461,
12,
4468,
461,
16,
3153,
4301,
1769,
5411,
4276,
3262,
2828,
1652,
273,
10792,
336,
27873,
1396,
3262,
12,
529,
16,
460,
18,
588,
559,
9334,
629,
1769,
5411,
309,
261,
536,
18,
291,
15933,
10756,
288,
7734,
327,
629,
31,
5411,
289,
5411,
309,
261,
536,
18,
291,
8438,
10756,
288,
7734,
327,
629,
31,
5411,
289,
5411,
3186,
620,
2
] |
Logger.error(RealNodeRequestInsertTest.class, "Succeeded: "+new String(results));
|
Logger.error(RealNodeRequestInsertTest.class, "Fetch succeeded: "+new String(results));
|
public static void main(String[] args) throws FSParseException, PeerParseException, CHKEncodeException { NodePeer.disableProbabilisticHTLs = true; Node.MAX_HTL = 5; Logger.setupStdoutLogging(Logger.NORMAL, "freenet.node:minor,freenet.node.Location:normal,freenet.node.FNP:normal,freenet.node.NodePeer:normal" /*"freenet.node.LocationManager:debug,freenet.node.FNPPacketManager:normal,freenet.io.comm.UdpSocketManager:debug"*/); System.out.println("Insert/retrieve test"); System.out.println(); DummyRandomSource random = new DummyRandomSource(); Node[] nodes = new Node[NUMBER_OF_NODES]; Logger.normal(RealNodeRoutingTest.class, "Creating nodes..."); for(int i=0;i<NUMBER_OF_NODES;i++) { nodes[i] = new Node(5000+i, random); Logger.normal(RealNodeRoutingTest.class, "Created node "+i); } SimpleFieldSet refs[] = new SimpleFieldSet[NUMBER_OF_NODES]; for(int i=0;i<NUMBER_OF_NODES;i++) refs[i] = nodes[i].exportFieldSet(); Logger.normal(RealNodeRoutingTest.class, "Created "+NUMBER_OF_NODES+" nodes"); // Now link them up // Connect the set for(int i=0;i<NUMBER_OF_NODES;i++) { int next = (i+1) % NUMBER_OF_NODES; int prev = (i+NUMBER_OF_NODES-1)%NUMBER_OF_NODES; nodes[i].peers.connect(refs[next]); nodes[i].peers.connect(refs[prev]); } Logger.normal(RealNodeRoutingTest.class, "Connected nodes"); // Now add some random links for(int i=0;i<NUMBER_OF_NODES*5;i++) { if(i % NUMBER_OF_NODES == 0) Logger.normal(RealNodeRoutingTest.class, ""+i); int length = (int)Math.pow(NUMBER_OF_NODES, random.nextDouble()); int nodeA = random.nextInt(NUMBER_OF_NODES); int nodeB = (nodeA+length)%NUMBER_OF_NODES; //System.out.println(""+nodeA+" -> "+nodeB); Node a = nodes[nodeA]; Node b = nodes[nodeB]; a.peers.connect(b.exportFieldSet()); b.peers.connect(a.exportFieldSet()); } Logger.normal(RealNodeRoutingTest.class, "Added random links"); SwapRequestInterval sri = new CPUAdjustingSwapRequestInterval(((500*1000*NUMBER_OF_NODES)/200), 50); for(int i=0;i<NUMBER_OF_NODES;i++) nodes[i].start(sri); // Now sit back and watch the fireworks! int cycleNumber = 0; int lastSwaps = 0; int lastNoSwaps = 0; int failures = 0; int successes = 0; RunningAverage avg = new SimpleRunningAverage(100, 0.0); RunningAverage avg2 = new BootstrappingDecayingRunningAverage(0.0, 0.0, 1.0, 100); int pings = 0; while(true) { cycleNumber++; try { Thread.sleep(5000); } catch (InterruptedException e) { // Ignore } for(int i=0;i<NUMBER_OF_NODES;i++) { Logger.normal(RealNodeRoutingTest.class, "Cycle "+cycleNumber+" node "+i+": "+nodes[i].lm.getLocation().getValue()); } int newSwaps = LocationManager.swaps; int totalStarted = LocationManager.startedSwaps; int noSwaps = LocationManager.noSwaps; Logger.normal(RealNodeRoutingTest.class, "Swaps: "+(newSwaps-lastSwaps)); Logger.normal(RealNodeRoutingTest.class, "\nTotal swaps: Started*2: "+totalStarted*2+", succeeded: "+newSwaps+", last minute failures: "+noSwaps+ ", ratio "+(double)noSwaps/(double)newSwaps+", early failures: "+((totalStarted*2)-(noSwaps+newSwaps))); Logger.normal(RealNodeRoutingTest.class, "This cycle ratio: "+((double)(noSwaps-lastNoSwaps)) / ((double)(newSwaps - lastSwaps))); lastNoSwaps = noSwaps; Logger.normal(RealNodeRoutingTest.class, "Swaps rejected (already locked): "+LocationManager.swapsRejectedAlreadyLocked); Logger.normal(RealNodeRoutingTest.class, "Swaps rejected (nowhere to go): "+LocationManager.swapsRejectedNowhereToGo); Logger.normal(RealNodeRoutingTest.class, "Swaps rejected (rate limit): "+LocationManager.swapsRejectedRateLimit); Logger.normal(RealNodeRoutingTest.class, "Swaps rejected (loop): "+LocationManager.swapsRejectedLoop); Logger.normal(RealNodeRoutingTest.class, "Swaps rejected (recognized ID):" +LocationManager.swapsRejectedRecognizedID); lastSwaps = newSwaps; // Do some (routed) test-pings for(int i=0;i<10;i++) { try { Thread.sleep(2000); } catch (InterruptedException e1) { } try { Node randomNode = nodes[random.nextInt(NUMBER_OF_NODES)]; Node randomNode2 = randomNode; while(randomNode2 == randomNode) randomNode2 = nodes[random.nextInt(NUMBER_OF_NODES)]; Logger.normal(RealNodeRoutingTest.class, "Pinging "+randomNode2.portNumber+" from "+randomNode.portNumber); double loc2 = randomNode2.lm.getLocation().getValue(); int hopsTaken = randomNode.routedPing(loc2); pings++; if(hopsTaken < 0) { failures++; avg.report(0.0); avg2.report(0.0); double ratio = (double)successes / ((double)(failures+successes)); Logger.normal(RealNodeRoutingTest.class, "Routed ping "+pings+" FAILED from "+randomNode.portNumber+" to "+randomNode2.portNumber+" (long:"+ratio+", short:"+avg.currentValue()+", vague:"+avg2.currentValue()+")"); } else { successes++; avg.report(1.0); avg2.report(1.0); double ratio = (double)successes / ((double)(failures+successes)); Logger.normal(RealNodeRoutingTest.class, "Routed ping "+pings+" success: "+hopsTaken+" "+randomNode.portNumber+" to "+randomNode2.portNumber+" (long:"+ratio+", short:"+avg.currentValue()+", vague:"+avg2.currentValue()+")"); } } catch (Throwable t) { Logger.error(RealNodeRoutingTest.class, "Caught "+t, t); } } if(pings > 10 && avg.currentValue() > 0.98 && ((double)successes / ((double)(failures+successes)) > 0.98)) { break; } System.out.println(); System.out.println("Ping average > 98%, lets do some inserts/requests"); System.out.println(); int requestNumber = 0; RunningAverage requestsAvg = new SimpleRunningAverage(100, 0.0); while(true) { try { requestNumber++; try { Thread.sleep(5000); } catch (InterruptedException e1) { } String dataString = Integer.toString(requestNumber); Logger.error(RealNodeRequestInsertTest.class,"Inserting: \""+dataString+"\""); byte[] data = dataString.getBytes(); ClientCHKBlock block; block = ClientCHKBlock.encode(data); ClientCHK chk = block.getClientKey(); Logger.error(RealNodeRequestInsertTest.class,"CHK: "+chk.getURI()); Logger.error(RealNodeRequestInsertTest.class,"Headers: "+HexUtil.bytesToHex(block.getHeader())); // Pick random node to insert to int node1 = random.nextInt(NUMBER_OF_NODES); Node randomNode = nodes[random.nextInt(NUMBER_OF_NODES)]; randomNode.putCHK(block); Logger.error(RealNodeRequestInsertTest.class, "Inserted to "+node1); // Pick random node to request from int node2; do { node2 = random.nextInt(NUMBER_OF_NODES); } while(node2 == node1); Node fetchNode = nodes[node2]; block = fetchNode.getCHK(chk); if(block == null) { Logger.error(RealNodeRequestInsertTest.class, "Fetch FAILED from "+node2); requestsAvg.report(0.0); } else { byte[] results = block.getData(); requestsAvg.report(1.0); if(Arrays.equals(results, data)) { Logger.error(RealNodeRequestInsertTest.class, "Succeeded: "+new String(results)); } else { Logger.error(RealNodeRequestInsertTest.class, "Returned invalid data!"); } } } catch (Throwable t) { Logger.error(RealNodeRequestInsertTest.class, "Caught "+t, t); } } } }
|
46731 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46731/27f407d086a1dbf43da0232680fb0f61503732d4/RealNodeRequestInsertTest.java/clean/src/freenet/node/RealNodeRequestInsertTest.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
9247,
13047,
16,
10669,
13047,
16,
6469,
47,
5509,
503,
288,
3639,
2029,
6813,
18,
8394,
9152,
22681,
5846,
5062,
48,
87,
273,
638,
31,
3639,
2029,
18,
6694,
67,
5062,
48,
273,
1381,
31,
3639,
4242,
18,
8401,
27334,
7735,
12,
3328,
18,
15480,
16,
315,
74,
2842,
278,
18,
2159,
30,
17364,
16,
74,
2842,
278,
18,
2159,
18,
2735,
30,
6130,
16,
74,
2842,
278,
18,
2159,
18,
19793,
52,
30,
6130,
16,
74,
2842,
278,
18,
2159,
18,
907,
6813,
30,
6130,
6,
1748,
6,
74,
2842,
278,
18,
2159,
18,
2735,
1318,
30,
4148,
16,
74,
2842,
278,
18,
2159,
18,
19793,
52,
6667,
1318,
30,
6130,
16,
74,
2842,
278,
18,
1594,
18,
5702,
18,
57,
9295,
4534,
1318,
30,
4148,
6,
5549,
1769,
3639,
2332,
18,
659,
18,
8222,
2932,
4600,
19,
17466,
1842,
8863,
3639,
2332,
18,
659,
18,
8222,
5621,
3639,
28622,
8529,
1830,
2744,
273,
394,
28622,
8529,
1830,
5621,
3639,
2029,
8526,
2199,
273,
394,
2029,
63,
9931,
67,
3932,
67,
8744,
55,
15533,
3639,
4242,
18,
6130,
12,
6955,
907,
13966,
4709,
18,
1106,
16,
315,
11092,
2199,
7070,
1769,
3639,
364,
12,
474,
277,
33,
20,
31,
77,
32,
9931,
67,
3932,
67,
8744,
55,
31,
77,
27245,
288,
5411,
2199,
63,
77,
65,
273,
394,
2029,
12,
25,
3784,
15,
77,
16,
2744,
1769,
5411,
4242,
18,
6130,
12,
6955,
907,
13966,
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,
918,
2774,
12,
780,
8526,
833,
13,
1216,
9247,
13047,
16,
10669,
13047,
16,
6469,
47,
5509,
503,
288,
3639,
2029,
6813,
18,
8394,
9152,
22681,
5846,
5062,
48,
87,
273,
638,
31,
3639,
2029,
18,
6694,
67,
5062,
48,
273,
1381,
31,
3639,
4242,
18,
8401,
27334,
7735,
12,
3328,
18,
15480,
16,
315,
74,
2842,
278,
18,
2159,
30,
17364,
16,
74,
2842,
278,
18,
2159,
18,
2735,
30,
6130,
16,
74,
2842,
278,
18,
2159,
18,
19793,
52,
30,
6130,
16,
74,
2842,
278,
18,
2159,
18,
907,
6813,
30,
6130,
6,
1748,
6,
74,
2842,
278,
18,
2159,
18,
2735,
1318,
30,
4148,
16,
74,
2842,
278,
18,
2159,
18,
19793,
52,
2
] |
&& !(activeBuildConfig.isIncluded(resource))) {
|
&& !(activeBuildConfig .isIncluded(resource))) {
|
public void run(IProgressMonitor monitor) { IJavaProject jp = JavaCore.create(project); BuildConfiguration activeBuildConfig = BuildConfigurator .getBuildConfigurator().getProjectBuildConfigurator(jp) .getActiveBuildConfiguration(); try { IPackageFragment[] packages = jp.getPackageFragments(); monitor.beginTask(AspectJUIPlugin.getResourceString("Refactoring.ConvertingFileExtensions"), packages.length); // IProgressMonitor monitor = new NullProgressMonitor(); for (int i = 0; i < packages.length; i++) { if (!(packages[i].isReadOnly())) { try { ICompilationUnit[] files = packages[i] .getCompilationUnits(); for (int j = 0; j < files.length; j++) { IResource resource = files[j].getResource(); if (!includeNotBuiltFiles && !(activeBuildConfig.isIncluded(resource))) { // do not rename this file if it is not active break; } if ((!convertToAJ && resource.getFileExtension() .equals("aj")) //$NON-NLS-1$ || (convertToAJ && resource .getFileExtension().equals("java"))) { //$NON-NLS-1$ renameFile(convertToAJ, resource, monitor); } } } catch (JavaModelException e) { AspectJUIPlugin.logException(e); } } monitor.worked(1); } } catch (JavaModelException e) { AspectJUIPlugin.logException(e); } }
|
13558 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13558/b18e92bdfba4d98d2b03ce0641da5446cf3fbc46/RenameFileExtensionsDialog.java/clean/org.eclipse.ajdt.ui/src/org/eclipse/ajdt/ui/refactoring/RenameFileExtensionsDialog.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
1086,
12,
45,
5491,
7187,
6438,
13,
288,
9506,
202,
45,
5852,
4109,
18182,
273,
5110,
4670,
18,
2640,
12,
4406,
1769,
9506,
202,
3116,
1750,
2695,
3116,
809,
273,
3998,
17182,
25083,
202,
18,
588,
3116,
17182,
7675,
588,
4109,
3116,
17182,
12,
21797,
13,
25083,
202,
18,
588,
3896,
3116,
1750,
5621,
9506,
202,
698,
288,
6862,
202,
45,
2261,
7456,
8526,
5907,
273,
18182,
18,
588,
2261,
27588,
5621,
6862,
202,
10259,
18,
10086,
2174,
12,
17468,
46,
5370,
3773,
18,
588,
1420,
780,
2932,
426,
3493,
6053,
18,
2723,
310,
812,
7513,
6,
3631,
5907,
18,
2469,
1769,
202,
202,
759,
1082,
202,
45,
5491,
7187,
6438,
273,
394,
4112,
5491,
7187,
5621,
6862,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
5907,
18,
2469,
31,
277,
27245,
288,
25083,
202,
430,
16051,
12,
10308,
63,
77,
8009,
291,
12066,
1435,
3719,
288,
6862,
1082,
202,
698,
288,
6862,
9506,
202,
45,
19184,
2802,
8526,
1390,
273,
5907,
63,
77,
65,
6862,
25083,
202,
18,
588,
19184,
7537,
5621,
6862,
9506,
202,
1884,
261,
474,
525,
273,
374,
31,
525,
411,
1390,
18,
2469,
31,
525,
27245,
288,
6862,
6862,
202,
45,
1420,
1058,
273,
1390,
63,
78,
8009,
588,
1420,
5621,
6862,
6862,
202,
430,
16051,
6702,
1248,
16409,
2697,
6862,
6862,
1082,
202,
10,
10,
401,
12,
3535,
3116,
809,
18,
291,
19323,
12,
3146,
20349,
288,
6862,
25083,
202,
759,
741,
486,
6472,
333,
585,
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,
2398,
1071,
918,
1086,
12,
45,
5491,
7187,
6438,
13,
288,
9506,
202,
45,
5852,
4109,
18182,
273,
5110,
4670,
18,
2640,
12,
4406,
1769,
9506,
202,
3116,
1750,
2695,
3116,
809,
273,
3998,
17182,
25083,
202,
18,
588,
3116,
17182,
7675,
588,
4109,
3116,
17182,
12,
21797,
13,
25083,
202,
18,
588,
3896,
3116,
1750,
5621,
9506,
202,
698,
288,
6862,
202,
45,
2261,
7456,
8526,
5907,
273,
18182,
18,
588,
2261,
27588,
5621,
6862,
202,
10259,
18,
10086,
2174,
12,
17468,
46,
5370,
3773,
18,
588,
1420,
780,
2932,
426,
3493,
6053,
18,
2723,
310,
812,
7513,
6,
3631,
5907,
18,
2469,
1769,
202,
202,
759,
1082,
202,
45,
5491,
7187,
6438,
273,
394,
4112,
5491,
7187,
2
] |
return t;
|
expireLaunchingTasks.addNewTask(t.getTaskId()); return t;
|
public synchronized Task pollForNewTask(String taskTracker) { // // Compute average map and reduce task numbers across pool // int avgMaps = 0; int avgReduces = 0; int numTaskTrackers; TaskTrackerStatus tts; synchronized (taskTrackers) { numTaskTrackers = taskTrackers.size(); tts = (TaskTrackerStatus) taskTrackers.get(taskTracker); } if (numTaskTrackers > 0) { avgMaps = totalMaps / numTaskTrackers; avgReduces = totalReduces / numTaskTrackers; } int totalCapacity = numTaskTrackers * maxCurrentTasks; // // Get map + reduce counts for the current tracker. // if (tts == null) { LOG.warning("Unknown task tracker polling; ignoring: " + taskTracker); return null; } int numMaps = tts.countMapTasks(); int numReduces = tts.countReduceTasks(); // // In the below steps, we allocate first a map task (if appropriate), // and then a reduce task if appropriate. We go through all jobs // in order of job arrival; jobs only get serviced if their // predecessors are serviced, too. // // // We hand a task to the current taskTracker if the given machine // has a workload that's equal to or less than the averageMaps // +/- TASK_ALLOC_EPSILON. (That epsilon is in place in case // there is an odd machine that is failing for some reason but // has not yet been removed from the pool, making capacity seem // larger than it really is.) // synchronized (jobsByArrival) { if ((numMaps < maxCurrentTasks) && (numMaps <= (avgMaps + TASK_ALLOC_EPSILON))) { int totalNeededMaps = 0; for (Iterator it = jobsByArrival.iterator(); it.hasNext(); ) { JobInProgress job = (JobInProgress) it.next(); if (job.getStatus().getRunState() != JobStatus.RUNNING) { continue; } Task t = job.obtainNewMapTask(taskTracker, tts); if (t != null) { return t; } // // Beyond the highest-priority task, reserve a little // room for failures and speculative executions; don't // schedule tasks to the hilt. // totalNeededMaps += job.desiredMaps(); double padding = 0; if (totalCapacity > MIN_SLOTS_FOR_PADDING) { padding = Math.min(maxCurrentTasks, totalNeededMaps * PAD_FRACTION); } if (totalNeededMaps + padding >= totalCapacity) { break; } } } // // Same thing, but for reduce tasks // if ((numReduces < maxCurrentTasks) && (numReduces <= (avgReduces + TASK_ALLOC_EPSILON))) { int totalNeededReduces = 0; for (Iterator it = jobsByArrival.iterator(); it.hasNext(); ) { JobInProgress job = (JobInProgress) it.next(); if (job.getStatus().getRunState() != JobStatus.RUNNING) { continue; } Task t = job.obtainNewReduceTask(taskTracker, tts); if (t != null) { return t; } // // Beyond the highest-priority task, reserve a little // room for failures and speculative executions; don't // schedule tasks to the hilt. // totalNeededReduces += job.desiredReduces(); double padding = 0; if (totalCapacity > MIN_SLOTS_FOR_PADDING) { padding = Math.min(maxCurrentTasks, totalNeededReduces * PAD_FRACTION); } if (totalNeededReduces + padding >= totalCapacity) { break; } } } } return null; }
|
55137 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55137/7b475a19be160036edc48681a45cc4cd2a5a09a3/JobTracker.java/buggy/src/java/org/apache/hadoop/mapred/JobTracker.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
3837,
7672,
1290,
1908,
2174,
12,
780,
1562,
8135,
13,
288,
3639,
368,
3639,
368,
8155,
8164,
852,
471,
5459,
1562,
5600,
10279,
2845,
3639,
368,
3639,
509,
11152,
8903,
273,
374,
31,
3639,
509,
11152,
16911,
764,
273,
374,
31,
3639,
509,
818,
2174,
4402,
414,
31,
3639,
3837,
8135,
1482,
268,
3428,
31,
3639,
3852,
261,
4146,
4402,
414,
13,
288,
1850,
818,
2174,
4402,
414,
273,
1562,
4402,
414,
18,
1467,
5621,
1850,
268,
3428,
273,
261,
2174,
8135,
1482,
13,
1562,
4402,
414,
18,
588,
12,
4146,
8135,
1769,
3639,
289,
3639,
309,
261,
2107,
2174,
4402,
414,
405,
374,
13,
288,
1850,
11152,
8903,
273,
2078,
8903,
342,
818,
2174,
4402,
414,
31,
1850,
11152,
16911,
764,
273,
2078,
16911,
764,
342,
818,
2174,
4402,
414,
31,
3639,
289,
3639,
509,
2078,
7437,
273,
818,
2174,
4402,
414,
380,
943,
3935,
6685,
31,
3639,
368,
3639,
368,
968,
852,
397,
5459,
6880,
364,
326,
783,
9745,
18,
3639,
368,
3639,
309,
261,
748,
87,
422,
446,
13,
288,
1850,
2018,
18,
8551,
2932,
4874,
1562,
9745,
13708,
31,
14398,
30,
315,
397,
1562,
8135,
1769,
1850,
327,
446,
31,
3639,
289,
3639,
509,
818,
8903,
273,
268,
3428,
18,
1883,
863,
6685,
5621,
3639,
509,
818,
16911,
764,
273,
268,
3428,
18,
1883,
12944,
6685,
5621,
3639,
368,
3639,
368,
657,
326,
5712,
6075,
16,
732,
10101,
1122,
279,
852,
1562,
261,
430,
5505,
3631,
3639,
368,
471,
1508,
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,
3837,
7672,
1290,
1908,
2174,
12,
780,
1562,
8135,
13,
288,
3639,
368,
3639,
368,
8155,
8164,
852,
471,
5459,
1562,
5600,
10279,
2845,
3639,
368,
3639,
509,
11152,
8903,
273,
374,
31,
3639,
509,
11152,
16911,
764,
273,
374,
31,
3639,
509,
818,
2174,
4402,
414,
31,
3639,
3837,
8135,
1482,
268,
3428,
31,
3639,
3852,
261,
4146,
4402,
414,
13,
288,
1850,
818,
2174,
4402,
414,
273,
1562,
4402,
414,
18,
1467,
5621,
1850,
268,
3428,
273,
261,
2174,
8135,
1482,
13,
1562,
4402,
414,
18,
588,
12,
4146,
8135,
1769,
3639,
289,
3639,
309,
261,
2107,
2174,
4402,
414,
405,
374,
13,
288,
1850,
11152,
8903,
273,
2078,
8903,
342,
818,
2174,
4402,
2
] |
else
|
else
|
public void fire(Player player,String text,SpeakerNPC engine) { //A little trick to make NPC remember if it has met player before anc react accordingly //NPC_name quest doesn't exist anywhere else neither is used for any other purpose if (!player.isQuestCompleted("Hackim")) { engine.say("Hi foreigner, I'm Hackim Easso, the blacksmith's assistant. Have you come here to buy weapons?"); player.setQuest("Hackim","done"); } else { engine.say("Hi again, "+player.getName()+". How can I #help you this time?"); } }
|
4438 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4438/d512245d8e26069d9f1c5a15fba078b322c3b0ac/Semos.java/buggy/src/games/stendhal/server/maps/Semos.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
918,
4452,
12,
12148,
7291,
16,
780,
977,
16,
55,
347,
6388,
50,
3513,
4073,
13,
5375,
288,
4202,
202,
202,
759,
37,
12720,
28837,
358,
1221,
423,
3513,
11586,
309,
518,
711,
5100,
7291,
1865,
392,
71,
13417,
15905,
4202,
202,
202,
759,
50,
3513,
67,
529,
225,
456,
3302,
1404,
1005,
25651,
469,
15826,
353,
1399,
364,
1281,
1308,
13115,
4202,
202,
565,
309,
16051,
14872,
18,
291,
30791,
9556,
2932,
44,
484,
381,
6,
3719,
10792,
288,
10792,
4073,
18,
87,
528,
2932,
25009,
5523,
264,
16,
467,
17784,
670,
484,
381,
512,
428,
83,
16,
326,
7721,
4808,
483,
1807,
28779,
18,
21940,
1846,
12404,
2674,
358,
30143,
732,
438,
7008,
7225,
1769,
10792,
7291,
18,
542,
30791,
2932,
44,
484,
381,
15937,
8734,
8863,
10792,
289,
5375,
469,
10792,
288,
10792,
4073,
18,
87,
528,
2932,
25009,
3382,
16,
13773,
14872,
18,
17994,
1435,
9078,
18,
9017,
848,
467,
468,
5201,
1846,
333,
813,
7225,
1769,
10792,
289,
5375,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
918,
4452,
12,
12148,
7291,
16,
780,
977,
16,
55,
347,
6388,
50,
3513,
4073,
13,
5375,
288,
4202,
202,
202,
759,
37,
12720,
28837,
358,
1221,
423,
3513,
11586,
309,
518,
711,
5100,
7291,
1865,
392,
71,
13417,
15905,
4202,
202,
202,
759,
50,
3513,
67,
529,
225,
456,
3302,
1404,
1005,
25651,
469,
15826,
353,
1399,
364,
1281,
1308,
13115,
4202,
202,
565,
309,
16051,
14872,
18,
291,
30791,
9556,
2932,
44,
484,
381,
6,
3719,
10792,
288,
10792,
4073,
18,
87,
528,
2932,
25009,
5523,
264,
16,
467,
17784,
670,
484,
381,
512,
428,
83,
16,
326,
7721,
4808,
483,
1807,
28779,
18,
21940,
1846,
12404,
2674,
358,
30143,
732,
438,
7008,
7225,
1769,
2
] |
StringBuffer question = new StringBuffer(); question.append( ce().getShortName() ); question.append( " has the following unused space:\n" ); question.append( ce().getUnusedString() ); question.append( "\n\nWhich unit do you want to unload?" );
|
public void actionPerformed(ActionEvent ev) { // Are we ignoring events? if ( this.isIgnoringEvents() ) { return; } if ( statusBarActionPerformed(ev, client) ) return; if (!client.isMyTurn()) { // odd... return; } if (ev.getSource() == butDone) { deploy(); } else if (ev.getActionCommand().equals(DEPLOY_NEXT)) { ce().setPosition(null); clientgui.bv.redrawEntity(ce()); // Unload any loaded units. Enumeration iter = ce().getLoadedUnits().elements(); while ( iter.hasMoreElements() ) { Entity other = (Entity) iter.nextElement(); // Please note, the Server never got this unit's load orders. ce().unload( other ); other.setTransportId( Entity.NONE ); other.newRound(client.game.getRoundCount()); } selectEntity(client.getNextDeployableEntityNum(cen)); } else if (ev.getActionCommand().equals(DEPLOY_TURN)) { turnMode = true; } else if (ev.getActionCommand().equals(DEPLOY_LOAD)) { // What undeployed units can we load? Vector choices = new Vector(); Enumeration entities = client.game.getEntities(); Entity other; while ( entities.hasMoreElements() ) { other = (Entity) entities.nextElement(); if ( other.isSelectableThisTurn() && ce().canLoad(other) ) { choices.addElement( other ); } } // Do we have anyone to load? if ( choices.size() > 0 ) { String[] names = new String[ choices.size() ]; StringBuffer question = new StringBuffer(); question.append( ce().getShortName() ); question.append( " has the following unused space:\n" ); question.append( ce().getUnusedString() ); question.append( "\n\nWhich unit do you want to load?" ); for ( int loop = 0; loop < names.length; loop++ ) { names[loop] = ( (Entity)choices.elementAt(loop) ).getShortName(); } SingleChoiceDialog choiceDialog = new SingleChoiceDialog( clientgui.frame, "Load Unit", question.toString(), names ); choiceDialog.show(); if ( choiceDialog.getAnswer() == true ) { other = (Entity) choices.elementAt( choiceDialog.getChoice() ); // Please note, the Server may never get this load order. ce().load( other ); other.setTransportId( cen ); clientgui.mechD.displayEntity(ce()); } } // End have-choices else { AlertDialog alert = new AlertDialog( clientgui.frame, "Load Unit", ce().getShortName() + " can not load any of the remaining units." ); alert.show(); } } // End load-unit else if (ev.getActionCommand().equals(DEPLOY_UNLOAD)) { // Do we have anyone to unload? Vector choices = ce().getLoadedUnits(); if ( choices.size() > 0 ) { Entity other = null; String[] names = new String[ choices.size() ]; StringBuffer question = new StringBuffer(); question.append( ce().getShortName() ); question.append( " has the following unused space:\n" ); question.append( ce().getUnusedString() ); question.append( "\n\nWhich unit do you want to unload?" ); for ( int loop = 0; loop < names.length; loop++ ) { names[loop] = ( (Entity)choices.elementAt(loop) ).getShortName(); } SingleChoiceDialog choiceDialog = new SingleChoiceDialog( clientgui.frame, "Unload Unit", question.toString(), names ); choiceDialog.show(); if ( choiceDialog.getAnswer() == true ) { other = (Entity) choices.elementAt( choiceDialog.getChoice() ); // Please note, the Server never got this load order. if ( ce().unload( other ) ) { other.setTransportId( Entity.NONE ); other.newRound(client.game.getRoundCount()); clientgui.mechD.displayEntity(ce()); } else { System.out.println( "Could not unload " + other.getShortName() + " from " + ce().getShortName() ); } } } // End have-choices else { AlertDialog alert = new AlertDialog( clientgui.frame, "Unload Unit", ce().getShortName() + " is not transporting any units." ); alert.show(); } } // End unload-unit } // End public void actionPerformed(ActionEvent ev)
|
3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/18ec0036f3c5df3d8fbef60e9dd53cc153fc889e/DeploymentDisplay.java/buggy/megamek/src/megamek/client/ui/AWT/DeploymentDisplay.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
12,
1803,
1133,
2113,
13,
288,
3639,
368,
12520,
732,
14398,
2641,
35,
3639,
309,
261,
333,
18,
291,
21702,
3783,
1435,
262,
288,
5411,
327,
31,
3639,
289,
3639,
309,
261,
1267,
5190,
19449,
12,
14965,
16,
1004,
13,
262,
1850,
327,
31,
5375,
309,
16051,
2625,
18,
291,
12062,
15858,
10756,
288,
5411,
368,
14800,
2777,
5411,
327,
31,
3639,
289,
7734,
309,
261,
14965,
18,
588,
1830,
1435,
422,
1496,
7387,
13,
288,
5411,
7286,
5621,
3639,
289,
469,
309,
261,
14965,
18,
588,
1803,
2189,
7675,
14963,
12,
1639,
22971,
67,
25539,
3719,
288,
2398,
5898,
7675,
542,
2555,
12,
2011,
1769,
5411,
1004,
20292,
18,
70,
90,
18,
1118,
1899,
1943,
12,
311,
10663,
5411,
368,
1351,
945,
1281,
4203,
4971,
18,
5411,
13864,
1400,
273,
225,
5898,
7675,
588,
8835,
7537,
7675,
6274,
5621,
5411,
1323,
261,
1400,
18,
5332,
7417,
3471,
1435,
262,
288,
7734,
3887,
1308,
273,
261,
1943,
13,
1400,
18,
4285,
1046,
5621,
7734,
368,
7801,
4721,
16,
326,
3224,
5903,
2363,
333,
2836,
1807,
1262,
11077,
18,
7734,
5898,
7675,
318,
945,
12,
1308,
11272,
7734,
1308,
18,
542,
6568,
548,
12,
3887,
18,
9826,
11272,
7734,
1308,
18,
2704,
11066,
12,
2625,
18,
13957,
18,
588,
11066,
1380,
10663,
5411,
289,
13491,
2027,
1943,
12,
2625,
18,
588,
2134,
10015,
429,
1943,
2578,
12,
71,
275,
10019,
3639,
289,
469,
309,
261,
14965,
18,
588,
1803,
2189,
7675,
14963,
12,
1639,
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,
26100,
12,
1803,
1133,
2113,
13,
288,
3639,
368,
12520,
732,
14398,
2641,
35,
3639,
309,
261,
333,
18,
291,
21702,
3783,
1435,
262,
288,
5411,
327,
31,
3639,
289,
3639,
309,
261,
1267,
5190,
19449,
12,
14965,
16,
1004,
13,
262,
1850,
327,
31,
5375,
309,
16051,
2625,
18,
291,
12062,
15858,
10756,
288,
5411,
368,
14800,
2777,
5411,
327,
31,
3639,
289,
7734,
309,
261,
14965,
18,
588,
1830,
1435,
422,
1496,
7387,
13,
288,
5411,
7286,
5621,
3639,
289,
469,
309,
261,
14965,
18,
588,
1803,
2189,
7675,
14963,
12,
1639,
22971,
67,
25539,
3719,
288,
2398,
5898,
7675,
542,
2555,
12,
2011,
1769,
5411,
1004,
20292,
18,
70,
90,
18,
1118,
1899,
2
] |
|
header[0] = (byte)(CHKBlock.HASH_SHA256 >> 8); header[1] = (byte)(CHKBlock.HASH_SHA256 & 0xff);
|
header[0] = (byte)(KeyBlock.HASH_SHA256 >> 8); header[1] = (byte)(KeyBlock.HASH_SHA256 & 0xff);
|
static public ClientCHKBlock encode(Bucket sourceData, boolean asMetadata, boolean dontCompress, short alreadyCompressedCodec, long sourceLength) throws CHKEncodeException, IOException { byte[] finalData = null; byte[] data; byte[] header; ClientCHK key; short compressionAlgorithm = -1; try { Compressed comp = Key.compress(sourceData, dontCompress, alreadyCompressedCodec, sourceLength, MAX_LENGTH_BEFORE_COMPRESSION, MAX_COMPRESSED_DATA_LENGTH, false); finalData = comp.compressedData; compressionAlgorithm = comp.compressionAlgorithm; } catch (KeyEncodeException e2) { throw new CHKEncodeException(e2.getMessage(), e2); } // Now do the actual encode MessageDigest md256; try { md256 = MessageDigest.getInstance("SHA-256"); } catch (NoSuchAlgorithmException e1) { // FIXME: log this properly? throw new Error(e1); } // First pad it if(finalData.length != 32768) { // Hash the data if(finalData.length != 0) md256.update(finalData); byte[] digest = md256.digest(); MersenneTwister mt = new MersenneTwister(digest); data = new byte[32768]; System.arraycopy(finalData, 0, data, 0, finalData.length); byte[] randomBytes = new byte[32768-finalData.length]; mt.nextBytes(randomBytes); System.arraycopy(randomBytes, 0, data, finalData.length, 32768-finalData.length); } else { data = finalData; } // Now make the header byte[] encKey = md256.digest(data); md256.reset(); // IV = E(H(crypto key)) byte[] plainIV = md256.digest(encKey); header = new byte[plainIV.length+2+2]; header[0] = (byte)(CHKBlock.HASH_SHA256 >> 8); header[1] = (byte)(CHKBlock.HASH_SHA256 & 0xff); System.arraycopy(plainIV, 0, header, 2, plainIV.length); header[plainIV.length+2] = (byte)(finalData.length >> 8); header[plainIV.length+3] = (byte)(finalData.length & 0xff); // GRRR, java 1.4 does not have any symmetric crypto // despite exposing asymmetric and hashes! // Now encrypt the header, then the data, using the same PCFB instance BlockCipher cipher; try { cipher = new Rijndael(256, 256); } catch (UnsupportedCipherException e) { // FIXME - log this properly throw new Error(e); } cipher.initialize(encKey); PCFBMode pcfb = new PCFBMode(cipher); pcfb.blockEncipher(header, 2, header.length-2); pcfb.blockEncipher(data, 0, data.length); // Now calculate the final hash md256.update(header); byte[] finalHash = md256.digest(data); // Now convert it into a ClientCHK key = new ClientCHK(finalHash, encKey, asMetadata, Key.ALGO_AES_PCFB_256_SHA256, compressionAlgorithm); try { return new ClientCHKBlock(data, header, key, false); } catch (CHKVerifyException e3) { //WTF? throw new Error(e3); } }
|
50915 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50915/ca136843ae9ecb30cadada58a33a5dc2cf8ad064/ClientCHKBlock.java/buggy/src/freenet/keys/ClientCHKBlock.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1071,
2445,
1792,
47,
1768,
2017,
12,
4103,
1084,
751,
16,
1250,
487,
2277,
16,
1250,
14046,
16552,
16,
3025,
1818,
16841,
11008,
16,
1525,
27406,
13,
1216,
6469,
47,
5509,
503,
16,
1860,
288,
3639,
1160,
8526,
727,
751,
273,
446,
31,
3639,
1160,
8526,
501,
31,
3639,
1160,
8526,
1446,
31,
3639,
2445,
1792,
47,
498,
31,
3639,
3025,
9154,
6801,
273,
300,
21,
31,
3639,
775,
288,
1082,
202,
16841,
1161,
273,
1929,
18,
14706,
12,
3168,
751,
16,
14046,
16552,
16,
1818,
16841,
11008,
16,
27406,
16,
4552,
67,
7096,
67,
19152,
67,
4208,
14227,
16,
4552,
67,
4208,
27388,
67,
4883,
67,
7096,
16,
629,
1769,
1082,
202,
6385,
751,
273,
1161,
18,
15385,
751,
31,
1082,
202,
23766,
6801,
273,
1161,
18,
23766,
6801,
31,
202,
202,
97,
1044,
261,
653,
5509,
503,
425,
22,
13,
288,
1082,
202,
12849,
394,
6469,
47,
5509,
503,
12,
73,
22,
18,
24906,
9334,
425,
22,
1769,
202,
202,
97,
7734,
368,
4494,
741,
326,
3214,
2017,
7734,
22485,
3481,
5034,
31,
3639,
775,
288,
5411,
3481,
5034,
273,
22485,
18,
588,
1442,
2932,
8325,
17,
5034,
8863,
3639,
289,
1044,
261,
28341,
17293,
425,
21,
13,
288,
5411,
368,
9852,
30,
613,
333,
8214,
35,
5411,
604,
394,
1068,
12,
73,
21,
1769,
3639,
289,
3639,
368,
5783,
4627,
518,
3639,
309,
12,
6385,
751,
18,
2469,
480,
29317,
28,
13,
288,
5411,
368,
2474,
326,
501,
5411,
309,
12,
6385,
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,
760,
1071,
2445,
1792,
47,
1768,
2017,
12,
4103,
1084,
751,
16,
1250,
487,
2277,
16,
1250,
14046,
16552,
16,
3025,
1818,
16841,
11008,
16,
1525,
27406,
13,
1216,
6469,
47,
5509,
503,
16,
1860,
288,
3639,
1160,
8526,
727,
751,
273,
446,
31,
3639,
1160,
8526,
501,
31,
3639,
1160,
8526,
1446,
31,
3639,
2445,
1792,
47,
498,
31,
3639,
3025,
9154,
6801,
273,
300,
21,
31,
3639,
775,
288,
1082,
202,
16841,
1161,
273,
1929,
18,
14706,
12,
3168,
751,
16,
14046,
16552,
16,
1818,
16841,
11008,
16,
27406,
16,
4552,
67,
7096,
67,
19152,
67,
4208,
14227,
16,
4552,
67,
4208,
27388,
67,
4883,
67,
7096,
16,
629,
1769,
1082,
202,
6385,
751,
273,
1161,
2
] |
public void visitChildren(NodeVisitor v) {
|
Object visitChildren(NodeVisitor v) {
|
public void visitChildren(NodeVisitor v) { expression = (Expression) expression.visit(v); }
|
11982 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11982/46f164284b4c476b23700f47d7d82a18a0c7d4f0/ExpressionStatement.java/clean/src/polyglot/ast/ExpressionStatement.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1033,
3757,
4212,
12,
907,
7413,
331,
13,
288,
565,
2652,
273,
261,
2300,
13,
2652,
18,
11658,
12,
90,
1769,
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,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1033,
3757,
4212,
12,
907,
7413,
331,
13,
288,
565,
2652,
273,
261,
2300,
13,
2652,
18,
11658,
12,
90,
1769,
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,
-100,
-100,
-100,
-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 String buildErrorString(PsiElement location) {
|
public String buildErrorString(PsiElement location){
|
public String buildErrorString(PsiElement location) { return "#ref() called explicitly #loc"; }
|
56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/14bec5eb5882f39880b79c7211cad50292b4acf6/NoExplicitFinalizeCallsInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/finalization/NoExplicitFinalizeCallsInspection.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1361,
668,
780,
12,
52,
7722,
1046,
2117,
15329,
3639,
327,
6619,
1734,
1435,
2566,
8122,
468,
1829,
14432,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1361,
668,
780,
12,
52,
7722,
1046,
2117,
15329,
3639,
327,
6619,
1734,
1435,
2566,
8122,
468,
1829,
14432,
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
] |
public Node appendChild(Node newChild) throws DOMException
|
public Node appendChild(Node newChild) throws DOMException
|
public Node appendChild(Node newChild) throws DOMException { error(XSLTErrorResources.ER_CANNOT_ADD, new Object[] {newChild.getNodeName(), this.getNodeName()}); //"Can not add " +((ElemTemplateElement)newChild).m_elemName + //" to " + this.m_elemName); return null; }
|
2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/77ad973f1d6ad8f28fd358f2ba4d4c63da65d953/ElemSort.java/clean/src/org/apache/xalan/templates/ElemSort.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2029,
9079,
5833,
12,
907,
19783,
13,
565,
1216,
4703,
503,
225,
288,
565,
555,
12,
60,
4559,
56,
668,
3805,
18,
654,
67,
39,
16791,
67,
8355,
16,
394,
1033,
8526,
288,
2704,
1763,
18,
588,
18948,
9334,
333,
18,
588,
18948,
17767,
1769,
368,
6,
2568,
486,
527,
315,
397,
12443,
7498,
2283,
1046,
13,
2704,
1763,
2934,
81,
67,
10037,
461,
397,
1850,
368,
6,
358,
315,
397,
333,
18,
81,
67,
10037,
461,
1769,
565,
327,
446,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2029,
9079,
5833,
12,
907,
19783,
13,
565,
1216,
4703,
503,
225,
288,
565,
555,
12,
60,
4559,
56,
668,
3805,
18,
654,
67,
39,
16791,
67,
8355,
16,
394,
1033,
8526,
288,
2704,
1763,
18,
588,
18948,
9334,
333,
18,
588,
18948,
17767,
1769,
368,
6,
2568,
486,
527,
315,
397,
12443,
7498,
2283,
1046,
13,
2704,
1763,
2934,
81,
67,
10037,
461,
397,
1850,
368,
6,
358,
315,
397,
333,
18,
81,
67,
10037,
461,
1769,
565,
327,
446,
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
] |
clazz = ClassManager.loadClass(loader, name, resolve); if (clazz != null) return clazz;
|
clazz = loader.loadClass(name); } else { clazz = findSystemClass(name);
|
public Class loadClass(String name, boolean resolve) throws ClassNotFoundException { Class clazz = findLoadedClass(name); if (clazz == null) { ClassLoader loader = getClass().getClassLoader(); if (loader != null) { clazz = ClassManager.loadClass(loader, name, resolve); if (clazz != null) return clazz; } clazz = findSystemClass(name); } if (resolve) resolveClass(clazz); return clazz; }
|
47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/5c6a10b4e7eedcdaa0b23264bede49775fe775d6/DefiningClassLoader.java/buggy/src/org/mozilla/classfile/DefiningClassLoader.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1659,
16038,
12,
780,
508,
16,
1250,
2245,
13,
3639,
1216,
10403,
565,
288,
3639,
1659,
4003,
273,
1104,
8835,
797,
12,
529,
1769,
3639,
309,
261,
830,
3638,
422,
446,
13,
288,
5411,
9403,
4088,
273,
2900,
7675,
588,
7805,
5621,
5411,
309,
261,
6714,
480,
446,
13,
288,
7734,
4003,
273,
1659,
1318,
18,
945,
797,
12,
6714,
16,
508,
16,
2245,
1769,
7734,
309,
261,
830,
3638,
480,
446,
13,
10792,
327,
4003,
31,
5411,
289,
5411,
4003,
273,
1104,
3163,
797,
12,
529,
1769,
3639,
289,
3639,
309,
261,
10828,
13,
5411,
2245,
797,
12,
830,
3638,
1769,
3639,
327,
4003,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
377,
1071,
1659,
16038,
12,
780,
508,
16,
1250,
2245,
13,
3639,
1216,
10403,
565,
288,
3639,
1659,
4003,
273,
1104,
8835,
797,
12,
529,
1769,
3639,
309,
261,
830,
3638,
422,
446,
13,
288,
5411,
9403,
4088,
273,
2900,
7675,
588,
7805,
5621,
5411,
309,
261,
6714,
480,
446,
13,
288,
7734,
4003,
273,
1659,
1318,
18,
945,
797,
12,
6714,
16,
508,
16,
2245,
1769,
7734,
309,
261,
830,
3638,
480,
446,
13,
10792,
327,
4003,
31,
5411,
289,
5411,
4003,
273,
1104,
3163,
797,
12,
529,
1769,
3639,
289,
3639,
309,
261,
10828,
13,
5411,
2245,
797,
12,
830,
3638,
1769,
3639,
327,
4003,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
wlChefInput=new Label(wFileComp, SWT.RIGHT); wlChefInput.setText("Get file from Chef"); props.setLook(wlChefInput); fdlChefInput=new FormData(); fdlChefInput.left = new FormAttachment(0, 0); fdlChefInput.top = new FormAttachment(0,0); fdlChefInput.right= new FormAttachment(middle, -margin); wlChefInput.setLayoutData(fdlChefInput); wChefInput=new Button(wFileComp, SWT.CHECK); props.setLook(wChefInput); fdChefInput=new FormData(); fdChefInput.left = new FormAttachment(middle, 0); fdChefInput.right= new FormAttachment(100, 0); fdChefInput.top = new FormAttachment(0, 0); wChefInput.setLayoutData(fdChefInput);
|
wlAccFilenames=new Label(wFileComp, SWT.RIGHT); wlAccFilenames.setText(Messages.getString("TextFileInputDialog.AcceptFilenames.Label")); props.setLook(wlAccFilenames); fdlAccFilenames=new FormData(); fdlAccFilenames.left = new FormAttachment(0, 0); fdlAccFilenames.top = new FormAttachment(0,0); fdlAccFilenames.right= new FormAttachment(middle, -margin); wlAccFilenames.setLayoutData(fdlAccFilenames); wAccFilenames=new Button(wFileComp, SWT.CHECK); wAccFilenames.setToolTipText(Messages.getString("TextFileInputDialog.AcceptFilenames.Tooltip")); props.setLook(wAccFilenames); fdAccFilenames=new FormData(); fdAccFilenames.left = new FormAttachment(middle, 0); fdAccFilenames.right= new FormAttachment(100, 0); fdAccFilenames.top = new FormAttachment(0, 0); wAccFilenames.setLayoutData(fdAccFilenames); wAccFilenames.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent arg0) { setFlags(); } } ); wlAccField=new Label(wFileComp, SWT.RIGHT); wlAccField.setText(Messages.getString("TextFileInputDialog.AcceptField.Label")); props.setLook(wlAccField); fdlAccField=new FormData(); fdlAccField.left = new FormAttachment(0, 0); fdlAccField.top = new FormAttachment(wAccFilenames, margin); fdlAccField.right= new FormAttachment(middle, -margin); wlAccField.setLayoutData(fdlAccField); wAccField=new Text(wFileComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER); wAccField.setToolTipText(Messages.getString("TextFileInputDialog.AcceptField.Tooltip")); props.setLook(wAccField); fdAccField=new FormData(); fdAccField.left = new FormAttachment(middle, 0); fdAccField.right= new FormAttachment(100, 0); fdAccField.top = new FormAttachment(wAccFilenames, margin); wAccField.setLayoutData(fdAccField); wlAccStep=new Label(wFileComp, SWT.RIGHT); wlAccStep.setText(Messages.getString("TextFileInputDialog.AcceptStep.Label")); props.setLook(wlAccStep); fdlAccStep=new FormData(); fdlAccStep.left = new FormAttachment(0, 0); fdlAccStep.top = new FormAttachment(wAccField, margin); fdlAccStep.right= new FormAttachment(middle, -margin); wlAccStep.setLayoutData(fdlAccStep); wAccStep=new CCombo(wFileComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER); wAccStep.setToolTipText(Messages.getString("TextFileInputDialog.AcceptStep.Tooltip")); props.setLook(wAccStep); fdAccStep=new FormData(); fdAccStep.left = new FormAttachment(middle, 0); fdAccStep.right= new FormAttachment(100, 0); fdAccStep.top = new FormAttachment(wAccField, margin); wAccStep.setLayoutData(fdAccStep); StepMeta[] prevSteps = transMeta.getPrevSteps(transMeta.findStep(stepname)); for (int i=0;i<prevSteps.length;i++) { wAccStep.add(prevSteps[i].getName()); }
|
public String open() { Shell parent = getParent(); Display display = parent.getDisplay(); shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN); props.setLook(shell); lsMod = new ModifyListener() { public void modifyText(ModifyEvent e) { input.setChanged(); } }; changed = input.hasChanged(); FormLayout formLayout = new FormLayout (); formLayout.marginWidth = Const.FORM_MARGIN; formLayout.marginHeight = Const.FORM_MARGIN; shell.setLayout(formLayout); shell.setText(Messages.getString("TextFileInputDialog.DialogTitle")); middle = props.getMiddlePct(); margin = Const.MARGIN; // Stepname line wlStepname=new Label(shell, SWT.RIGHT); wlStepname.setText(Messages.getString("System.Label.StepName")); props.setLook(wlStepname); fdlStepname=new FormData(); fdlStepname.left = new FormAttachment(0, 0); fdlStepname.top = new FormAttachment(0, margin); fdlStepname.right= new FormAttachment(middle, -margin); wlStepname.setLayoutData(fdlStepname); wStepname=new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER); wStepname.setText(stepname); props.setLook(wStepname); wStepname.addModifyListener(lsMod); fdStepname=new FormData(); fdStepname.left = new FormAttachment(middle, 0); fdStepname.top = new FormAttachment(0, margin); fdStepname.right= new FormAttachment(100, 0); wStepname.setLayoutData(fdStepname); wTabFolder = new CTabFolder(shell, SWT.BORDER); props.setLook(wTabFolder, Props.WIDGET_STYLE_TAB); ////////////////////////// // START OF FILE TAB /// ////////////////////////// wFileTab=new CTabItem(wTabFolder, SWT.NONE); wFileTab.setText(Messages.getString("TextFileInputDialog.FileTab.TabTitle")); wFileComp = new Composite(wTabFolder, SWT.NONE); props.setLook(wFileComp); FormLayout fileLayout = new FormLayout(); fileLayout.marginWidth = 3; fileLayout.marginHeight = 3; wFileComp.setLayout(fileLayout); // Get from chef checkbox wlChefInput=new Label(wFileComp, SWT.RIGHT); wlChefInput.setText("Get file from Chef"); props.setLook(wlChefInput); fdlChefInput=new FormData(); fdlChefInput.left = new FormAttachment(0, 0); fdlChefInput.top = new FormAttachment(0,0); fdlChefInput.right= new FormAttachment(middle, -margin); wlChefInput.setLayoutData(fdlChefInput); wChefInput=new Button(wFileComp, SWT.CHECK); props.setLook(wChefInput); fdChefInput=new FormData(); fdChefInput.left = new FormAttachment(middle, 0); fdChefInput.right= new FormAttachment(100, 0); fdChefInput.top = new FormAttachment(0, 0); wChefInput.setLayoutData(fdChefInput); // Filename line wlFilename=new Label(wFileComp, SWT.RIGHT); wlFilename.setText(Messages.getString("TextFileInputDialog.Filename.Label")); props.setLook(wlFilename); fdlFilename=new FormData(); fdlFilename.left = new FormAttachment(0, 0); fdlFilename.top = new FormAttachment(0, 0); fdlFilename.right= new FormAttachment(middle, -margin); wlFilename.setLayoutData(fdlFilename); wbbFilename=new Button(wFileComp, SWT.PUSH| SWT.CENTER); props.setLook(wbbFilename); wbbFilename.setText(Messages.getString("System.Button.Browse")); wbbFilename.setToolTipText(Messages.getString("System.Tooltip.BrowseForFileOrDirAndAdd")); fdbFilename=new FormData(); fdbFilename.right= new FormAttachment(100, 0); fdbFilename.top = new FormAttachment(wChefInput,margin); wbbFilename.setLayoutData(fdbFilename); wbvFilename=new Button(wFileComp, SWT.PUSH| SWT.CENTER); props.setLook(wbvFilename); wbvFilename.setText(Messages.getString("System.Button.Variable")); wbvFilename.setToolTipText(Messages.getString("System.Tooltip.VariableToFileOrDir")); fdbvFilename=new FormData(); fdbvFilename.right= new FormAttachment(wbbFilename, -margin); fdbvFilename.top = new FormAttachment(wChefInput,margin); wbvFilename.setLayoutData(fdbvFilename); wbaFilename=new Button(wFileComp, SWT.PUSH| SWT.CENTER); props.setLook(wbaFilename); wbaFilename.setText(Messages.getString("TextFileInputDialog.FilenameAdd.Button")); wbaFilename.setToolTipText(Messages.getString("TextFileInputDialog.FilenameAdd.Tooltip")); fdbaFilename=new FormData(); fdbaFilename.right= new FormAttachment(wbvFilename, -margin); fdbaFilename.top = new FormAttachment(wChefInput,margin); wbaFilename.setLayoutData(fdbaFilename); wFilename=new Text(wFileComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER); props.setLook(wFilename); wFilename.addModifyListener(lsMod); fdFilename=new FormData(); fdFilename.left = new FormAttachment(middle, 0); fdFilename.right= new FormAttachment(wbaFilename, -margin); fdFilename.top = new FormAttachment(wChefInput,margin); wFilename.setLayoutData(fdFilename); wlFilemask=new Label(wFileComp, SWT.RIGHT); wlFilemask.setText(Messages.getString("TextFileInputDialog.Filemask.Label")); props.setLook(wlFilemask); fdlFilemask=new FormData(); fdlFilemask.left = new FormAttachment(0, 0); fdlFilemask.top = new FormAttachment(wFilename, margin); fdlFilemask.right= new FormAttachment(middle, -margin); wlFilemask.setLayoutData(fdlFilemask); wFilemask=new Text(wFileComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER); props.setLook(wFilemask); wFilemask.addModifyListener(lsMod); fdFilemask=new FormData(); fdFilemask.left = new FormAttachment(middle, 0); fdFilemask.top = new FormAttachment(wFilename, margin); fdFilemask.right= new FormAttachment(100, 0); wFilemask.setLayoutData(fdFilemask); // Whenever something changes, set the tooltip to the expanded version of the filename: wFilename.addModifyListener(getModifyListenerTooltipText(wFilename)); // Listen to the Variable... button wbvFilename.addSelectionListener(VariableButtonListenerFactory.getSelectionAdapter(shell, wFilename)); // Filename list line wlFilenameList=new Label(wFileComp, SWT.RIGHT); wlFilenameList.setText(Messages.getString("TextFileInputDialog.FilenameList.Label")); props.setLook(wlFilenameList); fdlFilenameList=new FormData(); fdlFilenameList.left = new FormAttachment(0, 0); fdlFilenameList.top = new FormAttachment(wFilemask, margin); fdlFilenameList.right= new FormAttachment(middle, -margin); wlFilenameList.setLayoutData(fdlFilenameList); // Buttons to the right of the screen... wbdFilename=new Button(wFileComp, SWT.PUSH| SWT.CENTER); props.setLook(wbdFilename); wbdFilename.setText(Messages.getString("TextFileInputDialog.FilenameDelete.Button")); wbdFilename.setToolTipText(Messages.getString("TextFileInputDialog.FilenameDelete.Tooltip")); fdbdFilename=new FormData(); fdbdFilename.right = new FormAttachment(100, 0); fdbdFilename.top = new FormAttachment (wFilemask, 40); wbdFilename.setLayoutData(fdbdFilename); wbeFilename=new Button(wFileComp, SWT.PUSH| SWT.CENTER); props.setLook(wbeFilename); wbeFilename.setText(Messages.getString("TextFileInputDialog.FilenameEdit.Button")); wbeFilename.setToolTipText(Messages.getString("TextFileInputDialog.FilenameEdit.Tooltip")); fdbeFilename=new FormData(); fdbeFilename.right = new FormAttachment(100, 0); fdbeFilename.top = new FormAttachment (wbdFilename, margin); wbeFilename.setLayoutData(fdbeFilename); wbShowFiles=new Button(wFileComp, SWT.PUSH| SWT.CENTER); props.setLook(wbShowFiles); wbShowFiles.setText(Messages.getString("TextFileInputDialog.ShowFiles.Button")); fdbShowFiles=new FormData(); fdbShowFiles.left = new FormAttachment(middle, 0); fdbShowFiles.bottom = new FormAttachment(100, 0); wbShowFiles.setLayoutData(fdbShowFiles); wFirst=new Button(wFileComp, SWT.PUSH); wFirst.setText(Messages.getString("TextFileInputDialog.First.Button")); fdFirst=new FormData(); fdFirst.left=new FormAttachment(wbShowFiles, margin*2); fdFirst.bottom =new FormAttachment(100, 0); wFirst.setLayoutData(fdFirst); wFirstHeader=new Button(wFileComp, SWT.PUSH); wFirstHeader.setText(Messages.getString("TextFileInputDialog.FirstHeader.Button")); fdFirstHeader=new FormData(); fdFirstHeader.left=new FormAttachment(wFirst, margin*2); fdFirstHeader.bottom =new FormAttachment(100, 0); wFirstHeader.setLayoutData(fdFirstHeader); ColumnInfo[] colinfo=new ColumnInfo[3]; colinfo[ 0]=new ColumnInfo(Messages.getString("TextFileInputDialog.FileDirColumn.Column"), ColumnInfo.COLUMN_TYPE_TEXT, false); colinfo[ 1]=new ColumnInfo(Messages.getString("TextFileInputDialog.WildcardColumn.Column"), ColumnInfo.COLUMN_TYPE_TEXT, false ); colinfo[ 1].setToolTip(Messages.getString("TextFileInputDialog.RegExpColumn.Column")); colinfo[ 2]=new ColumnInfo(Messages.getString("TextFileInputDialog.RequiredColumn.Column"), ColumnInfo.COLUMN_TYPE_CCOMBO, YES_NO_COMBO ); colinfo[ 2].setToolTip(Messages.getString("TextFileInputDialog.RequiredColumn.Tooltip")); wFilenameList = new TableView(wFileComp, SWT.FULL_SELECTION | SWT.SINGLE | SWT.BORDER, colinfo, 3, lsMod, props ); props.setLook(wFilenameList); fdFilenameList=new FormData(); fdFilenameList.left = new FormAttachment(middle, 0); fdFilenameList.right = new FormAttachment(wbdFilename, -margin); fdFilenameList.top = new FormAttachment(wFilemask, margin); fdFilenameList.bottom = new FormAttachment(wbShowFiles, -margin); wFilenameList.setLayoutData(fdFilenameList); fdFileComp=new FormData(); fdFileComp.left = new FormAttachment(0, 0); fdFileComp.top = new FormAttachment(0, 0); fdFileComp.right = new FormAttachment(100, 0); fdFileComp.bottom= new FormAttachment(100, 0); wFileComp.setLayoutData(fdFileComp); wFileComp.layout(); wFileTab.setControl(wFileComp); ///////////////////////////////////////////////////////////// /// END OF FILE TAB ///////////////////////////////////////////////////////////// addContentTab(); addErrorTab(); addFiltersTabs(); addFieldsTabs(); fdTabFolder = new FormData(); fdTabFolder.left = new FormAttachment(0, 0); fdTabFolder.top = new FormAttachment(wStepname, margin); fdTabFolder.right = new FormAttachment(100, 0); fdTabFolder.bottom= new FormAttachment(100, -50); wTabFolder.setLayoutData(fdTabFolder); wOK=new Button(shell, SWT.PUSH); wOK.setText(Messages.getString("System.Button.OK")); wPreview=new Button(shell, SWT.PUSH); wPreview.setText(Messages.getString("TextFileInputDialog.Preview.Button")); wCancel=new Button(shell, SWT.PUSH); wCancel.setText(Messages.getString("System.Button.Cancel")); setButtonPositions(new Button[] { wOK, wPreview, wCancel }, margin, wTabFolder); // Add listeners lsOK = new Listener() { public void handleEvent(Event e) { ok(); } }; lsFirst = new Listener() { public void handleEvent(Event e) { first(false); } }; lsFirstHeader = new Listener() { public void handleEvent(Event e) { first(true); } }; lsGet = new Listener() { public void handleEvent(Event e) { get(); } }; lsPreview = new Listener() { public void handleEvent(Event e) { preview(); } }; lsCancel = new Listener() { public void handleEvent(Event e) { cancel(); } }; wOK.addListener (SWT.Selection, lsOK ); wFirst.addListener (SWT.Selection, lsFirst ); wFirstHeader.addListener (SWT.Selection, lsFirstHeader ); wGet.addListener (SWT.Selection, lsGet ); wPreview.addListener (SWT.Selection, lsPreview ); wCancel.addListener (SWT.Selection, lsCancel ); lsDef=new SelectionAdapter() { public void widgetDefaultSelected(SelectionEvent e) { ok(); } }; wChefInput.addSelectionListener( lsDef ); wStepname.addSelectionListener( lsDef ); // wFilename.addSelectionListener( lsDef ); wSeparator.addSelectionListener( lsDef ); wLimit.addSelectionListener( lsDef ); wInclRownumField.addSelectionListener( lsDef ); wInclFilenameField.addSelectionListener( lsDef ); wNrHeader.addSelectionListener( lsDef ); wNrFooter.addSelectionListener( lsDef ); wNrWraps.addSelectionListener( lsDef ); wWarnDestDir.addSelectionListener( lsDef ); wWarnExt.addSelectionListener( lsDef ); wErrorDestDir.addSelectionListener( lsDef ); wErrorExt.addSelectionListener( lsDef ); wLineNrDestDir.addSelectionListener( lsDef ); wLineNrExt.addSelectionListener( lsDef ); // Add the file to the list of files... SelectionAdapter selA = new SelectionAdapter() { public void widgetSelected(SelectionEvent arg0) { wFilenameList.add(new String[] { wFilename.getText(), wFilemask.getText() } ); wFilename.setText(""); wFilemask.setText(""); wFilenameList.removeEmptyRows(); wFilenameList.setRowNums(); wFilenameList.optWidth(true); } }; wbaFilename.addSelectionListener(selA); wFilename.addSelectionListener(selA); // Delete files from the list of files... wbdFilename.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent arg0) { int idx[] = wFilenameList.getSelectionIndices(); wFilenameList.remove(idx); wFilenameList.removeEmptyRows(); wFilenameList.setRowNums(); } }); // Edit the selected file & remove from the list... wbeFilename.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent arg0) { int idx = wFilenameList.getSelectionIndex(); if (idx>=0) { String string[] = wFilenameList.getItem(idx); wFilename.setText(string[0]); wFilemask.setText(string[1]); wFilenameList.remove(idx); } wFilenameList.removeEmptyRows(); wFilenameList.setRowNums(); } }); // Show the files that are selected at this time... wbShowFiles.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { TextFileInputMeta tfii = new TextFileInputMeta(); getInfo(tfii); String files[] = tfii.getFilePaths(); if (files!=null && files.length>0) { EnterSelectionDialog esd = new EnterSelectionDialog(shell, props, files, "Files read", "Files read:"); esd.setViewOnly(); esd.open(); } else { MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage(Messages.getString("TextFileInputDialog.NoFilesFound.DialogMessage")); mb.setText(Messages.getString("System.Dialog.Error.Title")); mb.open(); } } } ); // Allow the insertion of tabs as separator... wbSeparator.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent se) { wSeparator.insert("\t"); } } ); SelectionAdapter lsFlags = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { setFlags(); } }; // Enable/disable the right fields... wInclFilename.addSelectionListener( lsFlags ); wInclRownum.addSelectionListener( lsFlags ); wErrorIgnored.addSelectionListener(lsFlags); wHeader.addSelectionListener(lsFlags); wFooter.addSelectionListener(lsFlags); wWraps.addSelectionListener(lsFlags); wLayoutPaged.addSelectionListener(lsFlags); // Listen to the Browse... button wbbFilename.addSelectionListener ( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if (wFilemask.getText()!=null && wFilemask.getText().length()>0) // A mask: a directory! { DirectoryDialog dialog = new DirectoryDialog(shell, SWT.OPEN); if (wFilename.getText()!=null) { String fpath = StringUtil.environmentSubstitute(wFilename.getText()); dialog.setFilterPath( fpath ); } if (dialog.open()!=null) { String str= dialog.getFilterPath(); wFilename.setText(str); } } else { FileDialog dialog = new FileDialog(shell, SWT.OPEN); if (wZipped.getSelection()) { dialog.setFilterExtensions(new String[] {"*.zip", "*.txt;*.csv", "*.csv", "*.txt", "*"}); } else { dialog.setFilterExtensions(new String[] {"*.txt;*.csv", "*.csv", "*.txt", "*"}); } if (wFilename.getText()!=null) { String fname = StringUtil.environmentSubstitute(wFilename.getText()); dialog.setFileName( fname ); } if (wZipped.getSelection()) { dialog.setFilterNames(new String[] {Messages.getString("System.FileType.ZipFiles"), Messages.getString("TextFileInputDialog.FileType.TextAndCSVFiles"), Messages.getString("System.FileType.CSVFiles"), Messages.getString("System.FileType.TextFiles"), Messages.getString("System.FileType.AllFiles")}); } else { dialog.setFilterNames(new String[] {Messages.getString("TextFileInputDialog.FileType.TextAndCSVFiles"), Messages.getString("System.FileType.CSVFiles"), Messages.getString("System.FileType.TextFiles"), Messages.getString("System.FileType.AllFiles")}); } if (dialog.open()!=null) { String str = dialog.getFilterPath()+System.getProperty("file.separator")+dialog.getFileName(); wFilename.setText(str); } } } } ); // Detect X or ALT-F4 or something that kills this window... shell.addShellListener( new ShellAdapter() { public void shellClosed(ShellEvent e) { cancel(); } } ); wTabFolder.setSelection(0); // Set the shell size, based upon previous time... getData(input); setSize(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } return stepname; }
|
9547 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9547/dec476e31491451da3a8cd348e87c60e7e36c715/TextFileInputDialog.java/buggy/src/be/ibridge/kettle/trans/step/textfileinput/TextFileInputDialog.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1696,
1435,
202,
95,
202,
202,
13220,
982,
273,
5089,
5621,
202,
202,
4236,
2562,
273,
982,
18,
588,
4236,
5621,
202,
202,
10304,
273,
394,
19433,
12,
2938,
16,
348,
8588,
18,
2565,
18683,
67,
6566,
49,
571,
348,
8588,
18,
862,
4574,
571,
348,
8588,
18,
6694,
571,
348,
8588,
18,
6236,
1769,
3196,
202,
9693,
18,
542,
9794,
12,
10304,
1769,
202,
202,
3251,
1739,
273,
394,
9518,
2223,
1435,
3196,
202,
95,
1082,
202,
482,
918,
5612,
1528,
12,
11047,
1133,
425,
13,
1875,
202,
95,
9506,
202,
2630,
18,
542,
5033,
5621,
1082,
202,
97,
202,
202,
20451,
202,
202,
6703,
540,
273,
810,
18,
5332,
5033,
5621,
9506,
202,
1204,
3744,
646,
3744,
273,
394,
2748,
3744,
261,
1769,
202,
202,
687,
3744,
18,
10107,
2384,
225,
273,
9333,
18,
4983,
67,
19772,
7702,
31,
202,
202,
687,
3744,
18,
10107,
2686,
273,
9333,
18,
4983,
67,
19772,
7702,
31,
202,
202,
10304,
18,
542,
3744,
12,
687,
3744,
1769,
202,
202,
10304,
18,
542,
1528,
12,
5058,
18,
588,
780,
2932,
1528,
812,
1210,
6353,
18,
6353,
4247,
7923,
1769,
9506,
202,
18661,
273,
3458,
18,
588,
21924,
52,
299,
5621,
202,
202,
10107,
273,
9333,
18,
19772,
7702,
31,
202,
202,
759,
8693,
529,
980,
202,
202,
21504,
4160,
529,
33,
2704,
5287,
12,
10304,
16,
348,
8588,
18,
11847,
1769,
202,
202,
21504,
4160,
529,
18,
542,
1528,
12,
5058,
18,
588,
780,
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,
225,
202,
482,
514,
1696,
1435,
202,
95,
202,
202,
13220,
982,
273,
5089,
5621,
202,
202,
4236,
2562,
273,
982,
18,
588,
4236,
5621,
202,
202,
10304,
273,
394,
19433,
12,
2938,
16,
348,
8588,
18,
2565,
18683,
67,
6566,
49,
571,
348,
8588,
18,
862,
4574,
571,
348,
8588,
18,
6694,
571,
348,
8588,
18,
6236,
1769,
3196,
202,
9693,
18,
542,
9794,
12,
10304,
1769,
202,
202,
3251,
1739,
273,
394,
9518,
2223,
1435,
3196,
202,
95,
1082,
202,
482,
918,
5612,
1528,
12,
11047,
1133,
425,
13,
1875,
202,
95,
9506,
202,
2630,
18,
542,
5033,
5621,
1082,
202,
97,
202,
202,
20451,
202,
202,
6703,
540,
273,
810,
18,
5332,
5033,
5621,
9506,
202,
2
] |
{
|
{
|
public final boolean checkFit( IDisplayServer xs, Label la, int iLabelLocation ) throws ChartException { if ( iType == TEXT || bCategoryScale ) // !MUST IGNORE the label visibility here.Don't check it! // || !la.isSetVisible( ) // || ( la.isSetVisible( ) && !la.isVisible( ) ) ) { return true; } final double dAngleInDegrees = la.getCaption( ) .getFont( ) .getRotation( ); double x = 0, y = 0; int iPointToCheck = 0; if ( iLabelLocation == ABOVE || iLabelLocation == BELOW ) { if ( iScaleDirection == BACKWARD ) { iPointToCheck = ( dAngleInDegrees < 0 && dAngleInDegrees > -90 ) ? 1 : 2; } else { iPointToCheck = ( dAngleInDegrees < 0 && dAngleInDegrees > -90 ) ? 3 : 0; } } else if ( iLabelLocation == LEFT || iLabelLocation == RIGHT ) { if ( iScaleDirection == FORWARD ) { iPointToCheck = ( dAngleInDegrees < 0 && dAngleInDegrees > -90 ) ? 0 : 1; } else { iPointToCheck = ( dAngleInDegrees < 0 && dAngleInDegrees > -90 ) ? 2 : 3; } } double[] da = daTickCoordinates; RotatedRectangle rrPrev = null, rrPrev2 = null, rr; if ( ( iType & ( NUMERICAL | LINEAR ) ) == ( NUMERICAL | LINEAR ) ) { double dAxisValue = asDouble( getMinimum( ) ).doubleValue( ); final double dAxisStep = asDouble( getStep( ) ).doubleValue( ); String sText; DecimalFormat df = null; if ( fs == null ) // CREATE IF FORMAT SPECIFIER IS UNDEFINED { df = new DecimalFormat( getNumericPattern( ) ); } final NumberDataElement nde = NumberDataElementImpl.create( 0 ); for ( int i = 0; i < da.length; i++ ) { // TODO special logic for last datapoint in non-equal scale unit // case. nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, fs, rtc.getULocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = NULL_STRING; } if ( iLabelLocation == ABOVE || iLabelLocation == BELOW ) { x = da[i]; } else if ( iLabelLocation == LEFT || iLabelLocation == RIGHT ) { y = da[i]; } la.getCaption( ).setValue( sText ); try { rr = computePolygon( xs, iLabelLocation, la, x, y ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, uiex ); } Point p = rr.getPoint( iPointToCheck ); if ( isAxisLabelStaggered( ) && baTickLabelStaggered[i] ) { if ( rrPrev2 != null && ( rrPrev2.contains( p ) || rrPrev2.getPoint( iPointToCheck ) .equals( p ) || ChartUtil.intersects( rr, rrPrev2 ) ) ) { return false; } rrPrev2 = rr; } else { if ( rrPrev != null && ( rrPrev.contains( p ) || rrPrev.getPoint( iPointToCheck ) .equals( p ) || ChartUtil.intersects( rr, rrPrev ) ) ) { return false; } rrPrev = rr; } dAxisValue += dAxisStep; } } else if ( ( iType & ( NUMERICAL | LOGARITHMIC ) ) == ( NUMERICAL | LOGARITHMIC ) ) { double dAxisValue = asDouble( getMinimum( ) ).doubleValue( ); final double dAxisStep = asDouble( getStep( ) ).doubleValue( ); String sText; NumberDataElement nde = NumberDataElementImpl.create( 0 ); DecimalFormat df = null; for ( int i = 0; i < da.length; i++ ) { nde.setValue( dAxisValue ); if ( fs == null ) { df = new DecimalFormat( getNumericPattern( dAxisValue ) ); } try { sText = ValueFormatter.format( nde, fs, rtc.getULocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = NULL_STRING; } if ( iLabelLocation == ABOVE || iLabelLocation == BELOW ) { x = da[i]; } else if ( iLabelLocation == LEFT || iLabelLocation == RIGHT ) { y = da[i]; } la.getCaption( ).setValue( sText ); try { rr = computePolygon( xs, iLabelLocation, la, x, y ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, uiex ); } Point p = rr.getPoint( iPointToCheck ); if ( isAxisLabelStaggered( ) && baTickLabelStaggered[i] ) { if ( rrPrev2 != null && ( rrPrev2.contains( p ) || rrPrev2.getPoint( iPointToCheck ) .equals( p ) || ChartUtil.intersects( rr, rrPrev2 ) ) ) { return false; } rrPrev2 = rr; } else { if ( rrPrev != null && ( rrPrev.contains( p ) || rrPrev.getPoint( iPointToCheck ) .equals( p ) ) ) { return false; } rrPrev = rr; } dAxisValue *= dAxisStep; } } else if ( iType == DATE_TIME ) { CDateTime cdt, cdtAxisValue = asDateTime( oMinimum ); final int iUnit = asInteger( oUnit ); final int iStep = asInteger( oStep ); final IDateFormatWrapper sdf = DateFormatWrapperFactory.getPreferredDateFormat( iUnit, rtc.getULocale( ) ); String sText; cdt = cdtAxisValue; for ( int i = 0; i < da.length; i++ ) { sText = sdf.format( cdt.getTime( ) ); if ( iLabelLocation == ABOVE || iLabelLocation == BELOW ) x = da[i]; else if ( iLabelLocation == LEFT || iLabelLocation == RIGHT ) y = da[i]; la.getCaption( ).setValue( sText ); try { rr = computePolygon( xs, iLabelLocation, la, x, y ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, uiex ); } Point p = rr.getPoint( iPointToCheck ); if ( isAxisLabelStaggered( ) && baTickLabelStaggered[i] ) { if ( rrPrev2 != null && ( rrPrev2.contains( p ) || rrPrev2.getPoint( iPointToCheck ) .equals( p ) || ChartUtil.intersects( rr, rrPrev2 ) ) ) { return false; } rrPrev2 = rr; } else { if ( rrPrev != null && ( rrPrev.contains( p ) || rrPrev.getPoint( iPointToCheck ) .equals( p ) ) ) { return false; } rrPrev = rr; } cdt = cdtAxisValue.forward( iUnit, iStep * ( i + 1 ) ); // ALWAYS // W.R.T // START // VALUE } } return true; }
|
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/088a907c90518d3b343babbab14770d00e175c7b/AutoScale.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/withaxes/AutoScale.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
1250,
866,
14219,
12,
1599,
291,
1601,
2081,
9280,
16,
5287,
7125,
16,
1082,
202,
474,
277,
2224,
2735,
262,
1216,
14804,
503,
202,
95,
202,
202,
430,
261,
277,
559,
422,
9204,
747,
324,
4457,
5587,
262,
202,
202,
759,
401,
49,
5996,
14919,
326,
1433,
9478,
2674,
18,
22293,
1404,
866,
518,
5,
202,
202,
759,
747,
401,
11821,
18,
291,
694,
6207,
12,
262,
202,
202,
759,
747,
261,
7125,
18,
291,
694,
6207,
12,
262,
597,
401,
11821,
18,
291,
6207,
12,
262,
262,
262,
202,
202,
95,
1082,
202,
2463,
638,
31,
202,
202,
97,
202,
202,
6385,
1645,
302,
8467,
382,
24400,
273,
7125,
18,
588,
21158,
12,
262,
9506,
202,
18,
588,
5711,
12,
262,
9506,
202,
18,
588,
14032,
12,
11272,
202,
202,
9056,
619,
273,
374,
16,
677,
273,
374,
31,
202,
202,
474,
277,
2148,
18126,
273,
374,
31,
202,
202,
430,
261,
277,
2224,
2735,
422,
432,
5315,
3412,
747,
277,
2224,
2735,
422,
9722,
4130,
262,
202,
202,
95,
1082,
202,
430,
261,
277,
5587,
8212,
422,
15842,
21343,
262,
1082,
202,
95,
9506,
202,
77,
2148,
18126,
273,
261,
302,
8467,
382,
24400,
411,
374,
597,
302,
8467,
382,
24400,
405,
300,
9349,
262,
692,
404,
25083,
202,
30,
576,
31,
1082,
202,
97,
1082,
202,
12107,
1082,
202,
95,
9506,
202,
77,
2148,
18126,
273,
261,
302,
8467,
382,
24400,
411,
374,
597,
302,
8467,
382,
24400,
405,
300,
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,
1250,
866,
14219,
12,
1599,
291,
1601,
2081,
9280,
16,
5287,
7125,
16,
1082,
202,
474,
277,
2224,
2735,
262,
1216,
14804,
503,
202,
95,
202,
202,
430,
261,
277,
559,
422,
9204,
747,
324,
4457,
5587,
262,
202,
202,
759,
401,
49,
5996,
14919,
326,
1433,
9478,
2674,
18,
22293,
1404,
866,
518,
5,
202,
202,
759,
747,
401,
11821,
18,
291,
694,
6207,
12,
262,
202,
202,
759,
747,
261,
7125,
18,
291,
694,
6207,
12,
262,
597,
401,
11821,
18,
291,
6207,
12,
262,
262,
262,
202,
202,
95,
1082,
202,
2463,
638,
31,
202,
202,
97,
202,
202,
6385,
1645,
302,
8467,
382,
24400,
273,
7125,
18,
588,
21158,
12,
262,
2
] |
+ File.separator + "filename",
|
+ File.separator,
|
public void testCreateCommandline() { SCPPublisher publisher = new SCPPublisher(); publisher.setSourceUser("user1"); publisher.setSourceHost("host1"); publisher.setTargetUser("user2"); publisher.setTargetHost("host2"); assertEquals( "scp -S ssh user1@host1:." + File.separator + "filename " + "user2@host2:." + File.separator + "filename", publisher.createCommandline("filename").toString()); publisher.setOptions("-P 1000"); assertEquals( "scp -P 1000 -S ssh user1@host1:." + File.separator + "filename " + "user2@host2:." + File.separator + "filename", publisher.createCommandline("filename").toString()); publisher.setSSH("plink"); assertEquals( "scp -P 1000 -S plink user1@host1:." + File.separator + "filename " + "user2@host2:." + File.separator + "filename", publisher.createCommandline("filename").toString()); publisher.setTargetDir(File.separator + "home" + File.separator + "httpd"); assertEquals( "scp -P 1000 -S plink user1@host1:." + File.separator + "filename " + "user2@host2:" + File.separator + "home" + File.separator + "httpd" + File.separator + "filename", publisher.createCommandline("filename").toString()); }
|
55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/e60d6d5b458aff56f311d52b88852f98c9765d44/SCPPublisherTest.java/clean/main/test/net/sourceforge/cruisecontrol/publishers/SCPPublisherTest.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1684,
2189,
1369,
1435,
288,
3639,
348,
4258,
15960,
12855,
273,
394,
348,
4258,
15960,
5621,
3639,
12855,
18,
542,
1830,
1299,
2932,
1355,
21,
8863,
3639,
12855,
18,
542,
1830,
2594,
2932,
2564,
21,
8863,
3639,
12855,
18,
542,
2326,
1299,
2932,
1355,
22,
8863,
3639,
12855,
18,
542,
2326,
2594,
2932,
2564,
22,
8863,
3639,
1815,
8867,
12,
5411,
315,
18461,
300,
55,
7056,
729,
21,
36,
2564,
21,
30,
1199,
7734,
397,
1387,
18,
11287,
7734,
397,
315,
3459,
315,
7734,
397,
315,
1355,
22,
36,
2564,
22,
30,
1199,
7734,
397,
1387,
18,
11287,
7734,
397,
315,
3459,
3113,
5411,
12855,
18,
2640,
2189,
1369,
2932,
3459,
20387,
10492,
10663,
3639,
12855,
18,
542,
1320,
2932,
17,
52,
4336,
8863,
3639,
1815,
8867,
12,
5411,
315,
18461,
300,
52,
4336,
300,
55,
7056,
729,
21,
36,
2564,
21,
30,
1199,
7734,
397,
1387,
18,
11287,
7734,
397,
315,
3459,
315,
7734,
397,
315,
1355,
22,
36,
2564,
22,
30,
1199,
7734,
397,
1387,
18,
11287,
7734,
397,
315,
3459,
3113,
5411,
12855,
18,
2640,
2189,
1369,
2932,
3459,
20387,
10492,
10663,
3639,
12855,
18,
542,
12559,
2932,
20157,
8863,
3639,
1815,
8867,
12,
5411,
315,
18461,
300,
52,
4336,
300,
55,
886,
754,
729,
21,
36,
2564,
21,
30,
1199,
7734,
397,
1387,
18,
11287,
7734,
397,
315,
3459,
315,
7734,
397,
315,
1355,
22,
36,
2564,
22,
30,
1199,
7734,
397,
1387,
18,
11287,
7734,
397,
315,
3459,
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,
1842,
1684,
2189,
1369,
1435,
288,
3639,
348,
4258,
15960,
12855,
273,
394,
348,
4258,
15960,
5621,
3639,
12855,
18,
542,
1830,
1299,
2932,
1355,
21,
8863,
3639,
12855,
18,
542,
1830,
2594,
2932,
2564,
21,
8863,
3639,
12855,
18,
542,
2326,
1299,
2932,
1355,
22,
8863,
3639,
12855,
18,
542,
2326,
2594,
2932,
2564,
22,
8863,
3639,
1815,
8867,
12,
5411,
315,
18461,
300,
55,
7056,
729,
21,
36,
2564,
21,
30,
1199,
7734,
397,
1387,
18,
11287,
7734,
397,
315,
3459,
315,
7734,
397,
315,
1355,
22,
36,
2564,
22,
30,
1199,
7734,
397,
1387,
18,
11287,
7734,
397,
315,
3459,
3113,
5411,
12855,
18,
2640,
2189,
1369,
2932,
3459,
20387,
10492,
10663,
3639,
2
] |
|| cmpDropDown.isDisposed( ) || !cmpDropDown.isVisible( ) )
|
|| cmpDropDown.isDisposed( ) || !cmpDropDown.isVisible( ) )
|
private void toggleDropDown( ) { // fix for lInux, since it not send the event correctly to other than // current shell. if ( bJustFocusLost ) { bJustFocusLost = false; return; } if ( cmpDropDown == null || cmpDropDown.isDisposed( ) || !cmpDropDown.isVisible( ) ) { Point pLoc = UIHelper.getScreenLocation( cnvSelection ); createDropDownComponent( pLoc.x, pLoc.y + cnvSelection.getSize( ).y + 1 ); } else { cmpDropDown.getShell( ).dispose( ); } }
|
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/1e765209f86d9978abab00aed01a2ba0a783081a/FillChooserComposite.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/FillChooserComposite.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
10486,
7544,
4164,
12,
262,
202,
95,
202,
202,
759,
2917,
364,
328,
382,
2616,
16,
3241,
518,
486,
1366,
326,
871,
8783,
358,
1308,
2353,
202,
202,
759,
783,
5972,
18,
202,
202,
430,
261,
324,
19642,
9233,
19024,
262,
202,
202,
95,
1082,
202,
70,
19642,
9233,
19024,
273,
629,
31,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
430,
261,
9411,
7544,
4164,
422,
446,
9506,
202,
20081,
9411,
7544,
4164,
18,
291,
1669,
7423,
12,
262,
9506,
202,
20081,
401,
9625,
7544,
4164,
18,
291,
6207,
12,
262,
262,
202,
202,
95,
1082,
202,
2148,
293,
1333,
273,
6484,
2276,
18,
588,
7956,
2735,
12,
6227,
90,
6233,
11272,
1082,
202,
2640,
7544,
4164,
1841,
12,
293,
1333,
18,
92,
16,
293,
1333,
18,
93,
6862,
202,
15,
6227,
90,
6233,
18,
588,
1225,
12,
262,
18,
93,
6862,
202,
15,
404,
11272,
202,
202,
97,
202,
202,
12107,
202,
202,
95,
1082,
202,
9625,
7544,
4164,
18,
588,
13220,
12,
262,
18,
2251,
4150,
12,
11272,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
10486,
7544,
4164,
12,
262,
202,
95,
202,
202,
759,
2917,
364,
328,
382,
2616,
16,
3241,
518,
486,
1366,
326,
871,
8783,
358,
1308,
2353,
202,
202,
759,
783,
5972,
18,
202,
202,
430,
261,
324,
19642,
9233,
19024,
262,
202,
202,
95,
1082,
202,
70,
19642,
9233,
19024,
273,
629,
31,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
430,
261,
9411,
7544,
4164,
422,
446,
9506,
202,
20081,
9411,
7544,
4164,
18,
291,
1669,
7423,
12,
262,
9506,
202,
20081,
401,
9625,
7544,
4164,
18,
291,
6207,
12,
262,
262,
202,
202,
95,
1082,
202,
2148,
293,
1333,
273,
6484,
2276,
18,
588,
7956,
2735,
12,
6227,
90,
6233,
11272,
1082,
2
] |
private void update(IWorkbenchPart part) { if(part==null) return; boolean oldAllowed = acceleratorsAllowed; AcceleratorScope oldScope = null; if(activeService != null) oldScope = activeService.getActiveAcceleratorScope(); IWorkbenchPartSite site = part.getSite(); WorkbenchWindow w = (WorkbenchWindow)site.getPage().getWorkbenchWindow(); MenuManager menuManager = w.getMenuManager(); if(part instanceof IViewPart) { activeService = null; acceleratorsAllowed = true; } else if(part instanceof IEditorPart) { activeService = (KeyBindingService)((IEditorSite)site).getKeyBindingService(); AcceleratorConfiguration config = ((Workbench)w.getWorkbench()).getActiveAcceleratorConfiguration(); if((config != null) && (!config.getId().equals(IWorkbenchConstants.DEFAULT_ACCELERATOR_CONFIGURATION_ID))) acceleratorsAllowed = !activeService.isParticipating(); else acceleratorsAllowed = true; } AcceleratorScope newScope = null; if(activeService != null) newScope = activeService.getActiveAcceleratorScope(); if((oldAllowed != acceleratorsAllowed) || (oldScope != newScope)) menuManager.update(IAction.TEXT); }
|
public void update(KeyBindingService service) { IWorkbenchPart part = window.getActivePage().getActivePart(); if(part instanceof IEditorPart) { KeyBindingService currServ = (KeyBindingService)((IEditorPart)part).getEditorSite().getKeyBindingService(); if(currServ == service) update(part); } }
|
private void update(IWorkbenchPart part) { if(part==null) return; boolean oldAllowed = acceleratorsAllowed; AcceleratorScope oldScope = null; if(activeService != null) oldScope = activeService.getActiveAcceleratorScope(); IWorkbenchPartSite site = part.getSite(); WorkbenchWindow w = (WorkbenchWindow)site.getPage().getWorkbenchWindow(); MenuManager menuManager = w.getMenuManager(); if(part instanceof IViewPart) { activeService = null; acceleratorsAllowed = true; } else if(part instanceof IEditorPart) { activeService = (KeyBindingService)((IEditorSite)site).getKeyBindingService(); AcceleratorConfiguration config = ((Workbench)w.getWorkbench()).getActiveAcceleratorConfiguration(); if((config != null) && (!config.getId().equals(IWorkbenchConstants.DEFAULT_ACCELERATOR_CONFIGURATION_ID))) acceleratorsAllowed = !activeService.isParticipating(); else acceleratorsAllowed = true; } AcceleratorScope newScope = null; if(activeService != null) newScope = activeService.getActiveAcceleratorScope(); if((oldAllowed != acceleratorsAllowed) || (oldScope != newScope)) menuManager.update(IAction.TEXT); }
|
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/8f924e8065409b3a973064e44bb330f5e6695e3f/WWinKeyBindingService.java/buggy/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/WWinKeyBindingService.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
202,
1152,
918,
1089,
12,
45,
2421,
22144,
1988,
1087,
13,
288,
565,
202,
202,
430,
12,
2680,
631,
2011,
13,
565,
1082,
202,
2463,
31,
565,
202,
202,
6494,
1592,
5042,
273,
15153,
264,
3062,
5042,
31,
565,
202,
202,
28417,
3876,
1592,
3876,
273,
446,
31,
565,
202,
202,
430,
12,
3535,
1179,
480,
446,
13,
565,
1082,
202,
1673,
3876,
273,
2695,
1179,
18,
588,
3896,
28417,
3876,
5621,
565,
9506,
377,
202,
45,
2421,
22144,
1988,
4956,
2834,
273,
1087,
18,
588,
4956,
5621,
377,
202,
2421,
22144,
3829,
341,
273,
261,
2421,
22144,
3829,
13,
4256,
18,
588,
1964,
7675,
588,
2421,
22144,
3829,
5621,
377,
202,
4599,
1318,
3824,
1318,
273,
341,
18,
588,
4599,
1318,
5621,
377,
202,
430,
12,
2680,
1276,
467,
1767,
1988,
13,
288,
377,
202,
202,
3535,
1179,
273,
446,
31,
377,
202,
202,
8981,
22990,
3062,
5042,
273,
638,
31,
377,
202,
97,
469,
309,
12,
2680,
1276,
467,
6946,
1988,
13,
288,
377,
202,
202,
3535,
1179,
273,
261,
653,
5250,
1179,
13,
12443,
45,
6946,
4956,
13,
4256,
2934,
588,
653,
5250,
1179,
5621,
377,
202,
202,
28417,
1750,
642,
273,
14015,
2421,
22144,
13,
91,
18,
588,
2421,
22144,
1435,
2934,
588,
3896,
28417,
1750,
5621,
377,
202,
202,
430,
12443,
1425,
480,
446,
13,
597,
16051,
1425,
18,
26321,
7675,
14963,
12,
45,
2421,
22144,
2918,
18,
5280,
67,
31110,
14668,
3575,
67,
21200,
67,
734,
20349,
377,
1082,
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,
377,
202,
1152,
918,
1089,
12,
45,
2421,
22144,
1988,
1087,
13,
288,
565,
202,
202,
430,
12,
2680,
631,
2011,
13,
565,
1082,
202,
2463,
31,
565,
202,
202,
6494,
1592,
5042,
273,
15153,
264,
3062,
5042,
31,
565,
202,
202,
28417,
3876,
1592,
3876,
273,
446,
31,
565,
202,
202,
430,
12,
3535,
1179,
480,
446,
13,
565,
1082,
202,
1673,
3876,
273,
2695,
1179,
18,
588,
3896,
28417,
3876,
5621,
565,
9506,
377,
202,
45,
2421,
22144,
1988,
4956,
2834,
273,
1087,
18,
588,
4956,
5621,
377,
202,
2421,
22144,
3829,
341,
273,
261,
2421,
22144,
3829,
13,
4256,
18,
588,
1964,
7675,
588,
2421,
22144,
3829,
5621,
377,
202,
4599,
1318,
3824,
1318,
273,
341,
2
] |
if(building)
|
if(building) {
|
public MarkerCategory[] getCategories() { if(building)//Assume staleness while the list is being built. return null; return categories; }
|
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/MarkerAdapter.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerAdapter.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
14742,
4457,
8526,
1927,
4030,
1435,
288,
202,
202,
430,
12,
3510,
310,
13,
759,
2610,
2066,
384,
287,
15681,
1323,
326,
666,
353,
3832,
6650,
18,
1082,
202,
2463,
446,
31,
202,
202,
2463,
6477,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14742,
4457,
8526,
1927,
4030,
1435,
288,
202,
202,
430,
12,
3510,
310,
13,
759,
2610,
2066,
384,
287,
15681,
1323,
326,
666,
353,
3832,
6650,
18,
1082,
202,
2463,
446,
31,
202,
202,
2463,
6477,
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
] |
if (canCreateItem("potion", items)) { chkPotionAllowed.setSelected(true); } if (canCreateItem("ring", items)) { chkRingAllowed.setSelected(true); } if (canCreateItem("scroll", items)) { chkScrollAllowed.setSelected(true); } if (canCreateItem("wand", items)) { chkWandAllowed.setSelected(true); }
|
chkPotionAllowed.setSelected(canCreateItem("potion", items)); chkRingAllowed.setSelected(canCreateItem("ring", items)); chkScrollAllowed.setSelected(canCreateItem("scroll", items)); chkWandAllowed.setSelected(canCreateItem("wand", items));
|
public void updateView(PObject thisPObject) { Spell thisSpell = (Spell) thisPObject; pnlDescription.setText(thisSpell.getDescription()); // don't want PI here pnlDescription.setDescIsPI(thisSpell.getDescIsPI()); cmbComponents.setSelectedItem(thisSpell.getComponentList()); cmbCastingTime.setSelectedItem(thisSpell.getCastingTime()); cmbRange.setSelectedItem(thisSpell.getRange()); cmbTarget.setSelectedItem(thisSpell.getTarget()); cmbDuration.setSelectedItem(thisSpell.getDuration()); cmbSavingThrow.setSelectedItem(thisSpell.getSaveInfo()); cmbSpellRes.setSelectedItem(thisSpell.getSpellResistance()); cmbSchool.setSelectedItem(thisSpell.getSchool()); cmbSubschool.setSelectedItem(thisSpell.getSubschool()); //Populate the Descriptor field with comma-delimited list List descriptorList = thisSpell.getDescriptorList(); if(descriptorList.size() > 0) { StringBuffer descriptor = new StringBuffer(); for( Iterator it = descriptorList.iterator(); it.hasNext();) { descriptor.append(it.next()).append(","); } descriptor = descriptor.deleteCharAt(descriptor.length() - 1); txtDescriptor.setText(descriptor.toString()); } if (cmbSubschool.getSelectedIndex() < 0) { cmbSubschool.setSelectedIndex(0); } cmbStat.setSelectedItem(thisSpell.getStat()); txtCost.setValue(thisSpell.getCost().doubleValue()); txtXpCost.setValue(thisSpell.getXPCost()); final String items = thisSpell.getCreatableItem().toLowerCase(); if (canCreateItem("potion", items)) { chkPotionAllowed.setSelected(true); } if (canCreateItem("ring", items)) { chkRingAllowed.setSelected(true); } if (canCreateItem("scroll", items)) { chkScrollAllowed.setSelected(true); } if (canCreateItem("wand", items)) { chkWandAllowed.setSelected(true); } }
|
48301 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48301/7c2d97de094fa430597182e57645bd273ced5697/SpellBasePanel.java/buggy/code/src/java/pcgen/gui/editor/SpellBasePanel.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1089,
1767,
12,
52,
921,
333,
52,
921,
13,
202,
95,
202,
202,
3389,
1165,
333,
3389,
1165,
273,
261,
3389,
1165,
13,
333,
52,
921,
31,
202,
202,
7449,
80,
3291,
18,
542,
1528,
12,
2211,
3389,
1165,
18,
588,
3291,
10663,
368,
2727,
1404,
2545,
7024,
2674,
202,
202,
7449,
80,
3291,
18,
542,
4217,
2520,
1102,
12,
2211,
3389,
1165,
18,
588,
4217,
2520,
1102,
10663,
202,
202,
71,
1627,
7171,
18,
542,
7416,
1180,
12,
2211,
3389,
1165,
18,
588,
1841,
682,
10663,
202,
202,
71,
1627,
9735,
310,
950,
18,
542,
7416,
1180,
12,
2211,
3389,
1165,
18,
588,
9735,
310,
950,
10663,
202,
202,
71,
1627,
2655,
18,
542,
7416,
1180,
12,
2211,
3389,
1165,
18,
588,
2655,
10663,
202,
202,
71,
1627,
2326,
18,
542,
7416,
1180,
12,
2211,
3389,
1165,
18,
588,
2326,
10663,
202,
202,
71,
1627,
5326,
18,
542,
7416,
1180,
12,
2211,
3389,
1165,
18,
588,
5326,
10663,
202,
202,
71,
1627,
24660,
8282,
18,
542,
7416,
1180,
12,
2211,
3389,
1165,
18,
588,
4755,
966,
10663,
202,
202,
71,
1627,
3389,
1165,
607,
18,
542,
7416,
1180,
12,
2211,
3389,
1165,
18,
588,
3389,
1165,
607,
13145,
10663,
202,
202,
71,
1627,
55,
343,
1371,
18,
542,
7416,
1180,
12,
2211,
3389,
1165,
18,
588,
55,
343,
1371,
10663,
202,
202,
71,
1627,
26123,
343,
1371,
18,
542,
7416,
1180,
12,
2211,
3389,
1165,
18,
588,
26123,
343,
1371,
10663,
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,
918,
1089,
1767,
12,
52,
921,
333,
52,
921,
13,
202,
95,
202,
202,
3389,
1165,
333,
3389,
1165,
273,
261,
3389,
1165,
13,
333,
52,
921,
31,
202,
202,
7449,
80,
3291,
18,
542,
1528,
12,
2211,
3389,
1165,
18,
588,
3291,
10663,
368,
2727,
1404,
2545,
7024,
2674,
202,
202,
7449,
80,
3291,
18,
542,
4217,
2520,
1102,
12,
2211,
3389,
1165,
18,
588,
4217,
2520,
1102,
10663,
202,
202,
71,
1627,
7171,
18,
542,
7416,
1180,
12,
2211,
3389,
1165,
18,
588,
1841,
682,
10663,
202,
202,
71,
1627,
9735,
310,
950,
18,
542,
7416,
1180,
12,
2211,
3389,
1165,
18,
588,
9735,
310,
950,
10663,
202,
202,
71,
1627,
2655,
18,
542,
2
] |
public boolean postEvent(Event e) {
|
public boolean postEvent(Event e) {
|
public boolean postEvent(Event e) { // XXX Add backward compatibility handling. return false; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/Component.java/clean/core/src/classpath/java/java/awt/Component.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1603,
1133,
12,
1133,
425,
13,
288,
202,
202,
759,
11329,
1436,
12555,
8926,
5057,
18,
202,
202,
2463,
629,
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
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1603,
1133,
12,
1133,
425,
13,
288,
202,
202,
759,
11329,
1436,
12555,
8926,
5057,
18,
202,
202,
2463,
629,
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
] |
public void endElement(String uri, String name, String raw) throws SAXException { if ( !uri.equals(my_uri)) {
|
public void endElement(String uri, String name, String raw) throws SAXException { if (!uri.equals(my_uri)) {
|
public void endElement(String uri, String name, String raw) throws SAXException { if ( !uri.equals(my_uri)) { super.endElement(uri, name, raw); return; } if (this.getLogger().isDebugEnabled()) { getLogger().debug("RECEIVED END ELEMENT "+name+"("+uri+")"); } if (name.equals(LDAPTransformer.MAGIC_EXECUTE_QUERY)) { endExecuteQuery(); } else if (name.equals(LDAPTransformer.MAGIC_EXECUTE_INCREMENT)) { endExecuteIncrement(); } else if (name.equals(LDAPTransformer.MAGIC_INITIALIZER_ELEMENT)) { endInitializerElement(); } else if (name.equals(LDAPTransformer.MAGIC_AUTHENTICATION_ELEMENT)) { endAuthenticationElement(); } else if (name.equals(LDAPTransformer.MAGIC_SCOPE_ELEMENT)) { endScopeElement(); } else if (name.equals(LDAPTransformer.MAGIC_VERSION_ELEMENT)) { endVersionElement(); } else if (name.equals(LDAPTransformer.MAGIC_SERVERURL_ELEMENT)) { endServerurlElement(); } else if (name.equals(LDAPTransformer.MAGIC_PORT_ELEMENT)) { endPortElement(); } else if (name.equals(LDAPTransformer.MAGIC_DOC_ELEMENT)) { endDocElement(); } else if (name.equals(LDAPTransformer.MAGIC_ROW_ELEMENT)) { endRowElement(); } else if (name.equals(LDAPTransformer.MAGIC_ERROR_ELEMENT)) { endErrorElement(); } else if (name.equals(LDAPTransformer.MAGIC_SAX_ERROR)) { endSaxError(); } else if (name.equals(LDAPTransformer.MAGIC_ROOT_DN_ELEMENT)) { endRootDnElement(); } else if (name.equals(LDAPTransformer.MAGIC_PASSWORD_ELEMENT)) { endPasswordElement(); } else if (name.equals(LDAPTransformer.MAGIC_ATTRIBUTE_ELEMENT)) { endAttributeElement(); } else if (name.equals(LDAPTransformer.MAGIC_SHOW_ATTRIBUTE_ELEMENT)) { endShowAttributeElement(); } else if (name.equals(LDAPTransformer.MAGIC_SEARCHBASE_ELEMENT)) { endSearchbaseElement(); } else if (name.equals(LDAPTransformer.MAGIC_FILTER_ELEMENT)) { endFilterElement(); } else if (name.equals(LDAPTransformer.MAGIC_DEREF_LINK_ELEMENT)) { endDerefLinkElement(); } else if (name.equals(LDAPTransformer.MAGIC_COUNT_LIMIT_ELEMENT)) { endCountLimitElement(); } else if (name.equals(LDAPTransformer.MAGIC_TIME_LIMIT_ELEMENT)) { endTimeLimitElement(); } else if (name.equals(LDAPTransformer.MAGIC_DEBUG_ELEMENT)) { endDebugElement(); } }
|
46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/1581e769a869eecca67fa6eec33b342cac1cf145/LDAPTransformer.java/buggy/src/blocks/naming/java/org/apache/cocoon/transformation/LDAPTransformer.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
14840,
12,
780,
2003,
16,
514,
508,
16,
21821,
514,
1831,
13,
1216,
14366,
288,
3639,
309,
261,
401,
1650,
18,
14963,
12,
4811,
67,
1650,
3719,
288,
5411,
2240,
18,
409,
1046,
12,
1650,
16,
508,
16,
1831,
1769,
5411,
327,
31,
3639,
289,
3639,
309,
261,
2211,
18,
588,
3328,
7675,
291,
2829,
1526,
10756,
288,
5411,
7156,
7675,
4148,
2932,
27086,
20764,
7273,
13424,
13773,
529,
9078,
2932,
15,
1650,
9078,
2225,
1769,
3639,
289,
3639,
309,
261,
529,
18,
14963,
12,
15496,
8319,
18,
49,
22247,
67,
15271,
9099,
67,
10753,
3719,
288,
5411,
679,
5289,
1138,
5621,
3639,
289,
469,
309,
261,
529,
18,
14963,
12,
15496,
8319,
18,
49,
22247,
67,
15271,
9099,
67,
29836,
3719,
288,
5411,
679,
5289,
10798,
5621,
3639,
289,
469,
309,
261,
529,
18,
14963,
12,
15496,
8319,
18,
49,
22247,
67,
12919,
15154,
654,
67,
10976,
3719,
288,
5411,
679,
14729,
1046,
5621,
3639,
289,
469,
309,
261,
529,
18,
14963,
12,
15496,
8319,
18,
49,
22247,
67,
25114,
2689,
67,
10976,
3719,
288,
5411,
679,
6492,
1046,
5621,
3639,
289,
469,
309,
261,
529,
18,
14963,
12,
15496,
8319,
18,
49,
22247,
67,
19444,
67,
10976,
3719,
288,
5411,
679,
3876,
1046,
5621,
3639,
289,
469,
309,
261,
529,
18,
14963,
12,
15496,
8319,
18,
49,
22247,
67,
5757,
67,
10976,
3719,
288,
5411,
679,
1444,
1046,
5621,
3639,
289,
469,
309,
261,
529,
18,
14963,
12,
15496,
8319,
18,
49,
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,
14840,
12,
780,
2003,
16,
514,
508,
16,
21821,
514,
1831,
13,
1216,
14366,
288,
3639,
309,
261,
401,
1650,
18,
14963,
12,
4811,
67,
1650,
3719,
288,
5411,
2240,
18,
409,
1046,
12,
1650,
16,
508,
16,
1831,
1769,
5411,
327,
31,
3639,
289,
3639,
309,
261,
2211,
18,
588,
3328,
7675,
291,
2829,
1526,
10756,
288,
5411,
7156,
7675,
4148,
2932,
27086,
20764,
7273,
13424,
13773,
529,
9078,
2932,
15,
1650,
9078,
2225,
1769,
3639,
289,
3639,
309,
261,
529,
18,
14963,
12,
15496,
8319,
18,
49,
22247,
67,
15271,
9099,
67,
10753,
3719,
288,
5411,
679,
5289,
1138,
5621,
3639,
289,
469,
309,
261,
529,
18,
14963,
12,
15496,
8319,
18,
49,
22247,
2
] |
List availableRanges = new ArrayList();
|
IntervalSet availableRanges = new IntervalSet();
|
private static void parseAvailableRangesHeader(String line, RemoteFileDesc rfd) throws IOException { List availableRanges = new ArrayList(); line = line.toLowerCase(); // start parsing after the word "bytes" int start = line.indexOf("bytes") + 6; // if start == -1 the word bytes has not been found // if start >= line.length we are at the end of the // header line while (start != -1 && start < line.length()) { // try to parse the number before the dash int stop = line.indexOf('-', start); // test if this is a valid interval if ( stop == -1 ) break; // this is the interval to store the available // range we are parsing in. Interval interval = null; try { // read number before dash // bytes A-B, C-D // ^ int low = Integer.parseInt(line.substring(start, stop).trim()); // now moving the start index to the // character after the dash: // bytes A-B, C-D // ^ start = stop + 1; // we are parsing the number before the comma stop = line.indexOf(',', start); // If we are at the end of the header line, there is no comma // following. if ( stop == -1 ) stop = line.length(); // read number after dash // bytes A-B, C-D // ^ int high = Integer.parseInt(line.substring(start, stop).trim()); // this interval should be inclusive at both ends interval = new Interval( low, high ); // start parsing after the next comma. If we are at the // end of the header line start will be set to // line.length() +1 start = stop + 1; } catch (NumberFormatException e) { throw new ProblemReadingHeaderException(e); } availableRanges.add(interval); } rfd.setAvailableRanges(availableRanges); }
|
5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/0d5636b976e1010a2e03feb87d12c14153ff3eb2/HTTPDownloader.java/buggy/components/gnutella-core/src/main/java/com/limegroup/gnutella/downloader/HTTPDownloader.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
1109,
5268,
9932,
1864,
12,
780,
980,
16,
4766,
10792,
6304,
812,
4217,
436,
8313,
13,
540,
1216,
1860,
288,
3639,
10803,
694,
2319,
9932,
273,
394,
10803,
694,
5621,
7734,
980,
273,
980,
18,
869,
5630,
5621,
3639,
368,
787,
5811,
1839,
326,
2076,
315,
3890,
6,
3639,
509,
787,
273,
980,
18,
31806,
2932,
3890,
7923,
397,
1666,
31,
3639,
368,
309,
787,
422,
300,
21,
326,
2076,
1731,
711,
486,
2118,
1392,
3639,
368,
309,
787,
1545,
980,
18,
2469,
732,
854,
622,
326,
679,
434,
326,
540,
368,
1446,
980,
3639,
1323,
261,
1937,
480,
300,
21,
597,
787,
411,
980,
18,
2469,
10756,
288,
5411,
368,
775,
358,
1109,
326,
1300,
1865,
326,
12558,
5411,
509,
2132,
273,
980,
18,
31806,
2668,
17,
2187,
787,
1769,
5411,
368,
1842,
309,
333,
353,
279,
923,
3673,
5411,
309,
261,
2132,
422,
300,
21,
262,
7734,
898,
31,
2398,
368,
333,
353,
326,
3673,
358,
1707,
326,
2319,
2398,
368,
1048,
732,
854,
5811,
316,
18,
5411,
10803,
3673,
273,
446,
31,
7734,
775,
288,
7734,
368,
855,
1300,
1865,
12558,
7734,
368,
1731,
432,
17,
38,
16,
385,
17,
40,
7734,
368,
4202,
3602,
7734,
509,
4587,
273,
2144,
18,
2670,
1702,
12,
1369,
18,
28023,
12,
1937,
16,
2132,
2934,
5290,
10663,
27573,
368,
2037,
12499,
326,
787,
770,
358,
326,
1171,
368,
3351,
1839,
326,
12558,
30,
7734,
368,
1731,
432,
17,
38,
16,
385,
17,
40,
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,
918,
1109,
5268,
9932,
1864,
12,
780,
980,
16,
4766,
10792,
6304,
812,
4217,
436,
8313,
13,
540,
1216,
1860,
288,
3639,
10803,
694,
2319,
9932,
273,
394,
10803,
694,
5621,
7734,
980,
273,
980,
18,
869,
5630,
5621,
3639,
368,
787,
5811,
1839,
326,
2076,
315,
3890,
6,
3639,
509,
787,
273,
980,
18,
31806,
2932,
3890,
7923,
397,
1666,
31,
3639,
368,
309,
787,
422,
300,
21,
326,
2076,
1731,
711,
486,
2118,
1392,
3639,
368,
309,
787,
1545,
980,
18,
2469,
732,
854,
622,
326,
679,
434,
326,
540,
368,
1446,
980,
3639,
1323,
261,
1937,
480,
300,
21,
597,
787,
411,
980,
18,
2469,
10756,
288,
5411,
368,
775,
358,
1109,
326,
2
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.