rem stringlengths 1 53.3k | add stringlengths 0 80.5k | context stringlengths 6 326k | meta stringlengths 141 403 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
public static void validateUTF8(byte[] utf8) throws MalformedInputException { int count = 0; int leadByte = 0; int length = 0; int state = LEAD_BYTE; while (count < utf8.length) { int aByte = ((int) utf8[count] & 0xFF); switch (state) { case LEAD_BYTE: leadByte = aByte; length = bytesFromUTF8[aByte]; switch (length) { case 0: if (leadByte > 0x7E) throw new MalformedInputException(count); state = TRAIL_BYTE; break; case 1: if (leadByte < 0xC2 || leadByte > 0xDF) throw new MalformedInputException(count); state = TRAIL_BYTE_1; break; case 2: if (leadByte < 0xE0 || leadByte > 0xEF) throw new MalformedInputException(count); state = TRAIL_BYTE_1; break; case 3: if (leadByte < 0xF0 || leadByte > 0xF4) throw new MalformedInputException(count); state = TRAIL_BYTE_1; break; default: throw new MalformedInputException(count); } break; case TRAIL_BYTE_1: if (leadByte == 0xF0 && aByte < 0x90) throw new MalformedInputException(count); if (leadByte == 0xF4 && aByte > 0x8F) throw new MalformedInputException(count); if (leadByte == 0xE0 && aByte < 0xA0) throw new MalformedInputException(count); if (leadByte == 0xED && aByte > 0x9F) throw new MalformedInputException(count); case TRAIL_BYTE: if (aByte < 0x80 || aByte > 0xBF) throw new MalformedInputException(count); if (--length == 0) { state = LEAD_BYTE; } else { state = TRAIL_BYTE; } break; } count++; } | public static void validateUTF8(byte[] utf8) throws MalformedInputException { validateUTF(utf8, 0, utf8.length); | public static void validateUTF8(byte[] utf8) throws MalformedInputException { int count = 0; int leadByte = 0; int length = 0; int state = LEAD_BYTE; while (count < utf8.length) { int aByte = ((int) utf8[count] & 0xFF); switch (state) { case LEAD_BYTE: leadByte = aByte; length = bytesFromUTF8[aByte]; switch (length) { case 0: // check for ASCII if (leadByte > 0x7E) throw new MalformedInputException(count); state = TRAIL_BYTE; break; case 1: if (leadByte < 0xC2 || leadByte > 0xDF) throw new MalformedInputException(count); state = TRAIL_BYTE_1; break; case 2: if (leadByte < 0xE0 || leadByte > 0xEF) throw new MalformedInputException(count); state = TRAIL_BYTE_1; break; case 3: if (leadByte < 0xF0 || leadByte > 0xF4) throw new MalformedInputException(count); state = TRAIL_BYTE_1; break; default: // too long! Longest valid UTF-8 is 4 bytes (lead + three) // or if < 0 we got a trail byte in the lead byte position throw new MalformedInputException(count); } // switch (length) break; case TRAIL_BYTE_1: if (leadByte == 0xF0 && aByte < 0x90) throw new MalformedInputException(count); if (leadByte == 0xF4 && aByte > 0x8F) throw new MalformedInputException(count); if (leadByte == 0xE0 && aByte < 0xA0) throw new MalformedInputException(count); if (leadByte == 0xED && aByte > 0x9F) throw new MalformedInputException(count); // falls through to regular trail-byte test!! case TRAIL_BYTE: if (aByte < 0x80 || aByte > 0xBF) throw new MalformedInputException(count); if (--length == 0) { state = LEAD_BYTE; } else { state = TRAIL_BYTE; } break; } // switch (state) count++; } } | 48130 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48130/ade1478723edce95f407a038027d26b7e05459d5/Text.java/buggy/src/java/org/apache/hadoop/io/Text.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
1954,
5159,
28,
12,
7229,
8526,
7718,
28,
13,
377,
1216,
13311,
20518,
288,
565,
509,
1056,
273,
374,
31,
565,
509,
5871,
3216,
273,
374,
31,
565,
509,
769,
273,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
1954,
5159,
28,
12,
7229,
8526,
7718,
28,
13,
377,
1216,
13311,
20518,
288,
565,
509,
1056,
273,
374,
31,
565,
509,
5871,
3216,
273,
374,
31,
565,
509,
769,
273,
374,
... |
bugzillaReportSubmitForm.submitReportToRepository(); | bugzillaReportSubmitForm.submitReportToRepository(connector.getClientManager().getClient(repository)); | protected void timeTracker(int taskid, boolean enableDeadline) throws Exception { BugzillaTask bugtask = generateLocalTaskAndDownload("" + taskid); assertEquals(taskid, Integer.parseInt(bugtask.getTaskData().getId())); assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, bugtask.getSyncState()); Set<AbstractRepositoryTask> tasks = new HashSet<AbstractRepositoryTask>(); tasks.add(bugtask); // synchAndAssertState(tasks, RepositoryTaskSyncState.SYNCHRONIZED); TasksUiPlugin.getRepositoryManager().setSyncTime(repository, bugtask.getLastSyncDateStamp(), TasksUiPlugin.getDefault().getRepositoriesFilePath()); // connector.synchronizeChanged(repository); // Set<AbstractRepositoryTask> changedTasks = // connector.getOfflineTaskHandler().getChangedSinceLastSync(repository, // tasks); // assertEquals(1, changedTasks.size()); assertNotNull(repository.getUserName()); assertNotNull(repository.getPassword()); float estimatedTime, remainingTime, actualTime, addTime; String deadline = null; RepositoryTaskData bugtaskdata = bugtask.getTaskData(); estimatedTime = Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.ESTIMATED_TIME .getKeyString())); remainingTime = Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.REMAINING_TIME .getKeyString())); actualTime = Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.ACTUAL_TIME.getKeyString())); if (enableDeadline) deadline = bugtaskdata.getAttributeValue(BugzillaReportElement.DEADLINE.getKeyString()); estimatedTime += 2; remainingTime += 1.5; addTime = 0.75f; if (enableDeadline) deadline = generateNewDay(); bugtaskdata.setAttributeValue(BugzillaReportElement.ESTIMATED_TIME.getKeyString(), "" + estimatedTime); bugtaskdata.setAttributeValue(BugzillaReportElement.REMAINING_TIME.getKeyString(), "" + remainingTime); bugtaskdata.setAttributeValue(BugzillaReportElement.WORK_TIME.getKeyString(), "" + addTime); if (enableDeadline) bugtaskdata.setAttributeValue(BugzillaReportElement.DEADLINE.getKeyString(), deadline); BugzillaReportSubmitForm bugzillaReportSubmitForm; for (AbstractRepositoryTask task : tasks) { task.getTaskData().setAttributeValue(BugzillaReportElement.ADD_COMMENT.getKeyString(), "New Estimate: " + estimatedTime + "\nNew Remaining: " + remainingTime + "\nAdd: " + addTime); bugzillaReportSubmitForm = makeExistingBugPost(task.getTaskData()); bugzillaReportSubmitForm.submitReportToRepository(); } // assertEquals("Changed reports expected ", 1, // connector.getOfflineTaskHandler().getChangedSinceLastSync(repository, // tasks).size()); synchAndAssertState(tasks, RepositoryTaskSyncState.INCOMING); // synchAndAssertState(tasks, RepositoryTaskSyncState.SYNCHRONIZED); bugtaskdata = bugtask.getTaskData(); assertEquals(estimatedTime, Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.ESTIMATED_TIME .getKeyString()))); assertEquals(remainingTime, Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.REMAINING_TIME .getKeyString()))); assertEquals(actualTime + addTime, Float.parseFloat(bugtaskdata .getAttributeValue(BugzillaReportElement.ACTUAL_TIME.getKeyString()))); if (enableDeadline) assertEquals(deadline, bugtaskdata.getAttributeValue(BugzillaReportElement.DEADLINE.getKeyString())); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/fc5f7c9fb68f9ce217976cd7477a47d3a7cdaf92/BugzillaRepositoryConnectorTest.java/buggy/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
813,
8135,
12,
474,
29035,
16,
1250,
4237,
15839,
13,
1216,
1185,
288,
202,
202,
19865,
15990,
2174,
7934,
4146,
273,
2103,
2042,
2174,
1876,
7109,
2932,
6,
397,
29035,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
813,
8135,
12,
474,
29035,
16,
1250,
4237,
15839,
13,
1216,
1185,
288,
202,
202,
19865,
15990,
2174,
7934,
4146,
273,
2103,
2042,
2174,
1876,
7109,
2932,
6,
397,
29035,
17... |
if ((start == currpos) && (Character.isLetterOrDigit(str.charAt(currpos)) == false)) | if ((start == currpos) && (Character.isLetterOrDigit(str.charAt(currpos)) == false)) | public int countTokens() { int count = 0; int currpos = currentPosition; while (currpos < maxPosition) { int start = currpos; while ((currpos < maxPosition) && Character.isLetterOrDigit(str.charAt(currpos))) { currpos++; } if ((start == currpos) && (Character.isLetterOrDigit(str.charAt(currpos)) == false)) { currpos++; } count++; } return count; } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/77ad973f1d6ad8f28fd358f2ba4d4c63da65d953/ElemNumber.java/buggy/src/org/apache/xalan/templates/ElemNumber.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
1056,
5157,
1435,
565,
288,
1377,
509,
1056,
273,
374,
31,
1377,
509,
4306,
917,
273,
22356,
31,
1377,
1323,
261,
17016,
917,
411,
943,
2555,
13,
1377,
288,
3639,
509,
787,
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,
509,
1056,
5157,
1435,
565,
288,
1377,
509,
1056,
273,
374,
31,
1377,
509,
4306,
917,
273,
22356,
31,
1377,
1323,
261,
17016,
917,
411,
943,
2555,
13,
1377,
288,
3639,
509,
787,
2... |
protected UMOMessage doReceive(UMOImmutableEndpoint endpoint, long timeout) throws Exception | protected synchronized UMOMessage doReceive(UMOImmutableEndpoint endpoint, long timeout) throws Exception | protected UMOMessage doReceive(UMOImmutableEndpoint endpoint, long timeout) throws Exception { long t0 = System.currentTimeMillis(); if (timeout < 0) { timeout = Long.MAX_VALUE; } do { if (hasMessages(folder)) { int count = getMessageCount(folder); if (count > 0) { Message message = getNextMessage(folder); // so we don't get the same message again flagMessage(folder, message); return new MuleMessage(connector.getMessageAdapter(message)); } else if (count == -1) { throw new MessagingException("Cannot monitor folder: " + folder.getFullName() + " as folder is closed"); } } long sleep = Math.min(this.connector.getCheckFrequency(), timeout - (System.currentTimeMillis() - t0)); if (sleep > 0) { if (logger.isDebugEnabled()) { logger.debug("No results, sleeping for " + sleep); } Thread.sleep(sleep); } else { logger.debug("Timeout"); return null; } } while (true); } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/2728140743f07f856e93b813ce619c77291354bf/Pop3MessageDispatcher.java/clean/transports/email/src/main/java/org/mule/providers/email/Pop3MessageDispatcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
3852,
587,
5980,
1079,
741,
11323,
12,
2799,
51,
16014,
3293,
2494,
16,
1525,
2021,
13,
1216,
1185,
565,
288,
3639,
1525,
268,
20,
273,
2332,
18,
2972,
28512,
5621,
3639,
309,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
3852,
587,
5980,
1079,
741,
11323,
12,
2799,
51,
16014,
3293,
2494,
16,
1525,
2021,
13,
1216,
1185,
565,
288,
3639,
1525,
268,
20,
273,
2332,
18,
2972,
28512,
5621,
3639,
309,
261,
... |
assertTrue("3 returns a wrong port", u1.getPort() == -1); assertTrue("3 returns a wrong file", u1.getFile().equals( "/dir1/dir2/../file.java")); assertTrue("3 returns a wrong anchor", u1.getRef() == null); | assertEquals("3 returns a wrong port", -1, u1.getPort()); assertEquals("3 returns a wrong file", "/dir1/dir2/../file.java", u1.getFile()); assertNull("3 returns a wrong anchor", u1.getRef()); | public void test_ConstructorLjava_net_URLLjava_lang_String() { // Test for method java.net.URL(java.net.URL, java.lang.String) try { u = new URL("http://www.yahoo.com"); URL uf = new URL("file://www.yahoo.com"); // basic ones u1 = new URL(u, "file.java"); assertTrue("1 returns a wrong protocol", u1.getProtocol().equals( "http")); assertTrue("1 returns a wrong host", u1.getHost().equals( "www.yahoo.com")); assertTrue("1 returns a wrong port", u1.getPort() == -1); assertTrue("1 returns a wrong file", u1.getFile().equals( "/file.java")); assertTrue("1 returns a wrong anchor", u1.getRef() == null); URL u1f = new URL(uf, "file.java"); assertTrue("1f returns a wrong protocol", u1f.getProtocol().equals( "file")); assertTrue("1f returns a wrong host", u1f.getHost().equals( "www.yahoo.com")); assertTrue("1f returns a wrong port", u1f.getPort() == -1); assertTrue("1f returns a wrong file", u1f.getFile().equals( "/file.java")); assertTrue("1f returns a wrong anchor", u1f.getRef() == null); u1 = new URL(u, "dir1/dir2/../file.java"); assertTrue("3 returns a wrong protocol", u1.getProtocol().equals( "http")); assertTrue("3 returns a wrong host: " + u1.getHost(), u1.getHost() .equals("www.yahoo.com")); assertTrue("3 returns a wrong port", u1.getPort() == -1); assertTrue("3 returns a wrong file", u1.getFile().equals( "/dir1/dir2/../file.java")); assertTrue("3 returns a wrong anchor", u1.getRef() == null); u1 = new URL(u, "http:dir1/dir2/../file.java"); assertTrue("3a returns a wrong protocol", u1.getProtocol().equals( "http")); assertTrue("3a returns a wrong host: " + u1.getHost(), u1.getHost() .equals("")); assertTrue("3a returns a wrong port", u1.getPort() == -1); assertTrue("3a returns a wrong file", u1.getFile().equals( "dir1/dir2/../file.java")); assertTrue("3a returns a wrong anchor", u1.getRef() == null); u = new URL("http://www.apache.org/testing/"); u1 = new URL(u, "file.java"); assertTrue("4 returns a wrong protocol", u1.getProtocol().equals( "http")); assertTrue("4 returns a wrong host", u1.getHost().equals( "www.apache.org")); assertTrue("4 returns a wrong port", u1.getPort() == -1); assertTrue("4 returns a wrong file", u1.getFile().equals( "/testing/file.java")); assertTrue("4 returns a wrong anchor", u1.getRef() == null); uf = new URL("file://www.apache.org/testing/"); u1f = new URL(uf, "file.java"); assertTrue("4f returns a wrong protocol", u1f.getProtocol().equals( "file")); assertTrue("4f returns a wrong host", u1f.getHost().equals( "www.apache.org")); assertTrue("4f returns a wrong port", u1f.getPort() == -1); assertTrue("4f returns a wrong file", u1f.getFile().equals( "/testing/file.java")); assertTrue("4f returns a wrong anchor", u1f.getRef() == null); uf = new URL("file:/testing/"); u1f = new URL(uf, "file.java"); assertTrue("4fa returns a wrong protocol", u1f.getProtocol() .equals("file")); assertTrue("4fa returns a wrong host", u1f.getHost().equals("")); assertTrue("4fa returns a wrong port", u1f.getPort() == -1); assertTrue("4fa returns a wrong file", u1f.getFile().equals( "/testing/file.java")); assertTrue("4fa returns a wrong anchor", u1f.getRef() == null); uf = new URL("file:testing/"); u1f = new URL(uf, "file.java"); assertTrue("4fb returns a wrong protocol", u1f.getProtocol() .equals("file")); assertTrue("4fb returns a wrong host", u1f.getHost().equals("")); assertTrue("4fb returns a wrong port", u1f.getPort() == -1); assertTrue("4fb returns a wrong file", u1f.getFile().equals( "testing/file.java")); assertTrue("4fb returns a wrong anchor", u1f.getRef() == null); u1f = new URL(uf, "file:file.java"); assertTrue("4fc returns a wrong protocol", u1f.getProtocol() .equals("file")); assertTrue("4fc returns a wrong host", u1f.getHost().equals("")); assertTrue("4fc returns a wrong port", u1f.getPort() == -1); assertTrue("4fc returns a wrong file", u1f.getFile().equals( "file.java")); assertTrue("4fc returns a wrong anchor", u1f.getRef() == null); u1f = new URL(uf, "file:"); assertTrue("4fd returns a wrong protocol", u1f.getProtocol() .equals("file")); assertTrue("4fd returns a wrong host", u1f.getHost().equals("")); assertTrue("4fd returns a wrong port", u1f.getPort() == -1); assertTrue("4fd returns a wrong file", u1f.getFile().equals("")); assertTrue("4fd returns a wrong anchor", u1f.getRef() == null); u = new URL("http://www.apache.org/testing"); u1 = new URL(u, "file.java"); assertTrue("5 returns a wrong protocol", u1.getProtocol().equals( "http")); assertTrue("5 returns a wrong host", u1.getHost().equals( "www.apache.org")); assertTrue("5 returns a wrong port", u1.getPort() == -1); assertTrue("5 returns a wrong file", u1.getFile().equals( "/file.java")); assertTrue("5 returns a wrong anchor", u1.getRef() == null); uf = new URL("file://www.apache.org/testing"); u1f = new URL(uf, "file.java"); assertTrue("5f returns a wrong protocol", u1f.getProtocol().equals( "file")); assertTrue("5f returns a wrong host", u1f.getHost().equals( "www.apache.org")); assertTrue("5f returns a wrong port", u1f.getPort() == -1); assertTrue("5f returns a wrong file", u1f.getFile().equals( "/file.java")); assertTrue("5f returns a wrong anchor", u1f.getRef() == null); uf = new URL("file:/testing"); u1f = new URL(uf, "file.java"); assertTrue("5fa returns a wrong protocol", u1f.getProtocol() .equals("file")); assertTrue("5fa returns a wrong host", u1f.getHost().equals("")); assertTrue("5fa returns a wrong port", u1f.getPort() == -1); assertTrue("5fa returns a wrong file", u1f.getFile().equals( "/file.java")); assertTrue("5fa returns a wrong anchor", u1f.getRef() == null); uf = new URL("file:testing"); u1f = new URL(uf, "file.java"); assertTrue("5fb returns a wrong protocol", u1f.getProtocol() .equals("file")); assertTrue("5fb returns a wrong host", u1f.getHost().equals("")); assertTrue("5fb returns a wrong port", u1f.getPort() == -1); assertTrue("5fb returns a wrong file", u1f.getFile().equals( "file.java")); assertTrue("5fb returns a wrong anchor", u1f.getRef() == null); u = new URL("http://www.apache.org/testing/foobaz"); u1 = new URL(u, "/file.java"); assertTrue("6 returns a wrong protocol", u1.getProtocol().equals( "http")); assertTrue("6 returns a wrong host", u1.getHost().equals( "www.apache.org")); assertTrue("6 returns a wrong port", u1.getPort() == -1); assertTrue("6 returns a wrong file", u1.getFile().equals( "/file.java")); assertTrue("6 returns a wrong anchor", u1.getRef() == null); uf = new URL("file://www.apache.org/testing/foobaz"); u1f = new URL(uf, "/file.java"); assertTrue("6f returns a wrong protocol", u1f.getProtocol().equals( "file")); assertTrue("6f returns a wrong host", u1f.getHost().equals( "www.apache.org")); assertTrue("6f returns a wrong port", u1f.getPort() == -1); assertTrue("6f returns a wrong file", u1f.getFile().equals( "/file.java")); assertTrue("6f returns a wrong anchor", u1f.getRef() == null); u = new URL("http://www.apache.org:8000/testing/foobaz"); u1 = new URL(u, "/file.java"); assertTrue("7 returns a wrong protocol", u1.getProtocol().equals( "http")); assertTrue("7 returns a wrong host", u1.getHost().equals( "www.apache.org")); assertTrue("7 returns a wrong port", u1.getPort() == 8000); assertTrue("7 returns a wrong file", u1.getFile().equals( "/file.java")); assertTrue("7 returns a wrong anchor", u1.getRef() == null); u = new URL("http://www.apache.org/index.html"); u1 = new URL(u, "#bar"); assertTrue("8 returns a wrong host", u1.getHost().equals( "www.apache.org")); assertTrue("8 returns a wrong file", u1.getFile().equals( "/index.html")); assertTrue("8 returns a wrong anchor", u1.getRef().equals("bar")); u = new URL("http://www.apache.org/index.html#foo"); u1 = new URL(u, "http:#bar"); assertTrue("9 returns a wrong host", u1.getHost().equals( "www.apache.org")); assertTrue("9 returns a wrong file", u1.getFile().equals( "/index.html")); assertTrue("9 returns a wrong anchor", u1.getRef().equals("bar")); u = new URL("http://www.apache.org/index.html"); u1 = new URL(u, ""); assertTrue("10 returns a wrong host", u1.getHost().equals( "www.apache.org")); assertTrue("10 returns a wrong file", u1.getFile().equals( "/index.html")); assertTrue("10 returns a wrong anchor", u1.getRef() == null); uf = new URL("file://www.apache.org/index.html"); u1f = new URL(uf, ""); assertTrue("10f returns a wrong host", u1.getHost().equals( "www.apache.org")); assertTrue("10f returns a wrong file", u1.getFile().equals( "/index.html")); assertTrue("10f returns a wrong anchor", u1.getRef() == null); u = new URL("http://www.apache.org/index.html"); u1 = new URL(u, "http://www.apache.org"); assertTrue("11 returns a wrong host", u1.getHost().equals( "www.apache.org")); assertTrue("11 returns a wrong file", u1.getFile().equals("")); assertTrue("11 returns a wrong anchor", u1.getRef() == null); // test for question mark processing u = new URL("http://www.foo.com/d0/d1/d2/cgi-bin?foo=bar/baz"); // test for relative file and out of bound "/../" processing u1 = new URL(u, "../dir1/./dir2/../file.java"); assertTrue("A) returns a wrong file: " + u1.getFile(), u1.getFile() .equals("/d0/d1/dir1/file.java")); // test for absolute and relative file processing u1 = new URL(u, "/../dir1/./dir2/../file.java"); assertTrue("B) returns a wrong file", u1.getFile().equals( "/../dir1/./dir2/../file.java")); } catch (Exception e) { fail("1 Exception during tests : " + e.getMessage()); } try { // u should raise a MalFormedURLException because u, the context is // null u = null; u1 = new URL(u, "file.java"); } catch (MalformedURLException e) { return; } catch (Exception e) { fail("2 Exception during tests : " + e.getMessage()); } fail("didn't throw the expected MalFormedURLException"); } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/181e940cd92dfff67639d98e991206d375a987ea/URLTest.java/buggy/modules/luni/src/test/java/tests/api/java/net/URLTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
67,
6293,
21159,
67,
2758,
67,
1785,
21159,
67,
4936,
67,
780,
1435,
288,
202,
202,
759,
7766,
364,
707,
2252,
18,
2758,
18,
1785,
12,
6290,
18,
2758,
18,
1785,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
67,
6293,
21159,
67,
2758,
67,
1785,
21159,
67,
4936,
67,
780,
1435,
288,
202,
202,
759,
7766,
364,
707,
2252,
18,
2758,
18,
1785,
12,
6290,
18,
2758,
18,
1785,
1... |
return formModel.getPropertyAccessStrategy(); } | return formModel.getPropertyAccessStrategy(); } | public PropertyAccessStrategy getPropertyAccessStrategy() { return formModel.getPropertyAccessStrategy(); } | 55916 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55916/1ca92818155f3e0a4aed29e15c396b3c749e2b10/SwingFormModel.java/buggy/src/org/springframework/richclient/forms/SwingFormModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4276,
1862,
4525,
3911,
1862,
4525,
1435,
288,
3639,
327,
646,
1488,
18,
588,
1396,
1862,
4525,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4276,
1862,
4525,
3911,
1862,
4525,
1435,
288,
3639,
327,
646,
1488,
18,
588,
1396,
1862,
4525,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
MavenExecutionResponse response = processProject( request, project, dispatcher ); | MavenExecutionResponse response = processProject( session, goals, project, dispatcher ); | public MavenExecutionResponse execute( MavenExecutionRequest request ) throws ReactorException { if ( request.getSettings().isOffline() ) { getLogger().info( "Maven is running in offline mode." ); } try { resolveParameters( request.getSettings() ); } catch ( ComponentLookupException e ) { throw new ReactorException( "Unable to configure Maven for execution", e ); } catch ( ComponentLifecycleException e ) { throw new ReactorException( "Unable to configure Maven for execution", e ); } EventDispatcher dispatcher = request.getEventDispatcher(); String event = MavenEvents.REACTOR_EXECUTION; dispatcher.dispatchStart( event, request.getBaseDirectory() ); List projects; try { projects = collectProjects( request.getFiles(), request.getLocalRepository(), request.isRecursive(), request.getSettings() ); projects = ProjectSorter.getSortedProjects( projects ); if ( projects.isEmpty() ) { List externalProfiles = getActiveExternalProfiles( null, request.getSettings() ); projects.add( projectBuilder.buildStandaloneSuperProject( request.getLocalRepository(), externalProfiles ) ); } } catch ( IOException e ) { throw new ReactorException( "Error processing projects for the reactor: ", e ); } catch ( CycleDetectedException e ) { throw new ReactorException( "Error processing projects for the reactor: ", e ); } catch ( ArtifactResolutionException e ) { dispatcher.dispatchError( event, request.getBaseDirectory(), e ); MavenExecutionResponse response = new MavenExecutionResponse(); response.setStart( new Date() ); response.setFinish( new Date() ); response.setException( e ); logFailure( response, e, null ); return response; } catch ( ProjectBuildingException e ) { dispatcher.dispatchError( event, request.getBaseDirectory(), e ); MavenExecutionResponse response = new MavenExecutionResponse(); response.setStart( new Date() ); response.setFinish( new Date() ); response.setException( e ); logFailure( response, e, null ); return response; } try { for ( Iterator iterator = projects.iterator(); iterator.hasNext(); ) { MavenProject project = (MavenProject) iterator.next(); line(); getLogger().info( "Building " + project.getName() ); line(); try { MavenExecutionResponse response = processProject( request, project, dispatcher ); if ( response.isExecutionFailure() ) { dispatcher.dispatchError( event, request.getBaseDirectory(), response.getException() ); return response; } } catch ( LifecycleExecutionException e ) { throw new ReactorException( "Error executing project within the reactor", e ); } } dispatcher.dispatchEnd( event, request.getBaseDirectory() ); // TODO: not really satisfactory return null; } catch ( ReactorException e ) { dispatcher.dispatchError( event, request.getBaseDirectory(), e ); throw e; } } | 50542 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50542/701ef520a30c7b30dcdf2e4a4f06548cc06fbf0b/DefaultMaven.java/buggy/maven-core/src/main/java/org/apache/maven/DefaultMaven.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
17176,
3210,
1064,
1836,
12,
17176,
3210,
691,
590,
262,
3639,
1216,
868,
3362,
503,
565,
288,
3639,
309,
261,
590,
18,
588,
2628,
7675,
291,
23106,
1435,
262,
3639,
288,
5411,
7156... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17176,
3210,
1064,
1836,
12,
17176,
3210,
691,
590,
262,
3639,
1216,
868,
3362,
503,
565,
288,
3639,
309,
261,
590,
18,
588,
2628,
7675,
291,
23106,
1435,
262,
3639,
288,
5411,
7156... |
HttpServletResponse response) throws Exception { | HttpServletResponse response) throws Exception { | public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { // Step 1: determine the name of the controller. // This maps to a slash + the name of the controller. String uri = this.urlPathHelper.getLookupPathForRequest(request); String[] uriParts = StringUtils.tokenizeToStringArray(uri, SLASH, true, true); String controllerName = uriParts[0]; // Step 2: lookup the controller in the application. GrailsControllerClass controllerClass = this.application.getController(controllerName); if (controllerClass == null) { String fullControllerName = controllerName.substring(0, 1).toUpperCase() + controllerName.substring(1) + DefaultGrailsControllerClass.CONTROLLER; throw new UnknownControllerException("Controller named [" + controllerName + "] could not be found. Make sure [" + fullControllerName + "] is defined and available!"); } // Step 3: load controller from application context. GroovyObject controller = (GroovyObject)this.applicationContext.getBean(controllerName + DefaultGrailsControllerClass.CONTROLLER); // Step 4: get closure property name for URI. String closurePropertyName = controllerClass.getClosurePropertyName(uri); if (closurePropertyName == null) { throw new NoClosurePropertyForURIException("Could not find closure property for URI [" + uri + "] for controller [" + controllerClass.getFullName() + "]!"); } // Step 5: get the view name for this closure property. String viewName = controllerClass.getViewName(closurePropertyName); boolean viewNameBlank = (viewName == null || viewName.length() == 0); // Step 6: get closure from closure property Closure closure = (Closure)controller.getProperty(closurePropertyName); // Step 7: determine argument count and execute. Object returnValue = null; if (closure.getParameterTypes().length == 1) { // closure may have zero or one parameter, we cannot be sure. returnValue = closure.call(new Object[] { new GrailsHttpServletRequest(request) }); } else if (closure.getParameterTypes().length == 2) { returnValue = closure.call(new Object[] { new GrailsHttpServletRequest(request), response }); } else { throw new IncompatibleParameterCountException("Closure on property [" + closurePropertyName + "] in [" + controllerClass.getFullName() + "] has an incompatible parameter count [" + closure.getParameterTypes().length + "]! Supported values are 0 and 2."); } // Step 8: determine return value type and handle accordingly if (returnValue == null) { if (viewNameBlank) { return null; } else { return new ModelAndView(viewName); } } else if (returnValue instanceof Map) { if (viewNameBlank) { throw new NoViewNameDefinedException("Map instance returned by and view name specified for closure on property [" + closurePropertyName + "] in controller [" + controllerClass.getFullName() + "]!"); } else { return new ModelAndView(viewName, (Map)returnValue); } } else if (returnValue instanceof ModelAndView) { ModelAndView modelAndView = (ModelAndView)returnValue; if (modelAndView.getView() == null && modelAndView.getViewName() == null) { if (viewNameBlank) { throw new NoViewNameDefinedException("ModelAndView instance returned by and no view name defined by nor for closure on property [" + closurePropertyName + "] in controller [" + controllerClass.getFullName() + "]!"); } else { modelAndView.setViewName(viewName); } } return modelAndView; } throw new UnsupportedReturnValueException("Return value [" + returnValue + "] is not supported for closure property [" + closurePropertyName + "] in controller [" + controllerClass.getFullName() + "]!"); } | 46315 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46315/19641367ddff28fc77240ad7316776a7e4460c62/SimpleGrailsController.java/buggy/grails/src/web/org/codehaus/groovy/grails/web/servlet/mvc/SimpleGrailsController.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3164,
1876,
1767,
15713,
12,
2940,
18572,
590,
16,
1082,
202,
2940,
29910,
766,
13,
1216,
1185,
288,
202,
202,
759,
8693,
404,
30,
4199,
326,
508,
434,
326,
2596,
18,
202,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3164,
1876,
1767,
15713,
12,
2940,
18572,
590,
16,
1082,
202,
2940,
29910,
766,
13,
1216,
1185,
288,
202,
202,
759,
8693,
404,
30,
4199,
326,
508,
434,
326,
2596,
18,
202,
202... |
Object val = callDirect(cx, scope, newInstance, <directCallArgs>); | Object val = <body-name>(cx, scope, newInstance, <directCallArgs>); | private void emitDirectConstructor() {/* we generate .. Scriptable directConstruct(<directCallArgs>) { Scriptable newInstance = createObject(cx, scope); Object val = callDirect(cx, scope, newInstance, <directCallArgs>); if (val instanceof Scriptable && val != Undefined.instance) { return (Scriptable) val; } return newInstance; }*/ short flags = (short)(ClassFileWriter.ACC_PUBLIC | ClassFileWriter.ACC_FINAL); cfw.startMethod("constructDirect", fnCurrent.getDirectCallMethodSignature(), flags); int argCount = fnCurrent.getParamCount(); int firstLocal = (4 + argCount * 3) + 1; cfw.addALoad(0); // this cfw.addALoad(1); // cx cfw.addALoad(2); // scope cfw.addInvoke(ByteCode.INVOKEVIRTUAL, "org/mozilla/javascript/BaseFunction", "createObject", "(Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +")Lorg/mozilla/javascript/Scriptable;"); cfw.addAStore(firstLocal); cfw.addALoad(0); cfw.addALoad(1); cfw.addALoad(2); cfw.addALoad(firstLocal); for (int i = 0; i < argCount; i++) { cfw.addALoad(4 + (i * 3)); cfw.addDLoad(5 + (i * 3)); } cfw.addALoad(4 + argCount * 3); cfw.addInvoke(ByteCode.INVOKEVIRTUAL, generatedClassName, "callDirect", fnCurrent.getDirectCallMethodSignature()); int exitLabel = cfw.acquireLabel(); cfw.add(ByteCode.DUP); // make a copy of callDirect result cfw.add(ByteCode.INSTANCEOF, "org/mozilla/javascript/Scriptable"); cfw.add(ByteCode.IFEQ, exitLabel); cfw.add(ByteCode.DUP); // make a copy of callDirect result pushUndefined(cfw); cfw.add(ByteCode.IF_ACMPEQ, exitLabel); // cast callDirect result cfw.add(ByteCode.CHECKCAST, "org/mozilla/javascript/Scriptable"); cfw.add(ByteCode.ARETURN); cfw.markLabel(exitLabel); cfw.addALoad(firstLocal); cfw.add(ByteCode.ARETURN); cfw.stopMethod((short)(firstLocal + 1), null); } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/3c9b84173796cf5a1eb1f786e5ba6af89b66fcab/Codegen.java/buggy/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3626,
5368,
6293,
1435,
565,
288,
20308,
565,
732,
2103,
6116,
3639,
22780,
2657,
7249,
12,
32,
7205,
1477,
2615,
23429,
288,
5411,
22780,
5984,
273,
17109,
12,
71,
92,
16,
214... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3626,
5368,
6293,
1435,
565,
288,
20308,
565,
732,
2103,
6116,
3639,
22780,
2657,
7249,
12,
32,
7205,
1477,
2615,
23429,
288,
5411,
22780,
5984,
273,
17109,
12,
71,
92,
16,
214... |
public Object getContent(Context c) { | public List getContent(Context c) { | public Object getContent(Context c) { return ContentUtil.getInlineContentList(_elem, c); } | 53937 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53937/bbe26e114cd1f823901a5ca3d63b5fccfdfedf81/FloatedBlockContent.java/buggy/src/java/org/xhtmlrenderer/layout/content/FloatedBlockContent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
5154,
12,
1042,
276,
13,
288,
3639,
327,
3697,
1304,
18,
588,
10870,
1350,
682,
24899,
10037,
16,
276,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
5154,
12,
1042,
276,
13,
288,
3639,
327,
3697,
1304,
18,
588,
10870,
1350,
682,
24899,
10037,
16,
276,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
} else if (seen == NEW && getClassConstantOperand().equals(getClassName())) { instanceCreated = true; instanceCreatedPC = getPC(); } else if (seen == PUTSTATIC || seen == GETSTATIC || seen == INVOKESTATIC || seen == NEW) if (getPC() + 6 < codeBytes.length) requires.add(getDottedClassConstantOperand()); | } else if (seen == NEW && getClassConstantOperand().equals(getClassName())) { instanceCreated = true; instanceCreatedPC = getPC(); } else if (seen == PUTSTATIC || seen == GETSTATIC || seen == INVOKESTATIC || seen == NEW) if (getPC() + 6 < codeBytes.length) requires.add(getDottedClassConstantOperand()); | public void sawOpcode(int seen) { if (seen == PUTSTATIC && getClassConstantOperand().equals(getClassName())) { // Don't do this check; it generates too many false // positives. We need to do a more detailed check // of which variables could be seen. if (REPORT_CREATE_INSTANCE_BEFORE_FIELDS_ASSIGNED && instanceCreated && !instanceCreatedWarningGiven) { String okSig = "L" + getClassName() + ";"; if (!okSig.equals(getSigConstantOperand())) { bugReporter.reportBug(new BugInstance("SI_INSTANCE_BEFORE_FINALS_ASSIGNED", NORMAL_PRIORITY) .addClassAndMethod(this) .addSourceLine(this, instanceCreatedPC)); instanceCreatedWarningGiven = true; } } } else if (seen == NEW && getClassConstantOperand().equals(getClassName())) { instanceCreated = true; instanceCreatedPC = getPC(); } else if (seen == PUTSTATIC || seen == GETSTATIC || seen == INVOKESTATIC || seen == NEW) if (getPC() + 6 < codeBytes.length) requires.add(getDottedClassConstantOperand()); } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/4748a5a9b76f3dd763ee6bc7755c932a711bd6a6/InitializationChain.java/clean/findbugs/src/java/edu/umd/cs/findbugs/detect/InitializationChain.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
19821,
22808,
12,
474,
5881,
13,
288,
3639,
309,
261,
15156,
422,
11443,
22741,
597,
2900,
6902,
10265,
7675,
14963,
12,
588,
3834,
1435,
3719,
225,
288,
202,
202,
759,
7615,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19821,
22808,
12,
474,
5881,
13,
288,
3639,
309,
261,
15156,
422,
11443,
22741,
597,
2900,
6902,
10265,
7675,
14963,
12,
588,
3834,
1435,
3719,
225,
288,
202,
202,
759,
7615,
1... |
while (enum.hasMoreElements()) { | while (rslEnum.hasMoreElements()) { | public int generateGCMapEntry(OPT_GCIRMapElement irMapElem) throws InterruptiblePragma { // the index into the GC maps we will use for this instruction. int mapIndex = NO_MAP_ENTRY; // Before requesting the (first) map entry, lets make sure we // will need it. If the reg/spill list is empty, we don't // need a map slot, i.e., no references are live at this instruction OPT_RegSpillListEnumerator enum = irMapElem.regSpillListEnumerator(); if (enum.hasMoreElements()) { // For efficiency we create our own bit map and then set the // appropriate array value int bitMap = 0; // count the spills so we know how big of an array we'll need int numSpills = 0; int numRegs = 0; // Because the output data structure (the map) stores register // information before spills, we need to traverse the list twice // the first time we get the register mask, the 2nd time we get // the spills // process the register while (enum.hasMoreElements()) { OPT_RegSpillListElement elem = (OPT_RegSpillListElement) enum.nextElement(); if (elem.isSpill()) { numSpills++; } else { numRegs++; int realRegNumber = elem.getRealRegNumber(); if (VM.VerifyAssertions && realRegNumber > LAST_GCMAP_REG) { System.out.println(elem); System.out.println(LAST_GCMAP_REG); VM._assert(false, "reg > last GC Map Reg!!"); } // get the bit position for this register number int bitPosition = getRegBitPosition(realRegNumber); // Set the appropriate bit bitMap = bitMap | (NEXT_BIT >>> bitPosition); } } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/b456534d9b99de463325c8cc3907b41fc605cb4c/VM_OptGCMap.java/clean/rvm/src/vm/compilers/optimizing/vmInterface/services/VM_OptGCMap.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
2103,
15396,
863,
1622,
12,
15620,
67,
43,
7266,
54,
863,
1046,
9482,
863,
7498,
13,
1216,
3094,
4483,
1523,
2050,
9454,
288,
565,
368,
326,
770,
1368,
326,
15085,
7565,
732,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
2103,
15396,
863,
1622,
12,
15620,
67,
43,
7266,
54,
863,
1046,
9482,
863,
7498,
13,
1216,
3094,
4483,
1523,
2050,
9454,
288,
565,
368,
326,
770,
1368,
326,
15085,
7565,
732,
... |
FileEditorManagerImpl.openFileImpl3(window, entry.myFile, false, entry); | getManager().openFileImpl3(window, entry.myFile, false, entry); | public JPanel readExternalPanel(final Element element) { final Element splitterElement = element.getChild("splitter"); if (splitterElement != null) { LOG.info("splitter"); final JPanel res = new JPanel(new BorderLayout()); final boolean orientation = "vertical".equals(splitterElement.getAttributeValue("split-orientation")); final float proportion = Float.valueOf(splitterElement.getAttributeValue("split-proportion")).floatValue(); final Element first = splitterElement.getChild("split-first"); final Element second = splitterElement.getChild("split-second"); final Splitter splitter = new Splitter(orientation, proportion, 0.1f, 0.9f); splitter.setFirstComponent(readExternalPanel(first)); splitter.setSecondComponent(readExternalPanel(second)); res.add(splitter, BorderLayout.CENTER); return res; } else { final Element leaf = element.getChild("leaf"); if (leaf != null) { final EditorWindow window = new EditorWindow(this); try { window.myInsideTabChange++; final List<Element> children = leaf.getChildren("file"); VirtualFile currentFile = null; for (final Element file : children) { final HistoryEntry entry; entry = new HistoryEntry(getManager().myProject, file.getChild(HistoryEntry.TAG)); FileEditorManagerImpl.openFileImpl3(window, entry.myFile, false, entry); if (getManager().isFileOpen(entry.myFile)) { window.setFilePinned(entry.myFile, Boolean.valueOf(file.getAttributeValue("pinned")).booleanValue()); if (Boolean.valueOf(file.getAttributeValue("current-in-tab")).booleanValue()) { currentFile = entry.myFile; } if (Boolean.valueOf(file.getAttributeValue("current")).booleanValue()) { setCurrentWindow(window, false); } } } if (currentFile != null) { final EditorComposite editor = window.findFileComposite(currentFile); if (editor != null) { window.setSelectedEditor(editor); } } } catch (InvalidDataException e) { } finally { window.myInsideTabChange--; } return window.myPanel; } } return null; } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/00c1daa523aa004c3bcced6f2bf1473102f1ad90/EditorsSplitters.java/clean/source/com/intellij/openapi/fileEditor/impl/EditorsSplitters.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
24048,
855,
6841,
5537,
12,
6385,
3010,
930,
13,
288,
565,
727,
3010,
21553,
1046,
273,
930,
18,
588,
1763,
2932,
4939,
387,
8863,
565,
309,
261,
4939,
387,
1046,
480,
446,
13,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
24048,
855,
6841,
5537,
12,
6385,
3010,
930,
13,
288,
565,
727,
3010,
21553,
1046,
273,
930,
18,
588,
1763,
2932,
4939,
387,
8863,
565,
309,
261,
4939,
387,
1046,
480,
446,
13,
28... |
for(Enumeration en = hooks.elements(); en.hasMoreElements();) { ((LoggerHook) en.nextElement()).log(o,c,msg,e,priority); | LoggerHook[] myHooks = hooks; for(int i=0;i<myHooks.length;i++) { myHooks[i].log(o,c,msg,e,priority); | public void log(Object o, Class c, String msg, Throwable e, int priority){ for(Enumeration en = hooks.elements(); en.hasMoreElements();) { ((LoggerHook) en.nextElement()).log(o,c,msg,e,priority); } } | 48807 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48807/0400e73e7503ab43211657c44d8448afd6346cce/LoggerHookChain.java/clean/src/freenet/support/LoggerHookChain.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
613,
12,
921,
320,
16,
1659,
276,
16,
514,
1234,
16,
4206,
425,
16,
509,
4394,
15329,
3639,
364,
12,
21847,
570,
273,
9153,
18,
6274,
5621,
570,
18,
5332,
7417,
3471,
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,
377,
1071,
918,
613,
12,
921,
320,
16,
1659,
276,
16,
514,
1234,
16,
4206,
425,
16,
509,
4394,
15329,
3639,
364,
12,
21847,
570,
273,
9153,
18,
6274,
5621,
570,
18,
5332,
7417,
3471,
5621,
... |
endExplanationString = "(Sho) Game aborted by Black at move 1"; | endExplanationString = "(Sho) Game aborted by "+loser+" at move 1"; | protected String getEndExplanationString(int status, int mode){ String endExplanationString = "(?) No result [specific reason unknown]"; switch (status){ case 0: switch (mode){ case 0: endExplanationString = "(Res) Black resigns"; break; case 1: endExplanationString = "(Mat) Black checkmated"; break; case 2: endExplanationString = "(Fla) Black forfeits on time."; break; case 3: endExplanationString = "(Adj) White declared the winner by adjudication"; break; case 4: endExplanationString = "(BQ) Black disconnected and forfeits"; break; case 5: endExplanationString = "(BQ) Black got disconnected and forfeits"; break; case 6: endExplanationString = "(BQ) Unregistered player Black disconnected and forfeits"; break; case 7: endExplanationString = "(Res) Black's partner resigns"; break; case 8: endExplanationString = "(Mat) Black's partner checkmated"; break; case 9: endExplanationString = "(Fla) Black's partner forfeits on time"; break; case 10: endExplanationString = "(BQ) Black's partner disconnected and forfeits"; break; case 11: endExplanationString = "(BQ) Black disconnected and forfeits [obsolete?]"; break; case 12: endExplanationString = "(1-0) White wins [specific reason unknown]"; break; } break; case 1: switch (mode){ case 0: endExplanationString = "(Agr) Game drawn by mutual agreement"; break; case 1: endExplanationString = "(Sta) Black stalemated"; break; case 2: endExplanationString = "(Rep) Game drawn by repetition"; break; case 3: endExplanationString = "(50) Game drawn by the 50 move rule"; break; case 4: endExplanationString = "(TM) Black ran out of time and White has no material to mate"; break; case 5: endExplanationString = "(NM) Game drawn because neither player has mating material"; break; case 6: endExplanationString = "(NT) Game drawn because both players ran out of time"; break; case 7: endExplanationString = "(Adj) Game drawn by adjudication"; break; case 8: endExplanationString = "(Agr) Partner's game drawn by mutual agreement"; break; case 9: endExplanationString = "(NT) Partner's game drawn because both players ran out of time"; break; case 10: endExplanationString = "(1/2) Game drawn [specific reason unknown]"; break; } break; case 2: switch (mode){ case 0: endExplanationString = "(?) Game adjourned by mutual agreement"; break; case 1: endExplanationString = "(?) Game adjourned when Black disconnected"; break; case 2: endExplanationString = "(?) Game adjourned by system shutdown"; break; case 3: endExplanationString = "(?) Game courtesyadjourned by Black"; break; case 4: endExplanationString = "(?) Game adjourned by an administrator"; break; case 5: endExplanationString = "(?) Game adjourned when Black got disconnected"; break; } break; case 3: switch (mode){ case 0: endExplanationString = "(Agr) Game aborted by mutual agreement"; break; case 1: endExplanationString = "(BQ) Game aborted when Black disconnected"; break; case 2: endExplanationString = "(SD) Game aborted by system shutdown"; break; case 3: endExplanationString = "(BA) Game courtesyaborted by Black"; break; case 4: endExplanationString = "(Adj) Game aborted by an administrator"; break; case 5: endExplanationString = "(Sho) Game aborted because it's too short to adjourn"; break; case 6: endExplanationString = "(BQ) Game aborted when Black's partner disconnected"; break; case 7: endExplanationString = "(Sho) Game aborted by Black at move 1"; break; case 8: endExplanationString = "(Sho) Game aborted by Black's partner at move 1"; break; case 9: endExplanationString = "(Sho) Game aborted because it's too short"; break; case 10: endExplanationString = "(Adj) Game aborted because Black's account expired"; break; case 11: endExplanationString = "(BQ) Game aborted when Black got disconnected"; break; case 12: endExplanationString = "(?) No result [specific reason unknown]"; break; } break; } return endExplanationString; } | 1161 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1161/732916e421bbf8a8c617fa1ed44064e3a3535e92/JinChessclubConnection.java/clean/src/free/jin/chessclub/JinChessclubConnection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
514,
9968,
424,
15854,
780,
12,
474,
1267,
16,
509,
1965,
15329,
565,
514,
679,
424,
15854,
780,
273,
315,
3680,
13,
2631,
563,
306,
12524,
3971,
5917,
4279,
31,
565,
1620,
261,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
514,
9968,
424,
15854,
780,
12,
474,
1267,
16,
509,
1965,
15329,
565,
514,
679,
424,
15854,
780,
273,
315,
3680,
13,
2631,
563,
306,
12524,
3971,
5917,
4279,
31,
565,
1620,
261,
2... |
public boolean runInWorkThread(PluginManagerProgress progress) | public void runInWorkThread(PluginManagerProgress progress) | public boolean runInWorkThread(PluginManagerProgress progress) { return true; } | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/b923059c8829e79298e41ce7e4a83f970c79d84c/Roster.java/buggy/org/gjt/sp/jedit/pluginmgr/Roster.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1250,
1086,
382,
2421,
3830,
12,
3773,
1318,
5491,
4007,
13,
202,
202,
95,
1082,
202,
2463,
638,
31,
202,
202,
97,
2,
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,
3196,
202,
482,
1250,
1086,
382,
2421,
3830,
12,
3773,
1318,
5491,
4007,
13,
202,
202,
95,
1082,
202,
2463,
638,
31,
202,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
String[] immuResources = configuration.getStringArray("import.immutable.resources"); if (immuResources == null) { immuResources = new String[0]; } List immutableResourcesOri = java.util.Arrays.asList(immuResources); ArrayList immutableResources = new ArrayList(); for (int i = 0; i < immutableResourcesOri.size(); i++) { String path = ((String)immutableResourcesOri.get(i)).trim(); if (path != null && !"".equals(path)) { immutableResources.add(path); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Immutable resource : " + (i + 1) + " - " + path); } } } if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Immutable resources : " + ((immutableResources.size() > 0) ? "enabled" : "disabled")); } setRuntimeProperty("import.immutable.resources", immutableResources); String convertToXmlPage = configuration.getString("import.convert.xmlpage"); setRuntimeProperty("import.convert.xmlpage", convertToXmlPage); | protected void initConfiguration(ExtendedProperties configuration) throws Exception { // this will initialize the encoding with the default String defaultEncoding = m_systemInfo.getDefaultEncoding(); // check the opencms.properties for a different setting defaultEncoding = configuration.getString("defaultContentEncoding", defaultEncoding); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". OpenCms encoding : " + defaultEncoding); } String systemEncoding = null; try { systemEncoding = System.getProperty("file.encoding"); } catch (SecurityException se) { // security manager is active, but we will try other options before giving up } if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". System file.encoding : " + systemEncoding); } if (!defaultEncoding.equals(systemEncoding)) { String msg = "OpenCms startup failure: System file.encoding '" + systemEncoding + "' not equal to OpenCms encoding '" + defaultEncoding + "'"; if (getLog(this).isFatalEnabled()) { getLog(this).fatal(OpenCmsCore.C_MSG_CRITICAL_ERROR + "1: " + msg); } throw new Exception(msg); } try { // check if the found encoding is supported // this will work with Java 1.4+ only if (!java.nio.charset.Charset.isSupported(defaultEncoding)) { defaultEncoding = m_systemInfo.getDefaultEncoding(); } } catch (Throwable t) { // will be thrown in Java < 1.4 (NoSuchMethodException etc.) // in Java < 1.4 there is no easy way to check if encoding is supported, // so you must make sure your setting in "opencms.properties" is correct. } m_systemInfo.setDefaultEncoding(defaultEncoding); // read server ethernet address (MAC) and init UUID generator String ethernetAddress = configuration.getString("server.ethernet.address", CmsUUID.getDummyEthernetAddress()); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Ethernet address used: " + ethernetAddress); } CmsUUID.init(ethernetAddress); // set the server name String serverName = configuration.getString("server.name", "OpenCmsServer"); m_systemInfo.setServerName(serverName); // initialize the lock manager m_lockManager = CmsLockManager.getInstance(); // initialize the memory monitor m_memoryMonitor = CmsMemoryMonitor.initialize(configuration); // check the installed Java SDK try { if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { String jdkinfo = System.getProperty("java.vm.name") + " "; jdkinfo += System.getProperty("java.vm.version") + " "; jdkinfo += System.getProperty("java.vm.info") + " "; jdkinfo += System.getProperty("java.vm.vendor") + " "; getLog(CmsLog.CHANNEL_INIT).info(". Java VM in use : " + jdkinfo); String osinfo = System.getProperty("os.name") + " "; osinfo += System.getProperty("os.version") + " "; osinfo += System.getProperty("os.arch") + " "; getLog(CmsLog.CHANNEL_INIT).info(". Operating sytem : " + osinfo); } } catch (Exception e) { if (getLog(this).isErrorEnabled()) { getLog(this).error(OpenCmsCore.C_MSG_CRITICAL_ERROR + "2", e); } // any exception here is fatal and will cause a stop in processing throw e; } // read the default user configuration m_defaultUsers = CmsDefaultUsers.initialize(configuration); try { // init the rb via the manager with the configuration // and init the cms-object with the rb. m_driverManager = CmsDriverManager.newInstance(configuration); } catch (Exception e) { if (getLog(this).isErrorEnabled()) { getLog(this).error(OpenCmsCore.C_MSG_CRITICAL_ERROR + "3", e); } // any exception here is fatal and will cause a stop in processing throw new CmsException("Database init failed", CmsException.C_RB_INIT_ERROR, e); } try { // initalize the Hashtable with all available mimetypes Hashtable mimeTypes = m_driverManager.readMimeTypes(); setMimeTypes(mimeTypes); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Found mime types : " + mimeTypes.size() + " entrys"); } // if the System property opencms.disableScheduler is set to true, don't start scheduling if (!new Boolean(System.getProperty("opencms.disableScheduler")).booleanValue()) { // now initialise the OpenCms scheduler to launch cronjobs m_table = new CmsCronTable(m_driverManager.readCronTable()); m_scheduler = new CmsCronScheduler(this, m_table); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". OpenCms scheduler : enabled"); } } else { if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". OpenCms scheduler : disabled"); } } } catch (Exception e) { if (getLog(this).isErrorEnabled()) { getLog(this).error(OpenCmsCore.C_MSG_CRITICAL_ERROR + "5", e); } // any exception here is fatal and will cause a stop in processing throw e; } // initialize the Thread store m_threadStore = new CmsThreadStore(); // initialize the link manager m_linkManager = new CmsLinkManager(); // read flex jsp error page commit property and save in runtime configuration Boolean flexErrorPageCommit = configuration.getBoolean(CmsJspLoader.C_LOADER_ERRORPAGECOMMIT, new Boolean(true)); setRuntimeProperty(CmsJspLoader.C_LOADER_ERRORPAGECOMMIT, flexErrorPageCommit); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". JSP errorPage commit : " + (flexErrorPageCommit.booleanValue() ? "enabled" : "disabled")); } // try to initialize the flex cache try { if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Flex cache init : starting"); } // pass configuration to flex cache for initialization new CmsFlexCache(configuration); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Flex cache init : finished"); } } catch (Exception e) { if (getLog(CmsLog.CHANNEL_INIT).isWarnEnabled()) { getLog(CmsLog.CHANNEL_INIT).warn(". Flex cache init : non-critical error " + e.toString()); } } // initialize the loaders try { if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". ResourceLoader init : starting"); } m_loaderManager = new CmsLoaderManager(configuration); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". ResourceLoader init : finished"); } } catch (Exception e) { if (getLog(CmsLog.CHANNEL_INIT).isWarnEnabled()) { getLog(CmsLog.CHANNEL_INIT).warn(". ResourceLoader init : non-critical error " + e.toString()); } } // try to initialize directory translations try { boolean translationEnabled = configuration.getBoolean("directory.translation.enabled", false); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Directory translation: " + (translationEnabled ? "enabled" : "disabled")); } if (translationEnabled) { String[] translations = configuration.getStringArray("directory.translation.rules"); // Directory translation stops after fist match, hence the "false" parameter m_directoryTranslator = new CmsResourceTranslator(translations, false); } } catch (Exception e) { if (getLog(CmsLog.CHANNEL_INIT).isWarnEnabled()) { getLog(CmsLog.CHANNEL_INIT).warn(". Directory translation: non-critical error " + e.toString()); } } // make sure we always have at least an empty array if (m_directoryTranslator == null) { m_directoryTranslator = new CmsResourceTranslator(new String[0], false); } // try to initialize filename translations try { boolean translationEnabled = configuration.getBoolean("filename.translation.enabled", false); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Filename translation : " + (translationEnabled ? "enabled" : "disabled")); } if (translationEnabled) { String[] translations = configuration.getStringArray("filename.translation.rules"); // Filename translations applies all rules, hence the true patameters m_fileTranslator = new CmsResourceTranslator(translations, true); } } catch (Exception e) { if (getLog(CmsLog.CHANNEL_INIT).isWarnEnabled()) { getLog(CmsLog.CHANNEL_INIT).warn(". Filename translation : non-critical error " + e.toString()); } } // make sure we always have at last an emtpy array if (m_fileTranslator == null) { m_fileTranslator = new CmsResourceTranslator(new String[0], false); } m_defaultFilenames = null; // try to initialize default directory file names (e.g. index.html) try { m_defaultFilenames = configuration.getStringArray("directory.default.files"); for (int i = 0; i < m_defaultFilenames.length; i++) { // remove possible white space m_defaultFilenames[i] = m_defaultFilenames[i].trim(); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Default file : " + (i + 1) + " - " + m_defaultFilenames[i]); } } } catch (Exception e) { if (getLog(CmsLog.CHANNEL_INIT).isWarnEnabled()) { getLog(CmsLog.CHANNEL_INIT).warn(". Default file : non-critical error " + e.toString()); } } // make sure we always have at last an emtpy array if (m_defaultFilenames == null) { m_defaultFilenames = new String[0]; } // read the immutable import resources String[] immuResources = configuration.getStringArray("import.immutable.resources"); if (immuResources == null) { immuResources = new String[0]; } List immutableResourcesOri = java.util.Arrays.asList(immuResources); ArrayList immutableResources = new ArrayList(); for (int i = 0; i < immutableResourcesOri.size(); i++) { // remove possible white space String path = ((String)immutableResourcesOri.get(i)).trim(); if (path != null && !"".equals(path)) { immutableResources.add(path); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Immutable resource : " + (i + 1) + " - " + path); } } } if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Immutable resources : " + ((immutableResources.size() > 0) ? "enabled" : "disabled")); } setRuntimeProperty("import.immutable.resources", immutableResources); // read the conversion setting // TODO: check how to set this String convertToXmlPage = configuration.getString("import.convert.xmlpage"); setRuntimeProperty("import.convert.xmlpage", convertToXmlPage); // read the default user settings try { m_userDefaultLanguage = configuration.getString("workplace.user.default.language", I_CmsWpConstants.C_DEFAULT_LANGUAGE); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". User data init : Default language is '" + m_userDefaultLanguage + "'"); } } catch (Exception e) { if (getLog(CmsLog.CHANNEL_INIT).isWarnEnabled()) { getLog(CmsLog.CHANNEL_INIT).warn(". User data init : non-critical error " + e.toString()); } } // read the password validating class m_passwordValidatingClass = configuration.getString("passwordvalidatingclass", "com.opencms.util.PasswordValidtation"); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Password validation : " + m_passwordValidatingClass); } // initialize "resourceinit" registry classes try { List resourceInitClasses = OpenCms.getRegistry().getResourceInit(); Iterator i = resourceInitClasses.iterator(); while (i.hasNext()) { String currentClass = (String)i.next(); try { m_checkFile.add(Class.forName(currentClass).newInstance()); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Resource init class : " + currentClass + " instanciated"); } } catch (Exception e1) { if (getLog(CmsLog.CHANNEL_INIT).isWarnEnabled()) { getLog(CmsLog.CHANNEL_INIT).warn(". Resource init class : non-critical error " + e1.toString()); } } } } catch (Exception e2) { if (getLog(CmsLog.CHANNEL_INIT).isWarnEnabled()) { getLog(CmsLog.CHANNEL_INIT).warn(". Resource init class : non-critical error " + e2.toString()); } } // read old (proprietary XML-style) locale backward compatibily support flag Boolean supportOldLocales = configuration.getBoolean("compatibility.support.oldlocales", new Boolean(false)); setRuntimeProperty("compatibility.support.oldlocales", supportOldLocales); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Old locale support : " + (supportOldLocales.booleanValue() ? "enabled" : "disabled")); } // convert import files from 4.x versions old webapp URL String webappUrl = configuration.getString("compatibility.support.import.old.webappurl", null); if (webappUrl != null) { setRuntimeProperty("compatibility.support.import.old.webappurl", webappUrl); } if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Old webapp URL : " + ((webappUrl == null) ? "not set!" : webappUrl)); } // unwanted resource properties which are deleted during import String[] propNames = configuration.getStringArray("compatibility.support.import.remove.propertytags"); if (propNames == null) { propNames = new String[0]; } List propertyNamesOri = java.util.Arrays.asList(propNames); ArrayList propertyNames = new ArrayList(); for (int i = 0; i < propertyNamesOri.size(); i++) { // remove possible white space String name = ((String)propertyNamesOri.get(i)).trim(); if (name != null && !"".equals(name)) { propertyNames.add(name); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Clear import property: " + (i + 1) + " - " + name); } } } if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Remove properties : " + ((propertyNames.size() > 0) ? "enabled" : "disabled")); } setRuntimeProperty("compatibility.support.import.remove.propertytags", propertyNames); // old web application names (for editor macro replacement) String[] appNames = configuration.getStringArray("compatibility.support.webAppNames"); if (appNames == null) { appNames = new String[0]; } List webAppNamesOri = java.util.Arrays.asList(appNames); ArrayList webAppNames = new ArrayList(); for (int i = 0; i < webAppNamesOri.size(); i++) { // remove possible white space String name = ((String)webAppNamesOri.get(i)).trim(); if (name != null && !"".equals(name)) { webAppNames.add(name); if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Old context path : " + (i + 1) + " - " + name); } } } if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Old context support : " + ((webAppNames.size() > 0) ? "enabled" : "disabled")); } setRuntimeProperty("compatibility.support.webAppNames", webAppNames); // get an Admin cms context object with site root set to "/" CmsObject adminCms = initCmsObject(null, null, getDefaultUsers().getUserAdmin(), null); // initialize the workplace manager m_workplaceManager = CmsWorkplaceManager.initialize(configuration, adminCms); // initialize the locale manager m_localeManager = CmsLocaleManager.initialize(configuration, adminCms); // initialize the site manager m_siteManager = CmsSiteManager.initialize(configuration, adminCms); // initialize the search manager m_searchManager = CmsSearchManager.initialize(configuration, adminCms); // initializes the cron manager // TODO enable the cron manager //m_cronManager = new CmsCronManager(); m_exportHeaders = null; // try to initialize default directory file names (e.g. index.html) try { m_exportHeaders = configuration.getStringArray("staticexport.headers"); for (int i = 0; i < m_exportHeaders.length; i++) { if (CmsStringSubstitution.split(m_exportHeaders[i], ":").length == 2) { if (getLog(CmsLog.CHANNEL_INIT).isInfoEnabled()) { getLog(CmsLog.CHANNEL_INIT).info(". Export headers : " + m_exportHeaders[i]); } } else { if (getLog(CmsLog.CHANNEL_INIT).isWarnEnabled()) { getLog(CmsLog.CHANNEL_INIT).warn(". Export headers : " + "invalid header: " + m_exportHeaders[i] + ", using default headers"); } m_exportHeaders = null; break; } } } catch (Exception e) { if (getLog(CmsLog.CHANNEL_INIT).isWarnEnabled()) { getLog(CmsLog.CHANNEL_INIT).warn(". Export headers : non-critical error " + e.toString()); } } // make sure we always have at last an empty array if (m_exportHeaders == null) { m_exportHeaders = new String[0]; } // save the configuration m_configuration = configuration; } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/969270f381a91cafaeeea035169c9fbd2a9b4a0a/OpenCmsCore.java/clean/src/org/opencms/main/OpenCmsCore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1208,
1750,
12,
11456,
2297,
1664,
13,
1216,
1185,
288,
3639,
368,
333,
903,
4046,
326,
2688,
598,
326,
805,
3639,
514,
805,
4705,
273,
312,
67,
4299,
966,
18,
588,
1868,
470... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1208,
1750,
12,
11456,
2297,
1664,
13,
1216,
1185,
288,
3639,
368,
333,
903,
4046,
326,
2688,
598,
326,
805,
3639,
514,
805,
4705,
273,
312,
67,
4299,
966,
18,
588,
1868,
470... | |
IBoard[] sheetBoards = new Board[mapSettings.getMapWidth() * mapSettings.getMapHeight()]; | IBoard[] sheetBoards = new IBoard[mapSettings.getMapWidth() * mapSettings.getMapHeight()]; | public void applyBoardSettings() { mapSettings.replaceBoardWithRandom(MapSettings.BOARD_RANDOM); mapSettings.replaceBoardWithRandom(MapSettings.BOARD_SURPRISE); IBoard[] sheetBoards = new Board[mapSettings.getMapWidth() * mapSettings.getMapHeight()]; for (int i = 0; i < mapSettings.getMapWidth() * mapSettings.getMapHeight(); i++) { sheetBoards[i] = new Board(); String name = (String)mapSettings.getBoardsSelectedVector().elementAt(i); boolean isRotated = false; if ( name.startsWith( Board.BOARD_REQUEST_ROTATION ) ) { isRotated = true; name = name.substring( Board.BOARD_REQUEST_ROTATION.length() ); } if (name.startsWith(MapSettings.BOARD_GENERATED)) { sheetBoards[i] = BoardUtilities.generateRandom(mapSettings); } else { sheetBoards[i].load( name + ".board"); BoardUtilities.flip(sheetBoards[i], isRotated, isRotated ); } } IBoard newBoard = BoardUtilities.combine(mapSettings.getBoardWidth(), mapSettings.getBoardHeight(), mapSettings.getMapWidth(), mapSettings.getMapHeight(), sheetBoards); game.setBoard(newBoard); } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/db64c0778bbea1399999fd25b589d242f8842761/Server.java/clean/megamek/src/megamek/server/Server.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2230,
22233,
2628,
1435,
288,
3639,
852,
2628,
18,
2079,
22233,
1190,
8529,
12,
863,
2628,
18,
5315,
8085,
67,
54,
28159,
1769,
3639,
852,
2628,
18,
2079,
22233,
1190,
8529,
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,
918,
2230,
22233,
2628,
1435,
288,
3639,
852,
2628,
18,
2079,
22233,
1190,
8529,
12,
863,
2628,
18,
5315,
8085,
67,
54,
28159,
1769,
3639,
852,
2628,
18,
2079,
22233,
1190,
8529,
12... |
} | } | public void cancel() { dispose(); } | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/50dba43c034792706c94f0d701351f497e2ce540/ToolBarOptionPane.java/buggy/org/gjt/sp/jedit/options/ToolBarOptionPane.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3755,
1435,
202,
95,
202,
202,
2251,
4150,
5621,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3755,
1435,
202,
95,
202,
202,
2251,
4150,
5621,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
protected ActionForward saveAction(ActionErrors validateErrors) { | protected ActionForward saveAction(ActionErrors validateErrors) throws B3pCommonsException { | protected ActionForward saveAction(ActionErrors validateErrors) { // validatie if (reduceMainErrors(validateErrors)) { if (log.isInfoEnabled()) log.info("Validation error!"); errors.add(MAIN_MESSAGE, new ActionError("warning.invoerenrecord.savewitherrors")); newAction = SAVE_ACTION; } else { try { // Het hoofdobject wordt alleen aangemaakt, indien // in het form een merker is aangebracht die dit aangeeft. if (theObject == null && Integer.toString(TEMPNEW_ID).equals(getMainID())) { theObject = getNewObject(); subObjects = new ArrayList(); } if (theObject!=null) { populateObject(); syncID(); if (log.isDebugEnabled()) log.debug(" Populating database object from form bean"); } } catch (Exception dbe) { if (log.isErrorEnabled()) log.error(" Database error creating object: ", dbe); errors.add(MAIN_MESSAGE, new ActionError("error.database", dbe.getMessage())); return (mapping.findForward("failure")); } newAction = EDIT_ACTION; if (directSave) errors.add(MAIN_MESSAGE, new ActionError("warning.invoerenrecord.savedone")); } return null; } | 55972 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55972/ddbd45279c6bec659a2e4ed9d4a3c6632023a0b0/EditBaseBean.java/buggy/src/nl/b3p/commons/services/EditBaseBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
4382,
8514,
1923,
1803,
12,
1803,
4229,
1954,
4229,
13,
1216,
605,
23,
84,
6517,
87,
503,
288,
3639,
368,
923,
270,
1385,
3639,
309,
261,
12498,
6376,
4229,
12,
5662,
4229,
3719,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
4382,
8514,
1923,
1803,
12,
1803,
4229,
1954,
4229,
13,
1216,
605,
23,
84,
6517,
87,
503,
288,
3639,
368,
923,
270,
1385,
3639,
309,
261,
12498,
6376,
4229,
12,
5662,
4229,
3719,
... |
trans.create(cacheObj.idObj.longValue(), cacheObj.sobj, cacheObj.name); | trans.create(cacheObj.id.idObj, cacheObj.sobj, cacheObj.name); | public void commit() { synchronized (this) { synchronized (updateSet) { for (Entry cacheObj : updateSet) { if (cacheObj.updateMode == UPDATE_DESTROY) { trans.destroy(cacheObj.idObj.longValue()); } else if (cacheObj.updateMode == UPDATE_CREATE) { trans.create(cacheObj.idObj.longValue(), cacheObj.sobj, cacheObj.name); } } updateSet.clear(); cstore.commit(this); // finish my transaction } trans.commit(); } } | 55380 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55380/3bccf9cdf51f7f25da563704ae1d5bcb0ce035a9/CachingObjectStoreTransaction.java/clean/src/com/sun/gi/objectstore/impl/CachingObjectStoreTransaction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3294,
1435,
288,
3639,
3852,
261,
2211,
13,
288,
5411,
3852,
261,
2725,
694,
13,
288,
7734,
364,
261,
1622,
1247,
2675,
294,
1089,
694,
13,
288,
10792,
309,
261,
2493,
2675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3294,
1435,
288,
3639,
3852,
261,
2211,
13,
288,
5411,
3852,
261,
2725,
694,
13,
288,
7734,
364,
261,
1622,
1247,
2675,
294,
1089,
694,
13,
288,
10792,
309,
261,
2493,
2675,
... |
this.temporary = temporary; | this.temporary = false; | public FocusEvent (Component source, int id, boolean temporary) { super (source, id); this.temporary = temporary; } | 25352 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25352/3d75d43c65cad1c53dd9b0321ff7e166c00d1d32/FocusEvent.java/buggy/libjava/java/awt/event/FocusEvent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
478,
4560,
1133,
261,
1841,
1084,
16,
509,
612,
16,
1250,
6269,
13,
225,
288,
565,
2240,
261,
3168,
16,
612,
1769,
565,
333,
18,
31143,
273,
629,
31,
225,
289,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
478,
4560,
1133,
261,
1841,
1084,
16,
509,
612,
16,
1250,
6269,
13,
225,
288,
565,
2240,
261,
3168,
16,
612,
1769,
565,
333,
18,
31143,
273,
629,
31,
225,
289,
2,
-100,
-100,
-1... |
return "FUNCTION_" + functionNumber + "_NAME"; | return "FUNCTION" + Constants.DELIMITER + functionNumber + Constants.DELIMITER + "NAME"; | private String makeFunctionName(int functionNumber) { return "FUNCTION_" + functionNumber + "_NAME"; } | 5235 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5235/ae9fd5cf142d2d909a7fdabe362d27cd679b9e27/Fixtures.java/clean/signet/test/edu/internet2/middleware/signet/test/Fixtures.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
514,
1221,
25258,
12,
474,
445,
1854,
13,
225,
288,
565,
327,
315,
7788,
6,
397,
5245,
18,
19722,
397,
445,
1854,
397,
5245,
18,
19722,
397,
315,
1985,
14432,
225,
289,
2,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
514,
1221,
25258,
12,
474,
445,
1854,
13,
225,
288,
565,
327,
315,
7788,
6,
397,
5245,
18,
19722,
397,
445,
1854,
397,
5245,
18,
19722,
397,
315,
1985,
14432,
225,
289,
2,
-100,
... |
} else { if (getDestroyedCriticals(CriticalSlot.TYPE_SYSTEM, Mech.ACTUATOR_UPPER_LEG, loc) > 0) { roll.addModifier(1, getLocationName(loc) + " Upper Leg Actuator destroyed"); } if (getDestroyedCriticals(CriticalSlot.TYPE_SYSTEM, Mech.ACTUATOR_LOWER_LEG, loc) > 0) { roll.addModifier(1, getLocationName(loc) + " Lower Leg Actuator destroyed"); } if (getDestroyedCriticals(CriticalSlot.TYPE_SYSTEM, Mech.ACTUATOR_FOOT, loc) > 0) { roll.addModifier(1, getLocationName(loc) + " Foot Actuator destroyed"); } | if (!game.getOptions().booleanOption("maxtech_leg_damage")) continue; } if (getDestroyedCriticals(CriticalSlot.TYPE_SYSTEM, Mech.ACTUATOR_UPPER_LEG, loc) > 0) { roll.addModifier(1, getLocationName(loc) + " Upper Leg Actuator destroyed"); } if (getDestroyedCriticals(CriticalSlot.TYPE_SYSTEM, Mech.ACTUATOR_LOWER_LEG, loc) > 0) { roll.addModifier(1, getLocationName(loc) + " Lower Leg Actuator destroyed"); } if (getDestroyedCriticals(CriticalSlot.TYPE_SYSTEM, Mech.ACTUATOR_FOOT, loc) > 0) { roll.addModifier(1, getLocationName(loc) + " Foot Actuator destroyed"); | public PilotingRollData addEntityBonuses(PilotingRollData roll) { int[] locsToCheck = new int[2]; locsToCheck[0] = Mech.LOC_RLEG; locsToCheck[1] = Mech.LOC_LLEG; for ( int i = 0; i < locsToCheck.length; i++ ) { int loc = locsToCheck[i]; if (isLocationDestroyed(loc)) { roll.addModifier(5, getLocationName(loc) + " destroyed"); } else { // check for damaged hip actuators if (getDestroyedCriticals(CriticalSlot.TYPE_SYSTEM, Mech.ACTUATOR_HIP, loc) > 0) { roll.addModifier(2, getLocationName(loc) + " Hip Actuator destroyed"); } else { // upper leg actuators? if (getDestroyedCriticals(CriticalSlot.TYPE_SYSTEM, Mech.ACTUATOR_UPPER_LEG, loc) > 0) { roll.addModifier(1, getLocationName(loc) + " Upper Leg Actuator destroyed"); } // lower leg actuators? if (getDestroyedCriticals(CriticalSlot.TYPE_SYSTEM, Mech.ACTUATOR_LOWER_LEG, loc) > 0) { roll.addModifier(1, getLocationName(loc) + " Lower Leg Actuator destroyed"); } // foot actuators? if (getDestroyedCriticals(CriticalSlot.TYPE_SYSTEM, Mech.ACTUATOR_FOOT, loc) > 0) { roll.addModifier(1, getLocationName(loc) + " Foot Actuator destroyed"); } } } } return super.addEntityBonuses(roll); } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/959c1f959c2a847255f48386e0624dc23536e3d1/BipedMech.java/clean/megamek/src/megamek/common/BipedMech.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
453,
330,
17128,
24194,
751,
527,
1943,
38,
265,
6117,
12,
52,
330,
17128,
24194,
751,
5824,
13,
288,
3639,
509,
8526,
1515,
11634,
1564,
273,
394,
509,
63,
22,
15533,
3639,
1515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
453,
330,
17128,
24194,
751,
527,
1943,
38,
265,
6117,
12,
52,
330,
17128,
24194,
751,
5824,
13,
288,
3639,
509,
8526,
1515,
11634,
1564,
273,
394,
509,
63,
22,
15533,
3639,
1515,
... |
ClusteredQueue queue3 = new ClusteredQueue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null); | ClusteredQueue queue3 = new ClusteredQueue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get()); | public final void testClusteredBindUnbind() throws Throwable { ClusteredPostOffice office1 = null; ClusteredPostOffice office2 = null; ClusteredPostOffice office3 = null; try { //Start one office office1 = createClusteredPostOffice("node1", "testgroup"); //Add a couple of bindings ClusteredQueue queue1 = new ClusteredQueue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null); Binding binding1 = office1.bindClusteredQueue("sub1", "topic1", queue1); ClusteredQueue queue2 = new ClusteredQueue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null); Binding binding2 = office1.bindClusteredQueue("sub2", "topic1", queue2); //Start another office - make sure it picks up the bindings from the first node office2 = createClusteredPostOffice("node2", "testgroup"); List bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(2, bindings.size()); assertEquivalent(binding1, (Binding)bindings.get(0)); assertEquivalent(binding2, (Binding)bindings.get(1)); //Add another binding on node 2 ClusteredQueue queue3 = new ClusteredQueue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null); Binding binding3 = office2.bindClusteredQueue("sub3", "topic1", queue3); //Make sure both nodes pick it up bindings = office1.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(3, bindings.size()); assertEquivalent(binding1, (Binding)bindings.get(0)); assertEquivalent(binding2, (Binding)bindings.get(1)); assertEquivalent(binding3, (Binding)bindings.get(2)); bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(3, bindings.size()); assertEquivalent(binding1, (Binding)bindings.get(0)); assertEquivalent(binding2, (Binding)bindings.get(1)); assertEquivalent(binding3, (Binding)bindings.get(2)); //Add another binding on node 1 ClusteredQueue queue4 = new ClusteredQueue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null); Binding binding4 = office2.bindClusteredQueue("sub4", "topic1", queue4); // Make sure both nodes pick it up bindings = office1.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(4, bindings.size()); assertEquivalent(binding1, (Binding)bindings.get(0)); assertEquivalent(binding2, (Binding)bindings.get(1)); assertEquivalent(binding3, (Binding)bindings.get(2)); assertEquivalent(binding4, (Binding)bindings.get(3)); bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(4, bindings.size()); assertEquivalent(binding1, (Binding)bindings.get(0)); assertEquivalent(binding2, (Binding)bindings.get(1)); assertEquivalent(binding3, (Binding)bindings.get(2)); assertEquivalent(binding4, (Binding)bindings.get(3)); //Unbind binding 1 and binding 2 office1.unbindClusteredQueue("sub1"); office1.unbindClusteredQueue("sub2"); //Make sure bindings are not longer available on either node bindings = office1.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(2, bindings.size()); assertEquivalent(binding3, (Binding)bindings.get(0)); assertEquivalent(binding4, (Binding)bindings.get(1)); bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(2, bindings.size()); assertEquivalent(binding3, (Binding)bindings.get(0)); assertEquivalent(binding4, (Binding)bindings.get(1)); //Add a third office office3 = createClusteredPostOffice("node3", "testgroup"); //Maks sure it picks up the bindings bindings = office3.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(2, bindings.size()); assertEquivalent(binding3, (Binding)bindings.get(0)); assertEquivalent(binding4, (Binding)bindings.get(1)); //Add another binding on node 3 ClusteredQueue queue5 = new ClusteredQueue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null); Binding binding5 = office3.bindClusteredQueue("sub5", "topic1", queue5); // Make sure all nodes pick it up bindings = office1.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(3, bindings.size()); assertEquivalent(binding3, (Binding)bindings.get(0)); assertEquivalent(binding4, (Binding)bindings.get(1)); assertEquivalent(binding5, (Binding)bindings.get(2)); bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(3, bindings.size()); assertEquivalent(binding3, (Binding)bindings.get(0)); assertEquivalent(binding4, (Binding)bindings.get(1)); assertEquivalent(binding5, (Binding)bindings.get(2)); bindings = office3.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(3, bindings.size()); assertEquivalent(binding3, (Binding)bindings.get(0)); assertEquivalent(binding4, (Binding)bindings.get(1)); assertEquivalent(binding5, (Binding)bindings.get(2)); //Add a durable and a non durable binding on node 1 ClusteredQueue queue6 = new ClusteredQueue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null); Binding binding6 = office1.bindClusteredQueue("sub6", "topic1", queue6); ClusteredQueue queue7 = new ClusteredQueue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null); Binding binding7 = office1.bindClusteredQueue("sub7", "topic1", queue7); // Make sure all nodes pick them up bindings = office1.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(5, bindings.size()); assertEquivalent(binding3, (Binding)bindings.get(0)); assertEquivalent(binding4, (Binding)bindings.get(1)); assertEquivalent(binding5, (Binding)bindings.get(2)); assertEquivalent(binding6, (Binding)bindings.get(3)); assertEquivalent(binding7, (Binding)bindings.get(4)); bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(5, bindings.size()); assertEquivalent(binding3, (Binding)bindings.get(0)); assertEquivalent(binding4, (Binding)bindings.get(1)); assertEquivalent(binding5, (Binding)bindings.get(2)); assertEquivalent(binding6, (Binding)bindings.get(3)); assertEquivalent(binding7, (Binding)bindings.get(4)); bindings = office3.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(5, bindings.size()); assertEquivalent(binding3, (Binding)bindings.get(0)); assertEquivalent(binding4, (Binding)bindings.get(1)); assertEquivalent(binding5, (Binding)bindings.get(2)); assertEquivalent(binding6, (Binding)bindings.get(3)); assertEquivalent(binding7, (Binding)bindings.get(4)); //Stop office 1 office1.stop(); //Need to sleep since it may take some time for the view changed request to reach the //members which causes the bindings to be removed Thread.sleep(1000); //All it's non durable bindings should be removed from the other nodes //Durable bindings should remain bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(4, bindings.size()); assertEquivalent(binding3, (Binding)bindings.get(0)); assertEquivalent(binding4, (Binding)bindings.get(1)); assertEquivalent(binding5, (Binding)bindings.get(2)); assertEquivalent(binding6, (Binding)bindings.get(3)); bindings = office3.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(4, bindings.size()); assertEquivalent(binding3, (Binding)bindings.get(0)); assertEquivalent(binding4, (Binding)bindings.get(1)); assertEquivalent(binding5, (Binding)bindings.get(2)); assertEquivalent(binding6, (Binding)bindings.get(3)); //Stop office 2 office2.stop(); bindings = office3.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(2, bindings.size()); assertEquivalent(binding5, (Binding)bindings.get(0)); assertEquivalent(binding6, (Binding)bindings.get(1)); //Restart office 1 and office 2 office1 = createClusteredPostOffice("node1", "testgroup"); office2 = createClusteredPostOffice("node2", "testgroup"); bindings = office1.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(2, bindings.size()); assertEquivalent(binding5, (Binding)bindings.get(0)); assertEquivalent(binding6, (Binding)bindings.get(1)); bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(2, bindings.size()); assertEquivalent(binding5, (Binding)bindings.get(0)); assertEquivalent(binding6, (Binding)bindings.get(1)); bindings = office3.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(2, bindings.size()); assertEquivalent(binding5, (Binding)bindings.get(0)); assertEquivalent(binding6, (Binding)bindings.get(1)); //Stop all offices office1.stop(); office2.stop(); office3.stop(); //Start them all office1 = createClusteredPostOffice("node1", "testgroup"); office2 = createClusteredPostOffice("node2", "testgroup"); office3 = createClusteredPostOffice("node3", "testgroup"); //Only the durable queue should survive bindings = office1.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(1, bindings.size()); assertEquivalent(binding6, (Binding)bindings.get(0)); bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(1, bindings.size()); assertEquivalent(binding6, (Binding)bindings.get(0)); bindings = office3.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(1, bindings.size()); assertEquivalent(binding6, (Binding)bindings.get(0)); } finally { if (office1 != null) { office1.unbindClusteredQueue("sub6"); office1.stop(); } if (office2 != null) { office2.stop(); } if (office3 != null) { office2.stop(); } } } | 3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/0a87b6fa611eb79aca9f82a8a7d739b9af40e965/ClusteredPostOfficeTest.java/buggy/tests/src/org/jboss/test/messaging/core/plugin/ClusteredPostOfficeTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
727,
918,
1842,
3629,
329,
3357,
984,
4376,
1435,
1216,
4206,
282,
288,
1377,
5584,
329,
3349,
30126,
3397,
1812,
21,
273,
446,
31,
5411,
5584,
329,
3349,
30126,
3397,
1812,
22,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
727,
918,
1842,
3629,
329,
3357,
984,
4376,
1435,
1216,
4206,
282,
288,
1377,
5584,
329,
3349,
30126,
3397,
1812,
21,
273,
446,
31,
5411,
5584,
329,
3349,
30126,
3397,
1812,
22,
273... |
String fieldName = getUtf8String(name_index); String fieldSignature = getUtf8String(descriptor_index); | String name = getUtf8String(name_index); String signature = getUtf8String(descriptor_index); if (attributes_count < 0) { throw new InvalidClassFileFormatException(expectedClassDescriptor, codeBaseEntry); } for (int i = 0; i < attributes_count; i++) { readAttribute(); } | private<E> E readFieldOrMethod( ClassDescriptor thisClassDescriptor, FieldOrMethodDescriptorCreator<E> creator) throws IOException, InvalidClassFileFormatException { int access_flags = in.readUnsignedShort(); int name_index = in.readUnsignedShort(); int descriptor_index = in.readUnsignedShort(); int attributes_count = in.readUnsignedShort(); String fieldName = getUtf8String(name_index); String fieldSignature = getUtf8String(descriptor_index); return creator.create( thisClassDescriptor.getClassName(), fieldName, fieldSignature, access_flags); } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/236edb786475cf9c2eeda6dcb7bb09e6d99c3890/ClassParser.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/classfile/engine/ClassParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
32,
41,
34,
512,
855,
974,
1162,
1305,
12,
1082,
202,
797,
3187,
333,
797,
3187,
16,
2286,
1162,
1305,
3187,
10636,
32,
41,
34,
11784,
13,
1082,
202,
15069,
1860,
16,
1962,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
32,
41,
34,
512,
855,
974,
1162,
1305,
12,
1082,
202,
797,
3187,
333,
797,
3187,
16,
2286,
1162,
1305,
3187,
10636,
32,
41,
34,
11784,
13,
1082,
202,
15069,
1860,
16,
1962,
... |
IProject project = (IProject)owner; | public String getOutputPrefix(String outputExtension) { IProject project = (IProject)owner; // Treat null extensions as empty string String ext = outputExtension == null ? new String() : outputExtension; // Get all the tools for the current config String flags = new String(); IConfiguration config = getDefaultConfiguration(getDefaultTarget()); ITool[] tools = config.getFilteredTools(project); for (int index = 0; index < tools.length; index++) { ITool tool = tools[index]; if (tool.producesFileType(ext)) { flags = tool.getOutputPrefix(); } } return flags; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/5c9fe1859cabfbd4618959eb71f6e54c1222ce0d/ManagedBuildInfo.java/clean/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
11062,
2244,
12,
780,
876,
3625,
13,
288,
202,
202,
45,
4109,
1984,
273,
261,
45,
4109,
13,
8443,
31,
202,
202,
759,
26564,
446,
4418,
487,
1008,
533,
202,
202,
780,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11062,
2244,
12,
780,
876,
3625,
13,
288,
202,
202,
45,
4109,
1984,
273,
261,
45,
4109,
13,
8443,
31,
202,
202,
759,
26564,
446,
4418,
487,
1008,
533,
202,
202,
780,
11... | |
taxonElement.addContent(createChild("id", taxonSet.getId())); | taxonElement.addContent(createChild("id", taxonSet.getTaxon(j).getId())); | public Document create(boolean includeData, boolean guessDates) { Element root = new Element("beauti"); root.setAttribute("version", version); Element dataElement = new Element("data"); //dataElement.addContent(createChild("fileNameStem", fileNameStem)); dataElement.addContent(createChild("datesUnits", datesUnits)); dataElement.addContent(createChild("datesDirection", datesDirection)); dataElement.addContent(createChild("translation", translation)); dataElement.addContent(createChild("userTree", userTree)); if (includeData && originalAlignment != null) { Element alignmentElement = new Element("alignment"); alignmentElement.addContent(createChild("dataType", originalAlignment.getDataType().getType())); for (int i = 0; i < originalAlignment.getTaxonCount(); i++) { Element taxonElement = new Element("taxon"); taxonElement.addContent(createChild("id", originalAlignment.getTaxonId(i))); dr.evolution.util.Date date = originalAlignment.getTaxon(i).getDate(); if (date != null) { taxonElement.addContent(createChild("date", date.getTimeValue())); } Sequence sequence = originalAlignment.getSequence(i); taxonElement.addContent(createChild("sequence", sequence.getSequenceString())); alignmentElement.addContent(taxonElement); } dataElement.addContent(alignmentElement); } dataElement.addContent(createChild("guessDates", guessDates)); dataElement.addContent(createChild("guessDateFromOrder", guessDateFromOrder)); dataElement.addContent(createChild("fromLast", fromLast)); dataElement.addContent(createChild("order", order)); dataElement.addContent(createChild("prefix", prefix)); dataElement.addContent(createChild("offset", offset)); dataElement.addContent(createChild("unlessLessThan", unlessLessThan)); dataElement.addContent(createChild("offset2", offset2)); root.addContent(dataElement); Element taxaElement = new Element("taxa"); for (int i = 0; i < taxonSets.size(); i++) { Taxa taxonSet = (Taxa)taxonSets.get(i); Element taxonSetElement = new Element("taxonSet"); taxonSetElement.addContent(createChild("id", taxonSet.getId())); for (int j = 0; j < taxonSet.getTaxonCount(); j++) { Element taxonElement = new Element("taxon"); taxonElement.addContent(createChild("id", taxonSet.getId())); taxonSetElement.addContent(taxonElement); } taxaElement.addContent(taxonSetElement); } root.addContent(taxaElement); Element modelElement = new Element("model"); modelElement.addContent(createChild("nucSubstitutionModel", nucSubstitutionModel)); modelElement.addContent(createChild("aaSubstitutionModel", aaSubstitutionModel)); modelElement.addContent(createChild("gammaHetero", gammaHetero)); modelElement.addContent(createChild("gammaCategories", gammaCategories)); modelElement.addContent(createChild("invarHetero", invarHetero)); modelElement.addContent(createChild("codonHetero", codonHetero)); modelElement.addContent(createChild("maximumTipHeight", maximumTipHeight)); modelElement.addContent(createChild("hasSetFixedSubstitutionRate", hasSetFixedSubstitutionRate)); modelElement.addContent(createChild("meanSubstitutionRate", meanSubstitutionRate)); modelElement.addContent(createChild("fixedSubstitutionRate", fixedSubstitutionRate)); modelElement.addContent(createChild("unlinkedSubstitutionModel", unlinkedSubstitutionModel)); modelElement.addContent(createChild("unlinkedHeterogeneityModel", unlinkedHeterogeneityModel)); modelElement.addContent(createChild("unlinkedFrequencyModel", unlinkedFrequencyModel)); modelElement.addContent(createChild("clockModel", clockModel)); modelElement.addContent(createChild("nodeHeightPrior", nodeHeightPrior)); modelElement.addContent(createChild("parameterization", parameterization)); modelElement.addContent(createChild("skylineGroupCount", skylineGroupCount)); modelElement.addContent(createChild("skylineModel", skylineModel)); modelElement.addContent(createChild("fixedTree", fixedTree)); root.addContent(modelElement); Element priorsElement = new Element("priors"); Iterator iter = parameters.keySet().iterator(); while (iter.hasNext()) { String name = (String)iter.next(); Parameter parameter = (Parameter)parameters.get(name); Element e = new Element(name); e.addContent(createChild("initial", parameter.initial)); e.addContent(createChild("priorType", parameter.priorType)); e.addContent(createChild("priorEdited", parameter.priorEdited)); e.addContent(createChild("uniformLower", parameter.uniformLower)); e.addContent(createChild("uniformUpper", parameter.uniformUpper)); e.addContent(createChild("exponentialMean", parameter.exponentialMean)); e.addContent(createChild("exponentialOffset", parameter.exponentialOffset)); e.addContent(createChild("normalMean", parameter.normalMean)); e.addContent(createChild("normalStdev", parameter.normalStdev)); e.addContent(createChild("logNormalMean", parameter.logNormalMean)); e.addContent(createChild("logNormalStdev", parameter.logNormalStdev)); e.addContent(createChild("logNormalOffset", parameter.logNormalOffset)); e.addContent(createChild("gammaAlpha", parameter.gammaAlpha)); e.addContent(createChild("gammaBeta", parameter.gammaBeta)); e.addContent(createChild("gammaOffset", parameter.gammaOffset)); priorsElement.addContent(e); } root.addContent(priorsElement); Element operatorsElement = new Element("operators"); operatorsElement.addContent(createChild("autoOptimize", autoOptimize)); iter = operators.keySet().iterator(); while (iter.hasNext()) { String name = (String)iter.next(); Operator operator = (Operator)operators.get(name); Element e = new Element(name); e.addContent(createChild("tuning", operator.tuning)); e.addContent(createChild("weight", (int)operator.weight)); operatorsElement.addContent(e); } root.addContent(operatorsElement); Element mcmcElement = new Element("mcmc"); mcmcElement.addContent(createChild("upgmaStartingTree", upgmaStartingTree)); mcmcElement.addContent(createChild("chainLength", chainLength)); mcmcElement.addContent(createChild("logEvery", logEvery)); mcmcElement.addContent(createChild("echoEvery", echoEvery)); //if (logFileName != null) mcmcElement.addContent(createChild("logFileName", logFileName)); //if (treeFileName != null) mcmcElement.addContent(createChild("treeFileName", treeFileName)); //mcmcElement.addContent(createChild("mapTreeLog", mapTreeLog)); //if (mapTreeFileName != null) mcmcElement.addContent(createChild("mapTreeFileName", mapTreeFileName)); mcmcElement.addContent(createChild("substTreeLog", substTreeLog)); //if (substTreeFileName != null) mcmcElement.addContent(createChild("substTreeFileName", substTreeFileName)); root.addContent(mcmcElement); Document doc = new Document(root); return doc; } | 49053 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49053/28bbaedd52beea14d11baaf051fef98292936bca/BeautiOptions.java/buggy/trunk/src/dr/app/beauti/BeautiOptions.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4319,
752,
12,
6494,
2341,
751,
16,
1250,
7274,
15578,
13,
288,
202,
202,
1046,
1365,
273,
394,
3010,
2932,
2196,
5854,
77,
8863,
202,
202,
3085,
18,
542,
1499,
2932,
1589,
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,
225,
202,
482,
4319,
752,
12,
6494,
2341,
751,
16,
1250,
7274,
15578,
13,
288,
202,
202,
1046,
1365,
273,
394,
3010,
2932,
2196,
5854,
77,
8863,
202,
202,
3085,
18,
542,
1499,
2932,
1589,
31... |
public DragTest(TestDragSource dragSource, TestDropLocation dropTarget, AbstractTestLogger log) { this(dragSource, dropTarget, log, ""); | public DragTest(TestDragSource dragSource, TestDropLocation dropTarget, AbstractTestLogger log, String suffix) { super("drag " + dragSource.toString() + " to " + dropTarget.toString() + suffix, log); this.dragSource = dragSource; this.dropTarget = dropTarget; | public DragTest(TestDragSource dragSource, TestDropLocation dropTarget, AbstractTestLogger log) { this(dragSource, dropTarget, log, ""); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/5abf6fabfddc9bb4eb33acac1f3b4c05f76ac7b1/DragTest.java/clean/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/DragTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
28425,
4709,
12,
4709,
11728,
1830,
8823,
1830,
16,
7766,
7544,
2735,
3640,
2326,
16,
4115,
4709,
3328,
613,
13,
288,
377,
202,
2211,
12,
15997,
1830,
16,
3640,
2326,
16,
613,
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,
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,
28425,
4709,
12,
4709,
11728,
1830,
8823,
1830,
16,
7766,
7544,
2735,
3640,
2326,
16,
4115,
4709,
3328,
613,
13,
288,
377,
202,
2211,
12,
15997,
1830,
16,
3640,
2326,
16,
613,
16,
... |
logger.debug("Setting up: " + isotope); | if (debug) logger.debug("Setting up: " + isotope); | private IsotopeFactory() throws IOException, OptionalDataException, ClassNotFoundException { logger = new LoggingTool(this.getClass().getName()); logger.info("Creating new IsotopeFactory"); InputStream ins = null; // ObjIn in = null; String errorMessage = "There was a problem getting org.openscience.cdk." + "config.isotopes.xml as a stream"; try { String configFile = "org/openscience/cdk/config/isotopes.xml"; logger.debug("Getting stream for " + configFile); ins = this.getClass().getClassLoader().getResourceAsStream(configFile); } catch (Exception exc) { logger.error(errorMessage); throw new IOException(errorMessage); } if (ins == null) { logger.error(errorMessage); throw new IOException(errorMessage); } IsotopeReader reader = new IsotopeReader(new InputStreamReader(ins)); //in = new ObjIn(ins, new Config().aliasID(false)); //isotopes = (Vector) in.readObject(); isotopes = reader.readIsotopes(); logger.debug("Found #isotopes in file: " + isotopes.size()); for (int f = 0; f < isotopes.size(); f++) { Isotope isotope = (Isotope)isotopes.elementAt(f); logger.debug("Setting up: " + isotope); setup(isotope); } majorIsotopes = new Hashtable(); } | 45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/40d7f143548e6f4a78bd2602a9dc4905d9fd1e8f/IsotopeFactory.java/clean/src/org/openscience/cdk/tools/IsotopeFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
2585,
18946,
1733,
1435,
1216,
1860,
16,
4055,
22480,
16,
1082,
202,
797,
3990,
202,
95,
3639,
1194,
273,
394,
10253,
6364,
12,
2211,
18,
588,
797,
7675,
17994,
10663,
3639,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2585,
18946,
1733,
1435,
1216,
1860,
16,
4055,
22480,
16,
1082,
202,
797,
3990,
202,
95,
3639,
1194,
273,
394,
10253,
6364,
12,
2211,
18,
588,
797,
7675,
17994,
10663,
3639,
11... |
sb.append(" (\n\t\t\t"); | sb.append(" (\n\t\t\t\t\t"); | toString() { StringBuffer sb = toStringNoData(); if (host != null) { sb.append(host); sb.append(" "); sb.append(admin); sb.append(" (\n\t\t\t"); sb.append(serial); sb.append("\t; serial\n\t\t\t"); sb.append(refresh); sb.append("\t; refresh\n\t\t\t"); sb.append(retry); sb.append("\t; retry\n\t\t\t"); sb.append(refresh); sb.append("\t; refresh\n\t\t\t"); sb.append(minimum); sb.append(")\t; minimum"); } return sb.toString();} | 4227 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4227/eab19ae1a2d6b028d8d0c3a26d740a5520f4fec6/dnsSOARecord.java/buggy/org/xbill/DNS/dnsSOARecord.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1762,
1435,
288,
202,
780,
1892,
2393,
273,
1762,
2279,
751,
5621,
202,
430,
261,
2564,
480,
446,
13,
288,
202,
202,
18366,
18,
6923,
12,
2564,
1769,
202,
202,
18366,
18,
6923,
2932,
315,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1762,
1435,
288,
202,
780,
1892,
2393,
273,
1762,
2279,
751,
5621,
202,
430,
261,
2564,
480,
446,
13,
288,
202,
202,
18366,
18,
6923,
12,
2564,
1769,
202,
202,
18366,
18,
6923,
2932,
315,
17... |
final String path = readOptionalFromRegistry(menuElement, ATTRIBUTE_PATH); | final String path = readOptional(menuElement, ATTRIBUTE_PATH); final String subpath; if (path == null) { subpath = menuId; } else { subpath = menuId + '/' + path; } | private static final SReference[] readMenusAndGroupsFromRegistry( final IConfigurationElement[] menuElements, final String contributionId, final List warningsToLog, final IMenuService menuService, final Expression visibleWhenExpression) { final int length = menuElements.length; final Collection references = new ArrayList(length); for (int i = 0; i < length; i++) { final IConfigurationElement menuElement = menuElements[i]; // Read the id attribute. final String menuId = readRequiredFromRegistry(menuElement, ATTRIBUTE_ID, warningsToLog, "Menus require an id", contributionId); //$NON-NLS-1$ if (menuId == null) { continue; } // Read the label attribute, and extract the mnemonic. String label = readRequiredFromRegistry(menuElement, ATTRIBUTE_LABEL, warningsToLog, "Menus require a label", menuId); //$NON-NLS-1$ if (label == null) { continue; } final char mnemonic = LegacyActionTools.extractMnemonic(label); label = LegacyActionTools.removeMnemonics(label); // Read the path attribute. final String path = readOptionalFromRegistry(menuElement, ATTRIBUTE_PATH); // TODO Read children. // Define the menu. final SMenu menu = menuService.getMenu(menuId); final LocationElement bar = new SBar(SBar.TYPE_MENU, path); final SLocation location = new SLocation(mnemonic, null, null, bar); final SLocation[] locations = new SLocation[] { location }; menu.define(label, locations, null); final IMenuContribution contribution = menuService.contributeMenu( menu, visibleWhenExpression); menuContributions.add(contribution); references.add(new SReference(SReference.TYPE_MENU, menuId)); } return (SReference[]) references.toArray(new SReference[references .size()]); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/539b29bd9f4ed0020b6fce0d726b8d740d87469d/LegacyActionPersistence.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/LegacyActionPersistence.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
727,
348,
2404,
8526,
855,
29755,
1876,
3621,
1265,
4243,
12,
1082,
202,
6385,
467,
1750,
1046,
8526,
3824,
3471,
16,
1082,
202,
6385,
514,
24880,
548,
16,
727,
987,
5599,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
727,
348,
2404,
8526,
855,
29755,
1876,
3621,
1265,
4243,
12,
1082,
202,
6385,
467,
1750,
1046,
8526,
3824,
3471,
16,
1082,
202,
6385,
514,
24880,
548,
16,
727,
987,
5599,... |
ActionMessages messages = new ActionMessages(); | public ActionForward saveSubscription(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ActionForward forward = mapping.findForward("planetSubscriptions.page"); try { Roller roller = RollerFactory.getRoller(); PlanetManager planet = roller.getPlanetManager(); PlanetSubscriptionFormEx form = (PlanetSubscriptionFormEx)actionForm; String groupHandle = request.getParameter("groupHandle"); groupHandle = (groupHandle == null) ? form.getGroupHandle() : groupHandle; groupHandle = (groupHandle == null) ? "external" : groupHandle; PlanetGroupData targetGroup = planet.getGroup(groupHandle); if (RollerSession.getRollerSession(request).isGlobalAdminUser()) { PlanetSubscriptionData sub = null; ActionErrors errors = validate(planet, form); if (errors.isEmpty()) { if (form.getId() == null || form.getId().trim().length() == 0) { // User adding new subscription to group. // Does form specify a subscription that already exists? if (form.getFeedUrl() != null) { sub = planet.getSubscription(form.getFeedUrl()); } // If not, then create a new one if (sub == null) { sub = new PlanetSubscriptionData(); } // And add it to the group targetGroup.addSubscription(sub); } else { // User editing an existing subscription within a group sub = planet.getSubscriptionById(form.getId()); form.copyTo(sub, request.getLocale()); } form.setGroupHandle(groupHandle); planet.saveSubscription(sub); planet.saveGroup(targetGroup); roller.commit(); ActionMessages messages = new ActionMessages(); messages.add(null, new ActionMessage("planetSubscription.success.saved")); saveMessages(request, messages); form.doReset(mapping, request); } else { saveErrors(request, errors); } } else { forward = mapping.findForward("access-denied"); } request.setAttribute("model", new SubscriptionsPageModel( targetGroup, request, response, mapping, form)); } catch (RollerException e) { ActionErrors errors = new ActionErrors(); errors.add(null, new ActionError( "planetSubscriptions.error.duringSave",e.getRootCauseMessage())); saveErrors(request, errors); } return forward; } | 46431 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46431/e02f0e78239689cfdf0f401368e913de610f3297/PlanetSubscriptionsAction.java/clean/src/org/roller/presentation/planet/PlanetSubscriptionsAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4382,
8514,
1923,
6663,
12,
1803,
3233,
2874,
16,
5411,
4382,
1204,
1301,
1204,
16,
9984,
590,
16,
5411,
12446,
766,
13,
1216,
1860,
16,
16517,
288,
3639,
4382,
8514,
5104,
273,
287... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4382,
8514,
1923,
6663,
12,
1803,
3233,
2874,
16,
5411,
4382,
1204,
1301,
1204,
16,
9984,
590,
16,
5411,
12446,
766,
13,
1216,
1860,
16,
16517,
288,
3639,
4382,
8514,
5104,
273,
287... | |
setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); | public HeaderPanel(PipelineEditorModel model, JPanel buttonPanel) { this.model = model; setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); setLayout(new BorderLayout()); String name = model.getPipelineName(); if (name != null && name.endsWith(".pipeline")) { name = name.substring(0, name.length() - ".pipeline".length()); } JLabel nameLabel = new JLabel("Name:"); nameField = new JTextField(name, 40); JLabel descriptionLabel = new JLabel("Description:"); descriptionField = new JTextField(model .getPipelineDescription(), 40); JComboBox versionComboBox = null; if (name != null) { versionComboBox = new VersionComboBox(model.getLSID(), ChangeViewMessageRequest.SHOW_EDIT_PIPELINE_REQUEST); } CellConstraints cc = new CellConstraints(); JPanel temp = new JPanel(new FormLayout( "right:pref:none, 3dlu, pref, pref", "pref, 3dlu, pref, pref")); temp.add(nameLabel, cc.xy(1, 1)); temp.add(nameField, cc.xy(3, 1)); if (versionComboBox != null) { temp.add(versionComboBox, cc.xy(4, 1)); } temp.add(descriptionLabel, cc.xy(1, 3)); temp.add(descriptionField, cc.xy(3, 3)); StringBuffer rowSpec = new StringBuffer(); for (int i = 0; i < 6; i++) { if (i > 0) { rowSpec.append(", "); } rowSpec.append("pref, "); rowSpec.append("3dlu"); } JPanel detailsPanel = new JPanel(new FormLayout( "right:pref:none, 3dlu, left:pref", rowSpec.toString())); detailsPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK)); JLabel authorLabel = new JLabel("Author"); authorField = new JTextField(model.getAuthor(), 40); detailsPanel.add(authorLabel, cc.xy(1, 1)); detailsPanel.add(authorField, cc.xy(3, 1)); JLabel ownerLabel = new JLabel("Owner"); ownerField = new JTextField(model.getOwner(), 40); detailsPanel.add(ownerLabel, cc.xy(1, 3)); detailsPanel.add(ownerField, cc.xy(3, 3)); JLabel privacyLabel = new JLabel("Privacy"); privacyComboBox = new JComboBox(new String[] { "Public", "Private" }); if (model.getPrivacy() == GPConstants.ACCESS_PRIVATE) { privacyComboBox.setSelectedIndex(1); } detailsPanel.add(privacyLabel, cc.xy(1, 5)); detailsPanel.add(privacyComboBox, cc.xy(3, 5)); JLabel versionLabel = new JLabel("Version comment:"); versionField = new JTextField(model.getVersionComment(), 40); detailsPanel.add(versionLabel, cc.xy(1, 7)); detailsPanel.add(versionField, cc.xy(3, 7)); JLabel documentationLabel = new JLabel("Documentation"); JComboBox existingDocComboBox = new JComboBox(); detailsPanel.add(documentationLabel, cc.xy(1, 9)); detailsPanel.add(existingDocComboBox, cc.xy(3, 9)); if(name!=null) { JLabel lsidLabel = new JLabel("LSID:"); JLabel lsidField = new JLabel(model.getLSID()); detailsPanel.add(lsidLabel, cc.xy(1, 11)); detailsPanel.add(lsidField, cc.xy(3, 11)); } TogglePanel detailsToggle = new TogglePanel("Details", detailsPanel); JPanel bottom = new JPanel(new BorderLayout()); bottom.add(detailsToggle, BorderLayout.NORTH); bottom.add(buttonPanel, BorderLayout.SOUTH); add(temp, BorderLayout.CENTER); add(bottom, BorderLayout.SOUTH); } | 57344 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57344/ea4765c7c1cfe7d85e31b7fb31adf4858028b221/PipelineComponent.java/buggy/clients/JavaGE/src/org/genepattern/gpge/ui/tasks/pipeline/PipelineComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
4304,
5537,
12,
8798,
6946,
1488,
938,
16,
24048,
3568,
5537,
13,
288,
1082,
202,
2211,
18,
2284,
273,
938,
31,
1082,
202,
542,
8107,
12,
8107,
1733,
18,
2640,
1921,
8107,
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,
3196,
202,
482,
4304,
5537,
12,
8798,
6946,
1488,
938,
16,
24048,
3568,
5537,
13,
288,
1082,
202,
2211,
18,
2284,
273,
938,
31,
1082,
202,
542,
8107,
12,
8107,
1733,
18,
2640,
1921,
8107,
12... | |
setExperimenters( new HashSet(grp.collectFromExperimenterLinks( block ))); | setExperimenters( new HashSet(grp.eachLinkedExperimenter( block ))); | public void copy(IObject model, ModelMapper mapper) { if (model instanceof ExperimenterGroup) { ExperimenterGroup grp = (ExperimenterGroup) model; super.copy(model,mapper); // Details if (grp.getDetails() != null){ this.setOwner((ExperimenterData) mapper.findTarget(grp.getDetails().getOwner())); } // Fields this.setName(grp.getName()); // Collections MapperBlock block = new MapperBlock( mapper ); setExperimenters( new HashSet(grp.collectFromExperimenterLinks( block ))); } else { throw new IllegalArgumentException( "GroupData can only copy from Group, not "+ model.getClass().getName()); // TODO all errors like this. } } | 13273 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13273/7b5c704279f82fa929138305f70f2f5e6b462c69/GroupData.java/buggy/components/shoola-adapter/src/pojos/GroupData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1610,
12,
45,
921,
938,
16,
3164,
4597,
5815,
13,
288,
377,
202,
430,
261,
2284,
1276,
1312,
457,
381,
2328,
1114,
13,
288,
1082,
202,
424,
457,
381,
2328,
1114,
14295,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1610,
12,
45,
921,
938,
16,
3164,
4597,
5815,
13,
288,
377,
202,
430,
261,
2284,
1276,
1312,
457,
381,
2328,
1114,
13,
288,
1082,
202,
424,
457,
381,
2328,
1114,
14295,
273,
... |
return getStyleSheet().getViewAttributes(this); | if (attributes == null) attributes = getStyleSheet().getViewAttributes(this); return attributes; | public AttributeSet getAttributes() { return getStyleSheet().getViewAttributes(this); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/a3e083d3100ebabbd539297b5cb2118701b9674e/BlockView.java/buggy/core/src/classpath/javax/javax/swing/text/html/BlockView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3601,
694,
10183,
1435,
225,
288,
565,
309,
261,
4350,
422,
446,
13,
1677,
273,
14210,
8229,
7675,
588,
1767,
2498,
12,
2211,
1769,
327,
1677,
31,
225,
289,
2,
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,
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,
3601,
694,
10183,
1435,
225,
288,
565,
309,
261,
4350,
422,
446,
13,
1677,
273,
14210,
8229,
7675,
588,
1767,
2498,
12,
2211,
1769,
327,
1677,
31,
225,
289,
2,
-100,
-100,
-100,
-... |
bug.setSelectedOperation(o); | taskData.setSelectedOperation(o); | public void widgetSelected(SelectionEvent e) { Button selected = null; for (int i = 0; i < radios.length; i++) { if (radios[i].getSelection()) selected = radios[i]; } // determine the operation to do to the bug for (int i = 0; i < radios.length; i++) { if (radios[i] != e.widget && radios[i] != selected) { radios[i].setSelection(false); } if (e.widget == radios[i]) { Operation o = bug.getOperation(radios[i].getText()); bug.setSelectedOperation(o); ExistingBugEditor.this.changeDirtyStatus(true); } else if (e.widget == radioOptions[i]) { Operation o = bug.getOperation(radios[i].getText()); o.setOptionSelection(((CCombo) radioOptions[i]).getItem(((CCombo) radioOptions[i]) .getSelectionIndex())); if (bug.getSelectedOperation() != null) bug.getSelectedOperation().setChecked(false); o.setChecked(true); bug.setSelectedOperation(o); radios[i].setSelection(true); if (selected != null && selected != radios[i]) { selected.setSelection(false); } ExistingBugEditor.this.changeDirtyStatus(true); } } validateInput(); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/11ba991a7c176a0ea4c187e5f674932dc37851d1/ExistingBugEditor.java/clean/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/ExistingBugEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
3604,
7416,
12,
6233,
1133,
425,
13,
288,
1082,
202,
3616,
3170,
273,
446,
31,
1082,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
12094,
538,
18,
2469,
31,
277,
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,
3196,
202,
482,
918,
3604,
7416,
12,
6233,
1133,
425,
13,
288,
1082,
202,
3616,
3170,
273,
446,
31,
1082,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
12094,
538,
18,
2469,
31,
277,
2... |
if(core.getConfig().getPluginNames().size() == 0) { | if(this.core.getConfig().getPluginNames().size() == 0) { | public boolean loadPlugins() { plugins = new LinkedHashMap(); Vector pluginNames; if(core.getConfig().getPluginNames().size() == 0) { /* Then we load the config with the default plugins */ for(int i = 0 ; i < defaultPlugins.length ; i++) { core.getConfig().addPlugin(defaultPlugins[i]); } } pluginNames = core.getConfig().getPluginNames(); Iterator pluginIt = pluginNames.iterator(); int progressJump = 10 / pluginNames.size(); core.getSplashScreen().setProgression(40); while(pluginIt.hasNext()) { String pluginName = (String)pluginIt.next(); core.getSplashScreen().setProgressionAndStatus(core.getSplashScreen().getProgression()+progressJump, "Loading plugin '"+pluginName+"' ..."); loadPlugin(pluginName); } return true; } | 47012 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47012/88402a3bc59123261d50a7cfed0ac20de2b772f6/PluginManager.java/buggy/src/thaw/core/PluginManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1262,
9461,
1435,
288,
202,
202,
8057,
273,
394,
13589,
5621,
202,
202,
5018,
1909,
1557,
31,
202,
202,
430,
12,
3644,
18,
588,
809,
7675,
588,
3773,
1557,
7675,
1467,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1262,
9461,
1435,
288,
202,
202,
8057,
273,
394,
13589,
5621,
202,
202,
5018,
1909,
1557,
31,
202,
202,
430,
12,
3644,
18,
588,
809,
7675,
588,
3773,
1557,
7675,
1467,
1... |
if (la[i] instanceof ItemStateLifeCycleListener) { ((ItemStateLifeCycleListener) la[i]).statusChanged(this, oldStatus); | if (la[i] != null) { la[i].statusChanged(this, oldStatus); | void setStatus(int newStatus) { int oldStatus = status; if (oldStatus == newStatus) { return; } if (Status.isTerminalStatus(oldStatus)) { throw new IllegalStateException("State is already in terminal status " + oldStatus); } if (Status.isValidStatusChange(oldStatus, newStatus, isWorkspaceState)) { status = newStatus; } else { throw new IllegalArgumentException("Invalid new status " + newStatus + " for state with status " + oldStatus); } // notifiy listeners about status change // copy listeners to array to avoid ConcurrentModificationException ItemStateLifeCycleListener[] la; synchronized (listeners) { la = (ItemStateLifeCycleListener[]) listeners.toArray(new ItemStateLifeCycleListener[listeners.size()]); } for (int i = 0; i < la.length; i++) { if (la[i] instanceof ItemStateLifeCycleListener) { ((ItemStateLifeCycleListener) la[i]).statusChanged(this, oldStatus); } } if (status == Status.MODIFIED) { // change back tmp MODIFIED status, that is used only to have a marker // to inform the overlaying state, that it needs to synchronize with // its overlayed state again // TODO: improve... status = Status.EXISTING; } } | 49304 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49304/a697c8379c6a42f34da9483c7fdf1acfe95896b6/ItemState.java/buggy/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
9433,
12,
474,
394,
1482,
13,
288,
3639,
509,
1592,
1482,
273,
1267,
31,
3639,
309,
261,
1673,
1482,
422,
394,
1482,
13,
288,
5411,
327,
31,
3639,
289,
3639,
309,
261,
1482,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
9433,
12,
474,
394,
1482,
13,
288,
3639,
509,
1592,
1482,
273,
1267,
31,
3639,
309,
261,
1673,
1482,
422,
394,
1482,
13,
288,
5411,
327,
31,
3639,
289,
3639,
309,
261,
1482,
18,
... |
} | } | private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { // TODO } // readObject() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/49e488b8530051383b90b1357fa767c87c9ff7f5/JMenuItem.java/clean/core/src/classpath/javax/javax/swing/JMenuItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
17362,
12,
921,
4348,
1407,
13,
1875,
202,
15069,
1860,
16,
10403,
288,
202,
202,
759,
2660,
202,
97,
368,
17362,
1435,
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,
1152,
918,
17362,
12,
921,
4348,
1407,
13,
1875,
202,
15069,
1860,
16,
10403,
288,
202,
202,
759,
2660,
202,
97,
368,
17362,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
private String _getClipboardContents() { if( ! _usingLocalClipboard ) { try { PrivilegeManager.enablePrivilege("UniversalSystemClipboardAccess"); return _app.clipboardText(); } catch(Exception e) { _usingLocalClipboard = true;// if(ASS)System.out.println( "switching to use local clipboard"); } } return _localClipboard; } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/2de73cf99dce60cce549e7757f841284b68d1220/CommandTyrant.java/clean/js/jsdj/classes/com/netscape/jsdebugging/ifcui/CommandTyrant.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
389,
588,
15339,
3752,
6323,
1435,
565,
288,
3639,
309,
12,
401,
389,
9940,
2042,
15339,
3752,
262,
3639,
288,
5411,
775,
5411,
288,
7734,
2301,
8203,
908,
1318,
18,
7589,
2430... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
389,
588,
15339,
3752,
6323,
1435,
565,
288,
3639,
309,
12,
401,
389,
9940,
2042,
15339,
3752,
262,
3639,
288,
5411,
775,
5411,
288,
7734,
2301,
8203,
908,
1318,
18,
7589,
2430... | ||
int [] result = new int[316]; | int [] result = new int[343]; | private static int [] zzUnpackRowMap() { int [] result = new int[316]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; } | 50493 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50493/58e844dc77aa5d1ee9f4952f22f0f7b6b8469457/CSSTokenizerFilter.java/buggy/src/freenet/clients/http/filter/CSSTokenizerFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
509,
5378,
11273,
23649,
1999,
863,
1435,
288,
565,
509,
5378,
563,
273,
394,
509,
63,
5026,
23,
15533,
565,
509,
1384,
273,
374,
31,
565,
1384,
273,
11273,
23649,
1999,
863,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
509,
5378,
11273,
23649,
1999,
863,
1435,
288,
565,
509,
5378,
563,
273,
394,
509,
63,
5026,
23,
15533,
565,
509,
1384,
273,
374,
31,
565,
1384,
273,
11273,
23649,
1999,
863,
... |
if (getElevation()>getGame().getBoard().getHex(curPos).getCeiling()) { | if (getElevation()>getGame().getBoard().getHex(curPos).ceiling()) { | public boolean checkMovementInBuilding(Coords lastPos, Coords curPos, MoveStep step, IHex curHex, IHex prevHex) { if (this instanceof VTOL) { if (getElevation()>getGame().getBoard().getHex(curPos).getCeiling()) { return false; } } if ( !lastPos.equals(curPos) && step.getMovementType() != IEntityMovementType.MOVE_JUMP && ( curHex.containsTerrain(Terrains.BUILDING) || (prevHex != null && prevHex.containsTerrain(Terrains.BUILDING)) ) && !(this instanceof Infantry) ) { return true; } else { return false; } } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/e41efaa0e6ade67bb1598d7a434c9347aef09489/Entity.java/clean/megamek/src/megamek/common/Entity.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
866,
49,
26140,
382,
16713,
12,
13089,
1142,
1616,
16,
10320,
87,
662,
1616,
16,
4766,
6647,
9933,
4160,
2235,
16,
467,
7037,
662,
7037,
16,
4766,
6647,
467,
7037,
2807,
7037,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
866,
49,
26140,
382,
16713,
12,
13089,
1142,
1616,
16,
10320,
87,
662,
1616,
16,
4766,
6647,
9933,
4160,
2235,
16,
467,
7037,
662,
7037,
16,
4766,
6647,
467,
7037,
2807,
7037,... |
fQuickAssistant = new ManifestQuickAssistAssistant(); | fQuickAssistant = new PDEQuickAssistAssistant(); | public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) { if (sourceViewer.isEditable()) { if (fQuickAssistant == null) fQuickAssistant = new ManifestQuickAssistAssistant(); return fQuickAssistant; } return null; } | 8783 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8783/a6f454c5d638c8d1e73081336f008bf44d0d46a2/ManifestConfiguration.java/clean/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ManifestConfiguration.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
13663,
2610,
376,
2610,
17175,
336,
13663,
2610,
376,
2610,
17175,
12,
45,
1830,
18415,
1084,
18415,
13,
288,
202,
202,
430,
261,
3168,
18415,
18,
291,
15470,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
13663,
2610,
376,
2610,
17175,
336,
13663,
2610,
376,
2610,
17175,
12,
45,
1830,
18415,
1084,
18415,
13,
288,
202,
202,
430,
261,
3168,
18415,
18,
291,
15470,
10756,
288,
1... |
SIRPipeline wrapper = new SIRPipeline(oldParent, "wrapper_" + str.getName(), JFieldDeclaration.EMPTY(), JMethodDeclaration.EMPTY()); | SIRPipeline wrapper = new SIRPipeline(oldParent, str.getIdent()); | public static SIRPipeline makeWrapper(SIRStream str) { // wrapper.add below changes the parent of str, so grab the // old parent now. SIRContainer oldParent = str.getParent(); SIRPipeline wrapper = new SIRPipeline(oldParent, "wrapper_" + str.getName(), JFieldDeclaration.EMPTY(), JMethodDeclaration.EMPTY()); wrapper.setInit(SIRStream.makeEmptyInit()); wrapper.add(str); if (oldParent.getParent()!=null) { oldParent.replace(str, wrapper); } return wrapper; } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/42e5596da0832a92c84e3186dade7890ea846371/SIRContainer.java/buggy/streams/src/at/dms/kjc/sir/SIRContainer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
5705,
54,
8798,
1221,
3611,
12,
2320,
54,
1228,
609,
13,
288,
202,
759,
4053,
18,
1289,
5712,
3478,
326,
982,
434,
609,
16,
1427,
11086,
326,
202,
759,
1592,
982,
2037,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
5705,
54,
8798,
1221,
3611,
12,
2320,
54,
1228,
609,
13,
288,
202,
759,
4053,
18,
1289,
5712,
3478,
326,
982,
434,
609,
16,
1427,
11086,
326,
202,
759,
1592,
982,
2037,
18,
... |
substitutionGroupElementDeclIndex = | substitutionGroupElementDeclIndex = | private QName traverseElementDecl(Element elementDecl) throws Exception { 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', 'nullable', '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 isNullable = elementDecl.getAttribute (SchemaSymbols.ATT_NULLABLE).equals(SchemaSymbols.ATTVAL_TRUE)? true:false; boolean isAbstract = elementDecl.getAttribute (SchemaSymbols.ATT_ABSTRACT).equals(SchemaSymbols.ATTVAL_TRUE)? true:false; int elementMiscFlags = 0; if (isNullable) { elementMiscFlags += SchemaSymbols.NULLABLE; } 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 && 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, Nullable 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) | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/0561c4be90e07e6ba8d6b8f42edef5dc8d6d453c/TraverseSchema.java/buggy/src/org/apache/xerces/validators/schema/TraverseSchema.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
16723,
10080,
1046,
3456,
12,
1046,
930,
3456,
13,
1216,
1185,
288,
3639,
509,
29617,
559,
1377,
273,
300,
21,
31,
3639,
509,
29617,
907,
1016,
273,
300,
21,
31,
3639,
509,
8173,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
29617,
559,
1377,
273,
300,
21,
31,
3639,
509,
29617,
907,
1016,
273,
300,
21,
31,
3639,
509,
8173,
... |
final IPath containerPath = resourceGroup.getContainerFullPath(); IPath newFilePath = containerPath.append(resourceGroup.getResource()); final IFile newFileHandle = createFileHandle(newFilePath); final InputStream initialContents = getInitialContents(); | final IPath containerPath = resourceGroup.getContainerFullPath(); IPath newFilePath = containerPath.append(resourceGroup.getResource()); final IFile newFileHandle = createFileHandle(newFilePath); final InputStream initialContents = getInitialContents(); | public IFile createNewFile() { if (newFile != null) { return newFile; } // create the new file and cache it if successful final IPath containerPath = resourceGroup.getContainerFullPath(); IPath newFilePath = containerPath.append(resourceGroup.getResource()); final IFile newFileHandle = createFileHandle(newFilePath); final InputStream initialContents = getInitialContents(); createLinkTarget(); IRunnableWithProgress op = new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException { CreateFileOperation op = new CreateFileOperation( newFileHandle, linkTargetPath, initialContents, IDEWorkbenchMessages.WizardNewFileCreationPage_title); try { PlatformUI.getWorkbench().getOperationSupport() .getOperationHistory().execute(op, monitor, WorkspaceUndoUtil.getUIInfoAdapter(getShell())); } catch (ExecutionException e) { if (e.getCause() instanceof CoreException) { ErrorDialog .openError( getContainer().getShell(), // Was Utilities.getFocusShell() IDEWorkbenchMessages.WizardNewFileCreationPage_errorTitle, null, // no special message ((CoreException) e.getCause()) .getStatus()); } else { throw new InvocationTargetException(e); } } } }; try { getContainer().run(true, true, op); } catch (InterruptedException e) { return null; } catch (InvocationTargetException e) { // Execution Exceptions are handled above but we may still get unexpected runtime errors. IDEWorkbenchPlugin.log(getClass(), "createNewFile()", e.getTargetException()); //$NON-NLS-1$ MessageDialog .openError( getContainer().getShell(), IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorTitle, NLS.bind(IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorMessage, e.getTargetException().getMessage())); return null; } newFile = newFileHandle; return newFile; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/6acf364392177fabaa2905c86fa45a3dac0a3db3/WizardNewFileCreationPage.java/buggy/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFileCreationPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
812,
15291,
812,
1435,
288,
3639,
309,
261,
2704,
812,
480,
446,
13,
288,
1082,
202,
2463,
20592,
31,
202,
202,
97,
3639,
368,
752,
326,
394,
585,
471,
1247,
518,
309,
6873,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
812,
15291,
812,
1435,
288,
3639,
309,
261,
2704,
812,
480,
446,
13,
288,
1082,
202,
2463,
20592,
31,
202,
202,
97,
3639,
368,
752,
326,
394,
585,
471,
1247,
518,
309,
6873,
... |
long newModTime = getModificationTime(); | long curModTime = getModificationTime(); | public void execute() { long newModTime = getModificationTime(); if (lastModTime != newModTime) { reconfigure(); lastModTime = newModTime; } } | 45952 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45952/e6e7b9098fd3143ac76e98e9c52bf3e103039bc9/TimedLocationWatchdog.java/buggy/src/java/org/apache/log4j/watchdog/TimedLocationWatchdog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1836,
1435,
288,
565,
1525,
662,
1739,
950,
273,
336,
13467,
950,
5621,
565,
309,
261,
2722,
1739,
950,
480,
394,
1739,
950,
13,
288,
1377,
283,
14895,
5621,
1377,
1142,
1739,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1836,
1435,
288,
565,
1525,
662,
1739,
950,
273,
336,
13467,
950,
5621,
565,
309,
261,
2722,
1739,
950,
480,
394,
1739,
950,
13,
288,
1377,
283,
14895,
5621,
1377,
1142,
1739,
... |
IConfigurationElement[] children = config .getChildren(IWorkbenchRegistryConstants.TAG_ENABLEMENT); if (children.length > 0) { enablementExpression = new ActionExpression(children[0]); return; } | IConfigurationElement[] children = config .getChildren(IWorkbenchRegistryConstants.TAG_ENABLEMENT); if (children.length > 0) { enablementExpression = new ActionExpression(children[0]); return; } | private void parseClasses(IConfigurationElement config) { // Get enables for. String enablesFor = config .getAttribute(IWorkbenchRegistryConstants.ATT_ENABLES_FOR); if (enablesFor == null) enablesFor = "*"; //$NON-NLS-1$ if (enablesFor.equals("*")) //$NON-NLS-1$ mode = ANY_NUMBER; else if (enablesFor.equals("?")) //$NON-NLS-1$ mode = NONE_OR_ONE; else if (enablesFor.equals("!")) //$NON-NLS-1$ mode = NONE; else if (enablesFor.equals("+")) //$NON-NLS-1$ mode = ONE_OR_MORE; else if (enablesFor.equals("multiple") //$NON-NLS-1$ || enablesFor.equals("2+")) //$NON-NLS-1$ mode = MULTIPLE; else { try { mode = Integer.parseInt(enablesFor); } catch (NumberFormatException e) { mode = UNKNOWN; } } // Get enablement block. IConfigurationElement[] children = config .getChildren(IWorkbenchRegistryConstants.TAG_ENABLEMENT); if (children.length > 0) { enablementExpression = new ActionExpression(children[0]); return; } // Get selection block. children = config.getChildren(IWorkbenchRegistryConstants.TAG_SELECTION); if (children.length > 0) { classes = new ArrayList(); for (int i = 0; i < children.length; i++) { IConfigurationElement sel = children[i]; String cname = sel.getAttribute(IWorkbenchRegistryConstants.ATT_CLASS); String name = sel.getAttribute(IWorkbenchRegistryConstants.ATT_NAME); SelectionClass sclass = new SelectionClass(); sclass.className = cname; sclass.nameFilter = name; classes.add(sclass); } } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/5cfb5f88a049bbc9efcf0fade7d5687d0ec50ed3/SelectionEnabler.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/SelectionEnabler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1109,
4818,
12,
45,
1750,
1046,
642,
13,
288,
3639,
368,
968,
19808,
364,
18,
3639,
514,
19808,
1290,
273,
642,
7734,
263,
588,
1499,
12,
45,
2421,
22144,
4243,
2918,
18,
789... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
4818,
12,
45,
1750,
1046,
642,
13,
288,
3639,
368,
968,
19808,
364,
18,
3639,
514,
19808,
1290,
273,
642,
7734,
263,
588,
1499,
12,
45,
2421,
22144,
4243,
2918,
18,
789... |
} else if (packet.isFlagSet(Packet.FLAG_SYNCHRONIZE)) { | } else { | private void receiveKnownCon(Connection con, Packet packet) { // the packet is pointed at a stream ID we're receiving on if (isValidMatch(con.getSendStreamId(), packet.getReceiveStreamId())) { // the packet's receive stream ID also matches what we expect //if (_log.shouldLog(Log.DEBUG)) // _log.debug("receive valid: " + packet); try { con.getPacketHandler().receivePacket(packet, con); } catch (I2PException ie) { if (_log.shouldLog(Log.WARN)) _log.warn("Received forged packet for " + con, ie); } } else { if (packet.isFlagSet(Packet.FLAG_RESET)) { // refused if (_log.shouldLog(Log.DEBUG)) _log.debug("receive reset: " + packet); try { con.getPacketHandler().receivePacket(packet, con); } catch (I2PException ie) { if (_log.shouldLog(Log.WARN)) _log.warn("Received forged reset for " + con, ie); } } else if (packet.isFlagSet(Packet.FLAG_SYNCHRONIZE)) { if ( (con.getSendStreamId() == null) || (DataHelper.eq(con.getSendStreamId(), packet.getReceiveStreamId())) ) { byte oldId[] =con.getSendStreamId(); // con fully established, w00t con.setSendStreamId(packet.getReceiveStreamId()); try { con.getPacketHandler().receivePacket(packet, con); } catch (I2PException ie) { if (_log.shouldLog(Log.WARN)) _log.warn("Received forged syn for " + con, ie); con.setSendStreamId(oldId); } } else { if (_log.shouldLog(Log.WARN)) _log.warn("Receive a syn packet with the wrong IDs, sending reset: " + packet); sendReset(packet); } } else { if (!con.getResetSent()) { // someone is sending us a packet on the wrong stream if (_log.shouldLog(Log.WARN)) _log.warn("Received a packet on the wrong stream: " + packet + " connection: " + con); } } } } | 3808 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3808/c17433cb9342d6d49730c0ed662f8cb0369629bb/PacketHandler.java/buggy/apps/streaming/java/src/net/i2p/client/streaming/PacketHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
6798,
11925,
442,
12,
1952,
356,
16,
11114,
4414,
13,
288,
3639,
368,
326,
4414,
353,
25874,
622,
279,
1407,
1599,
732,
4565,
15847,
603,
3639,
309,
261,
26810,
2060,
12,
591,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6798,
11925,
442,
12,
1952,
356,
16,
11114,
4414,
13,
288,
3639,
368,
326,
4414,
353,
25874,
622,
279,
1407,
1599,
732,
4565,
15847,
603,
3639,
309,
261,
26810,
2060,
12,
591,
... |
void _switchDefScrollPane() { // demoted to package private protection to test the disabling editing while // compiling functionality. // Sync caret with location before switching _currentDefPane.getOpenDocument(). syncCurrentLocationWithDefinitions( _currentDefPane.getCaretPosition() ); // Remove any error highlighting in the old def pane _currentDefPane.removeErrorHighlight(); JScrollPane scroll = _defScrollPanes.get(_model.getActiveDocument()); if (scroll == null) { throw new UnexpectedException(new Exception( "Current definitions scroll pane not found.")); } int oldLocation = _docSplitPane.getDividerLocation(); // Following line should fix "Dancing UI" bug // scroll.setPreferredSize(_docSplitPane.getRightComponent().getPreferredSize()); _docSplitPane.setRightComponent(scroll); _docSplitPane.setDividerLocation(oldLocation); // if the current def pane is uneditable, that means // we arrived here from a compile with errors. We're // guaranteed to make it editable again when we // return from the compilation, so we take the state // with us. We guarantee only one definitions pane // is un-editable at any time. if ( _currentDefPane.isEditable() ){ _currentDefPane = (DefinitionsPane) scroll.getViewport().getView(); } else { _currentDefPane.setEditable(true); _currentDefPane = (DefinitionsPane) scroll.getViewport().getView(); _currentDefPane.setEditable(false); } // reset the undo/redo menu items _undoAction.setDelegatee(_currentDefPane.getUndoAction()); _redoAction.setDelegatee(_currentDefPane.getRedoAction()); if(inDebugMode()) { _updateDebugStatus(); } } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/6df23b9d947a754084cff460e34d203b0d81fd48/MainFrame.java/buggy/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
389,
9610,
3262,
26360,
1435,
288,
368,
9626,
16474,
358,
2181,
3238,
17862,
358,
1842,
326,
1015,
17912,
15755,
1323,
368,
1161,
4973,
14176,
18,
368,
9721,
21683,
598,
2117,
1865,
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,
282,
918,
389,
9610,
3262,
26360,
1435,
288,
368,
9626,
16474,
358,
2181,
3238,
17862,
358,
1842,
326,
1015,
17912,
15755,
1323,
368,
1161,
4973,
14176,
18,
368,
9721,
21683,
598,
2117,
1865,
30... | ||
" 19 getstatic java/lang/System.out Ljava/io/PrintStream; [26]\n" + " 22 invokevirtual java/io/PrintStream.println()V [31]\n" + " 25 getstatic java/lang/System.out Ljava/io/PrintStream; [26]\n" + | " 19 getstatic java.lang.System.out : java.io.PrintStream [26]\n" + " 22 invokevirtual java.io.PrintStream.println() : void [31]\n" + " 25 getstatic java.lang.System.out : java.io.PrintStream [26]\n" + | public void test032() { // boolean expression this.runConformTest( new String[] { "X.java", "public class X {\n" + " public static void main(String[] s) {\n" + " if (new Integer(1) == new Integer(0)) {\n" + " System.out.println();\n" + " }\n" + " System.out.print(\"SUCCESS\");\n" + " }\n" + "}", }, "SUCCESS" ); ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler(); String actualOutput = null; try { byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(new File(OUTPUT_DIR + File.separator +"X.class")); actualOutput = disassembler.disassemble( classFileBytes, "\n", ClassFileBytesDisassembler.DETAILED); } catch (org.eclipse.jdt.core.util.ClassFormatException e) { assertTrue("ClassFormatException", false); } catch (IOException e) { assertTrue("IOException", false); } String expectedOutput = " // Method descriptor #15 ([Ljava/lang/String;)V\n" + " // Stack: 4, Locals: 1\n" + " public static void main(String[] s);\n" + " 0 new java/lang/Integer [17]\n" + " 3 dup\n" + " 4 iconst_1\n" + " 5 invokespecial java/lang/Integer.<init>(I)V [20]\n" + " 8 new java/lang/Integer [17]\n" + " 11 dup\n" + " 12 iconst_0\n" + " 13 invokespecial java/lang/Integer.<init>(I)V [20]\n" + " 16 if_acmpne 25\n" + " 19 getstatic java/lang/System.out Ljava/io/PrintStream; [26]\n" + " 22 invokevirtual java/io/PrintStream.println()V [31]\n" + " 25 getstatic java/lang/System.out Ljava/io/PrintStream; [26]\n" + " 28 ldc <String \"SUCCESS\"> [33]\n" + " 30 invokevirtual java/io/PrintStream.print(Ljava/lang/String;)V [37]\n" + " 33 return\n"; int index = actualOutput.indexOf(expectedOutput); if (index == -1 || expectedOutput.length() == 0) { System.out.println(Util.displayString(actualOutput, 3)); } if (index == -1) { assertEquals("Wrong contents", expectedOutput, actualOutput); } } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/e9ca95978aca2a442bfecfb8ac281f372092486a/AutoBoxingTest.java/clean/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
20,
1578,
1435,
288,
368,
1250,
2652,
202,
202,
2211,
18,
2681,
442,
687,
4709,
12,
1082,
202,
2704,
514,
8526,
288,
9506,
202,
6,
60,
18,
6290,
3113,
9506,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
20,
1578,
1435,
288,
368,
1250,
2652,
202,
202,
2211,
18,
2681,
442,
687,
4709,
12,
1082,
202,
2704,
514,
8526,
288,
9506,
202,
6,
60,
18,
6290,
3113,
9506,
202,
... |
String resolvedLinkTarget = resolvedPathLabelData.getText(); path = new Path(resolvedLinkTarget); | public IStatus validateLinkLocation(IResource linkHandle) { if (linkTargetField == null || linkTargetField.isDisposed()) { return createStatus(IStatus.OK, ""); //$NON-NLS-1$ } IWorkspace workspace = IDEWorkbenchPlugin.getPluginWorkspace(); IPath path = new Path(linkTarget); if (createLink == false) { return createStatus(IStatus.OK, ""); //$NON-NLS-1$ } if (path.isUNC()) { // print that path is not valid, but don't do core validation. See // bug 90825. return createStatus( IStatus.WARNING, IDEWorkbenchMessages.CreateLinkedResourceGroup_unableToValidateLinkTarget); } IStatus locationStatus = workspace.validateLinkLocation(linkHandle, path); if (locationStatus.getSeverity() == IStatus.ERROR) { return locationStatus; } // use the resolved link target name String resolvedLinkTarget = resolvedPathLabelData.getText(); path = new Path(resolvedLinkTarget); IFileInfo linkTargetFile = IDEResourceInfoUtils .getFileInfo(resolvedLinkTarget); if (linkTargetFile != null && linkTargetFile.exists()) { IStatus fileTypeStatus = validateFileType(linkTargetFile); if (fileTypeStatus.isOK() == false) { return fileTypeStatus; } } else if (locationStatus.getSeverity() == IStatus.OK) { // locationStatus takes precedence over missing location warning. return createStatus( IStatus.WARNING, IDEWorkbenchMessages.CreateLinkedResourceGroup_linkTargetNonExistent); } return locationStatus; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/f21a158e540a7a992bc7c1d5732d5d6926ff4f2c/CreateLinkedResourceGroup.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CreateLinkedResourceGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
1482,
1954,
2098,
2735,
12,
45,
1420,
1692,
3259,
13,
288,
202,
202,
430,
261,
1232,
2326,
974,
422,
446,
747,
1692,
2326,
974,
18,
291,
1669,
7423,
10756,
288,
1082,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
1482,
1954,
2098,
2735,
12,
45,
1420,
1692,
3259,
13,
288,
202,
202,
430,
261,
1232,
2326,
974,
422,
446,
747,
1692,
2326,
974,
18,
291,
1669,
7423,
10756,
288,
1082,
202... | |
tempPos -= (shiftSize - 1); for (int j = 0; j < bytesToShift; j++) { buffer_[tempPos + shiftSize] = buffer_[tempPos]; tempPos--; } tempPos += (shiftSize + 1); | tempPos -= (bytesToShift - 2); System.arraycopy(buffer_, tempPos - shiftSize, buffer_, tempPos , bytesToShift); | private final void compressBLayerData(int continueDssHeaderCount) throws org.apache.derby.client.am.DisconnectException { int tempPos = 0; // jump to the last continuation header. for (int i = 0; i < continueDssHeaderCount; i++) { // the first may be less than the size of a full dss if (i == 0) { // only jump by the number of bytes remaining in the current dss tempPos = pos_ + dssLength_; } else { // all other jumps are for a full continued dss tempPos += 32767; } } // for each of the dss headers to remove, // read out the continuation header and increment the dss length by the // size of the conitnation bytes, then shift the continuation data as needed. int shiftSize = 0; int bytesToShift = 0; int continueHeaderLength = 0; int newDssLength = 0; for (int i = 0; i < continueDssHeaderCount; i++) { continueHeaderLength = ((buffer_[tempPos] & 0xFF) << 8) + ((buffer_[tempPos + 1] & 0xFF) << 0); if (i == 0) { // if this is the last one (farthest down stream and first to strip out) if ((continueHeaderLength & 0x8000) == 0x8000) { // the last dss header is again continued continueHeaderLength = 32767; dssIsContinued_ = true; } else { // the last dss header was not contiued so update continue state flag dssIsContinued_ = false; } // the very first shift size is 2 shiftSize = 2; } else { // already removed the last header so make sure the chaining flag is on if ((continueHeaderLength & 0x8000) == 0x8000) { continueHeaderLength = 32767; } else { // this is a syntax error but not really certain which one. // for now pick 0x02 which is Dss header Length does not match the number // of bytes of data found. doSyntaxrmSemantics(CodePoint.SYNERRCD_DSS_LENGTH_BYTE_NUMBER_MISMATCH); } // increase the shift size by 2 shiftSize += 2; } // it is a syntax error if the dss continuation is less than or equal to two if (continueHeaderLength <= 2) { doSyntaxrmSemantics(CodePoint.SYNERRCD_DSS_CONT_LESS_OR_EQUAL_2); } newDssLength += (continueHeaderLength - 2); // calculate the number of bytes to shift if (i != (continueDssHeaderCount - 1)) { bytesToShift = 32767; } else { bytesToShift = dssLength_; } tempPos -= (shiftSize - 1); // perform the compress for (int j = 0; j < bytesToShift; j++) { buffer_[tempPos + shiftSize] = buffer_[tempPos]; tempPos--; } tempPos += (shiftSize + 1); } // reposition the start of the data after the final dss shift. pos_ = tempPos; dssLength_ = dssLength_ + newDssLength; } | 56322 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56322/9f5bc901b1e5f06637ebdffce8d9c6728455dc1e/Reply.java/clean/java/client/org/apache/derby/client/net/Reply.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
727,
918,
8099,
38,
4576,
751,
12,
474,
1324,
40,
1049,
1864,
1380,
13,
1216,
2358,
18,
19211,
18,
765,
1637,
18,
2625,
18,
301,
18,
18895,
503,
288,
3639,
509,
1906,
1616,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
727,
918,
8099,
38,
4576,
751,
12,
474,
1324,
40,
1049,
1864,
1380,
13,
1216,
2358,
18,
19211,
18,
765,
1637,
18,
2625,
18,
301,
18,
18895,
503,
288,
3639,
509,
1906,
1616,
273,
... |
return "[" + replace(id, "]", "]]") + "]"; | StringBuffer buf = new StringBuffer(id.length() + 20); quoteMdxIdentifier(id, buf); return buf.toString(); | public static String quoteMdxIdentifier(String id) { return "[" + replace(id, "]", "]]") + "]"; } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/0cc18052c959f8014f772086b193e28d7a6dd66a/Util.java/buggy/src/main/mondrian/olap/Util.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
3862,
49,
13437,
3004,
12,
780,
612,
13,
288,
3639,
6674,
1681,
273,
394,
6674,
12,
350,
18,
2469,
1435,
397,
4200,
1769,
3862,
49,
13437,
3004,
12,
350,
16,
1681,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
3862,
49,
13437,
3004,
12,
780,
612,
13,
288,
3639,
6674,
1681,
273,
394,
6674,
12,
350,
18,
2469,
1435,
397,
4200,
1769,
3862,
49,
13437,
3004,
12,
350,
16,
1681,
1769,... |
buddies.put(buddy.getGroupId()+"."+buddy.getId(), buddy); | buddies.put(""+buddy.getGroupId()+"."+buddy.getId(), buddy); | void gotBuddy(BuddyItem buddy) { Log.debug("Found buddy item: " + buddy.toString() + " at id " + buddy.getId()); buddies.put(buddy.getGroupId()+"."+buddy.getId(), buddy); if (!highestBuddyIdPerGroup.containsKey(buddy.getGroupId())) { highestBuddyIdPerGroup.put(buddy.getGroupId(), -1); } if (buddy.getId() > highestBuddyIdPerGroup.get(buddy.getGroupId())) { highestBuddyIdPerGroup.put(buddy.getGroupId(), buddy.getId()); } } | 6312 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6312/011d1433221c5f13aeb414e4b462b53f68cdffb5/OSCARSession.java/buggy/src/plugins/gateway/src/java/org/jivesoftware/wildfire/gateway/protocols/oscar/OSCARSession.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
2363,
38,
29017,
12,
38,
29017,
1180,
324,
29017,
13,
288,
3639,
1827,
18,
4148,
2932,
2043,
324,
29017,
761,
30,
315,
397,
324,
29017,
18,
10492,
1435,
397,
315,
622,
612,
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,
377,
918,
2363,
38,
29017,
12,
38,
29017,
1180,
324,
29017,
13,
288,
3639,
1827,
18,
4148,
2932,
2043,
324,
29017,
761,
30,
315,
397,
324,
29017,
18,
10492,
1435,
397,
315,
622,
612,
315,
39... |
imageList = display.getImageList (bounds.width, bounds.height); | imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height); | int imageIndex (Image image) { if (image == null) return OS.I_IMAGENONE; if (imageList == null) { Rectangle bounds = image.getBounds (); imageList = display.getImageList (bounds.width, bounds.height); int index = imageList.indexOf (image); if (index == -1) index = imageList.add (image); int hImageList = imageList.getHandle (); /* * Bug in Windows. Making any change to an item that * changes the item height of a table while the table * is scrolled can cause the lines to draw incorrectly. * This happens even when the lines are not currently * visible and are shown afterwards. The fix is to * save the top index, scroll to the top of the table * and then restore the original top index. */ int topIndex = getTopIndex (); setRedraw (false); setTopIndex (0); OS.SendMessage (handle, OS.LVM_SETIMAGELIST, OS.LVSIL_SMALL, hImageList); setTopIndex (topIndex); fixCheckboxImageList (); setRedraw (true); return index; } int index = imageList.indexOf (image); if (index != -1) return index; return imageList.add (image);} | 12413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12413/0be85fb152998df6206f109dfea816fb7584e122/Table.java/buggy/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
509,
1316,
1016,
261,
2040,
1316,
13,
288,
202,
430,
261,
2730,
422,
446,
13,
327,
5932,
18,
45,
67,
3445,
1781,
1157,
5998,
31,
202,
430,
261,
2730,
682,
422,
446,
13,
288,
202,
202,
1946... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
509,
1316,
1016,
261,
2040,
1316,
13,
288,
202,
430,
261,
2730,
422,
446,
13,
327,
5932,
18,
45,
67,
3445,
1781,
1157,
5998,
31,
202,
430,
261,
2730,
682,
422,
446,
13,
288,
202,
202,
1946... |
for (String name: params.keySet()) | for (String name: porder) | String parseSignal(Element signal, Set<String> imports, Map<StructStruct, String> structs, Set<String> anns) throws DBusException { Map<String, String> params = new HashMap<String, String>(); char defaultname = 'a'; imports.add("org.freedesktop.dbus.DBusSignal"); imports.add("org.freedesktop.dbus.DBusException"); String annotations = ""; for (Node a: new IterableNodeList(signal.getChildNodes())) { if (Node.ELEMENT_NODE != a.getNodeType()) continue; checkNode(a, "arg", "annotation"); if ("annotation".equals(a.getNodeName())) annotations += parseAnnotation((Element) a, imports, anns); else { Element arg = (Element) a; String type = DBusConnection.getJavaType(arg.getAttribute("type"), imports, structs, false, false); String name = arg.getAttribute("name"); if (null == name || "".equals(name)) name = ""+(defaultname++); params.put(name, type); } } String out = ""; out += annotations; out += " public static class "+signal.getAttribute("name"); out += " extends DBusSignal\n {\n"; for (String name: params.keySet()) out += " public final "+params.get(name)+" "+name+";\n"; out += " public "+signal.getAttribute("name")+"(String path"; for (String name: params.keySet()) out += ", "+params.get(name)+" "+name; out += ") throws DBusException\n {\n super(path"; for (String name: params.keySet()) out += ", "+name; out += ");\n"; for (String name: params.keySet()) out += " this."+name+" = "+name+";\n"; out += " }\n"; out += " }\n"; return out; } | 5401 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5401/93775ce55edeeedcd38d58b2a3e72303a01e4a13/CreateInterface.java/clean/org/freedesktop/dbus/CreateInterface.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
514,
1109,
11208,
12,
1046,
4277,
16,
1000,
32,
780,
34,
10095,
16,
1635,
32,
3823,
3823,
16,
514,
34,
8179,
16,
1000,
32,
780,
34,
392,
2387,
13,
1216,
2383,
407,
503,
282,
288,
1377... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
1109,
11208,
12,
1046,
4277,
16,
1000,
32,
780,
34,
10095,
16,
1635,
32,
3823,
3823,
16,
514,
34,
8179,
16,
1000,
32,
780,
34,
392,
2387,
13,
1216,
2383,
407,
503,
282,
288,
1377... |
int astral = ASTRAL.getCount( ( KoLCharacter.getEffects() ) ); | int astral = ASTRAL.getCount( ( activeEffects ) ); | private void validate( boolean visitedCouncil ) { if ( isValidAdventure ) return; if ( getRequest().getURLString().indexOf( "adventure.php" ) == -1 ) { isValidAdventure = true; return; } if ( adventureName.indexOf( "In Disguise" ) != -1 || adventureName.indexOf( "Cloaca Uniform" ) != -1 || adventureName.indexOf( "Dyspepsi Uniform" ) != -1 ) { int outfitID = EquipmentDatabase.getOutfitID( this ); if ( !EquipmentDatabase.isWearingOutfit( outfitID ) ) { EquipmentDatabase.retrieveOutfit( outfitID ); if ( !KoLmafia.permitsContinue() ) return; (new EquipmentRequest( client, EquipmentDatabase.getOutfit( outfitID ) )).run(); } // If it's the pirate quest in disguise, make sure // you visit the council beforehand. if ( adventureName.indexOf( "Pirate" ) != -1 ) DEFAULT_SHELL.executeLine( "council" ); } // If we're trying to take a trip, make sure it's the right one if ( adventureID.equals( "96" ) || adventureID.equals( "97" ) || adventureID.equals( "98" ) ) { // You must be Half-Astral to go on a trip int astral = ASTRAL.getCount( ( KoLCharacter.getEffects() ) ); if ( astral == 0 ) { DEFAULT_SHELL.executeLine( "use 1 astral mushroom" ); if ( !KoLmafia.permitsContinue() ) { isValidAdventure = false; return; } } // If we haven't selected a trip yet, do so now if ( astral == 5 ) { String choice; if ( adventureID.equals( "96" ) ) choice = "1"; else if ( adventureID.equals( "98" ) ) choice = "2"; else choice = "3"; // Choose the trip StaticEntity.setProperty( "choiceAdventure71", choice ); String name = getAdventureName(); StaticEntity.setProperty( "chosenTrip", name ); // Arm the adventure by running it once // to get the "Journey to the Center of // your Mind" choice. isValidAdventure = true; client.makeRequest( this, 1 ); return; } String chosenTrip = StaticEntity.getProperty( "chosenTrip" ); // If we've already selected a trip, we can't switch if ( !chosenTrip.equals( getAdventureName() ) ) { KoLmafia.updateDisplay( ERROR_STATE, "You're already taking a different trip." ); isValidAdventure = false; return; } isValidAdventure = true; return; } KoLRequest request = null; // The casino is unlocked provided the player // has a casino pass in their inventory. if ( zone.equals( "Casino" ) ) { AdventureDatabase.retrieveItem( "casino pass" ); isValidAdventure = KoLmafia.permitsContinue(); return; } // The island is unlocked provided the player // has a dingy dinghy in their inventory. else if ( zone.equals( "Island" ) ) { if ( KoLCharacter.hasItem( DINGHY, false ) ) AdventureDatabase.retrieveItem( DINGHY ); else { AdventureDatabase.retrieveItem( "dingy planks" ); DEFAULT_SHELL.executeLine( "use dinghy plans" ); } isValidAdventure = KoLmafia.permitsContinue(); return; } // The Castle in the Clouds in the Sky is unlocked provided the // character has either a S.O.C.K. or an intragalactic rowboat else if ( adventureID.equals( "82" ) ) { if ( KoLCharacter.hasItem( SOCK, true ) ) AdventureDatabase.retrieveItem( SOCK ); else AdventureDatabase.retrieveItem( ROWBOAT ); isValidAdventure = KoLmafia.permitsContinue(); return; } // The Hole in the Sky is unlocked provided the player has an // intragalactic rowboat in their inventory. else if ( adventureID.equals( "83" ) ) { AdventureDatabase.retrieveItem( ROWBOAT ); isValidAdventure = KoLmafia.permitsContinue(); return; } // The beanstalk is unlocked when the player // has planted a beanstalk -- but, the zone // needs to be armed first. else if ( adventureID.equals( "81" ) && !KoLCharacter.beanstalkArmed() ) { // If the character has a S.O.C.K. or an intragalactic // rowboat, they can get to the airship if ( KoLCharacter.hasItem( SOCK, false ) || KoLCharacter.hasItem( ROWBOAT, false ) ) { isValidAdventure = true; return; } // Obviate following request by checking accomplishment: // questlog.php?which=3 // "You have planted a Beanstalk in the Nearby Plains." request = new KoLRequest( client, "plains.php" ); request.run(); if ( request.responseText.indexOf( "beanstalk.php" ) == -1 ) { // If not, check to see if the player has an enchanted // bean which can be used. If they don't, then try to // find one through adventuring. if ( !KoLCharacter.hasItem( BEAN, false ) ) { ArrayList temporary = new ArrayList(); temporary.addAll( client.getConditions() ); DEFAULT_SHELL.executeConditionsCommand( "clear" ); DEFAULT_SHELL.executeConditionsCommand( "add enchanted bean" ); DEFAULT_SHELL.executeLine( "adventure * beanbat" ); if ( !client.getConditions().isEmpty() ) { KoLmafia.updateDisplay( ERROR_STATE, "Unable to complete enchanted bean quest." ); client.getConditions().clear(); client.getConditions().addAll( temporary ); return; } client.getConditions().clear(); client.getConditions().addAll( temporary ); } // Now that you've retrieved the bean, ensure that // it is in your inventory, and then use it. Take // advantage of item consumption automatically doing // what's needed in grabbing the item. DEFAULT_SHELL.executeLine( "council" ); DEFAULT_SHELL.executeLine( "use enchanted bean" ); } request = new KoLRequest( client, "beanstalk.php" ); request.run(); KoLCharacter.armBeanstalk(); isValidAdventure = true; return; } else if ( adventureID.equals( "11" ) ) { isValidAdventure = true; return; } // If a zone validation is sufficient, then validate the // zone normally. if ( AdventureDatabase.validateZone( zone, adventureID ) ) { isValidAdventure = true; return; } // If the person has a continuum transfunctioner, then find // some way of equipping it. If they do not have one, then // acquire one then try to equip it. If the person has a two // handed weapon, then report an error. if ( adventureID.equals( "73" ) ) { if ( !KoLCharacter.hasItem( TRANSFUNCTIONER, false ) ) { request = new KoLRequest( client, "town_wrong.php?place=crackpot" ); request.run(); request = new KoLRequest( client, "town_wrong.php?action=crackyes1" ); request.run(); request = new KoLRequest( client, "town_wrong.php?action=crackyes2" ); request.run(); } if ( EquipmentDatabase.getHands( KoLCharacter.getEquipment( KoLCharacter.WEAPON ).getName() ) > 1 ) { KoLmafia.updateDisplay( ERROR_STATE, "You need to free up a hand." ); return; } DEFAULT_SHELL.executeLine( "equip " + TRANSFUNCTIONER.getName() ); isValidAdventure = true; return; } // Attempt to unlock the Degrassi Knoll by visiting Paco. // Though we can unlock the guild quest, sometimes people // don't want to open up the guild store right now. So, // only keep trying until paco is unlocked. if ( adventureID.equals( "10" ) || adventureID.equals( "100" ) ) { client.unlockGuildStore( true ); if ( KoLmafia.permitsContinue() ) validate( true ); return; } // The beach is unlocked provided the player has the meat car // accomplishment and a meatcar in inventory. if ( zone.equals( "Beach" ) ) { // If the beach hasn't been unlocked, then visit Paco // with your meatcar. visitedCouncil = true; AdventureDatabase.retrieveItem( "bitchin' meatcar" ); if ( KoLmafia.permitsContinue() ) { client.unlockGuildStore( true ); isValidAdventure = KoLmafia.permitsContinue(); return; } } // You can unlock pieces of the bat hole by using up to // three different sonars. if ( zone.equals( "BatHole" ) && !visitedCouncil ) { int sonarCount = SONAR.getCount( KoLCharacter.getInventory() ); if ( sonarCount == 0 ) return; DEFAULT_SHELL.executeLine( "use " + Math.min( 3, sonarCount ) + " sonar-in-a-biscuit" ); validate( true ); return; } if ( zone.equals( "McLarge" ) && !visitedCouncil ) { // Obviate following request by checking accomplishment: // questlog.php?which=2 // "You have learned how to hunt Yetis from the L337 // Tr4pz0r." // See if the trapper will give it to us DEFAULT_SHELL.executeLine( "council" ); request = new KoLRequest( client, "trapper.php" ); request.run(); validate( true ); return; } // Check to see if the Knob is unlocked; all areas are // automatically present when this is true. if ( visitedCouncil ) { KoLmafia.updateDisplay( ABORT_STATE, "This adventure is not yet unlocked." ); return; } DEFAULT_SHELL.executeLine( "council" ); validate( true ); } | 50364 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50364/e62c220071db475c697de817376ca4486bbcebd6/KoLAdventure.java/clean/src/net/sourceforge/kolmafia/KoLAdventure.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1954,
12,
1250,
9711,
39,
465,
71,
330,
262,
202,
95,
202,
202,
430,
261,
4908,
1871,
616,
594,
262,
1082,
202,
2463,
31,
202,
202,
430,
261,
4328,
7675,
588,
1785,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1954,
12,
1250,
9711,
39,
465,
71,
330,
262,
202,
95,
202,
202,
430,
261,
4908,
1871,
616,
594,
262,
1082,
202,
2463,
31,
202,
202,
430,
261,
4328,
7675,
588,
1785,
78... |
void innerUpdate(){ Logger.minor(this, "Update() called"); synchronized(this) { if((result == null) || hasBeenBlown) { Logger.minor(this, "Returning: result="+result+", isAutoUpdateAllowed="+isAutoUpdateAllowed+", hasBeenBlown="+hasBeenBlown); return; } this.revocationDNFCounter = 0; this.finalCheck = true; } System.err.println("Searching for revocation key"); this.queueFetchRevocation(100); synchronized(this) { while(revocationDNFCounter < 3) { System.err.println("Revocation counter: "+revocationDNFCounter); if(this.hasBeenBlown) { Logger.error(this, "The revocation key has been found on the network : blocking auto-update"); return; } try { wait(100*1000); } catch (InterruptedException e) { // Ignore } } } System.err.println("Update in progress"); Logger.normal(this, "Update in progress"); try{ ArrayBucket bucket = (ArrayBucket) result.asBucket(); byte[] data = bucket.toByteArray(); File fRunning = new File("freenet-cvs-snapshot.jar"); File fNew = new File("freenet-cvs-snapshot.jar.new"); boolean nastyRestart = false; if(File.separatorChar != '\\') { // Do nothing. } else { nastyRestart = true; Properties p = WrapperManager.getProperties(); String cp1 = p.getProperty("wrapper.java.classpath.1"); if(cp1.equals("freenet-cvs-snapshot.jar")) { // Cool! } else if(cp1.equals("freenet-cvs-snapshot.jar.new")) { // Swapped; we are running .new File tmp = fRunning; fRunning = fNew; fNew = tmp; } else { cp1 = p.getProperty("wrapper.java.classpath.2"); if(cp1.equals("freenet-cvs-snapshot.jar")) { // Cool! } else if(cp1.equals("freenet-cvs-snapshot.jar.new")) { // Swapped; we are running .new File tmp = fRunning; fRunning = fNew; fNew = tmp; } else { Logger.error(this, "Cannot restart on Windows due to non-standard config file!"); System.err.println("Cannot restart on Windows due to non-standard config file!"); return; } } } fNew.delete(); FileOutputStream fos = new FileOutputStream(fNew); fos.write(data); fos.flush(); fos.close(); System.out.println("################## File written! "+cg.getURI().getSuggestedEdition()+ " " +fNew.getAbsolutePath()); if(!nastyRestart) { // Easy way. if(!fNew.renameTo(fRunning)) { fRunning.delete(); if(!fNew.renameTo(fRunning)) { System.err.println("ERROR renaming the file!"); return; } } } else { // Hard way. if(!WrapperManager.isControlledByNativeWrapper()) { Logger.error(this, "Cannot update because not running under wrapper"); System.err.println("Cannot update because not running under wrapper"); return; } try { File oldConfig = new File("wrapper.conf"); File newConfig = new File("wrapper.conf.new"); FileInputStream fis = new FileInputStream(oldConfig); BufferedInputStream bis = new BufferedInputStream(fis); InputStreamReader isr = new InputStreamReader(bis); BufferedReader br = new BufferedReader(isr); fos = new FileOutputStream(newConfig); OutputStreamWriter osw = new OutputStreamWriter(fos); BufferedWriter bw = new BufferedWriter(osw); String line; boolean succeeded = false; boolean stillSucceeded = false; while((line = br.readLine()) != null) { if(line.equals("wrapper.java.classpath.1="+fRunning.getName())) { bw.write("wrapper.java.classpath.1="+fNew.getName()+"\r\n"); succeeded = true; } else if(line.equals("wrapper.java.classpath.2="+fRunning.getName())) { bw.write("wrapper.java.classpath.2="+fNew.getName()+"\r\n"); succeeded = true; } else { if(line.equals("wrapper.restart.reload_configuration=TRUE")) stillSucceeded = true; bw.write(line+"\r\n"); } } bw.close(); br.close(); if(!succeeded) { System.err.println("Not able to update because of non-standard config"); Logger.error(this, "Not able to update because of non-standard config"); return; } if(!stillSucceeded) { System.err.println("Not able to update because of non-standard or old config, add a line saying \"wrapper.restart.reload_configuration=TRUE\""); Logger.error(this, "Not able to update because of non-standard or old config, add a line saying \"wrapper.restart.reload_configuration=TRUE\""); return; } if(!newConfig.renameTo(oldConfig)) { oldConfig.delete(); if(!newConfig.renameTo(oldConfig)) { System.err.println("Failed to rename over old config: update failed."); Logger.error(this, "Failed to rename over old config: update failed."); return; } } // New config installed. } catch (IOException e) { Logger.error(this, "Not able to update because of I/O error: "+e, e); System.err.println("Not able to update because of I/O error: "+e); } } if(node.getNodeStarter()!=null) { System.err.println("Restarting because of update"); node.getNodeStarter().restart(); } else{ System.out.println("New version has been downloaded: please restart your node!"); node.exit(); } System.err.println("WTF? Restart returned!?"); }catch(Exception e){ Logger.error(this, "Error while updating the node : "+e); System.out.println("Exception : "+e); e.printStackTrace(); } } | 45341 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45341/0ce52e9ff1e0048c34e8d11f2ad596bc8936f6e9/NodeUpdater.java/buggy/src/freenet/node/updater/NodeUpdater.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
3443,
1891,
1435,
95,
202,
202,
3328,
18,
17364,
12,
2211,
16,
315,
1891,
1435,
2566,
8863,
202,
202,
22043,
12,
2211,
13,
288,
1082,
202,
430,
12443,
2088,
422,
446,
13,
747... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
3443,
1891,
1435,
95,
202,
202,
3328,
18,
17364,
12,
2211,
16,
315,
1891,
1435,
2566,
8863,
202,
202,
22043,
12,
2211,
13,
288,
1082,
202,
430,
12443,
2088,
422,
446,
13,
747... | ||
} return result; | } return result; | public CmsProperty readPropertyObject(CmsRequestContext context, CmsResource resource, String key, boolean search) throws CmsException { CmsProperty result = null; CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { result = m_driverManager.readPropertyObject(dbc, resource, key, search); } catch (Exception e) { dbc.report(null, null, e); } finally { dbc.clear(); } return result; } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/a7ffa3c192d7068f584b0a3a844b88bdb2d3145a/CmsSecurityManager.java/buggy/src/org/opencms/db/CmsSecurityManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
18505,
855,
1396,
921,
12,
4747,
21426,
819,
16,
7630,
1058,
16,
514,
498,
16,
1250,
1623,
13,
565,
1216,
11228,
288,
3639,
18505,
563,
273,
446,
31,
3639,
30670,
9881,
273,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
18505,
855,
1396,
921,
12,
4747,
21426,
819,
16,
7630,
1058,
16,
514,
498,
16,
1250,
1623,
13,
565,
1216,
11228,
288,
3639,
18505,
563,
273,
446,
31,
3639,
30670,
9881,
273,
225,
... |
setProperty(null); | private void evaluateExpressions() throws JspException { try { setCookie((String) evalAttr("cookie", getCookie(), String.class)); } catch (NullAttributeException ex) { setCookie(null); } try { setHeader((String) evalAttr("header", getHeader(), String.class)); } catch (NullAttributeException ex) { setHeader(null); } try { setName((String) evalAttr("name", getName(), String.class)); } catch (NullAttributeException ex) { setName(null); } try { setParameter((String) evalAttr("parameter", getParameter(), String.class)); } catch (NullAttributeException ex) { setParameter(null); } try { setProperty((String) evalAttr("property", getProperty(), String.class)); } catch (NullAttributeException ex) { setProperty(null); } try { setRole((String) evalAttr("role", getRole(), String.class)); } catch (NullAttributeException ex) { setRole(null); } try { setScope((String) evalAttr("scope", getScope(), String.class)); } catch (NullAttributeException ex) { setScope(null); } try { setUser((String) evalAttr("user", getUser(), String.class)); } catch (NullAttributeException ex) { setUser(null); } } | 54704 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54704/db064e19656421b94aaf753550935d95f44bd5f9/ELPresentTag.java/buggy/contrib/struts-el/src/share/org/apache/strutsel/taglib/logic/ELPresentTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
26793,
12443,
780,
13,
5302,
3843,
2932,
8417,
3113,
24643,
9334,
514,
18,
1106,
10019,
3639,
289,
1044,
261,
2041,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
26793,
12443,
780,
13,
5302,
3843,
2932,
8417,
3113,
24643,
9334,
514,
18,
1106,
10019,
3639,
289,
1044,
261,
2041,
1499... | |
private void setControlsEnabled( boolean b ) { typeChoicer.setEnabled( b ); cPlacesChoice.setEnabled( b ); cUseSep.setEnabled( b ); cSymbolChoice.setEnabled( b ); cSymPosChoice.setEnabled( b ); if ( b ) { if ( cSymbolChoice.getSelectionIndex( ) == 0 ) { cSymPosChoice.setEnabled( false ); } } cNegNumChoice.setEnabled( b ); fPlacesChoice.setEnabled( b ); fUseSep.setEnabled( b ); // fUseZero.setEnabled( b ); fNegNumChoice.setEnabled( b ); pPlacesChoice.setEnabled( b ); pUseSep.setEnabled( b ); // pUseZero.setEnabled( b ); pSymPosChoice.setEnabled( b ); pNegNumChoice.setEnabled( b ); sPlacesChoice.setEnabled( b ); formatCodeBox.setEnabled( b ); previewTextBox.setEnabled( b ); table.setEnabled( b ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/859da21753cbcccb18462d5dbec32f4394c78014/FormatNumberPage.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/FormatNumberPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
444,
16795,
1526,
12,
1250,
324,
262,
202,
95,
202,
202,
723,
9636,
21349,
18,
542,
1526,
12,
324,
11272,
202,
202,
71,
24791,
10538,
18,
542,
1526,
12,
324,
11272,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
444,
16795,
1526,
12,
1250,
324,
262,
202,
95,
202,
202,
723,
9636,
21349,
18,
542,
1526,
12,
324,
11272,
202,
202,
71,
24791,
10538,
18,
542,
1526,
12,
324,
11272,
202,... | ||
setListForWhiteSelection(treeElement); listViewer.setAllChecked(true); | l.checkStateChanged(event); | public void run() { setListForWhiteSelection(treeElement); listViewer.setAllChecked(true); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/75cf57f2af2f39e062e4b2d7f104f731ee34bcf7/ResourceTreeAndListGroup.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ResourceTreeAndListGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1086,
1435,
288,
9506,
202,
542,
682,
1290,
13407,
6233,
12,
3413,
1046,
1769,
9506,
202,
1098,
18415,
18,
542,
1595,
11454,
12,
3767,
1769,
1082,
202,
97,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1086,
1435,
288,
9506,
202,
542,
682,
1290,
13407,
6233,
12,
3413,
1046,
1769,
9506,
202,
1098,
18415,
18,
542,
1595,
11454,
12,
3767,
1769,
1082,
202,
97,
2,
-100,
-100,
... |
root.notify(); | lockObject.notify(); | protected boolean exitAllowed() { synchronized(root) { if (updateNeeded) { nextUpdate = System.currentTimeMillis(); root.notify(); while (updateNeeded) { try { root.wait(); } catch (InterruptedException ie) { } } } } return true; } | 9368 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9368/39f7bd9e09e0ba07583e16da6aa9f9f684e1d7d4/Organizer.java/buggy/csmart/src/org/cougaar/tools/csmart/ui/viewer/Organizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1250,
2427,
5042,
1435,
288,
565,
3852,
12,
3085,
13,
288,
1377,
309,
261,
2725,
11449,
13,
288,
202,
4285,
1891,
273,
2332,
18,
2972,
28512,
5621,
202,
3085,
18,
12336,
5621,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1250,
2427,
5042,
1435,
288,
565,
3852,
12,
3085,
13,
288,
1377,
309,
261,
2725,
11449,
13,
288,
202,
4285,
1891,
273,
2332,
18,
2972,
28512,
5621,
202,
3085,
18,
12336,
5621,
202,
... |
if (fDocumentTypeIndex == -1) { fDocumentTypeIndex = fDeferredDocumentImpl.createDocumentType(elementQName.rawname, -1, -1); fDeferredDocumentImpl.appendChild(0, fDocumentTypeIndex); } | public void startElement(QName elementQName, XMLAttrList xmlAttrList, int attrListIndex) throws Exception { // deferred expansion if (fDeferredDocumentImpl != null) { int element = fDeferredDocumentImpl.createElement(elementQName.rawname, elementQName.uri, xmlAttrList, attrListIndex); fDeferredDocumentImpl.appendChild(fCurrentNodeIndex, element); fCurrentNodeIndex = element; fWithinElement = true; // identifier registration int index = xmlAttrList.getFirstAttr(attrListIndex); while (index != -1) { if (xmlAttrList.getAttType(index) == fStringPool.addSymbol("ID")) { int nameIndex = xmlAttrList.getAttValue(index); fDeferredDocumentImpl.putIdentifier(nameIndex, element); } index = xmlAttrList.getNextAttr(index); } // copy schema grammar, if needed if (!fSeenRootElement) { fSeenRootElement = true; if (fGrammarAccess) { // REVISIT: How do we know which grammar is in use? //Document schemaDocument = fValidator.getSchemaDocument(); if (fGrammarResolver.size() > 0) { Enumeration schemas = fGrammarResolver.nameSpaceKeys(); Document schemaDocument = fGrammarResolver.getGrammar((String)schemas.nextElement()).getGrammarDocument(); if (schemaDocument != null) { if (fDocumentTypeIndex == -1) { fDocumentTypeIndex = fDeferredDocumentImpl.createDocumentType(elementQName.rawname, -1, -1); fDeferredDocumentImpl.appendChild(0, fDocumentTypeIndex); } Element schema = schemaDocument.getDocumentElement(); copyInto(schema, fDocumentTypeIndex); } } } } } // full expansion else { boolean nsEnabled = false; try { nsEnabled = getNamespaces(); } catch (SAXException s) {} String elementName = fStringPool.toString(elementQName.rawname); Element e; if (nsEnabled) { e = fDocument.createElementNS( // REVISIT: Make sure uri is filled in by caller. fStringPool.toString(elementQName.uri), fStringPool.toString(elementQName.localpart) ); } else { e = fDocument.createElement(elementName); } int attrHandle = xmlAttrList.getFirstAttr(attrListIndex); while (attrHandle != -1) { int attName = xmlAttrList.getAttrName(attrHandle); String attrName = fStringPool.toString(attName); String attrValue = fStringPool.toString(xmlAttrList.getAttValue(attrHandle)); if (nsEnabled) { int nsURIIndex = xmlAttrList.getAttrURI(attrHandle); String namespaceURI = fStringPool.toString(nsURIIndex); // DOM Level 2 wants all namespace declaration attributes // to be bound to "http://www.w3.org/2000/xmlns/" // So as long as the XML parser doesn't do it, it needs to // done here. int prefixIndex = xmlAttrList.getAttrPrefix(attrHandle); String prefix = fStringPool.toString(prefixIndex); if (namespaceURI == null) { if (prefix != null) { if (prefix.equals("xmlns")) { namespaceURI = "http://www.w3.org/2000/xmlns/"; } } else if (attrName.equals("xmlns")) { namespaceURI = "http://www.w3.org/2000/xmlns/"; } } e.setAttributeNS(namespaceURI, attrName, attrValue); } else { e.setAttribute(attrName, attrValue); } if (!xmlAttrList.isSpecified(attrHandle)) { ((AttrImpl)e.getAttributeNode(attrName)) .setSpecified(false); } attrHandle = xmlAttrList.getNextAttr(attrHandle); } fCurrentElementNode.appendChild(e); fCurrentElementNode = e; fWithinElement = true; // identifier registration if (fDocumentImpl != null) { int index = xmlAttrList.getFirstAttr(attrListIndex); while (index != -1) { if (xmlAttrList.getAttType(index) == fStringPool.addSymbol("ID")) { String name = fStringPool.toString(xmlAttrList.getAttValue(index)); fDocumentImpl.putIdentifier(name, e); } index = xmlAttrList.getNextAttr(index); } } xmlAttrList.releaseAttrList(attrListIndex); // copy schema grammar, if needed if (!fSeenRootElement) { fSeenRootElement = true; if (fDocumentImpl != null && fGrammarAccess) { //Document schemaDocument = fValidator.getSchemaDocument(); if (fGrammarResolver.size() > 0) { Enumeration schemas = fGrammarResolver.nameSpaceKeys(); Document schemaDocument = fGrammarResolver.getGrammar((String)schemas.nextElement()).getGrammarDocument(); if (schemaDocument != null) { if (fDocumentType == null) { String rootName = elementName; String systemId = ""; // REVISIT: How do we get this value? -Ac String publicId = ""; // REVISIT: How do we get this value? -Ac fDocumentType = fDocumentImpl.createDocumentType(rootName, publicId, systemId); fDocument.appendChild(fDocumentType); } Element schema = schemaDocument.getDocumentElement(); XUtil.copyInto(schema, fDocumentType); } } } } } } // startElement(QName,XMLAttrList,int) | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/35d811924c031b13a4aba086f815be0fe1736e1b/DOMParser.java/clean/src/org/apache/xerces/parsers/DOMParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
13591,
12,
13688,
930,
13688,
16,
11794,
3167,
3843,
682,
2025,
3843,
682,
16,
509,
1604,
682,
1016,
13,
3639,
1216,
1185,
288,
3639,
368,
7045,
17965,
3639,
309,
261,
74,
1688... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13591,
12,
13688,
930,
13688,
16,
11794,
3167,
3843,
682,
2025,
3843,
682,
16,
509,
1604,
682,
1016,
13,
3639,
1216,
1185,
288,
3639,
368,
7045,
17965,
3639,
309,
261,
74,
1688... | |
if(pos[k] < pos[k-1]) { | if(((SortingHelper)sortHelpers.get(k)).compareTo(sortHelpers.get(k-1)) < 0) { | void prepareMarkerInput(File infile, String[][] hapmapGoodies) throws IOException, HaploViewException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position. the maxdist is //used to determine beyond what distance comparisons will not be //made. if the infile param is null, loads up "dummy info" for //situation where no info file exists //An optional third column is supported which is designed to hold //association study data. If there is a third column there will be //a visual indicator in the D' display that there is additional data //and the detailed data can be viewed with a mouse press. Vector names = new Vector(); HashSet dupCheck = new HashSet(); Vector positions = new Vector(); Vector extras = new Vector(); dupsToBeFlagged = false; dupNames = false; try{ if (infile != null){ if (infile.length() < 1){ throw new HaploViewException("Info file is empty or does not exist: " + infile.getName()); } String currentLine; long prevloc = -1000000000; //read the input file: BufferedReader in = new BufferedReader(new FileReader(infile)); int lineCount = 0; while ((currentLine = in.readLine()) != null){ StringTokenizer st = new StringTokenizer(currentLine); if (st.countTokens() > 1){ lineCount++; }else if (st.countTokens() == 1){ //complain if only one field found throw new HaploViewException("Info file format error on line "+lineCount+ ":\n Info file must be of format: <markername> <markerposition>"); }else{ //skip blank lines continue; } String name = st.nextToken(); String l = st.nextToken(); String extra = null; if (st.hasMoreTokens()) extra = st.nextToken(); long loc; try{ loc = Long.parseLong(l); }catch (NumberFormatException nfe){ throw new HaploViewException("Info file format error on line "+lineCount+ ":\n\"" + l + "\" should be of type long." + "\n Info file must be of format: <markername> <markerposition>"); } //basically if anyone is crazy enough to load a dataset, then go back and load //an out-of-order info file we tell them to bugger off and start over. if (loc < prevloc && Chromosome.markers != null){ throw new HaploViewException("Info file out of order with preloaded dataset:\n"+ name + "\nPlease reload data file and info file together."); } prevloc = loc; if (names.contains(name)){ dupCheck.add(name); } names.add(name); positions.add(l); extras.add(extra); } //check for duplicate names Iterator ditr = dupCheck.iterator(); while (ditr.hasNext()){ String n = (String) ditr.next(); int numdups = 1; for (int i = 0; i < names.size(); i++){ if (names.get(i).equals(n)){ //leave the first instance of the duplicate name the same if (numdups > 1){ String newName = n + "." + numdups; while (names.contains(newName)){ numdups++; newName = n + "." + numdups; } names.setElementAt(newName,i); dupNames = true; } numdups++; } } } if (lineCount > Chromosome.getUnfilteredSize()){ throw(new HaploViewException("Info file error:\nMarker number mismatch: too many\nmarkers in info file compared to data file.")); } if (lineCount < Chromosome.getUnfilteredSize()){ throw(new HaploViewException("Info file error:\nMarker number mismatch: too few\nmarkers in info file compared to data file.")); } infoKnown=true; } if (hapmapGoodies != null){ //we know some stuff from the hapmap so we'll add it here for (int x=0; x < hapmapGoodies.length; x++){ names.add(hapmapGoodies[x][0]); positions.add(hapmapGoodies[x][1]); extras.add(null); } infoKnown = true; } else if (infile != null){ //we only sort if we read the info from an info file. if //it is from a hapmap file, then the markers were already sorted //when they were read in (in class Pedfile). int numLines = names.size(); Hashtable sortHelp = new Hashtable(numLines-1,1.0f); long[] pos = new long[numLines]; boolean needSort = false; //this loop stores the positions of each marker in an array (pos[]) in the order they appear in the file. //it also creates a hashtable with the positions as keys and their index in the pos[] array as the value for (int k = 0; k < (numLines); k++){ pos[k] = new Long((String)(positions.get(k))).longValue(); sortHelp.put(new Long(pos[k]),new Integer(k)); } //loop through and check if any markers are out of order for (int k = 1; k < (numLines); k++){ if(pos[k] < pos[k-1]) { needSort = true; break; } } //if any were out of order, then we need to put them in order if(needSort) { //sort the positions Arrays.sort(pos); Vector newNames = new Vector(); Vector newExtras = new Vector(); Vector newPositions = new Vector(); int[] realPos = new int[numLines]; //reorder the vectors names and extras so that they have the same order as the sorted markers for (int i = 0; i < pos.length; i++){ realPos[i] = ((Integer)(sortHelp.get(new Long(pos[i])))).intValue(); newNames.add(names.get(realPos[i])); newPositions.add(positions.get(realPos[i])); newExtras.add(extras.get(realPos[i])); } names = newNames; extras = newExtras; positions = newPositions; byte[] tempGenotype = new byte[pos.length]; //now we reorder all the individuals genotypes according to the sorted marker order for(int j=0;j<chromosomes.size();j++){ Chromosome tempChrom = (Chromosome)chromosomes.elementAt(j); for(int i =0;i<pos.length;i++){ tempGenotype[i] = tempChrom.getUnfilteredGenotype(realPos[i]); } for(int i=0;i<pos.length;i++) { tempChrom.setGenotype(tempGenotype[i],i); } } //sort pedfile objects //todo: this should really be done before pedfile is subjected to any processing. //todo: that would require altering some order of operations in dealing with inputs Vector unsortedRes = pedFile.getResults(); Vector sortedRes = new Vector(); for (int i = 0; i < realPos.length; i++){ sortedRes.add(unsortedRes.elementAt(realPos[i])); } pedFile.setResults(sortedRes); Vector o = pedFile.getAllIndividuals(); for (int i = 0; i < o.size(); i++){ Individual ind = (Individual) o.get(i); Vector unsortedMarkers = ind.getMarkers(); Vector sortedMarkers = new Vector(); for (int j = 0; j < unsortedMarkers.size(); j++){ sortedMarkers.add(unsortedMarkers.elementAt(realPos[j])); } ind.setMarkers(sortedMarkers); } } } }catch (HaploViewException e){ throw(e); }finally{ double numChroms = chromosomes.size(); Vector markerInfo = new Vector(); double[] numBadGenotypes = new double[Chromosome.getUnfilteredSize()]; percentBadGenotypes = new double[Chromosome.getUnfilteredSize()]; Vector results = null; if (pedFile != null){ results = pedFile.getResults(); } long prevPosition = Long.MIN_VALUE; SNP prevMarker = null; MarkerResult pmr = null; for (int i = 0; i < Chromosome.getUnfilteredSize(); i++){ MarkerResult mr = null; if (results != null){ mr = (MarkerResult)results.elementAt(i); } //to compute minor/major alleles, browse chrom list and count instances of each allele byte a1 = 0; byte a2 = 0; double numa1 = 0; double numa2 = 0; for (int j = 0; j < chromosomes.size(); j++){ //if there is a data point for this marker on this chromosome byte thisAllele = ((Chromosome)chromosomes.elementAt(j)).getUnfilteredGenotype(i); if (!(thisAllele == 0)){ if (thisAllele >= 5){ numa1+=0.5; numa2+=0.5; if (thisAllele < 9){ if (a1==0){ a1 = (byte)(thisAllele-4); }else if (a2 == 0){ if (!(thisAllele-4 == a1)){ a2 = (byte)(thisAllele-4); } } } }else if (a1 == 0){ a1 = thisAllele; numa1++; }else if (thisAllele == a1){ numa1++; }else{ numa2++; a2 = thisAllele; } } else { numBadGenotypes[i]++; } } if (numa2 > numa1){ byte temp = a1; double tempnum = numa1; numa1 = numa2; a1 = a2; numa2 = tempnum; a2 = temp; } double maf; if (mr != null){ maf = Math.rint(mr.getMAF()*100.0)/100.0; }else{ maf = Math.rint(100.0*(numa2/(numa1+numa2)))/100.0; } if (infoKnown){ long pos = Long.parseLong((String)positions.elementAt(i)); SNP thisMarker = (new SNP((String)names.elementAt(i), pos, maf, a1, a2, (String)extras.elementAt(i))); markerInfo.add(thisMarker); if (mr != null){ double genoPC = mr.getGenoPercent(); //check to make sure adjacent SNPs do not have identical positions if (prevPosition != Long.MIN_VALUE){ //only do this for markers 2..N, since we're comparing to the previous location if (pos == prevPosition){ dupsToBeFlagged = true; if (genoPC >= pmr.getGenoPercent()){ //use this one because it has more genotypes thisMarker.setDup(1); prevMarker.setDup(2); }else{ //use the other one because it has more genotypes thisMarker.setDup(2); prevMarker.setDup(1); } } } prevPosition = pos; prevMarker = thisMarker; pmr = mr; } }else{ markerInfo.add(new SNP("Marker " + String.valueOf(i+1), (i*4000), maf,a1,a2)); } percentBadGenotypes[i] = numBadGenotypes[i]/numChroms; } Chromosome.markers = markerInfo; } } | 51222 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51222/9c640e0f897d69833434f8cbf19bd8728d69ec6e/HaploData.java/clean/edu/mit/wi/haploview/HaploData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
2911,
7078,
1210,
12,
812,
14568,
16,
514,
63,
6362,
65,
5622,
1458,
18195,
606,
13,
1216,
1860,
16,
670,
438,
383,
1767,
503,
95,
3639,
368,
2211,
707,
353,
2566,
358,
11090,
501,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
2911,
7078,
1210,
12,
812,
14568,
16,
514,
63,
6362,
65,
5622,
1458,
18195,
606,
13,
1216,
1860,
16,
670,
438,
383,
1767,
503,
95,
3639,
368,
2211,
707,
353,
2566,
358,
11090,
501,... |
if (jj_scan_token(MINUSASSIGN)) return true; | if (jj_scan_token(SC_AND)) return true; if (jj_3R_207()) return true; | final private boolean jj_3R_242() { if (jj_scan_token(MINUSASSIGN)) return true; return false; } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/2c4cc3303f04cdb3883f34b25cfe841b0bdf1fb5/JavaParser.java/clean/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,
3247,
22,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
2312,
67,
4307,
3719,
327,
638,
31,
309,
261,
78,
78,
67,
23,
54,
67,
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,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
3247,
22,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
2312,
67,
4307,
3719,
327,
638,
31,
309,
261,
78,
78,
67,
23,
54,
67,
3... |
throw new IllegalArgumentException("value may not be less then 0"); | throw new IllegalArgumentException("value may not be less than 0"); | public NumberOfInterveningJobs(int value) { super(value); if (value < 0) throw new IllegalArgumentException("value may not be less then 0"); } | 45163 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45163/f6df144a51f6df4ab5f69c781f796e6a912ade6a/NumberOfInterveningJobs.java/buggy/libjava/javax/print/attribute/standard/NumberOfInterveningJobs.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3588,
951,
2465,
3995,
310,
7276,
12,
474,
460,
13,
225,
288,
565,
2240,
12,
1132,
1769,
565,
309,
261,
1132,
411,
374,
13,
1377,
604,
394,
2754,
2932,
1132,
2026,
486,
506,
5242,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3588,
951,
2465,
3995,
310,
7276,
12,
474,
460,
13,
225,
288,
565,
2240,
12,
1132,
1769,
565,
309,
261,
1132,
411,
374,
13,
1377,
604,
394,
2754,
2932,
1132,
2026,
486,
506,
5242,... |
if (!ourIsEnabled) { return false; } if (isSafeModeDefault()) { return !Boolean.getBoolean("javasvn.generator.enabled"); } if (System.getProperty("javasvn.generator.enabled") == null) { return false; } return !Boolean.getBoolean("javasvn.generator.enabled"); } | if (ourLogger == null) { return false; } if (isSafeModeDefault()) { return !Boolean.getBoolean("javasvn.generator.enabled"); } if (System.getProperty("javasvn.generator.enabled") == null) { return false; } return !Boolean.getBoolean("javasvn.generator.enabled"); } | public static boolean isGeneratorDisabled() { if (!ourIsEnabled) { return false; } if (isSafeModeDefault()) { // have to enable explicitly return !Boolean.getBoolean("javasvn.generator.enabled"); } if (System.getProperty("javasvn.generator.enabled") == null) { return false; } return !Boolean.getBoolean("javasvn.generator.enabled"); } | 5695 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5695/6219d45b96ea8caf1106d29bd53371ebdeedac15/DebugLog.java/buggy/javasvn/src/org/tmatesoft/svn/util/DebugLog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
353,
3908,
8853,
1435,
288,
3639,
309,
16051,
477,
2520,
1526,
13,
288,
5411,
327,
629,
31,
3639,
289,
3639,
309,
261,
291,
9890,
2309,
1868,
10756,
288,
5411,
368,
1240,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
353,
3908,
8853,
1435,
288,
3639,
309,
16051,
477,
2520,
1526,
13,
288,
5411,
327,
629,
31,
3639,
289,
3639,
309,
261,
291,
9890,
2309,
1868,
10756,
288,
5411,
368,
1240,... |
private boolean isRelated( ACITuple tuple, OperationScope scope, Name userName, Name entryName, String attrId, Object attrValue, Attributes entry ) throws NamingException, InternalError { for( Iterator i = tuple.getProtectedItems().iterator(); i.hasNext(); ) { ProtectedItem item = ( ProtectedItem ) i.next(); if( item == ProtectedItem.ENTRY ) { if( scope == OperationScope.ENTRY ) { return true; } } else if( item == ProtectedItem.ALL_USER_ATTRIBUTE_TYPES ) { if( scope != OperationScope.ATTRIBUTE_TYPE && scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE ) { continue; } if( isUserAttribute( attrId ) ) { return true; } } else if( item == ProtectedItem.ALL_USER_ATTRIBUTE_TYPES_AND_VALUES ) { if( scope != OperationScope.ATTRIBUTE_TYPE && scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE ) { continue; } if( isUserAttribute( attrId ) ) { return true; } } else if( item instanceof ProtectedItem.AllAttributeValues ) { if( scope != OperationScope.ATTRIBUTE_TYPE && scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE ) { continue; } ProtectedItem.AllAttributeValues aav = ( ProtectedItem.AllAttributeValues ) item; for( Iterator j = aav.iterator(); j.hasNext(); ) { if( attrId.equalsIgnoreCase( ( String ) j.next() ) ) { return true; } } } else if( item instanceof ProtectedItem.AttributeType ) { if( scope != OperationScope.ATTRIBUTE_TYPE && scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE ) { continue; } ProtectedItem.AttributeType at = ( ProtectedItem.AttributeType ) item; for( Iterator j = at.iterator(); j.hasNext(); ) { if( attrId.equalsIgnoreCase( ( String ) j.next() ) ) { return true; } } } else if( item instanceof ProtectedItem.AttributeValue ) { if( scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE ) { continue; } ProtectedItem.AttributeValue av = ( ProtectedItem.AttributeValue ) item; for( Iterator j = av.iterator(); j.hasNext(); ) { Attribute attr = ( Attribute ) j.next(); if( attrId.equalsIgnoreCase( attr.getID() ) && attr.contains( attrValue ) ) { return true; } } } else if( item instanceof ProtectedItem.Classes ) { ProtectedItem.Classes c = ( ProtectedItem.Classes ) item; if( refinementEvaluator.evaluate( c.getClasses(), entry.get( "objectClass" ) ) ) { return true; } } else if( item instanceof ProtectedItem.MaxImmSub ) { return true; } else if( item instanceof ProtectedItem.MaxValueCount ) { if( scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE ) { continue; } ProtectedItem.MaxValueCount mvc = ( ProtectedItem.MaxValueCount ) item; for( Iterator j = mvc.iterator(); j.hasNext(); ) { MaxValueCountItem mvcItem = ( MaxValueCountItem ) j.next(); if( attrId.equalsIgnoreCase( mvcItem.getAttributeType() ) ) { return true; } } } else if( item instanceof ProtectedItem.RangeOfValues ) { ProtectedItem.RangeOfValues rov = ( ProtectedItem.RangeOfValues ) item; if( entryEvaluator.evaluate( rov.getFilter(), entryName.toString(), entry ) ) { return true; } } else if( item instanceof ProtectedItem.RestrictedBy ) { if( scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE ) { continue; } ProtectedItem.RestrictedBy rb = ( ProtectedItem.RestrictedBy ) item; for( Iterator j = rb.iterator(); j.hasNext(); ) { RestrictedByItem rbItem = ( RestrictedByItem ) j.next(); if( attrId.equalsIgnoreCase( rbItem.getAttributeType() ) ) { return true; } } } else if( item instanceof ProtectedItem.SelfValue ) { if( scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE && scope != OperationScope.ATTRIBUTE_TYPE ) { continue; } ProtectedItem.SelfValue sv = ( ProtectedItem.SelfValue ) item; for( Iterator j = sv.iterator(); j.hasNext(); ) { String svItem = String.valueOf( j.next() ); if( svItem.equalsIgnoreCase( attrId ) ) { Attribute attr = entry.get( attrId ); if( attr != null && ( attr.contains( userName ) || attr.contains( userName.toString() ) ) ) { return true; } } } } else { throw new InternalError( "Unexpected protectedItem: " + item.getClass().getName() ); } } return false; } | 10677 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10677/b94e3a1b9e6127d9b400a876f96637dc4a790ad4/RelatedProtectedItemFilter.java/buggy/core/src/main/java/org/apache/ldap/server/authz/support/RelatedProtectedItemFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
353,
8017,
12,
12048,
1285,
2268,
3193,
16,
4189,
3876,
2146,
16,
1770,
12065,
16,
1770,
1241,
461,
16,
514,
1604,
548,
16,
1033,
21676,
16,
9055,
1241,
262,
1216,
26890,
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,
3238,
1250,
353,
8017,
12,
12048,
1285,
2268,
3193,
16,
4189,
3876,
2146,
16,
1770,
12065,
16,
1770,
1241,
461,
16,
514,
1604,
548,
16,
1033,
21676,
16,
9055,
1241,
262,
1216,
26890,
16,
... | ||
"Item X25", null); | null, null, "Item X25", null, null); | public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX25", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X25", null); additions.add(item); WidgetContributionItem widget = new WidgetContributionItem( "org.eclipse.ui.tests.menus.itemX26") { public IWorkbenchWidget createWidget() { return new TextWidget(); } }; additions.add(widget); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/bfd6eb25a2e56f373b64dbce6d194d946bbcc597/TestPlugin.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
752,
442,
4027,
3126,
12,
3445,
2104,
1179,
3824,
1179,
16,
987,
26260,
13,
288,
9506,
202,
2189,
442,
4027,
1180,
761,
273,
394,
3498,
442,
4027,
1180,
12,
25083,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
752,
442,
4027,
3126,
12,
3445,
2104,
1179,
3824,
1179,
16,
987,
26260,
13,
288,
9506,
202,
2189,
442,
4027,
1180,
761,
273,
394,
3498,
442,
4027,
1180,
12,
25083,
202,
... |
if (VM.VerifyAssertions) VM._assert(declaringClass.isInstantiated()); | if (VM.VerifyAssertions) VM._assert(getDeclaringClass().isInstantiated()); | public final synchronized void invalidateCompiledMethod(VM_CompiledMethod cm) { if (VM.VerifyAssertions) VM._assert(declaringClass.isInstantiated()); if (currentCompiledMethod == cm) { replaceCompiledMethod(null); } } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/9f7e15228c35a04a33dad4f1d51fe26cef5732fc/VM_Method.java/buggy/rvm/src/vm/classLoader/VM_Method.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
3852,
918,
11587,
20733,
1305,
12,
7397,
67,
20733,
1305,
5003,
13,
288,
565,
309,
261,
7397,
18,
8097,
8213,
1115,
13,
8251,
6315,
11231,
12,
588,
3456,
14682,
7675,
291,
1067... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
3852,
918,
11587,
20733,
1305,
12,
7397,
67,
20733,
1305,
5003,
13,
288,
565,
309,
261,
7397,
18,
8097,
8213,
1115,
13,
8251,
6315,
11231,
12,
588,
3456,
14682,
7675,
291,
1067... |
return new YamahaDX7PerformanceEditor(p); } | return new YamahaDX7PerformanceEditor(p); } | public JInternalFrame editPatch(Patch p) { if ( ((YamahaDX7Device)(PatchEdit.appConfig.getDevice(getDeviceNum()))).getDX7sPBPflag()==1 ) { // make Sys Info available DX7ParamChanges.mkSysInfoAvail(port, (byte)(channel+0x10)); } else { if ( ((YamahaDX7Device)(PatchEdit.appConfig.getDevice(getDeviceNum()))).getTipsMsgFlag()==1 ) // Information JOptionPane.showMessageDialog(PatchEdit.instance, getDriverName()+"Driver:"+ DX7Strings.PERFORMANCE_EDITOR_STRING, getDriverName()+"Driver", JOptionPane.INFORMATION_MESSAGE); } return new YamahaDX7PerformanceEditor(p); } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/4257a12add320e7386d2e846e2e34d26914720ec/YamahaDX7PerformanceSingleDriver.java/buggy/JSynthLib/synthdrivers/YamahaDX7/YamahaDX7PerformanceSingleDriver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
804,
3061,
3219,
3874,
7332,
12,
7332,
293,
13,
225,
288,
565,
309,
261,
14015,
61,
20789,
3395,
28826,
27,
3654,
21433,
7332,
4666,
18,
2910,
809,
18,
588,
3654,
12,
588,
3654,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
804,
3061,
3219,
3874,
7332,
12,
7332,
293,
13,
225,
288,
565,
309,
261,
14015,
61,
20789,
3395,
28826,
27,
3654,
21433,
7332,
4666,
18,
2910,
809,
18,
588,
3654,
12,
588,
3654,
2... |
((MonotonePageResource)pr).reusePages(pages); | ((MonotonePageResource) pr).reusePages(pages); | public void reusePages(int pages) { ((MonotonePageResource)pr).reusePages(pages); } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/57a34fa3e6e607d84b46e06082997a4771a25a85/MarkCompactSpace.java/buggy/MMTk/src/org/mmtk/policy/MarkCompactSpace.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
11827,
5716,
12,
474,
4689,
13,
288,
565,
14015,
11415,
352,
476,
1964,
1420,
13,
846,
2934,
266,
1202,
5716,
12,
7267,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
11827,
5716,
12,
474,
4689,
13,
288,
565,
14015,
11415,
352,
476,
1964,
1420,
13,
846,
2934,
266,
1202,
5716,
12,
7267,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
status = code; | status = code; | private void finish(int code, PeerNode next) { Logger.minor(this, "Finished: "+code+" on "+this, new Exception("debug")); setStatusTime = System.currentTimeMillis(); synchronized(this) { if(status != NOT_FINISHED) throw new IllegalStateException("finish() called with "+code+" when was already "+status); if((code == ROUTE_NOT_FOUND) && !sentRequest) code = ROUTE_REALLY_NOT_FOUND; status = code; notifyAll(); Logger.minor(this, "Set status code: "+getStatusString()+" on "+uid); } // Now wait for transfers, or for downstream transfer notifications. if(cw != null) { while(!allTransfersCompleted) { try { synchronized (this) { wait(10*1000); } } catch (InterruptedException e) { // Try again } } } else { Logger.minor(this, "No completion waiter"); // There weren't any transfers allTransfersCompleted = true; } synchronized (this) { notifyAll(); } Logger.minor(this, "Returning from finish()"); } | 50915 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50915/f37b79d0c8eecfb6beed49bdd3fb7061942b34aa/CHKInsertSender.java/clean/src/freenet/node/CHKInsertSender.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4076,
12,
474,
981,
16,
10669,
907,
1024,
13,
288,
3639,
4242,
18,
17364,
12,
2211,
16,
315,
10577,
30,
13773,
710,
9078,
603,
13773,
2211,
16,
394,
1185,
2932,
4148,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4076,
12,
474,
981,
16,
10669,
907,
1024,
13,
288,
3639,
4242,
18,
17364,
12,
2211,
16,
315,
10577,
30,
13773,
710,
9078,
603,
13773,
2211,
16,
394,
1185,
2932,
4148,
7923,
1... |
return HorizontalTextPositionConverter.SINGLETON; | protected Converter getTextPositionConverter() { return HorizontalTextPositionConverter.SINGLETON; } | 6232 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6232/1f1850be471d4b8bfd2f3c50aa61bc39bf91259a/CheckButtonComponent.java/buggy/org.rcfaces.core/src/org/rcfaces/core/component/CheckButtonComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
14768,
6701,
2555,
5072,
1435,
288,
6647,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
14768,
6701,
2555,
5072,
1435,
288,
6647,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
} | } | static String getLocalDataTypeName (Configuration config, String genericDataTypeName) { String localDataTypeName = null; try { DatabaseMetaData dbmd = config.getConnection().getMetaData(); String dbName = dbmd.getDatabaseProductName(); String dbVersion = dbmd.getDatabaseProductVersion(); String driverName = dbmd.getDriverName(); String driverVersion = dbmd.getDriverVersion(); // Check for a mapping in DbLoader.xml localDataTypeName = config.getMappedDataTypeName(dbName, dbVersion, driverName, driverVersion, genericDataTypeName); if (localDataTypeName != null) return localDataTypeName; if (config.getLocalTypeMap() == null) { config.setLocalTypeMap(new Hashtable()); try { // Find the first local type name matching the type code ResultSet rs = dbmd.getTypeInfo(); try { while (rs.next()) { Integer dbTypeCode = new Integer(rs.getInt("DATA_TYPE")); String dbTypeName = rs.getString("TYPE_NAME"); config.getLocalTypeMap().put(dbTypeCode, dbTypeName); } } finally { rs.close(); } } catch (Exception e) { config.getLog().println("Problem loading Database Meta Data. " + e.getMessage()); e.printStackTrace(config.getLog()); DbLoader.exit(config); } config.setLocalTypeMap(Collections.unmodifiableMap(config.getLocalTypeMap())); } // Find the type code for this generic type name int dataTypeCode = DbUtils.getJavaSqlType(genericDataTypeName); Integer dataTypeCodeObj = new Integer(dataTypeCode); localDataTypeName = (String)config.getLocalTypeMap().get(dataTypeCodeObj); if (localDataTypeName != null) { return localDataTypeName; } // No matching type found, report an error config.getLog().println( "Your database driver, '" + driverName + "', version '" + driverVersion + "', was unable to find a local type name that matches the generic type name, '" + genericDataTypeName + "'."); config.getLog().println( "Please add a mapped type for database '" + dbName + "', version '" + dbVersion + "' inside '" + config.getPropertiesURL() + "' and run this program again."); config.getLog().println("Exiting..."); DbLoader.exit(config); } catch (Exception e) { e.printStackTrace(config.getLog()); DbLoader.exit(config); } return null; } | 24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/0c5b6eb515381202f2a56052249f323621a7236c/DbUtils.java/buggy/source/org/jasig/portal/tools/dbloader/DbUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
514,
6993,
6273,
461,
261,
1750,
642,
16,
1377,
514,
5210,
6273,
461,
13,
565,
288,
1377,
514,
1191,
6273,
461,
273,
446,
31,
1377,
775,
1377,
288,
3639,
5130,
6998,
1319,
1264,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
514,
6993,
6273,
461,
261,
1750,
642,
16,
1377,
514,
5210,
6273,
461,
13,
565,
288,
1377,
514,
1191,
6273,
461,
273,
446,
31,
1377,
775,
1377,
288,
3639,
5130,
6998,
1319,
1264,
27... |
throw new SecurityException("At least one SignerInfo element MUST be " + "present in a Signature Block (.DSA file)"); | throw new SecurityException(Messages.getString("JarVerifier.14")); | private boolean verifySF(String sigFileName) throws CRLException, CertificateException, ZipException, IOException { log.entering("JarVerifier", "verifySF"); log.finest("About to verify signature of " + sigFileName + "..."); // 1. find the corresponding .DSA file for this .SF file JarEntry dsaEntry = jarFile.getJarEntry(JarUtils.META_INF + sigFileName + JarUtils.DSA_SUFFIX); if (dsaEntry == null) throw new SecurityException("Signature Block missing for " + sigFileName); // 2. read the .DSA file contents as a PKCS7 SignedData InputStream in = jarFile.getInputStream(dsaEntry); PKCS7SignedData pkcs7SignedData = new PKCS7SignedData(in); // 4. get the encrypted digest octet string from the first SignerInfo // this octet string is the digital signature of the .SF file contents Set signerInfos = pkcs7SignedData.getSignerInfos(); if (signerInfos == null || signerInfos.isEmpty()) throw new SecurityException("At least one SignerInfo element MUST be " + "present in a Signature Block (.DSA file)"); SignerInfo signerInfo = (SignerInfo) signerInfos.iterator().next(); byte[] encryptedDigest = signerInfo.getEncryptedDigest(); if (encryptedDigest == null) throw new SecurityException("Missing EncryptedDigest in Signature Block " + "(.DSA file) first SignerInfo element"); log.finest("\n" + Util.dumpString(encryptedDigest, "--- signedSFBytes ")); // 5. get the signer public key Certificate cert = pkcs7SignedData.getCertificates()[0]; PublicKey verifierKey = cert.getPublicKey(); log.finest("--- verifier public key = " + verifierKey); // 6. verify the signature file signature OID digestEncryptionAlgorithmOID = signerInfo.getDigestEncryptionAlgorithmId(); ISignature signatureAlgorithm; ISignatureCodec signatureCodec; if (digestEncryptionAlgorithmOID.equals(Main.DSA_SIGNATURE_OID)) { signatureAlgorithm = new DSSSignature(); signatureCodec = new DSSSignatureX509Codec(); } else { signatureAlgorithm = new RSAPKCS1V1_5Signature(Registry.MD5_HASH); signatureCodec = new RSAPKCS1V1_5SignatureX509Codec(); } Map signatureAttributes = new HashMap(); signatureAttributes.put(ISignature.VERIFIER_KEY, verifierKey); signatureAlgorithm.setupVerify(signatureAttributes); Object herSignature = signatureCodec.decodeSignature(encryptedDigest); // 7. verify the signature file contents JarEntry sfEntry = jarFile.getJarEntry(JarUtils.META_INF + sigFileName + JarUtils.SF_SUFFIX); in = jarFile.getInputStream(sfEntry); byte[] buffer = new byte[2048]; int n; while ((n = in.read(buffer)) != -1) if (n > 0) signatureAlgorithm.update(buffer, 0, n); boolean result = signatureAlgorithm.verify(herSignature); log.info("Signature block [" + sigFileName + "] is " + (result ? "" : "NOT ") + "OK"); log.exiting("JarVerifier", "verifySF", new Boolean(result)); return result; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a0a1b5a96bc35d919f1dc104ff6cc513e7610801/JarVerifier.java/clean/core/src/classpath/tools/gnu/classpath/tools/jarsigner/JarVerifier.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1250,
3929,
22395,
12,
780,
3553,
4771,
13,
1216,
26526,
503,
16,
1377,
29551,
16,
8603,
503,
16,
1860,
225,
288,
565,
613,
18,
2328,
310,
2932,
10813,
17758,
3113,
315,
8705,
22395... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1250,
3929,
22395,
12,
780,
3553,
4771,
13,
1216,
26526,
503,
16,
1377,
29551,
16,
8603,
503,
16,
1860,
225,
288,
565,
613,
18,
2328,
310,
2932,
10813,
17758,
3113,
315,
8705,
22395... |
createDeferredDocumentType(rootElement, publicId, systemId); fDeferredDocumentImpl.appendChild(fCurrentNodeIndex, fDocumentTypeIndex); | createDeferredDocumentType (rootElement, publicId, systemId); fDeferredDocumentImpl.appendChild (fCurrentNodeIndex, fDocumentTypeIndex); | public void doctypeDecl(String rootElement, String publicId, String systemId, Augmentations augs) throws XNIException { if (!fDeferNodeExpansion) { if (fDocumentImpl != null) { fDocumentType = fDocumentImpl.createDocumentType( rootElement, publicId, systemId); fCurrentNode.appendChild(fDocumentType); } } else { fDocumentTypeIndex = fDeferredDocumentImpl. createDeferredDocumentType(rootElement, publicId, systemId); fDeferredDocumentImpl.appendChild(fCurrentNodeIndex, fDocumentTypeIndex); } } // doctypeDecl(String,String,String) | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/9d1dbf89c75cf6f564facc2b605dd9f2cf2dac4d/AbstractDOMParser.java/clean/src/org/apache/xerces/parsers/AbstractDOMParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
24909,
3456,
12,
780,
27575,
16,
18701,
514,
1071,
548,
16,
514,
30083,
16,
432,
14870,
1012,
279,
9024,
13,
3639,
1216,
1139,
50,
45,
503,
288,
3639,
309,
16051,
74,
758,
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,
918,
24909,
3456,
12,
780,
27575,
16,
18701,
514,
1071,
548,
16,
514,
30083,
16,
432,
14870,
1012,
279,
9024,
13,
3639,
1216,
1139,
50,
45,
503,
288,
3639,
309,
16051,
74,
758,
58... |
reference[i] = (byte)(temp / 256); reference[i + 1] = (byte)(temp % 256); | reference[i] = (byte)(temp >> 8); reference[i + 1] = (byte)(temp & 0xFF); | public void scaleBy(int qualityFactor) { int qFactor = qualityFactor; if (qFactor <= 0) { qFactor = 1; } if (qFactor > 100) { qFactor = 100; } if (qFactor < 50) { qFactor = 5000 / qFactor; } else { qFactor = 200 - (qFactor * 2); } int totalLength = getSegmentLength() - 2; int ofs = 4; while (totalLength > 64) {// int tq = (reference[ofs] & 0xFF) % 16; int pq = (reference[ofs] & 0xFF) / 16; if (pq == 0) { for (int i = ofs + 1; i <= ofs + 64; i++) { int temp = ((reference[i] & 0xFF) * qFactor + 50) / 100; if (temp <= 0) temp = 1; if (temp > 255) temp = 255; reference[i] = (byte)temp; } ofs += 65; totalLength -= 65; } else { for (int i = ofs + 1; i <= ofs + 128; i += 2) { int temp = (((reference[i] & 0xFF) * 256 + (reference[i + 1] & 0xFF)) * qFactor + 50) / 100; if (temp <= 0) temp = 1; if (temp > 32767) temp = 32767; reference[i] = (byte)(temp / 256); reference[i + 1] = (byte)(temp % 256); } ofs += 129; totalLength -= 129; } }} | 12413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12413/54678335fd7dde7fcf31de28ef4e8a4cec037256/JPEGQuantizationTable.java/buggy/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGQuantizationTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
3159,
858,
12,
474,
9312,
6837,
13,
288,
202,
474,
1043,
6837,
273,
9312,
6837,
31,
202,
430,
261,
85,
6837,
1648,
374,
13,
288,
202,
202,
85,
6837,
273,
404,
31,
202,
97,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
3159,
858,
12,
474,
9312,
6837,
13,
288,
202,
474,
1043,
6837,
273,
9312,
6837,
31,
202,
430,
261,
85,
6837,
1648,
374,
13,
288,
202,
202,
85,
6837,
273,
404,
31,
202,
97,
202,
... |
throw new java.lang.IllegalArgumentException("Invalid winding rule value"); | throw new java.lang.IllegalArgumentException(Messages.getString("awt.209")); | public void setWindingRule(int rule) { if (rule != WIND_EVEN_ODD && rule != WIND_NON_ZERO) { throw new java.lang.IllegalArgumentException("Invalid winding rule value"); } this.rule = rule; } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/1380f0b7d7529273757b8c60cba9603d41c15f4d/GeneralPath.java/clean/modules/awt/src/main/java/common/java/awt/geom/GeneralPath.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
59,
728,
310,
2175,
12,
474,
1720,
13,
288,
3639,
309,
261,
5345,
480,
24482,
67,
24427,
1157,
67,
1212,
40,
597,
1720,
480,
24482,
67,
3993,
67,
24968,
13,
288,
2398,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
59,
728,
310,
2175,
12,
474,
1720,
13,
288,
3639,
309,
261,
5345,
480,
24482,
67,
24427,
1157,
67,
1212,
40,
597,
1720,
480,
24482,
67,
3993,
67,
24968,
13,
288,
2398,
... |
public Grammar parse( String url ) | public Grammar parse( InputSource source ) | public Grammar parse( String url ) throws SAXException, ParserConfigurationException, java.io.IOException { return _loadSchema(url); } | 45720 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45720/54f92a3d0714b4ce3e968b61219931a4884a19b5/GrammarLoader.java/buggy/msv/src/com/sun/msv/reader/util/GrammarLoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
27809,
1109,
12,
23699,
1084,
262,
3639,
1216,
14366,
16,
6783,
10737,
16,
2252,
18,
1594,
18,
14106,
288,
7734,
327,
389,
945,
3078,
12,
718,
1769,
565,
289,
2,
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,
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,
27809,
1109,
12,
23699,
1084,
262,
3639,
1216,
14366,
16,
6783,
10737,
16,
2252,
18,
1594,
18,
14106,
288,
7734,
327,
389,
945,
3078,
12,
718,
1769,
565,
289,
2,
-100,
-100,
-100,
... |
public IChemFormat getFormat() { | public IResourceFormat getFormat() { | public IChemFormat getFormat() { return new SMILESFormat(); } | 45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/c20f0a656b069d8a3e653822a8741d3aedc2b0f2/IteratingSMILESReader.java/clean/src/org/openscience/cdk/io/iterator/IteratingSMILESReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
1420,
1630,
10959,
1435,
288,
3639,
327,
394,
348,
7492,
11386,
1630,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
1420,
1630,
10959,
1435,
288,
3639,
327,
394,
348,
7492,
11386,
1630,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
private IQ processSetPacket(IQ packet) { List<User> users = new ArrayList<User>(); Element incomingForm = packet.getChildElement(); boolean isDataFormQuery = (incomingForm.element(QName.get("x", "jabber:x:data")) != null); Hashtable<String, String> searchList = extractSearchQuery(incomingForm); Enumeration<String> searchIter = searchList.keys(); while (searchIter.hasMoreElements()) { String field = (String) searchIter.nextElement(); String query = (String) searchList.get(field); Collection<User> foundUsers = new ArrayList<User>(); if (userManager != null) { if (query.length() > 0 && !query.equals("jabber:iq:search")) { foundUsers.addAll(userManager.findUsers(new HashSet<String>( Arrays.asList((field))), query)); } } else { foundUsers.addAll(findUsers(field, query)); } // Filter out all duplicate users. for (User user : foundUsers) { if (!users.contains(user)) { users.add(user); } } } if (isDataFormQuery) { return replyDataFormResult(users, packet); } else { return replyNonDataFormResult(users, packet); } } | 6312 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6312/33741004c1e03e7a2253d7fdd5cc2b5a1293fb44/SearchPlugin.java/buggy/src/plugins/search/src/java/org/jivesoftware/messenger/plugin/SearchPlugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
45,
53,
2567,
694,
6667,
12,
45,
53,
11482,
15329,
682,
32,
1299,
34,
5577,
33,
2704,
19558,
32,
1299,
34,
5621,
1046,
31033,
1204,
33,
11482,
18,
588,
1763,
1046,
5621,
6494,
291,
751... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
45,
53,
2567,
694,
6667,
12,
45,
53,
11482,
15329,
682,
32,
1299,
34,
5577,
33,
2704,
19558,
32,
1299,
34,
5621,
1046,
31033,
1204,
33,
11482,
18,
588,
1763,
1046,
5621,
6494,
291,
751... | ||
else if (code == 416) | else if (code == 416) { Iterator iter = _rfd.getAvailableRanges().getAllIntervals(); while(iter.hasNext()) { Interval next = (Interval)iter.next(); if(_requestedInterval.isSubrange(next)) throw new ProblemReadingHeaderException("Bad ranges sent"); } | private void readHeaders() throws IOException { if (_byteReader == null) throw new ReaderIsNullException(); // Read the response code from the first line and check for any errors String str = _byteReader.readLine(); if (str==null || str.equals("")) throw new IOException(); if(!CommonUtils.isJava118()) BandwidthStat.HTTP_HEADER_DOWNSTREAM_BANDWIDTH.addData(str.length()); int code=parseHTTPCode(str, _rfd); //Note: According to the specification there are 5 headers, LimeWire //ignores 2 of them - queue length, and maxUploadSlots. int[] refQueueInfo = {-1,-1,-1}; //Now read each header... while (true) { str = _byteReader.readLine(); if (str==null || str.equals("")) break; if(!CommonUtils.isJava118()) BandwidthStat.HTTP_HEADER_DOWNSTREAM_BANDWIDTH.addData(str.length()); //As of LimeWire 1.9, we ignore the "Content-length" header for //handling normal download flow. The Content-Length is only //used for reading/discarding some HTTP body messages. //For "Content-Range" headers, we store what the remote side is //going to give us. Users should examine the interval and //update external structures appropriately. if (str.toUpperCase().startsWith("CONTENT-RANGE:")) { Interval responseRange = parseContentRange(str); int low = responseRange.low; int high = responseRange.high + 1; // Make sure that the range they gave us is a subrange // of what we wanted in the first place. if(low < _initialReadingPoint || high > _initialReadingPoint + _amountToRead) throw new ProblemReadingHeaderException( "invalid subrange given. wanted low: " + _initialReadingPoint + ", high: " + (_initialReadingPoint + _amountToRead - 1) + "... given low: " + low + ", high: " + high); _initialReadingPoint = low; _amountToRead = high - low; } else if(HTTPHeaderName.CONTENT_LENGTH.matchesStartOfString(str)) _contentLength = readContentLength(str); else if(HTTPHeaderName.CONTENT_URN.matchesStartOfString(str)) checkContentUrnHeader(str, _rfd.getSHA1Urn()); else if(HTTPHeaderName.GNUTELLA_CONTENT_URN.matchesStartOfString(str)) checkContentUrnHeader(str, _rfd.getSHA1Urn()); else if(HTTPHeaderName.ALT_LOCATION.matchesStartOfString(str)) readAlternateLocations(str); else if(HTTPHeaderName.QUEUE.matchesStartOfString(str)) parseQueueHeaders(str, refQueueInfo); else if (HTTPHeaderName.SERVER.matchesStartOfString(str)) _server = readServer(str); else if (HTTPHeaderName.AVAILABLE_RANGES.matchesStartOfString(str)) parseAvailableRangesHeader(str, _rfd); else if (HTTPHeaderName.RETRY_AFTER.matchesStartOfString(str)) parseRetryAfterHeader(str, _rfd); else if (HTTPHeaderName.CREATION_TIME.matchesStartOfString(str)) parseCreationTimeHeader(str, _rfd); else if (HTTPHeaderName.FEATURES.matchesStartOfString(str)) parseFeatureHeader(str); else if (HTTPHeaderName.THEX_URI.matchesStartOfString(str)) parseTHEXHeader(str); } //Accept any 2xx's, but reject other codes. if ( (code < 200) || (code >= 300) ) { if (code == 404) // file not found throw new com.limegroup.gnutella.downloader.FileNotFoundException(); else if (code == 410) // not shared. throw new NotSharingException(); else if (code == 416) //requested range not available throw new RangeNotAvailableException(); else if (code == 503) { // busy or queued, or range not available. int min = refQueueInfo[0]; int max = refQueueInfo[1]; int pos = refQueueInfo[2]; if(min != -1 && max != -1 && pos != -1) throw new QueuedException(min,max,pos); // per the PFSP spec, a 503 should be returned. // but, to let us distinguish between a busy & // a range not available, check if the partial // sources are filled up ... if( _rfd.isPartialSource() ) throw new RangeNotAvailableException(); //no QueuedException or RangeNotAvailableException? not queued. //throw a generic busy exception. throw new TryAgainLaterException(); // a general catch for 4xx and 5xx's // should maybe be a different exception? // else if ( (code >= 400) && (code < 600) ) } else // unknown or unimportant throw new UnknownCodeException(code); } } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/6c7799a75296f717cc4aa6eade41b4bccbf2b5bd/HTTPDownloader.java/clean/components/gnutella-core/src/main/java/com/limegroup/gnutella/downloader/HTTPDownloader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
855,
3121,
1435,
1216,
1860,
288,
202,
202,
430,
261,
67,
7229,
2514,
422,
446,
13,
1875,
202,
12849,
394,
5393,
2520,
2041,
503,
5621,
202,
202,
759,
2720,
326,
766,
98... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
855,
3121,
1435,
1216,
1860,
288,
202,
202,
430,
261,
67,
7229,
2514,
422,
446,
13,
1875,
202,
12849,
394,
5393,
2520,
2041,
503,
5621,
202,
202,
759,
2720,
326,
766,
98... |
assertEquals("Tests didn't pass", "PASSED", result); | assertEquals("Tests didn't pass, check HTML output for details: " + output.getAbsolutePath(), "PASSED", result); | protected void runHTMLSuite(String browser, boolean slowResources) throws Exception { server = new SeleniumServer(SeleniumServer.DEFAULT_PORT, slowResources); launcher = new HTMLLauncher(server); server.start(); browserURL = "http://localhost:" + server.getPort(); String testURL = browserURL + "/selenium-server/tests/" + suiteName; int timeout = 60 * 10; // ten minutes String result = launcher.runHTMLSuite(browser, browserURL, testURL, output, timeout, multiWindow); assertTrue("Results file doesn't exist: " + output.getAbsolutePath(), output.exists()); assertEquals("Tests didn't pass", "PASSED", result); } | 5066 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5066/81a0c45445a8d58f8fcb6e823e18f5ab4fcffe0c/HTMLRunnerTestBase.java/buggy/server/src/test/java/org/openqa/selenium/server/HTMLRunnerTestBase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1086,
4870,
13587,
12,
780,
4748,
16,
1250,
11816,
3805,
13,
1216,
1185,
288,
3639,
1438,
273,
394,
4352,
17327,
2081,
12,
1877,
17327,
2081,
18,
5280,
67,
6354,
16,
11816,
380... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1086,
4870,
13587,
12,
780,
4748,
16,
1250,
11816,
3805,
13,
1216,
1185,
288,
3639,
1438,
273,
394,
4352,
17327,
2081,
12,
1877,
17327,
2081,
18,
5280,
67,
6354,
16,
11816,
380... |
client.game.getEntities( ce().getPosition() ); | client.game.getEntities( ce.getPosition() ); | public void actionPerformed(ActionEvent ev) { // Are we ignoring events? if ( this.isIgnoringEvents() ) { return; } if ( statusBarActionPerformed(ev, client) ) return; if (!client.isMyTurn()) { // odd... return; } if (ev.getSource() == butDone) { moveTo(cmd); } else if (ev.getActionCommand().equals(MOVE_NEXT)) { selectEntity(client.getNextEntityNum(cen)); } else if (ev.getActionCommand().equals(MOVE_CANCEL)) { clearAllMoves(); } else if (ev.getSource() == butMore) { buttonLayout++; buttonLayout %= NUM_BUTTON_LAYOUTS; setupButtonPanel(); } else if (ev.getActionCommand().equals(MOVE_UNJAM)) { if (gear == MovementDisplay.GEAR_JUMP || gear == MovementDisplay.GEAR_CHARGE || gear == MovementDisplay.GEAR_DFA || cmd.getMpUsed() > ce().getWalkMP()) { // in the wrong gear //clearAllMoves(); //gear = Compute.GEAR_LAND; setUnjamEnabled(false); } else { cmd.addStep(MovePath.STEP_UNJAM_RAC); moveTo(cmd); } } else if (ev.getActionCommand().equals(MOVE_WALK)) { if (gear == MovementDisplay.GEAR_JUMP) { clearAllMoves(); } gear = MovementDisplay.GEAR_LAND; } else if (ev.getActionCommand().equals(MOVE_JUMP)) { if (gear != MovementDisplay.GEAR_JUMP) { clearAllMoves(); } if (!cmd.isJumping()) { cmd.addStep(MovePath.STEP_START_JUMP); } gear = MovementDisplay.GEAR_JUMP; } else if (ev.getActionCommand().equals(MOVE_TURN)) { gear = MovementDisplay.GEAR_TURN; } else if (ev.getActionCommand().equals(MOVE_BACK_UP)) { if (gear == MovementDisplay.GEAR_JUMP) { clearAllMoves(); } gear = MovementDisplay.GEAR_BACKUP; } else if (ev.getActionCommand().equals(MOVE_CLEAR)) { clearAllMoves(); if (!client.game.containsMinefield(ce().getPosition())) { clientgui.doAlertDialog( "Can't clear minefield", "No minefield in hex!" ); return; } // Does the entity has a minesweeper? int clear = Minefield.CLEAR_NUMBER_INFANTRY; int boom = Minefield.CLEAR_NUMBER_INFANTRY_ACCIDENT; Enumeration equip = ce().getMisc(); while ( equip.hasMoreElements() ) { Mounted mounted = (Mounted) equip.nextElement(); if ( mounted.getType() .hasFlag(MiscType.F_MINESWEEPER) ) { clear = Minefield.CLEAR_NUMBER_SWEEPER; boom = Minefield.CLEAR_NUMBER_SWEEPER_ACCIDENT; break; } } StringBuffer buff = new StringBuffer(); buff.append( "The unit successfully clears the\nminefield on " ) .append( clear ) .append( "+. The minefield\nwill explode on " ) .append( boom ) .append( " or less." ); if ( clientgui.doYesNoDialog( "Clear the minefield?", buff.toString() ) ) { cmd.addStep(MovePath.STEP_CLEAR_MINEFIELD); moveTo(cmd); } } else if (ev.getActionCommand().equals(MOVE_CHARGE)) { if (gear != MovementDisplay.GEAR_LAND) { clearAllMoves(); } gear = MovementDisplay.GEAR_CHARGE; } else if (ev.getActionCommand().equals(MOVE_DFA)) { if (gear != MovementDisplay.GEAR_JUMP) { clearAllMoves(); } gear = MovementDisplay.GEAR_DFA; if (!cmd.isJumping()) { cmd.addStep(MovePath.STEP_START_JUMP); } } else if (ev.getActionCommand().equals(MOVE_GET_UP)) { clearAllMoves(); if (cmd.getFinalProne()) { cmd.addStep(MovePath.STEP_GET_UP); } clientgui.bv.drawMovementData(ce(), cmd); clientgui.bv.repaint(); butDone.setLabel("Move"); } else if (ev.getActionCommand().equals(MOVE_GO_PRONE)) { gear = MovementDisplay.GEAR_LAND; if (!cmd.getFinalProne()) { cmd.addStep(MovePath.STEP_GO_PRONE); } clientgui.bv.drawMovementData(ce(), cmd); clientgui.bv.repaint(); butDone.setLabel("Move"); } else if (ev.getActionCommand().equals(MOVE_FLEE) && clientgui.doYesNoDialog("Escape?", "Do you want to flee?")) { clearAllMoves(); cmd.addStep(MovePath.STEP_FLEE); moveTo(cmd); } else if (ev.getActionCommand().equals(MOVE_EJECT)) { if (ce() instanceof Tank) { if (clientgui.doYesNoDialog("Abandon?", "Do you want to abandon this vehicle?")) { clearAllMoves(); cmd.addStep(MovePath.STEP_EJECT); moveTo(cmd); } } else if (clientgui.doYesNoDialog("Eject?", "Do you want to abandon this mech?")) { clearAllMoves(); cmd.addStep(MovePath.STEP_EJECT); moveTo(cmd); } } else if ( ev.getActionCommand().equals(MOVE_LOAD) ) { // Find the other friendly unit in our hex, add it // to our local list of loaded units, and then stop. Entity other = null; Enumeration entities = client.game.getEntities( ce().getPosition() ); while ( entities.hasMoreElements() ) { other = (Entity)entities.nextElement(); if ( ce().getOwner() == other.getOwner() && !ce().equals(other) ) { loadedUnits.addElement( other ); break; } other = null; } // Handle not finding a unit to load. if ( other != null ) { cmd.addStep( MovePath.STEP_LOAD ); clientgui.bv.drawMovementData(ce(), cmd); gear = MovementDisplay.GEAR_LAND; } } else if ( ev.getActionCommand().equals(MOVE_UNLOAD) ) { // Ask the user if we're carrying multiple units. Entity other = getUnloadedUnit(); // Player can cancel the unload. if ( other != null ) { cmd.addStep( MovePath.STEP_UNLOAD, other ); clientgui.bv.drawMovementData(ce(), cmd); } } updateProneButtons(); updateRACButton(); updateLoadButtons(); } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/0bcdeb0f45ab5ce89927be8a8c7c1c35c012d562/MovementDisplay.java/buggy/megamek/src/megamek/client/ui/AWT/MovementDisplay.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
12,
1803,
1133,
2113,
13,
288,
3639,
368,
12520,
732,
14398,
2641,
35,
3639,
309,
261,
333,
18,
291,
21702,
3783,
1435,
262,
288,
5411,
327,
31,
3639,
289,
3639,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
12,
1803,
1133,
2113,
13,
288,
3639,
368,
12520,
732,
14398,
2641,
35,
3639,
309,
261,
333,
18,
291,
21702,
3783,
1435,
262,
288,
5411,
327,
31,
3639,
289,
3639,
309,
... |
if (marker == null) return false; | if (marker == null) { return false; } | public boolean shouldEnable(IStructuredSelection selection) { if (selection.size() != 1) return false; IMarker marker = (IMarker) selection.getFirstElement(); if (marker == null) return false; return IDE.getMarkerHelpRegistry().hasResolutions(marker); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/ResolveMarkerAction.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/ResolveMarkerAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1410,
8317,
12,
45,
30733,
6233,
4421,
13,
288,
3639,
309,
261,
10705,
18,
1467,
1435,
480,
404,
13,
5411,
327,
629,
31,
3639,
467,
7078,
5373,
273,
261,
3445,
1313,
264,
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,
377,
1071,
1250,
1410,
8317,
12,
45,
30733,
6233,
4421,
13,
288,
3639,
309,
261,
10705,
18,
1467,
1435,
480,
404,
13,
5411,
327,
629,
31,
3639,
467,
7078,
5373,
273,
261,
3445,
1313,
264,
13... |
ITextEditor textEditor = (ITextEditor)compilationUnitEditor; | ITextEditor textEditor = (ITextEditor)editorPart; | public IDocumentProvider getDocumentProvider() { if(this.getActivePage() != 0) { this.switchToJava(); } ITextEditor textEditor = (ITextEditor)compilationUnitEditor; return textEditor.getDocumentProvider(); } | 47899 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47899/7f5fba2ae90ca2a9e7d29f9d5522b9264fa6c613/ComponentEditor.java/clean/projects/wolips/plugins/org.objectstyle.wolips.componenteditor/java/org/objectstyle/wolips/componenteditor/part/ComponentEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1599,
504,
650,
2249,
9956,
2249,
1435,
288,
202,
202,
430,
12,
2211,
18,
588,
3896,
1964,
1435,
480,
374,
13,
288,
1082,
202,
2211,
18,
9610,
774,
5852,
5621,
202,
202,
97,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1599,
504,
650,
2249,
9956,
2249,
1435,
288,
202,
202,
430,
12,
2211,
18,
588,
3896,
1964,
1435,
480,
374,
13,
288,
1082,
202,
2211,
18,
9610,
774,
5852,
5621,
202,
202,
97,
... |
public static Method findPrototypeMethod(InvokeInstruction inv, ConstantPoolGen cpg) | public static JavaClassAndMethod findPrototypeMethod(InvokeInstruction inv, ConstantPoolGen cpg) | public static Method findPrototypeMethod(InvokeInstruction inv, ConstantPoolGen cpg) throws ClassNotFoundException { Method m = null; if (DEBUG_METHOD_LOOKUP) { System.out.println("Find prototype method for " + SignatureConverter.convertMethodSignature(inv,cpg)); } short opcode = inv.getOpcode(); // Find the method if (opcode == Constants.INVOKESPECIAL) { // Non-virtual dispatch m = findExactMethod(inv, cpg, INSTANCE_METHOD); } else { String className = inv.getClassName(cpg); String methodName = inv.getName(cpg); String methodSig = inv.getSignature(cpg); if (DEBUG_METHOD_LOOKUP) { System.out.println("[Class name is " + className + "]"); System.out.println("[Method name is " + methodName + "]"); System.out.println("[Method signature is " + methodSig + "]"); } if (opcode == Constants.INVOKEVIRTUAL || opcode == Constants.INVOKESTATIC) { if (DEBUG_METHOD_LOOKUP) { System.out.println("[invokevirtual or invokestatic]"); } // Dispatch where the class hierarchy is searched // Check superclasses MethodChooser methodChooser = (opcode == Constants.INVOKESTATIC) ? STATIC_METHOD : INSTANCE_METHOD; m = findMethod(Repository.lookupClass(className), methodName, methodSig, methodChooser); if (m == null) { if (DEBUG_METHOD_LOOKUP) { System.out.println("[not in class, checking superclasses...]"); } JavaClass[] superClassList = Repository.getSuperClasses(className); m = findMethod(superClassList, methodName, methodSig, methodChooser); } } else { // Check superinterfaces m = findMethod(Repository.lookupClass(className), methodName, methodSig, INSTANCE_METHOD); if (m == null) { JavaClass[] interfaceList = Repository.getInterfaces(className); m = findMethod(interfaceList, methodName, methodSig, INSTANCE_METHOD); } } } return m; } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/54eb4a3c2d9263ca3e96cc4b620f9b878e3d98bd/Hierarchy.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/ba/Hierarchy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
2985,
1104,
15846,
1305,
12,
10969,
11983,
2198,
16,
10551,
2864,
7642,
3283,
75,
13,
202,
3639,
1216,
10403,
288,
202,
202,
1305,
312,
273,
446,
31,
9506,
202,
430,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
2985,
1104,
15846,
1305,
12,
10969,
11983,
2198,
16,
10551,
2864,
7642,
3283,
75,
13,
202,
3639,
1216,
10403,
288,
202,
202,
1305,
312,
273,
446,
31,
9506,
202,
430,
261,
... |
((CDirectorySourceLocation)element).getAssociation().toOSString() : ""; | ((CDirectorySourceLocation)element).getAssociation().toOSString() : ""; | public Object getValue( Object element, String property ) { if ( element instanceof CDirectorySourceLocation && property.equals( CP_ASSOCIATION ) ) { return ( ((CDirectorySourceLocation)element).getAssociation() != null ) ? ((CDirectorySourceLocation)element).getAssociation().toOSString() : ""; } if ( element instanceof CDirectorySourceLocation && property.equals( CP_SEARCH_SUBFOLDERS ) ) { return ( ((CDirectorySourceLocation)element).searchSubfolders() ) ? new Integer( 0 ) : new Integer( 1 ); } return null; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/8cf78bf7d7d58a8ef513ca5ca4ad2bc990bb8665/SourceListDialogField.java/buggy/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceListDialogField.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
9944,
202,
482,
1033,
2366,
12,
1033,
930,
16,
514,
1272,
262,
25083,
202,
95,
6862,
1082,
202,
430,
261,
930,
1276,
385,
2853,
1830,
2735,
597,
1272,
18,
14963,
12,
5181,
67,
8423,
27248,
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,
9944,
202,
482,
1033,
2366,
12,
1033,
930,
16,
514,
1272,
262,
25083,
202,
95,
6862,
1082,
202,
430,
261,
930,
1276,
385,
2853,
1830,
2735,
597,
1272,
18,
14963,
12,
5181,
67,
8423,
27248,
2... |
markLabel(beyond); | cfw.markLabel(beyond); | private void visitCall(Node node, int type, Node child) { /* * Generate code for call. */ Node chelsea = child; // remember the first child for later OptFunctionNode target = (OptFunctionNode)node.getProp(Node.DIRECTCALL_PROP); if (target != null) { generateCodeFromNode(child, node); int regularCall = acquireLabel(); int directTargetIndex = target.getDirectTargetIndex(); addByteCode(ByteCode.ALOAD_0); classFile.add(ByteCode.GETFIELD, generatedClassName, MAIN_SCRIPT_FIELD, mainCodegen.generatedClassSignature); classFile.add(ByteCode.GETFIELD, mainCodegen.generatedClassName, getDirectTargetFieldName(directTargetIndex), classNameToSignature(target.getClassName())); short stackHeight = classFile.getStackTop(); addByteCode(ByteCode.DUP2); addByteCode(ByteCode.IF_ACMPNE, regularCall); addByteCode(ByteCode.SWAP); addByteCode(ByteCode.POP); if (!itsUseDynamicScope) { addByteCode(ByteCode.DUP); classFile.addInvoke(ByteCode.INVOKEINTERFACE, "org/mozilla/javascript/Scriptable", "getParentScope", "()Lorg/mozilla/javascript/Scriptable;"); } else { aload(variableObjectLocal); } aload(contextLocal); addByteCode(ByteCode.SWAP); if (type == Token.NEW) addByteCode(ByteCode.ACONST_NULL); else { child = child.getNext(); generateCodeFromNode(child, node); }/* Remember that directCall parameters are paired in 1 aReg and 1 dReg If the argument is an incoming arg, just pass the orginal pair thru. Else, if the argument is known to be typed 'Number', pass Void.TYPE in the aReg and the number is the dReg Else pass the JS object in the aReg and 0.0 in the dReg.*/ child = child.getNext(); while (child != null) { boolean handled = false; if ((child.getType() == Token.GETVAR) && inDirectCallFunction) { OptLocalVariable lVar = (OptLocalVariable)(child.getProp(Node.VARIABLE_PROP)); if (lVar != null && lVar.isParameter()) { handled = true; aload(lVar.getJRegister()); dload((short)(lVar.getJRegister() + 1)); } } if (!handled) { int childNumberFlag = child.getIntProp(Node.ISNUMBER_PROP, -1); if (childNumberFlag == Node.BOTH) { classFile.add(ByteCode.GETSTATIC, "java/lang/Void", "TYPE", "Ljava/lang/Class;"); generateCodeFromNode(child, node); } else { generateCodeFromNode(child, node); push(0.0); } } resetTargets(child); child = child.getNext(); } classFile.add(ByteCode.GETSTATIC, "org/mozilla/javascript/ScriptRuntime", "emptyArgs", "[Ljava/lang/Object;"); addVirtualInvoke(target.getClassName(), (type == Token.NEW) ? "constructDirect" : "callDirect", target.getDirectCallMethodSignature()); int beyond = acquireLabel(); addByteCode(ByteCode.GOTO, beyond); markLabel(regularCall, stackHeight); addByteCode(ByteCode.POP); visitRegularCall(node, type, chelsea, true); markLabel(beyond); } else { visitRegularCall(node, type, chelsea, false); } } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/bd2594e6ebd6d8099b587934641c8f7650d87761/Codegen.java/clean/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3757,
1477,
12,
907,
756,
16,
509,
618,
16,
2029,
1151,
13,
565,
288,
3639,
1748,
540,
380,
6654,
981,
364,
745,
18,
540,
1195,
3639,
2029,
462,
12107,
69,
273,
1151,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3757,
1477,
12,
907,
756,
16,
509,
618,
16,
2029,
1151,
13,
565,
288,
3639,
1748,
540,
380,
6654,
981,
364,
745,
18,
540,
1195,
3639,
2029,
462,
12107,
69,
273,
1151,
31,
1... |
print("Got " + a + " accounts (" + r + " automatically registered)."); | print("Got " + a + " accounts."); | public Gui() { initComponents(); try { accfile = System.getProperty("user.home", ".") + "/phonebook.xml"; client = new XmlRpcClientLite(InetAddress.getByName(Utils.COREHOST) .getHostName(), Utils.COREPORT); //XmlRpc.setDebug(true); server = new WebServer(Utils.GUIPORT, InetAddress .getByName(Utils.GUIHOST)); GuiStub guiStub = new GuiStub(this); server.start(); server.addHandler("gui", guiStub); // call REGISTER_GUI immediately after GUI has been opened params.clear(); params.addElement(Utils.GUIHOST); params.addElement(new Integer(Utils.GUIPORT)); Object o = execute("core.registerGui", params, 3000); if (o == null) { // --- something } else if (((String) o).equalsIgnoreCase("OK")) { print("GUI registered."); params.clear(); o = execute("core.accountGetAll", params); int a = 0; int r = 0; if (o != null && o instanceof Vector) { Vector v = (Vector) o; Enumeration e = v.elements(); while (e.hasMoreElements()) { Integer n = (Integer) e.nextElement(); ImageIcon img = new ImageIcon(cl .getResource("gui/resources/red.gif")); img.setDescription(n.toString()); list1.addElement(img); // list1.addElement("#" + n.toString() // + ": not registered"); Account acc = new Account(n.intValue(), false); accounts.add(acc); a++; params.clear(); params.add(n); params.add("autoregister"); String s = (String) execute("core.accountGet", params); if (s.equalsIgnoreCase("1")) { params.clear(); params.add(n); execute("core.register", params); r++; } } print("Got " + a + " accounts (" + r + " automatically registered)."); } } else { print("ERROR: GUI not registered."); } readPhonebook(); Enumeration e = phonebook.elements(); while (e.hasMoreElements()) { Contact con = (Contact) e.nextElement(); list3.addElement(con.name); } } catch (MalformedURLException e1) { e1.printStackTrace(); } catch (UnknownHostException e1) { e1.printStackTrace(); } } | 14260 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14260/b15bc9d650f9d97a34c4d9629336597aea45672e/Gui.java/buggy/trunk/gui/src/gui/Gui.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
611,
4881,
1435,
288,
3639,
1208,
7171,
5621,
3639,
775,
288,
5411,
4078,
768,
273,
2332,
18,
588,
1396,
2932,
1355,
18,
8712,
3113,
4585,
13,
397,
2206,
10540,
3618,
18,
2902,
1443... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
611,
4881,
1435,
288,
3639,
1208,
7171,
5621,
3639,
775,
288,
5411,
4078,
768,
273,
2332,
18,
588,
1396,
2932,
1355,
18,
8712,
3113,
4585,
13,
397,
2206,
10540,
3618,
18,
2902,
1443... |
textItemHandle.setContentType( DesignChoiceConstants.TEXT_CONTENT_TYPE_HTML ); | textItemHandle .setContentType( DesignChoiceConstants.TEXT_CONTENT_TYPE_HTML ); | public boolean preHandleMouseUp( ) { String type = (String) getRequest( ).getNewObjectType( ); String text = null; ModuleHandle reportHandle = SessionHandleAdapter.getInstance( ) .getReportDesignHandle( ); // TextItemHandle textItemHandle = SessionHandleAdapter.getInstance( // ) // .getReportDesignHandle( ) // .getElementFactory( ) // .newTextItem( null ); TextItemHandle textItemHandle = DesignElementFactory.getInstance( ) .newTextItem( null ); try { if ( IReportElementConstants.AUTOTEXT_PAGE.equalsIgnoreCase( type ) ) { text = AUTOTEXT_LABEL_PAGE + "<value-of>GlobalBirt.CurrentPage</value-of>"; //$NON-NLS-1$ } else if ( IReportElementConstants.AUTOTEXT_DATE.equalsIgnoreCase( type ) ) { text = "<value-of>new Date()</value-of>"; //$NON-NLS-1$ textItemHandle.setContentType( DesignChoiceConstants.TEXT_CONTENT_TYPE_HTML ); } else if ( IReportElementConstants.AUTOTEXT_CREATEDON.equalsIgnoreCase( type ) ) { text = AUTOTEXT_LABEL_CREATE_ON + "<value-of>new Date()</value-of>"; //$NON-NLS-1$ textItemHandle.setContentType( DesignChoiceConstants.TEXT_CONTENT_TYPE_HTML ); } else if ( IReportElementConstants.AUTOTEXT_CREATEDBY.equalsIgnoreCase( type ) ) { text = AUTOTEXT_LABEL_CREATE_BY; String author = reportHandle.getAuthor( ); if ( author != null ) { text += author; } else { String pluginVersion = (String) ReportPlugin.getDefault( ) .getBundle( ) .getHeaders( ) .get( org.osgi.framework.Constants.BUNDLE_VERSION ); text += DEFAULT_AUTHOR + " " //$NON-NLS-1$ + pluginVersion; } } else if ( IReportElementConstants.AUTOTEXT_FILENAME.equalsIgnoreCase( type ) ) { text = AUTOTEXT_LABEL_FILENAME + reportHandle.getFileName( ); } else if ( IReportElementConstants.AUTOTEXT_LASTPRINTED.equalsIgnoreCase( type ) ) { text = AUTOTEXT_LABEL_LAST_PRINTED + "<value-of>new Date()</value-of>"; //$NON-NLS-1$ textItemHandle.setContentType( DesignChoiceConstants.TEXT_CONTENT_TYPE_HTML ); } else if ( IReportElementConstants.AUTOTEXT_PAGEXOFY.equalsIgnoreCase( type ) ) { text = AUTOTEXT_LABEL_PAGE_X_OF_Y; } else if ( !IReportElementConstants.REPORT_ELEMENT_TEXT.equalsIgnoreCase( type ) ) { return false; } if ( text != null ) { textItemHandle.setContent( text ); } } catch ( SemanticException e ) { ExceptionHandler.handle( e ); } setModel( textItemHandle ); return super.preHandleMouseUp( ); } /* | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/4f0c26ca98ecbb792f2b5f93329f788413e6ba1a/BasePaletteFactory.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/palette/BasePaletteFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1250,
675,
3259,
9186,
1211,
12,
262,
202,
202,
95,
1082,
202,
780,
618,
273,
261,
780,
13,
4328,
12,
262,
18,
588,
1908,
17610,
12,
11272,
1082,
202,
780,
977,
273,
446,
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,
3196,
202,
482,
1250,
675,
3259,
9186,
1211,
12,
262,
202,
202,
95,
1082,
202,
780,
618,
273,
261,
780,
13,
4328,
12,
262,
18,
588,
1908,
17610,
12,
11272,
1082,
202,
780,
977,
273,
446,
3... |
configFilePath = args[0]; | Settings.setConfigFilePath(args[0]); | public static void main(String[] args) { String configFilePath = System.getProperty("user.home") + "/.davmail.properties"; if (args.length >= 1) { configFilePath = args[0]; } Settings.setConfigFilePath(configFilePath); Settings.load(); DavGatewayTray.init(); start(); } | 53722 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53722/505f93bf1c428069c2041e98918780100826e0cf/DavGateway.java/buggy/src/java/davmail/DavGateway.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
3639,
514,
642,
5598,
273,
2332,
18,
588,
1396,
2932,
1355,
18,
8712,
7923,
397,
2206,
18,
20752,
4408,
18,
4738,
14432,
3639,
309,
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,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
3639,
514,
642,
5598,
273,
2332,
18,
588,
1396,
2932,
1355,
18,
8712,
7923,
397,
2206,
18,
20752,
4408,
18,
4738,
14432,
3639,
309,
26... |
public org.quickfix.field.SecurityID getSecurityID() throws FieldNotFound { org.quickfix.field.SecurityID value = new org.quickfix.field.SecurityID(); | public quickfix.field.SecurityID getSecurityID() throws FieldNotFound { quickfix.field.SecurityID value = new quickfix.field.SecurityID(); | public org.quickfix.field.SecurityID getSecurityID() throws FieldNotFound { org.quickfix.field.SecurityID value = new org.quickfix.field.SecurityID(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/Email.java/clean/src/java/src/quickfix/fix42/Email.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
734,
19288,
734,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
734,
460,
273,
394,
2358,
18,
19525,
904,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
734,
19288,
734,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
734,
460,
273,
394,
2358,
18,
19525,
904,
18... |
Iterator patternsIterator = rules.keySet().iterator(); int max = 0; Pattern longestMatch = null; while (patternsIterator.hasNext()) { Pattern p = (Pattern) patternsIterator.next(); if ((p.size() > 1) && p.get(0).equals("*")) { int r = pattern.tailMatch(p); if (r > max) { max = r; longestMatch = p; } } } if (longestMatch != null) { return (ArrayList) rules.get(longestMatch); } else { return null; } | return null; | public List matchActions(Pattern pattern) { //System.out.println("pattern to search for:" + pattern + ", hashcode: " + pattern.hashCode()); //System.out.println("rules:" + rules); ArrayList a4p = (ArrayList) rules.get(pattern); if (a4p != null) { return a4p; } else { Iterator patternsIterator = rules.keySet().iterator(); int max = 0; Pattern longestMatch = null; while (patternsIterator.hasNext()) { Pattern p = (Pattern) patternsIterator.next(); if ((p.size() > 1) && p.get(0).equals("*")) { int r = pattern.tailMatch(p); //System.out.println("tailMatch " +r); if (r > max) { //System.out.println("New longest match "+p); max = r; longestMatch = p; } } } if (longestMatch != null) { return (ArrayList) rules.get(longestMatch); } else { return null; } } } | 47410 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47410/d3806b8259a72fed9836fbf64e5ec69286d504ac/SimpleRuleStore.java/clean/logback-core/src/main/java/ch/qos/logback/core/joran/spi/SimpleRuleStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
987,
845,
6100,
12,
3234,
1936,
13,
288,
565,
368,
3163,
18,
659,
18,
8222,
2932,
4951,
358,
1623,
364,
2773,
397,
1936,
397,
3104,
31539,
30,
315,
397,
1936,
18,
2816,
1085,
1066... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
845,
6100,
12,
3234,
1936,
13,
288,
565,
368,
3163,
18,
659,
18,
8222,
2932,
4951,
358,
1623,
364,
2773,
397,
1936,
397,
3104,
31539,
30,
315,
397,
1936,
18,
2816,
1085,
1066... |
public User getUser(String username) throws UserNotFoundException { if (username == null) { throw new UserNotFoundException("Username with null value is not valid."); } username = NodePrep.prep(username); User user = (User)userCache.get(username); if (user == null) { user = loadUser(username); } else { user = (User)userCache.get(username); } if (user == null) { throw new UserNotFoundException(); } return user; } | 51636 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51636/404616e01d15188efcb96550a8a684aefe038698/UserManagerImpl.java/clean/src/java/org/jivesoftware/messenger/user/spi/UserManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1299,
588,
1299,
12,
780,
5053,
13,
15069,
1299,
3990,
95,
430,
12,
5053,
631,
2011,
15329,
12849,
2704,
1299,
3990,
2932,
8575,
1918,
2011,
1132,
291,
902,
877,
1199,
1769,
97,
5053,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1299,
588,
1299,
12,
780,
5053,
13,
15069,
1299,
3990,
95,
430,
12,
5053,
631,
2011,
15329,
12849,
2704,
1299,
3990,
2932,
8575,
1918,
2011,
1132,
291,
902,
877,
1199,
1769,
97,
5053,
33... | ||
System.exit(0); } | System.exit(0); } | public void windowClosing(WindowEvent e) { System.exit(0); } | 13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/b0fa2f56cd2dcc90452b768e6b38187cfb8c30eb/AddressBook.java/clean/grendel/addressbook/AddressBook.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
2742,
15745,
12,
3829,
1133,
425,
13,
288,
5411,
2332,
18,
8593,
12,
20,
1769,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
2742,
15745,
12,
3829,
1133,
425,
13,
288,
5411,
2332,
18,
8593,
12,
20,
1769,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.