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 |
|---|---|---|---|---|---|---|
public void testValidationFailsIfInvalidAttributePresented() { | public void testValidationFailsIfInvalidAttributePresented() throws Exception { | public void testValidationFailsIfInvalidAttributePresented() { MethodSecurityInterceptor si = new MethodSecurityInterceptor(); si.setAccessDecisionManager(new MockAccessDecisionManager()); si.setAuthenticationManager(new MockAuthenticationManager()); si.setRunAsManager(new RunAsManagerImpl()); assertTrue(si.isValidateConfigAttributes()); // check default si.setObjectDefinitionSource(new MockMethodDefinitionSource(true, true)); try { si.afterPropertiesSet(); fail("Should have thrown IllegalArgumentException"); } catch (IllegalArgumentException expected) { assertEquals("Unsupported configuration attributes: [ANOTHER_INVALID, INVALID_ATTRIBUTE]", expected.getMessage()); } } | 57740 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57740/41b41ba3162bec423c11b9b700ad3dfb6f342d23/MethodSecurityInterceptorTests.java/clean/core/src/test/java/org/acegisecurity/intercept/method/aopalliance/MethodSecurityInterceptorTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4354,
30800,
2047,
1941,
1499,
6351,
329,
1435,
1216,
1185,
288,
3639,
2985,
4368,
10281,
7533,
273,
394,
2985,
4368,
10281,
5621,
3639,
7533,
18,
542,
1862,
15861,
1318,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4354,
30800,
2047,
1941,
1499,
6351,
329,
1435,
1216,
1185,
288,
3639,
2985,
4368,
10281,
7533,
273,
394,
2985,
4368,
10281,
5621,
3639,
7533,
18,
542,
1862,
15861,
1318,
1... |
_pw.println(line); _needIndent = true; | pw.println(line); needIndent = true; | public void println(String line) { if (_needIndent) { _needIndent = false; _pw.print(_indentStr); } _pw.println(line); _needIndent = true; } | 12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/9d2c39c906c6955e17daf4ac239b85d4727ddc83/JavaWriter.java/clean/modules/interop/src/java/org/apache/geronimo/interop/generator/JavaWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3785,
12,
780,
980,
13,
288,
3639,
309,
261,
67,
14891,
7790,
13,
288,
5411,
389,
14891,
7790,
273,
629,
31,
5411,
389,
14921,
18,
1188,
24899,
9355,
1585,
1769,
3639,
289,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3785,
12,
780,
980,
13,
288,
3639,
309,
261,
67,
14891,
7790,
13,
288,
5411,
389,
14891,
7790,
273,
629,
31,
5411,
389,
14921,
18,
1188,
24899,
9355,
1585,
1769,
3639,
289,
3... |
mOrigText = text; | public TextQuery(Mailbox mbox, Analyzer analyzer, int modifier, int qType, String text) throws ServiceException { super(modifier, qType); mOredTokens = new LinkedList<String>(); // The set of tokens from the user's query. The way the parser works, mTokens = new ArrayList<String>(1); mWildcardTerm = null; mOrigText = text; TokenStream source = analyzer.tokenStream(QueryTypeString(qType), new StringReader(text)); org.apache.lucene.analysis.Token t; while(true) { try { t = source.next(); } catch (IOException e) { t = null; } if (t == null) break; mTokens.add(t.termText()); } try { source.close(); } catch (IOException e) { /* ignore */ } // must look at original text here b/c analyzer strips *'s if (text.length() > 0 && text.charAt(text.length()-1) == '*') { // wildcard query! String wcToken; // only the last token is allowed to have a wildcard in it if (mTokens.size() > 0) wcToken = mTokens.remove(mTokens.size()-1); else wcToken = text; if (wcToken.charAt(wcToken.length()-1) == '*') wcToken = wcToken.substring(0, wcToken.length()-1); if (wcToken.length() > 0) { mWildcardTerm = wcToken; MailboxIndex mbidx = mbox.getMailboxIndex(); List<String> expandedTokens = new ArrayList<String>(100); boolean expandedAllTokens = mbidx.expandWildcardToken(expandedTokens, QueryTypeString(qType), wcToken, MAX_WILDCARD_TERMS);// if (!expandedAllTokens) {// throw MailServiceException.TOO_MANY_QUERY_TERMS_EXPANDED("Wildcard text: \""+wcToken// +"\" expands to too many terms (maximum allowed is "+MAX_WILDCARD_TERMS+")", wcToken+"*", MAX_WILDCARD_TERMS);// } mQueryInfo.add(new WildcardExpansionQueryInfo(wcToken+"*", expandedTokens.size(), expandedAllTokens)); // // By design, we interpret *zero* tokens to mean "ignore this search term" // therefore if the wildcard expands to no terms, we need to stick something // in right here, just so we don't get confused when we go to execute the // query later // if (expandedTokens.size() == 0 || !expandedAllTokens) { mTokens.add(wcToken); } else { for (String token : expandedTokens) { mOredTokens.add(token); } } } } MailboxIndex mbidx = mbox.getMailboxIndex(); for (String token : mTokens) { List<SpellSuggestQueryInfo.Suggestion> suggestions = mbidx.suggestSpelling(QueryTypeString(qType), token); if (suggestions != null) mQueryInfo.add(new SpellSuggestQueryInfo(token, suggestions)); } } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/30b58d2323d9426ce32dde1ce6e3d46680cc5da4/ZimbraQuery.java/clean/ZimbraServer/src/java/com/zimbra/cs/index/ZimbraQuery.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
3867,
1138,
12,
30239,
312,
2147,
16,
1922,
6893,
15116,
16,
509,
9606,
16,
509,
1043,
559,
16,
514,
977,
13,
1216,
16489,
288,
5411,
2240,
12,
20597,
16,
1043,
559,
1769,
5411,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
3867,
1138,
12,
30239,
312,
2147,
16,
1922,
6893,
15116,
16,
509,
9606,
16,
509,
1043,
559,
16,
514,
977,
13,
1216,
16489,
288,
5411,
2240,
12,
20597,
16,
1043,
559,
1769,
5411,
3... | |
evalTest("document(\"tab.xml\")/result/row[1]/descendant::node()", "<fld1>a1</fld1>a1<fld2 align=\"right\">12</fld2>" + " align=\"right\"12"); | evalTest("for $x in document(\"tab.xml\")/result/row[1]/descendant::node() return ($x,';')", "\n;<fld1>a1</fld1>;a1;\n;<fld2 align=\"right\">12</fld2>;12;\n;"); | public static void main(String[] args) { // gnu.expr.ModuleExp.dumpZipPrefix = "kawa-zip-dump-"; // gnu.expr.ModuleExp.debugPrintExpr = true; // Compilation.debugPrintFinalExpr = true; evalTest("3.5+1", "4.5"); evalTest("3.5+1 ,4*2.5", "4.5 10.0"); evalTest("3<5", "true"); evalTest("let $x:=3+4 return $x", "7"); evalTest("let $x:=3+4 return <a>{$x}</a>", "<a>7</a>"); evalTest("for $y in (4,5,2+4) return <b>{10+$y}</b>", "<b>14</b><b>15</b><b>16</b>"); evalTest("for $i in (1 to 10) where ($i mod 2)=1 return 20+$i", "21 23 25 27 29"); evalTest("(3,4,5)[3]", "5"); evalTest("1,((2,3)[false()]),5", "1 5"); evalTest("1,((2 to 4)[true()]),5", "1 2 3 4 5"); evalTest("(for $y in (5,4) return <b>{10+$y}</b>)[2]", "<b>14</b>"); evalTest("document(\"tab.xml\")/result", "<result>\n" + "<row>\n" + "<fld1>a1</fld1>\n" + "<fld2 align=\"right\">12</fld2>\n" + "</row>\n" + "<row>\n" + "<fld1 align=\"left\">b1</fld1>\n" + "<fld2 align=\"right\">22</fld2>\n" + "</row>\n" + "<h:row>\n" + "<j:fld1>c1</j:fld1>\n" + "<h:fld2>33</h:fld2>\n" + "<j:fld3>44</j:fld3>\n" + "<k:fld1>c2</k:fld1>\n" + "</h:row>\n" + "</result>"); evalTest("document(\"tab.xml\")/result/row/fld2", "<fld2 align=\"right\">12</fld2><fld2 align=\"right\">22</fld2>"); evalTest("document(\"tab.xml\")/result/row[fld2]", "<row>\n" + "<fld1>a1</fld1>\n" + "<fld2 align=\"right\">12</fld2>\n" + "</row><row>\n" + "<fld1 align=\"left\">b1</fld1>\n" + "<fld2 align=\"right\">22</fld2>\n" + "</row>"); evalTest("document(\"tab.xml\")/result/row/*", "<fld1>a1</fld1><fld2 align=\"right\">12</fld2><fld1 align=\"left\">b1</fld1><fld2 align=\"right\">22</fld2>"); evalTest("document(\"tab.xml\")/result/row[2]", "<row>\n" + "<fld1 align=\"left\">b1</fld1>\n" + "<fld2 align=\"right\">22</fld2>\n" + "</row>"); evalTest("for $x in document(\"tab.xml\")/result/row[2]/node()" + " return ('[',$x,']')", "[\n][<fld1 align=\"left\">b1</fld1>][\n" + "][<fld2 align=\"right\">22</fld2>][\n]"); evalTest("for $x in document(\"tab.xml\")/result/row[2]/text()" + " return ('[',$x,']')", "[\n][\n][\n]"); evalTest("for $x in document(\"tab.xml\")/result/row[2]//text()" + " return ('[',$x,']')", "[\n][b1][\n][22][\n]"); evalTest("document(\"tab.xml\")/result/row/*[2]", "<fld2 align=\"right\">12</fld2><fld2 align=\"right\">22</fld2>"); evalTest("for $x in <T>r1<fld1>a1</fld1><fld3/>r2<fld2>12</fld2></T>" + " /node()" + " return ('[',$x,']')", "[r1][<fld1>a1</fld1>][<fld3 />][r2][<fld2>12</fld2>]"); evalTest("(document(\"tab.xml\")/result/row/*)[2]", "<fld2 align=\"right\">12</fld2>"); evalTest("(document(\"tab.xml\")/result/row/*)[2 to 3]", "<fld2 align=\"right\">12</fld2><fld1 align=\"left\">b1</fld1>"); evalTest("(document(\"tab.xml\")/result/row/*)[position()>1]", "<fld2 align=\"right\">12</fld2><fld1 align=\"left\">b1</fld1><fld2 align=\"right\">22</fld2>"); evalTest("(document(\"tab.xml\")/result/row/*)[position()>1][2]", "<fld1 align=\"left\">b1</fld1>"); evalTest("document(\"tab.xml\")/result/row/(fld2,fld1)", "<fld2 align=\"right\">12</fld2><fld1>a1</fld1><fld2 align=\"right\">22</fld2><fld1 align=\"left\">b1</fld1>"); evalTest("string-value(document('tab.xml'))", "\n\na1\n12\n\n\nb1\n22\n\n\nc1\n33\n44\nc2\n\n\n"); evalTest("string(document('tab.xml'))", "\n\na1\n12\n\n\nb1\n22\n\n\nc1\n33\n44\nc2\n\n\n"); evalTest("string(document('tab.xml')/result/row/fld1/@align)", "left"); evalTest("string(document('tab.xml')/result/row/fld2/@align)", "rightright"); evalTest("for $x in children(<a>xy{3+4}kl<c>def</c>{9}{11}</a>)" + " return ('[',$x,']')", "[xy 7 kl][<c>def</c>][9 11]"); evalTest("children(<a>xy{3+4}kl<c>def</c>{9}{11}</a>)", "xy 7 kl<c>def</c>9 11"); evalTest("<a>aab</a> ='aab'", "true"); evalTest("<a>abc</a>='abb'", "false"); evalTest("string(<a>{'aa''bbXccZdd'}</a>)", "aa'bbXccZdd"); evalTest("document(\"tab.xml\")/result/row[fld1]", "<row>\n" + "<fld1>a1</fld1>\n" + "<fld2 align=\"right\">12</fld2>\n" + "</row><row>\n" + "<fld1 align=\"left\">b1</fld1>\n" + "<fld2 align=\"right\">22</fld2>\n" + "</row>"); evalTest("document(\"tab.xml\")/result/row[fld3]", ""); evalTest("document(\"tab.xml\")/result/row/fld1[@align]", "<fld1 align=\"left\">b1</fld1>"); evalTest("document(\"tab.xml\")/result/row/fld2[@align]", "<fld2 align=\"right\">12</fld2><fld2 align=\"right\">22</fld2>"); evalTest("'a',document(\"tab.xml\")/result/row/fld1[@align='left']", "a<fld1 align=\"left\">b1</fld1>"); evalTest("'a',document(\"tab.xml\")/result/row/fld1[@align='right']", "a"); evalTest("let $x:=12,\n" + " $y:=<a>{$x+$x}</a>\n" + " return <b atr1='11' atr2=\"{$x}\">{($y,99,$y)}</b>", "<b atr1=\"11\" atr2=\"12\"><a>24</a>99<a>24</a></b>"); evalTest("let $el := 'elm' return " + "document{element {$el} {attribute at{\"abc\"}, \"data\"}}/elm", "<elm at=\"abc\">data</elm>"); evalTest("let $a := <a at1='val1'><b/><c/></a>," + " $b0 := <b/>," + " $b := $a/b return" + " ($a is $a, $a << $b, $b >> $b," + " $a isnot $b, $b, $b0, $b is $b0)", "true true false true <b /> <b /> false"); evalTest("let $a := <a at1='val1'><b/><c/></a>," + " $b := $a/b, $c := $a/c return" + " for $n in distinct-nodes(($c, $a/@at1, $a, $c, $b, $b, $c))" + " return ('[', $n, ']')", "[<a at1=\"val1\"><b /><c /></a>][ at1=\"val1\"][<b />][<c />]"); // Simple namespace tests. evalTest("declare namespace xx='XXX'\n <xx:a>XX</xx:a>", "<xx:a>XX</xx:a>"); evalTest("declare namespace x1='XXX'\n declare namespace x2='XXX'\n" + "string((<top><x1:ab>X1</x1:ab><x2:ab>X2</x2:ab></top>)/x2:ab)", "X1X2"); evalTest("declare namespace x1='XXX'\n declare namespace x2='YYY'\n" + "string((<top><x1:ab>X1</x1:ab><x2:ab>X2</x2:ab></top>)/x2:ab)", "X2"); evalTest("declare namespace x1='XXX'\n declare namespace x2='YYY'\n" + "string((<top><x1:ab>X1</x1:ab><x2:ab>X2</x2:ab></top>)/*)", "X1X2"); evalTest("declare namespace x1='XXX'\n declare namespace x2='YYY'\n" + "string((<top><x1:ab>X1</x1:ab><x2:ab>X2</x2:ab></top>)/*:*)", "X1X2"); evalTest("declare namespace x1='XXX'\n declare namespace x2='YYY'\n" + "string((<top><x1:ab>X1</x1:ab><x2:ab>X2</x2:ab></top>)/x1:*)", "X1"); evalTest("declare namespace x1='XXX'\n declare namespace x2='YYY'\n" + "string((<top><x1:ab>X1</x1:ab><x2:ab>X2</x2:ab></top>)/*:ab)", "X1X2"); evalTest("declare namespace x1='XXX'\n declare namespace x2='YYY'\n" + "string((<top><x1:ab>X1</x1:ab><x2:cd>X2</x2:cd></top>)/*:cd)", "X2"); evalTest("declare namespace h='H'\n" + "string(document(\"tab.xml\")/result/h:row)", "\nc1\n33\n44\nc2\n"); evalTest("declare namespace xx='H'\n" + "string(document(\"tab.xml\")/result/xx:row)", "\nc1\n33\n44\nc2\n"); evalTest("string(document(\"tab.xml\")/result/*:row)", "\na1\n12\n\nb1\n22\n\nc1\n33\n44\nc2\n"); evalTest("string(document(\"tab.xml\")/result/*:row/*:fld1)", "a1b1c1c2"); evalTest("declare namespace k='J'\n" + "string(document(\"tab.xml\")/result/*:row/k:fld1)", "c1c2"); evalTest("declare namespace k='J'\n" + "string(document(\"tab.xml\")/result/*:row[k:fld1])", "\nc1\n33\n44\nc2\n"); evalTest("document(\"tab.xml\")/result/row[1]/descendant::*", "<fld1>a1</fld1><fld2 align=\"right\">12</fld2>"); evalTest("document(\"tab.xml\")/result/row[1]/descendant::node()", "<fld1>a1</fld1>a1<fld2 align=\"right\">12</fld2>" + " align=\"right\"12"); evalTest("document(\"tab.xml\")/result/row[1]/descendant::text()", "a112"); evalTest("document(\"tab.xml\")/result/row[1]/descendant-or-self::*", "<row><fld1>a1</fld1>" + "<fld2 align=\"right\">12</fld2></row>" + "<fld1>a1</fld1><fld2 align=\"right\">12</fld2>"); // Based on bugs reported by Francois Leygues <vizawalou@wanadoo.fr>: evalTest("let $bx := <b x='xx'></b> return" + " let $x := <a>{for $y in $bx return $y}</a>" + " return $x/b", "<b x=\"xx\" />"); evalTest("element r {let $y := <b x='1'/>" + " let $x:=<a>{$y}</a> return $x/b/@x}", "<r x=\"1\" />"); evalTest("define function x(){<a><b x='1'/><b x='2'/></a>}" + " let $i := <a>{for $a in x()/b return $a}</a> return $i/b/@x", " x=\"1\" x=\"2\""); failureExpectedNext = ""; evalTest("define function s(){ <a x='10'>{for $n in (<a x='2'/>) return ($n) }</a>}" + " let $st := s()/a return (" + " '[',$st/@x ,'] [',$st ,']')", "[ x=\"2\"] [<a x=\"2\" />]"); // Testcase from <Seshukumar_Adiraju@infosys.com>: evalTest("let $books := " + "<books><book id='book1'/><book id='book2'/></books> " + "for $book in $books/book return <p>{string($book/@id)}</p>", "<p>book1</p><p>book2</p>"); evalTest("for $n in children(<a>xx<b/>yy</a>) return $n instanceof node()", "true true true"); evalTest("for $n in children(<a>xx<b/>yy</a>) return $n instanceof text ( )", "true false true"); evalTest("for $n in children(<a>xx<b/>yy</a>) return $n instanceof element(a,*)", "false false false"); evalTest("for $n in <a>xx<b/>yy</a>/node() return $n instanceof element(b,*)", "false true false"); // FIXME: evalTest("<a>xx<b/>yy</a>/node() instanceof node()", "false"); evalTest("<a>xx<b/>yy</a>/node() instanceof node()?", "false"); evalTest("<a>xx<b/>yy</a>/node() instanceof node()+", "true"); evalTest("<a>xx<b/>yy</a>/node() instanceof node()*", "true"); evalTest("<a>xx<b/>yy</a>/node() instanceof item()+", "true"); evalTest("(3,4,5) instanceof item()+", "true"); evalTest("('a','b') instanceof string+", "true"); evalTest("(2,3) instanceof string?", "false"); evalTest("(2,3) instanceof string+", "false"); evalTest("() instanceof string?", "true"); evalTest("() instanceof string+", "false"); evalTest("() instanceof string*", "true"); evalTest("('2') instanceof string?", "true"); evalTest("('2') instanceof string+", "true"); evalTest("('2') instanceof string*", "true"); evalTest("('2','3') instanceof string?", "false"); evalTest("('2','3') instanceof string+", "true"); evalTest("('2','3') instanceof string*", "true"); evalTest("declare namespace Int='class:java.lang.Integer'\n" + "Int:toHexString(266)", "10a"); evalTest("declare namespace File='class:java.io.File'\n" + "define function make-file ($x as string) {File:new($x)}\n" + "define function parent ($x) {java.io.File:getParent($x)}\n" + "parent(make-file('dir/mine.txt'))", "dir"); evalTest("java.lang.Integer:toHexString(255)", "ff"); // String functions evalTest("substring('motor car', 6)", "car"); evalTest("substring('metadata', 4, 3)", "ada"); // evalTest("substring('metadata', -INF, 3)", "met"); // Check for catching errors: evalTest("+ +", "*** syntax error - <string>:1:3: missing expression"); evalTest("declare namespace x1='XXX", "*** caught SyntaxException - <string>:1:26: " + "unexpected end-of-file in string"); evalTest("unescaped-data('<?--->'),let $x:=unescaped-data('an &oslash;') return <b>{unescaped-data('<![CDATA[saw]]>')} {$x}</b>", "<?---><b><![CDATA[saw]]> an ø</b>"); printSummary(); } | 36870 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/36870/165b30a4f21a11a75fe910450ef51f699afd23b1/TestMisc.java/clean/gnu/xquery/testsuite/TestMisc.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
225,
288,
565,
368,
314,
13053,
18,
8638,
18,
3120,
2966,
18,
8481,
9141,
2244,
273,
315,
79,
2219,
69,
17,
4450,
17,
8481,
10951,
31,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
225,
288,
565,
368,
314,
13053,
18,
8638,
18,
3120,
2966,
18,
8481,
9141,
2244,
273,
315,
79,
2219,
69,
17,
4450,
17,
8481,
10951,
31,
56... |
Writer out = new FileWriter(ruleSetLocation.toOSString()); | OutputStream out = new FileOutputStream(ruleSetLocation.toOSString()); | private void storeRuleSetInStateLocation(RuleSet ruleSet) { try { IPath ruleSetLocation = getStateLocation().append(RULESET_FILE); Writer out = new FileWriter(ruleSetLocation.toOSString()); RuleSetWriter writer = WriterAbstractFactory.getFactory().getRuleSetWriter(); writer.write(out, ruleSet); out.flush(); out.close(); } catch (IOException e) { PMDPlugin.getDefault().showError(getMessage(PMDConstants.MSGKEY_ERROR_WRITING_PREFERENCE), e); } catch (PMDEclipseException e) { PMDPlugin.getDefault().showError(getMessage(PMDConstants.MSGKEY_ERROR_WRITING_PREFERENCE), e); } } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/ef5e80ccd5dbd456db3b1859b4ffb347a2690e4d/PMDPlugin.java/buggy/pmd-eclipse/src/net/sourceforge/pmd/eclipse/PMDPlugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1707,
21474,
382,
1119,
2735,
12,
21474,
31897,
13,
288,
3639,
775,
288,
5411,
467,
743,
31897,
2735,
273,
8997,
2735,
7675,
6923,
12,
14920,
4043,
67,
3776,
1769,
5411,
8962,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1707,
21474,
382,
1119,
2735,
12,
21474,
31897,
13,
288,
3639,
775,
288,
5411,
467,
743,
31897,
2735,
273,
8997,
2735,
7675,
6923,
12,
14920,
4043,
67,
3776,
1769,
5411,
8962,
... |
throws UninterruptiblePragma, InlinePragma { | throws UninterruptiblePragma, InlinePragma { | public static boolean incSanityRC(ObjectReference object, boolean root) throws UninterruptiblePragma, InlinePragma { int oldValue, newValue; do { oldValue = object.toAddress().prepareInt(RC_SANITY_HEADER_OFFSET); if (root) { newValue = (oldValue | ROOT_REACHABLE); } else { newValue = oldValue + INCREMENT; } } while (!object.toAddress().attempt(oldValue, newValue, RC_SANITY_HEADER_OFFSET)); return (oldValue == 0); } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/30524c62fa391922d51289c03075f714c772951c/RefCountSpace.java/buggy/MMTk/src/org/mmtk/policy/RefCountSpace.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1250,
7290,
55,
10417,
11529,
12,
22101,
733,
16,
1250,
1365,
13,
565,
1216,
1351,
31847,
1523,
2050,
9454,
16,
16355,
2050,
9454,
288,
565,
509,
11144,
16,
6129,
31,
565,
741,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1250,
7290,
55,
10417,
11529,
12,
22101,
733,
16,
1250,
1365,
13,
565,
1216,
1351,
31847,
1523,
2050,
9454,
16,
16355,
2050,
9454,
288,
565,
509,
11144,
16,
6129,
31,
565,
741,... |
line = line.toLowerCase(); int bfl = line.indexOf("bytes free"); if (bfl != -1) { line = line.substring(0, bfl); line = line.trim(); int lsl = line.lastIndexOf(' '); line = line.substring(lsl + 1); bytes = Long.parseLong(line); } | line = line.toLowerCase().trim(); lines.add(line); | private static long getFreeSpaceWindows(String path) throws IOException { // build and run the 'dir' command String line = null; String[] cmdAttrbs = new String[3]; cmdAttrbs[0] = "cmd.exe"; cmdAttrbs[1] = "/C"; cmdAttrbs[2] = "dir /-c " + path; Process proc = Runtime.getRuntime().exec(cmdAttrbs); // read the output until we find the line with 'bytes free' long bytes = -1; BufferedReader in = null; try { in = new BufferedReader(new InputStreamReader(proc.getInputStream())); line = in.readLine(); while (line != null) { line = line.toLowerCase(); int bfl = line.indexOf("bytes free"); if (bfl != -1) { // found "bytes free" // chop off everything AFTER the actual byte count line = line.substring(0, bfl); line = line.trim(); // find the LAST space in the string, should be right before the // byte count int lsl = line.lastIndexOf(' '); // now get rid of everything BEFORE that space, and line will // then contain just the byte count line = line.substring(lsl + 1); bytes = Long.parseLong(line); } line = in.readLine(); } } finally { IOUtils.closeQuietly(in); } if (bytes == -1) { throw new IOException( "Command line 'dir' did not find text 'bytes free' in response for path '" + path + "'- check path is of the form 'C:'"); } return bytes; } | 56629 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56629/e0171a875c18021efdbf38abffb68b1b6992be67/FileSystemUtils.java/clean/src/java/org/apache/commons/io/FileSystemUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1525,
2812,
992,
3819,
10399,
12,
780,
589,
13,
1216,
1860,
288,
3639,
368,
1361,
471,
1086,
326,
296,
1214,
11,
1296,
3639,
514,
980,
273,
446,
31,
3639,
514,
8526,
1797,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1525,
2812,
992,
3819,
10399,
12,
780,
589,
13,
1216,
1860,
288,
3639,
368,
1361,
471,
1086,
326,
296,
1214,
11,
1296,
3639,
514,
980,
273,
446,
31,
3639,
514,
8526,
1797,
38... |
public void execute(boolean block) throws AxisFault { if (completed) { throw new AxisFault(Messages.getMessage("mepiscomplted")); } ConfigurationContext cc = sc.getConfigurationContext(); // set options on the message context mc.setOptions(options); // do Target Resolution cc.getAxisConfiguration().getTargetResolverChain().resolveTarget(mc); // setting messge ID if it null // if the transport to use for sending is not specified, try to find it // from the URL TransportOutDescription senderTransport = options.getTransportOut(); if (senderTransport == null) { EndpointReference toEPR = (options.getTo() != null) ? options .getTo() : mc.getTo(); senderTransport = ClientUtils.inferOutTransport(cc .getAxisConfiguration(), toEPR, mc); } mc.setTransportOut(senderTransport); if (mc.getSoapAction() == null) { String soapaction = axisOp.getSoapAction(); if (soapaction != null) { mc.setSoapAction(soapaction); } } // create the operation context for myself OperationContext oc = new OperationContext(axisOp, sc); oc.addMessageContext(mc); addReferenceParameters(mc); // ship it out AxisEngine engine = new AxisEngine(cc); if (!block) { mc.setProperty(MessageContext.TRANSPORT_NON_BLOCKING, Boolean.TRUE); } engine.send(mc); // all done completed = true; } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/d1e22f44b2a214c8cab36ae9ffde9ec7d5b3bb9f/OutOnlyAxisOperation.java/buggy/modules/kernel/src/org/apache/axis2/description/OutOnlyAxisOperation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1836,
12,
6494,
1203,
13,
1216,
15509,
7083,
288,
3639,
309,
261,
13615,
13,
288,
5411,
604,
394,
15509,
7083,
12,
5058,
18,
24906,
2932,
81,
881,
291,
832,
412,
2344,
7923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1836,
12,
6494,
1203,
13,
1216,
15509,
7083,
288,
3639,
309,
261,
13615,
13,
288,
5411,
604,
394,
15509,
7083,
12,
5058,
18,
24906,
2932,
81,
881,
291,
832,
412,
2344,
7923,
... | ||
if (file == null) { | if (file == null || file.getVirtualFile() == null) { | public void update(AnActionEvent event){ Presentation presentation = event.getPresentation(); DataContext dataContext = event.getDataContext(); Project project = (Project)dataContext.getData(DataConstants.PROJECT); if (project == null){ presentation.setEnabled(false); return; } Editor editor = (Editor)dataContext.getData(DataConstants.EDITOR); if (editor != null){ PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument()); if (file == null) { presentation.setEnabled(false); return; } final Language lang = file.getLanguage(); if (lang != null) { final PseudoTextBuilder formatter = lang.getFormatter(); if (formatter == null) { presentation.setEnabled(false); return; } } } else if (dataContext.getData(DataConstantsEx.MODULE_CONTEXT) == null && dataContext.getData(DataConstantsEx.PROJECT_CONTEXT) == null) { PsiElement element = (PsiElement)dataContext.getData(DataConstants.PSI_ELEMENT); if (element == null){ presentation.setEnabled(false); return; } if (!(element instanceof PsiDirectory)){ PsiFile file = element.getContainingFile(); if (file == null || (!(file instanceof PsiJavaFile) && !(file instanceof XmlFile)) || (file.getVirtualFile() == null)){ presentation.setEnabled(false); return; } } } presentation.setEnabled(true); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/4376c52079f392e785cf45896f4312ba15a85c4d/ReformatCodeAction.java/buggy/source/com/intellij/codeInsight/actions/ReformatCodeAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1089,
12,
979,
1803,
1133,
871,
15329,
565,
25130,
367,
22525,
273,
871,
18,
588,
6351,
367,
5621,
565,
1910,
1042,
501,
1042,
273,
871,
18,
588,
751,
1042,
5621,
565,
5420,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1089,
12,
979,
1803,
1133,
871,
15329,
565,
25130,
367,
22525,
273,
871,
18,
588,
6351,
367,
5621,
565,
1910,
1042,
501,
1042,
273,
871,
18,
588,
751,
1042,
5621,
565,
5420,
... |
return myHost; } | if (a instanceof Account__Server) { return ((Account__Server)a).getHost(); } else { return ""; } } | public String getHost() { return myHost; } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/b13c667b376deb4a8f2c235ffd847b57616d23c4/ServerStructure.java/buggy/grendel/sources/grendel/prefs/base/ServerStructure.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
8580,
1435,
288,
565,
327,
3399,
2594,
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,
... | [
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
8580,
1435,
288,
565,
327,
3399,
2594,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return namespace != fNamespaceList[0] && namespace != fNamespaceList[1]; } | boolean found = false; int listNum = fNamespaceList.length; for (int i = 0; i < listNum && !found; i++) { if (namespace == fNamespaceList[i]) found = true; } | public boolean allowNamespace(String namespace) { // ##any allows any namespace if (fType == WILDCARD_ANY) return true; // ##other doesn't allow target namespace and empty namespace if (fType == WILDCARD_OTHER) { return namespace != fNamespaceList[0] && namespace != fNamespaceList[1]; } // list allows any one in the list int listNum = fNamespaceList.length; for (int i = 0; i < listNum; i++) { if (namespace == fNamespaceList[i]) return true; } return false; } | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/d7404f71a80007e4fc76860a181f33874c45b9e0/XSWildcardDecl.java/clean/src/org/apache/xerces/impl/v2/XSWildcardDecl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1699,
3402,
12,
780,
1981,
13,
288,
3639,
368,
7541,
2273,
5360,
1281,
1981,
3639,
309,
261,
74,
559,
422,
678,
29067,
67,
15409,
13,
5411,
327,
638,
31,
3639,
368,
7541,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1699,
3402,
12,
780,
1981,
13,
288,
3639,
368,
7541,
2273,
5360,
1281,
1981,
3639,
309,
261,
74,
559,
422,
678,
29067,
67,
15409,
13,
5411,
327,
638,
31,
3639,
368,
7541,
30... |
sender.setMf(new BytesMessageMessageFactory()); | sender.setMf(new TextMessageMessageFactory()); | public void testQueueScale2() { log.info("Running test testQueueScale2"); Execution execution = createExecution("QueueScale2"); for (int i = 1; i <= scaleNumber; i++) { log.trace("Running with " + i + " connection(s)"); //Create the jobs Job[] jobs = new Job[i + 1]; for (int j = 0; j < i; j++) { SenderJob sender = createDefaultSenderJob(this.queueName); jobs[j] = sender; sender.setNumMessages(numMessages); sender.setMf(new BytesMessageMessageFactory()); sender.setTransacted(false); sender.setDeliveryMode(DeliveryMode.NON_PERSISTENT); sender.setSlaveURL(slaveURLs[j % this.numSlaves]); } //and one receiver ReceiverJob receiver = createDefaultReceiverJob(this.queueName); jobs[i] = receiver; receiver.setAckMode(Session.AUTO_ACKNOWLEDGE); receiver.setTransacted(false); receiver.setNumMessages(numMessages * i); receiver.setSlaveURL(slaveURLs[i % this.numSlaves]); JobResult[] results = runJobs(jobs); if (!checkResults(results, "QueueScale2")) { return; } /* * NB. * When we calculating the total time taken from first send to last receive, there is some * error involved due to the differences in network latency and other remoting overhead * when sending the jobs to be executed on potentially different remote machines. * We make the assumption that this this difference is very small compared with time taken * to run the tests as to be negligible. */ long minTimeOfFirstSend = Long.MAX_VALUE; long maxTimeOfLastReceive = results[i].testTime + results[i].initTime; for (int j = 0; j < i; j++) { JobResult senderResult = results[j]; long timeOfFirstSend = senderResult.initTime; minTimeOfFirstSend = Math.min(minTimeOfFirstSend, timeOfFirstSend); } long totalTimeTaken = maxTimeOfLastReceive - minTimeOfFirstSend; long totalMessagesSent = i * numMessages; Measurement measure = new Measurement("throughput", 1000 * ((double)totalMessagesSent) / totalTimeTaken); measure.setVariableValue("numberOfConnections", i); execution.addMeasurement(measure); } pm.saveExecution(execution); log.info("Test testQueueScale2 finished"); } | 3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/854a630fe1e9177482e054121f2fd66ee7f5e035/PerfRunner.java/buggy/src/main/org/jboss/jms/perf/framework/PerfRunner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1842,
3183,
5587,
22,
1435,
282,
288,
1377,
613,
18,
1376,
2932,
7051,
1842,
1842,
3183,
5587,
22,
8863,
10402,
8687,
4588,
273,
752,
3210,
2932,
3183,
5587,
22,
8863,
5411,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1842,
3183,
5587,
22,
1435,
282,
288,
1377,
613,
18,
1376,
2932,
7051,
1842,
1842,
3183,
5587,
22,
8863,
10402,
8687,
4588,
273,
752,
3210,
2932,
3183,
5587,
22,
8863,
5411,
36... |
String [] headerNames_1 = {Macros.TYPE, Macros.NAME, Macros.SECRET_KEY, Macros.GAME_ID}; String [] headerValues_1 = {Macros.REG_MOD_JOIN_GAME_NUMBER, userName, secretKey, new Integer(5).toString()}; | String [] headerNames_1 = {IModuleRequest.HN_TYPE, Macros.HN_NAME, Macros.HN_SECRET_KEY, Macros.HN_GAME_ID}; String [] headerValues_1 = {RequestTypes.JOIN_GAME_NUMBER, userName, secretKey, new Integer(5).toString()}; | public void run () { try { String userName = "user1"; int userIndex = 0; String [] headerNames = {Macros.TYPE, Macros.NAME, Macros.GAME}; String [] headerValues = {Macros.REG_MOD_REGISTER_USER, userName, game}; String secretKey; Map resHeaders; TestModuleRequest tReq; TestModuleResponse tRes; //don't actually need to use input stream input = new byte[INPUT_BYTE_ARR_SIZE]; tReq = new TestModuleRequest(input,headerNames,headerValues); tRes = new TestModuleResponse(OUTPUT_SIZE); //user1 has been registed to play mancala regMod.handleRequest(tReq, tRes); secretKey = (String)tRes.getHeadersWritten().get(Macros.SECRET_KEY); //request to join the game of mancala, note that another thread must already be hosting the game //Current id should be 5 String [] headerNames_1 = {Macros.TYPE, Macros.NAME, Macros.SECRET_KEY, Macros.GAME_ID}; String [] headerValues_1 = {Macros.REG_MOD_JOIN_GAME_NUMBER, userName, secretKey, new Integer(5).toString()}; tReq = new TestModuleRequest(input, headerNames_1, headerValues_1); tRes = new TestModuleResponse(OUTPUT_SIZE); regMod.handleRequest(tReq, tRes); resHeaders = tRes.getHeadersWritten(); testMsgs_test9[userIndex] = userName + " attempting to join a game with an valid secret key...host DECLINED"; testStatus_test9[userIndex] = resHeaders.get(Macros.STATUS).equals(Macros.DENY); } catch (Exception e) { e.printStackTrace(); } } | 56866 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56866/62dc878f22d8ada5da3adc705e56608705c983ca/RegistrationModuleTest.java/buggy/gamesman/java/test/edu/berkeley/gamesman/server/registration/RegistrationModuleTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1086,
1832,
288,
9506,
202,
698,
288,
9506,
202,
780,
12065,
273,
315,
1355,
21,
14432,
9506,
202,
474,
729,
1016,
273,
374,
31,
9506,
202,
780,
5378,
1446,
1557,
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,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1086,
1832,
288,
9506,
202,
698,
288,
9506,
202,
780,
12065,
273,
315,
1355,
21,
14432,
9506,
202,
474,
729,
1016,
273,
374,
31,
9506,
202,
780,
5378,
1446,
1557,
225,
2... |
private ICUResourceWriter.Resource parseDisplayTypes(Node root){ StringBuffer xpath = new StringBuffer(); xpath.append(" int savedLength = xpath.length(); | private ICUResourceWriter.Resource parseDisplayTypes(Node root, StringBuffer xpath){ StringBuffer myXpath = new StringBuffer(); myXpath.append(" int savedLength = myXpath.length(); | private ICUResourceWriter.Resource parseDisplayTypes(Node root){ StringBuffer xpath = new StringBuffer(); xpath.append("//ldml/localeDisplayNames/types/type[@key='"); int savedLength = xpath.length(); ICUResourceWriter.ResourceTable table = new ICUResourceWriter.ResourceTable(); table.name = TYPES; ICUResourceWriter.ResourceTable current = null; for(int i=0; i<registeredKeys.length; i++){ xpath.append(registeredKeys[i]); xpath.append("']"); NodeList list = LDMLUtilities.getNodeList(root.getOwnerDocument(), xpath.toString()); if(list.getLength()!=0){ ICUResourceWriter.ResourceTable subTable = new ICUResourceWriter.ResourceTable(); subTable.name = registeredKeys[i]; if(i==0){ table.first = current = subTable; }else{ current.next = subTable; current = (ICUResourceWriter.ResourceTable)current.next; } ICUResourceWriter.ResourceString currentString = null; for(int j=0; j<list.getLength(); j++){ Node item = list.item(j); String type = LDMLUtilities.getAttributeValue(item, TYPE); String value = LDMLUtilities.getNodeValue(item); String altVal = LDMLUtilities.getAttributeValue(item, ALT); // the alt atrribute is set .. so ignore the resource if(altVal!=null){ continue; } //TODO now check if this string is draft ICUResourceWriter.ResourceString string = new ICUResourceWriter.ResourceString(); string.name = type; string.val = value; if(j==0){ subTable.first = currentString = string; }else{ currentString.next = string; currentString = (ICUResourceWriter.ResourceString)currentString.next; } } } xpath.delete(savedLength, xpath.length()); } if(table.first!=null){ return table; } return null; } | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/e34f8c81f04f1bc2a8e2959a1ee81d86fcefbf65/LDML2ICUConverter.java/clean/tools/java/org/unicode/cldr/icu/LDML2ICUConverter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
28009,
1420,
2289,
18,
1420,
1109,
4236,
2016,
12,
907,
1365,
15329,
3639,
6674,
6748,
273,
394,
6674,
5621,
3639,
6748,
18,
6923,
2932,
759,
1236,
781,
19,
6339,
4236,
1557,
19,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
28009,
1420,
2289,
18,
1420,
1109,
4236,
2016,
12,
907,
1365,
15329,
3639,
6674,
6748,
273,
394,
6674,
5621,
3639,
6748,
18,
6923,
2932,
759,
1236,
781,
19,
6339,
4236,
1557,
19,
23... |
this.activityDao = activityDao ; | this.activityDao = activityDao; | public void setActivityDao(ActivityDao activityDao) { this.activityDao = activityDao ; } | 55530 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55530/1dcb39923984a9d2a9662da208710e54ecb0bf16/ProcessService.java/clean/woops2/trunk/src/woops2/business/process/ProcessService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
6193,
11412,
12,
6193,
11412,
5728,
11412,
13,
288,
202,
202,
2211,
18,
9653,
11412,
273,
5728,
11412,
274,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
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,
444,
6193,
11412,
12,
6193,
11412,
5728,
11412,
13,
288,
202,
202,
2211,
18,
9653,
11412,
273,
5728,
11412,
274,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
if (jj_scan_token(PLUS)) return true; | Token xsp; xsp = jj_scanpos; if (jj_3R_356()) { jj_scanpos = xsp; if (jj_3R_357()) { jj_scanpos = xsp; if (jj_3R_358()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_266()) return true; | final private boolean jj_3R_345() { if (jj_scan_token(PLUS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/050f1d327a4f37a9453fd61c6eb891b6097d82f6/JavaParser.java/buggy/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
25574,
1435,
288,
565,
3155,
619,
1752,
31,
619,
1752,
273,
10684,
67,
9871,
917,
31,
309,
261,
78,
78,
67,
23,
54,
67,
23,
4313,
10756,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
25574,
1435,
288,
565,
3155,
619,
1752,
31,
619,
1752,
273,
10684,
67,
9871,
917,
31,
309,
261,
78,
78,
67,
23,
54,
67,
23,
4313,
10756,
288,
... |
if (listModel.getSize()<MAX_AUT) { insertNewAut(); } else { newAut.setEnabled(false); } } | if (listModel.getSize()<MAX_AUT) { insertNewAut(); } else { newAut.setEnabled(false); } } | public void actionPerformed(ActionEvent e) { if (listModel.getSize()<MAX_AUT) { insertNewAut(); } else { newAut.setEnabled(false); } } | 11750 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11750/929c80fd40f94f9bb4dd8a50947f6acbd21dbcc1/Sidebar.java/clean/src/gui/Sidebar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
26100,
12,
1803,
1133,
425,
13,
288,
1082,
565,
309,
261,
1098,
1488,
18,
588,
1225,
1435,
32,
6694,
67,
37,
1693,
13,
288,
1082,
202,
6387,
1908,
7150,
5621,
1082,
565,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
26100,
12,
1803,
1133,
425,
13,
288,
1082,
565,
309,
261,
1098,
1488,
18,
588,
1225,
1435,
32,
6694,
67,
37,
1693,
13,
288,
1082,
202,
6387,
1908,
7150,
5621,
1082,
565,... |
return BindingMessages.getString("Validate_RangeStart") + Long.MIN_VALUE + BindingMessages.getString("and") + Long.MAX_VALUE + "."; | return BindingMessages.getString("Validate_RangeStart") + Long.MIN_VALUE + BindingMessages.getString("and") + Long.MAX_VALUE + "."; | private String getHint() { return BindingMessages.getString("Validate_RangeStart") + Long.MIN_VALUE + //$NON-NLS-1$ BindingMessages.getString("and") + Long.MAX_VALUE + "."; //$NON-NLS-1$ //$NON-NLS-2$ } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/646de6c1228ca0820a97e225df84d75e3993e272/String2LongPrimitiveValidator.java/clean/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2LongPrimitiveValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
336,
7002,
1435,
288,
202,
202,
2463,
15689,
5058,
18,
588,
780,
2932,
4270,
67,
2655,
1685,
7923,
397,
3407,
18,
6236,
67,
4051,
397,
225,
4329,
3993,
17,
5106,
17,
21,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
336,
7002,
1435,
288,
202,
202,
2463,
15689,
5058,
18,
588,
780,
2932,
4270,
67,
2655,
1685,
7923,
397,
3407,
18,
6236,
67,
4051,
397,
225,
4329,
3993,
17,
5106,
17,
21,... |
if(indeks<0 || indeks>=KelimeTipi.values().length) | if(indeks<0 || indeks>=degerler.length) | public static KelimeTipi getTip(int indeks) { if(indeks<0 || indeks>=KelimeTipi.values().length) throw new ArrayIndexOutOfBoundsException("Girilen degerde indeksli KelimeTipi yok!"); return KelimeTipi.values()[indeks]; } | 48478 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48478/f8c1ed8a134c905700021b111be2a54d243cdb67/KelimeTipi.java/buggy/zemberek2/src/cekirdek/net/zemberek/yapi/KelimeTipi.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1475,
292,
494,
14189,
77,
3181,
625,
12,
474,
316,
323,
7904,
13,
288,
3639,
309,
12,
267,
323,
7904,
32,
20,
747,
316,
323,
7904,
34,
33,
323,
693,
749,
18,
2469,
13,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1475,
292,
494,
14189,
77,
3181,
625,
12,
474,
316,
323,
7904,
13,
288,
3639,
309,
12,
267,
323,
7904,
32,
20,
747,
316,
323,
7904,
34,
33,
323,
693,
749,
18,
2469,
13,
1... |
useSystemButton.setFont(parent.getFont()); | applyDialogFont(useSystemButton); | private void createUseDefaultsControl( Composite parent, String useSystemLabel) { useSystemButton = new Button(parent, SWT.PUSH | SWT.CENTER); useSystemButton.setText(useSystemLabel); //$NON-NLS-1$ useSystemButton.setFont(parent.getFont()); setButtonLayoutData(useSystemButton); useSystemButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { FontDefinition definition = getSelectedFontDefinition(); if (definition != null) { FontData[] defaultFontData = JFaceResources.getDefaultFont().getFontData(); fontDataSettings.put(definition.getId(), defaultFontData); updateForSelectedFontDefinition(definition); } } }); useSystemButton.setEnabled(false); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/fa3d8b2c736e3652be89a2f1f10b1731caba01eb/FontPreferencePage.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FontPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
3727,
7019,
3367,
12,
202,
202,
9400,
982,
16,
202,
202,
780,
999,
3163,
2224,
13,
288,
202,
202,
1202,
3163,
3616,
273,
394,
12569,
12,
2938,
16,
348,
8588,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
3727,
7019,
3367,
12,
202,
202,
9400,
982,
16,
202,
202,
780,
999,
3163,
2224,
13,
288,
202,
202,
1202,
3163,
3616,
273,
394,
12569,
12,
2938,
16,
348,
8588,
18,
... |
public org.quickfix.field.DatedDate getDatedDate() throws FieldNotFound { org.quickfix.field.DatedDate value = new org.quickfix.field.DatedDate(); | public quickfix.field.DatedDate getDatedDate() throws FieldNotFound { quickfix.field.DatedDate value = new quickfix.field.DatedDate(); | public org.quickfix.field.DatedDate getDatedDate() throws FieldNotFound { org.quickfix.field.DatedDate value = new org.quickfix.field.DatedDate(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/CollateralReport.java/buggy/src/java/src/quickfix/fix44/CollateralReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
40,
690,
1626,
2343,
690,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
40,
690,
1626,
460,
273,
394,
2358,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
40,
690,
1626,
2343,
690,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
40,
690,
1626,
460,
273,
394,
2358,
18,
... |
public org.quickfix.field.Issuer getIssuer() throws FieldNotFound { org.quickfix.field.Issuer value = new org.quickfix.field.Issuer(); | public quickfix.field.Issuer getIssuer() throws FieldNotFound { quickfix.field.Issuer value = new quickfix.field.Issuer(); | public org.quickfix.field.Issuer getIssuer() throws FieldNotFound { org.quickfix.field.Issuer value = new org.quickfix.field.Issuer(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/PositionReport.java/clean/src/java/src/quickfix/fix44/PositionReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
16667,
336,
16667,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
16667,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
16667,
336,
16667,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
16667,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
... |
endDay = getDay(settings, sessionID, Session.SETTING_END_DAY, -1); | endDay = getDay(settings, sessionID, Session.SETTING_END_DAY, NOT_SET); | SessionSchedule(SessionSettings settings, SessionID sessionID) throws ConfigError, FieldConvertError { boolean startDayPresent = settings.isSetting(sessionID, Session.SETTING_START_DAY); boolean endDayPresent = settings.isSetting(sessionID, Session.SETTING_END_DAY); if (startDayPresent && !endDayPresent) { throw new ConfigError("Session " + sessionID + ": StartDay used without EndDay"); } if (endDayPresent && !startDayPresent) { throw new ConfigError("Session " + sessionID + ": EndDay used without StartDay"); } boolean weeklySession = startDayPresent && endDayPresent; String startTimeString = settings.getString(sessionID, Session.SETTING_START_TIME); String endTimeString = settings.getString(sessionID, Session.SETTING_END_TIME); if (settings.isSetting(sessionID, Session.SETTING_TIMEZONE)) { String sessionTimeZoneID = settings.getString(sessionID, Session.SETTING_TIMEZONE); sessionTimeZone = TimeZone.getTimeZone(sessionTimeZoneID); if ("GMT".equals(sessionTimeZone.getID()) && !"GMT".equals(sessionTimeZoneID)) { throw new ConfigError("Unrecognized time zone '" + sessionTimeZoneID + "' for session " + sessionID); } } else { sessionTimeZone = TimeZone.getTimeZone("UTC"); } Matcher matcher = TIME_PATTERN.matcher(startTimeString); if (!matcher.find()) { throw new ConfigError("Session " + sessionID + ": could not parse start time '" + startTimeString + "'."); } Calendar localTime = SystemTime.getUtcCalendar(); localTime.setTimeZone(sessionTimeZone); localTime.set(Calendar.MILLISECOND, 0); localTime.set(Calendar.HOUR_OF_DAY, Integer.parseInt(matcher.group(1))); localTime.set(Calendar.MINUTE, Integer.parseInt(matcher.group(2))); localTime.set(Calendar.SECOND, Integer.parseInt(matcher.group(3))); Calendar startTime = SystemTime.getUtcCalendar(); startTime.setTime(localTime.getTime()); int startDay = -1; if (weeklySession) { startDay = getDay(settings, sessionID, Session.SETTING_START_DAY, -1); } matcher = TIME_PATTERN.matcher(endTimeString); if (!matcher.find()) { throw new ConfigError("Session " + sessionID + ": could not parse end time '" + endTimeString + "'."); } localTime.set(Calendar.HOUR_OF_DAY, Integer.parseInt(matcher.group(1))); localTime.set(Calendar.MINUTE, Integer.parseInt(matcher.group(2))); localTime.set(Calendar.SECOND, Integer.parseInt(matcher.group(3))); Calendar endTime = SystemTime.getUtcCalendar(); endTime.setTime(localTime.getTime()); int endDay = -1; if (weeklySession) { endDay = getDay(settings, sessionID, Session.SETTING_END_DAY, -1); } initialize(startDay, startTime, endDay, endTime); } | 52211 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52211/528adb7f13aa8770285db60c54efd84e4896fca4/SessionSchedule.java/clean/core/src/main/java/quickfix/SessionSchedule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3877,
6061,
12,
2157,
2628,
1947,
16,
3877,
734,
13737,
13,
1216,
1903,
668,
16,
5411,
2286,
2723,
668,
288,
3639,
1250,
787,
4245,
6351,
273,
1947,
18,
291,
5568,
12,
17255,
16,
3877,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3877,
6061,
12,
2157,
2628,
1947,
16,
3877,
734,
13737,
13,
1216,
1903,
668,
16,
5411,
2286,
2723,
668,
288,
3639,
1250,
787,
4245,
6351,
273,
1947,
18,
291,
5568,
12,
17255,
16,
3877,
... |
return fields.contains(new Integer(field)); } | return fields.contains(new Integer(field)); } | public boolean isField(int field) { return fields.contains(new Integer(field)); } | 6791 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6791/cf7aed68fecf38e4edf304c63ec459ddcc5821bc/DataDictionary.java/clean/src/quickfix/DataDictionary.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
353,
974,
12,
474,
652,
13,
288,
202,
202,
2463,
1466,
18,
12298,
12,
2704,
2144,
12,
1518,
10019,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
353,
974,
12,
474,
652,
13,
288,
202,
202,
2463,
1466,
18,
12298,
12,
2704,
2144,
12,
1518,
10019,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
getWidth(), getHeight()); | getWidth(), getHeight()); | protected void paintBorder(Graphics graphics) { Border border = getBorder(); if (paintBorder && border != null) border.paintBorder(this, graphics, 0, 0, getWidth(), getHeight()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JProgressBar.java/buggy/core/src/classpath/javax/javax/swing/JProgressBar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
12574,
8107,
12,
17558,
17313,
13,
225,
288,
565,
13525,
5795,
273,
2882,
1019,
5621,
565,
309,
261,
84,
1598,
8107,
597,
5795,
480,
446,
13,
1377,
5795,
18,
84,
1598,
8107,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
12574,
8107,
12,
17558,
17313,
13,
225,
288,
565,
13525,
5795,
273,
2882,
1019,
5621,
565,
309,
261,
84,
1598,
8107,
597,
5795,
480,
446,
13,
1377,
5795,
18,
84,
1598,
8107,
... |
WCEventListenerWrapper tempListener = | WCEventListenerWrapper tempListener = | public void run() { // this.setPriority(Thread.MIN_PRIORITY); Assert.assert_it(-1 != nativeWebShell); Assert.assert_it(null != windowControl); nativeInitialize(nativeWebShell); // IMPORTANT: tell the windowControl, who is waiting for this // message, that we have initialized successfully. synchronized(windowControl) { try { windowControl.notify(); } catch (Exception e) { System.out.println("NativeEventThread.run: Exception: trying to send notify() to windowControl: " + e + " " + e.getMessage()); } } while (true) { try { Thread.sleep(1); } catch (Exception e) { System.out.println("NativeEventThread.run(): Exception: " + e + " while sleeping: " + e.getMessage()); } synchronized (this) { // this has to be inside the synchronized block! if (null == this.browserControlCanvas) { // if we get here, this Thread is terminating, destroy // the initContext and notify the WindowControl ((WindowControlImpl)windowControl).nativeDestroyInitContext(nativeWebShell); try { notify(); } catch (Exception e) { System.out.println("NativeEventThread.run: Exception: trying to send notify() to this during delete: " + e + " " + e.getMessage()); } return; } if (this == firstThread) { nativeProcessEvents(nativeWebShell); } if (null != listenersToAdd && !listenersToAdd.isEmpty()) { tempEnum = listenersToAdd.elements(); while (tempEnum.hasMoreElements()) { WCEventListenerWrapper tempListener = (WCEventListenerWrapper) tempEnum.nextElement(); nativeAddListener(nativeWebShell,tempListener.listener, tempListener.listenerClassName); } // use removeAllElements instead of clear for jdk1.1.x // compatibility. listenersToAdd.removeAllElements(); } doRemoveListeners(); } }} | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/c51f266635955ea9a40fa057209a78cf7b0fb900/NativeEventThread.java/clean/java/webclient/classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1086,
1435,
288,
565,
368,
282,
333,
18,
542,
8183,
12,
3830,
18,
6236,
67,
19804,
1769,
565,
5452,
18,
11231,
67,
305,
19236,
21,
480,
6448,
4079,
13220,
1769,
565,
5452,
18,
112... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1086,
1435,
288,
565,
368,
282,
333,
18,
542,
8183,
12,
3830,
18,
6236,
67,
19804,
1769,
565,
5452,
18,
11231,
67,
305,
19236,
21,
480,
6448,
4079,
13220,
1769,
565,
5452,
18,
112... |
public NATMirage(ATObject dynamicParent, ATObject lexicalParent, NATIntercessiveMirror mirror, boolean parentType) { super(dynamicParent, lexicalParent, parentType); | public NATMirage(NATIntercessiveMirror mirror) { | public NATMirage(ATObject dynamicParent, ATObject lexicalParent, NATIntercessiveMirror mirror, boolean parentType) { super(dynamicParent, lexicalParent, parentType); mirror_ = mirror; } | 57139 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57139/48c9291154adf80addbe964a51750f5d02bb8019/NATMirage.java/buggy/src/edu/vub/at/objects/mirrors/NATMirage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
31395,
49,
481,
410,
12,
789,
921,
5976,
3054,
16,
14464,
921,
5275,
1706,
3054,
16,
31395,
2465,
614,
688,
13035,
15593,
16,
1250,
22822,
13,
288,
202,
202,
9565,
12,
14507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
31395,
49,
481,
410,
12,
789,
921,
5976,
3054,
16,
14464,
921,
5275,
1706,
3054,
16,
31395,
2465,
614,
688,
13035,
15593,
16,
1250,
22822,
13,
288,
202,
202,
9565,
12,
14507,
... |
PAToken patoken1, patoken2; data = context.popOperands(3); if (! (data[0] instanceof Boolean)) { throw new PainterException("ifelse: wrong arguments"); | data = context.popOperands(2); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("eq: wrong arguments"); | public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken1, patoken2; data = context.popOperands(3); if (! (data[0] instanceof Boolean)) { throw new PainterException("ifelse: wrong arguments"); } if (! (data[1] instanceof PAToken)) { throw new PainterException("ifelse: wrong arguments"); } if (! (data[2] instanceof PAToken)) { throw new PainterException("ifelse: wrong arguments"); } patoken1 = (PAToken) data[1]; patoken2 = (PAToken) data[2]; if (! (patoken1.type == PAToken.PROCEDURE)) { throw new PainterException("ifelse: wrong arguments"); } if (! (patoken2.type == PAToken.PROCEDURE)) { throw new PainterException("ifelse: wrong arguments"); } if ( ( (Boolean) data[0]).booleanValue()) { context.engine.process(patoken1); } else { context.engine.process(patoken2); } } | 4174 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4174/f1bf50c651cb7c4f69dfb32ac954ac18bacdb38c/PAContext.java/clean/src/com/lowagie/text/pdf/codec/postscript/PAContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1033,
501,
8526,
31,
3639,
17988,
969,
9670,
969,
21,
16,
9670,
969,
22,
31,
3639,
501,
273,
819,
18,
5120,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1033,
501,
8526,
31,
3639,
17988,
969,
9670,
969,
21,
16,
9670,
969,
22,
31,
3639,
501,
273,
819,
18,
5120,
... |
xPoints[0] = baseX - halfRoadWidth ; | xPoints[0] = baseX - halfRoadWidth[zoom] ; | private void paintRoads (Graphics g){ int exits = 0; int baseX, baseY, x, y; int [] xPoints = new int[4]; int [] yPoints = new int[4]; Color oldColor = g.getColor(); g.setColor(m_terrainColors[Terrain.ROAD]); for (Enumeration enum = roadHexIndexes.elements(); enum.hasMoreElements(); ){ int[] hex = (int[])enum.nextElement(); x = hex[0]; y = hex[1]; baseX = x *(hexSide + hexSideBySin30) + leftMargin + hexSide; baseY = (2*y + 1 + x%2)* hexSideByCos30 + topMargin; exits = hex[2]; // Is there a North exit? if ( 0 != (exits & 0x0001) ) { xPoints[0] = baseX - halfRoadWidth ; yPoints[0] = baseY; xPoints[1] = baseX - halfRoadWidth; yPoints[1] = baseY - hexSideByCos30; xPoints[2] = baseX + halfRoadWidth; yPoints[2] = baseY - hexSideByCos30; xPoints[3] = baseX + halfRoadWidth; yPoints[3] = baseY; g.drawPolygon(xPoints,yPoints,4); g.fillPolygon(xPoints,yPoints,4); } // Is there a North-East exit? if ( 0 != (exits & 0x0002) ) { xPoints[0] = baseX - halfRoadWidthBySin30; yPoints[0] = baseY - halfRoadWidthByCos30; xPoints[1] = (int) Math.round(baseX + 3*hexSide/4 - halfRoadWidthBySin30); yPoints[1] = (int) Math.round(baseY - hexSideByCos30/2 - halfRoadWidthByCos30); xPoints[2] = xPoints[1] + 2 * halfRoadWidthBySin30; yPoints[2] = yPoints[1] + 2 * halfRoadWidthByCos30; xPoints[3] = baseX + halfRoadWidthBySin30; yPoints[3] = baseY + halfRoadWidthByCos30; g.drawPolygon(xPoints,yPoints,4); g.fillPolygon(xPoints,yPoints,4); } // Is there a South-East exit? if ( 0 != (exits & 0x0004) ) { xPoints[0] = baseX + halfRoadWidthBySin30; yPoints[0] = baseY - halfRoadWidthByCos30; xPoints[1] = (int) Math.round(baseX + 3*hexSide/4 + halfRoadWidthBySin30); yPoints[1] = (int) Math.round(baseY + hexSideByCos30/2 - halfRoadWidthByCos30); xPoints[2] = xPoints[1] - 2 * halfRoadWidthBySin30; yPoints[2] = yPoints[1] + 2 * halfRoadWidthByCos30; xPoints[3] = baseX - halfRoadWidthBySin30; yPoints[3] = baseY + halfRoadWidthByCos30; g.drawPolygon(xPoints,yPoints,4); g.fillPolygon(xPoints,yPoints,4); } // Is there a South exit? if ( 0 != (exits & 0x0008) ) { xPoints[0] = baseX + halfRoadWidth; yPoints[0] = baseY; xPoints[1] = baseX + halfRoadWidth; yPoints[1] = baseY + hexSideByCos30; xPoints[2] = baseX - halfRoadWidth; yPoints[2] = baseY + hexSideByCos30; xPoints[3] = baseX - halfRoadWidth;; yPoints[3] = baseY; g.drawPolygon(xPoints,yPoints,4); g.fillPolygon(xPoints,yPoints,4); } // Is there a South-West exit? if ( 0 != (exits & 0x0010) ) { xPoints[0] = baseX + halfRoadWidthBySin30; yPoints[0] = baseY + halfRoadWidthByCos30; xPoints[1] = (int) Math.round(baseX - 3*hexSide/4 + halfRoadWidthBySin30); yPoints[1] = (int) Math.round(baseY + hexSideByCos30/2 + halfRoadWidthByCos30); xPoints[2] = xPoints[1] - 2*halfRoadWidthBySin30; yPoints[2] = yPoints[1] - 2*halfRoadWidthByCos30; xPoints[3] = baseX - halfRoadWidthBySin30; yPoints[3] = baseY - halfRoadWidthByCos30; g.drawPolygon(xPoints,yPoints,4); g.fillPolygon(xPoints,yPoints,4); } // Is there a North-West exit? if ( 0 != (exits & 0x0020) ) { xPoints[0] = baseX - halfRoadWidthBySin30; yPoints[0] = baseY + halfRoadWidthByCos30; xPoints[1] = (int) Math.round(baseX - 3*hexSide/4 - halfRoadWidthBySin30); yPoints[1] = (int) Math.round(baseY - hexSideByCos30/2 + halfRoadWidthByCos30); xPoints[2] = xPoints[1] + 2*halfRoadWidthBySin30;; yPoints[2] = yPoints[1] - 2*halfRoadWidthByCos30;; xPoints[3] = baseX + halfRoadWidthBySin30; yPoints[3] = baseY - halfRoadWidthByCos30; g.drawPolygon(xPoints,yPoints,4); g.fillPolygon(xPoints,yPoints,4); } } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/36d10b54ccf6d00fc7a7c781273e5aedbd43fab8/MiniMap.java/clean/megamek/src/megamek/client/ui/AWT/MiniMap.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
12574,
54,
6189,
87,
261,
17558,
314,
15329,
3639,
509,
19526,
273,
374,
31,
3639,
509,
1026,
60,
16,
1026,
61,
16,
619,
16,
677,
31,
3639,
509,
5378,
619,
5636,
273,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
12574,
54,
6189,
87,
261,
17558,
314,
15329,
3639,
509,
19526,
273,
374,
31,
3639,
509,
1026,
60,
16,
1026,
61,
16,
619,
16,
677,
31,
3639,
509,
5378,
619,
5636,
273,
394,
... |
reportGenericSchemaError("traverse simpleType error in element '" + name +"'"); | reportGenericSchemaError("traverse simpleType error in element '" + nameStr +"'"); | private QName traverseElementDecl(Element elementDecl) throws Exception { // General Attribute Checking int scope = isTopLevel(elementDecl)? GeneralAttrCheck.ELE_CONTEXT_GLOBAL: GeneralAttrCheck.ELE_CONTEXT_LOCAL; Hashtable attrValues = fGeneralAttrCheck.checkAttributes(elementDecl, scope); int contentSpecType = -1; int contentSpecNodeIndex = -1; int typeNameIndex = -1; int scopeDefined = -2; //signal a error if -2 gets gets through //cause scope can never be -2. DatatypeValidator dv = null; String name = elementDecl.getAttribute(SchemaSymbols.ATT_NAME); if ( DEBUGGING ) System.out.println("traversing element decl : " + name ); String ref = elementDecl.getAttribute(SchemaSymbols.ATT_REF); String type = elementDecl.getAttribute(SchemaSymbols.ATT_TYPE); String minOccurs = elementDecl.getAttribute(SchemaSymbols.ATT_MINOCCURS); String maxOccurs = elementDecl.getAttribute(SchemaSymbols.ATT_MAXOCCURS); String dflt = elementDecl.getAttribute(SchemaSymbols.ATT_DEFAULT); String fixed = elementDecl.getAttribute(SchemaSymbols.ATT_FIXED); if(!(dflt.equals("") || fixed.equals(""))) // REVISIT: localize reportGenericSchemaError("an element cannot have both \"fixed\" and \"default\" present at the same time"); String substitutionGroup = elementDecl.getAttribute(SchemaSymbols.ATT_SUBSTITUTIONGROUP); // form attribute String isQName = elementDecl.getAttribute(SchemaSymbols.ATT_FORM); String fromAnotherSchema = null; if (isTopLevel(elementDecl)) { if(name.equals("")) // REVISIT: localize reportGenericSchemaError("globally-declared element must have a name"); else if (!ref.equals("")) // REVISIT: localize reportGenericSchemaError("globally-declared element " + name + " cannot have a ref attribute"); int nameIndex = fStringPool.addSymbol(name); int eltKey = fSchemaGrammar.getElementDeclIndex(fTargetNSURI, nameIndex,TOP_LEVEL_SCOPE); if (eltKey > -1 ) { return new QName(-1,nameIndex,nameIndex,fTargetNSURI); } } // parse out 'block', 'final', 'nillable', 'abstract' String blockSetStr = null; Attr blockAttr = elementDecl.getAttributeNode( SchemaSymbols.ATT_BLOCK ); if (blockAttr != null) blockSetStr = blockAttr.getValue(); int blockSet = parseBlockSet(blockSetStr); if( (blockSetStr != null) && !blockSetStr.equals("") && (!blockSetStr.equals(SchemaSymbols.ATTVAL_POUNDALL) && (((blockSet & SchemaSymbols.RESTRICTION) == 0) && (((blockSet & SchemaSymbols.EXTENSION) == 0) && ((blockSet & SchemaSymbols.SUBSTITUTION) == 0))))) reportGenericSchemaError("The values of the 'block' attribute of an element must be either #all or a list of 'substitution', 'restriction' and 'extension'; " + blockSetStr + " was found"); String finalSetStr = null; Attr finalAttr = elementDecl.getAttributeNode( SchemaSymbols.ATT_FINAL ); if (finalAttr != null) finalSetStr = finalAttr.getValue(); int finalSet = parseFinalSet(finalSetStr); if( (finalSetStr != null) && !finalSetStr.equals("") && (!finalSetStr.equals(SchemaSymbols.ATTVAL_POUNDALL) && (((finalSet & SchemaSymbols.RESTRICTION) == 0) && ((finalSet & SchemaSymbols.EXTENSION) == 0)))) reportGenericSchemaError("The values of the 'final' attribute of an element must be either #all or a list of 'restriction' and 'extension'; " + finalSetStr + " was found"); boolean isNillable = elementDecl.getAttribute (SchemaSymbols.ATT_NILLABLE).equals(SchemaSymbols.ATTVAL_TRUE)? true:false; boolean isAbstract = elementDecl.getAttribute (SchemaSymbols.ATT_ABSTRACT).equals(SchemaSymbols.ATTVAL_TRUE)? true:false; int elementMiscFlags = 0; if (isNillable) { elementMiscFlags += SchemaSymbols.NILLABLE; } if (isAbstract) { elementMiscFlags += SchemaSymbols.ABSTRACT; } // make the property of the element's value being fixed also appear in elementMiscFlags if(!fixed.equals("")) elementMiscFlags += SchemaSymbols.FIXED; //if this is a reference to a global element if (!ref.equals("")) { //REVISIT top level check for ref if (!type.equals("") || (elementMiscFlags > 0) || (finalSetStr != null && finalSet > 0) || (blockSetStr != null && blockSet > 0) || !dflt.equals("") || !fixed.equals("")) reportSchemaError(SchemaMessageProvider.BadAttWithRef, null); if (!name.equals("")) // REVISIT: Localize reportGenericSchemaError("element " + name + " cannot also have a ref attribute"); Element child = XUtil.getFirstChildElement(elementDecl); if(child != null && child.getLocalName().equals(SchemaSymbols.ELT_ANNOTATION)) { if (XUtil.getNextSiblingElement(child) != null) reportSchemaError(SchemaMessageProvider.NoContentForRef, null); else traverseAnnotationDecl(child); } else if (child != null) reportSchemaError(SchemaMessageProvider.NoContentForRef, null); String prefix = ""; String localpart = ref; int colonptr = ref.indexOf(":"); if ( colonptr > 0) { prefix = ref.substring(0,colonptr); localpart = ref.substring(colonptr+1); } int localpartIndex = fStringPool.addSymbol(localpart); String uriString = resolvePrefixToURI(prefix); QName eltName = new QName(prefix != null ? fStringPool.addSymbol(prefix) : -1, localpartIndex, fStringPool.addSymbol(ref), uriString != null ? fStringPool.addSymbol(uriString) : StringPool.EMPTY_STRING); //if from another schema, just return the element QName if (! uriString.equals(fTargetNSURIString) ) { return eltName; } int elementIndex = fSchemaGrammar.getElementDeclIndex(eltName, TOP_LEVEL_SCOPE); //if not found, traverse the top level element that if referenced if (elementIndex == -1 ) { Element targetElement = getTopLevelComponentByName(SchemaSymbols.ELT_ELEMENT,localpart); if (targetElement == null ) { // REVISIT: Localize reportGenericSchemaError("Element " + localpart + " not found in the Schema"); //REVISIT, for now, the QName anyway return eltName; //return new QName(-1,fStringPool.addSymbol(localpart), -1, fStringPool.addSymbol(uriString)); } else { // do nothing here, other wise would cause infinite loop for // <element name="recur"><complexType><element ref="recur"> ... //eltName= traverseElementDecl(targetElement); } } return eltName; } else if (name.equals("")) // REVISIT: Localize reportGenericSchemaError("a local element must have a name or a ref attribute present"); // Handle the substitutionGroup Element substitutionGroupElementDecl = null; int substitutionGroupElementDeclIndex = -1; boolean noErrorSoFar = true; String substitutionGroupUri = null; String substitutionGroupLocalpart = null; String substitutionGroupFullName = null; ComplexTypeInfo substitutionGroupEltTypeInfo = null; DatatypeValidator substitutionGroupEltDV = null; if ( substitutionGroup.length() > 0 ) { if(!ref.equals("")) // REVISIT: Localize reportGenericSchemaError("a local element cannot have a substitutionGroup"); substitutionGroupUri = resolvePrefixToURI(getPrefix(substitutionGroup)); substitutionGroupLocalpart = getLocalPart(substitutionGroup); substitutionGroupFullName = substitutionGroupUri+","+substitutionGroupLocalpart; if ( !substitutionGroupUri.equals(fTargetNSURIString) ) { substitutionGroupEltTypeInfo = getElementDeclTypeInfoFromNS(substitutionGroupUri, substitutionGroupLocalpart); if (substitutionGroupEltTypeInfo == null) { substitutionGroupEltDV = getElementDeclTypeValidatorFromNS(substitutionGroupUri, substitutionGroupLocalpart); if (substitutionGroupEltDV == null) { //TO DO: report error here; noErrorSoFar = false; reportGenericSchemaError("Could not find type for element '" +substitutionGroupLocalpart + "' in schema '" + substitutionGroupUri+"'"); } } } else { substitutionGroupElementDecl = getTopLevelComponentByName(SchemaSymbols.ELT_ELEMENT, substitutionGroupLocalpart); if (substitutionGroupElementDecl == null) { substitutionGroupElementDeclIndex = fSchemaGrammar.getElementDeclIndex(fTargetNSURI, getLocalPartIndex(substitutionGroup),TOP_LEVEL_SCOPE); if ( substitutionGroupElementDeclIndex == -1) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("unable to locate substitutionGroup affiliation element " +substitutionGroup +" in element declaration " +name); } } else { substitutionGroupElementDeclIndex = fSchemaGrammar.getElementDeclIndex(fTargetNSURI, getLocalPartIndex(substitutionGroup),TOP_LEVEL_SCOPE); if ( substitutionGroupElementDeclIndex == -1) { traverseElementDecl(substitutionGroupElementDecl); substitutionGroupElementDeclIndex = fSchemaGrammar.getElementDeclIndex(fTargetNSURI, getLocalPartIndex(substitutionGroup),TOP_LEVEL_SCOPE); } } if (substitutionGroupElementDeclIndex != -1) { substitutionGroupEltTypeInfo = fSchemaGrammar.getElementComplexTypeInfo( substitutionGroupElementDeclIndex ); if (substitutionGroupEltTypeInfo == null) { fSchemaGrammar.getElementDecl(substitutionGroupElementDeclIndex, fTempElementDecl); substitutionGroupEltDV = fTempElementDecl.datatypeValidator; if (substitutionGroupEltDV == null) { //TO DO: report error here; noErrorSoFar = false; reportGenericSchemaError("Could not find type for element '" +substitutionGroupLocalpart + "' in schema '" + substitutionGroupUri+"'"); } } } } } // // resolving the type for this element right here // ComplexTypeInfo typeInfo = null; // element has a single child element, either a datatype or a type, null if primitive Element child = XUtil.getFirstChildElement(elementDecl); if(child != null && child.getLocalName().equals(SchemaSymbols.ELT_ANNOTATION)) { traverseAnnotationDecl(child); child = XUtil.getNextSiblingElement(child); } if(child != null && child.getLocalName().equals(SchemaSymbols.ELT_ANNOTATION)) // REVISIT: Localize reportGenericSchemaError("element declarations can contain at most one annotation Element Information Item"); boolean haveAnonType = false; // Handle Anonymous type if there is one if (child != null) { String childName = child.getLocalName(); if (childName.equals(SchemaSymbols.ELT_COMPLEXTYPE)) { if (child.getAttribute(SchemaSymbols.ATT_NAME).length() > 0) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("anonymous complexType in element '" + name +"' has a name attribute"); } else { // Determine what the type name will be String anonTypeName = genAnonTypeName(child); if (fCurrentTypeNameStack.search((Object)anonTypeName) > - 1) { // A recursing element using an anonymous type int uriInd = StringPool.EMPTY_STRING; if ( isQName.equals(SchemaSymbols.ATTVAL_QUALIFIED)|| fElementDefaultQualified) { uriInd = fTargetNSURI; } int nameIndex = fStringPool.addSymbol(name); QName tempQName = new QName(fCurrentScope, nameIndex, nameIndex, uriInd); fElementRecurseComplex.put(tempQName, anonTypeName); return new QName(-1, nameIndex, nameIndex, uriInd); } else { typeNameIndex = traverseComplexTypeDecl(child); if (typeNameIndex != -1 ) { typeInfo = (ComplexTypeInfo) fComplexTypeRegistry.get(fStringPool.toString(typeNameIndex)); } else { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("traverse complexType error in element '" + name +"'"); } } } haveAnonType = true; child = XUtil.getNextSiblingElement(child); } else if (childName.equals(SchemaSymbols.ELT_SIMPLETYPE)) { if (child.getAttribute(SchemaSymbols.ATT_NAME).length() > 0) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("anonymous simpleType in element '" + name +"' has a name attribute"); } else typeNameIndex = traverseSimpleTypeDecl(child); if (typeNameIndex != -1) { dv = fDatatypeRegistry.getDatatypeValidator(fStringPool.toString(typeNameIndex)); } else { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("traverse simpleType error in element '" + name +"'"); } contentSpecType = XMLElementDecl.TYPE_SIMPLE; haveAnonType = true; child = XUtil.getNextSiblingElement(child); } else if (type.equals("")) { // "ur-typed" leaf contentSpecType = XMLElementDecl.TYPE_ANY; //REVISIT: is this right? //contentSpecType = fStringPool.addSymbol("UR_TYPE"); // set occurrence count contentSpecNodeIndex = -1; } // see if there's something here; it had better be key, keyref or unique. if (child != null) childName = child.getLocalName(); while ((child != null) && ((childName.equals(SchemaSymbols.ELT_KEY)) || (childName.equals(SchemaSymbols.ELT_KEYREF)) || (childName.equals(SchemaSymbols.ELT_UNIQUE)))) { child = XUtil.getNextSiblingElement(child); if (child != null) { childName = child.getLocalName(); } } if (child != null) { // REVISIT: Localize noErrorSoFar = false; reportGenericSchemaError("the content of an element information item must match (annotation?, (simpleType | complexType)?, (unique | key | keyref)*)"); } } // handle type="" here if (haveAnonType && (type.length()>0)) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError( "Element '"+ name + "' have both a type attribute and a annoymous type child" ); } // type specified as an attribute and no child is type decl. else if (!type.equals("")) { String prefix = ""; String localpart = type; int colonptr = type.indexOf(":"); if ( colonptr > 0) { prefix = type.substring(0,colonptr); localpart = type.substring(colonptr+1); } String typeURI = resolvePrefixToURI(prefix); // check if the type is from the same Schema if ( !typeURI.equals(fTargetNSURIString) && !typeURI.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA) && typeURI.length() != 0) { // REVISIT, only needed because of resolvePrifixToURI. fromAnotherSchema = typeURI; typeInfo = getTypeInfoFromNS(typeURI, localpart); if (typeInfo == null) { dv = getTypeValidatorFromNS(typeURI, localpart); if (dv == null) { //TO DO: report error here; noErrorSoFar = false; reportGenericSchemaError("Could not find type " +localpart + " in schema " + typeURI); } } } else { typeInfo = (ComplexTypeInfo) fComplexTypeRegistry.get(typeURI+","+localpart); if (typeInfo == null) { dv = getDatatypeValidator(typeURI, localpart); if (dv == null ) if (typeURI.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA) && !fTargetNSURIString.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA)) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("type not found : " + typeURI+":"+localpart); } else { Element topleveltype = getTopLevelComponentByName(SchemaSymbols.ELT_COMPLEXTYPE,localpart); if (topleveltype != null) { if (fCurrentTypeNameStack.search((Object)localpart) > - 1) { //then we found a recursive element using complexType. // REVISIT: this will be broken when recursing happens between 2 schemas int uriInd = StringPool.EMPTY_STRING; if ( isQName.equals(SchemaSymbols.ATTVAL_QUALIFIED)|| fElementDefaultQualified) { uriInd = fTargetNSURI; } int nameIndex = fStringPool.addSymbol(name); QName tempQName = new QName(fCurrentScope, nameIndex, nameIndex, uriInd); fElementRecurseComplex.put(tempQName, localpart); return new QName(-1, nameIndex, nameIndex, uriInd); } else { typeNameIndex = traverseComplexTypeDecl( topleveltype ); typeInfo = (ComplexTypeInfo) fComplexTypeRegistry.get(fStringPool.toString(typeNameIndex)); } } else { topleveltype = getTopLevelComponentByName(SchemaSymbols.ELT_SIMPLETYPE, localpart); if (topleveltype != null) { typeNameIndex = traverseSimpleTypeDecl( topleveltype ); dv = getDatatypeValidator(typeURI, localpart); } else { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("type not found : " + typeURI+":"+localpart); } } } } } } // now we need to make sure that our substitution (if any) // is valid, now that we have all the requisite type-related info. if(substitutionGroup.length() > 0) { checkSubstitutionGroupOK(elementDecl, substitutionGroupElementDecl, noErrorSoFar, substitutionGroupElementDeclIndex, typeInfo, substitutionGroupEltTypeInfo, dv, substitutionGroupEltDV); } // this element is ur-type, check its substitutionGroup affiliation. // if there is substitutionGroup affiliation and not type definition found for this element, // then grab substitutionGroup affiliation's type and give it to this element if ( noErrorSoFar && typeInfo == null && dv == null ) { typeInfo = substitutionGroupEltTypeInfo; dv = substitutionGroupEltDV; } if (typeInfo == null && dv==null) { if (noErrorSoFar) { // Actually this Element's type definition is ur-type; contentSpecType = XMLElementDecl.TYPE_ANY; // REVISIT, need to wait till we have wildcards implementation. // ADD attribute wildcards here } else { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError ("untyped element : " + name ); } } // if element belongs to a compelx type if (typeInfo!=null) { contentSpecNodeIndex = typeInfo.contentSpecHandle; contentSpecType = typeInfo.contentType; scopeDefined = typeInfo.scopeDefined; dv = typeInfo.datatypeValidator; } // if element belongs to a simple type if (dv!=null) { contentSpecType = XMLElementDecl.TYPE_SIMPLE; if (typeInfo == null) { fromAnotherSchema = null; // not to switch schema in this case } } // Now we can handle validation etc. of default and fixed attributes, // since we finally have all the type information. if(!fixed.equals("")) dflt = fixed; if(!dflt.equals("")) { if(dv == null) { // in this case validate according to xs:string new StringDatatypeValidator().validate(dflt, null); } else { dv.validate(dflt, null); } if(typeInfo != null && (typeInfo.contentType != XMLElementDecl.TYPE_MIXED_SIMPLE && typeInfo.contentType != XMLElementDecl.TYPE_MIXED_COMPLEX && typeInfo.contentType != XMLElementDecl.TYPE_SIMPLE)) { // REVISIT: Localize reportGenericSchemaError ("element " + name + " has a fixed or default value and must have a mixed or simple content model"); } } // // Create element decl // int elementNameIndex = fStringPool.addSymbol(name); int localpartIndex = elementNameIndex; int uriIndex = StringPool.EMPTY_STRING; int enclosingScope = fCurrentScope; //refer to 4.3.2 in "XML Schema Part 1: Structures" if ( isTopLevel(elementDecl)) { uriIndex = fTargetNSURI; enclosingScope = TOP_LEVEL_SCOPE; } else if ( !isQName.equals(SchemaSymbols.ATTVAL_UNQUALIFIED) && (( isQName.equals(SchemaSymbols.ATTVAL_QUALIFIED)|| fElementDefaultQualified ))) { uriIndex = fTargetNSURI; } //There can never be two elements with the same name and different type in the same scope. int existSuchElementIndex = fSchemaGrammar.getElementDeclIndex(uriIndex, localpartIndex, enclosingScope); if ( existSuchElementIndex > -1) { fSchemaGrammar.getElementDecl(existSuchElementIndex, fTempElementDecl); DatatypeValidator edv = fTempElementDecl.datatypeValidator; ComplexTypeInfo eTypeInfo = fSchemaGrammar.getElementComplexTypeInfo(existSuchElementIndex); if ( ((eTypeInfo != null)&&(eTypeInfo!=typeInfo)) || ((edv != null)&&(edv != dv)) ) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("duplicate element decl in the same scope : " + fStringPool.toString(localpartIndex)); } } QName eltQName = new QName(-1,localpartIndex,elementNameIndex,uriIndex); // add element decl to pool int attrListHead = -1 ; // copy up attribute decls from type object if (typeInfo != null) { attrListHead = typeInfo.attlistHead; } int elementIndex = fSchemaGrammar.addElementDecl(eltQName, enclosingScope, scopeDefined, contentSpecType, contentSpecNodeIndex, attrListHead, dv); if ( DEBUGGING ) { /***/ System.out.println("########elementIndex:"+elementIndex+" ("+fStringPool.toString(eltQName.uri)+"," + fStringPool.toString(eltQName.localpart) + ")"+ " eltType:"+type+" contentSpecType:"+contentSpecType+ " SpecNodeIndex:"+ contentSpecNodeIndex +" enclosingScope: " +enclosingScope + " scopeDefined: " +scopeDefined+"\n"); /***/ } fSchemaGrammar.setElementComplexTypeInfo(elementIndex, typeInfo); // REVISIT: should we report error if typeInfo was null? // mark element if its type belongs to different Schema. fSchemaGrammar.setElementFromAnotherSchemaURI(elementIndex, fromAnotherSchema); // set BlockSet, FinalSet, Nillable and Abstract for this element decl fSchemaGrammar.setElementDeclBlockSet(elementIndex, blockSet); fSchemaGrammar.setElementDeclFinalSet(elementIndex, finalSet); fSchemaGrammar.setElementDeclMiscFlags(elementIndex, elementMiscFlags); fSchemaGrammar.setElementDefault(elementIndex, dflt); // setSubstitutionGroupElementFullName fSchemaGrammar.setElementDeclSubstitutionGroupElementFullName(elementIndex, substitutionGroupFullName); // // key/keyref/unique processing // Element ic = XUtil.getFirstChildElementNS(elementDecl, IDENTITY_CONSTRAINTS); if (ic != null) { Integer elementIndexObj = new Integer(elementIndex); Vector identityConstraints = (Vector)fIdentityConstraints.get(elementIndexObj); if (identityConstraints == null) { identityConstraints = new Vector(); fIdentityConstraints.put(elementIndexObj, identityConstraints); } while (ic != null) { if (DEBUG_IC_DATATYPES) { System.out.println("<ICD>: adding ic for later traversal: "+ic); } identityConstraints.addElement(ic); ic = XUtil.getNextSiblingElementNS(ic, IDENTITY_CONSTRAINTS); } } return eltQName; }// end of method traverseElementDecl(Element) | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/db50512047bd38712dbc3a9d35ed787e6f2582f4/TraverseSchema.java/clean/src/org/apache/xerces/validators/schema/TraverseSchema.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
16723,
10080,
1046,
3456,
12,
1046,
930,
3456,
13,
1216,
1185,
288,
3639,
368,
9544,
3601,
24471,
3639,
509,
2146,
273,
353,
27046,
12,
2956,
3456,
9945,
10792,
9544,
3843,
1564,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
16723,
10080,
1046,
3456,
12,
1046,
930,
3456,
13,
1216,
1185,
288,
3639,
368,
9544,
3601,
24471,
3639,
509,
2146,
273,
353,
27046,
12,
2956,
3456,
9945,
10792,
9544,
3843,
1564,
18,
... |
if (s1==null && s2==null) { result = 0; } else if (s2==null) { result = 1; } else if (s1==null) { result = -1; } else { result = s1.compareToIgnoreCase (s2); } | result = compareString(s1, s2); | public int compare ( Object o1, Object o2) { int result = -1; if(m_criterion==null) m_criterion = SORTED_BY_TITLE; /************* for sorting site list *******************/ if (m_criterion.equals (SORTED_BY_TITLE)) { // sorted by the worksite title String s1 = ((Site) o1).getTitle(); String s2 = ((Site) o2).getTitle(); result = s1.compareToIgnoreCase (s2); } else if (m_criterion.equals (SORTED_BY_DESCRIPTION)) { // sorted by the site short description String s1 = ((Site) o1).getShortDescription(); String s2 = ((Site) o2).getShortDescription(); if (s1==null && s2==null) { result = 0; } else if (s2==null) { result = 1; } else if (s1==null) { result = -1; } else { result = s1.compareToIgnoreCase (s2); } } else if (m_criterion.equals (SORTED_BY_TYPE)) { // sorted by the site type String s1 = ((Site) o1).getType(); String s2 = ((Site) o2).getType(); if (s1==null && s2==null) { result = 0; } else if (s2==null) { result = 1; } else if (s1==null) { result = -1; } else { result = s1.compareToIgnoreCase (s2); } } else if (m_criterion.equals (SORTED_BY_OWNER)) { // sorted by the site creator String s1 = ((Site) o1).getProperties().getProperty("CHEF:creator"); String s2 = ((Site) o2).getProperties().getProperty("CHEF:creator"); if (s1==null && s2==null) { result = 0; } else if (s2==null) { result = 1; } else if (s1==null) { result = -1; } else { result = s1.compareToIgnoreCase (s2); } } else if (m_criterion.equals (SORTED_BY_STATUS)) { // sort by the status, published or unpublished int i1 = ((Site)o1).isPublished() ? 1 : 0; int i2 = ((Site)o2).isPublished() ? 1 : 0; if (i1 > i2) { result = 1; } else { result = -1; } } else if (m_criterion.equals (SORTED_BY_JOINABLE)) { // sort by whether the site is joinable or not boolean b1 = ((Site)o1).isJoinable(); boolean b2 = ((Site)o2).isJoinable(); if (b1 == b2) { result = 0; } else if (b1 == true) { result = 1; } else { result = -1; } } else if (m_criterion.equals (SORTED_BY_PARTICIPANT_NAME)) { // sort by whether the site is joinable or not String s1 = null; if (o1.getClass().equals(Participant.class)) { s1 = ((Participant) o1).getName(); } else if (o1.getClass().equals(CourseMember.class)) { s1 = ((CourseMember) o1).getName(); } String s2 = null; if (o2.getClass().equals(Participant.class)) { s2 = ((Participant) o2).getName(); } else if (o2.getClass().equals(CourseMember.class)) { s2 = ((CourseMember) o2).getName(); } if (s1==null && s2==null) { result = 0; } else if (s2==null) { result = 1; } else if (s1==null) { result = -1; } else { result = s1.compareToIgnoreCase (s2); } } else if (m_criterion.equals (SORTED_BY_PARTICIPANT_UNIQNAME)) { // sort by whether the site is joinable or not String s1 = null; if (o1.getClass().equals(Participant.class)) { s1 = ((Participant) o1).getUniqname(); } else if (o1.getClass().equals(CourseMember.class)) { s1 = ((CourseMember) o1).getUniqname(); } String s2 = null; if (o2.getClass().equals(Participant.class)) { s2 = ((Participant) o2).getUniqname(); } else if (o2.getClass().equals(CourseMember.class)) { s2 = ((CourseMember) o2).getUniqname(); } if (s1==null && s2==null) { result = 0; } else if (s2==null) { result = 1; } else if (s1==null) { result = -1; } else { result = s1.compareToIgnoreCase (s2); } } else if (m_criterion.equals (SORTED_BY_PARTICIPANT_ROLE)) { String s1 = ""; if (o1.getClass().equals(Participant.class)) { s1 = ((Participant) o1).getRole(); } else if (o1.getClass().equals(CourseMember.class)) { s1 = ((CourseMember) o1).getRole(); } String s2 = ""; if (o2.getClass().equals(Participant.class)) { s2 = ((Participant) o2).getRole(); } else if (o2.getClass().equals(CourseMember.class)) { s2 = ((CourseMember) o2).getRole(); } if (s1.length() == 0 && s2.length() == 0) { result = 0; } else if (s2.length() == 0) { result = 1; } else if (s1.length() == 0) { result = -1; } else { result = s1.compareToIgnoreCase (s2); } } else if (m_criterion.equals (SORTED_BY_PARTICIPANT_COURSE)) { // sort by whether the site is joinable or not String s1 = null; if (o1.getClass().equals(Participant.class)) { } else if (o1.getClass().equals(CourseMember.class)) { s1 = ((CourseMember) o1).getCourse() + " " + ((CourseMember) o1).getSection(); } String s2 = null; if (o2.getClass().equals(Participant.class)) { } else if (o2.getClass().equals(CourseMember.class)) { s2 = ((CourseMember) o2).getCourse() + " " + ((CourseMember) o2).getSection(); } if (s1==null && s2==null) { result = 0; } else if (s2==null) { result = 1; } else if (s1==null) { result = -1; } else { result = s1.compareToIgnoreCase (s2); } } else if (m_criterion.equals (SORTED_BY_PARTICIPANT_ID)) { int i1 = -1; if (o1.getClass().equals(Participant.class)) { } else if (o1.getClass().equals(CourseMember.class)) { try { i1 = Integer.parseInt(((CourseMember) o1).getUniqname()); } catch (Exception e) {} } int i2 = -1; if (o2.getClass().equals(Participant.class)) { } else if (o2.getClass().equals(CourseMember.class)) { try { i2 = Integer.parseInt(((CourseMember) o2).getUniqname()); } catch (Exception e) {} } if (i1 > i2) { result = 1; } else { result = -1; } } else if (m_criterion.equals (SORTED_BY_PARTICIPANT_CREDITS)) { int i1 = -1; if (o1.getClass().equals(Participant.class)) { } else if (o1.getClass().equals(CourseMember.class)) { try { i1 = Integer.parseInt(((CourseMember) o1).getCredits()); } catch (Exception e) {} } int i2 = -1; if (o2.getClass().equals(Participant.class)) { } else if (o2.getClass().equals(CourseMember.class)) { try { i2 = Integer.parseInt(((CourseMember) o2).getCredits()); } catch (Exception e) {} } if (i1 > i2) { result = 1; } else { result = -1; } } else if (m_criterion.equals (SORTED_BY_CREATION_DATE)) { // sort by the site's creation date Time t1 = null; Time t2 = null; // get the times try { t1 = ((Site)o1).getProperties().getTimeProperty(ResourceProperties.PROP_CREATION_DATE); } catch (EntityPropertyNotDefinedException e) { } catch (EntityPropertyTypeException e) { } try { t2 = ((Site)o2).getProperties().getTimeProperty(ResourceProperties.PROP_CREATION_DATE); } catch (EntityPropertyNotDefinedException e) { } catch (EntityPropertyTypeException e) { } if (t1==null) { result = -1; } else if (t2==null) { result = 1; } else if (t1.before (t2)) { result = -1; } else { result = 1; } } else if (m_criterion.equals (rb.getString("group.title"))) { // sorted by the group title String s1 = ((Group) o1).getTitle(); String s2 = ((Group) o2).getTitle(); result = s1.compareToIgnoreCase (s2); } else if (m_criterion.equals (rb.getString("group.number"))) { // sorted by the group title int n1 = ((Group) o1).getMembers().size(); int n2 = ((Group) o2).getMembers().size(); result = (n1 > n2)?1:-1; } else if (m_criterion.equals (SORTED_BY_MEMBER_NAME)) { // sorted by the member name String s1 = ""; String s2 = ""; try { s1 = UserDirectoryService.getUser(((Member) o1).getUserId()).getSortName(); } catch(Exception ignore) { } try { s2 = UserDirectoryService.getUser(((Member) o2).getUserId()).getSortName(); } catch (Exception ignore) { } result = s1.compareToIgnoreCase (s2); } if(m_asc == null) m_asc = Boolean.TRUE.toString (); // sort ascending or descending if (m_asc.equals (Boolean.FALSE.toString ())) { result = -result; } return result; } // compare | 52180 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52180/cd96d1cb98d195f00fe949b9afc2c0a87ff1d2bd/SiteAction.java/buggy/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
509,
3400,
261,
1033,
320,
21,
16,
1033,
320,
22,
13,
202,
202,
95,
1082,
202,
474,
563,
273,
300,
21,
31,
25083,
202,
430,
12,
81,
67,
71,
7082,
631,
2011,
13,
312,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
509,
3400,
261,
1033,
320,
21,
16,
1033,
320,
22,
13,
202,
202,
95,
1082,
202,
474,
563,
273,
300,
21,
31,
25083,
202,
430,
12,
81,
67,
71,
7082,
631,
2011,
13,
312,
67,
... |
}else if (atom.getRingSize()==3) { | }else if (atomRingSize==3) { | public AtomType findMatchingAtomType(AtomContainer atomContainer, Atom atomInterface) throws CDKException { org.openscience.cdk.Atom atom = (org.openscience.cdk.Atom)atomInterface; //System.out.println("****** Configure MM2 AtomType via findMatching ******"); //System.out.print(" Symbol:" + atom.getSymbol() +" HoseCode>" + atom.getSphericalMatcher() + " "); logger.debug(" Symbol:" + atom.getSymbol() +" HoseCode>" + atom.getSphericalMatcher() + " "); try { factory = AtomTypeFactory.getInstance("org/openscience/cdk/config/data/mm2_atomtypes.xml"); } catch (Exception ex1) { logger.error(ex1.getMessage()); logger.debug(ex1); } if (atom instanceof PseudoAtom) { return factory.getAtomTypes("DU")[0]; } Pattern p1 = null; String ID = ""; boolean atomTypeFlag = false; Matcher mat1=null; double tmpMaxBondOrder = 0; maxBondOrder = atomContainer.getMaximumBondOrder(atom); //System.out.println("Atom maxBond"+maxBondOrder+" ChemicalGroupConstant"+atom.getChemicalGroupConstant()); for (int j = 0; j < atomTypeIds.length; j++){ tmpMaxBondOrder = factory.getAtomType(atomTypeIds[j]).getMaxBondOrder(); logger.debug(j + "ATOM TYPE "+ tmpMaxBondOrder + " " +factory.getAtomType(atomTypeIds[j]).getSphericalMatcher()); p1 =Pattern.compile(factory.getAtomType(atomTypeIds[j]).getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches()) { ID = atomTypeIds[j]; if (atomTypeIds[j].equals("C")) { if (atom.getChemicalGroupConstant()!=-1) { if (atom.getRingSize()==3) { ID="CR3R"; }else if (atom.getChemicalGroupConstant()==5){ ID="Car"; }else if (maxBondOrder>1) { ID="Csp2"; } } if (atom.getSymbol().equals("S")){ if (atom.getChemicalGroupConstant()==8){ ID="Sthi"; }else{ p1 = Pattern.compile(factory.getAtomType("S").getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches()) { ID="S"; } } } } else if (atomTypeIds[j].equals("Csp2")) { if (atom.getChemicalGroupConstant()!=-1) { if (atom.getChemicalGroupConstant()==5) { ID="Car"; }else if (atom.getRingSize()==3) { ID="CE3R"; } } p1 = Pattern.compile(factory.getAtomType("C=").getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches()) { ID="C="; } } else if (atomTypeIds[j].equals("O")) { //OH/Ether if (atom.getChemicalGroupConstant()!=-1) { if (atom.getChemicalGroupConstant()==6){ ID="Oar";//furan }else if (atom.getRingSize()==3) { ID="OR";//epoxy } } p1 = Pattern.compile(factory.getAtomType("OX").getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches() & atom.getChemicalGroupConstant()==-1) { ID="OX"; } } else if (atomTypeIds[j].equals("N")) {//n sp3 if (atomContainer.getMaximumBondOrder(atom)>1 & atomContainer.getMaximumBondOrder(atom)<3){ ID="Nsp2"; } if (atom.getChemicalGroupConstant()==4) { ID="NPYL";//Pyrole }else if (atom.getChemicalGroupConstant()==10){ ID="-N="; p1 = Pattern.compile(factory.getAtomType("NPD+").getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches()) { ID="NPD+"; } }else{ //Amid p1 = Pattern.compile(factory.getAtomType("Namid").getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches() & atom.getChemicalGroupConstant()==-1) { ID="Nsp2"; }else{ p1 = Pattern.compile(factory.getAtomType("N2OX").getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches() & atom.getChemicalGroupConstant()==-1) { ID="N2OX"; } } } } else if (atomTypeIds[j].equals("Nsp2")) { if (atom.getChemicalGroupConstant()==12) { ID="=N-";//Pyridin } //Azo p1 = Pattern.compile(factory.getAtomType("-N=").getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches() & atom.getChemicalGroupConstant()==-1) { ID="-N="; }else{ p1 = Pattern.compile(factory.getAtomType("N=C").getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches()) { ID="N=C"; } p1 = Pattern.compile(factory.getAtomType("N2OX").getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches()) { ID="N2OX"; } p1 = Pattern.compile(factory.getAtomType("NO2").getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches()) { ID="NO2"; } p1 = Pattern.compile(factory.getAtomType("=N=").getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches()) { ID="=N="; } } } else if (atomTypeIds[j].equals("HS")) { if (atom.getMaxBondOrder() > 1) { ID="HC"; } } else if (atomTypeIds[j].equals("HO")) { //Enol,amid p1 = Pattern.compile(factory.getAtomType("HOC").getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches() & atom.getChemicalGroupConstant()==-1) { ID="HN2"; } //COOH p1 = Pattern.compile(factory.getAtomType("HOCO").getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches() & atom.getChemicalGroupConstant()==-1) { ID="HOCO"; } } else if (atomTypeIds[j].equals("HN")) { p1 = Pattern.compile(factory.getAtomType("HN2").getSphericalMatcher()); mat1 = p1.matcher(atom.getSphericalMatcher()); if (mat1.matches()) { ID="HN2"; } } atomTypeFlag = true; //System.out.println(" MATCH AtomTypeID:"+j+ " " + ID); logger.debug(" MATCH AtomTypeID:"+j+ " " + ID); break; }//IF }//for end if (atomTypeFlag) { atomTypeFlag = false; //System.out.println("ID in factory true:"+ID); return factory.getAtomType(ID); } else { //System.out.println("NoSuchAtomTypeException: Atom is unkown with Symbol:" + atom.getSymbol() + " does not MATCH AtomType. HoseCode:" + atom.getSphericalMatcher()); //System.out.println("ID in factory false:"+ID); return factory.getAtomType("DU"); } } | 45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/53b7038bf76a67276cd51466afb62126fb362c25/MM2AtomTypeMatcher.java/clean/src/org/openscience/cdk/atomtype/MM2AtomTypeMatcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
7149,
559,
1104,
9517,
3641,
559,
12,
3641,
2170,
22487,
16,
7149,
3179,
1358,
13,
1216,
24570,
288,
202,
202,
3341,
18,
20346,
71,
6254,
18,
71,
2883,
18,
3641,
3179,
273,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7149,
559,
1104,
9517,
3641,
559,
12,
3641,
2170,
22487,
16,
7149,
3179,
1358,
13,
1216,
24570,
288,
202,
202,
3341,
18,
20346,
71,
6254,
18,
71,
2883,
18,
3641,
3179,
273,
26... |
{ if (sql_type == -1) { ResultSet result = (postgresql.ResultSet)conn.ExecSQL("select typname from pg_type where oid = " + oid); if (result.getColumnCount() != 1 || result.getTupleCount() != 1) throw new SQLException("Unexpected return from query for type"); result.next(); type_name = result.getString(1); if (type_name.equals("int2")) sql_type = Types.SMALLINT; else if (type_name.equals("int4")) sql_type = Types.INTEGER; else if (type_name.equals("int8")) sql_type = Types.BIGINT; else if (type_name.equals("cash")) sql_type = Types.DECIMAL; else if (type_name.equals("money")) sql_type = Types.DECIMAL; else if (type_name.equals("float4")) sql_type = Types.REAL; else if (type_name.equals("float8")) sql_type = Types.DOUBLE; else if (type_name.equals("bpchar")) sql_type = Types.CHAR; else if (type_name.equals("varchar")) sql_type = Types.VARCHAR; else if (type_name.equals("bool")) sql_type = Types.BIT; else if (type_name.equals("date")) sql_type = Types.DATE; else if (type_name.equals("time")) sql_type = Types.TIME; else if (type_name.equals("abstime")) sql_type = Types.TIMESTAMP; else sql_type = Types.OTHER; } return sql_type; } | { if (sql_type == -1) { ResultSet result = (postgresql.ResultSet)conn.ExecSQL("select typname from pg_type where oid = " + oid); if (result.getColumnCount() != 1 || result.getTupleCount() != 1) throw new SQLException("Unexpected return from query for type"); result.next(); type_name = result.getString(1); if (type_name.equals("int2")) sql_type = Types.SMALLINT; else if (type_name.equals("int4")) sql_type = Types.INTEGER; else if (type_name.equals("int8")) sql_type = Types.BIGINT; else if (type_name.equals("cash")) sql_type = Types.DECIMAL; else if (type_name.equals("money")) sql_type = Types.DECIMAL; else if (type_name.equals("float4")) sql_type = Types.REAL; else if (type_name.equals("float8")) sql_type = Types.DOUBLE; else if (type_name.equals("bpchar")) sql_type = Types.CHAR; else if (type_name.equals("varchar")) sql_type = Types.VARCHAR; else if (type_name.equals("bool")) sql_type = Types.BIT; else if (type_name.equals("date")) sql_type = Types.DATE; else if (type_name.equals("time")) sql_type = Types.TIME; else if (type_name.equals("abstime")) sql_type = Types.TIMESTAMP; else sql_type = Types.OTHER; } return sql_type; } | public int getSQLType() throws SQLException { if (sql_type == -1) { ResultSet result = (postgresql.ResultSet)conn.ExecSQL("select typname from pg_type where oid = " + oid); if (result.getColumnCount() != 1 || result.getTupleCount() != 1) throw new SQLException("Unexpected return from query for type"); result.next(); type_name = result.getString(1); if (type_name.equals("int2")) sql_type = Types.SMALLINT; else if (type_name.equals("int4")) sql_type = Types.INTEGER; else if (type_name.equals("int8")) sql_type = Types.BIGINT; else if (type_name.equals("cash")) sql_type = Types.DECIMAL; else if (type_name.equals("money")) sql_type = Types.DECIMAL; else if (type_name.equals("float4")) sql_type = Types.REAL; else if (type_name.equals("float8")) sql_type = Types.DOUBLE; else if (type_name.equals("bpchar")) sql_type = Types.CHAR; else if (type_name.equals("varchar")) sql_type = Types.VARCHAR; else if (type_name.equals("bool")) sql_type = Types.BIT; else if (type_name.equals("date")) sql_type = Types.DATE; else if (type_name.equals("time")) sql_type = Types.TIME; else if (type_name.equals("abstime")) sql_type = Types.TIMESTAMP; else sql_type = Types.OTHER; } return sql_type; } | 46563 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46563/6a061da272f04e1463864065f87f1f3fd61d6162/Field.java/clean/src/interfaces/jdbc/postgresql/Field.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
21708,
559,
1435,
1216,
6483,
202,
95,
202,
202,
430,
261,
4669,
67,
723,
422,
300,
21,
13,
202,
202,
95,
1082,
202,
13198,
563,
273,
261,
2767,
24330,
18,
13198,
13,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
21708,
559,
1435,
1216,
6483,
202,
95,
202,
202,
430,
261,
4669,
67,
723,
422,
300,
21,
13,
202,
202,
95,
1082,
202,
13198,
563,
273,
261,
2767,
24330,
18,
13198,
13,
4... |
new ConfigureDetectorsDialog(new javax.swing.JFrame(), true).show(); | new ConfigureDetectorsDialog(new javax.swing.JFrame(), true).setVisible(true); | public static void main(String args[]) { new ConfigureDetectorsDialog(new javax.swing.JFrame(), true).show(); } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/d3c6c80abbd593309b2cf21455e2d6cf7bca99a0/ConfigureDetectorsDialog.java/clean/findbugs/src/java/edu/umd/cs/findbugs/gui/ConfigureDetectorsDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
833,
63,
5717,
288,
3639,
394,
11758,
12594,
87,
6353,
12,
2704,
6863,
18,
5328,
310,
18,
46,
3219,
9334,
638,
2934,
542,
6207,
12,
3767,
1769,
565,
289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2774,
12,
780,
833,
63,
5717,
288,
3639,
394,
11758,
12594,
87,
6353,
12,
2704,
6863,
18,
5328,
310,
18,
46,
3219,
9334,
638,
2934,
542,
6207,
12,
3767,
1769,
565,
289,
... |
case CONSTRUCTOR_ID: | case Id_constructor: | public int methodArity(int methodId, IdFunction function) { switch (methodId) { case ConstructorId_UTC: case ConstructorId_parse: case CONSTRUCTOR_ID: case Id_setTime: case Id_setMilliseconds: case Id_setUTCMilliseconds: case Id_setDate: case Id_setUTCDate: case Id_setYear: return 1; case Id_setSeconds: case Id_setUTCSeconds: case Id_setMonth: case Id_setUTCMonth: return 2; case Id_setMinutes: case Id_setUTCMinutes: case Id_setFullYear: case Id_setUTCFullYear: return 3; case Id_setHours: case Id_setUTCHours: return 4; } return 0; } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/b6331020dcf96bb85dae57ee2a2ce947b6b0477a/NativeDate.java/buggy/js/rhino/src/org/mozilla/javascript/NativeDate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
707,
686,
560,
12,
474,
707,
548,
16,
3124,
2083,
445,
13,
288,
3639,
1620,
261,
2039,
548,
13,
288,
3639,
648,
11417,
548,
67,
11471,
30,
3639,
648,
11417,
548,
67,
2670,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
707,
686,
560,
12,
474,
707,
548,
16,
3124,
2083,
445,
13,
288,
3639,
1620,
261,
2039,
548,
13,
288,
3639,
648,
11417,
548,
67,
11471,
30,
3639,
648,
11417,
548,
67,
2670,
... |
public byte[] mjpbUncompress(byte[] input) throws FormatException { byte[] raw = null; byte[] raw2 = null; int pt = 16; // pointer into the compressed data // official documentation at // http://developer.apple.com/documentation/QuickTime/QTFF/QTFFChap3/ // chapter_4_section_2.html // information on SOF, SOS, and SOD headers found at // http://www.obrador.com/essentialjpeg/headerinfo.htm // a brief overview for those who would rather not read the specifications: // MJPEG-B (or Motion JPEG) is a variant of the JPEG compression standard, // with one major difference. In JPEG files (technically JFIF), important // blocks are denoted by a 'marker' - the byte '0xff' followed by a byte // identifying the type of data to follow. According to JPEG standards, // all '0xff' bytes in the stream of compressed pixel data are to be // followed by a null byte (0x00), so that the reader knows not to // interpret the '0xff' as the beginning of a marker. MJPEG-B does not // support markers, thus the null byte is not included after '0xff' bytes // in the data stream. Also, an insufficient number of quantization // and Huffman tables are provided, so we must use the defaults obtained // from the JPEG documentation. Finally, MJPEG-B allows for the data to // be spread across multiple fields, effectively forcing the reader to // interlace the scanlines. pt += 4; if (pt >= input.length) pt = 0; // most MJPEG-B planes don't have this identifier if (!(input[pt] != 'm' || input[pt+1] != 'j' || input[pt+2] != 'p' || input[pt+3] != 'g')) { pt += 4; // number of compressed bytes (minus padding) int size = DataTools.bytesToInt(input, pt, 4, little); pt += 4; // number of compressed bytes (including padding) int padSize = DataTools.bytesToInt(input, pt, 4, little); pt += 4; // offset to second field int offset = DataTools.bytesToInt(input, pt, 4, little) + 16; pt += 4; // offset to quantization table int quantOffset = DataTools.bytesToInt(input, pt, 4, little) + 16; pt += 4; // offset to Huffman table int huffmanOffset = DataTools.bytesToInt(input, pt, 4, little) + 16; pt += 4; // offset to start of frame int sof = DataTools.bytesToInt(input, pt, 4, little) + 16; pt += 4; // offset to start of scan int sos = DataTools.bytesToInt(input, pt, 4, little) + 16; pt += 4; // offset to start of data int sod = DataTools.bytesToInt(input, pt, 4, little) + 16; pt += 4; // skip over the quantization table, if it exists if (quantOffset != 0) { pt = quantOffset; int length = DataTools.bytesToInt(input, pt, 2, little); pt += length; } // skip over the Huffman table, if it exists if (huffmanOffset != 0) { pt = huffmanOffset; int length = DataTools.bytesToInt(input, pt, 2, little); pt += length; } // skip to the frame header pt = sof; // read sof header // we can skip over the first 7 bytes (length, bps, height, width) pt += 7; // number of channels int channels = DataTools.bytesToInt(input, pt, 1, little); pt++; int[] sampling = new int[channels]; for (int i=0; i<channels; i++) { pt++; sampling[i] = DataTools.bytesToInt(input, pt, 1, little); pt += 2; } // skip to scan header pt = sos; // we can skip over the first 3 bytes (length, number of channels) pt += 3; int[] tables = new int[channels]; for (int i=0; i<channels; i++) { pt++; tables[i] = DataTools.bytesToInt(input, pt, 1, little); pt++; } pt += 3; // now we can finally read this field's data pt = sod; raw = new byte[padSize]; if ((pt + padSize) >= input.length) padSize = input.length - pt - 1; System.arraycopy(input, pt, raw, 0, padSize); // get the second field // from the specs: // "Each QuickTime sample consists of two distinct compressed images, // each coding one field: the field with the topmost scan-line, T, and // the other field, B. Each field is half the height of the overall // image, as declared in the height field of the sample description. // To be precise, if the height field contains the value H, then the // field T has ((H+1) div 2) lines, and field B has (H div 2) lines." if (offset != 0) { pt = offset + 28; pt += DataTools.bytesToInt(input, pt, 4, little) + 4; raw2 = new byte[input.length - pt]; System.arraycopy(input, pt, raw2, 0, raw2.length); } } if (raw == null) raw = input; // "Because Motion-JPEG format B does not support markers, the JPEG // bitstream does not have null bytes (0x00) inserted after data bytes // that are set to 0xFF." // Thus quoth the specifications. ByteVector b = new ByteVector(); int tempPt = 0; for (int i=0; i<raw.length; i++) { b.add((byte) raw[i]); if (raw[i] == (byte) 0xff) { b.add((byte) 0x00); } } if (raw2 == null) raw2 = new byte[0]; ByteVector b2 = new ByteVector(); tempPt = 0; for (int i=0; i<raw2.length; i++) { b2.add((byte) raw2[i]); if (raw2[i] == (byte) 0xff) { b2.add((byte) 0x00); } } // assemble a fake JFIF plane // once again, allow me to say that this would be much easier if the Apple // developers had stuck to the JPEG specifications...*sigh* ByteVector v = new ByteVector(1000); v.add(HEADER); // add quantization tables v.add((byte) 0xff); v.add((byte) 0xdb); int length = LUM_QUANT.length + CHROM_QUANT.length + 4; v.add((byte) ((length >>> 8) & 0xff)); v.add((byte) (length & 0xff)); v.add((byte) 0x00); v.add(LUM_QUANT); v.add((byte) 0x01); v.add(CHROM_QUANT); // add Huffman tables v.add((byte) 0xff); v.add((byte) 0xc4); length = LUM_DC_BITS.length + LUM_DC.length + CHROM_DC_BITS.length + CHROM_DC.length + LUM_AC_BITS.length + LUM_AC.length + CHROM_AC_BITS.length + CHROM_AC.length + 6; v.add((byte) ((length >>> 8) & 0xff)); v.add((byte) (length & 0xff)); // the ordering of these tables matters v.add((byte) 0x00); v.add(LUM_DC_BITS); v.add(LUM_DC); v.add((byte) 0x01); v.add(CHROM_DC_BITS); v.add(CHROM_DC); v.add((byte) 0x10); v.add(LUM_AC_BITS); v.add(LUM_AC); v.add((byte) 0x11); v.add(CHROM_AC_BITS); v.add(CHROM_AC); // add start-of-frame header v.add((byte) 0xff); v.add((byte) 0xc0); length = 11; v.add((byte) ((length >>> 8) & 0xff)); v.add((byte) (length & 0xff)); v.add((byte) 0x08); // bits per sample v.add((byte) ((height >>> 8) & 0xff)); v.add((byte) (height & 0xff)); v.add((byte) ((width >>> 8) & 0xff)); v.add((byte) (width & 0xff)); v.add((byte) 0x01); // channel information v.add((byte) 0x01); // channel id v.add((byte) 0x21); // sampling factors v.add((byte) 0x00); // quantization table number // add start-of-scan header v.add((byte) 0xff); v.add((byte) 0xda); length = 8; v.add((byte) ((length >>> 8) & 0xff)); v.add((byte) (length & 0xff)); v.add((byte) 0x01); // number of channels v.add((byte) 0x01); // channel id v.add((byte) 0x00); // DC and AC table numbers v.add((byte) 0x00); v.add((byte) 0x3f); v.add((byte) 0x00); // as if everything we had to do up to this point wasn't enough of a pain, // the MJPEG-B specifications allow for interlaced frames // so now we have to reorder the scanlines...*stabs self in eye* byte[] scanlines; if (interlaced) { ByteVector v2 = v; v.add(b.toByteArray()); v.add((byte) 0xff); v.add((byte) 0xd9); v2.add(b2.toByteArray()); v2.add((byte) 0xff); v2.add((byte) 0xd9); byte[] top = jpegUncompress(v.toByteArray()); byte[] bottom = jpegUncompress(v.toByteArray()); scanlines = new byte[width * height]; int topLine = 0; int bottomLine = 0; for (int i=0; i<height; i++) { if ((i % 2) == 0) { System.arraycopy(top, topLine*width, scanlines, width*i, width); topLine++; } else { System.arraycopy(bottom, bottomLine*width, scanlines, width*i, width); bottomLine++; } } } else { v.add(b.toByteArray()); v.add((byte) 0xff); v.add((byte) 0xd9); scanlines = jpegUncompress(v.toByteArray()); } return scanlines; } | 55303 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55303/fefa794cb8501463488091c20d90b89f0f91fac9/QTReader.java/buggy/loci/formats/QTReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1160,
8526,
312,
78,
5733,
984,
14706,
12,
7229,
8526,
810,
13,
1216,
4077,
503,
288,
7229,
8526,
1831,
273,
446,
31,
7229,
8526,
1831,
22,
273,
446,
31,
474,
5818,
273,
2872,
31,
368,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1160,
8526,
312,
78,
5733,
984,
14706,
12,
7229,
8526,
810,
13,
1216,
4077,
503,
288,
7229,
8526,
1831,
273,
446,
31,
7229,
8526,
1831,
22,
273,
446,
31,
474,
5818,
273,
2872,
31,
368,... | ||
if (bytes == null) return null; | if (bytes == null) { return null; } | protected Object nativeToJava(TransferData transferData) { /** * The resource serialization format is: * (int) number of resources * Then, the following for each resource: * (int) resource type * (String) path of resource */ byte[] bytes = (byte[]) super.nativeToJava(transferData); if (bytes == null) return null; DataInputStream in = new DataInputStream( new ByteArrayInputStream(bytes)); try { int count = in.readInt(); IResource[] results = new IResource[count]; for (int i = 0; i < count; i++) { results[i] = readResource(in); } return results; } catch (IOException e) { return null; } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/ResourceTransfer.java/buggy/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/part/ResourceTransfer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1033,
6448,
774,
5852,
12,
5912,
751,
7412,
751,
13,
288,
3639,
1783,
540,
380,
1021,
1058,
11854,
740,
353,
30,
540,
380,
225,
261,
474,
13,
1300,
434,
2703,
540,
380,
9697,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1033,
6448,
774,
5852,
12,
5912,
751,
7412,
751,
13,
288,
3639,
1783,
540,
380,
1021,
1058,
11854,
740,
353,
30,
540,
380,
225,
261,
474,
13,
1300,
434,
2703,
540,
380,
9697,
16,
... |
protected HierarchySuper(com.exedio.cope.util.ReactivationConstructorDummy d,final int pk) | public HierarchySuper( final int superInt) throws com.exedio.cope.UniqueViolationException | protected HierarchySuper(com.exedio.cope.util.ReactivationConstructorDummy d,final int pk) { super(d,pk); }/** | 50290 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50290/007455072fbcb05f7ce8369982ce87a6b7dc5c67/HierarchySuper.java/buggy/runtime/testsrc/com/exedio/cope/HierarchySuper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
670,
6000,
8051,
12,
832,
18,
338,
329,
1594,
18,
71,
1306,
18,
1367,
18,
426,
16908,
6293,
20094,
302,
16,
6385,
509,
2365,
13,
202,
95,
202,
202,
9565,
12,
72,
16,
5465,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
670,
6000,
8051,
12,
832,
18,
338,
329,
1594,
18,
71,
1306,
18,
1367,
18,
426,
16908,
6293,
20094,
302,
16,
6385,
509,
2365,
13,
202,
95,
202,
202,
9565,
12,
72,
16,
5465,
... |
throws IncorrectOperationException{ final PsiElement fieldName = descriptor.getPsiElement(); final PsiField field = (PsiField) fieldName.getParent(); final PsiManager psiManager = PsiManager.getInstance(project); final PsiElementFactory factory = psiManager.getElementFactory(); final PsiModifierList modifiers = field.getModifierList(); final PsiType type = field.getType(); final String name = field.getName(); final PsiClass containingClass = field.getContainingClass(); final String newFieldText = modifiers.getText() + ' ' + type.getPresentableText() + ' ' + name + '=' + getDefaultValue(type) + ';'; final PsiField newField = factory.createFieldFromText(newFieldText, containingClass); final CodeStyleManager styleManager = psiManager.getCodeStyleManager(); final PsiElement replacedField = field.replace(newField); styleManager.reformat(replacedField); | throws IncorrectOperationException{ final PsiElement fieldName = descriptor.getPsiElement(); final PsiField field = (PsiField) fieldName.getParent(); final PsiManager psiManager = PsiManager.getInstance(project); final PsiElementFactory factory = psiManager.getElementFactory(); assert field != null; final PsiModifierList modifiers = field.getModifierList(); final PsiType type = field.getType(); final String name = field.getName(); final PsiClass containingClass = field.getContainingClass(); final String newFieldText = modifiers.getText() + ' ' + type.getPresentableText() + ' ' + name + '=' + getDefaultValue(type) + ';'; final PsiField newField = factory .createFieldFromText(newFieldText, containingClass); final CodeStyleManager styleManager = psiManager.getCodeStyleManager(); final PsiElement replacedField = field.replace(newField); styleManager.reformat(replacedField); | public void doFix(Project project, ProblemDescriptor descriptor) throws IncorrectOperationException{ final PsiElement fieldName = descriptor.getPsiElement(); final PsiField field = (PsiField) fieldName.getParent(); final PsiManager psiManager = PsiManager.getInstance(project); final PsiElementFactory factory = psiManager.getElementFactory(); final PsiModifierList modifiers = field.getModifierList(); final PsiType type = field.getType(); final String name = field.getName(); final PsiClass containingClass = field.getContainingClass(); final String newFieldText = modifiers.getText() + ' ' + type.getPresentableText() + ' ' + name + '=' + getDefaultValue(type) + ';'; final PsiField newField = factory.createFieldFromText(newFieldText, containingClass); final CodeStyleManager styleManager = psiManager.getCodeStyleManager(); final PsiElement replacedField = field.replace(newField); styleManager.reformat(replacedField); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/bd57f07c33c419f20715b114b71a7e93425b34c9/MakeInitializerExplicitFix.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/fixes/MakeInitializerExplicitFix.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
8585,
12,
4109,
1984,
16,
21685,
3187,
4950,
13,
4766,
19694,
1216,
657,
6746,
10602,
95,
5411,
727,
453,
7722,
1046,
4289,
273,
4950,
18,
588,
52,
7722,
1046,
5621,
5411,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
8585,
12,
4109,
1984,
16,
21685,
3187,
4950,
13,
4766,
19694,
1216,
657,
6746,
10602,
95,
5411,
727,
453,
7722,
1046,
4289,
273,
4950,
18,
588,
52,
7722,
1046,
5621,
5411,... |
following.push(FOLLOW_lhs_eval_in_lhs_unary2424); | following.push(FOLLOW_lhs_eval_in_lhs_unary2501); | public PatternDescr lhs_unary() throws RecognitionException { PatternDescr d; PatternDescr u = null; d = null; try { // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:869:17: ( (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_column | '(' u= lhs ')' ) ) // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:869:17: (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_column | '(' u= lhs ')' ) { // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:869:17: (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_column | '(' u= lhs ')' ) int alt57=5; switch ( input.LA(1) ) { case 54: alt57=1; break; case 55: alt57=2; break; case 56: alt57=3; break; case ID: alt57=4; break; case 21: alt57=5; break; default: NoViableAltException nvae = new NoViableAltException("869:17: (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_column | \'(\' u= lhs \')\' )", 57, 0, input); throw nvae; } switch (alt57) { case 1 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:869:25: u= lhs_exist { following.push(FOLLOW_lhs_exist_in_lhs_unary2408); u=lhs_exist(); following.pop(); } break; case 2 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:870:25: u= lhs_not { following.push(FOLLOW_lhs_not_in_lhs_unary2416); u=lhs_not(); following.pop(); } break; case 3 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:871:25: u= lhs_eval { following.push(FOLLOW_lhs_eval_in_lhs_unary2424); u=lhs_eval(); following.pop(); } break; case 4 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:872:25: u= lhs_column { following.push(FOLLOW_lhs_column_in_lhs_unary2432); u=lhs_column(); following.pop(); } break; case 5 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:873:25: '(' u= lhs ')' { match(input,21,FOLLOW_21_in_lhs_unary2438); following.push(FOLLOW_lhs_in_lhs_unary2442); u=lhs(); following.pop(); match(input,23,FOLLOW_23_in_lhs_unary2444); } break; } d = u; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return d; } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/506adcf4556609ba2040aab4c53c1e38dbf7c80e/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6830,
16198,
8499,
67,
318,
814,
1435,
1216,
9539,
288,
6647,
6830,
16198,
302,
31,
3639,
6830,
16198,
582,
273,
446,
31,
540,
202,
202,
72,
273,
446,
31,
540,
202,
3639,
775,
288... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6830,
16198,
8499,
67,
318,
814,
1435,
1216,
9539,
288,
6647,
6830,
16198,
302,
31,
3639,
6830,
16198,
582,
273,
446,
31,
540,
202,
202,
72,
273,
446,
31,
540,
202,
3639,
775,
288... |
if ( featureID >= 0 ) | switch ( featureID ) | public NotificationChain eInverseRemove( InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs ) { if ( featureID >= 0 ) { switch ( eDerivedStructuralFeatureID( featureID, baseClass ) ) { case LayoutPackage.CLIENT_AREA__BACKGROUND : return basicSetBackground( null, msgs ); case LayoutPackage.CLIENT_AREA__OUTLINE : return basicSetOutline( null, msgs ); case LayoutPackage.CLIENT_AREA__SHADOW_COLOR : return basicSetShadowColor( null, msgs ); case LayoutPackage.CLIENT_AREA__INSETS : return basicSetInsets( null, msgs ); default : return eDynamicInverseRemove( otherEnd, featureID, baseClass, msgs ); } } return eBasicSetContainer( null, featureID, msgs ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/036e8c78765730b146e5854b9d6c397a296fed86/ClientAreaImpl.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/layout/impl/ClientAreaImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
27050,
425,
16376,
3288,
12,
3186,
8029,
1308,
1638,
16,
1082,
202,
474,
6966,
16,
1659,
23955,
16,
27050,
8733,
262,
202,
95,
202,
202,
430,
261,
6966,
1545,
374,
262,
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,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
27050,
425,
16376,
3288,
12,
3186,
8029,
1308,
1638,
16,
1082,
202,
474,
6966,
16,
1659,
23955,
16,
27050,
8733,
262,
202,
95,
202,
202,
430,
261,
6966,
1545,
374,
262,
202,
2... |
protected Indentation(int initval) { indentation = initval; | protected Indentation() { indentation = 0; | protected Indentation(int initval) { indentation = initval; } | 7607 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7607/60cb14c753a84efa4e55de2985207d7aa33d75bd/Indentation.java/buggy/trunk/src/gov/nist/javax/sip/header/Indentation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
28653,
367,
12,
474,
1208,
1125,
13,
288,
202,
202,
9355,
367,
273,
1208,
1125,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
28653,
367,
12,
474,
1208,
1125,
13,
288,
202,
202,
9355,
367,
273,
1208,
1125,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (variable instanceof PsiField) { | if(variable instanceof PsiField){ | public String buildErrorString(PsiElement location) { final PsiVariable variable = (PsiVariable) location.getParent(); final PsiElement context; if (variable instanceof PsiField) { context = ((PsiMember) variable).getContainingClass(); } else { context = PsiTreeUtil.getParentOfType(variable, PsiCodeBlock.class); } final boolean written = arrayContentsAreWritten(variable, context); if (written) { return "Contents of array #ref are written to, but never read #loc"; }else { return "Contents of array #ref are read, but never written to #loc"; } } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/90cc9c6d223234a5bc900d3332b6ba90fc334cc2/MismatchedArrayReadWriteInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/bugs/MismatchedArrayReadWriteInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1361,
668,
780,
12,
52,
7722,
1046,
2117,
13,
288,
3639,
727,
453,
7722,
3092,
2190,
273,
261,
52,
7722,
3092,
13,
2117,
18,
588,
3054,
5621,
3639,
727,
453,
7722,
1046,
819,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1361,
668,
780,
12,
52,
7722,
1046,
2117,
13,
288,
3639,
727,
453,
7722,
3092,
2190,
273,
261,
52,
7722,
3092,
13,
2117,
18,
588,
3054,
5621,
3639,
727,
453,
7722,
1046,
819,... |
runTests(new TestDescriptor[]{ new TestDescriptor(TEST1, "failure case", 1, rule), new TestDescriptor(TEST2, "Array dimensioner uses method call, ok", 0, rule), new TestDescriptor(TEST3, "Array dimensioner uses variable, ok", 0, rule), }); } | runTests(rule); } | public void testAll() { runTests(new TestDescriptor[]{ new TestDescriptor(TEST1, "failure case", 1, rule), new TestDescriptor(TEST2, "Array dimensioner uses method call, ok", 0, rule), new TestDescriptor(TEST3, "Array dimensioner uses variable, ok", 0, rule), }); } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/4e45de9075eeb015245ff09f8f8c58cf0f98bbf3/OptimizableToArrayCallTest.java/clean/pmd/regress/test/net/sourceforge/pmd/rules/OptimizableToArrayCallTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1595,
1435,
288,
3639,
1086,
14650,
12,
2704,
7766,
3187,
63,
7073,
5411,
394,
7766,
3187,
12,
16961,
21,
16,
315,
12251,
648,
3113,
404,
16,
1720,
3631,
5411,
394,
7766,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1595,
1435,
288,
3639,
1086,
14650,
12,
2704,
7766,
3187,
63,
7073,
5411,
394,
7766,
3187,
12,
16961,
21,
16,
315,
12251,
648,
3113,
404,
16,
1720,
3631,
5411,
394,
7766,... |
if (ctrl != null) ctrl.setEnabled(true); | if (ctrl != null) { ctrl.setEnabled(true); } | public void removeFastView(IViewReference ref) { ViewPane pane = getPane(ref); if (isFastView(ref)) { if (activeFastView == ref) setActiveFastView(null); fastViews.remove(ref); pane.setFast(false); Control ctrl = pane.getControl(); if (ctrl != null) ctrl.setEnabled(true); // Modify focus support. // We are disabling the pane because it will be enabled when it // is added to the presentation. When a pane is enabled a drop // listener is added to it, and we do not want to have multiple // listeners for a pane presentation.addPart(pane); } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/Perspective.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Perspective.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1206,
12305,
1767,
12,
45,
1767,
2404,
1278,
13,
288,
3639,
4441,
8485,
13618,
273,
1689,
8806,
12,
1734,
1769,
3639,
309,
261,
291,
12305,
1767,
12,
1734,
3719,
288,
5411,
309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1206,
12305,
1767,
12,
45,
1767,
2404,
1278,
13,
288,
3639,
4441,
8485,
13618,
273,
1689,
8806,
12,
1734,
1769,
3639,
309,
261,
291,
12305,
1767,
12,
1734,
3719,
288,
5411,
309... |
copyJavadocNode(ast, sourceMethodNode, newMethod); | copyJavadocNode(targetRewrite, sourceMethod, sourceMethodNode, newMethod); | private MethodDeclaration createNewMethodDeclarationNode(IMethod sourceMethod, CompilationUnit declaringCuNode, ASTRewrite targetRewrite, IProgressMonitor pm) throws JavaModelException { MethodDeclaration sourceMethodNode= ASTNodeSearchUtil.getMethodDeclarationNode(sourceMethod, declaringCuNode); AST ast= getAST(targetRewrite); MethodDeclaration newMethod= ast.newMethodDeclaration(); copyBodyOfPulledUpMethod(targetRewrite, sourceMethod, sourceMethodNode, newMethod, pm); newMethod.setConstructor(sourceMethodNode.isConstructor()); newMethod.setExtraDimensions(sourceMethodNode.getExtraDimensions()); copyJavadocNode(ast, sourceMethodNode, newMethod); newMethod.setModifiers(getNewModifiers(sourceMethod)); newMethod.setName(createCopyOfSimpleName(sourceMethodNode.getName(), ast)); copyReturnType(targetRewrite, getDeclaringWorkingCopy(), sourceMethodNode, newMethod); copyParameters(targetRewrite, getDeclaringWorkingCopy(), sourceMethodNode, newMethod); copyThrownExceptions(sourceMethodNode, newMethod); return newMethod; } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/2d86c8a47acbcfbb2c2817dc3ed5c9cf11c3d814/PullUpRefactoring.java/clean/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PullUpRefactoring.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
2985,
6094,
15291,
1305,
6094,
907,
12,
45,
1305,
27871,
16,
22416,
2802,
20845,
39,
89,
907,
16,
432,
3902,
12341,
1018,
19618,
16,
467,
5491,
7187,
7430,
13,
1216,
5110,
1488... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
2985,
6094,
15291,
1305,
6094,
907,
12,
45,
1305,
27871,
16,
22416,
2802,
20845,
39,
89,
907,
16,
432,
3902,
12341,
1018,
19618,
16,
467,
5491,
7187,
7430,
13,
1216,
5110,
1488... |
public boolean isSet(org.quickfix.field.LegSecurityAltID field) | public boolean isSet(quickfix.field.LegSecurityAltID field) | public boolean isSet(org.quickfix.field.LegSecurityAltID field) { return isSetField(field); } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/QuoteResponse.java/clean/src/java/src/quickfix/fix44/QuoteResponse.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
13532,
12,
19525,
904,
18,
1518,
18,
8329,
4368,
10655,
734,
652,
13,
225,
288,
327,
13532,
974,
12,
1518,
1769,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
13532,
12,
19525,
904,
18,
1518,
18,
8329,
4368,
10655,
734,
652,
13,
225,
288,
327,
13532,
974,
12,
1518,
1769,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public final boolean autoAdd(final Component component) | final void autoAdd(final Component component) | public final boolean autoAdd(final Component component) { if (component == null) { throw new IllegalArgumentException("argument component may not be null"); } /* Replace strategy */ if (get(component.getId()) != null) { this.remove(component); } component.setAuto(true); add(component); component.internalAttach(); component.render(); return true; } | 46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/69387fe597989e6f2505cd35b13ed617633d5555/MarkupContainer.java/clean/wicket/src/java/wicket/MarkupContainer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
1250,
3656,
986,
12,
6385,
5435,
1794,
13,
202,
95,
202,
202,
430,
261,
4652,
422,
446,
13,
202,
202,
95,
1082,
202,
12849,
394,
2754,
2932,
3446,
1794,
2026,
486,
506,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3656,
986,
12,
6385,
5435,
1794,
13,
202,
95,
202,
202,
430,
261,
4652,
422,
446,
13,
202,
202,
95,
1082,
202,
12849,
394,
2754,
2932,
3446,
1794,
2026,
486,
506,
... |
edit.addAddedElement(newEl2); if (current.getEndOffset() != endOffset && (data.length == 1)) { Element newCurrent = createLeafElement(paragraph, current.getAttributes(), newEndOffset, current.getEndOffset()); edit.addAddedElement(newCurrent); | edit.addRemovedElement(next); | private void insertFirstContentTag(ElementSpec[] data) { // FIXME: This method is not complete. It needs to properly recreate the // leaves when the spec's direction is JoinPreviousDirection. ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addRemovedElement(current); edit.addAddedElement(newEl1); if (current.getEndOffset() != newEndOffset) { // This means all the leaves that were there previously need // to be recreated after all the new Elements are inserted. } } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element next = paragraph.getElement(index + 1); Element[] removed = new Element[] { current, next }; Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); Element[] added = new Element[2]; added[0] = newEl1; if (data.length == 1) added[1] = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else added[1] = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); edit.addRemovedElements(removed); edit.addAddedElements(added); } break; case ElementSpec.OriginateDirection: if (current.getStartOffset() != offset) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); } Element newEl2 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addRemovedElement(current); edit.addAddedElement(newEl2); if (current.getEndOffset() != endOffset && (data.length == 1)) { // This means all the leaves that were there previously need // to be recreated after all the new Elements are inserted. Element newCurrent = createLeafElement(paragraph, current.getAttributes(), newEndOffset, current.getEndOffset()); edit.addAddedElement(newCurrent); } break; default: break; } offset = newEndOffset; } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2243,
3759,
1350,
1805,
12,
1046,
1990,
8526,
501,
13,
565,
288,
5411,
368,
9852,
30,
1220,
707,
353,
486,
3912,
18,
225,
2597,
4260,
358,
8214,
23052,
326,
1377,
368,
15559,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2243,
3759,
1350,
1805,
12,
1046,
1990,
8526,
501,
13,
565,
288,
5411,
368,
9852,
30,
1220,
707,
353,
486,
3912,
18,
225,
2597,
4260,
358,
8214,
23052,
326,
1377,
368,
15559,
... |
if (jj_3R_20()) return true; | if (jj_3R_64()) return true; | final private boolean jj_3R_78() { if (jj_3R_20()) return true; return false; } | 55820 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55820/5b85dc5e122a5bdf3ea90d4f89cebe71413fc26b/Parser.java/buggy/src/java/org/apache/velocity/runtime/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
8285,
1435,
288,
565,
309,
261,
78,
78,
67,
23,
54,
67,
1105,
10756,
327,
638,
31,
565,
327,
629,
31,
225,
289,
2,
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,
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,
727,
3238,
1250,
10684,
67,
23,
54,
67,
8285,
1435,
288,
565,
309,
261,
78,
78,
67,
23,
54,
67,
1105,
10756,
327,
638,
31,
565,
327,
629,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-1... |
String subjectdn, String subjectaltname, String keyspec, String keyalgorithm, List ocspcertpath){ super(status); this.subjectdn = subjectdn; this.subjectaltname = subjectaltname; this.keyspec = keyspec; this.keyalgorithm = keyalgorithm; this.ocspcertchain = ocspcertpath; } | String subjectdn, String subjectaltname, String keyspec, String keyalgorithm){ super(status, subjectdn, subjectaltname, keyspec, keyalgorithm); } | public OCSPCAServiceInfo(int status, String subjectdn, String subjectaltname, String keyspec, String keyalgorithm, List ocspcertpath){ super(status); this.subjectdn = subjectdn; this.subjectaltname = subjectaltname; this.keyspec = keyspec; this.keyalgorithm = keyalgorithm; this.ocspcertchain = ocspcertpath; } | 4109 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4109/90ee79ab9337217a2c4b00c5ec354e3bdabe9b25/OCSPCAServiceInfo.java/buggy/src/java/org/ejbca/core/model/ca/caadmin/extendedcaservices/OCSPCAServiceInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
531,
28594,
3587,
1179,
966,
12,
474,
1267,
16,
6862,
9506,
514,
3221,
5176,
16,
20982,
514,
3221,
2390,
529,
16,
20982,
514,
1311,
705,
16,
20982,
514,
498,
12743,
16,
6862,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
531,
28594,
3587,
1179,
966,
12,
474,
1267,
16,
6862,
9506,
514,
3221,
5176,
16,
20982,
514,
3221,
2390,
529,
16,
20982,
514,
1311,
705,
16,
20982,
514,
498,
12743,
16,
6862,
... |
public int print(java.awt.Graphics graphics, java.awt.print.PageFormat pageFormat, int pageIndex) throws java.awt.print.PrinterException { graphics.translate((int)pageFormat.getImageableX(), (int)pageFormat.getImageableY()); int pageWidth = (int)pageFormat.getImageableWidth(); int pageHeight = (int)pageFormat.getImageableHeight(); //graphics.clipRect(0, 0, pageWidth, pageHeight); //System.out.println(pageFormat.getOrientation()==PageFormat.LANDSCAPE); //if (true) throw new java.awt.print.PrinterException(); /*------------------------------------------------------------*/ ViewState view = ViewState.getInstance(); double screen2printer = 0; switch (Page.getPrintMode()) { case Page.TRUE_SCALE: // 1:1 ratio screen2printer = 72.0/getWorkspacePanel().getToolkit().getScreenResolution(); break; case Page.USER_SCALE: screen2printer = 72.0/getWorkspacePanel().getToolkit().getScreenResolution(); screen2printer *= Page.getUserScale(); break; case Page.FIT_SCALE: // fit to paper double xscale = pageWidth/(double)view.getViewWidth(); double yscale = pageHeight/(double)view.getViewHeight(); screen2printer = Math.min(xscale, yscale)*view.getScale(); break; } double converter = screen2printer/view.getScale(); int w = (int)(view.getViewWidth()*converter); int h = (int)(view.getViewHeight()*converter); if (w==0 || h==0) return NO_SUCH_PAGE; if (Page.getPrintMode()==Page.FIT_SCALE) { // center (surely one page) graphics.translate((pageWidth-w)/2, (pageHeight-h)/2); } int nCol = Math.max((int)Math.ceil((double)w/pageWidth), 1); int nRow = Math.max((int)Math.ceil((double)h/pageHeight), 1); int maxNumPage = nCol * nRow; if (pageIndex>=maxNumPage) return NO_SUCH_PAGE; int iCol = pageIndex % nCol; int iRow = pageIndex / nCol; int x = iCol * pageWidth; int y = iRow * pageHeight; int imageWidth = Math.min(pageWidth, w-x); int imageHeight = Math.min(pageHeight, h-y); graphics.clipRect(0, 0, imageWidth, imageHeight); int rx = view.getRx(); int ry = view.getRy(); double scale = view.getScale(); int viewWidth = view.getViewWidth(), viewHeight = view.getViewHeight(); FontMetricsBuffer fmb = FontMetricsBuffer.getInstance(); try { view.setScale(screen2printer); view.setRx((int)(rx*converter+x)); view.setRy((int)(ry*converter+y)); view.setViewWidth(imageWidth); view.setViewHeight(imageHeight); fmb.setInstance(new FontMetricsBuffer(graphics)); /*Shape clip = graphics.getClip(); graphics.setClip(null); graphics.setColor(Color.black); graphics.drawRect(0,0,view.getViewWidth(), view.getViewHeight()); graphics.setClip(clip);*/ if (Settings.getInstance().getShowGrid()) { graphics.setColor(Constants.GRID_COLOR); int gridSize = view.getGridSize(); int sx = view.getGridSize() - view.getRx() % gridSize; int y0 = view.getGridSize() - view.getRy() % gridSize; int xsteps = view.getViewWidth() / gridSize + 1; int ysteps = view.getViewHeight() / gridSize + 1; if (gridSize >= 15) // crosses for (int gy=0; gy < ysteps; gy++) { int x0 = sx; for (int gx=0; gx < xsteps; gx++) { graphics.drawLine(x0-1, y0-1, x0+1, y0+1); graphics.drawLine(x0-1, y0+1, x0+1, y0-1); x0+=gridSize; } y0+=gridSize; } else // dots for (int gy=0; gy < ysteps; gy++) { int x0 = sx; for (int gx=0; gx < xsteps; gx++) { graphics.drawLine(x0, y0, x0, y0); x0+=gridSize; } y0+=gridSize; } } // change color sheme loadBlackOnWhiteColorScheme(); viewGroup.paintComponents(graphics, false, isFlat()); //resets clipping if (Page.getPrintMode()==Page.FIT_SCALE) graphics.translate(-(pageWidth-w)/2, -(pageHeight-h)/2); graphics.setClip(0,0,pageWidth, pageHeight); //prints label if ((Settings.getInstance().getLegendVisibility()==1 && pageIndex==0) || Settings.getInstance().getLegendVisibility()==2) { if (Settings.getInstance().getLegendVisibility()==1) { // correct navigator rect view.setViewWidth((int)(viewWidth*converter)); view.setViewHeight((int)(viewHeight*converter)); } printLegend(graphics, pageWidth, pageHeight, pageIndex+1, maxNumPage); } } catch (Exception e) { } finally { view.setScale(scale); view.setRx(rx); view.setRy(ry); view.setViewWidth(viewWidth); view.setViewHeight(viewHeight); FontMetricsBuffer.setInstance(fmb); // restore color sheme loadWhiteOnBlackColorScheme(); navigatorImage=null; createNavigatorImage(); } /*------------------------------------------------------------*/ System.gc(); return PAGE_EXISTS;} | 8177 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8177/c584ac6e81784098434738832c35c82de52fe536/DrawingSurface.java/buggy/src/com/cosylab/vdct/graphics/DrawingSurface.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
509,
1172,
12,
6290,
18,
2219,
88,
18,
17558,
17313,
16,
2252,
18,
2219,
88,
18,
1188,
18,
1964,
1630,
1363,
1630,
16,
509,
1363,
1016,
13,
1216,
2252,
18,
2219,
88,
18,
1188,
18,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
509,
1172,
12,
6290,
18,
2219,
88,
18,
17558,
17313,
16,
2252,
18,
2219,
88,
18,
1188,
18,
1964,
1630,
1363,
1630,
16,
509,
1363,
1016,
13,
1216,
2252,
18,
2219,
88,
18,
1188,
18,
12... | ||
public NotImplementedException(Class clazz) { super( "Method is not implemented in class " + ((clazz == null) ? null : clazz.getName())); | public NotImplementedException() { super("Code is not implemented"); | public NotImplementedException(Class clazz) { super( "Method is not implemented in class " + ((clazz == null) ? null : clazz.getName())); } | 4554 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4554/5e7cf0ed0e5a457e6e180e83ffbafa0b582e2759/NotImplementedException.java/clean/src/java/org/apache/commons/lang/NotImplementedException.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10051,
503,
12,
797,
4003,
13,
288,
3639,
2240,
12,
5411,
315,
1305,
353,
486,
8249,
316,
667,
315,
7734,
397,
14015,
830,
3638,
422,
446,
13,
692,
446,
294,
4003,
18,
17994,
1435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10051,
503,
12,
797,
4003,
13,
288,
3639,
2240,
12,
5411,
315,
1305,
353,
486,
8249,
316,
667,
315,
7734,
397,
14015,
830,
3638,
422,
446,
13,
692,
446,
294,
4003,
18,
17994,
1435... |
IMemento[] mementos = memento.getChildren(name); | IMemento[] mementos = memento.getChildren(name); | static List readKeySequenceBindingDefinitions( IMemento memento, String name, String pluginIdOverride) { if (memento == null || name == null) throw new NullPointerException(); IMemento[] mementos = memento.getChildren(name); if (mementos == null) throw new NullPointerException(); List list = new ArrayList(mementos.length); for (int i = 0; i < mementos.length; i++) list.add( readKeySequenceBindingDefinition( mementos[i], pluginIdOverride)); return list; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/664efbbd6fd6dba5c4d118b10afe31ab34b6890a/Persistence.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/Persistence.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
3845,
987,
855,
653,
4021,
5250,
7130,
12,
202,
202,
3445,
820,
83,
312,
820,
83,
16,
202,
202,
780,
508,
16,
202,
202,
780,
1909,
548,
6618,
13,
288,
202,
202,
430,
261,
81,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
3845,
987,
855,
653,
4021,
5250,
7130,
12,
202,
202,
3445,
820,
83,
312,
820,
83,
16,
202,
202,
780,
508,
16,
202,
202,
780,
1909,
548,
6618,
13,
288,
202,
202,
430,
261,
81,
8... |
nilClass.defineMethod("id", CallbackFactory.getSingletonMethod(RubyNil.class, "id")); | public static RubyClass createNilClass(Ruby ruby) { RubyClass nilClass = ruby.defineClass("NilClass", ruby.getClasses().getObjectClass()); nilClass.defineMethod("type", CallbackFactory.getSingletonMethod(RubyNil.class, "type")); nilClass.defineMethod("to_i", CallbackFactory.getSingletonMethod(RubyNil.class, "to_i")); nilClass.defineMethod("to_s", CallbackFactory.getSingletonMethod(RubyNil.class, "to_s")); nilClass.defineMethod("to_a", CallbackFactory.getSingletonMethod(RubyNil.class, "to_a")); nilClass.defineMethod("inspect", CallbackFactory.getSingletonMethod(RubyNil.class, "inspect")); nilClass.defineMethod("&", CallbackFactory.getSingletonMethod(RubyNil.class, "op_and", IRubyObject.class)); nilClass.defineMethod("|", CallbackFactory.getSingletonMethod(RubyNil.class, "op_or", IRubyObject.class)); nilClass.defineMethod("^", CallbackFactory.getSingletonMethod(RubyNil.class, "op_xor", IRubyObject.class)); nilClass.defineMethod("nil?", CallbackFactory.getTrueMethod(0)); nilClass.getInternalClass().undefMethod("new"); ruby.defineGlobalConstant("NIL", ruby.getNil()); return nilClass; } | 45827 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45827/a33fc547e26999709256db0c7da831fd8ed14d1c/RubyNil.java/buggy/org/jruby/RubyNil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
515,
797,
18,
11255,
1305,
2932,
350,
3113,
8444,
1733,
18,
588,
19571,
1305,
12,
54,
10340,
12616,
18,
1106,
16,
315,
350,
7923,
1769,
225,
515,
797,
18,
11255,
1305,
2932,
350,
3113,
8444,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
515,
797,
18,
11255,
1305,
2932,
350,
3113,
8444,
1733,
18,
588,
19571,
1305,
12,
54,
10340,
12616,
18,
1106,
16,
315,
350,
7923,
1769,
225,
515,
797,
18,
11255,
1305,
2932,
350,
3113,
8444,
... | |
PackageBinding packageBinding = (PackageBinding) binding; | unitScope.recordReference(packageBinding.compoundName, compoundName[currentIndex]); | public final Binding getBinding(char[][] compoundName, InvocationSite invocationSite) { int currentIndex = 0; int length = compoundName.length; Binding binding = getBinding( compoundName[currentIndex++], Binding.VARIABLE | Binding.TYPE | Binding.PACKAGE, invocationSite, true /*resolve*/); if (!binding.isValidBinding()) return binding; foundType : if (binding instanceof PackageBinding) { while (currentIndex < length) { PackageBinding packageBinding = (PackageBinding) binding; binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++]); if (binding == null) { if (currentIndex == length) { // must be a type if its the last name, otherwise we have no idea if its a package or type return new ProblemReferenceBinding( CharOperation.subarray(compoundName, 0, currentIndex), null, ProblemReasons.NotFound); } return new ProblemBinding( CharOperation.subarray(compoundName, 0, currentIndex), ProblemReasons.NotFound); } if (binding instanceof ReferenceBinding) { if (!binding.isValidBinding()) return new ProblemReferenceBinding( CharOperation.subarray(compoundName, 0, currentIndex), null, // TODO should improve binding.problemId()); if (!((ReferenceBinding) binding).canBeSeenBy(this)) return new ProblemReferenceBinding( CharOperation.subarray(compoundName, 0, currentIndex), (ReferenceBinding) binding, ProblemReasons.NotVisible); break foundType; } } return binding; } foundField : if (binding instanceof ReferenceBinding) { while (currentIndex < length) { ReferenceBinding typeBinding = (ReferenceBinding) binding; char[] nextName = compoundName[currentIndex++]; if ((binding = findField(typeBinding, nextName, invocationSite, true /*resolve*/)) != null) { if (!binding.isValidBinding()) return new ProblemFieldBinding( (FieldBinding) binding, CharOperation.subarray(compoundName, 0, currentIndex), binding.problemId()); if (!((FieldBinding) binding).isStatic()) return new ProblemFieldBinding( (FieldBinding) binding, CharOperation.subarray(compoundName, 0, currentIndex), ProblemReasons.NonStaticReferenceInStaticContext); break foundField; // binding is now a field } if ((binding = findMemberType(nextName, typeBinding)) == null) return new ProblemBinding( CharOperation.subarray(compoundName, 0, currentIndex), typeBinding, ProblemReasons.NotFound); if (!binding.isValidBinding()) return new ProblemReferenceBinding( CharOperation.subarray(compoundName, 0, currentIndex), null, // TODO should improve binding.problemId()); } return binding; } VariableBinding variableBinding = (VariableBinding) binding; while (currentIndex < length) { TypeBinding typeBinding = variableBinding.type; if (typeBinding == null) return new ProblemFieldBinding( null, CharOperation.subarray(compoundName, 0, currentIndex + 1), ProblemReasons.NotFound); variableBinding = findField(typeBinding, compoundName[currentIndex++], invocationSite, true /*resolve*/); if (variableBinding == null) return new ProblemFieldBinding( null, CharOperation.subarray(compoundName, 0, currentIndex), ProblemReasons.NotFound); if (!variableBinding.isValidBinding()) return variableBinding; } return variableBinding;} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/14ad8eb639364af77959f9bcb2d25c7d5fbb3f5e/BlockScope.java/buggy/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
727,
15689,
29471,
12,
3001,
63,
6362,
65,
11360,
461,
16,
11298,
4956,
9495,
4956,
13,
288,
202,
474,
17032,
273,
374,
31,
202,
474,
769,
273,
11360,
461,
18,
2469,
31,
202,
5250,
508... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
727,
15689,
29471,
12,
3001,
63,
6362,
65,
11360,
461,
16,
11298,
4956,
9495,
4956,
13,
288,
202,
474,
17032,
273,
374,
31,
202,
474,
769,
273,
11360,
461,
18,
2469,
31,
202,
5250,
508... |
super(engine, runnable); | super( engine, runnable ); | public RunAndRenderTask(ReportEngine engine, IReportRunnable runnable) { super(engine, runnable); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/b7f64dc7225960a2d897bca179376d5da9b66b40/RunAndRenderTask.java/clean/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/RunAndRenderTask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1939,
1876,
3420,
2174,
12,
4820,
4410,
4073,
16,
467,
4820,
20013,
14685,
13,
202,
95,
202,
202,
9565,
12,
8944,
16,
14685,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1939,
1876,
3420,
2174,
12,
4820,
4410,
4073,
16,
467,
4820,
20013,
14685,
13,
202,
95,
202,
202,
9565,
12,
8944,
16,
14685,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-1... |
HttpClientCall clientCall = createCall(call.getMethod().getName(), call.getResourceRef().toString()); | HttpClientCall clientCall = createCall(call.getMethod().getName(), call.getResourceRef().toString(), (call.getInput() != null)); | public void handle(UniformCall call) { try { // Create a new HTTP client call HttpClientCall clientCall = createCall(call.getMethod().getName(), call.getResourceRef().toString()); // Add the user agent header if(call.getClientName() != null) { clientCall.addRequestHeader(HttpCall.HEADER_USER_AGENT, call.getClientName()); } else { clientCall.addRequestHeader(HttpCall.HEADER_USER_AGENT, Engine.VERSION_HEADER); } // Add the conditions ConditionData condition = call.getCondition(); if(condition.getMatch() != null) { StringBuilder value = new StringBuilder(); for(int i = 0; i < condition.getMatch().size(); i++) { if(i > 0) value.append(", "); value.append(condition.getMatch().get(i).getName()); } clientCall.addRequestHeader(HttpCall.HEADER_IF_MATCH, value.toString()); } if(condition.getModifiedSince() != null) { String imsDate = DateUtils.format(condition.getModifiedSince(), DateUtils.FORMAT_RFC_1123); clientCall.addRequestHeader(HttpCall.HEADER_IF_MODIFIED_SINCE, imsDate); } if(condition.getNoneMatch() != null) { StringBuilder value = new StringBuilder(); for(int i = 0; i < condition.getNoneMatch().size(); i++) { if(i > 0) value.append(", "); value.append(condition.getNoneMatch().get(i).getName()); } clientCall.addRequestHeader(HttpCall.HEADER_IF_NONE_MATCH, value.toString()); } if(condition.getUnmodifiedSince() != null) { String iusDate = DateUtils.format(condition.getUnmodifiedSince(), DateUtils.FORMAT_RFC_1123); clientCall.addRequestHeader(HttpCall.HEADER_IF_UNMODIFIED_SINCE, iusDate); } // Add the cookies if(call.getCookies().size() > 0) { String cookies = CookieUtils.format(call.getCookies()); clientCall.addRequestHeader(HttpCall.HEADER_COOKIE, cookies); } // Add the referrer header if(call.getReferrerRef() != null) { clientCall.addRequestHeader(HttpCall.HEADER_REFERRER, call.getReferrerRef().toString()); } // Add the preferences PreferenceData pref = call.getPreference(); if(pref.getMediaTypes().size() > 0) { clientCall.addRequestHeader(HttpCall.HEADER_ACCEPT, PreferenceUtils.format(pref.getMediaTypes())); } else { clientCall.addRequestHeader(HttpCall.HEADER_ACCEPT, MediaTypes.ALL.getName()); } if(pref.getCharacterSets().size() > 0) { clientCall.addRequestHeader(HttpCall.HEADER_ACCEPT_CHARSET, PreferenceUtils.format(pref.getCharacterSets())); } else { clientCall.addRequestHeader(HttpCall.HEADER_ACCEPT_CHARSET, CharacterSets.ALL.getName()); } if(pref.getEncodings().size() > 0) { clientCall.addRequestHeader(HttpCall.HEADER_ACCEPT_ENCODING, PreferenceUtils.format(pref.getEncodings())); } else { clientCall.addRequestHeader(HttpCall.HEADER_ACCEPT_ENCODING, Encodings.ALL.getName()); } if(pref.getLanguages().size() > 0) { clientCall.addRequestHeader(HttpCall.HEADER_ACCEPT_LANGUAGE, PreferenceUtils.format(pref.getLanguages())); } else { clientCall.addRequestHeader(HttpCall.HEADER_ACCEPT_LANGUAGE, Languages.ALL.getName()); } // Add the security ChallengeResponse response = call.getSecurity().getChallengeResponse(); if(response != null) { clientCall.addRequestHeader(HttpCall.HEADER_AUTHORIZATION, SecurityUtils.format(response)); } // Commit the request headers clientCall.commitRequestHeaders(); // Send the input representation if(call.getInput() != null) { if(clientCall.getRequestStream() != null) { call.getInput().write(clientCall.getRequestStream()); } else if(clientCall.getRequestChannel() != null) { call.getInput().write(clientCall.getRequestChannel()); } } // Get the response status call.setStatus(new StatusImpl(clientCall.getResponseStatusCode())); // Get the server address call.setServerAddress(clientCall.getResponseAddress()); // Get the response output ContentType contentType = null; Date expires = null; Date lastModified = null; Encoding encoding = null; Language language = null; Tag tag = null; Parameter header; for(Iterator<Parameter> iter = clientCall.getResponseHeaders().iterator(); iter.hasNext(); ) { header = iter.next(); if(header.getName().equalsIgnoreCase(HttpCall.HEADER_CONTENT_TYPE)) { contentType = new ContentType(header.getValue()); } else if(header.getName().equalsIgnoreCase(HttpCall.HEADER_EXPIRES)) { expires = clientCall.parseDate(header.getValue(), false); } else if(header.getName().equalsIgnoreCase(HttpCall.HEADER_CONTENT_ENCODING)) { encoding = Manager.createEncoding(header.getValue()); } else if(header.getName().equalsIgnoreCase(HttpCall.HEADER_CONTENT_LANGUAGE)) { language = Manager.createLanguage(header.getValue()); } else if(header.getName().equalsIgnoreCase(HttpCall.HEADER_LAST_MODIFIED)) { lastModified = clientCall.parseDate(header.getValue(), false); } else if(header.getName().equalsIgnoreCase(HttpCall.HEADER_ETAG)) { tag = Manager.createTag(header.getValue()); } else if(header.getName().equalsIgnoreCase(HttpCall.HEADER_LOCATION)) { call.setRedirectRef(Manager.createReference(header.getValue())); } else if((header.getName().equalsIgnoreCase(HttpCall.HEADER_SET_COOKIE)) || (header.getName().equalsIgnoreCase(HttpCall.HEADER_SET_COOKIE2))) { try { CookieReader cr = new CookieReader(header.getValue()); call.getCookieSettings().add(cr.readCookieSetting()); } catch(Exception e) { logger.log(Level.WARNING, "Error during cookie setting parsing. Header: " + header.getValue(), e); } } else if(header.getName().equalsIgnoreCase(HttpCall.HEADER_WWW_AUTHENTICATE)) { ChallengeRequest request = SecurityUtils.parseRequest(header.getValue()); call.getSecurity().setChallengeRequest(request); } else if(header.getName().equalsIgnoreCase(HttpCall.HEADER_SERVER)) { call.setServerName(header.getValue()); } } // Set the output representation if(contentType != null) { Representation output = null; if(clientCall.getResponseStream() != null) { output = new InputRepresentation(clientCall.getResponseStream(), contentType.getMediaType()); } else if(clientCall.getResponseChannel() != null) { output = new ReadableRepresentation(clientCall.getResponseChannel(), contentType.getMediaType()); } if(output != null) { if(contentType != null) output.getMetadata().setCharacterSet(contentType.getCharacterSet()); output.getMetadata().setEncoding(encoding); output.getMetadata().setExpirationDate(expires); output.getMetadata().setLanguage(language); output.getMetadata().setModificationDate(lastModified); output.getMetadata().setTag(tag); call.setOutput(output); } } } catch(Exception e) { logger.log(Level.WARNING, "An error occured during the handling of an HTTP client call.", e); } } | 14172 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14172/31ca5362b130a77d584f6bec546cd8ccecf2cc37/HttpClientImpl.java/clean/source/main/com/noelios/restlet/connector/HttpClientImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1640,
12,
13004,
1477,
745,
13,
282,
288,
1377,
775,
1377,
288,
540,
368,
1788,
279,
394,
2239,
1004,
745,
540,
16308,
1477,
1004,
1477,
273,
752,
1477,
12,
1991,
18,
588,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1640,
12,
13004,
1477,
745,
13,
282,
288,
1377,
775,
1377,
288,
540,
368,
1788,
279,
394,
2239,
1004,
745,
540,
16308,
1477,
1004,
1477,
273,
752,
1477,
12,
1991,
18,
588,
13... |
label = AspectJUIPlugin.getResourceString("CompilerConfigurationBlock.aj_x_lazy_tjp.label"); | label = UIMessages.CompilerConfigurationBlock_aj_x_lazy_tjp_label; | private Composite createAdvancedTabContent(Composite folder) { String[] enableDisableValues = new String[]{AspectJPreferences.VALUE_ENABLED, AspectJPreferences.VALUE_DISABLED}; CheckBoxListener checkBoxListener = new CheckBoxListener(); int nColumns = 3; GridLayout layout = new GridLayout(); layout.numColumns = nColumns; Composite composite = new Composite(folder, SWT.NULL); composite.setLayout(layout); Label description = new Label(composite, SWT.WRAP); description .setText(AspectJUIPlugin .getResourceString("CompilerConfigurationBlock.aj_advanced.description")); //$NON-NLS-1$ GridData gd = new GridData(); gd.horizontalSpan = nColumns; description.setLayoutData(gd); String label = AspectJUIPlugin.getResourceString("CompilerConfigurationBlock.aj_no_weave.label"); //$NON-NLS-1$ noweaveButton = addCheckBox(composite, label, AspectJPreferences.OPTION_NoWeave, enableDisableValues, 0); noweaveButton.addSelectionListener(checkBoxListener); label = AspectJUIPlugin.getResourceString("CompilerConfigurationBlock.aj_x_serializable_aspects.label"); //$NON-NLS-1$ addCheckBox(composite, label, AspectJPreferences.OPTION_XSerializableAspects, enableDisableValues, 0); label = AspectJUIPlugin.getResourceString("CompilerConfigurationBlock.aj_x_lazy_tjp.label"); //$NON-NLS-1$ lazytjpButton = addCheckBox(composite, label, AspectJPreferences.OPTION_XLazyThisJoinPoint, enableDisableValues, 0); label = AspectJUIPlugin.getResourceString("CompilerConfigurationBlock.aj_x_no_inline.label"); //$NON-NLS-1$ noinlineButton = addCheckBox(composite, label, AspectJPreferences.OPTION_XNoInline, enableDisableValues, 0); label = AspectJUIPlugin.getResourceString("CompilerConfigurationBlock.aj_x_reweavable.label"); //$NON-NLS-1$ reweaveButton = addCheckBox(composite, label, AspectJPreferences.OPTION_XReweavable, enableDisableValues, 0); reweaveButton.addSelectionListener(checkBoxListener); label = AspectJUIPlugin.getResourceString("CompilerConfigurationBlock.aj_x_reweavable_compress.label"); //$NON-NLS-1$ reweaveCompressButton = addCheckBox(composite, label, AspectJPreferences.OPTION_XReweavableCompress, enableDisableValues, 0); reweaveCompressButton.addSelectionListener(checkBoxListener); checkNoWeaveSelection(); return composite; } | 13558 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13558/db7704a16405007af064b9eaf64639d601bcfc7c/CompilerPropertyPage.java/clean/org.eclipse.ajdt.ui/src/org/eclipse/ajdt/internal/ui/CompilerPropertyPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
14728,
752,
23618,
5661,
1350,
12,
9400,
3009,
13,
288,
202,
202,
780,
8526,
4237,
11879,
1972,
273,
394,
514,
63,
7073,
17468,
46,
12377,
18,
4051,
67,
13560,
16,
2970,
1181,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
14728,
752,
23618,
5661,
1350,
12,
9400,
3009,
13,
288,
202,
202,
780,
8526,
4237,
11879,
1972,
273,
394,
514,
63,
7073,
17468,
46,
12377,
18,
4051,
67,
13560,
16,
2970,
1181,
... |
SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMddhhmmssSSS"); | SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMddHHmmssSSS"); | private boolean connectExistingSession() { // iv = H(tag+nonce) byte data[] = new byte[36]; System.arraycopy(_connectionTag.getData(), 0, data, 0, 32); System.arraycopy(_nonce.getData(), 0, data, 32, 4); Hash h = _context.sha().calculateHash(data); _iv = new byte[16]; System.arraycopy(h.getData(), 0, _iv, 0, 16); updateNextTagExisting(); _rawOut = new BufferedOutputStream(_rawOut, ConnectionBuilder.WRITE_BUFFER_SIZE); _rawOut = new AESOutputStream(_context, _rawOut, _key, _iv); _rawIn = new AESInputStream(_context, _rawIn, _key, _iv); // read: H(nonce) try { Hash readHash = new Hash(); readHash.readBytes(_rawIn); Hash expected = _context.sha().calculateHash(_nonce.getData()); if (!expected.equals(readHash)) { fail("Verification hash failed from " + _from); return false; } } catch (IOException ioe) { fail("Error reading the encrypted nonce from " + _from + ": " + ioe.getMessage(), ioe); return false; } catch (DataFormatException dfe) { fail("Error reading the encrypted nonce from " + _from + ": " + dfe.getMessage(), dfe); return false; } // send: H(tag) try { Hash tagHash = _context.sha().calculateHash(_connectionTag.getData()); tagHash.writeBytes(_rawOut); _rawOut.flush(); } catch (IOException ioe) { fail("Error writing the encrypted tag to " + _from + ": " + ioe.getMessage(), ioe); return false; } catch (DataFormatException dfe) { fail("Error writing the encrypted tag to " + _from + ": " + dfe.getMessage(), dfe); return false; } long clockSkew = 0; // read: routerInfo + currentTime + H(routerInfo + currentTime + nonce + tag) try { RouterInfo peer = new RouterInfo(); peer.readBytes(_rawIn); Date now = DataHelper.readDate(_rawIn); Hash readHash = new Hash(); readHash.readBytes(_rawIn); ByteArrayOutputStream baos = new ByteArrayOutputStream(512); peer.writeBytes(baos); DataHelper.writeDate(baos, now); baos.write(_nonce.getData()); baos.write(_connectionTag.getData()); Hash expectedHash = _context.sha().calculateHash(baos.toByteArray()); if (!expectedHash.equals(readHash)) { fail("Invalid hash read for the info from " + _from); return false; } _actualPeer = peer; clockSkew = _context.clock().now() - now.getTime(); } catch (IOException ioe) { fail("Error reading the peer info from " + _from + ": " + ioe.getMessage(), ioe); return false; } catch (DataFormatException dfe) { fail("Error reading the peer info from " + _from + ": " + dfe.getMessage(), dfe); return false; } // verify routerInfo boolean reachable = verifyReachability(); // send routerInfo + status + properties + H(routerInfo + status + properties + nonce + tag) try { ByteArrayOutputStream baos = new ByteArrayOutputStream(512); _context.router().getRouterInfo().writeBytes(baos); Properties props = new Properties(); int status = STATUS_UNKNOWN; if (!reachable) { status = STATUS_UNREACHABLE; } else if ( (clockSkew > Router.CLOCK_FUDGE_FACTOR) || (clockSkew < 0 - Router.CLOCK_FUDGE_FACTOR) ) { status = STATUS_SKEWED; SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMddhhmmssSSS"); props.setProperty("SKEW", fmt.format(new Date(_context.clock().now()))); } else { try { _context.netDb().store(_actualPeer.getIdentity().getHash(), _actualPeer); status = STATUS_OK; } catch (IllegalArgumentException iae) { // bad peer info status = STATUS_UNKNOWN; props.setProperty("REASON", "RouterInfoFailed"); } } baos.write(status); DataHelper.writeProperties(baos, props); byte beginning[] = baos.toByteArray(); baos.write(_nonce.getData()); baos.write(_connectionTag.getData()); Hash verification = _context.sha().calculateHash(baos.toByteArray()); _rawOut.write(beginning); verification.writeBytes(_rawOut); _rawOut.flush(); return handleStatus(status, clockSkew); } catch (IOException ioe) { fail("Error writing the peer info to " + _from + ": " + ioe.getMessage(), ioe); return false; } catch (DataFormatException dfe) { fail("Error writing the peer info to " + _from + ": " + dfe.getMessage(), dfe); return false; } } | 45677 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45677/66aa29e3d4b2f3419efb8a8b38a2616c8de518de/ConnectionHandler.java/buggy/router/java/src/net/i2p/router/transport/tcp/ConnectionHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
3077,
9895,
2157,
1435,
288,
540,
368,
4674,
273,
670,
12,
2692,
15,
12824,
13,
3639,
1160,
501,
8526,
273,
394,
1160,
63,
5718,
15533,
3639,
2332,
18,
1126,
3530,
24899,
4071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
3077,
9895,
2157,
1435,
288,
540,
368,
4674,
273,
670,
12,
2692,
15,
12824,
13,
3639,
1160,
501,
8526,
273,
394,
1160,
63,
5718,
15533,
3639,
2332,
18,
1126,
3530,
24899,
4071... |
return false; | return symbol.getTypeInfo().checkBit( TypeInfo.isVolatile ); | public boolean isVolatile() { // TODO Auto-generated method stub return false; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/4824b20cdc8d49e986db9895b96e931ad252a409/ASTMethod.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/ASTMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
353,
17431,
20295,
1435,
565,
288,
3639,
368,
2660,
8064,
17,
11168,
707,
7168,
4202,
327,
3273,
18,
588,
17305,
7675,
1893,
5775,
12,
1412,
966,
18,
291,
17431,
20295,
11272,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
353,
17431,
20295,
1435,
565,
288,
3639,
368,
2660,
8064,
17,
11168,
707,
7168,
4202,
327,
3273,
18,
588,
17305,
7675,
1893,
5775,
12,
1412,
966,
18,
291,
17431,
20295,
11272,
... |
buf = new byte[Math.max(128, Math.min(1024, bufferSize))]; | buf = new byte[Math.max(Math.min(128,maxLength), Math.min(1024, bufferSize))]; | public String readLine(int maxLength, int bufferSize, boolean utf) throws IOException { if(buf == null) buf = new byte[Math.max(128, Math.min(1024, bufferSize))]; int ctr = 0; while(true) { int x = read(); if(x == -1) { if(ctr == 0) return null; return new String(buf, 0, ctr, utf ? "UTF-8" : "ISO-8859-1"); } // REDFLAG this is definitely safe with the above charsets, it may not be safe with some wierd ones. if(x == '\n') { if(ctr == 0) return ""; if(buf[ctr-1] == '\r') ctr--; return new String(buf, 0, ctr, utf ? "UTF-8" : "ISO-8859-1"); } if(ctr >= buf.length) { if(buf.length == maxLength) throw new TooLongException(); byte[] newBuf = new byte[Math.min(buf.length * 2, maxLength)]; System.arraycopy(buf, 0, newBuf, 0, buf.length); buf = newBuf; } buf[ctr++] = (byte)x; } } | 51738 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51738/2353cc86018a1e68b93d569d157c7d34a5e153a0/LineReadingInputStream.java/buggy/src/freenet/support/io/LineReadingInputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
12273,
12,
474,
13642,
16,
509,
16939,
16,
1250,
7718,
13,
1216,
1860,
288,
202,
202,
430,
12,
4385,
422,
446,
13,
1082,
202,
4385,
273,
394,
1160,
63,
10477,
18,
1896,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12273,
12,
474,
13642,
16,
509,
16939,
16,
1250,
7718,
13,
1216,
1860,
288,
202,
202,
430,
12,
4385,
422,
446,
13,
1082,
202,
4385,
273,
394,
1160,
63,
10477,
18,
1896,
... |
cnvPreview = new FillCanvas(grpPreview, SWT.NO_FOCUS); cnvPreview.setFill(gCurrent); | cnvPreview = new FillCanvas( grpPreview, SWT.NO_FOCUS ); cnvPreview.setFill( gCurrent ); | private void placeComponents() { GridLayout glContent = new GridLayout(); glContent.numColumns = 2; glContent.horizontalSpacing = 5; glContent.verticalSpacing = 5; cmpContent = new Composite(shell, SWT.NONE); cmpContent.setLayout(glContent); GridLayout glGeneral = new GridLayout(); glContent.numColumns = 2; glContent.horizontalSpacing = 5; glContent.verticalSpacing = 5; cmpGeneral = new Composite(cmpContent, SWT.NONE); GridData gdCMPGeneral = new GridData(GridData.FILL_BOTH); cmpGeneral.setLayoutData(gdCMPGeneral); cmpGeneral.setLayout(glGeneral); Label lblStartColor = new Label(cmpGeneral, SWT.NONE); GridData gdLBLStartColor = new GridData(); lblStartColor.setLayoutData(gdLBLStartColor); lblStartColor.setText(Messages.getString("GradientEditorDialog.Lbl.StartColor")); //$NON-NLS-1$ fccStartColor = new FillChooserComposite(cmpGeneral, SWT.NONE, gCurrent.getStartColor(), false, false); GridData gdFCCStartColor = new GridData(GridData.FILL_HORIZONTAL); fccStartColor.setLayoutData(gdFCCStartColor); fccStartColor.addListener(this); Label lblEndColor = new Label(cmpGeneral, SWT.NONE); GridData gdLBLEndColor = new GridData(); lblEndColor.setLayoutData(gdLBLEndColor); lblEndColor.setText(Messages.getString("GradientEditorDialog.Lbl.EndColor")); //$NON-NLS-1$ fccEndColor = new FillChooserComposite(cmpGeneral, SWT.NONE, gCurrent.getEndColor(), false, false); GridData gdFCCEndColor = new GridData(GridData.FILL_HORIZONTAL); fccEndColor.setLayoutData(gdFCCEndColor); fccEndColor.addListener(this); Label lblDummy = new Label(cmpGeneral, SWT.NONE); GridData gdLBLDummy = new GridData(GridData.FILL_BOTH); lblDummy.setLayoutData(gdLBLDummy); createRotationPanel(); /* * cbCyclic = new Button(cmpContent, SWT.CHECK); GridData gdCBCyclic = new GridData(GridData.FILL_HORIZONTAL); * gdCBCyclic.horizontalSpan = 4; cbCyclic.setLayoutData(gdCBCyclic); cbCyclic.setText("Is Cyclic"); * cbCyclic.setSelection(gCurrent.isCyclic()); */ Group grpPreview = new Group(cmpContent, SWT.NONE); GridData gdGRPPreview = new GridData(GridData.FILL_BOTH); gdGRPPreview.horizontalSpan = 2; grpPreview.setLayoutData(gdGRPPreview); grpPreview.setLayout(new FillLayout()); grpPreview.setText(Messages.getString("GradientEditorDialog.Lbl.Preview")); //$NON-NLS-1$ cnvPreview = new FillCanvas(grpPreview, SWT.NO_FOCUS); cnvPreview.setFill(gCurrent); GridLayout glButtons = new GridLayout(); glButtons.numColumns = 2; glButtons.horizontalSpacing = 5; glButtons.verticalSpacing = 5; glButtons.marginHeight = 2; glButtons.marginWidth = 7; cmpButtons = new Composite(cmpContent, SWT.NONE); GridData gdCMPButtons = new GridData(GridData.FILL_HORIZONTAL); gdCMPButtons.horizontalSpan = 4; cmpButtons.setLayoutData(gdCMPButtons); cmpButtons.setLayout(glButtons); btnAccept = new Button(cmpButtons, SWT.PUSH); GridData gdBTNAccept = new GridData(GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_END); gdBTNAccept.grabExcessHorizontalSpace = true; btnAccept.setLayoutData(gdBTNAccept); btnAccept.setText(Messages.getString("Shared.Lbl.OK")); //$NON-NLS-1$ btnAccept.addSelectionListener(this); btnCancel = new Button(cmpButtons, SWT.PUSH); GridData gdBTNCancel = new GridData(GridData.HORIZONTAL_ALIGN_END); gdBTNCancel.grabExcessHorizontalSpace = false; btnCancel.setLayoutData(gdBTNCancel); btnCancel.setText(Messages.getString("Shared.Lbl.Cancel")); //$NON-NLS-1$ btnCancel.addSelectionListener(this); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/c60a4815037b62e9358af2625eb6236e7c979d0f/GradientEditorDialog.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/GradientEditorDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3166,
7171,
1435,
565,
288,
3639,
7145,
3744,
5118,
1350,
273,
394,
7145,
3744,
5621,
3639,
5118,
1350,
18,
2107,
3380,
273,
576,
31,
3639,
5118,
1350,
18,
18396,
18006,
273,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3166,
7171,
1435,
565,
288,
3639,
7145,
3744,
5118,
1350,
273,
394,
7145,
3744,
5621,
3639,
5118,
1350,
18,
2107,
3380,
273,
576,
31,
3639,
5118,
1350,
18,
18396,
18006,
273,
1... |
SocketException(String message) | SocketException() | SocketException(String message){ super(message);} | 13625 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13625/daca25b853b52ea5035f6979a325fe030df38870/SocketException.java/buggy/libjava/java/net/SocketException.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
8758,
503,
12,
780,
883,
15329,
225,
2240,
12,
2150,
1769,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
8758,
503,
12,
780,
883,
15329,
225,
2240,
12,
2150,
1769,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
gbc.fill = gbc.NONE; | gbc.fill = GridBagConstraints.NONE; | private void init() { this.setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.anchor = gbc.WEST; gbc.fill = gbc.BOTH; gbc.gridheight = 1; gbc.gridwidth = 1; gbc.gridx = 0; gbc.gridy = 0; gbc.weightx = 1; gbc.weighty = 1; // MAIN PANEL JPanel mainPanel = new JPanel(); add(mainPanel, gbc.clone()); Border margin = new EmptyBorder(10, 10, 5, 10); mainPanel.setBorder(margin); mainPanel.setLayout(new GridBagLayout()); //gbc.fill = gbc.NONE; gbc.weighty = 0; // TITLE JLabel panelTitleLabel = new JLabel(JMeterUtils.getResString("proxy_title")); Font curFont = panelTitleLabel.getFont(); int curFontSize = curFont.getSize(); curFontSize += 4; panelTitleLabel.setFont(new Font(curFont.getFontName(), curFont.getStyle(), curFontSize)); mainPanel.add(panelTitleLabel, gbc.clone()); gbc.gridy++; // NAME mainPanel.add(namePanel, gbc.clone()); gbc.gridy++; mainPanel.add(createPortPanel(), gbc.clone()); gbc.gridy++; gbc.fill = gbc.BOTH; gbc.weighty = .5; mainPanel.add(createIncludePanel(), gbc.clone()); gbc.gridy++; mainPanel.add(createExcludePanel(), gbc.clone()); gbc.gridy++; gbc.fill = gbc.NONE; gbc.weighty = 0; mainPanel.add(createControls(), gbc.clone()); } | 50179 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50179/c67d452a668e6a25d307aa080b60b6ab9a69914a/ProxyControlGui.java/buggy/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
1435,
565,
288,
3639,
333,
18,
542,
3744,
12,
2704,
7145,
5013,
3744,
10663,
3639,
13075,
26432,
273,
394,
13075,
5621,
3639,
26432,
18,
16215,
273,
26432,
18,
31285,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
1435,
565,
288,
3639,
333,
18,
542,
3744,
12,
2704,
7145,
5013,
3744,
10663,
3639,
13075,
26432,
273,
394,
13075,
5621,
3639,
26432,
18,
16215,
273,
26432,
18,
31285,
31,
... |
_t = __t251; | _t = __t253; | public final void prolog(AST _t, PathExpr path ) throws RecognitionException, PermissionDeniedException,EXistException,XPathException { org.exist.xquery.parser.XQueryAST prolog_AST_in = (_t == ASTNULL) ? null : (org.exist.xquery.parser.XQueryAST)_t; org.exist.xquery.parser.XQueryAST v = null; org.exist.xquery.parser.XQueryAST prefix = null; org.exist.xquery.parser.XQueryAST uri = null; org.exist.xquery.parser.XQueryAST defu = null; org.exist.xquery.parser.XQueryAST deff = null; org.exist.xquery.parser.XQueryAST qname = null; org.exist.xquery.parser.XQueryAST e = null; org.exist.xquery.parser.XQueryAST i = null; org.exist.xquery.parser.XQueryAST pfx = null; org.exist.xquery.parser.XQueryAST moduleURI = null; org.exist.xquery.parser.XQueryAST at = null; Expression step = null; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case VERSION_DECL: { AST __t247 = _t; v = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,VERSION_DECL); _t = _t.getFirstChild(); if (!v.getText().equals("1.0")) throw new XPathException(v, "Wrong XQuery version: require 1.0"); _t = __t247; _t = _t.getNextSibling(); break; } case 3: case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case NAMESPACE_DECL: case DEF_NAMESPACE_DECL: case DEF_FUNCTION_NS_DECL: case GLOBAL_VAR: case FUNCTION_DECL: case BEFORE: case AFTER: case NCNAME: case EQ: case STRING_LITERAL: case LCURLY: case LITERAL_import: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 124: case 125: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 129: case 130: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } { _loop258: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NAMESPACE_DECL: { AST __t249 = _t; prefix = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,NAMESPACE_DECL); _t = _t.getFirstChild(); uri = (org.exist.xquery.parser.XQueryAST)_t; match(_t,STRING_LITERAL); _t = _t.getNextSibling(); context.declareNamespace(prefix.getText(), uri.getText()); _t = __t249; _t = _t.getNextSibling(); break; } case DEF_NAMESPACE_DECL: { AST __t250 = _t; org.exist.xquery.parser.XQueryAST tmp30_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,DEF_NAMESPACE_DECL); _t = _t.getFirstChild(); defu = (org.exist.xquery.parser.XQueryAST)_t; match(_t,STRING_LITERAL); _t = _t.getNextSibling(); context.declareNamespace("", defu.getText()); _t = __t250; _t = _t.getNextSibling(); break; } case DEF_FUNCTION_NS_DECL: { AST __t251 = _t; org.exist.xquery.parser.XQueryAST tmp31_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,DEF_FUNCTION_NS_DECL); _t = _t.getFirstChild(); deff = (org.exist.xquery.parser.XQueryAST)_t; match(_t,STRING_LITERAL); _t = _t.getNextSibling(); context.setDefaultFunctionNamespace(deff.getText()); _t = __t251; _t = _t.getNextSibling(); break; } case GLOBAL_VAR: { AST __t252 = _t; qname = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,GLOBAL_VAR); _t = _t.getFirstChild(); PathExpr enclosed= new PathExpr(context); SequenceType type= null; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_as: { AST __t254 = _t; org.exist.xquery.parser.XQueryAST tmp32_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_as); _t = _t.getFirstChild(); type= new SequenceType(); sequenceType(_t,type); _t = _retTree; _t = __t254; _t = _t.getNextSibling(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case NCNAME: case EQ: case STRING_LITERAL: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 124: case 125: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 129: case 130: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } e = _t==ASTNULL ? null : (org.exist.xquery.parser.XQueryAST)_t; step=expr(_t,enclosed); _t = _retTree; VariableDeclaration decl= new VariableDeclaration(context, qname.getText(), enclosed); decl.setSequenceType(type); decl.setASTNode(e); path.add(decl); if(myModule != null) { QName qn = QName.parse(context, qname.getText()); myModule.declareVariable(qn, decl); } _t = __t252; _t = _t.getNextSibling(); break; } case FUNCTION_DECL: { functionDecl(_t,path); _t = _retTree; break; } case LITERAL_import: { AST __t255 = _t; i = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_import); _t = _t.getFirstChild(); String modulePrefix = null; String location = null; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NCNAME: { pfx = (org.exist.xquery.parser.XQueryAST)_t; match(_t,NCNAME); _t = _t.getNextSibling(); modulePrefix = pfx.getText(); break; } case STRING_LITERAL: { break; } default: { throw new NoViableAltException(_t); } } } moduleURI = (org.exist.xquery.parser.XQueryAST)_t; match(_t,STRING_LITERAL); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case STRING_LITERAL: { at = (org.exist.xquery.parser.XQueryAST)_t; match(_t,STRING_LITERAL); _t = _t.getNextSibling(); location = at.getText(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } try { context.importModule(moduleURI.getText(), modulePrefix, location); } catch(XPathException xpe) { xpe.setASTNode(i); throw xpe; } _t = __t255; _t = _t.getNextSibling(); break; } default: { break _loop258; } } } while (true); } _retTree = _t; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/ddc6ab496ae303f007a96cb80352f3352974cbcf/XQueryTreeParser.java/clean/src/org/exist/xquery/parser/XQueryTreeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
450,
1330,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
16,
14124,
503,
288,
9506,
202,
3341,
18,
739... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
450,
1330,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
16,
14124,
503,
288,
9506,
202,
3341,
18,
739... |
return dist; } | protected int [] calcDist() { double minAcross = sequenceToGraphics(range.getMin()) - renderer.getMinimumLeader(this); int [] dist = new int[2]; if(direction == HORIZONTAL) { dist[0] = (int) minAcross; dist[1] = 0; } else { dist[0] = 0; dist[1] = (int) minAcross; } return dist; } | 50397 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50397/16f086c9934fa6e380256a92db310cb8c448d3f3/SequencePanel.java/buggy/src/org/biojava/bio/gui/sequence/SequencePanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
509,
5378,
7029,
5133,
1435,
288,
565,
1645,
1131,
9988,
3984,
273,
3102,
774,
17558,
12,
3676,
18,
588,
2930,
10756,
300,
15604,
5690,
18,
588,
13042,
15254,
12,
2211,
1769,
565,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
509,
5378,
7029,
5133,
1435,
288,
565,
1645,
1131,
9988,
3984,
273,
3102,
774,
17558,
12,
3676,
18,
588,
2930,
10756,
300,
15604,
5690,
18,
588,
13042,
15254,
12,
2211,
1769,
565,
5... | |
throw new RubyNameException(ruby, "identifier " + name + " needs to be constant"); | throw new NameError(ruby, "identifier " + name + " needs to be constant"); | public static RubyClass newInstance(Ruby ruby, RubyObject recv, RubyObject[] args) { String name = null; if (args.length > 0 && args[0] instanceof RubyString) { name = args[0].toString(); } RubyArray member = RubyArray.newArray(ruby); for (int i = name == null ? 0 : 1; i < args.length; i++) { member.push(RubySymbol.newSymbol(ruby, args[i].toId())); } RubyClass newStruct; if (name == null) { newStruct = RubyClass.newClass(ruby, (RubyClass) recv); } else { if (!IdUtil.isConstant(name)) { throw new RubyNameException(ruby, "identifier " + name + " needs to be constant"); } newStruct = ((RubyClass) recv).defineClassUnder(name, ((RubyClass) recv)); } newStruct.setInstanceVar("__size__", member.length()); newStruct.setInstanceVar("__member__", member); newStruct.defineSingletonMethod("new", CallbackFactory.getOptSingletonMethod(RubyStruct.class, "newStruct")); newStruct.defineSingletonMethod("[]", CallbackFactory.getOptSingletonMethod(RubyStruct.class, "newStruct")); newStruct.defineSingletonMethod("members", CallbackFactory.getSingletonMethod(RubyStruct.class, "members")); // define access methods. for (int i = name == null ? 0 : 1; i < args.length; i++) { newStruct.defineMethod(args[i].toId(), CallbackFactory.getMethod(RubyStruct.class, "get", RubyObject.class)); newStruct.defineMethod(args[i].toId() + "=", CallbackFactory.getMethod(RubyStruct.class, "set", RubyObject.class)); } return newStruct; } | 49476 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49476/8140cac1b7c2375c549787852e38fa6c52b199df/RubyStruct.java/buggy/org/jruby/RubyStruct.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
5984,
12,
54,
10340,
22155,
16,
19817,
921,
10665,
16,
19817,
921,
8526,
833,
13,
288,
3639,
514,
508,
273,
446,
31,
3639,
309,
261,
1968,
18,
2469,
405,
374,
597... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
5984,
12,
54,
10340,
22155,
16,
19817,
921,
10665,
16,
19817,
921,
8526,
833,
13,
288,
3639,
514,
508,
273,
446,
31,
3639,
309,
261,
1968,
18,
2469,
405,
374,
597... |
isReactorProject, Artifact.SCOPE_TEST .equals( art.getScope() ), Artifact.SCOPE_SYSTEM .equals( art.getScope() ), Artifact.SCOPE_PROVIDED .equals( art.getScope() ), art.getArtifactHandler() | isReactorProject, Artifact.SCOPE_TEST.equals( art .getScope() ), Artifact.SCOPE_SYSTEM.equals( art .getScope() ), Artifact.SCOPE_PROVIDED.equals( art .getScope() ), art.getArtifactHandler() | protected IdeDependency[] doDependencyResolution() throws MojoExecutionException { if ( ideDeps == null ) { MavenProject project = getProject(); ArtifactRepository localRepo = getLocalRepository(); List deps = getProject().getDependencies(); // Collect the list of resolved IdeDependencies. List dependencies = new ArrayList(); if ( deps != null ) { Map managedVersions = createManagedVersionMap( getArtifactFactory(), project.getId(), project .getDependencyManagement() ); ArtifactResolutionResult artifactResolutionResult = null; try { List listeners = new ArrayList(); if ( logger.isDebugEnabled() ) { listeners.add( new DebugResolutionListener( logger ) ); } listeners.add( new WarningResolutionListener( logger ) ); artifactResolutionResult = artifactCollector.collect( getProjectArtifacts(), project.getArtifact(), managedVersions, localRepo, project .getRemoteArtifactRepositories(), getArtifactMetadataSource(), null, listeners ); } catch ( ArtifactResolutionException e ) { getLog().debug( e.getMessage(), e ); getLog().error( Messages .getString( "artifactresolution", new Object[] { //$NON-NLS-1$ e.getGroupId(), e.getArtifactId(), e.getVersion(), e.getMessage() } ) ); // if we are here artifactResolutionResult is null, create a project without dependencies but don't fail // (this could be a reactor projects, we don't want to fail everything) return new IdeDependency[0]; } // keep track of added reactor projects in order to avoid duplicates Set emittedReactorProjectId = new HashSet(); for ( Iterator i = artifactResolutionResult.getArtifactResolutionNodes().iterator(); i.hasNext(); ) { ResolutionNode node = (ResolutionNode) i.next(); int dependencyDepth = node.getDepth(); Artifact art = node.getArtifact(); boolean isReactorProject = getUseProjectReferences() && isAvailableAsAReactorProject( art ); // don't resolve jars for reactor projects if ( !isReactorProject ) { try { artifactResolver.resolve( art, node.getRemoteRepositories(), localRepository ); } catch ( ArtifactNotFoundException e ) { getLog().debug( e.getMessage(), e ); getLog().warn( Messages.getString( "artifactdownload", new Object[] { //$NON-NLS-1$ e.getGroupId(), e.getArtifactId(), e.getVersion(), e.getMessage() } ) ); } catch ( ArtifactResolutionException e ) { getLog().debug( e.getMessage(), e ); getLog().warn( Messages.getString( "artifactresolution", new Object[] { //$NON-NLS-1$ e.getGroupId(), e.getArtifactId(), e.getVersion(), e.getMessage() } ) ); } } if ( !isReactorProject || emittedReactorProjectId.add( art.getGroupId() + '-' + art.getArtifactId() ) ) { // the following doesn't work: art.getArtifactHandler().getPackaging() always returns "jar" also // if the packaging specified in pom.xml is different. // osgi-bundle packaging is provided by the felix osgi plugin // eclipse-plugin packaging is provided by this eclipse plugin // String packaging = art.getArtifactHandler().getPackaging(); // boolean isOsgiBundle = "osgi-bundle".equals( packaging ) || "eclipse-plugin".equals( packaging ); // we need to check the manifest, if "Bundle-SymbolicName" is there the artifact can be considered // an osgi bundle boolean isOsgiBundle = false; String osgiSymbolicName = null; if ( art.getFile() != null ) { JarFile jarFile = null; try { jarFile = new JarFile( art.getFile(), false, ZipFile.OPEN_READ ); Manifest manifest = jarFile.getManifest(); if ( manifest != null ) { osgiSymbolicName = manifest.getMainAttributes() .getValue( new Attributes.Name( "Bundle-SymbolicName" ) ); } } catch ( IOException e ) { getLog().info( "Unable to read jar manifest from " + art.getFile() ); } finally { if ( jarFile != null ) { try { jarFile.close(); } catch ( IOException e ) { // ignore } } } } isOsgiBundle = osgiSymbolicName != null; IdeDependency dep = new IdeDependency( art.getGroupId(), art.getArtifactId(), art.getVersion(), isReactorProject, Artifact.SCOPE_TEST .equals( art.getScope() ), Artifact.SCOPE_SYSTEM .equals( art.getScope() ), Artifact.SCOPE_PROVIDED .equals( art.getScope() ), art.getArtifactHandler() .isAddedToClasspath(), art.getFile(), art.getType(), isOsgiBundle, osgiSymbolicName, dependencyDepth ); dependencies.add( dep ); } } //@todo a final report with the list of missingArtifacts? } ideDeps = (IdeDependency[]) dependencies.toArray( new IdeDependency[dependencies.size()] ); } return ideDeps; } | 7444 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7444/ad6a4d9f76873917335fd374cbdf14ef1400690f/AbstractIdeSupportMojo.java/buggy/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
23062,
7787,
8526,
741,
7787,
11098,
1435,
3639,
1216,
18780,
565,
288,
3639,
309,
261,
10572,
14430,
422,
446,
262,
3639,
288,
5411,
17176,
4109,
1984,
273,
11080,
5621,
5411,
14022,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
23062,
7787,
8526,
741,
7787,
11098,
1435,
3639,
1216,
18780,
565,
288,
3639,
309,
261,
10572,
14430,
422,
446,
262,
3639,
288,
5411,
17176,
4109,
1984,
273,
11080,
5621,
5411,
14022,
... |
decls = tu.getDeclarations(name_iref.resolveBinding()); assertEquals( decls.length, 1 ); assertEquals( decls[0], name_i ); } | IASTFunctionDefinition fndef = (IASTFunctionDefinition) tu .getDeclarations()[3]; IASTCompoundStatement compoundStatement = (IASTCompoundStatement) fndef .getBody(); assertEquals(1, compoundStatement.getStatements().length); IASTExpressionStatement exprstmt = (IASTExpressionStatement) compoundStatement .getStatements()[0]; IASTFieldReference fieldref = (IASTFieldReference) exprstmt .getExpression(); IASTIdExpression id_a = (IASTIdExpression) fieldref.getFieldOwner(); IASTName name_aref = id_a.getName(); IASTName name_iref = fieldref.getFieldName(); IVariable var_a1 = (IVariable) name_aref.resolveBinding(); IVariable var_i1 = (IVariable) name_iref.resolveBinding(); IPointerType structA_1pointer = (IPointerType) var_a1.getType(); ICompositeType structA_1 = (ICompositeType) structA_1pointer.getType(); ICompositeType structA_2 = (ICompositeType) name_A1.resolveBinding(); ICompositeType structA_3 = (ICompositeType) name_A2.resolveBinding(); ICompositeType structA_4 = (ICompositeType) name_Adef.resolveBinding(); IVariable var_a2 = (IVariable) name_a.resolveBinding(); IVariable var_i2 = (IVariable) name_i.resolveBinding(); assertSame(var_a1, var_a2); assertSame(var_i1, var_i2); assertSame(structA_1, structA_2); assertSame(structA_2, structA_3); assertSame(structA_3, structA_4); IASTName[] decls = tu.getDeclarations(name_A1.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], name_A1); decls = tu.getDeclarations(name_A2.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], name_A1); decls = tu.getDeclarations(name_a.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], name_a); decls = tu.getDeclarations(name_Adef.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], name_A1); decls = tu.getDeclarations(name_i.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], name_i); decls = tu.getDeclarations(fndef.getDeclarator().getName() .resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], fndef.getDeclarator().getName()); decls = tu.getDeclarations(name_aref.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], name_a); decls = tu.getDeclarations(name_iref.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], name_i); } | public void testStructureDef() throws Exception{ StringBuffer buffer = new StringBuffer(); buffer.append( "struct A; \r\n"); //$NON-NLS-1$ buffer.append( "struct A * a; \n"); //$NON-NLS-1$ buffer.append( "struct A { int i; }; \n"); //$NON-NLS-1$ buffer.append( "void f() { \n"); //$NON-NLS-1$ buffer.append( " a->i; \n"); //$NON-NLS-1$ buffer.append( "} \n"); //$NON-NLS-1$ IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C ); //struct A; IASTSimpleDeclaration decl1 = (IASTSimpleDeclaration) tu.getDeclarations()[0]; IASTElaboratedTypeSpecifier elabTypeSpec = (IASTElaboratedTypeSpecifier) decl1.getDeclSpecifier(); assertEquals( 0, decl1.getDeclarators().length ); IASTName name_A1 = elabTypeSpec.getName(); //struct A * a; IASTSimpleDeclaration decl2 = (IASTSimpleDeclaration) tu.getDeclarations()[1]; elabTypeSpec = (IASTElaboratedTypeSpecifier) decl2.getDeclSpecifier(); IASTName name_A2 = elabTypeSpec.getName(); IASTDeclarator dtor = decl2.getDeclarators()[0]; IASTName name_a = dtor.getName(); assertEquals( 1, dtor.getPointerOperators().length ); assertTrue( dtor.getPointerOperators()[0] instanceof ICASTPointer ); //struct A { IASTSimpleDeclaration decl3 = (IASTSimpleDeclaration) tu.getDeclarations()[2]; ICASTCompositeTypeSpecifier compTypeSpec = (ICASTCompositeTypeSpecifier) decl3.getDeclSpecifier(); IASTName name_Adef = compTypeSpec.getName(); // int i; IASTSimpleDeclaration decl4 = (IASTSimpleDeclaration) compTypeSpec.getMembers()[0]; dtor = decl4.getDeclarators()[0]; IASTName name_i = dtor.getName(); //void f() { IASTFunctionDefinition fndef = (IASTFunctionDefinition) tu.getDeclarations()[3]; IASTCompoundStatement compoundStatement = (IASTCompoundStatement) fndef.getBody(); assertEquals( 1, compoundStatement.getStatements().length ); // a->i; IASTExpressionStatement exprstmt = (IASTExpressionStatement)compoundStatement.getStatements()[0]; IASTFieldReference fieldref = (IASTFieldReference)exprstmt.getExpression(); IASTIdExpression id_a = (IASTIdExpression) fieldref.getFieldOwner(); IASTName name_aref = id_a.getName(); IASTName name_iref = fieldref.getFieldName(); //bindings IVariable var_a1 = (IVariable) name_aref.resolveBinding(); IVariable var_i1 = (IVariable) name_iref.resolveBinding(); IPointerType structA_1pointer = (IPointerType) var_a1.getType(); ICompositeType structA_1 = (ICompositeType) structA_1pointer.getType(); ICompositeType structA_2 = (ICompositeType) name_A1.resolveBinding(); ICompositeType structA_3 = (ICompositeType) name_A2.resolveBinding(); ICompositeType structA_4 = (ICompositeType) name_Adef.resolveBinding(); IVariable var_a2 = (IVariable) name_a.resolveBinding(); IVariable var_i2 = (IVariable) name_i.resolveBinding(); assertSame( var_a1, var_a2 ); assertSame( var_i1, var_i2 ); assertSame( structA_1, structA_2 ); assertSame( structA_2, structA_3 ); assertSame( structA_3, structA_4 ); // test tu.getDeclarations(IBinding) IASTName[] decls = tu.getDeclarations(name_A1.resolveBinding()); assertEquals( decls.length, 1 ); assertEquals( decls[0], name_A1 ); decls = tu.getDeclarations(name_A2.resolveBinding()); assertEquals( decls.length, 1 ); assertEquals( decls[0], name_A1 ); decls = tu.getDeclarations(name_a.resolveBinding()); assertEquals( decls.length, 1 ); assertEquals( decls[0], name_a ); decls = tu.getDeclarations(name_Adef.resolveBinding()); assertEquals( decls.length, 1 ); assertEquals( decls[0], name_A1 ); decls = tu.getDeclarations(name_i.resolveBinding()); assertEquals( decls.length, 1 ); assertEquals( decls[0], name_i ); decls = tu.getDeclarations(fndef.getDeclarator().getName().resolveBinding()); assertEquals( decls.length, 1 ); assertEquals( decls[0], fndef.getDeclarator().getName() ); decls = tu.getDeclarations(name_aref.resolveBinding()); assertEquals( decls.length, 1 ); assertEquals( decls[0], name_a ); decls = tu.getDeclarations(name_iref.resolveBinding()); assertEquals( decls.length, 1 ); assertEquals( decls[0], name_i ); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/a1776b31512ed659229f125097f603f16a18be82/AST2Tests.java/clean/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
6999,
3262,
1435,
1216,
1185,
95,
377,
202,
780,
1892,
1613,
273,
394,
6674,
5621,
377,
202,
4106,
18,
6923,
12,
315,
1697,
432,
31,
7734,
521,
86,
64,
82,
8863,
4329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6999,
3262,
1435,
1216,
1185,
95,
377,
202,
780,
1892,
1613,
273,
394,
6674,
5621,
377,
202,
4106,
18,
6923,
12,
315,
1697,
432,
31,
7734,
521,
86,
64,
82,
8863,
4329,
... |
qmr1.addMember(Sales); qmr1.addMember(DavesStore); qmr1.addMember(Jan2001); | qmr1.getMember().add(Sales); qmr1.getMember().add(DavesStore); qmr1.getMember().add(Jan2001); | private DimensionView createDataBasedRankingFilter(Connection someConnection) throws OLAPException { DimensionView rankingMembers = someConnection.createDimensionView(); Dimension prod = (Dimension)someConnection.getDimensions().get(0); Dimension geog = (Dimension)someConnection.getDimensions().get(1); Dimension meas = (Dimension)someConnection.getDimensions().get(2); Dimension time = (Dimension)someConnection.getDimensions().get(3); rankingMembers.setDimension(prod); AttributeReference selectCode = (AttributeReference) rankingMembers.createSelectedObject(SelectedObjectTypeEnum.ATTRIBUTEREFERENCE); Attribute code = (Attribute)prod.getFeature().get(0); selectCode.setAttribute(code); DimensionStepManager steps = rankingMembers.createDimensionStepManager(); RankingMemberFilter TB5Prods = (RankingMemberFilter)steps.createDimensionStep(DimensionStepTypeEnum.RANKINGMEMBERFILTER); TB5Prods.setSetAction(SetActionTypeEnum.INITIAL); TB5Prods.setType(RankingTypeEnum.TOPBOTTOM); TB5Prods.setTop(new Integer(5)); TB5Prods.setBottom(new Integer(5)); TB5Prods.setTopPercent(new Boolean(false)); TB5Prods.setBottomPercent(new Boolean(false)); QualifiedMemberReference qmr1 = (QualifiedMemberReference) TB5Prods.createDataBasedMemberFilterInput(DataBasedMemberFilterInputTypeEnum.QUALIFIEDMEMBERREFERENCE); Member Sales = memberObjectFactories.createMember(meas); Member DavesStore = memberObjectFactories.createMember(geog); Member Jan2001 = memberObjectFactories.createMember(time); qmr1.addMember(Sales); qmr1.addMember(DavesStore); qmr1.addMember(Jan2001); return rankingMembers; } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/7d6a0c3d02156aab207b5017ce3ba65883fef640/JolapTest.java/buggy/src/main/mondrian/test/JolapTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
13037,
1767,
752,
751,
9802,
12925,
310,
1586,
12,
1952,
2690,
1952,
13,
1216,
531,
48,
2203,
503,
288,
202,
202,
8611,
1767,
23087,
6918,
273,
2690,
1952,
18,
2640,
8611,
1767... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
13037,
1767,
752,
751,
9802,
12925,
310,
1586,
12,
1952,
2690,
1952,
13,
1216,
531,
48,
2203,
503,
288,
202,
202,
8611,
1767,
23087,
6918,
273,
2690,
1952,
18,
2640,
8611,
1767... |
finish(); | public void run() { try { br.receive(); } catch (RetrievalException e) { receiveFailed = true; runThread.interrupt(); Message msg = DMT.createFNPDataInsertRejected(uid, DMT.DATA_INSERT_REJECTED_RECEIVE_FAILED); source.send(msg); return; } finish(); } | 50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/52fadbe4420bc8c2fb61a8e805e65feb1b7e21db/InsertHandler.java/clean/src/freenet/node/InsertHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1086,
1435,
288,
5411,
775,
288,
7734,
5186,
18,
18149,
5621,
5411,
289,
1044,
261,
27356,
503,
425,
13,
288,
7734,
6798,
2925,
273,
638,
31,
7734,
1086,
3830,
18,
31847,
5621,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1086,
1435,
288,
5411,
775,
288,
7734,
5186,
18,
18149,
5621,
5411,
289,
1044,
261,
27356,
503,
425,
13,
288,
7734,
6798,
2925,
273,
638,
31,
7734,
1086,
3830,
18,
31847,
5621,... | |
public boolean postEvent(Event evt) { return null; } | public boolean postEvent(Event evt) { return false; } | public boolean postEvent(Event evt) { return null; } // FIXME | 56365 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56365/16733ee3215a2c7e356342a07023aa3f185c5f89/MenuBar.java/clean/libjava/java/awt/MenuBar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
1603,
1133,
12,
1133,
6324,
13,
288,
327,
629,
31,
289,
368,
9852,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
1603,
1133,
12,
1133,
6324,
13,
288,
327,
629,
31,
289,
368,
9852,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
protected void closeStartTag() | protected void closeStartTag() | protected void closeStartTag() throws XMLStreamException { flushNamespace(); if (isEmpty) { write ("/>"); isEmpty = false; } else write(">"); } | 2047 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2047/a6a8aac939edbbae46f7f79d636745b31b3e4fd3/XMLWriterBase.java/clean/dev/src/com/bea/xml/stream/XMLWriterBase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1746,
30512,
1435,
377,
1216,
21526,
225,
288,
565,
3663,
3402,
5621,
565,
309,
261,
291,
1921,
13,
288,
1377,
1045,
7566,
26293,
1769,
1377,
2709,
273,
629,
31,
565,
289,
565,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1746,
30512,
1435,
377,
1216,
21526,
225,
288,
565,
3663,
3402,
5621,
565,
309,
261,
291,
1921,
13,
288,
1377,
1045,
7566,
26293,
1769,
1377,
2709,
273,
629,
31,
565,
289,
565,... |
public Database getDatabase() throws SQLException { Database db = new Database(); // Get the database MetaData. Iterator tableIterator = getTables().iterator(); while (tableIterator.hasNext()) { db.addTable((Table) tableIterator.next()); } return db; } | 1224 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1224/3732752de940a0a43cfc33e58f604f145a3518f1/JdbcModelReader.java/clean/src/java/org/apache/ddlutils/io/JdbcModelReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
4254,
588,
4254,
1435,
15069,
23116,
95,
4254,
1966,
33,
2704,
4254,
5621,
759,
967,
451,
329,
2451,
6998,
18,
2360,
270,
499,
429,
3198,
33,
588,
6905,
7675,
9838,
5621,
17523,
12,
2121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
4254,
588,
4254,
1435,
15069,
23116,
95,
4254,
1966,
33,
2704,
4254,
5621,
759,
967,
451,
329,
2451,
6998,
18,
2360,
270,
499,
429,
3198,
33,
588,
6905,
7675,
9838,
5621,
17523,
12,
2121... | ||
try { sel.selText = doc.get(nonJavaStart, (nonJavaEnd - nonJavaStart)); } catch (BadLocationException e) {} sel.selStart = nonJavaStart; sel.selEnd = nonJavaEnd; | return new TextSelection(doc, nonJavaStart, nonJavaEnd - nonJavaStart); | public SelSearchNode getSelection( int fPos ) { IDocumentProvider prov = ( fEditor != null ) ? fEditor.getDocumentProvider() : null; IDocument doc = ( prov != null ) ? prov.getDocument(fEditor.getEditorInput()) : null; if( doc == null ) return null; int pos= fPos; char c; int fStartPos =0, fEndPos=0; int nonJavaStart=-1, nonJavaEnd=-1; String selectedWord=null; try{ while (pos >= 0) { c= doc.getChar(pos); // TODO this logic needs to be improved // ex: ~destr[cursor]uctors, p2->ope[cursor]rator=(zero), etc if (nonJavaStart == -1 && !Character.isJavaIdentifierPart(c)) { nonJavaStart=pos+1; } if (Character.isWhitespace(c)) break; --pos; } fStartPos= pos + 1; pos= fPos; int length= doc.getLength(); while (pos < length) { c= doc.getChar(pos); if (nonJavaEnd == -1 && !Character.isJavaIdentifierPart(c)) { nonJavaEnd=pos; } if (Character.isWhitespace(c)) break; ++pos; } fEndPos= pos; selectedWord = doc.get(fStartPos, (fEndPos - fStartPos)); } catch(BadLocationException e){ } SelSearchNode sel = new SelSearchNode(); boolean selectedOperator=false; if (selectedWord != null && selectedWord.indexOf(OPERATOR) >= 0 && fPos >= fStartPos + selectedWord.indexOf(OPERATOR) && fPos < fStartPos + selectedWord.indexOf(OPERATOR) + OPERATOR.length()) { selectedOperator=true; } // if the operator was selected, get its proper bounds if (selectedOperator && fEditor.getEditorInput() instanceof IFileEditorInput && CoreModel.hasCCNature(((IFileEditorInput)fEditor.getEditorInput()).getFile().getProject())) { int actualStart=fStartPos + selectedWord.indexOf(OPERATOR); int actualEnd=getOperatorActualEnd(doc, fStartPos + selectedWord.indexOf(OPERATOR) + OPERATOR.length()); actualEnd=(actualEnd>0?actualEnd:fEndPos); try { sel.selText = doc.get(actualStart, actualEnd - actualStart); } catch (BadLocationException e) {} sel.selStart = actualStart; sel.selEnd = actualEnd; // TODO Devin this only works for definitions of destructors right now // if there is a destructor and the cursor is in the destructor name's segment then get the entire destructor } else if (selectedWord != null && selectedWord.indexOf('~') >= 0 && fPos - 2 >= fStartPos + selectedWord.lastIndexOf(new String(Keywords.cpCOLONCOLON))) { int tildePos = selectedWord.indexOf('~'); int actualStart=fStartPos + tildePos; int length=0; char temp; char[] lastSegment = selectedWord.substring(tildePos).toCharArray(); for(int i=1; i<lastSegment.length; i++) { temp = lastSegment[i]; if (!Character.isJavaIdentifierPart(temp)) { length=i; break; } } // if the cursor is after the destructor name then use the regular boundaries if (fPos >= actualStart + length) { try { sel.selText = doc.get(nonJavaStart, (nonJavaEnd - nonJavaStart)); } catch (BadLocationException e) {} sel.selStart = nonJavaStart; sel.selEnd = nonJavaEnd; } else { try { sel.selText = doc.get(actualStart, length); } catch (BadLocationException e) {} sel.selStart = actualStart; sel.selEnd = actualStart + length; } } else { // otherwise use the non-java identifier parts as boundaries for the selection try { sel.selText = doc.get(nonJavaStart, (nonJavaEnd - nonJavaStart)); } catch (BadLocationException e) {} sel.selStart = nonJavaStart; sel.selEnd = nonJavaEnd; } return sel; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/090476da2dec6e339aa45e73008cbb87da2b34d4/SelectionParseAction.java/buggy/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/SelectionParseAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4352,
2979,
907,
23204,
12,
509,
284,
1616,
262,
288,
3196,
202,
734,
504,
650,
2249,
17197,
273,
261,
284,
6946,
480,
446,
262,
692,
284,
6946,
18,
588,
2519,
2249,
1435,
294... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4352,
2979,
907,
23204,
12,
509,
284,
1616,
262,
288,
3196,
202,
734,
504,
650,
2249,
17197,
273,
261,
284,
6946,
480,
446,
262,
692,
284,
6946,
18,
588,
2519,
2249,
1435,
294... |
setComparator(DATE); ((EventDetailsDialogAction) fPropertiesAction).setComparator(comparator); fMemento.putInteger(P_ORDER_VALUE, DATE_ORDER); fMemento.putInteger(P_ORDER_TYPE, DATE); setColumnSorting(fColumn3, DATE_ORDER); | boolean isComparatorSet = ((EventDetailsDialogAction) fPropertiesAction).resetSelection(PLUGIN, PLUGIN_ORDER); setComparator(PLUGIN); if (!isComparatorSet) ((EventDetailsDialogAction) fPropertiesAction).setComparator(comparator); fMemento.putInteger(P_ORDER_VALUE, PLUGIN_ORDER); fMemento.putInteger(P_ORDER_TYPE, PLUGIN); setColumnSorting(fColumn2, PLUGIN_ORDER); | public void widgetSelected(SelectionEvent e) { DATE_ORDER *= -1; ViewerSorter sorter = getViewerSorter(DATE); fTreeViewer.setSorter(sorter); collator = sorter.getCollator(); setComparator(DATE); ((EventDetailsDialogAction) fPropertiesAction).setComparator(comparator); fMemento.putInteger(P_ORDER_VALUE, DATE_ORDER); fMemento.putInteger(P_ORDER_TYPE, DATE); setColumnSorting(fColumn3, DATE_ORDER); } | 14404 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14404/aa572760ec08d31f75953ceae86f6df2c4ae8884/LogView.java/clean/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/LogView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
3604,
7416,
12,
6233,
1133,
425,
13,
288,
7734,
11457,
67,
7954,
6413,
300,
21,
31,
7734,
4441,
264,
24952,
19867,
273,
8893,
264,
24952,
12,
4594,
1769,
7734,
284,
2471,
1841... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3604,
7416,
12,
6233,
1133,
425,
13,
288,
7734,
11457,
67,
7954,
6413,
300,
21,
31,
7734,
4441,
264,
24952,
19867,
273,
8893,
264,
24952,
12,
4594,
1769,
7734,
284,
2471,
1841... |
public String[] getNamespacePrefixes(String nsURI, boolean local) { if (nsURI == null) throw new IllegalArgumentException("Namespace URI must not be null."); Vector prefixes = new Vector(3); getNamespacePrefixes(nsURI, local, prefixes); String[] pArray = new String[prefixes.size()]; prefixes.copyInto(pArray); return pArray; | public String[] getNamespacePrefixes(String nsURI) { return getNamespacePrefixes(nsURI, false); | public String[] getNamespacePrefixes(String nsURI, boolean local) { //-- prevent null value if (nsURI == null) throw new IllegalArgumentException("Namespace URI must not be null."); Vector prefixes = new Vector(3); getNamespacePrefixes(nsURI, local, prefixes); String[] pArray = new String[prefixes.size()]; prefixes.copyInto(pArray); return pArray; } //-- method: getNamespacePrefixes | 3614 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3614/2009c1e3eb84dac7eff99c6dde23ac1c9770da8b/Namespaces.java/buggy/trunk/castor/src/main/org/exolab/castor/xml/Namespaces.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
8526,
11153,
11700,
12,
780,
3153,
3098,
16,
1250,
1191,
13,
288,
3639,
368,
413,
5309,
446,
460,
3639,
309,
261,
2387,
3098,
422,
446,
13,
5411,
604,
394,
2754,
2932,
3402,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
8526,
11153,
11700,
12,
780,
3153,
3098,
16,
1250,
1191,
13,
288,
3639,
368,
413,
5309,
446,
460,
3639,
309,
261,
2387,
3098,
422,
446,
13,
5411,
604,
394,
2754,
2932,
3402,
... |
return ComponentConfigurationHandler.createComponentConfigurationHandler(ProActiveComponent.class.getResource( ControllerDescription.DEFAULT_COMPONENT_CONFIG_FILE_LOCATION) .getFile()); | return ComponentConfigurationHandler.createComponentConfigurationHandler(ControllerDescription.DEFAULT_COMPONENT_CONFIG_FILE_LOCATION); | public static ComponentConfigurationHandler loadControllerConfiguration( String controllerConfigFileLocation) { try { return ComponentConfigurationHandler.createComponentConfigurationHandler(controllerConfigFileLocation); } catch (Exception e) { logger.error("could not load controller config file : " + controllerConfigFileLocation + ". Reverting to default controllers configuration."); try { return ComponentConfigurationHandler.createComponentConfigurationHandler(ProActiveComponent.class.getResource( ControllerDescription.DEFAULT_COMPONENT_CONFIG_FILE_LOCATION) .getFile()); } catch (Exception e2) { logger.error( "could not load default controller config file either. Check that the default controller config file is available in your classpath at : " + ControllerDescription.DEFAULT_COMPONENT_CONFIG_FILE_LOCATION); throw new ProActiveRuntimeException( "could not load default controller config file either. Check that the default controller config file is available on your system at : " + ControllerDescription.DEFAULT_COMPONENT_CONFIG_FILE_LOCATION, e2); } } } | 14315 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14315/52316cd9f1e11f327208692558b2030986fa1736/ProActiveComponentImpl.java/clean/src/org/objectweb/proactive/core/component/identity/ProActiveComponentImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
5435,
1750,
1503,
1262,
20067,
12,
3639,
514,
2596,
13705,
2735,
13,
288,
3639,
775,
288,
5411,
327,
5435,
1750,
1503,
18,
2640,
1841,
1750,
1503,
12,
5723,
13705,
2735,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
5435,
1750,
1503,
1262,
20067,
12,
3639,
514,
2596,
13705,
2735,
13,
288,
3639,
775,
288,
5411,
327,
5435,
1750,
1503,
18,
2640,
1841,
1750,
1503,
12,
5723,
13705,
2735,
1769,
... |
tuple[6] = grantable.getBytes(); | tuple[6] = encoding.encode(grantable); | public java.sql.ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException { Field f[] = new Field[7]; Vector v = new Vector(); f[0] = new Field(connection, "TABLE_CAT", iVarcharOid, getMaxNameLength()); f[1] = new Field(connection, "TABLE_SCHEM", iVarcharOid, getMaxNameLength()); f[2] = new Field(connection, "TABLE_NAME", iVarcharOid, getMaxNameLength()); f[3] = new Field(connection, "GRANTOR", iVarcharOid, getMaxNameLength()); f[4] = new Field(connection, "GRANTEE", iVarcharOid, getMaxNameLength()); f[5] = new Field(connection, "PRIVILEGE", iVarcharOid, getMaxNameLength()); f[6] = new Field(connection, "IS_GRANTABLE", iVarcharOid, getMaxNameLength()); String sql; if (connection.haveMinimumServerVersion("7.3")) { sql = "SELECT n.nspname,c.relname,u.usename,c.relacl "+ " FROM pg_catalog.pg_namespace n, pg_catalog.pg_class c, pg_catalog.pg_user u "+ " WHERE c.relnamespace = n.oid "+ " AND u.usesysid = c.relowner "+ " AND c.relkind = 'r' "; if (schemaPattern != null && !"".equals(schemaPattern)) { sql += " AND n.nspname LIKE '"+escapeQuotes(schemaPattern)+"' "; } } else { sql = "SELECT NULL::text AS nspname,c.relname,u.usename,c.relacl "+ "FROM pg_class c, pg_user u "+ " WHERE u.usesysid = c.relowner "+ " AND c.relkind = 'r' "; } if (tableNamePattern != null && !"".equals(tableNamePattern)) { sql += " AND c.relname LIKE '"+escapeQuotes(tableNamePattern)+"' "; } sql += " ORDER BY nspname, relname "; ResultSet rs = connection.createStatement().executeQuery(sql); while (rs.next()) { byte schema[] = rs.getBytes("nspname"); byte table[] = rs.getBytes("relname"); String owner = rs.getString("usename"); String acl = rs.getString("relacl"); Hashtable permissions = parseACL(acl, owner); String permNames[] = new String[permissions.size()]; Enumeration e = permissions.keys(); int i=0; while (e.hasMoreElements()) { permNames[i++] = (String)e.nextElement(); } sortStringArray(permNames); for (i=0; i<permNames.length; i++) { byte[] privilege = permNames[i].getBytes(); Vector grantees = (Vector)permissions.get(permNames[i]); for (int j=0; j<grantees.size(); j++) { String grantee = (String)grantees.elementAt(j); String grantable = owner.equals(grantee) ? "YES" : "NO"; byte[][] tuple = new byte[7][]; tuple[0] = null; tuple[1] = schema; tuple[2] = table; tuple[3] = owner.getBytes(); tuple[4] = grantee.getBytes(); tuple[5] = privilege; tuple[6] = grantable.getBytes(); v.addElement(tuple); } } } rs.close(); return (ResultSet) ((BaseStatement)connection.createStatement()).createResultSet(f, v, "OK", 1, 0, false); } | 47288 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47288/f9d3ed65c43e04c595b097a59d4d1c4542d82794/AbstractJdbc1DatabaseMetaData.java/clean/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
5638,
27692,
12,
780,
6222,
16,
514,
1963,
3234,
16,
514,
4775,
3234,
13,
1216,
6483,
202,
95,
202,
202,
974,
284,
8526,
273,
394,
2286,
63,
27,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
5638,
27692,
12,
780,
6222,
16,
514,
1963,
3234,
16,
514,
4775,
3234,
13,
1216,
6483,
202,
95,
202,
202,
974,
284,
8526,
273,
394,
2286,
63,
27,
1... |
if ( hasNext ) | if (hasNext) | protected boolean layoutChildren( ) { boolean hasNext = false; // first we need layout the remain content if ( childLayout != null ) { hasNext = childLayout.layout( ); if ( hasNext ) { return true; } childLayout.close( ); childExecutor.close( ); childLayout = null; } // then layout the next content while ( executor.hasNextChild( ) ) { childExecutor = (IReportItemExecutor) executor.getNextChild( ); IContent childContent = childExecutor.execute( ); if (childContent != null) { childLayout = engine.createLayoutManager( this, childContent, childExecutor, emitter ); hasNext = childLayout.layout( ); if ( hasNext ) { return true; } childLayout.close( ); } childExecutor.close( ); } return false; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/aae2e17b3a4d3ea45b489ef2f0c59ab5e9576e76/HTMLBlockStackingLM.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/html/HTMLBlockStackingLM.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1250,
3511,
4212,
12,
262,
202,
95,
202,
202,
6494,
4564,
273,
629,
31,
202,
202,
759,
1122,
732,
1608,
3511,
326,
7232,
913,
202,
202,
430,
261,
1151,
3744,
480,
446,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1250,
3511,
4212,
12,
262,
202,
95,
202,
202,
6494,
4564,
273,
629,
31,
202,
202,
759,
1122,
732,
1608,
3511,
326,
7232,
913,
202,
202,
430,
261,
1151,
3744,
480,
446,
262,
... |
for (Iterator iterator = componentStack.iterator(); iterator.hasNext();) { | List parents = componentStack.subList(1, componentStack.size()); for (Iterator iterator = parents.iterator(); iterator.hasNext();) { | public Component findAncestor(Class clazz) { Stack componentStack = getComponentStack(); for (Iterator iterator = componentStack.iterator(); iterator.hasNext();) { Component component = (Component) iterator.next(); if (component.getClass().isAssignableFrom(clazz)) { return component; } } return null; } | 15560 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15560/868c59616135e1a7588646b1bbada38ff791c5f1/Component.java/buggy/src/java/com/opensymphony/webwork/components/Component.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5435,
1104,
15637,
12,
797,
4003,
13,
288,
3639,
7283,
1794,
2624,
273,
10322,
2624,
5621,
3639,
987,
6298,
273,
1794,
2624,
18,
1717,
682,
12,
21,
16,
1794,
2624,
18,
1467,
10663,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5435,
1104,
15637,
12,
797,
4003,
13,
288,
3639,
7283,
1794,
2624,
273,
10322,
2624,
5621,
3639,
987,
6298,
273,
1794,
2624,
18,
1717,
682,
12,
21,
16,
1794,
2624,
18,
1467,
10663,
... |
public TypeAnalysis createAnalysis(MethodGen methodGen, CFG cfg) { return new TypeAnalysis(methodGen, new DepthFirstSearch(cfg).search(), lookupFailureCallback); | public Dataflow<TypeFrame, TypeAnalysis> createDataflow(ClassContext classContext, Method method) throws CFGBuilderException, DataflowAnalysisException { return classContext.getTypeDataflow(method); | public static void main(String[] argv) throws Exception { if (argv.length != 1) { System.err.println("Usage: " + TypeAnalysis.class.getName() + " <class file>"); System.exit(1); } final RepositoryLookupFailureCallback lookupFailureCallback = new RepositoryLookupFailureCallback() { public void reportMissingClass(ClassNotFoundException ex) { System.err.println("Missing class: " + ex.getMessage()); } }; DataflowTestDriver<TypeFrame, TypeAnalysis> driver = new DataflowTestDriver<TypeFrame, TypeAnalysis>() { public TypeAnalysis createAnalysis(MethodGen methodGen, CFG cfg) { return new TypeAnalysis(methodGen, new DepthFirstSearch(cfg).search(), lookupFailureCallback); } }; driver.execute(argv[0]); } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/0cb8b5532a501fb30117ec4a7118ae06a10c5f62/TypeAnalysis.java/clean/findbugs/src/java/edu/umd/cs/findbugs/ba/TypeAnalysis.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
5261,
13,
1216,
1185,
288,
202,
202,
430,
261,
19485,
18,
2469,
480,
404,
13,
288,
1082,
202,
3163,
18,
370,
18,
8222,
2932,
5357,
30,
315,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
5261,
13,
1216,
1185,
288,
202,
202,
430,
261,
19485,
18,
2469,
480,
404,
13,
288,
1082,
202,
3163,
18,
370,
18,
8222,
2932,
5357,
30,
315,
39... |
public org.quickfix.field.LegCouponPaymentDate getLegCouponPaymentDate() throws FieldNotFound { org.quickfix.field.LegCouponPaymentDate value = new org.quickfix.field.LegCouponPaymentDate(); | public quickfix.field.LegCouponPaymentDate getLegCouponPaymentDate() throws FieldNotFound { quickfix.field.LegCouponPaymentDate value = new quickfix.field.LegCouponPaymentDate(); | public org.quickfix.field.LegCouponPaymentDate getLegCouponPaymentDate() throws FieldNotFound { org.quickfix.field.LegCouponPaymentDate value = new org.quickfix.field.LegCouponPaymentDate(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/QuoteStatusRequest.java/clean/src/java/src/quickfix/fix44/QuoteStatusRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
22744,
6032,
1626,
336,
8329,
22744,
6032,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
22744,
6032,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
22744,
6032,
1626,
336,
8329,
22744,
6032,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
22744,
6032,
1... |
public final String getNamespaceForPrefix ( String prefix ) { assert !prefix.equals( "xml" ) || _prefixMap.get( prefix ).equals( Locale._xml1998Uri ); return (String) _prefixMap.get( prefix ); } | 3520 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3520/c2050878358a3543cf38c8b9bf0a37703cce78e1/Saver.java/clean/src/store/org/apache/xmlbeans/impl/store/Saver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
514,
11153,
1290,
2244,
261,
514,
1633,
262,
565,
288,
3639,
1815,
401,
3239,
18,
14963,
12,
315,
2902,
6,
262,
747,
389,
3239,
863,
18,
588,
12,
1633,
262,
18,
14963,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
514,
11153,
1290,
2244,
261,
514,
1633,
262,
565,
288,
3639,
1815,
401,
3239,
18,
14963,
12,
315,
2902,
6,
262,
747,
389,
3239,
863,
18,
588,
12,
1633,
262,
18,
14963,
12,
... | ||
public EJBObjectProxyHandle(EJBObjectHandler handler){ this.handler = handler; | public EJBObjectProxyHandle(){ | public EJBObjectProxyHandle(EJBObjectHandler handler){ this.handler = handler; } | 47052 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47052/d206419a68547fa7666156b50188d320dad6f480/EJBObjectProxyHandle.java/buggy/openejb1/modules/core/src/java/org/openejb/client/EJBObjectProxyHandle.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
12157,
921,
3886,
3259,
12,
22719,
921,
1503,
1838,
15329,
3639,
333,
18,
4176,
273,
1838,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
12157,
921,
3886,
3259,
12,
22719,
921,
1503,
1838,
15329,
3639,
333,
18,
4176,
273,
1838,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
return object.getNamespace(); | return object.getContributor().getName(); | public String getNamespace() { return object.getNamespace(); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/9fc2ee4aef7f68aba0862934619c47856846a446/EclipseExtensionPoint.java/clean/core/org.eclipse.birt.core/src/org/eclipse/birt/core/framework/eclipse/EclipseExtensionPoint.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
11153,
1435,
288,
202,
202,
2463,
733,
18,
588,
3402,
5621,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
11153,
1435,
288,
202,
202,
2463,
733,
18,
588,
3402,
5621,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if (inDebugMode()) { | if (isDebuggerReady()) { | protected void _enableInteractionsPane() { // Only change GUI from event-dispatching thread Runnable command = new Runnable() { public void run() { /* if (inDebugMode()) { _disableStepTimer(); Debugger manager = _model.getDebugger(); manager.clearCurrentStepRequest(); _removeThreadLocationHighlight(); } */ _interactionsPane.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR)); _interactionsPane.setEditable(true); _interactionsController.moveToEnd(); if (_interactionsPane.hasFocus()) _interactionsPane.getCaret().setVisible(true); if (_interactionsScriptController != null) _interactionsScriptController.setActionsEnabled(); } }; Utilities.invokeLater(command); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/ce1be4bebdf226da73b0f3a3408c7770e9d93c01/MainFrame.java/buggy/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
389,
7589,
2465,
4905,
8485,
1435,
288,
565,
368,
5098,
2549,
10978,
628,
871,
17,
10739,
310,
2650,
565,
10254,
1296,
273,
394,
10254,
1435,
288,
1377,
1071,
918,
1086,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
389,
7589,
2465,
4905,
8485,
1435,
288,
565,
368,
5098,
2549,
10978,
628,
871,
17,
10739,
310,
2650,
565,
10254,
1296,
273,
394,
10254,
1435,
288,
1377,
1071,
918,
1086,
1435,
... |
if (implementsList == null) { | if(implementsList == null){ | public void visitClass(PsiClass aClass) { // no call to super, so it doesn't drill down final PsiReferenceList implementsList = aClass.getImplementsList(); if (implementsList == null) { return; } final PsiJavaCodeReferenceElement[] refs = implementsList.getReferenceElements(); for (int i = 0; i < refs.length; i++) { final PsiJavaCodeReferenceElement ref = refs[i]; final PsiClass iface = (PsiClass) ref.resolve(); if (iface != null) { if (interfaceContainsOnlyConstants(iface)) { registerError(ref); } } } } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/5aa35b2df570765c60519b186a4c55bd7ac791a6/StaticInheritanceInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/classlayout/StaticInheritanceInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
797,
12,
52,
7722,
797,
20148,
13,
288,
5411,
368,
1158,
745,
358,
2240,
16,
1427,
518,
3302,
1404,
5081,
737,
2588,
5411,
727,
453,
7722,
2404,
682,
4792,
682,
273,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
797,
12,
52,
7722,
797,
20148,
13,
288,
5411,
368,
1158,
745,
358,
2240,
16,
1427,
518,
3302,
1404,
5081,
737,
2588,
5411,
727,
453,
7722,
2404,
682,
4792,
682,
273,
20... |
if (jj_3R_298()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_19()) { jj_scanpos = xsp; break; } } | if (jj_scan_token(BIT_AND)) return true; if (jj_3R_268()) return true; | final private boolean jj_3R_294() { if (jj_3R_298()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_19()) { jj_scanpos = xsp; break; } } return false; } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/c02806442559ca74c050ba0d574007ed840a210a/JavaParser.java/buggy/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
5540,
24,
1435,
288,
565,
309,
261,
78,
78,
67,
23,
54,
67,
5540,
28,
10756,
327,
638,
31,
565,
3155,
619,
1752,
31,
565,
1323,
261,
3767,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
5540,
24,
1435,
288,
565,
309,
261,
78,
78,
67,
23,
54,
67,
5540,
28,
10756,
327,
638,
31,
565,
3155,
619,
1752,
31,
565,
1323,
261,
3767,
13... |
public Double() { | public Double() { | public Double() { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/QuadCurve2D.java/buggy/core/src/classpath/java/java/awt/geom/QuadCurve2D.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
3698,
1435,
288,
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,
... | [
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,
3196,
202,
482,
3698,
1435,
288,
202,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
astFactory.addASTChild(currentAST, returnAST); | if (inputState.guessing==0) { astFactory.addASTChild(currentAST, returnAST); } | public final void compilationUnit() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST compilationUnit_AST = null; { switch ( LA(1)) { case SH_COMMENT: { match(SH_COMMENT); break; } case EOF: case FINAL: case ABSTRACT: case STRICTFP: case LITERAL_package: case LITERAL_import: case LITERAL_static: case LITERAL_def: case AT: case IDENT: case LBRACK: case LPAREN: case LITERAL_class: case LITERAL_interface: case LITERAL_enum: case LITERAL_super: case LITERAL_void: case LITERAL_boolean: case LITERAL_byte: case LITERAL_char: case LITERAL_short: case LITERAL_int: case LITERAL_float: case LITERAL_long: case LITERAL_double: case LITERAL_any: case STAR: case LITERAL_private: case LITERAL_public: case LITERAL_protected: case LITERAL_transient: case LITERAL_native: case LITERAL_threadsafe: case LITERAL_synchronized: case LITERAL_volatile: case LCURLY: case SEMI: case NLS: case LITERAL_this: case STRING_LITERAL: case LITERAL_if: case LITERAL_while: case LITERAL_with: case LITERAL_switch: case LITERAL_for: case LITERAL_return: case LITERAL_break: case LITERAL_continue: case LITERAL_throw: case LITERAL_assert: case PLUS: case MINUS: case LITERAL_try: case INC: case DEC: case BNOT: case LNOT: case DOLLAR: case STRING_CTOR_START: case LITERAL_new: case LITERAL_true: case LITERAL_false: case LITERAL_null: case NUM_INT: case NUM_FLOAT: case NUM_LONG: case NUM_DOUBLE: case NUM_BIG_INT: case NUM_BIG_DECIMAL: { break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } nls(); { boolean synPredMatched5 = false; if (((LA(1)==LITERAL_package||LA(1)==AT) && (LA(2)==IDENT) && (_tokenSet_0.member(LA(3))))) { int _m5 = mark(); synPredMatched5 = true; inputState.guessing++; try { { annotationsOpt(); match(LITERAL_package); } } catch (RecognitionException pe) { synPredMatched5 = false; } rewind(_m5); inputState.guessing--; } if ( synPredMatched5 ) { packageDefinition(); astFactory.addASTChild(currentAST, returnAST); } else if ((_tokenSet_1.member(LA(1))) && (_tokenSet_2.member(LA(2))) && (_tokenSet_3.member(LA(3)))) { { switch ( LA(1)) { case FINAL: case ABSTRACT: case STRICTFP: case LITERAL_import: case LITERAL_static: case LITERAL_def: case AT: case IDENT: case LBRACK: case LPAREN: case LITERAL_class: case LITERAL_interface: case LITERAL_enum: case LITERAL_super: case LITERAL_void: case LITERAL_boolean: case LITERAL_byte: case LITERAL_char: case LITERAL_short: case LITERAL_int: case LITERAL_float: case LITERAL_long: case LITERAL_double: case LITERAL_any: case STAR: case LITERAL_private: case LITERAL_public: case LITERAL_protected: case LITERAL_transient: case LITERAL_native: case LITERAL_threadsafe: case LITERAL_synchronized: case LITERAL_volatile: case LCURLY: case LITERAL_this: case STRING_LITERAL: case LITERAL_if: case LITERAL_while: case LITERAL_with: case LITERAL_switch: case LITERAL_for: case LITERAL_return: case LITERAL_break: case LITERAL_continue: case LITERAL_throw: case LITERAL_assert: case PLUS: case MINUS: case LITERAL_try: case INC: case DEC: case BNOT: case LNOT: case DOLLAR: case STRING_CTOR_START: case LITERAL_new: case LITERAL_true: case LITERAL_false: case LITERAL_null: case NUM_INT: case NUM_FLOAT: case NUM_LONG: case NUM_DOUBLE: case NUM_BIG_INT: case NUM_BIG_DECIMAL: { statement(EOF); astFactory.addASTChild(currentAST, returnAST); break; } case EOF: case SEMI: case NLS: { break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } } else { throw new NoViableAltException(LT(1), getFilename()); } } { _loop9: do { if ((LA(1)==SEMI||LA(1)==NLS)) { sep(); { switch ( LA(1)) { case FINAL: case ABSTRACT: case STRICTFP: case LITERAL_import: case LITERAL_static: case LITERAL_def: case AT: case IDENT: case LBRACK: case LPAREN: case LITERAL_class: case LITERAL_interface: case LITERAL_enum: case LITERAL_super: case LITERAL_void: case LITERAL_boolean: case LITERAL_byte: case LITERAL_char: case LITERAL_short: case LITERAL_int: case LITERAL_float: case LITERAL_long: case LITERAL_double: case LITERAL_any: case STAR: case LITERAL_private: case LITERAL_public: case LITERAL_protected: case LITERAL_transient: case LITERAL_native: case LITERAL_threadsafe: case LITERAL_synchronized: case LITERAL_volatile: case LCURLY: case LITERAL_this: case STRING_LITERAL: case LITERAL_if: case LITERAL_while: case LITERAL_with: case LITERAL_switch: case LITERAL_for: case LITERAL_return: case LITERAL_break: case LITERAL_continue: case LITERAL_throw: case LITERAL_assert: case PLUS: case MINUS: case LITERAL_try: case INC: case DEC: case BNOT: case LNOT: case DOLLAR: case STRING_CTOR_START: case LITERAL_new: case LITERAL_true: case LITERAL_false: case LITERAL_null: case NUM_INT: case NUM_FLOAT: case NUM_LONG: case NUM_DOUBLE: case NUM_BIG_INT: case NUM_BIG_DECIMAL: { statement(sepToken); astFactory.addASTChild(currentAST, returnAST); break; } case EOF: case SEMI: case NLS: { break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } } else { break _loop9; } } while (true); } match(Token.EOF_TYPE); compilationUnit_AST = (AST)currentAST.root; returnAST = compilationUnit_AST; } | 6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/27957314a380e54096257a6753ad9d316ee78892/GroovyRecognizer.java/buggy/src/main/org/codehaus/groovy/antlr/parser/GroovyRecognizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
8916,
2802,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5621,
202,
202,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
8916,
2802,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5621,
202,
202,
9... |
String msg = "The interactions window was terminated by a call " + "to System.exit(" + status + ").\n" + "The interactions window will now be restarted."; String title = "Interactions terminated by System.exit(" + status + ")"; JOptionPane.showMessageDialog(MainFrame.this, msg, title, JOptionPane.INFORMATION_MESSAGE); } | _junitPanel.getJUnitErrorListPane(). testEnded(name, wasSuccessful, causedError); _junitPanel.progressStep(wasSuccessful); } | public void run() { String msg = "The interactions window was terminated by a call " + "to System.exit(" + status + ").\n" + "The interactions window will now be restarted."; String title = "Interactions terminated by System.exit(" + status + ")"; JOptionPane.showMessageDialog(MainFrame.this, msg, title, JOptionPane.INFORMATION_MESSAGE); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/828da1589ecf80d1be67fffa7a1ab51335a3ab2f/MainFrame.java/clean/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
6647,
1071,
918,
1086,
1435,
288,
5411,
514,
1234,
273,
315,
1986,
23877,
2742,
1703,
14127,
635,
279,
745,
315,
397,
2868,
315,
869,
2332,
18,
8593,
2932,
397,
1267,
397,
315,
2934,
64,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
6647,
1071,
918,
1086,
1435,
288,
5411,
514,
1234,
273,
315,
1986,
23877,
2742,
1703,
14127,
635,
279,
745,
315,
397,
2868,
315,
869,
2332,
18,
8593,
2932,
397,
1267,
397,
315,
2934,
64,
82,
... |
boolean oldXRed = x.red; PosBottomHalf b = z.restructure(); b.left.red = false; b.right.red = false; b.red = oldXRed; } else if((y.left == null || !y.left.red) && (y.right != null && y.right.red)) { if(Debug.POSITION_DEBUG) Log.log(Log.DEBUG,this,"case 2"); y.red = true; if(x.red) x.red = false; else { } } | if(Debug.POSITION_DEBUG) Log.log(Log.DEBUG,this,"case 1"); boolean oldXRed = x.red; PosBottomHalf b = z.restructure(); b.left.red = false; b.right.red = false; b.red = oldXRed; } else if((y.left == null || !y.left.red) && (y.right != null && y.right.red)) { if(Debug.POSITION_DEBUG) Log.log(Log.DEBUG,this,"case 2"); y.red = true; if(x.red) x.red = false; else rbalance(r,x,x.parent); | private void rbalance(PosBottomHalf r, PosBottomHalf x) { PosBottomHalf y, z; if(r != null && r.red) { r.red = false; } else { if(x == null) y = null; else if(x.left == r) y = x.right; else y = x.left; if(y != null && !y.red) { if(y.left != null && y.left.red) z = y.left; else if(y.right != null && y.right.red) z = y.right; else { if(Debug.POSITION_DEBUG) Log.log(Log.DEBUG,this,"case 3"); if(x.left == y) z = y.right; else z = y.left; PosBottomHalf b = z.restructure(); y.red = false; x.red = true; //XXX: need to do case 1 or 2 again return; } if(Debug.POSITION_DEBUG) Log.log(Log.DEBUG,this,"case 1"); boolean oldXRed = x.red; PosBottomHalf b = z.restructure(); b.left.red = false; b.right.red = false; b.red = oldXRed; } else if((y.left == null || !y.left.red) && (y.right != null && y.right.red)) { if(Debug.POSITION_DEBUG) Log.log(Log.DEBUG,this,"case 2"); y.red = true; if(x.red) x.red = false; else { //XXX propogate up } } } } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/9e0f95d0004be52d4739bdffaac6ab58b1a7a3ce/PositionManager.java/buggy/org/gjt/sp/jedit/buffer/PositionManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
7138,
6112,
12,
1616,
10393,
16168,
436,
16,
6818,
10393,
16168,
619,
13,
202,
95,
202,
202,
1616,
10393,
16168,
677,
16,
998,
31,
202,
202,
430,
12,
86,
480,
446,
597,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
7138,
6112,
12,
1616,
10393,
16168,
436,
16,
6818,
10393,
16168,
619,
13,
202,
95,
202,
202,
1616,
10393,
16168,
677,
16,
998,
31,
202,
202,
430,
12,
86,
480,
446,
597,
... |
System.out.println(frame.toString()); | frameNum++; System.out.println(frameNum + " " +frame.toString()); | public void analyse(String inFileName) throws IOException { System.out.println("FLAX Analysis for "+inFileName); FileInputStream is = new FileInputStream(inFileName); StreamDecoder decoder = new StreamDecoder(is); // read stream info StreamInfo info = decoder.readStreamInfo(); System.out.println(info.toString()); // read metadata MetadataBase metadata; do { metadata = decoder.readMetadata(); System.out.println(metadata.toString()); } while (!metadata.isLast()); // read audio frames for (Frame frame = decoder.getNextFrame(); frame != null; frame = decoder.getNextFrame()) { System.out.println(frame.toString()); } } | 5788 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5788/f40065ab9b02a763211400dffc940c0a07d641c3/Analyser.java/buggy/src/java/org/kc7bfi/jflac/apps/Analyser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
31087,
12,
780,
316,
4771,
13,
1216,
1860,
288,
3639,
2332,
18,
659,
18,
8222,
2932,
19054,
2501,
16318,
364,
13773,
267,
4771,
1769,
3639,
11907,
353,
273,
394,
11907,
12,
267... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
31087,
12,
780,
316,
4771,
13,
1216,
1860,
288,
3639,
2332,
18,
659,
18,
8222,
2932,
19054,
2501,
16318,
364,
13773,
267,
4771,
1769,
3639,
11907,
353,
273,
394,
11907,
12,
267... |
dict.setObjectForKey( new NSMutableDictionary(), "componentLevelKeys"); | NSMutableDictionary componentLevelKeys = new NSMutableDictionary(); | public NSDictionary dictionary() { if(dict == null) { dict = new NSMutableDictionary(); addPageLevelValues(); NSArray displayPropertyKeys = (NSArray)context.valueForKey("displayPropertyKeys"); if(displayPropertyKeys != null && displayPropertyKeys.count() > 0) { dict.setObjectForKey( new NSMutableDictionary(), "componentLevelKeys"); for(Enumeration e = displayPropertyKeys.objectEnumerator(); e.hasMoreElements(); ) { String key = (String)e.nextElement(); addComponentLevelValuesForKey(key); } } } return dict; } | 46145 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46145/f109dceeba488cabc6338185a4620d9373ece675/ERD2WContextDictionary.java/clean/Common/Frameworks/ERDirectToWeb/Sources/er/directtoweb/ERD2WContextDictionary.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
423,
9903,
3192,
3880,
1435,
288,
3639,
309,
12,
1576,
422,
446,
13,
288,
5411,
2065,
273,
394,
423,
7303,
3050,
10905,
5621,
5411,
527,
1964,
2355,
1972,
5621,
5411,
11472,
1076,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
423,
9903,
3192,
3880,
1435,
288,
3639,
309,
12,
1576,
422,
446,
13,
288,
5411,
2065,
273,
394,
423,
7303,
3050,
10905,
5621,
5411,
527,
1964,
2355,
1972,
5621,
5411,
11472,
1076,
2... |
Font font = parent.getFont(); Composite projectGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3; projectGroup.setLayout(layout); projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); projectGroup.setFont(font); | Composite projectGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3; projectGroup.setLayout(layout); projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); | private final void createProjectLocationGroup(Composite parent) { Font font = parent.getFont(); // project specification group Composite projectGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3; projectGroup.setLayout(layout); projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); projectGroup.setFont(font); final Button useDefaultsButton = new Button(projectGroup, SWT.CHECK | SWT.RIGHT); useDefaultsButton.setFont(font); useDefaultsButton.setText(IDEWorkbenchMessages.ProjectLocationSelectionDialog_useDefaultLabel); useDefaultsButton.setSelection(this.useDefaults); GridData buttonData = new GridData(); buttonData.horizontalSpan = 3; useDefaultsButton.setLayoutData(buttonData); createUserSpecifiedProjectLocationGroup(projectGroup, !this.useDefaults); SelectionListener listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { useDefaults = useDefaultsButton.getSelection(); browseButton.setEnabled(!useDefaults); locationPathField.setEnabled(!useDefaults); locationLabel.setEnabled(!useDefaults); setLocationForSelection(); if (!useDefaults) { if (originalPath != null) locationPathField.setText(originalPath.toOSString()); else locationPathField.setText(""); //$NON-NLS-1$ } } }; useDefaultsButton.addSelectionListener(listener); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/bfc4f82ef4ce3a2262bf350cb4c32da08937adaa/ProjectLocationMoveDialog.java/clean/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/ProjectLocationMoveDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
727,
918,
752,
4109,
2735,
1114,
12,
9400,
982,
13,
288,
3639,
10063,
3512,
273,
982,
18,
588,
5711,
5621,
3639,
368,
1984,
7490,
1041,
3639,
14728,
1984,
1114,
273,
394,
14728,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
727,
918,
752,
4109,
2735,
1114,
12,
9400,
982,
13,
288,
3639,
10063,
3512,
273,
982,
18,
588,
5711,
5621,
3639,
368,
1984,
7490,
1041,
3639,
14728,
1984,
1114,
273,
394,
14728,
12,... |
ruby_class = (klass != null) ? klass : block.klass; | ruby.setRubyClass((klass != null) ? klass : block.klass); | public RubyObject yield0(RubyObject value, RubyObject self, RubyModule klass, boolean acheck) { RubyObject result = ruby.getNil(); if (!(isBlockGiven() || isFBlockGiven()) || (rubyBlock == null)) { throw new RuntimeException("yield called out of block"); } RubyVarmap.push(ruby); pushClass(); RubyBlock block = rubyBlock.getTmp(); Frame frame = block.frame; frame.setPrev(getRubyFrame()); rubyFrame = frame; VALUE old_cref = ruby_cref; ruby_cref = (NODE)getRubyFrame().getCbase(); RubyScope oldScope = ruby.getRubyScope(); ruby.setRubyScope(block.scope); rubyBlock.pop(); if ((block.flags & RubyBlock.BLOCK_D_SCOPE) != 0) { dynamicVars = new RubyVarmap(null, null, block.dynamicVars); } else { dynamicVars = block.dynamicVars; } ruby_class = (klass != null) ? klass : block.klass; if (klass == null) { self = (RubyObject)block.self; } NODE node = block.body; if (block.var != null) { // try { if (block.var == NODE.ONE) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray)value).length() != 0) { throw new RubyArgumentException("wrong # of arguments ("+ ((RubyArray)value).length() + " for 0)"); } } else { if (block.var.nd_type() == NODE_MASGN) { massign(self, block.var, value, acheck); } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray)value).length() == 1) { value = ((RubyArray)value).entry(0); } assign(self, block.var, value, acheck); } } // } catch () { // goto pop_state; // } } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray)value).length() == 1) { value = ((RubyArray)value).entry(0); } } rubyIter.push(block.iter); while (true) { try { if (node == null) { result = ruby.getNil(); } else if (node.nd_type() == NODE_CFUNC || node.nd_type() == NODE_IFUNC) { if (value == null) { value = RubyArray.m_newArray(ruby, 0); } result = ((RubyCallbackMethod)node.nd_cfnc()).execute(value, new RubyObject[] {(RubyObject)node.nd_tval(), self}, ruby); } else { result = eval(self, node); } break; } catch (RedoException rExcptn) { } catch (NextException nExcptn) { result = ruby.getNil(); break; } catch (BreakException bExcptn) { break; } catch (ReturnException rExcptn) { break; } } // pop_state: rubyIter.pop(); popClass(); RubyVarmap.pop(ruby); rubyBlock.setTmp(block); rubyFrame = getRubyFrame().getPrev(); ruby_cref = (NODE)old_cref; // if (ruby_scope->flag & SCOPE_DONT_RECYCLE) // scope_dup(old_scope); ruby.setRubyScope(oldScope); /* * if (state) { * if (!block->tag) { * switch (state & TAG_MASK) { * case TAG_BREAK: * case TAG_RETURN: * jump_tag_but_local_jump(state & TAG_MASK); * break; * } * } * JUMP_TAG(state); * } */ return result; } | 50993 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50993/a2024bddc1b8e83f4e8075d2080935c221a833fe/RubyInterpreter.java/buggy/org/jruby/interpreter/RubyInterpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
921,
2824,
20,
12,
54,
10340,
921,
460,
16,
19817,
921,
365,
16,
19817,
3120,
7352,
16,
1250,
279,
1893,
13,
288,
3639,
19817,
921,
563,
273,
22155,
18,
588,
12616,
5621,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
921,
2824,
20,
12,
54,
10340,
921,
460,
16,
19817,
921,
365,
16,
19817,
3120,
7352,
16,
1250,
279,
1893,
13,
288,
3639,
19817,
921,
563,
273,
22155,
18,
588,
12616,
5621,
7... |
private boolean completed(int x) { | private synchronized boolean completed(int x) { | private boolean completed(int x) { Logger.minor(this, "Completed: "+x+" on "+this+" ( completed="+blocksCompleted+", total="+(dataBlockInserters.length+checkBlockInserters.length)); synchronized(this) { if(finished) return true; if(x >= dataBlocks.length) { if(checkBlockInserters[x-dataBlocks.length] == null) { Logger.error(this, "Completed twice: check block "+x+" on "+this); return true; } checkBlockInserters[x-dataBlocks.length] = null; } else { if(dataBlockInserters[x] == null) { Logger.error(this, "Completed twice: data block "+x+" on "+this); return true; } dataBlockInserters[x] = null; } blocksCompleted++; if(blocksCompleted != dataBlockInserters.length + checkBlockInserters.length) return true; return false; } } | 51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/a6a9cc01004d94d4bdefc0b76c0bdb1962187369/SplitFileInserterSegment.java/clean/src/freenet/client/async/SplitFileInserterSegment.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
5951,
12,
474,
619,
13,
288,
202,
202,
3328,
18,
17364,
12,
2211,
16,
315,
9556,
30,
13773,
92,
9078,
603,
13773,
2211,
9078,
261,
5951,
1546,
15,
7996,
9556,
15,
3113,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
5951,
12,
474,
619,
13,
288,
202,
202,
3328,
18,
17364,
12,
2211,
16,
315,
9556,
30,
13773,
92,
9078,
603,
13773,
2211,
9078,
261,
5951,
1546,
15,
7996,
9556,
15,
3113,... |
NativeJavaObject.initJSObject(); | if (Context.useJSObject) NativeJavaObject.initJSObject(); | public static Scriptable init(Scriptable scope) throws PropertyException { NativeJavaPackage packages = new NativeJavaPackage(""); packages.setPrototype(getObjectPrototype(scope)); packages.setParentScope(scope); // We want to get a real alias, and not a distinct JavaPackage // with the same packageName, so that we share classes and packages // that are underneath. NativeJavaPackage javaAlias = (NativeJavaPackage)packages.get("java", packages); // It's safe to downcast here since initStandardObjects takes // a ScriptableObject. ScriptableObject global = (ScriptableObject) scope; global.defineProperty("Packages", packages, ScriptableObject.DONTENUM); global.defineProperty("java", javaAlias, ScriptableObject.DONTENUM); for (int i = 0; i < commonPackages.length; i++) packages.forcePackage(commonPackages[i]); NativeJavaObject.initJSObject(); Method[] m = FunctionObject.findMethods(NativeJavaPackage.class, "jsFunction_getClass"); FunctionObject f = new FunctionObject("getClass", m[0], global); global.defineProperty("getClass", f, ScriptableObject.DONTENUM); // I think I'm supposed to return the prototype, but I don't have one. return packages; } | 12564 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12564/2deb34d1bc45c20256876de120e23e6f853fca7d/NativeJavaPackage.java/buggy/org/mozilla/javascript/NativeJavaPackage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
22780,
1208,
12,
3651,
429,
2146,
13,
540,
1216,
4276,
503,
565,
288,
3639,
16717,
5852,
2261,
5907,
273,
394,
16717,
5852,
2261,
2932,
8863,
3639,
5907,
18,
542,
15846,
12,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
22780,
1208,
12,
3651,
429,
2146,
13,
540,
1216,
4276,
503,
565,
288,
3639,
16717,
5852,
2261,
5907,
273,
394,
16717,
5852,
2261,
2932,
8863,
3639,
5907,
18,
542,
15846,
12,
58... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.