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 void widgetSelected(SelectionEvent e) { boolean custom= fBackgroundCustomRadioButton.getSelection(); fBackgroundColorButton.setEnabled(custom); getOverlayStore().setValue(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, !custom); | public void widgetSelected(SelectionEvent e) { HighlightingColorListItem item= getHighlightingColorListItem(); getOverlayStore().setValue(item.getBoldKey(), fBoldCheckBox.getSelection()); | public void widgetSelected(SelectionEvent e) { boolean custom= fBackgroundCustomRadioButton.getSelection(); fBackgroundColorButton.setEnabled(custom); getOverlayStore().setValue(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, !custom); } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/0a6dc3da2e4f6cacc956effd5590fc0bfc53a105/MakefileEditorPreferencePage.java/buggy/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/MakefileEditorPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
3604,
7416,
12,
6233,
1133,
425,
13,
288,
6862,
9506,
202,
6494,
1679,
33,
284,
8199,
3802,
19984,
3616,
18,
588,
6233,
5621,
9506,
202,
74,
21699,
3616,
18,
542,
1526,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3604,
7416,
12,
6233,
1133,
425,
13,
288,
6862,
9506,
202,
6494,
1679,
33,
284,
8199,
3802,
19984,
3616,
18,
588,
6233,
5621,
9506,
202,
74,
21699,
3616,
18,
542,
1526,
... |
if (src instanceof String) { | if (src instanceof byte[]) { sourceDoc = new StreamSource(new ByteArrayInputStream((byte[])src)); } else if (src instanceof String) { | public Object doTransform(Object src, String encoding) throws TransformerException { try { DocumentSource sourceDoc = null; DocumentResult resultDoc = new DocumentResult(); DefaultErrorListener errorListener = null; if(src instanceof byte[]) { src = new String((byte[])src); } if (src instanceof String) { String xml = (String) src; Document dom4jDoc = DocumentHelper.parseText(xml); sourceDoc = new DocumentSource(dom4jDoc); } else if (src instanceof DocumentSource) { sourceDoc = (DocumentSource) src; } else if (src instanceof Document) { sourceDoc = new DocumentSource((Document) src); } errorListener = new DefaultErrorListener(this); transformer.setErrorListener(errorListener); transformer.transform(sourceDoc, resultDoc); if(errorListener.isError()) { throw errorListener.getException(); } if (Document.class.equals(returnClass)) { return resultDoc.getDocument(); } else { Document transformedDoc = resultDoc.getDocument(); return transformedDoc.asXML(); } } catch (Exception e) { throw new TransformerException(this, e); } } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/22b3f2b0c3c9d6164f7fbdb18eca36fcf3d4dd43/XsltTransformer.java/buggy/src/java/org/mule/transformers/xml/XsltTransformer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
741,
4059,
12,
921,
1705,
16,
514,
2688,
13,
1216,
21684,
288,
3639,
775,
288,
5411,
4319,
1830,
1084,
1759,
273,
446,
31,
5411,
4319,
1253,
563,
1759,
273,
394,
4319,
1253,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
741,
4059,
12,
921,
1705,
16,
514,
2688,
13,
1216,
21684,
288,
3639,
775,
288,
5411,
4319,
1830,
1084,
1759,
273,
446,
31,
5411,
4319,
1253,
563,
1759,
273,
394,
4319,
1253,
... |
super(arguments); | super(arguments, outStream); | public TestableCommandlineParser(String[] arguments) { super(arguments); } | 47619 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47619/f321a7dc6c9f0229cc5266d9c2923a04a755be60/TestCommandlineParser.java/clean/test/org/jruby/test/TestCommandlineParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
7766,
429,
2189,
1369,
2678,
12,
780,
8526,
1775,
13,
288,
1850,
2240,
12,
7099,
16,
28997,
1769,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
7766,
429,
2189,
1369,
2678,
12,
780,
8526,
1775,
13,
288,
1850,
2240,
12,
7099,
16,
28997,
1769,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
public synchronized void addInputMethodListener(InputMethodListener l) | public synchronized void addInputMethodListener(InputMethodListener listener) | public synchronized void addInputMethodListener(InputMethodListener l) { inputMethodListener = AWTEventMulticaster.add(inputMethodListener, l); if (inputMethodListener != null) enableEvents(AWTEvent.INPUT_METHOD_EVENT_MASK); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cdb624bf4a3742cc4374523f5c6856a06dcd8f92/Component.java/clean/core/src/classpath/java/java/awt/Component.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3852,
918,
527,
1210,
1305,
2223,
12,
1210,
1305,
2223,
2991,
13,
225,
288,
202,
202,
2630,
1305,
2223,
273,
432,
8588,
1133,
5049,
335,
2440,
18,
1289,
12,
2630,
1305,
2223,
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,
282,
1071,
3852,
918,
527,
1210,
1305,
2223,
12,
1210,
1305,
2223,
2991,
13,
225,
288,
202,
202,
2630,
1305,
2223,
273,
432,
8588,
1133,
5049,
335,
2440,
18,
1289,
12,
2630,
1305,
2223,
16,
... |
assertFalse(messageManager.isMessageReadForUser("joesmith", new Long(1), new Long(2))); messageManager.markMessageReadForUser("joesmith", new Long(1), new Long(2)); assertTrue(messageManager.isMessageReadForUser("joesmith", new Long(1), new Long(2))); messageManager.deleteUnreadStatus("joesmith", new Long(1), new Long(2)); | assertFalse(messageManager.isMessageReadForUser(new Long(1), new Long(2))); messageManager.markMessageReadForUser(new Long(1), new Long(2), true); assertTrue(messageManager.isMessageReadForUser(new Long(1), new Long(2))); messageManager.deleteUnreadStatus(new Long(1), new Long(2)); | public void testIsMessageReadForUser() { assertFalse(messageManager.isMessageReadForUser("joesmith", new Long(1), new Long(2))); messageManager.markMessageReadForUser("joesmith", new Long(1), new Long(2)); assertTrue(messageManager.isMessageReadForUser("joesmith", new Long(1), new Long(2))); messageManager.deleteUnreadStatus("joesmith", new Long(1), new Long(2)); } | 2021 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2021/91201e6a73a0f8b585c781bf4a7ca98b97854847/MessageForumsTests.java/buggy/msgcntr/messageforums-component-shared/test/org/sakaiproject/component/app/messageforums/MessageForumsTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2520,
1079,
1994,
19894,
1435,
288,
3639,
1815,
8381,
12,
2150,
1318,
18,
291,
1079,
1994,
19894,
2932,
30952,
281,
81,
483,
3113,
394,
3407,
12,
21,
3631,
394,
3407,
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,
1842,
2520,
1079,
1994,
19894,
1435,
288,
3639,
1815,
8381,
12,
2150,
1318,
18,
291,
1079,
1994,
19894,
2932,
30952,
281,
81,
483,
3113,
394,
3407,
12,
21,
3631,
394,
3407,
12,... |
int acc = getClassFile2().getAccessFlags(); | ClassFile cf = getClassFile2(); int acc = cf.getAccessFlags(); | public int getModifiers() { int acc = getClassFile2().getAccessFlags(); acc = AccessFlag.clear(acc, AccessFlag.SUPER); return AccessFlag.toModifier(acc); } | 11369 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11369/ad7d5a92142d2e0e877f34495d2fb08357c9a9e9/CtClassType.java/clean/src/main/javassist/CtClassType.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
18023,
1435,
288,
3639,
30614,
6080,
273,
2900,
812,
22,
5621,
509,
4078,
273,
6080,
18,
588,
1862,
5094,
5621,
3639,
4078,
273,
5016,
4678,
18,
8507,
12,
8981,
16,
5016,
4678,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
18023,
1435,
288,
3639,
30614,
6080,
273,
2900,
812,
22,
5621,
509,
4078,
273,
6080,
18,
588,
1862,
5094,
5621,
3639,
4078,
273,
5016,
4678,
18,
8507,
12,
8981,
16,
5016,
4678,... |
if(connector.isQueueEvents()) { BoundedPersistentQueue queue = connector.createQueue(endpointUri.getAddress()); queue.put(event); | if (connector.isQueueEvents()) { QueueSession session = connector.getQueueSession(); Queue queue = session.getQueue(endpointUri.getAddress()); queue.put(event); | public void doDispatch(UMOEvent event) throws Exception { UMOEndpointURI endpointUri = event.getEndpoint().getEndpointURI(); if(endpointUri==null) { throw new DispatchException(new Message(Messages.X_IS_NULL, "Endpoint"), event.getMessage(), event.getEndpoint()); } if(connector.isQueueEvents()) { BoundedPersistentQueue queue = connector.createQueue(endpointUri.getAddress()); queue.put(event); } else { VMMessageReceiver receiver = connector.getReceiver(event.getEndpoint().getEndpointURI()); if(receiver==null) { logger.warn("No receiver for endpointUri: " + event.getEndpoint().getEndpointURI()); return; } receiver.onEvent(event); } logger.debug("dispatched Event on endpointUri: " + endpointUri); } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/78dbd5bd84c22fb5305dc4943325206dc111183b/VMMessageDispatcher.java/clean/providers/vm/src/java/org/mule/providers/vm/VMMessageDispatcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
5325,
12,
2799,
51,
1133,
871,
13,
1216,
1185,
565,
288,
3639,
587,
5980,
3293,
3098,
2494,
3006,
273,
871,
18,
588,
3293,
7675,
588,
3293,
3098,
5621,
3639,
309,
12,
80... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
5325,
12,
2799,
51,
1133,
871,
13,
1216,
1185,
565,
288,
3639,
587,
5980,
3293,
3098,
2494,
3006,
273,
871,
18,
588,
3293,
7675,
588,
3293,
3098,
5621,
3639,
309,
12,
80... |
updateLocation(); | public void caretUpdate( CaretEvent ce ) { _model.getActiveDocument(). syncCurrentLocationWithDefinitions(ce.getDot()); //updateLocation(); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/670f6a3249531754b5a506ef8dd3eec3089b7300/MainFrame.java/buggy/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1089,
2735,
5621,
1089,
2735,
5621,
1089,
2735,
5621,
1089,
2735,
5621,
1071,
2725,
2735,
5621,
918,
2725,
2735,
5621,
21683,
1891,
12,
2725,
2735,
5621,
385,
20731,
1133,
2725,
2735,
5621,
5898,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1089,
2735,
5621,
1089,
2735,
5621,
1089,
2735,
5621,
1089,
2735,
5621,
1071,
2725,
2735,
5621,
918,
2725,
2735,
5621,
21683,
1891,
12,
2725,
2735,
5621,
385,
20731,
1133,
2725,
2735,
5621,
5898,
... | |
if (true /* || fs.hasSelectors() || (fs.hasPatterns() && fs.createPatternSet() != null && (fs.createPatternSet().createInclude() != null && fs.createPatternSet().createExclude() != null && (fs.createPatternSet().getIncludePatterns(project) != null || fs.createPatternSet().getExcludePatterns( project) != null)))*/ ) { if (fs.getEmbed()) { | if (fs.getEmbed()) { continue; } ds = fs.getDirectoryScanner(project); dirs = ds.getIncludedDirectories(); for (int j = 0; j < dirs.length; j++) { File[] jars = fs.findJars(dirs[j]); if (jars == null || jars.length == 0) { log( "No Jars in " + dirs[j] + ", ignoring.", Project.MSG_VERBOSE); | protected String buildFrameworkPaths() { StringBuffer buf = new StringBuffer(); List frameworkSets = getApplicatonTask().getFrameworkSets(); Project project = task.getProject(); // track included jar files to avoid double entries Vector jarSet = new Vector(); for (int i = 0; i < frameworkSets.size(); i++) { FrameworkSet fs = null; DirectoryScanner ds = null; String[] dirs = null; try { fs = (FrameworkSet) frameworkSets.get(i); // Don't bother checking if it's embedded. if (!fs.isReference()) { log( "fs.createPatternSet().getIncludePatterns(project) " + fs.createPatternSet().getIncludePatterns(project), Project.MSG_VERBOSE); log( "fs.createPatternSet().getExcludePatterns(project) " + fs.createPatternSet().getExcludePatterns(project), Project.MSG_VERBOSE); } if (true /* || fs.hasSelectors() || (fs.hasPatterns() && fs.createPatternSet() != null && (fs.createPatternSet().createInclude() != null && fs.createPatternSet().createExclude() != null && (fs.createPatternSet().getIncludePatterns(project) != null || fs.createPatternSet().getExcludePatterns( project) != null)))*/ ) { if (fs.getEmbed()) { continue; } ds = fs.getDirectoryScanner(project); dirs = ds.getIncludedDirectories(); for (int j = 0; j < dirs.length; j++) { File[] jars = fs.findJars(dirs[j]); if (jars == null || jars.length == 0) { log( "No Jars in " + dirs[j] + ", ignoring.", Project.MSG_VERBOSE); continue; } int jsize = jars.length; for (int k = 0; k < jsize; k++) { if (!jarSet.contains(jars[k])) jarSet.add(jars[k]); } } } } catch (Exception anException) { // directory doesn't exist or is not readable log(anException.getMessage(), Project.MSG_WARN); } finally { fs = null; ds = null; dirs = null; } } File aFile = null; try { for (int i = 0; i < jarSet.size(); i++) { aFile = (File) jarSet.elementAt(i); log(": Framework JAR " + aFile, Project.MSG_VERBOSE); buf .append( this .getApplicatonTask() .getWOEnvironment() .getWOVariables() .encodePathForFile( aFile)) .append("\r\n"); } return buf.toString(); } catch (Exception anException) { // directory doesn't exist or is not readable log(anException.getMessage(), Project.MSG_WARN); } finally { aFile = null; } return ""; } | 50596 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50596/17f4b2985be1f5506df03fa7b673ed9115c3757e/AppFormat.java/clean/projects/woproject/src/java/org/objectstyle/woproject/ant/AppFormat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
514,
1361,
13701,
4466,
1435,
288,
202,
202,
780,
1892,
1681,
273,
394,
6674,
5621,
202,
202,
682,
8257,
2785,
273,
336,
1294,
1780,
16799,
2174,
7675,
588,
13701,
2785,
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,
225,
202,
1117,
514,
1361,
13701,
4466,
1435,
288,
202,
202,
780,
1892,
1681,
273,
394,
6674,
5621,
202,
202,
682,
8257,
2785,
273,
336,
1294,
1780,
16799,
2174,
7675,
588,
13701,
2785,
5621,
... |
System.err.println("Thread account oddity: " +this+ " thread count is " + runningThreadCount); | if (getTreeNode().getParent() == null || CougaarThread.Debug) System.err.println("Thread account oddity: " +this+ " thread count is " + runningThreadCount); | synchronized void decrementRunCount(Scheduler consumer) { --runningThreadCount; if (runningThreadCount < 0) { System.err.println("Thread account oddity: " +this+ " thread count is " + runningThreadCount); } listenerProxy.notifyRightReturned(consumer); } | 7981 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7981/0277ee4b1dbeb185e9f1a4d5597e1fa1ea36250a/Scheduler.java/buggy/core/src/org/cougaar/core/thread/Scheduler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3852,
918,
15267,
1997,
1380,
12,
11870,
4765,
13,
288,
202,
413,
8704,
3830,
1380,
31,
202,
430,
261,
8704,
3830,
1380,
411,
374,
13,
288,
202,
565,
2332,
18,
370,
18,
8222,
2932,
3830... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3852,
918,
15267,
1997,
1380,
12,
11870,
4765,
13,
288,
202,
413,
8704,
3830,
1380,
31,
202,
430,
261,
8704,
3830,
1380,
411,
374,
13,
288,
202,
565,
2332,
18,
370,
18,
8222,
2932,
3830... |
newExpression = createCollectionIterationText(forStatement, project); | newExpression = createCollectionIterationText(forStatement ); | public void doFix(Project project, ProblemDescriptor descriptor) throws IncorrectOperationException{ final PsiElement forElement = descriptor.getPsiElement(); if(!(forElement.getParent() instanceof PsiForStatement)){ return; } final PsiForStatement forStatement = (PsiForStatement) forElement.getParent(); final String newExpression; if(isArrayLoopStatement(forStatement)){ newExpression = createArrayIterationText(forStatement, project); } else if(isCollectionLoopStatement(forStatement)){ newExpression = createCollectionIterationText(forStatement, project); } else if(isIndexedListLoopStatement(forStatement)){ newExpression = createListIterationText(forStatement, project); } else{ return; } replaceStatementAndShortenClassNames(forStatement, newExpression); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/8629082a2f885120180c8da4e7204776468af6a2/ForCanBeForeachInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/jdk15/ForCanBeForeachInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
741,
8585,
12,
4109,
1984,
16,
21685,
3187,
4950,
13,
7734,
1216,
657,
6746,
10602,
95,
5411,
727,
453,
7722,
1046,
364,
1046,
273,
4950,
18,
588,
52,
7722,
1046,
5621,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
741,
8585,
12,
4109,
1984,
16,
21685,
3187,
4950,
13,
7734,
1216,
657,
6746,
10602,
95,
5411,
727,
453,
7722,
1046,
364,
1046,
273,
4950,
18,
588,
52,
7722,
1046,
5621,
5411,
... |
if(!updatesPending()) { | if (!updatesPending()) { | void listenerRemoved(ILabelProviderListener listener) { if(updatesPending()){//Only keep track of them if there are updates pending removedListeners.add(listener); } if(!updatesPending()) { removedListeners.remove(listener); } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/b543fc145c42526ff99e6c17d4baec8b9a5cf3e0/DecorationScheduler.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecorationScheduler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
2991,
10026,
12,
45,
2224,
2249,
2223,
2991,
13,
288,
202,
202,
430,
12,
14703,
8579,
10756,
95,
759,
3386,
3455,
3298,
434,
2182,
309,
1915,
854,
4533,
4634,
1082,
202,
14923,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2991,
10026,
12,
45,
2224,
2249,
2223,
2991,
13,
288,
202,
202,
430,
12,
14703,
8579,
10756,
95,
759,
3386,
3455,
3298,
434,
2182,
309,
1915,
854,
4533,
4634,
1082,
202,
14923,... |
private void fireHandleEvent(int iType) { for (int iL = 0; iL < vListeners.size(); iL++) { Event se = new Event(); se.widget = this; se.data = (fCurrent != null) ? fCurrent : ColorDefinitionImpl.TRANSPARENT(); se.type = iType; ((Listener) vListeners.get(iL)).handleEvent(se); } } | private void fireHandleEvent(int iType) { for (int iL = 0; iL < vListeners.size(); iL++) { Event se = new Event(); se.widget = this; se.data = (fCurrent != null) ? fCurrent : ColorDefinitionImpl .TRANSPARENT(); se.type = iType; ((Listener) vListeners.get(iL)).handleEvent(se); } } | private void fireHandleEvent(int iType) { for (int iL = 0; iL < vListeners.size(); iL++) { Event se = new Event(); se.widget = this; se.data = (fCurrent != null) ? fCurrent : ColorDefinitionImpl.TRANSPARENT(); se.type = iType; ((Listener) vListeners.get(iL)).handleEvent(se); } } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/a913ff8af0f2b5b295b22dbb8880b014d596b568/FillChooserComposite.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/FillChooserComposite.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4452,
3259,
1133,
12,
474,
277,
559,
13,
565,
288,
3639,
364,
261,
474,
277,
48,
273,
374,
31,
277,
48,
411,
331,
5583,
18,
1467,
5621,
277,
48,
27245,
3639,
288,
5411,
258... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4452,
3259,
1133,
12,
474,
277,
559,
13,
565,
288,
3639,
364,
261,
474,
277,
48,
273,
374,
31,
277,
48,
411,
331,
5583,
18,
1467,
5621,
277,
48,
27245,
3639,
288,
5411,
258... |
private void checkNative(int resultLimit, int rowCount, String mdx) { | private void checkNative( int resultLimit, int rowCount, String mdx, boolean checkCaching) { | private void checkNative(int resultLimit, int rowCount, String mdx) { // Don't run the test if we're testing expression dependencies. // Expression dependencies cause spurious interval calls to // 'level.getMembers()' which create false negatives in this test. if (MondrianProperties.instance().TestExpDependencies.get() > 0) { return; } CachePool.instance().flush(); try { logger.debug("*** Native: " + mdx); Connection con = getConnection(true); RolapNativeRegistry reg = getRegistry(con); reg.useHardCache(true); TestListener listener = new TestListener(); reg.setListener(listener); reg.setEnabled(true); TestCase c = new TestCase(con, resultLimit, rowCount, mdx); Result r1 = c.run(); String s1 = toString(r1); if (!listener.isFoundEvaluator()) { fail("expected native execution of " + mdx); } if (!listener.isExcecuteSql()) { fail("cache is empty: expected SQL query to be executed"); } // run once more to make sure that the result comes from cache now listener.setExcecuteSql(false); c.run(); if (listener.isExcecuteSql()) { fail("expected result from cache when query runs twice"); } con.close(); logger.debug("*** Interpreter: " + mdx); CachePool.instance().flush(); con = getConnection(true); reg = getRegistry(con); listener.setFoundEvaluator(false); reg.setListener(listener); // disable RolapNativeSet reg.setEnabled(false); Result r2 = executeQuery(mdx, con); String s2 = toString(r2); if (listener.isFoundEvaluator()) { fail("did not expect native executions of " + mdx); } if (!s1.equals(s2)) { StringBuffer sb = new StringBuffer(); sb.append("Result differs"); sb.append("\n\nMDX:\n").append(mdx); sb.append("\n\nNative Implementation returned:\n"); sb.append(s1); sb.append("\n\nInterpreter returned:\n"); sb.append(s2); fail(sb.toString()); } } finally { Connection con = getConnection(); RolapNativeRegistry reg = getRegistry(con); reg.setEnabled(true); reg.useHardCache(false); } } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/e4fb77b7d220797c199527f3d792d8a841e37a77/NonEmptyTest.java/clean/testsrc/main/mondrian/rolap/NonEmptyTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
9220,
12,
509,
563,
3039,
16,
509,
14888,
16,
514,
3481,
92,
16,
1250,
866,
17712,
13,
288,
3639,
368,
7615,
1404,
1086,
326,
1842,
309,
732,
4565,
7769,
2652,
5030,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
9220,
12,
509,
563,
3039,
16,
509,
14888,
16,
514,
3481,
92,
16,
1250,
866,
17712,
13,
288,
3639,
368,
7615,
1404,
1086,
326,
1842,
309,
732,
4565,
7769,
2652,
5030,
18,... |
if (!name.equals(ROOT_COLLECTION)) collectionsCache.remove(collection); | public boolean removeCollection(Collection collection) throws PermissionDeniedException { if (readOnly) throw new PermissionDeniedException(DATABASE_IS_READ_ONLY); if (!collection.getPermissions().validate(user, Permission.WRITE)) throw new PermissionDeniedException("not allowed to remove collection"); final CollectionCache collectionsCache = pool.getCollectionsCache(); synchronized(collectionsCache) { String name = collection.getName(); // remove from parent collection Collection parent = openCollection(collection.getParentPath(), Lock.WRITE_LOCK); if (parent != null) { try { parent.removeCollection(name.substring(name.lastIndexOf("/") + 1)); saveCollection(parent); } catch (LockException e) { LOG.warn("LockException while removing collection " + name); } finally { parent.getLock().release(); } } // remove child collections String childName; Collection childCollection; LOG.debug("removing sub-collections"); for (Iterator i = collection.collectionIterator(); i.hasNext();) { childName = (String) i.next(); childCollection = openCollection(name + '/' + childName, Lock.WRITE_LOCK); try { removeCollection(childCollection); } finally { childCollection.getLock().release(); } } Lock lock = collectionsDb.getLock(); try { lock.acquire(Lock.WRITE_LOCK); // if this is not the root collection remove it completely if (name.equals(ROOT_COLLECTION)) saveCollection(collection); else { Value key; try { key = new Value(name.getBytes("UTF-8")); } catch (UnsupportedEncodingException uee) { key = new Value(name.getBytes()); } collectionsDb.remove(key); } if (!name.equals(ROOT_COLLECTION)) collectionsCache.remove(collection); } catch (LockException e) { LOG.warn("Failed to acquire lock on collections.dbx"); } catch (ReadOnlyException e) { throw new PermissionDeniedException(DATABASE_IS_READ_ONLY); } finally { lock.release(); } freeCollection(collection.getId()); textEngine.dropIndex(collection); elementIndex.dropIndex(collection); LOG.debug("removing resources ..."); for (Iterator i = collection.iterator(this); i.hasNext();) { final DocumentImpl doc = (DocumentImpl) i.next(); LOG.debug("removing document " + doc.getFileName()); new DOMTransaction(this, domDb, Lock.WRITE_LOCK) { public Object start() { if(doc.getResourceType() == DocumentImpl.BINARY_FILE) { domDb.remove(doc.getAddress()); domDb.removeOverflowValue(((BinaryDocument)doc).getPage()); } else { NodeImpl node = (NodeImpl)doc.getFirstChild(); domDb.removeAll(node.getInternalAddress()); } return null; } } .run(); new DOMTransaction(this, domDb, Lock.WRITE_LOCK) { public Object start() { try { Value ref = new NodeRef(doc.getDocId()); IndexQuery query = new IndexQuery(IndexQuery.TRUNC_RIGHT, ref); domDb.remove(query, null); domDb.flush(); } catch (BTreeException e) { LOG.warn("btree error while removing document", e); } catch (DBException e) { LOG.warn("db error while removing document", e); } catch (IOException e) { LOG.warn("io error while removing document", e); } catch (TerminatedException e) { LOG.warn("method terminated", e); } return null; } } .run(); freeDocument(doc.getDocId()); } return true; } } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/9b56c80fe6e21f4915d0b663ca9c9ce76f64dec2/NativeBroker.java/clean/src/org/exist/storage/NativeBroker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1206,
2532,
12,
2532,
1849,
13,
1216,
8509,
15877,
288,
202,
565,
309,
261,
896,
3386,
13,
202,
3639,
604,
394,
8509,
15877,
12,
22366,
67,
5127,
67,
6949,
67,
10857,
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,
482,
1250,
1206,
2532,
12,
2532,
1849,
13,
1216,
8509,
15877,
288,
202,
565,
309,
261,
896,
3386,
13,
202,
3639,
604,
394,
8509,
15877,
12,
22366,
67,
5127,
67,
6949,
67,
10857,
17... | |
Label label = new Label(composite, SWT.NONE); label.setText(TaskListMessages.TaskProp_priority); label.setFont(font); | private void createPriorityAndStatusArea(Composite parent) { Font font = parent.getFont(); Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3; composite.setLayout(layout); Label label = new Label(composite, SWT.NONE); label.setText(TaskListMessages.TaskProp_priority); label.setFont(font); priorityCombo = new Combo(composite, SWT.READ_ONLY); priorityCombo.setItems(new String[] { TaskListMessages.TaskList_high, TaskListMessages.TaskList_normal, TaskListMessages.TaskList_low }); // Prevent Esc and Return from closing the dialog when the combo is active. priorityCombo.addTraverseListener(new TraverseListener() { public void keyTraversed(TraverseEvent e) { if (e.detail == SWT.TRAVERSE_ESCAPE || e.detail == SWT.TRAVERSE_RETURN) { e.doit = false; } } }); priorityCombo.setFont(font); completedCheckbox = new Button(composite, SWT.CHECK); completedCheckbox.setText(TaskListMessages.TaskProp_completed); GridData gridData = new GridData(); gridData.horizontalIndent = convertHorizontalDLUsToPixels(20); completedCheckbox.setLayoutData(gridData); completedCheckbox.setFont(font); if (!isEditable()) { priorityCombo.setEnabled(false); completedCheckbox.setEnabled(false); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/c0808721af02f0ecee38c2df86e12ba5bfc3ce30/TaskPropertiesDialog.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/TaskPropertiesDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
752,
8183,
1876,
1482,
5484,
12,
9400,
982,
13,
288,
3639,
10063,
3512,
273,
982,
18,
588,
5711,
5621,
3639,
14728,
9635,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
9826,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
752,
8183,
1876,
1482,
5484,
12,
9400,
982,
13,
288,
3639,
10063,
3512,
273,
982,
18,
588,
5711,
5621,
3639,
14728,
9635,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
9826,
... | |
public boolean readBoolean() throws IOException { Object obj = vec.elementAt(ptr++); return (((Boolean)obj).booleanValue()); } | public boolean readBoolean() throws IOException { Object obj = vec.elementAt(ptr++); return ((Boolean) obj).booleanValue(); } | public boolean readBoolean() throws IOException { Object obj = vec.elementAt(ptr++); return (((Boolean)obj).booleanValue());} | 1043 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1043/84d120cc49d42a79bfbc68fe36429395bdef90fd/UnicastRemoteCall.java/clean/libjava/gnu/java/rmi/server/UnicastRemoteCall.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1250,
855,
5507,
1435,
1216,
1860,
288,
202,
921,
1081,
273,
7062,
18,
2956,
861,
12,
6723,
9904,
1769,
202,
2463,
261,
12443,
5507,
13,
2603,
2934,
6494,
620,
10663,
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,
1071,
1250,
855,
5507,
1435,
1216,
1860,
288,
202,
921,
1081,
273,
7062,
18,
2956,
861,
12,
6723,
9904,
1769,
202,
2463,
261,
12443,
5507,
13,
2603,
2934,
6494,
620,
10663,
97,
2,
-100,
-100,
... |
InputStream inputData = null; | public boolean performFinish( ) { final IPath locPath = newReportFileWizardPage.getFileLocationFullPath( ); String fn = newReportFileWizardPage.getFileName( ); final String fileName; if ( !fn.endsWith( ".rptdesign" ) ) //$NON-NLS-1$ { fileName = fn + ".rptdesign"; //$NON-NLS-1$ } else { fileName = fn; } InputStream inputData = null; String cheatSheetIdFromPage = "";//$NON-NLS-1$ boolean showCheatSheetFromPage = false; URL url = Platform.find( Platform.getBundle( ReportPlugin.REPORT_UI ), new Path( templateChoicePage.getTemplate( ).getReportFullName( ))); if ( url != null ) { try { inputData = url.openStream( ); } catch ( IOException e1 ) { return false; } } else { File file = new File( templateChoicePage.getTemplate( ) .getReportFullName( ) ); if ( file.exists( ) ) { try { inputData = new FileInputStream( file ); } catch ( FileNotFoundException e ) { return false; } } } cheatSheetIdFromPage = templateChoicePage.getTemplate( ) .getCheatSheetId( ); showCheatSheetFromPage = templateChoicePage.getShowCheatSheet( ); final InputStream stream = inputData; final String cheatSheetId = cheatSheetIdFromPage; final boolean showCheatSheet = showCheatSheetFromPage; IRunnableWithProgress op = new IRunnableWithProgress( ) { public void run( IProgressMonitor monitor ) { try { doFinish( locPath, fileName, stream, cheatSheetId, showCheatSheet, monitor ); } finally { monitor.done( ); } } }; try { getContainer( ).run( true, false, op ); } catch ( InterruptedException e ) { return false; } catch ( InvocationTargetException e ) { Throwable realException = e.getTargetException( ); ExceptionHandler.handle( realException ); return false; } return true; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/76ebe408a984f02b49cbaf1597c0c7a0213901fe/NewReportWizard.java/buggy/UI/org.eclipse.birt.report.designer.ui.rcp/src/org/eclipse/birt/report/designer/ui/internal/rcp/wizards/NewReportWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3073,
11641,
12,
262,
202,
95,
202,
202,
6385,
467,
743,
1515,
743,
273,
394,
4820,
812,
27130,
1964,
18,
29925,
2735,
24173,
12,
11272,
202,
202,
780,
2295,
273,
394,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3073,
11641,
12,
262,
202,
95,
202,
202,
6385,
467,
743,
1515,
743,
273,
394,
4820,
812,
27130,
1964,
18,
29925,
2735,
24173,
12,
11272,
202,
202,
780,
2295,
273,
394,
4... | |
public boolean isEquivalentTo(QName aElement, QName exemplar) throws Exception{ if (aElement.localpart==exemplar.localpart && aElement.uri==exemplar.uri ) { return true; | public boolean isEquivalentTo(QName anElement, QName exemplar) throws Exception{ if (anElement.localpart==exemplar.localpart && anElement.uri==exemplar.uri ) { return true; | public boolean isEquivalentTo(QName aElement, QName exemplar) throws Exception{ if (aElement.localpart==exemplar.localpart && aElement.uri==exemplar.uri ) { return true; } if (fGrammarResolver == null || fStringPool == null) { throw new SAXException("Try to check substitutionGroup against a substitutionGroup, but no GrammarResolver is defined"); } int count = 16; // 16 is the limit of times for which we'll check the substitutionGroup transitively. int uriIndex = aElement.uri; int localpartIndex = aElement.localpart; String uri = fStringPool.toString(aElement.uri); String localpart = fStringPool.toString(aElement.localpart); while (count >= 0) { if(uri==null) { return false; } SchemaGrammar sGrammar = null; try { sGrammar = (SchemaGrammar) fGrammarResolver.getGrammar(uri); } catch ( ClassCastException ce) { //since the returen Grammar is not a SchemaGrammar, bail out return false; } if(sGrammar == null) return false; int elementIndex = sGrammar.getElementDeclIndex(uriIndex, localpartIndex, TOP_LEVEL_SCOPE); //System.out.println("----------equivClassFullName : " + uriIndex+","+localpartIndex+","+elementIndex); if (elementIndex == -1) { return false; } String substitutionGroupFullName = sGrammar.getElementDeclSubstitutionGroupElementFullName(elementIndex); //System.out.println("----------equivClassFullName : " + equivClassFullName); if (substitutionGroupFullName==null) { return false; } int commaAt = substitutionGroupFullName.indexOf(","); uri = ""; localpart = substitutionGroupFullName; if ( commaAt >= 0 ) { if (commaAt > 0 ) { uri = substitutionGroupFullName.substring(0,commaAt); } localpart = substitutionGroupFullName.substring(commaAt+1); } uriIndex = fStringPool.addSymbol(uri); localpartIndex = fStringPool.addSymbol(localpart); if (uriIndex == exemplar.uri && localpartIndex == exemplar.localpart) { return true; } count--; } return false; } | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/38ed5d50bd4dc1974dd1d1bf70d1154b9831aa3f/SubstitutionGroupComparator.java/buggy/src/org/apache/xerces/validators/schema/SubstitutionGroupComparator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
353,
22606,
774,
12,
13688,
279,
1046,
16,
16723,
431,
351,
412,
297,
13,
1216,
1185,
95,
3639,
309,
261,
69,
1046,
18,
3729,
2680,
631,
338,
351,
412,
297,
18,
3729,
2680,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
353,
22606,
774,
12,
13688,
279,
1046,
16,
16723,
431,
351,
412,
297,
13,
1216,
1185,
95,
3639,
309,
261,
69,
1046,
18,
3729,
2680,
631,
338,
351,
412,
297,
18,
3729,
2680,
... |
if (PRUNE_INFEASIBLE_EXCEPTION_EDGES) { try { TypeDataflow typeDataflow = getTypeDataflow(method); new PruneInfeasibleExceptionEdges(cfg, typeDataflow, getConstantPoolGen()).execute(); } catch (DataflowAnalysisException e) { } catch (ClassNotFoundException e) { lookupFailureCallback.reportMissingClass(e); } | if (PRUNE_INFEASIBLE_EXCEPTION_EDGES && !cfg.isFlagSet(PRUNED_INFEASIBLE_EXCEPTIONS)) { try { TypeDataflow typeDataflow = getTypeDataflow(method); new PruneInfeasibleExceptionEdges(cfg, typeDataflow, getConstantPoolGen()).execute(); } catch (DataflowAnalysisException e) { } catch (ClassNotFoundException e) { lookupFailureCallback.reportMissingClass(e); | public CFG getCFG(Method method) throws CFGBuilderException { CFG cfg = cfgMap.get(method); if (cfg == null) { MethodGen methodGen = getMethodGen(method); if (DEBUG) System.out.println("Building CFG for " + methodGen.getClassName() + "." + methodGen.getName() + ":" + methodGen.getSignature()); CFGBuilder cfgBuilder = CFGBuilderFactory.create(methodGen); cfgBuilder.build(); cfg = cfgBuilder.getCFG(); cfgMap.put(method, cfg); if (PRUNE_INFEASIBLE_EXCEPTION_EDGES) { try { TypeDataflow typeDataflow = getTypeDataflow(method); new PruneInfeasibleExceptionEdges(cfg, typeDataflow, getConstantPoolGen()).execute(); } catch (DataflowAnalysisException e) { // FIXME: should report the error } catch (ClassNotFoundException e) { lookupFailureCallback.reportMissingClass(e); } } if (PRUNE_UNCONDITIONAL_EXCEPTION_THROWER_EDGES) { try { new PruneUnconditionalExceptionThrowerEdges( methodGen, cfg, getConstantPoolGen(), lookupFailureCallback).execute(); } catch (DataflowAnalysisException e) { // FIXME: should report the error } } } return cfg; } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/e713b6f9f0c8108c61494bb15ab2b8ea02012eb6/ClassContext.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/ba/ClassContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
7577,
1927,
42,
43,
12,
1305,
707,
13,
1216,
7577,
1263,
503,
288,
202,
202,
19727,
2776,
273,
2776,
863,
18,
588,
12,
2039,
1769,
202,
202,
430,
261,
7066,
422,
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,
225,
202,
482,
7577,
1927,
42,
43,
12,
1305,
707,
13,
1216,
7577,
1263,
503,
288,
202,
202,
19727,
2776,
273,
2776,
863,
18,
588,
12,
2039,
1769,
202,
202,
430,
261,
7066,
422,
446,
13,
28... |
if (VM.VerifyAssertions) VM.assert(!ci.intersects(physInterval)); | if (VM.VerifyAssertions) VM._assert(!ci.intersects(physInterval)); | private void updatePhysicalInterval(OPT_Register p, BasicInterval i) { // Get a representation of the intervals already assigned to p. CompoundInterval physInterval = getInterval(p); if (physInterval == null) { // no interval yet. create one. setInterval(p,new CompoundInterval(i,p)); } else { // incorporate i into the set of intervals assigned to p CompoundInterval ci = new CompoundInterval(i,p); if (VM.VerifyAssertions) VM.assert(!ci.intersects(physInterval)); physInterval.addAll(ci); } } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/f852e312fd5d6396bdeff809dda7a5e06d3d3bed/OPT_LinearScan.java/buggy/rvm/src/vm/compilers/optimizing/regalloc/linearScan/OPT_LinearScan.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
18136,
4006,
12,
15620,
67,
3996,
293,
16,
7651,
4006,
277,
13,
288,
4202,
368,
968,
279,
4335,
434,
326,
10389,
1818,
6958,
358,
293,
18,
1377,
21327,
4006,
24758,
4006,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
18136,
4006,
12,
15620,
67,
3996,
293,
16,
7651,
4006,
277,
13,
288,
4202,
368,
968,
279,
4335,
434,
326,
10389,
1818,
6958,
358,
293,
18,
1377,
21327,
4006,
24758,
4006,... |
} catch (PartInitException e) { MylarPlugin.log(e, "could not open: " + node); } catch (JavaModelException e) { MylarPlugin.log(e, "could not open: " + node); | } catch (Throwable t) { MylarPlugin.fail(t, "Could not open editor for: " + node, true); | public void open(IMylarContextNode node) { //get the element and open it in an editor IJavaElement javaElement = JavaCore.create(node.getElementHandle()); if (javaElement == null || !javaElement.exists()) return; try { IEditorPart part = JavaUI.openInEditor(javaElement); JavaUI.revealInEditor(part, javaElement); } catch (PartInitException e) { MylarPlugin.log(e, "could not open: " + node); } catch (JavaModelException e) { MylarPlugin.log(e, "could not open: " + node); } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/5591b18724dda323ba7fc10a70b5996705030a0d/JavaUiBridge.java/clean/org.eclipse.mylyn.java.ui/src/org/eclipse/mylyn/java/ui/JavaUiBridge.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1696,
12,
3445,
93,
7901,
1042,
907,
756,
13,
288,
3639,
368,
588,
326,
930,
471,
1696,
518,
316,
392,
4858,
3639,
467,
5852,
1046,
2252,
1046,
273,
5110,
4670,
18,
2640,
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,
1696,
12,
3445,
93,
7901,
1042,
907,
756,
13,
288,
3639,
368,
588,
326,
930,
471,
1696,
518,
316,
392,
4858,
3639,
467,
5852,
1046,
2252,
1046,
273,
5110,
4670,
18,
2640,
12,... |
if (!qdoxParser.parse(classToParse)) return null; | if (!qdoxParser.parse(classToParse)) { return null; } | private static ClassMetaData parseClass(final QDoxParser qdoxParser, final String classToParse) { if (!qdoxParser.parse(classToParse)) return null; final JavaMethod[] methods = qdoxParser.getJavaMethods(); final JavaField[] fields = qdoxParser.getJavaFields(); final List methodList = new ArrayList(methods.length); for (int i = 0; i < methods.length; i++) { methodList.add(createMethodMetaData(methods[i])); } final List fieldList = new ArrayList(fields.length); for (int i = 0; i < fields.length; i++) { fieldList.add(createFieldMetaData(fields[i])); } final ClassMetaData classMetaData = new ClassMetaData(); classMetaData.setName(classToParse); classMetaData.setMethods(methodList); classMetaData.setFields(fieldList); return classMetaData; } | 7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/b6f3077f52abeafa19bc6cb223aac8660735e950/SourceFileMetaDataCompiler.java/clean/aspectwerkz/src/main/org/codehaus/aspectwerkz/metadata/SourceFileMetaDataCompiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1659,
6998,
1109,
797,
12,
6385,
2238,
40,
2409,
2678,
1043,
72,
2409,
2678,
16,
4766,
5411,
727,
514,
667,
774,
3201,
13,
288,
4202,
309,
16051,
31886,
2409,
2678,
18,
2670,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1659,
6998,
1109,
797,
12,
6385,
2238,
40,
2409,
2678,
1043,
72,
2409,
2678,
16,
4766,
5411,
727,
514,
667,
774,
3201,
13,
288,
4202,
309,
16051,
31886,
2409,
2678,
18,
2670,
... |
RubyString newStr = newString(getValue()); newStr.infectBy(this); return newStr; | return newString(getValue()).infectBy(this); | public IRubyObject dup() { RubyString newStr = newString(getValue()); newStr.infectBy(this); return newStr; } | 46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/c3988bcedc9973ff7f8c24ac6423ecb89f3ada35/RubyString.java/clean/src/org/jruby/RubyString.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
15908,
10340,
921,
9417,
1435,
288,
202,
202,
54,
10340,
780,
394,
1585,
273,
394,
780,
12,
24805,
10663,
202,
202,
2704,
1585,
18,
10625,
386,
858,
12,
2211,
1769,
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,
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,
15908,
10340,
921,
9417,
1435,
288,
202,
202,
54,
10340,
780,
394,
1585,
273,
394,
780,
12,
24805,
10663,
202,
202,
2704,
1585,
18,
10625,
386,
858,
12,
2211,
1769,
202,
202,
... |
protected String appendPath( String parentPath, String childPath, String pathAdjustment, boolean appendPaths ) { List pathFragments = new ArrayList(); String rootPath = parentPath; String protocol = null; int protocolIdx = rootPath.indexOf( "://" ); if ( protocolIdx > -1 ) { protocol = rootPath.substring( 0, protocolIdx + 3 ); rootPath = rootPath.substring( protocolIdx + 3 ); } pathFragments.add( rootPath ); if ( appendPaths ) { if ( pathAdjustment != null ) { pathFragments.add( pathAdjustment ); } pathFragments.add( childPath ); } StringBuffer cleanedPath = new StringBuffer(); if ( protocol != null ) { cleanedPath.append( protocol ); } if ( rootPath.startsWith( "/" ) ) { cleanedPath.append( '/' ); } String lastToken = null; String currentToken = null; for ( Iterator it = pathFragments.iterator(); it.hasNext(); ) { String pathFragment = (String) it.next(); StringTokenizer tokens = new StringTokenizer( pathFragment, "/" ); while( tokens.hasMoreTokens() ) { lastToken = currentToken; currentToken = tokens.nextToken(); if ( "..".equals( currentToken ) ) { // trim the previous path part off... cleanedPath.setLength( cleanedPath.length() - ( lastToken.length() + 1 ) ); } else if ( !".".equals( currentToken ) ) { // don't worry about /./ self-references. cleanedPath.append( currentToken ).append( '/' ); } } } if ( !childPath.endsWith( "/" ) && appendPaths ) { cleanedPath.setLength( cleanedPath.length() - 1 ); } return cleanedPath.toString(); } | 11530 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11530/ad38e46b4b6bbc3fb214b07966cc42877ecec536/DefaultModelInheritanceAssembler.java/buggy/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
714,
743,
12,
514,
17743,
16,
514,
1151,
743,
16,
514,
589,
19985,
16,
1250,
714,
4466,
262,
565,
288,
3639,
987,
589,
27588,
273,
394,
2407,
5621,
7734,
514,
13959,
273,
177... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
714,
743,
12,
514,
17743,
16,
514,
1151,
743,
16,
514,
589,
19985,
16,
1250,
714,
4466,
262,
565,
288,
3639,
987,
589,
27588,
273,
394,
2407,
5621,
7734,
514,
13959,
273,
177... | ||
protected LmcWiki parseWiki(Element wiki) throws ServiceException { | protected LmcWiki parseWiki(Element wiki) { | protected LmcWiki parseWiki(Element wiki) throws ServiceException { LmcWiki result = new LmcWiki(); result.setID(wiki.attributeValue(MailService.A_ID)); result.setWikiWord(wiki.attributeValue(MailService.A_NAME)); result.setFolder(wiki.attributeValue(MailService.A_FOLDER)); result.setRev(wiki.attributeValue(MailService.A_VERSION)); result.setLastModifiedDate(wiki.attributeValue(MailService.A_DATE)); result.setLastEditor(wiki.attributeValue(MailService.A_LAST_EDITED_BY)); result.setRestUrl(wiki.attributeValue(MailService.A_REST_URL)); try { Element c = DomUtil.get(wiki, MailService.A_BODY); result.setContents(c.getText()); } catch (Exception e) {} return result; } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/1a6d91495afcdb20d15bcb4ef0e5a4ad003854f4/LmcSoapRequest.java/buggy/ZimbraServer/src/java/com/zimbra/cs/client/soap/LmcSoapRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
511,
13952,
25438,
1109,
25438,
12,
1046,
9050,
13,
202,
202,
15069,
16489,
202,
95,
202,
202,
48,
13952,
25438,
563,
273,
394,
511,
13952,
25438,
5621,
202,
202,
2088,
18,
542... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
511,
13952,
25438,
1109,
25438,
12,
1046,
9050,
13,
202,
202,
15069,
16489,
202,
95,
202,
202,
48,
13952,
25438,
563,
273,
394,
511,
13952,
25438,
5621,
202,
202,
2088,
18,
542... |
IEditorInput input = editor.getEditorInput(); if (input instanceof IFileEditorInput) { IFile inputFile = ((IFileEditorInput) input).getFile(); | IFile inputFile = ResourceUtil.getFile(editor.getEditorInput()); if (inputFile != null) { | void saveAllResources() { List projects = getProjectsToBuild(); if (projects == null || projects.isEmpty()) return; if (!isSaveAllSet()) return; IWorkbenchWindow[] windows = PlatformUI.getWorkbench() .getWorkbenchWindows(); for (int i = 0; i < windows.length; i++) { IWorkbenchPage[] pages = windows[i].getPages(); for (int j = 0; j < pages.length; j++) { IWorkbenchPage page = pages[j]; IEditorPart[] editors = page.getDirtyEditors(); for (int k = 0; k < editors.length; k++) { IEditorPart editor = editors[k]; IEditorInput input = editor.getEditorInput(); if (input instanceof IFileEditorInput) { IFile inputFile = ((IFileEditorInput) input).getFile(); if (projects.contains(inputFile.getProject())) { page.saveEditor(editor, false); } } } } } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/35591c7d55a12520aa70b2436fcd06526a22de81/BuildAction.java/buggy/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/BuildAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1923,
1595,
3805,
1435,
288,
3639,
987,
10137,
273,
11080,
11634,
3116,
5621,
3639,
309,
261,
13582,
422,
446,
747,
10137,
18,
291,
1921,
10756,
5411,
327,
31,
3639,
309,
16051,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1923,
1595,
3805,
1435,
288,
3639,
987,
10137,
273,
11080,
11634,
3116,
5621,
3639,
309,
261,
13582,
422,
446,
747,
10137,
18,
291,
1921,
10756,
5411,
327,
31,
3639,
309,
16051,
291,
... |
"X key=Ltest0003/Test$X<Ljava/lang/Object;>; [in Test [in Test.java [in test0003 [in src2 [in Resolve]]]]]", | "X genericTypeSignature=Ltest0003/Test$X<Ljava/lang/Object;>; [in Test [in Test.java [in test0003 [in src2 [in Resolve]]]]]", | public void test0003() throws JavaModelException { ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0003", "Test.java"); String str = cu.getSource(); String selection = "X"; int start = str.indexOf(selection); int length = selection.length(); IJavaElement[] elements = cu.codeSelect(start, length); assertElementsEqual( "Unexpected elements", "X key=Ltest0003/Test$X<Ljava/lang/Object;>; [in Test [in Test.java [in test0003 [in src2 [in Resolve]]]]]", elements );} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/562f566c1c2b8bfedaad7117a5b53ae2f781bec9/ResolveTests_1_5.java/buggy/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1842,
30770,
1435,
1216,
5110,
1488,
503,
288,
202,
45,
19184,
2802,
15985,
273,
336,
19184,
2802,
2932,
8460,
3113,
315,
4816,
22,
3113,
315,
3813,
30770,
3113,
315,
4709,
18,
6290,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
30770,
1435,
1216,
5110,
1488,
503,
288,
202,
45,
19184,
2802,
15985,
273,
336,
19184,
2802,
2932,
8460,
3113,
315,
4816,
22,
3113,
315,
3813,
30770,
3113,
315,
4709,
18,
6290,
... |
throw new PainterException("wrong arguments"); | throw new PainterException("ge: wrong arguments"); | public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof Number) { if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } double d0, d1; d0 = ( (Number) data[0]).doubleValue(); d1 = ( (Number) data[1]).doubleValue(); if (d0 != d1) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } else { if (! (data[1] instanceof String)) { throw new PainterException("wrong arguments"); } String s0, s1; s0 = (String) data[0]; s1 = (String) data[1]; if (s0.equals(s1)) { context.operands.push(new Boolean(false)); } else { context.operands.push(new Boolean(true)); } } } | 3506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3506/a9e36ef1e4e4be2e6d4839ed4e5a42aabe172a12/PAContext.java/buggy/itext/src/com/lowagie/text/pdf/codec/postscript/PAContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1033,
501,
8526,
31,
3639,
501,
273,
819,
18,
5120,
3542,
5708,
12,
22,
1769,
3639,
309,
16051,
261,
892,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1033,
501,
8526,
31,
3639,
501,
273,
819,
18,
5120,
3542,
5708,
12,
22,
1769,
3639,
309,
16051,
261,
892,
63... |
new VolatileGroup(), emptyBuddies, this); | new VolatileGroup(), emptyBuddies, this, false); | ContactIcqImpl createVolatileContact(Screenname screenname) { //First create the new volatile contact; Buddy volatileBuddy = new VolatileBuddy(screenname); ContactIcqImpl newVolatileContact = new ContactIcqImpl(volatileBuddy, this, true); //Check whether a volatile group already exists and if not create //one ContactGroupIcqImpl theVolatileGroup = findContactGroup((Group)null); //if necessary create the group if (theVolatileGroup == null) { List emptyBuddies = new LinkedList(); theVolatileGroup = new ContactGroupIcqImpl( new VolatileGroup(), emptyBuddies, this); theVolatileGroup.addContact(newVolatileContact); this.rootGroup.addSubGroup(theVolatileGroup); fireGroupEvent(theVolatileGroup , ServerStoredGroupEvent.GROUP_CREATED_EVENT); } else { theVolatileGroup.addContact(newVolatileContact); fireContactAdded(theVolatileGroup , newVolatileContact , theVolatileGroup.findContactIndex(volatileBuddy)); } return newVolatileContact; } | 43455 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/43455/7dfa6e70c550256f2280e5ac66055684b47173c0/ServerStoredContactListIcqImpl.java/clean/src/net/java/sip/communicator/impl/protocol/icq/ServerStoredContactListIcqImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
13329,
45,
71,
85,
2828,
752,
17431,
20295,
6567,
12,
7956,
529,
225,
5518,
529,
13,
565,
288,
3639,
368,
3759,
752,
326,
394,
31548,
5388,
31,
3639,
605,
29017,
31548,
38,
29017,
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,
13329,
45,
71,
85,
2828,
752,
17431,
20295,
6567,
12,
7956,
529,
225,
5518,
529,
13,
565,
288,
3639,
368,
3759,
752,
326,
394,
31548,
5388,
31,
3639,
605,
29017,
31548,
38,
29017,
273,
... |
if (MethodCategory.getCategory(vie.getMethod()) == MethodCategory.ACCESSOR_SET) | if (MethodCategory.getCategory(vie.getMethodRef()) == MethodCategory.ACCESSOR_SET) | public ContextValue getTargetContextValue() { // System.out.println(stmt); if (stmt instanceof AssignStmt) { // System.out.println(stmt); AssignStmt a = (AssignStmt) stmt; Value lhs = a.getLeftOp(); if (lhs instanceof FieldRef) { FieldRef fr=(FieldRef) lhs; if(!(fr instanceof InstanceFieldRef)) return null; InstanceFieldRef ifr=(InstanceFieldRef) fr; return new JimpleValue(ifr.getBase()); } Value rhs = a.getRightOp(); if (rhs instanceof InvokeExpr) { InstanceInvokeExpr vie = (InstanceInvokeExpr) rhs; if (MethodCategory.getCategory(vie.getMethod()) == MethodCategory.ACCESSOR_SET) return new JimpleValue(vie.getBase()); } } else if (stmt instanceof InvokeStmt) { InvokeExpr ie = ((InvokeStmt)stmt).getInvokeExpr(); if (ie instanceof InstanceInvokeExpr) { InstanceInvokeExpr vie = (InstanceInvokeExpr) ie; if (MethodCategory.getCategory(vie.getMethod()) == MethodCategory.ACCESSOR_SET) return new JimpleValue(vie.getBase()); } } return null; } | 236 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/236/997f4e7c5dc7eab7f3734a2c9600492132debb26/SetFieldShadowMatch.java/clean/aop/abc/src/abc/weaving/matching/SetFieldShadowMatch.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1772,
620,
8571,
1042,
620,
1435,
288,
202,
202,
759,
2332,
18,
659,
18,
8222,
12,
10589,
1769,
202,
202,
430,
261,
10589,
1276,
12093,
8952,
13,
288,
1082,
202,
759,
2332,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1772,
620,
8571,
1042,
620,
1435,
288,
202,
202,
759,
2332,
18,
659,
18,
8222,
12,
10589,
1769,
202,
202,
430,
261,
10589,
1276,
12093,
8952,
13,
288,
1082,
202,
759,
2332,
18... |
public boolean endVisitControl(Element controlElement, String effectiveControlId) {// if (controlElement.getName().equals("repeat")) {// final RepeatControlInfo repeatControlInfo = (RepeatControlInfo) repeatStack.pop();// final List children = repeatControlInfo.getChildren();// if (children == null || children.size() == 0) {// // Update repeat index to 0 if there was no iteration// result.updateRepeatIndex(effectiveControlId, 0);// // Current index is 0// result.setRepeatIterations(effectiveControlId, 0);// } else {// // Number of iterations is number of children// result.setRepeatIterations(effectiveControlId, children.size());// }// } return true; } | 52783 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52783/502ac014788f17d34ed9102cdc4dc5bd4c8b4ed8/XFormsControls.java/buggy/src/java/org/orbeon/oxf/xforms/XFormsControls.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1250,
679,
10432,
3367,
12,
1046,
3325,
1046,
16,
514,
11448,
3367,
548,
13,
288,
759,
282,
309,
261,
7098,
1046,
18,
17994,
7675,
14963,
2932,
9374,
6,
3719,
288,
759,
4202,
727,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1250,
679,
10432,
3367,
12,
1046,
3325,
1046,
16,
514,
11448,
3367,
548,
13,
288,
759,
282,
309,
261,
7098,
1046,
18,
17994,
7675,
14963,
2932,
9374,
6,
3719,
288,
759,
4202,
727,
... | ||
public void descriptorList_popup(MouseEvent e) { if (e.getButton() == MouseEvent.BUTTON3) { // right button may select a line in the list int index = descriptorList.locationToIndex(e.getPoint()); Rectangle rectangle = descriptorList.getCellBounds(index, index); if ((rectangle != null) && descriptorList.getCellBounds(index, index).contains(e.getPoint())) { descriptorList.setSelectedIndex(index); } else { descriptorList.clearSelection(); } // if a line is selected, process the actions if (!descriptorList.isSelectionEmpty()) { Launcher launcher = (Launcher) (descriptorMap.get(descriptorList.getSelectedValue())); //creation of a popup menu JMenuItem menuItem; JPopupMenu popup = new JPopupMenu(); menuItem = new JMenuItem("Launch the application"); menuItem.addActionListener(new GUI_PopupMenuItem_ActionListener( this)); popup.add(menuItem); menuItem.setEnabled(!launcher.isActivated()); menuItem = new JMenuItem("Remove the descriptor"); menuItem.addActionListener(new GUI_PopupMenuItem_ActionListener( this)); popup.add(menuItem); menuItem = new JMenuItem("View"); menuItem.addActionListener(new GUI_PopupMenuItem_ActionListener( this)); popup.add(menuItem); //menuItem.setEnabled(true); // TODO not yet implemented popup.show(e.getComponent(), e.getX(), e.getY()); } } } | 23362 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/23362/767dedf380c68f592a567587cf4ed8dfcfa46bd5/LauncherWindow.java/clean/src/org/objectweb/proactive/ic2d/gui/util/LauncherWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
12628,
682,
67,
16086,
12,
9186,
1133,
73,
15329,
430,
12,
73,
18,
588,
3616,
1435,
631,
9186,
1133,
18,
20068,
23,
15329,
759,
4083,
5391,
24877,
4025,
287,
558,
267,
451,
5449,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6459,
12628,
682,
67,
16086,
12,
9186,
1133,
73,
15329,
430,
12,
73,
18,
588,
3616,
1435,
631,
9186,
1133,
18,
20068,
23,
15329,
759,
4083,
5391,
24877,
4025,
287,
558,
267,
451,
5449,
... | ||
protected int[] parse(String str, int[] date) throws Exception{ | protected int[] parse(String str, int[] date) throws SchemaDateTimeException{ | protected int[] parse(String str, int[] date) throws Exception{ //PnYn MnDTnH nMnS: -P1Y2M3DT10H30M resetBuffer(str); //create structure to hold an object if ( date== null ) { date=new int[TOTAL_SIZE]; } resetDateObj(date); char c=fBuffer.charAt(fStart++); if ( c!='P' && c!='-' ) { throw new Exception(); } else { date[utc]=(c=='-')?'-':0; if ( c=='-' && fBuffer.charAt(fStart++)!='P' ) { throw new Exception(); } } int negate = 1; //negative duration if ( date[utc]=='-' ) { negate = -1; } //at least one number and designator must be seen after P boolean designator = false; int endDate = indexOf (fStart, fEnd, 'T'); if ( endDate == -1 ) { endDate = fEnd; } //find 'Y' int end = indexOf (fStart, endDate, 'Y'); if ( end!=-1 ) { //scan year date[CY]=negate * parseInt(fStart,end); fStart = end+1; designator = true; } end = indexOf (fStart, endDate, 'M'); if ( end!=-1 ) { //scan month date[M]=negate * parseInt(fStart,end); fStart = end+1; designator = true; } end = indexOf (fStart, endDate, 'D'); if ( end!=-1 ) { //scan day date[D]=negate * parseInt(fStart,end); fStart = end+1; designator = true; } if ( fEnd == endDate && fStart!=fEnd ) { throw new Exception(); } if ( fEnd !=endDate ) { //scan hours, minutes, seconds //REVISIT: can any item include a decimal fraction or only seconds? // end = indexOf (++fStart, fEnd, 'H'); if ( end!=-1 ) { //scan hours date[h]=negate * parseInt(fStart,end); fStart=end+1; designator = true; } end = indexOf (fStart, fEnd, 'M'); if ( end!=-1 ) { //scan min date[m]=negate * parseInt(fStart,end); fStart=end+1; designator = true; } end = indexOf (fStart, fEnd, 'S'); if ( end!=-1 ) { //scan seconds int mlsec = indexOf (fStart, end, '.'); if ( mlsec >0 ) { date[s] = negate * parseInt (fStart, mlsec); date[ms] = negate * parseInt (mlsec+1, end); } else { date[s]=negate * parseInt(fStart,end); } fStart=end+1; designator = true; } // no additional data shouls appear after last item // P1Y1M1DT is illigal value as well if ( fStart != fEnd || fBuffer.charAt(--fStart)=='T' ) { throw new Exception(); } } if ( !designator ) { throw new Exception(); } return date; } | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/4e15daa59b432b97b7f93a5e7ff868021bef81ca/DurationDatatypeValidator.java/clean/src/org/apache/xerces/validators/datatype/DurationDatatypeValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
509,
8526,
1109,
12,
780,
609,
16,
509,
8526,
1509,
13,
1216,
4611,
5096,
503,
95,
3639,
368,
52,
82,
61,
82,
23851,
9081,
82,
44,
290,
29668,
55,
30,
300,
52,
21,
61,
22,
49,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
8526,
1109,
12,
780,
609,
16,
509,
8526,
1509,
13,
1216,
4611,
5096,
503,
95,
3639,
368,
52,
82,
61,
82,
23851,
9081,
82,
44,
290,
29668,
55,
30,
300,
52,
21,
61,
22,
49,... |
private void createObjects( TreeItem topItem, String objectType ) { for ( Iterator itor = DesignEngine.getMetaDataDictionary( ) .getClasses( ) .iterator( ); itor.hasNext( ); ) { IClassInfo classInfo = (IClassInfo) itor.next( ); if ( classInfo.isNative( ) && OBJECTS_TYPE_BIRT.equals( objectType ) || !classInfo.isNative( ) && OBJECTS_TYPE_NATIVE.equals( objectType ) ) { continue; } TreeItem subItem = createSubFolderItem( topItem, classInfo ); Image globalImage = null; if ( isGlobal( classInfo.getName( ) ) ) { globalImage = IMAGE_GOLBAL; } //Add members for ( Iterator iterator = classInfo.getMembers( ).iterator( ); iterator.hasNext( ); ) { IMemberInfo memberInfo = (IMemberInfo) iterator.next( ); Image image = globalImage; if ( image == null ) { if ( memberInfo.isStatic( ) ) { image = IMAGE_STATIC_MEMBER; } else { image = IMAGE_MEMBER; } } createSubTreeItem( subItem, memberInfo.getDisplayName( ), image, getMemberTextData( classInfo.getName( ), memberInfo ), memberInfo.getToolTip( ), true ); } //Add constructors and methods List methodList = new ArrayList( ); methodList.add( classInfo.getConstructor( ) ); methodList.addAll( classInfo.getMethods( ) ); for ( Iterator iterator = methodList.iterator( ); iterator.hasNext( ); ) { IMethodInfo methodInfo = (IMethodInfo) iterator.next( ); if ( methodInfo == null ) { //Constructor is null continue; } Image image = globalImage; if ( image == null ) { if ( methodInfo.isStatic( ) ) { image = IMAGE_STATIC_METHOD; } else { image = IMAGE_METHOD; } } //Split a method with more than one signature into several entries List displayList = getMethodArgumentsList( classInfo.getName( ), methodInfo ); for ( int i = 0; i < displayList.size( ); i++ ) { String[] array = (String[]) displayList.get( i ); createSubTreeItem( subItem, array[0], image, array[1], methodInfo.getToolTip( ), true ); } } } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/af6d108ae5a0a444c5e5eb33b74268d9ea337374/ExpressionTreeSupport.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/ExpressionTreeSupport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
4710,
12,
4902,
1180,
1760,
1180,
16,
514,
16400,
262,
202,
95,
202,
202,
1884,
261,
4498,
518,
280,
273,
29703,
4410,
18,
588,
6998,
10905,
12,
262,
9506,
202,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
4710,
12,
4902,
1180,
1760,
1180,
16,
514,
16400,
262,
202,
95,
202,
202,
1884,
261,
4498,
518,
280,
273,
29703,
4410,
18,
588,
6998,
10905,
12,
262,
9506,
202,
18,... | ||
for (Iterator it = idList.iterator(); it.hasNext(); ) result[i++] = ((DbMailItem.SearchResult) it.next()).id; | for (DbMailItem.SearchResult sr : idList) result[i++] = sr.id; | public synchronized int[] listItemIds(OperationContext octxt, byte type, int folderId) throws ServiceException { boolean success = false; try { beginTransaction("listItemIds", octxt); if (!hasFullAccess()) throw ServiceException.PERM_DENIED("you do not have sufficient permissions"); Folder folder = getFolderById(folderId); List idList = DbMailItem.listByFolder(folder, type, true); if (idList == null) return null; int i = 0, result[] = new int[idList.size()]; for (Iterator it = idList.iterator(); it.hasNext(); ) result[i++] = ((DbMailItem.SearchResult) it.next()).id; success = true; return result; } finally { endTransaction(success); } } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/6205598f1168bd3f7a3c0e66d3b4dcb012b0bee3/Mailbox.java/clean/ZimbraServer/src/java/com/zimbra/cs/mailbox/Mailbox.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
509,
8526,
19859,
2673,
12,
2988,
1042,
320,
20364,
16,
1160,
618,
16,
509,
31996,
13,
1216,
16489,
288,
3639,
1250,
2216,
273,
629,
31,
3639,
775,
288,
5411,
18416,
2932,
109... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
509,
8526,
19859,
2673,
12,
2988,
1042,
320,
20364,
16,
1160,
618,
16,
509,
31996,
13,
1216,
16489,
288,
3639,
1250,
2216,
273,
629,
31,
3639,
775,
288,
5411,
18416,
2932,
109... |
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); | setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); | public IMUObserver() { setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); data = new StreamXYDataset[title.length][]; for(int i = 0; i < data.length; ++i) { data[i] = new StreamXYDataset[title[i].length]; for(int j = 0; j < data[i].length; ++j) { data[i][j] = new StreamXYDataset(freq[i] * HIST_LEN); add(createChart(title[i][j], data[i][j])); } } } | 55934 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55934/5f0eb03dc169a1dcf7a7685ae06fa5f4892cb89e/IMUObserver.java/clean/src/rocketview/IMUObserver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6246,
57,
11048,
1435,
202,
95,
202,
202,
542,
3744,
12,
2704,
8549,
3744,
12,
2211,
16,
8549,
3744,
18,
61,
67,
25614,
10019,
202,
202,
892,
273,
394,
3961,
8546,
10656,
63,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6246,
57,
11048,
1435,
202,
95,
202,
202,
542,
3744,
12,
2704,
8549,
3744,
12,
2211,
16,
8549,
3744,
18,
61,
67,
25614,
10019,
202,
202,
892,
273,
394,
3961,
8546,
10656,
63,
... |
public void visitTFClosedTime(TFClosedTime n) throws IOException { | public void visitTFClosedTime(/*@non_null*/TFClosedTime n) throws IOException { | public void visitTFClosedTime(TFClosedTime n) throws IOException { visitSons(n); // TODO Auto-generated method stub } | 46634 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46634/67867c1e55343e2e2d3135b09cf373b0d4c4adac/TProofTyperVisitor.java/buggy/src/escjava/trunk/ESCTools/Escjava/java/escjava/vcGeneration/coq/TProofTyperVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
17963,
7395,
950,
12,
17963,
7395,
950,
290,
13,
1216,
1860,
288,
202,
202,
11658,
55,
7008,
12,
82,
1769,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
1082,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3757,
17963,
7395,
950,
12,
17963,
7395,
950,
290,
13,
1216,
1860,
288,
202,
202,
11658,
55,
7008,
12,
82,
1769,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
1082,
20... |
public void processPluginDescriptor( MavenPluginDescriptor mavenPluginDescriptor ) throws CycleDetectedException | public void processPluginDescriptor( MavenPluginDescriptor mavenPluginDescriptor ) throws CycleDetectedException | public void processPluginDescriptor( MavenPluginDescriptor mavenPluginDescriptor ) throws CycleDetectedException { if ( pluginsInProcess.contains( mavenPluginDescriptor.getPluginId() ) ) { return; } pluginsInProcess.add( mavenPluginDescriptor.getPluginId() ); PluginDescriptor pluginDescriptor = mavenPluginDescriptor.getPluginDescriptor(); for ( Iterator it = mavenPluginDescriptor.getMavenMojoDescriptors().iterator(); it.hasNext(); ) { MavenMojoDescriptor mavenMojoDescriptor = (MavenMojoDescriptor) it.next(); MojoDescriptor mojoDescriptor = mavenMojoDescriptor.getMojoDescriptor(); if ( mojoDescriptor.getPrereqs() != null ) { for ( Iterator k = mojoDescriptor.getPrereqs().iterator(); k.hasNext(); ) { String prereq = (String) k.next(); if ( !processEdge( mojoDescriptor.getId(), prereq ) ) { continue; } } } else { dag.addVertex( mojoDescriptor.getId() ); } mojoDescriptors.put( mojoDescriptor.getId(), mojoDescriptor ); pluginDescriptors.put( pluginDescriptor.getId(), pluginDescriptor ); } } | 47160 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47160/a949eb66dedc63459e4897d50c37374814750c66/DefaultPluginManager.java/buggy/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1207,
3773,
3187,
12,
17176,
3773,
3187,
20499,
3773,
3187,
262,
3639,
1216,
385,
3409,
22614,
503,
565,
288,
3639,
309,
261,
4799,
382,
2227,
18,
12298,
12,
20499,
3773,
3187,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1207,
3773,
3187,
12,
17176,
3773,
3187,
20499,
3773,
3187,
262,
3639,
1216,
385,
3409,
22614,
503,
565,
288,
3639,
309,
261,
4799,
382,
2227,
18,
12298,
12,
20499,
3773,
3187,
... |
super(position); | super(position, NodeTypes.ARGUMENTNODE); | public ArgumentNode(ISourcePosition position, String identifier) { super(position); this.identifier = identifier.intern(); } | 52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/6e15491217631472c05c6928672f9c7064a978b3/ArgumentNode.java/clean/src/org/jruby/ast/ArgumentNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5067,
907,
12,
45,
1830,
2555,
1754,
16,
514,
2756,
13,
288,
3639,
2240,
12,
3276,
16,
2029,
2016,
18,
18311,
8744,
1769,
7734,
333,
18,
5644,
273,
2756,
18,
267,
798,
5621,
565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5067,
907,
12,
45,
1830,
2555,
1754,
16,
514,
2756,
13,
288,
3639,
2240,
12,
3276,
16,
2029,
2016,
18,
18311,
8744,
1769,
7734,
333,
18,
5644,
273,
2756,
18,
267,
798,
5621,
565,
... |
result = 1; | return 1; | public static int getConversionWeight(Object fromObj, Class to) { int fromCode = getJSTypeCode(fromObj); int result = CONVERSION_NONE; switch (fromCode) { case JSTYPE_UNDEFINED: if (to == ScriptRuntime.StringClass || to == ScriptRuntime.ObjectClass) { result = 1; } break; case JSTYPE_NULL: if (!to.isPrimitive()) { result = 1; } break; case JSTYPE_BOOLEAN: // "boolean" is #1 if (to == Boolean.TYPE) { result = 1; } else if (to == ScriptRuntime.BooleanClass) { result = 2; } else if (to == ScriptRuntime.ObjectClass) { result = 3; } else if (to == ScriptRuntime.StringClass) { result = 4; } break; case JSTYPE_NUMBER: if (to.isPrimitive()) { if (to == Double.TYPE) { result = 1; } else if (to != Boolean.TYPE) { result = 1 + getSizeRank(to); } } else { if (to == ScriptRuntime.StringClass) { // native numbers are #1-8 result = 9; } else if (to == ScriptRuntime.ObjectClass) { result = 10; } else if (ScriptRuntime.NumberClass.isAssignableFrom(to)) { // "double" is #1 result = 2; } } break; case JSTYPE_STRING: if (to == ScriptRuntime.StringClass) { result = 1; } else if (to.isInstance(fromObj)) { result = 2; } else if (to.isPrimitive()) { if (to == Character.TYPE) { result = 3; } else if (to != Boolean.TYPE) { result = 4; } } break; case JSTYPE_JAVA_CLASS: if (to == ScriptRuntime.ClassClass) { result = 1; } else if (to == ScriptRuntime.ObjectClass) { result = 3; } else if (to == ScriptRuntime.StringClass) { result = 4; } break; case JSTYPE_JAVA_OBJECT: case JSTYPE_JAVA_ARRAY: if (to == ScriptRuntime.StringClass) { result = 2; } else if (to.isPrimitive() && to != Boolean.TYPE) { result = (fromCode == JSTYPE_JAVA_ARRAY) ? CONVERSION_NONTRIVIAL : 2 + getSizeRank(to); } else { Object javaObj = fromObj; if (javaObj instanceof Wrapper) { javaObj = ((Wrapper)javaObj).unwrap(); } if (to.isInstance(javaObj)) { result = CONVERSION_NONTRIVIAL; } } break; case JSTYPE_OBJECT: // Other objects takes #1-#3 spots if (to.isArray()) { if (fromObj instanceof NativeArray) { // This is a native array conversion to a java array // Array conversions are all equal, and preferable to object // and string conversion, per LC3. result = 1; } } else if (to == ScriptRuntime.ObjectClass) { result = 2; } else if (to == ScriptRuntime.StringClass) { result = 3; } else if (to == ScriptRuntime.DateClass) { if (fromObj instanceof NativeDate) { // This is a native date to java date conversion result = 1; } } else if (to.isPrimitive() || to != Boolean.TYPE) { result = 3 + getSizeRank(to); } break; } return result; } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/a80d67208db8029f3323f99ef005d09358bde48f/NativeJavaObject.java/clean/js/rhino/src/org/mozilla/javascript/NativeJavaObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
509,
336,
6814,
6544,
12,
921,
628,
2675,
16,
1659,
358,
13,
288,
3639,
509,
628,
1085,
273,
30257,
15460,
12,
2080,
2675,
1769,
3639,
509,
563,
273,
3492,
5757,
67,
9826,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
509,
336,
6814,
6544,
12,
921,
628,
2675,
16,
1659,
358,
13,
288,
3639,
509,
628,
1085,
273,
30257,
15460,
12,
2080,
2675,
1769,
3639,
509,
563,
273,
3492,
5757,
67,
9826,
31... |
public AttributeDescr auto_focus() throws RecognitionException { AttributeDescr d; Token loc=null; Token t=null; d = null; try { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:510:17: ( (loc= 'auto-focus' opt_eol ( ';' )? opt_eol ) | (loc= 'auto-focus' t= BOOL opt_eol ( ';' )? opt_eol ) ) int alt38=2; int LA38_0 = input.LA(1); if ( LA38_0==37 ) { int LA38_1 = input.LA(2); if ( LA38_1==BOOL ) { alt38=2; } else if ( LA38_1==EOL||LA38_1==15||LA38_1==24||LA38_1==29||LA38_1==31||LA38_1==33||(LA38_1>=35 && LA38_1<=40) ) { alt38=1; } else { NoViableAltException nvae = new NoViableAltException("505:1: auto_focus returns [AttributeDescr d] : ( (loc= \'auto-focus\' opt_eol ( \';\' )? opt_eol ) | (loc= \'auto-focus\' t= BOOL opt_eol ( \';\' )? opt_eol ) );", 38, 1, input); throw nvae; } } else { NoViableAltException nvae = new NoViableAltException("505:1: auto_focus returns [AttributeDescr d] : ( (loc= \'auto-focus\' opt_eol ( \';\' )? opt_eol ) | (loc= \'auto-focus\' t= BOOL opt_eol ( \';\' )? opt_eol ) );", 38, 0, input); throw nvae; } switch (alt38) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:510:17: (loc= 'auto-focus' opt_eol ( ';' )? opt_eol ) { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:510:17: (loc= 'auto-focus' opt_eol ( ';' )? opt_eol ) // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:511:25: loc= 'auto-focus' opt_eol ( ';' )? opt_eol { loc=(Token)input.LT(1); match(input,37,FOLLOW_37_in_auto_focus1088); following.push(FOLLOW_opt_eol_in_auto_focus1090); opt_eol(); following.pop(); // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:511:50: ( ';' )? int alt36=2; int LA36_0 = input.LA(1); if ( LA36_0==15 ) { alt36=1; } else if ( LA36_0==EOL||LA36_0==24||LA36_0==29||LA36_0==31||LA36_0==33||(LA36_0>=35 && LA36_0<=40) ) { alt36=2; } else { NoViableAltException nvae = new NoViableAltException("511:50: ( \';\' )?", 36, 0, input); throw nvae; } switch (alt36) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:511:50: ';' { match(input,15,FOLLOW_15_in_auto_focus1092); } break; } following.push(FOLLOW_opt_eol_in_auto_focus1095); opt_eol(); following.pop(); d = new AttributeDescr( "auto-focus", "true" ); d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() ); } } break; case 2 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:518:17: (loc= 'auto-focus' t= BOOL opt_eol ( ';' )? opt_eol ) { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:518:17: (loc= 'auto-focus' t= BOOL opt_eol ( ';' )? opt_eol ) // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:519:25: loc= 'auto-focus' t= BOOL opt_eol ( ';' )? opt_eol { loc=(Token)input.LT(1); match(input,37,FOLLOW_37_in_auto_focus1120); t=(Token)input.LT(1); match(input,BOOL,FOLLOW_BOOL_in_auto_focus1124); following.push(FOLLOW_opt_eol_in_auto_focus1126); opt_eol(); following.pop(); // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:519:57: ( ';' )? int alt37=2; int LA37_0 = input.LA(1); if ( LA37_0==15 ) { alt37=1; } else if ( LA37_0==EOL||LA37_0==24||LA37_0==29||LA37_0==31||LA37_0==33||(LA37_0>=35 && LA37_0<=40) ) { alt37=2; } else { NoViableAltException nvae = new NoViableAltException("519:57: ( \';\' )?", 37, 0, input); throw nvae; } switch (alt37) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:519:57: ';' { match(input,15,FOLLOW_15_in_auto_focus1128); } break; } following.push(FOLLOW_opt_eol_in_auto_focus1131); opt_eol(); following.pop(); d = new AttributeDescr( "auto-focus", t.getText() ); d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() ); } } break; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return d; } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/cb210a30853642e270a3bba6ce570409f6046852/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3601,
16198,
3656,
67,
13923,
1435,
1216,
9539,
288,
6647,
3601,
16198,
302,
31,
3639,
3155,
1515,
33,
2011,
31,
3639,
3155,
268,
33,
2011,
31,
540,
202,
202,
72,
273,
446,
31,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3601,
16198,
3656,
67,
13923,
1435,
1216,
9539,
288,
6647,
3601,
16198,
302,
31,
3639,
3155,
1515,
33,
2011,
31,
3639,
3155,
268,
33,
2011,
31,
540,
202,
202,
72,
273,
446,
31,
54... | ||
public void exportResources(String exportFile, String[] exportPaths, boolean includeSystem, boolean excludeUnchanged) throws CmsException { | public void exportResources(String exportFile, String[] exportPaths) throws CmsException { | public void exportResources(String exportFile, String[] exportPaths, boolean includeSystem, boolean excludeUnchanged) throws CmsException { // export the resources m_driverManager.exportResources(this, m_context, exportFile, exportPaths, includeSystem, excludeUnchanged); } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/13800bc9901ef233804cde14a40105c18bf67203/CmsObject.java/buggy/src/com/opencms/file/CmsObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3359,
3805,
12,
780,
3359,
812,
16,
514,
8526,
3359,
4466,
13,
1216,
11228,
288,
3639,
368,
3359,
326,
2703,
3639,
312,
67,
7407,
1318,
18,
6530,
3805,
12,
2211,
16,
312,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3359,
3805,
12,
780,
3359,
812,
16,
514,
8526,
3359,
4466,
13,
1216,
11228,
288,
3639,
368,
3359,
326,
2703,
3639,
312,
67,
7407,
1318,
18,
6530,
3805,
12,
2211,
16,
312,
67,... |
List<AbstractRepositoryTask> dups = getSelectedDuplicates(); if (dups != null && !dups.isEmpty()) { Iterator<AbstractRepositoryTask> iter = dups.iterator(); IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); while (iter.hasNext()) { AbstractRepositoryTask task = iter.next(); AbstractBugEditorInput editorInput = new ExistingBugEditorInput(TasksUiPlugin.getRepositoryManager() .getRepository(task.getRepositoryKind(), task.getRepositoryUrl()), task.getTaskData()); TaskUiUtil.openEditor(editorInput, BugzillaUiPlugin.EXISTING_BUG_EDITOR_ID, page); } return true; } | public boolean performFinish() { try { productPage.saveDataToModel(); NewBugEditorInput editorInput = new NewBugEditorInput(repository, model); IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); TaskUiUtil.openEditor(editorInput, BugzillaUiPlugin.NEW_BUG_EDITOR_ID, page); return true; } catch (Exception e) { productPage.applyToStatusLine(new Status(IStatus.ERROR, "not_used", 0, "Problem occured retrieving repository configuration from " + repository.getUrl(), null)); } return false; } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/d331f1fefa51a1a082c537398721fbb17db75e0b/NewBugzillaReportWizard.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaReportWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
682,
32,
7469,
3305,
2174,
34,
9417,
87,
273,
16625,
23897,
5621,
309,
261,
72,
18294,
480,
446,
597,
401,
72,
18294,
18,
291,
1921,
10756,
288,
4498,
32,
7469,
3305,
2174,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
682,
32,
7469,
3305,
2174,
34,
9417,
87,
273,
16625,
23897,
5621,
309,
261,
72,
18294,
480,
446,
597,
401,
72,
18294,
18,
291,
1921,
10756,
288,
4498,
32,
7469,
3305,
2174,
34... | |
public org.quickfix.field.MaturityDate getMaturityDate() throws FieldNotFound { org.quickfix.field.MaturityDate value = new org.quickfix.field.MaturityDate(); | public quickfix.field.MaturityDate getMaturityDate() throws FieldNotFound { quickfix.field.MaturityDate value = new quickfix.field.MaturityDate(); | public org.quickfix.field.MaturityDate getMaturityDate() throws FieldNotFound { org.quickfix.field.MaturityDate value = new org.quickfix.field.MaturityDate(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/MassQuoteAcknowledgement.java/clean/src/java/src/quickfix/fix44/MassQuoteAcknowledgement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
15947,
2336,
1626,
2108,
270,
2336,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
15947,
2336,
1626,
460,
273,
394,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
15947,
2336,
1626,
2108,
270,
2336,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
15947,
2336,
1626,
460,
273,
394,... |
JFaceResources.getFontRegistry().put( fontName, defaultFont.getFontData()); | JFaceResources.getFontRegistry().put(fontName, defaultFont.getFontData()); | private static Font getDefaultFont(Control control) { String fontName = "DEFAULT_FONT_" + control.getClass().getName(); //$NON-NLS-1$ if (JFaceResources.getFontRegistry().hasValueFor(fontName)) return JFaceResources.getFontRegistry().get(fontName); Font cached = control.getFont(); control.setFont(null); Font defaultFont = control.getFont(); control.setFont(cached); JFaceResources.getFontRegistry().put( fontName, defaultFont.getFontData()); return defaultFont; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/b55db1f8df03ebade4e59f55f97c8c3917057362/Dialog.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/Dialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
10063,
4829,
5711,
12,
3367,
3325,
13,
288,
202,
202,
780,
3512,
461,
273,
315,
5280,
67,
25221,
9548,
397,
3325,
18,
588,
797,
7675,
17994,
5621,
4329,
3993,
17,
5106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10063,
4829,
5711,
12,
3367,
3325,
13,
288,
202,
202,
780,
3512,
461,
273,
315,
5280,
67,
25221,
9548,
397,
3325,
18,
588,
797,
7675,
17994,
5621,
4329,
3993,
17,
5106,
... |
public void constructGraph() | public void constructGraph(JScrollPane pane) | public void constructGraph() { System.out.println("Entered constructGraph"); this.jgraph.addMouseListener(new JGraphMouseAdapter(jgraph, this)); this.topLevel.construct(this, 0); model.insert(cells.toArray(), globalAttributes, cs, null, null); } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/877cf4399daa658e19a37dd3f1d60fe9394a2de9/GraphStructure.java/buggy/streams/src/streamit/eclipse/grapheditor/graph/GraphStructure.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4872,
4137,
1435,
202,
95,
1082,
202,
3163,
18,
659,
18,
8222,
2932,
10237,
329,
4872,
4137,
8863,
1082,
202,
2211,
18,
78,
4660,
18,
1289,
9186,
2223,
12,
2704,
804,
413... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4872,
4137,
1435,
202,
95,
1082,
202,
3163,
18,
659,
18,
8222,
2932,
10237,
329,
4872,
4137,
8863,
1082,
202,
2211,
18,
78,
4660,
18,
1289,
9186,
2223,
12,
2704,
804,
413... |
} else { if (row*width + col < samples[0].length) { samples[colorMap[cw + (col % cw)]][row*width + col] = s; } col++; if ((col-1) % cw == (cw - 1) && col != width) row--; else if (col == width) { row++; col = 0; } } } */ if (i == 0) { int colorIndex = (col % cw) + ((row % 2) == 0 ? 0 : cw); samples[colorMap[colorIndex]][row*width + col] = s; col++; if (col == width) { row++; col = 0; | public static void unpackBytes(short[][] samples, int startIndex, byte[] bytes, int[] bitsPerSample, int photoInterp, int[] colorMap, boolean littleEndian, long maxValue, int planar, int strip, int numStrips) throws FormatException { if (planar == 2) { planarUnpack(samples, startIndex, bytes, bitsPerSample, photoInterp, littleEndian, strip, numStrips); return; } int totalBits = 0; for (int i=0; i<bitsPerSample.length; i++) totalBits += bitsPerSample[i]; int sampleCount = 8 * bytes.length / totalBits; if (DEBUG) { debug("unpacking " + sampleCount + " samples (startIndex=" + startIndex + "; totalBits=" + totalBits + "; numBytes=" + bytes.length + ")"); } if (startIndex + sampleCount > samples[0].length) { int trunc = startIndex + sampleCount - samples[0].length; if (DEBUG) debug("WARNING: truncated " + trunc + " extra samples"); sampleCount -= trunc; } int counter = 0; // rules on incrementing the index: // 1) if the planar configuration is set to 1 (interleaved), then add one // to the index // 2) if the planar configuration is set to 2 (separated), then go to // j + (i*(bytes.length / sampleCount)) int bps0 = bitsPerSample[0]; int bpsPow = (int) Math.pow(2, bps0); int numBytes = bps0 / 8; boolean noDiv8 = bps0 % 8 != 0; boolean bps8 = bps0 == 8; int width = 0; int height = 0; if (photoInterp == CFA_ARRAY) { width = colorMap[colorMap.length - 2]; height = colorMap[colorMap.length - 1]; } //int row = startIndex / width, col = 0; int row = 0, col = 0; if (width != 0) row = startIndex / width; int cw = 0; int ch = 0; if (photoInterp == CFA_ARRAY) { byte[] c = new byte[2]; c[0] = (byte) colorMap[0]; c[1] = (byte) colorMap[1]; cw = DataTools.bytesToInt(c, littleEndian); c[0] = (byte) colorMap[2]; c[1] = (byte) colorMap[3]; ch = DataTools.bytesToInt(c, littleEndian); int[] tmp = colorMap; colorMap = new int[tmp.length - 6]; System.arraycopy(tmp, 4, colorMap, 0, colorMap.length); } int index = 0; for (int j=0; j<sampleCount; j++) { for (int i=0; i<samples.length; i++) { if (noDiv8) { // bits per sample is not a multiple of 8 // // while images in this category are not in violation of baseline // TIFF specs, it's a bad idea to write bits per sample values that // aren't divisible by 8 // -- MELISSA TODO -- improve this as time permits if (index == bytes.length) { //throw new FormatException("bad index : i = " + i + ", j = " + j); index--; } short b = bytes[index]; index++; // if (planar == 2) index = j + (i*(bytes.length / samples.length)); // index computed mod bitsPerSample.length to avoid problems with // RGB palette int offset = (bps0 * (samples.length*j + i)) % 8; if (offset <= (8 - (bps0 % 8))) index--; if (i == 0) counter++; if (counter % 4 == 0 && i == 0) index++; int ndx = startIndex + j; short s = (short) (b < 0 ? 256 + b : b); if (photoInterp != CFA_ARRAY) samples[i][ndx] = s; if (photoInterp == WHITE_IS_ZERO || photoInterp == CMYK) { samples[i][ndx] = (short) (Integer.MAX_VALUE - samples[i][ndx]); // invert colors } else if (photoInterp == RGB_PALETTE) { int x = (int) (b < 0 ? 256 + b : b); int red = colorMap[x % colorMap.length]; int green = colorMap[(x + bpsPow) % colorMap.length]; int blue = colorMap[(x + 2*bpsPow) % colorMap.length]; int[] components = {red, green, blue}; samples[i][ndx] = (short) components[i]; } else if (photoInterp == CFA_ARRAY) { /* if (i == 0) { if (row % 2 == 0) { if (row*width + col < samples[0].length) { samples[colorMap[col % cw]][row*width + col] = s; } col++; if ((col-1) % cw == (cw - 1) && col != width) { row++; col -= cw; } else if (col == width) { row += ch; col = 0; } } else { if (row*width + col < samples[0].length) { samples[colorMap[cw + (col % cw)]][row*width + col] = s; } col++; if ((col-1) % cw == (cw - 1) && col != width) row--; else if (col == width) { row++; col = 0; } } } */ if (i == 0) { int colorIndex = (col % cw) + ((row % 2) == 0 ? 0 : cw); samples[colorMap[colorIndex]][row*width + col] = s; col++; if (col == width) { row++; col = 0; } } } } else if (bps8) { // special case handles 8-bit data more quickly //if (planar == 2) { index = j+(i*(bytes.length / samples.length)); } short b = bytes[index]; index++; int ndx = startIndex + j; samples[i][ndx] = (short) (b < 0 ? Integer.MAX_VALUE + b : b); if (photoInterp == WHITE_IS_ZERO) { // invert color value samples[i][ndx] = (short) (Integer.MAX_VALUE - samples[i][ndx]); } else if (photoInterp == RGB_PALETTE) { index--; int x = (int) (b < 0 ? 256 + b : b); int cndx = i == 0 ? x : (i == 1 ? (x + bpsPow) : (x + 2*bpsPow)); int cm = colorMap[cndx]; samples[i][ndx] = (short) (maxValue == 0 ? (cm % 255) : cm); } else if (photoInterp == CMYK) { samples[i][ndx] = (short) (Integer.MAX_VALUE - samples[i][ndx]); } else if (photoInterp == Y_CB_CR) { if (i == bitsPerSample.length - 1) { int lumaRed = colorMap[0]; int lumaGreen = colorMap[1]; int lumaBlue = colorMap[2]; int red = (int) (samples[2][ndx]*(2 - 2*lumaRed) + samples[0][ndx]); int blue = (int) (samples[1][ndx]*(2 - 2*lumaBlue) + samples[0][ndx]); int green = (int) (samples[0][ndx] - lumaBlue*blue - lumaRed*red); if (lumaGreen != 0) green = green / lumaGreen; samples[0][ndx] = (short) (red - colorMap[4]); samples[1][ndx] = (short) (green - colorMap[6]); samples[2][ndx] = (short) (blue - colorMap[8]); } } } else { byte[] b = new byte[numBytes]; if (numBytes + index < bytes.length) { System.arraycopy(bytes, index, b, 0, numBytes); } else { System.arraycopy(bytes, bytes.length - numBytes, b, 0, numBytes); } index += numBytes; int ndx = startIndex + j; samples[i][ndx] = (short) DataTools.bytesToLong(b, !littleEndian); if (photoInterp == WHITE_IS_ZERO) { // invert color value long max = 1; for (int q=0; q<numBytes; q++) max *= 8; samples[i][ndx] = (short) (max - samples[i][ndx]); } else if (photoInterp == RGB_PALETTE) { index -= numBytes; int x = samples[i][ndx]; // this is the index into the color table int cndx = i == 0 ? x : (i == 1 ? (x + bpsPow) : (x + 2*bpsPow)); int cm = colorMap[cndx]; samples[i][ndx] = (short) (maxValue == 0 ? (cm % (bpsPow - 1)) : cm); } else if (photoInterp == CMYK) { samples[i][ndx] = (short) (Integer.MAX_VALUE - samples[i][ndx]); } } } if (photoInterp == RGB_PALETTE) index += (bps0 / 8); } } | 11426 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11426/d3b7646e2afd5f255f939fc0097e7f8258ed64ef/TiffTools.java/buggy/loci/formats/TiffTools.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
6167,
2160,
12,
6620,
63,
6362,
65,
5216,
16,
509,
10588,
16,
565,
1160,
8526,
1731,
16,
509,
8526,
4125,
2173,
8504,
16,
509,
10701,
2465,
84,
16,
509,
8526,
2036,
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,
1071,
760,
918,
6167,
2160,
12,
6620,
63,
6362,
65,
5216,
16,
509,
10588,
16,
565,
1160,
8526,
1731,
16,
509,
8526,
4125,
2173,
8504,
16,
509,
10701,
2465,
84,
16,
509,
8526,
2036,
863,... | |
protected ITypeInfo usualArithmeticConversions( IASTScope scope, ITypeInfo lhs, ITypeInfo rhs) throws ASTSemanticException{ | protected ITypeInfo usualArithmeticConversions( IASTScope scope, ASTExpression lhsExp, ASTExpression rhsExp) throws ASTSemanticException{ setFilename(lhsExp.getFilename()); ITypeInfo lhs = lhsExp.getResultType().getResult(); ITypeInfo rhs = rhsExp.getResultType().getResult(); | protected ITypeInfo usualArithmeticConversions( IASTScope scope, ITypeInfo lhs, ITypeInfo rhs) throws ASTSemanticException{ if( lhs == null ) return null; if( rhs == null ) return null; // if you have a variable of type basic type, then we need to go to the basic type first while( (lhs.getType() == ITypeInfo.t_type) && (lhs.getTypeSymbol() != null)){ lhs = lhs.getTypeSymbol().getTypeInfo(); } while( (rhs.getType() == ITypeInfo.t_type) && (rhs.getTypeSymbol() != null)){ rhs = rhs.getTypeSymbol().getTypeInfo(); } if( !lhs.isType(ITypeInfo.t__Bool, ITypeInfo.t_enumerator ) || !rhs.isType(ITypeInfo.t__Bool, ITypeInfo.t_enumerator ) ) { handleProblem( scope, IProblem.SEMANTIC_INVALID_CONVERSION_TYPE, null ); } ITypeInfo info = TypeInfoProvider.newTypeInfo( ); if( ( lhs.checkBit(ITypeInfo.isLong) && lhs.getType() == ITypeInfo.t_double) || ( rhs.checkBit(ITypeInfo.isLong) && rhs.getType() == ITypeInfo.t_double) ){ info.setType(ITypeInfo.t_double); info.setBit(true, ITypeInfo.isLong); return info; } else if( ( lhs.getType() == ITypeInfo.t_double ) || ( rhs.getType() == ITypeInfo.t_double ) ){ info.setType(ITypeInfo.t_double); return info; } else if ( ( lhs.getType() == ITypeInfo.t_float ) || ( rhs.getType() == ITypeInfo.t_float ) ){ info.setType(ITypeInfo.t_float); return info; } else { // perform intergral promotions (Specs section 4.5) info.setType(ITypeInfo.t_int); } if( ( lhs.checkBit(ITypeInfo.isUnsigned) && lhs.checkBit(ITypeInfo.isLong)) || ( rhs.checkBit(ITypeInfo.isUnsigned) && rhs.checkBit(ITypeInfo.isLong)) ){ info.setBit(true, ITypeInfo.isUnsigned); info.setBit(true, ITypeInfo.isLong); return info; } else if( ( lhs.checkBit(ITypeInfo.isUnsigned) && rhs.checkBit(ITypeInfo.isLong) ) || ( rhs.checkBit(ITypeInfo.isUnsigned) && lhs.checkBit(ITypeInfo.isLong) ) ){ info.setBit(true, ITypeInfo.isUnsigned); info.setBit(true, ITypeInfo.isLong); return info; } else if ( ( lhs.checkBit(ITypeInfo.isLong)) || ( rhs.checkBit(ITypeInfo.isLong)) ){ info.setBit(true, ITypeInfo.isLong); return info; } else if ( ( lhs.checkBit(ITypeInfo.isUnsigned) ) || ( rhs.checkBit(ITypeInfo.isUnsigned) ) ){ info.setBit(true, ITypeInfo.isUnsigned); return info; } else { // it should be both = int return info; } } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/05788b249420108207a100e40c01641b1faf7062/CompleteParseASTFactory.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
467,
17305,
25669,
686,
16368,
29287,
12,
467,
9053,
3876,
2146,
16,
467,
17305,
8499,
16,
467,
17305,
7711,
13,
1216,
9183,
13185,
9941,
503,
95,
202,
202,
430,
12,
8499,
422,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
467,
17305,
25669,
686,
16368,
29287,
12,
467,
9053,
3876,
2146,
16,
467,
17305,
8499,
16,
467,
17305,
7711,
13,
1216,
9183,
13185,
9941,
503,
95,
202,
202,
430,
12,
8499,
422,... |
PaletteData dataPalette = new PaletteData(rgbs); imageData = new ImageData(size.x, size.y, 8, dataPalette); imageData.transparentPixel = 0; | drawCompositeImage(size.x, size.y); | public ImageData getImageData() { Point size = getSize(); RGB black = new RGB(0, 0, 0); RGB[] rgbs = new RGB[256]; rgbs[0] = black; // transparency rgbs[1] = black; // black PaletteData dataPalette = new PaletteData(rgbs); imageData = new ImageData(size.x, size.y, 8, dataPalette); imageData.transparentPixel = 0; drawCompositeImage(size.x, size.y); for (int i = 0; i < rgbs.length; i++) { if (rgbs[i] == null) { rgbs[i] = black; } } return imageData; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/e3dd797feef0e8d8e6d4e9d98c04b37c34c84ac0/CompositeImageDescriptor.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/CompositeImageDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3421,
751,
10567,
751,
1435,
288,
3639,
4686,
963,
273,
9950,
5621,
3639,
11510,
7721,
273,
394,
11510,
12,
20,
16,
374,
16,
374,
1769,
3639,
11510,
8526,
14524,
2038,
273,
394,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3421,
751,
10567,
751,
1435,
288,
3639,
4686,
963,
273,
9950,
5621,
3639,
11510,
7721,
273,
394,
11510,
12,
20,
16,
374,
16,
374,
1769,
3639,
11510,
8526,
14524,
2038,
273,
394,
115... |
Element simpleContentDecl, ComplexTypeInfo typeInfo) | Element simpleContentDecl, ComplexTypeInfo typeInfo) | private void traverseSimpleContentDecl(int typeNameIndex, Element simpleContentDecl, ComplexTypeInfo typeInfo) throws Exception { String typeName = fStringPool.toString(typeNameIndex); // ----------------------------------------------------------------------- // Get attributes. // ----------------------------------------------------------------------- String simpleContentTypeId = simpleContentDecl.getAttribute(SchemaSymbols.ATTVAL_ID); // ----------------------------------------------------------------------- // Set the content type to be simple, and initialize content spec handle // ----------------------------------------------------------------------- typeInfo.contentType = XMLElementDecl.TYPE_SIMPLE; typeInfo.contentSpecHandle = -1; Element simpleContent = checkContent(simpleContentDecl, XUtil.getFirstChildElement(simpleContentDecl),false); // If there are no children, return if (simpleContent==null) { throw new ComplexTypeRecoverableError(); } // ----------------------------------------------------------------------- // The content should be either "restriction" or "extension" // ----------------------------------------------------------------------- String simpleContentName = simpleContent.getLocalName(); if (simpleContentName.equals(SchemaSymbols.ELT_RESTRICTION)) typeInfo.derivedBy = SchemaSymbols.RESTRICTION; else if (simpleContentName.equals(SchemaSymbols.ELT_EXTENSION)) typeInfo.derivedBy = SchemaSymbols.EXTENSION; else { throw new ComplexTypeRecoverableError( "The content of the simpleContent element is invalid. The " + "content must be RESTRICTION or EXTENSION"); } // ----------------------------------------------------------------------- // Get the attributes of the restriction/extension element // ----------------------------------------------------------------------- String base = simpleContent.getAttribute(SchemaSymbols.ATT_BASE); String typeId = simpleContent.getAttribute(SchemaSymbols.ATTVAL_ID); // ----------------------------------------------------------------------- // Skip over any annotations in the restriction or extension elements // todo - check whether the content can be empty... // ----------------------------------------------------------------------- Element content = checkContent(simpleContent, XUtil.getFirstChildElement(simpleContent),true); // ----------------------------------------------------------------------- // Handle the base type name // ----------------------------------------------------------------------- if (base.length() == 0) { throw new ComplexTypeRecoverableError( "The BASE attribute must be specified for the " + "RESTRICTION or EXTENSION element"); } QName baseQName = parseBase(base); // check if we're extending a simpleType which has a "final" setting which precludes this Integer finalValue = (baseQName.uri == StringPool.EMPTY_STRING? ((Integer)fSimpleTypeFinalRegistry.get(fStringPool.toString(baseQName.localpart))): ((Integer)fSimpleTypeFinalRegistry.get(fStringPool.toString(baseQName.uri) + "," +fStringPool.toString(baseQName.localpart)))); if(finalValue != null && (finalValue.intValue() == typeInfo.derivedBy)) throw new ComplexTypeRecoverableError( "The simpleType " + base + " that " + typeName + " uses has a value of \"final\" which does not permit extension"); processBaseTypeInfo(baseQName,typeInfo); // check that the base isn't a complex type with complex content if (typeInfo.baseComplexTypeInfo != null) { if (typeInfo.baseComplexTypeInfo.contentSpecHandle > -1) { throw new ComplexTypeRecoverableError( "The type '"+ base +"' specified as the " + "base in the simpleContent element must not have complexContent"); } } // ----------------------------------------------------------------------- // Process the content of the derivation // ----------------------------------------------------------------------- Element attrNode = null; // // RESTRICTION // if (typeInfo.derivedBy==SchemaSymbols.RESTRICTION) { // //Schema Spec : 5.11: Complex Type Definition Properties Correct : 2 // if (typeInfo.baseDataTypeValidator != null) { throw new ComplexTypeRecoverableError( "The type '" + base +"' is a simple type. It cannot be used in a "+ "derivation by RESTRICTION for a complexType"); } else { typeInfo.baseDataTypeValidator = typeInfo.baseComplexTypeInfo.datatypeValidator; } // ----------------------------------------------------------------------- // There may be a simple type definition in the restriction element // The data type validator will be based on it, if specified // ----------------------------------------------------------------------- if (content.getLocalName().equals(SchemaSymbols.ELT_SIMPLETYPE )) { int simpleTypeNameIndex = traverseSimpleTypeDecl(content); if (simpleTypeNameIndex!=-1) { typeInfo.baseDataTypeValidator=fDatatypeRegistry.getDatatypeValidator( fStringPool.toString(simpleTypeNameIndex)); content = XUtil.getNextSiblingElement(content); } else { throw new ComplexTypeRecoverableError(); } } // // Build up facet information // int numEnumerationLiterals = 0; int numFacets = 0; Hashtable facetData = new Hashtable(); Vector enumData = new Vector(); Element child; //REVISIT: there is a better way to do this, for (child = content; child != null && (child.getLocalName().equals(SchemaSymbols.ELT_MINEXCLUSIVE) || child.getLocalName().equals(SchemaSymbols.ELT_MININCLUSIVE) || child.getLocalName().equals(SchemaSymbols.ELT_MAXEXCLUSIVE) || child.getLocalName().equals(SchemaSymbols.ELT_MAXINCLUSIVE) || child.getLocalName().equals(SchemaSymbols.ELT_TOTALDIGITS) || child.getLocalName().equals(SchemaSymbols.ELT_FRACTIONDIGITS) || child.getLocalName().equals(SchemaSymbols.ELT_LENGTH) || child.getLocalName().equals(SchemaSymbols.ELT_MINLENGTH) || child.getLocalName().equals(SchemaSymbols.ELT_MAXLENGTH) || child.getLocalName().equals(SchemaSymbols.ELT_PERIOD) || child.getLocalName().equals(SchemaSymbols.ELT_DURATION) || child.getLocalName().equals(SchemaSymbols.ELT_ENUMERATION) || child.getLocalName().equals(SchemaSymbols.ELT_PATTERN) || child.getLocalName().equals(SchemaSymbols.ELT_ANNOTATION)); child = XUtil.getNextSiblingElement(child)) { if ( child.getNodeType() == Node.ELEMENT_NODE ) { Element facetElt = (Element) child; numFacets++; if (facetElt.getLocalName().equals(SchemaSymbols.ELT_ENUMERATION)) { numEnumerationLiterals++; enumData.addElement(facetElt.getAttribute(SchemaSymbols.ATT_VALUE)); //Enumerations can have annotations ? ( 0 | 1 ) Element enumContent = XUtil.getFirstChildElement( facetElt ); if( enumContent != null && enumContent.getLocalName().equals ( SchemaSymbols.ELT_ANNOTATION )){ traverseAnnotationDecl( child ); } // TO DO: if Jeff check in new changes to TraverseSimpleType, copy them over } else { facetData.put(facetElt.getLocalName(), facetElt.getAttribute( SchemaSymbols.ATT_VALUE )); } } } // end of for loop thru facets if (numEnumerationLiterals > 0) { facetData.put(SchemaSymbols.ELT_ENUMERATION, enumData); } // // If there were facets, create a new data type validator, otherwise // the data type validator is from the base // if (numFacets > 0) { typeInfo.datatypeValidator = fDatatypeRegistry.createDatatypeValidator( typeName, typeInfo.baseDataTypeValidator, facetData, false); } else typeInfo.datatypeValidator = typeInfo.baseDataTypeValidator; if (child != null) { // // Check that we have attributes // if (!isAttrOrAttrGroup(child)) { throw new ComplexTypeRecoverableError( "Invalid child in the RESTRICTION element of simpleContent"); } else attrNode = child; } } // end RESTRICTION // // EXTENSION // else { if (typeInfo.baseComplexTypeInfo != null) typeInfo.baseDataTypeValidator = typeInfo.baseComplexTypeInfo.datatypeValidator; typeInfo.datatypeValidator = typeInfo.baseDataTypeValidator; // // Look for attributes // if (content != null) { // // Check that we have attributes // if (!isAttrOrAttrGroup(content)) { throw new ComplexTypeRecoverableError( "Only annotations and attributes are allowed in the " + "content of an EXTENSION element for a complexType with simpleContent"); } else { attrNode = content; } } } // ----------------------------------------------------------------------- // add a template element to the grammar element decl pool for the type // ----------------------------------------------------------------------- int templateElementNameIndex = fStringPool.addSymbol("$"+typeName); typeInfo.templateElementIndex = fSchemaGrammar.addElementDecl( new QName(-1, templateElementNameIndex,typeNameIndex,fTargetNSURI), (fTargetNSURI==StringPool.EMPTY_STRING) ? StringPool.EMPTY_STRING : fCurrentScope, typeInfo.scopeDefined, typeInfo.contentType, typeInfo.contentSpecHandle, -1, typeInfo.datatypeValidator); typeInfo.attlistHead = fSchemaGrammar.getFirstAttributeDeclIndex( typeInfo.templateElementIndex); // ----------------------------------------------------------------------- // Process attributes // ----------------------------------------------------------------------- processAttributes(attrNode,baseQName,typeInfo); if (XUtil.getNextSiblingElement(simpleContent) != null) throw new ComplexTypeRecoverableError( "Invalid child following the RESTRICTION or EXTENSION element in the " + "complex type definition"); } // end traverseSimpleContentDecl | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/87731f2b2070ba79da173a5e6be82410b096d7c5/TraverseSchema.java/buggy/src/org/apache/xerces/validators/schema/TraverseSchema.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
10080,
5784,
1350,
3456,
12,
474,
8173,
1016,
16,
9079,
3010,
4143,
1350,
3456,
16,
16060,
17305,
23112,
13,
7734,
1216,
1185,
288,
7734,
514,
8173,
273,
284,
780,
2864,
18,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10080,
5784,
1350,
3456,
12,
474,
8173,
1016,
16,
9079,
3010,
4143,
1350,
3456,
16,
16060,
17305,
23112,
13,
7734,
1216,
1185,
288,
7734,
514,
8173,
273,
284,
780,
2864,
18,
10... |
public FileSystemException(String message, Throwable rootCause) { super(message, rootCause); | public FileSystemException() { super(); | public FileSystemException(String message, Throwable rootCause) { super(message, rootCause); } | 48761 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48761/84980248fe61e869a89a4315c794e4f128cc7ba2/FileSystemException.java/buggy/src/java/org/apache/jackrabbit/jcr/fs/FileSystemException.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10931,
503,
12,
780,
883,
16,
4206,
1365,
10683,
13,
288,
202,
9565,
12,
2150,
16,
1365,
10683,
1769,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10931,
503,
12,
780,
883,
16,
4206,
1365,
10683,
13,
288,
202,
9565,
12,
2150,
16,
1365,
10683,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
else if ( (LA28_0==ID) ) { alt28=2; | else if ( (LA27_0==ID) ) { alt27=2; | public BaseDescr fact_expression(String id) throws RecognitionException { BaseDescr pd = null; BaseDescr fe = null; BaseDescr f = null; pd = null; boolean multi = false; try { // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:905:5: ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact ) int alt28=2; int LA28_0 = input.LA(1); if ( (LA28_0==LEFT_PAREN) ) { alt28=1; } else if ( (LA28_0==ID) ) { alt28=2; } else { if (backtracking>0) {failed=true; return pd;} NoViableAltException nvae = new NoViableAltException("900:2: fact_expression[String id] returns [BaseDescr pd] : ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact );", 28, 0, input); throw nvae; } switch (alt28) { case 1 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:905:5: ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' { match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_fact_expression1771); if (failed) return pd; pushFollow(FOLLOW_fact_expression_in_paren_in_fact_expression1775); fe=fact_expression_in_paren(id); _fsp--; if (failed) return pd; match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_fact_expression1778); if (failed) return pd; if ( backtracking==0 ) { pd=fe; } } break; case 2 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:906:6: f= fact { pushFollow(FOLLOW_fact_in_fact_expression1789); f=fact(); _fsp--; if (failed) return pd; if ( backtracking==0 ) { ((ColumnDescr)f).setIdentifier( id ); pd = f; } } break; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return pd; } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/afea9f80e7c11e7b76df18f232d3b5ca5ad21e72/DRLParser.java/clean/drools-compiler/src/main/java/org/drools/lang/DRLParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3360,
16198,
5410,
67,
8692,
12,
780,
612,
13,
1216,
9539,
288,
6647,
3360,
16198,
4863,
273,
446,
31,
3639,
3360,
16198,
1656,
273,
446,
31,
3639,
3360,
16198,
284,
273,
446,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3360,
16198,
5410,
67,
8692,
12,
780,
612,
13,
1216,
9539,
288,
6647,
3360,
16198,
4863,
273,
446,
31,
3639,
3360,
16198,
1656,
273,
446,
31,
3639,
3360,
16198,
284,
273,
446,
31,
... |
additionalForms.add(expectationFormId); | additionalForms.add(expectationFormId.getValue()); | protected void runMatrixMigration(Connection con, boolean isDeveloper) throws JobExecutionException { logger.info("Quartz task started: runMatrixMigration()"); String tableName = getOldTableName("osp_scaffolding"), tableName2 = null, tableName3 = null; String sql = "select * from " + tableName; try { List additionalForms = new ArrayList(); additionalForms.add(expectationFormId); Statement matrixInnerStmt = con.createStatement(), innerStmt = con.createStatement(); stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(sql); try { while (rs.next()) { String id = rs.getString("id"); String owner = rs.getString("ownerid"); String title = rs.getString("title"); String description = rs.getString("description"); String documentRoot = rs.getString("documentroot"); String privacyxsdid = rs.getString("privacyxsdid"); String worksite = rs.getString("worksiteId"); boolean published = rs.getBoolean("published"); String publishedBy = rs.getString("publishedBy"); Date publishedDate = rs.getDate("publishedDate"); String columnLabel = ""; //rs.getString("columnLabel"); String rowLabel = ""; //rs.getString("rowLabel"); String readyColor = ""; //rs.getString("readyColor"); String pendingColor = ""; //rs.getString("pendingColor"); String completedColor = ""; //rs.getString("completedColor"); String lockColor = ""; //rs.getString("lockColor"); int workflowOption = Scaffolding.HORIZONTAL_PROGRESSION; //rs.getInt("workflowOption"); String exposed_page_id = ""; //rs.getString("exposed_page_id"); String style_id = ""; //rs.getString("style_id"); Scaffolding scaffolding = new Scaffolding(); Id sid = idManager.getId(id); scaffolding.setId(null); scaffolding.setNewId(sid); scaffolding.setOwner(agentManager.getAgent(owner)); scaffolding.setTitle(title); scaffolding.setDescription(description); scaffolding.setWorksiteId(idManager.getId(worksite)); scaffolding.setPublished(published); if(publishedBy != null) scaffolding.setPublishedBy(agentManager.getAgent(publishedBy)); scaffolding.setColumnLabel(columnLabel); scaffolding.setPublishedDate(publishedDate); scaffolding.setRowLabel(rowLabel); scaffolding.setReadyColor(readyColor); scaffolding.setPendingColor(pendingColor); scaffolding.setCompletedColor(completedColor); scaffolding.setLockedColor(lockColor); scaffolding.setWorkflowOption(workflowOption); scaffolding.setExposedPageId(exposed_page_id); Style style = null; //new Style(); //style.setId(idManager.getId(style_id)); scaffolding.setStyle(style); //***************** run through the criteria tableName = getOldTableName("osp_scaffolding_criteria"); tableName2 = getOldTableName("osp_matrix_label"); sql = "select * from " + tableName + " join " + tableName2 + " on ELT=ID" + " where parent_id='" + id + "' order by seq_num"; ResultSet rss = innerStmt.executeQuery(sql); Map criteriaMap = new HashMap(); while (rss.next()) { int sequenceNumber = rss.getInt("seq_num"); Id lid = idManager.getId(rss.getString("elt")); String color = rss.getString("color"); String textColor = null; String ldescription = rss.getString("description"); Criterion criterion = new Criterion(); criterion.setId(null); criterion.setNewId(lid); criterion.setColor(color); criterion.setTextColor(textColor); criterion.setScaffolding(scaffolding); criterion.setDescription(ldescription); criterion.setSequenceNumber(sequenceNumber); scaffolding.add(criterion); criteriaMap.put(lid.getValue(), criterion); } rss.close(); //***************** run through the levels tableName = getOldTableName("osp_scaffolding_levels"); tableName2 = getOldTableName("osp_matrix_label"); sql = "select * from " + tableName + " join " + tableName2 + " on ELT=ID" + " where scaffolding_id='" + id + "' order by seq_num"; rss = innerStmt.executeQuery(sql); Map levelMap = new HashMap(); while (rss.next()) { int sequenceNumber = rss.getInt("seq_num"); Id lid = idManager.getId(rss.getString("elt")); String color = rss.getString("color"); String textColor = null; String ldescription = rss.getString("description"); Level level = new Level(); level.setId(null); level.setNewId(lid); level.setColor(color); level.setTextColor(textColor); level.setScaffolding(scaffolding); level.setDescription(ldescription); level.setSequenceNumber(sequenceNumber); scaffolding.add(level); levelMap.put(lid.getValue(), level); } rss.close(); //***************** run through the cells tableName = getOldTableName("osp_scaffolding_cell"); sql = "select * from " + tableName + " where scaffolding_id='" + id + "' "; rss = innerStmt.executeQuery(sql); Map scaffoldingCellMap = new HashMap(); Map scaffoldingCellExpheadMap = new HashMap(); while (rss.next()) { Id cid = idManager.getId(rss.getString("id")); String criterionStr = rss.getString("rootcriterion_id"); String levelStr = rss.getString("level_id"); String expectationheader = rss.getString("expectationheader"); String initialStatus = rss.getString("initialstatus"); String gradablereflection = rss.getString("gradablereflection"); Level level = (Level)levelMap.get(levelStr); Criterion criterion = (Criterion)criteriaMap.get(criterionStr); ScaffoldingCell cell = new ScaffoldingCell(); cell.setId(null); cell.setNewId(cid); cell.setInitialStatus(initialStatus); cell.setLevel(level); cell.setRootCriterion(criterion); cell.setScaffolding(scaffolding); WizardPageDefinition page = cell.getWizardPageDefinition(); page.setSiteId(worksite); page.setTitle( (criterion.getDescription() != null ? criterion.getDescription() : "") + " - " + (level.getDescription() != null ? level.getDescription() : "")); cell.setEvaluationDevice(evaluationFormId); cell.setEvaluationDeviceType(FORM_TYPE); cell.setReflectionDevice(intelGrowthFormId); cell.setReflectionDeviceType(FORM_TYPE); cell.setReviewDevice(feedbackFormId); cell.setReviewDeviceType(FORM_TYPE); cell.setAdditionalForms(additionalForms); scaffolding.add(cell); scaffoldingCellMap.put(cid.getValue(), cell); scaffoldingCellExpheadMap.put(cid.getValue(), expectationheader); } rss.close(); Id scaffId = (Id)matrixManager.save(scaffolding); scaffolding = matrixManager.getScaffolding(scaffId); tableName = getOldTableName("osp_scaffolding_cell"); tableName2 = getOldTableName("osp_expectation"); tableName3 = getOldTableName("osp_matrix_label"); sql = "select SCAFFOLDING_CELL_ID, " + tableName3 + ".ID, DESCRIPTION " + " FROM " + tableName + " JOIN " + tableName2 + " ON " + tableName + ".ID=SCAFFOLDING_CELL_ID " + " JOIN " + tableName3 + " ON ELT=" + tableName3 + ".ID " + " where scaffolding_id='" + id + "' ORDER BY SCAFFOLDING_CELL_ID, SEQ_NUM"; rss = innerStmt.executeQuery(sql); String lastScaffoldingCellId = "", guidanceText = null, scaffoldingCellId = null; while (rss.next()) { scaffoldingCellId = rss.getString("SCAFFOLDING_CELL_ID"); if(!scaffoldingCellId.equals(lastScaffoldingCellId)) { if(guidanceText != null) { ScaffoldingCell scell = (ScaffoldingCell)scaffoldingCellMap.get(lastScaffoldingCellId); Guidance guide = guidanceManager.createNew( "", worksite, scell.getWizardPageDefinition().getId(), MatrixFunctionConstants.VIEW_SCAFFOLDING_GUIDANCE, MatrixFunctionConstants.EDIT_SCAFFOLDING_GUIDANCE); guidanceText += "</ul>"; guide.getInstruction().setText(guidanceText); /* description, idManager.getId(worksite), securityQualifier, securityViewFunction, securityEditFunction);*/ guidanceManager.saveGuidance(guide); scell.setGuidance(guide); } lastScaffoldingCellId = scaffoldingCellId; //starts a new cell String expHeader = (String)scaffoldingCellExpheadMap.get(scaffoldingCellId); guidanceText = expHeader + "\n<ul>"; } if(guidanceText.length() > 0) guidanceText += "\n<br />"; guidanceText += "<li>" + rss.getString("DESCRIPTION") + "</li>"; } rss.close(); if(guidanceText != null) { ScaffoldingCell scell = (ScaffoldingCell)scaffoldingCellMap.get(scaffoldingCellId); Guidance guide = guidanceManager.createNew( "", worksite, scell.getWizardPageDefinition().getId(), MatrixFunctionConstants.VIEW_SCAFFOLDING_GUIDANCE, MatrixFunctionConstants.EDIT_SCAFFOLDING_GUIDANCE); guidanceText += "</ul>"; guide.getInstruction().setText(guidanceText); guidanceManager.saveGuidance(guide); scell.setGuidance(guide); } scaffId = (Id)matrixManager.save(scaffolding); //***************** run through the user matrices tableName = getOldTableName("osp_matrix_tool"); tableName2 = getOldTableName("osp_matrix"); tableName3 = getOldTableName("osp_matrix_cell"); sql = "select " + tableName3 + ".id, matrix_id, owner, status, reflection_id, scaffolding_cell_id " + " from " + tableName + " join " + tableName2 + " on matrixtool_id=" + tableName + ".id " + " join " + tableName3 + " on matrix_id=" + tableName2 + ".id " + " where scaffolding_id='" + id + "' order by owner"; rss = innerStmt.executeQuery(sql); tableName = getOldTableName("osp_reflection"); tableName2 = getOldTableName("osp_reflection_item"); tableName3 = getOldTableName("osp_reviewer_item"); String lastOwner = ""; Matrix matrix = null; boolean badCell = false; int intelGrowthIndex = 1; while (rss.next()) { String mcidStr = rss.getString("id"); Id mcid = idManager.getId(mcidStr); String mowner = rss.getString("owner"); String status = rss.getString("status"); String scaffolding_cell_id = rss.getString("scaffolding_cell_id"); if(!mowner.equals(lastOwner)) { if(matrix != null && !badCell) matrixManager.save(matrix); lastOwner = mowner; badCell = false; matrix = new Matrix(); matrix.setOwner(agentManager.getAgent(mowner)); matrix.setScaffolding(scaffolding); } badCell = scaffolding_cell_id == null; if(!badCell) { ScaffoldingCell sCell = (ScaffoldingCell)scaffoldingCellMap.get(scaffolding_cell_id); Cell cell = new Cell(); cell.setNewId(mcid); cell.getWizardPage().setOwner(matrix.getOwner()); cell.setScaffoldingCell(sCell); cell.setStatus(status); Set attachments = new HashSet(); String cellAttachmentTable = getOldTableName("osp_cell_attachment"); sql = "select * from " + cellAttachmentTable + " where cell_id='" + mcidStr + "'"; ResultSet rsCellFiles = matrixInnerStmt.executeQuery(sql); while(rsCellFiles.next()) { String artifact = rsCellFiles.getString("artifactId"); Attachment att = new Attachment(); att.setArtifactId(idManager.getId(artifact)); attachments.add(att); } cell.setAttachments(attachments); rsCellFiles.close(); // get the intellectual growth sql = "SELECT ID, GROWTHSTATEMENT FROM " + tableName + " WHERE CELL_ID='" + mcidStr + "'"; ResultSet rsss = matrixInnerStmt.executeQuery(sql); if(rsss.next()) { String reflection_id = rsss.getString(1); String growth = rsss.getString(2); // save the intellectual growth Integer anId = incUser(matrix.getOwner().getId().getValue()); Id reflectionForm = createReflectionForm(matrix.getOwner().getId().getValue(), "IntGrowth " + scaffolding.getTitle() + " " + sCell.getRootCriterion().getDescription() + " " + sCell.getLevel().getDescription() + " - " + anId.toString(), growth); Review review = reviewManager.createNew("", worksite); review.setDeviceId(intelGrowthFormId.getValue());// form idvalue review.setParent(cell.getWizardPage().getId().getValue());// wizard page review.setType(Review.REFLECTION_TYPE);//contant review.setReviewContent(reflectionForm); getReviewManager().saveReview(review); sql = "SELECT CONNECTTEXT, EVIDENCE FROM " + tableName2 + " WHERE REFLECTION_ID='" + reflection_id + "' ORDER BY SEQ_NUM"; rsss = matrixInnerStmt.executeQuery(sql); Set pageForms = new HashSet(); while(rsss.next()) { String connect_text = rsss.getString("CONNECTTEXT"); String evidence = rsss.getString("EVIDENCE"); // save the expectation anId = incUser(matrix.getOwner().getId().getValue()); Id expectationForm = createExpectationForm(matrix.getOwner().getId().getValue(), "Reflection " + scaffolding.getTitle() + " " + sCell.getRootCriterion().getDescription() + " " + sCell.getLevel().getDescription() + " - " + anId.toString(), evidence, connect_text); pageForms.add(expectationForm); } cell.getWizardPage().setPageForms(pageForms); } rsss.close(); // sql = "SELECT ID, REVIEWER_ID, COMMENTS, GRADE, STATUS, CREATED, MODIFIED FROM " + tableName3 + " WHERE CELL_ID='" + mcidStr + "'"; rsss = matrixInnerStmt.executeQuery(sql); while(rsss.next()) { String riid = rsss.getString("ID"); String reviewer_id = rsss.getString("REVIEWER_ID"); String comment = rsss.getString("COMMENTS"); String grade = rsss.getString("GRADE"); String ri_status = rsss.getString("STATUS"); String ri_created = rsss.getString("CREATED"); String ri_modified = rsss.getString("MODIFIED"); // save the Reviews Integer anId = incUser(reviewer_id); Id evaluationForm = createEvaluationForm(reviewer_id, "Review "+ scaffolding.getTitle() + " " + sCell.getRootCriterion().getDescription() + " " + sCell.getLevel().getDescription() + " - " + anId.toString(), grade, comment); Review review = reviewManager.createNew("", worksite); review.setDeviceId(evaluationFormId.getValue());// form idvalue review.setParent(cell.getWizardPage().getId().getValue());// wizard page review.setType(Review.EVALUATION_TYPE);//contant review.setReviewContent(evaluationForm); getReviewManager().saveReview(review); } rsss.close(); matrix.add(cell); } } // end while(rss.next()) rss.close(); if(matrix != null && !badCell) matrixManager.save(matrix); } } finally { rs.close(); } } catch (Exception e) { logger.error("error selecting data with this sql: " + sql); logger.error("", e); throw new JobExecutionException(e); } finally { try { stmt.close(); } catch (Exception e) { } } logger.info("Quartz task fininshed: runMatrixMigration()"); } | 48996 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48996/d732cf646be49dbf06b5b767d5f721620406860a/OspMigrationJob.java/clean/migration/api-impl/src/java/org/theospi/portfolio/migration/OspMigrationJob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
918,
1086,
4635,
10224,
12,
1952,
356,
16,
1250,
353,
28145,
13,
1216,
3956,
14576,
288,
1377,
1194,
18,
1376,
2932,
12099,
94,
1562,
5746,
30,
1086,
4635,
10224,
1435,
8863,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
918,
1086,
4635,
10224,
12,
1952,
356,
16,
1250,
353,
28145,
13,
1216,
3956,
14576,
288,
1377,
1194,
18,
1376,
2932,
12099,
94,
1562,
5746,
30,
1086,
4635,
10224,
1435,
8863,
5411,
... |
" ^^^^^^^^^^^\n" + | " ^^^^^^^^^^^\n" + | public void test0988() { this.runNegativeTest( new String[] { "X.java",//=================== "public class X {\n" + " void bar(GLinkElementView<?,?> g) {\n" + " g.getViewer();\n" + " }\n" + "}\n" + "\n" + "abstract class GLinkElementView<M,CM> extends AbstractLinkView<M> {}\n" + "\n" + "abstract class AbstractLinkView<M> extends AbstractConnectionEditPart implements ILinkViewElement, IModelChangeListener {\n" + " @Override\n" + " public SheetViewer getViewer() { return null; } \n" + "}\n" + "\n" + "abstract class AbstractConnectionEditPart extends AbstractGraphicalEditPart implements ConnectionEditPart {}\n" + "\n" + "abstract class AbstractGraphicalEditPart extends AbstractEditPart implements GraphicalEditPart {}\n" + "\n" + "abstract class AbstractEditPart implements EditPart {\n" + " public EditPartViewer getViewer() { return null; }\n" + "}\n" + "\n" + "interface ILinkViewElement extends INodeViewElement {\n" + " public ISheetViewer getViewer();\n" + "}\n" + "\n" + "class SheetViewer implements ISheetViewer {}\n" + "\n" + "interface ISheetViewer {}\n" + "\n" + "interface EditPart {\n" + " EditPartViewer getViewer();\n" + "}\n" + "\n" + "interface ConnectionEditPart extends GraphicalEditPart {}\n" + "interface GraphicalEditPart extends EditPart {}\n" + "interface EditPartViewer {}\n" + "interface IModelChangeListener {}\n" + "\n" + "interface INodeViewElement {\n" + " public ISheetViewer getViewer();\n" + "}", // ================= }, "----------\n" + "1. ERROR in X.java (at line 7)\n" + " abstract class GLinkElementView<M,CM> extends AbstractLinkView<M> {}\n" + " ^^^^^^^^^^^^^^^^\n" + "The return type is incompatible with AbstractEditPart.getViewer(), AbstractLinkView<M>.getViewer()\n" + "----------\n" + "2. ERROR in X.java (at line 11)\n" + " public SheetViewer getViewer() { return null; } \n" + " ^^^^^^^^^^^\n" + "The return type is incompatible with AbstractEditPart.getViewer()\n" + "----------\n");} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/30a989f2410943e7f57d79a197cf0ec585ffc59e/GenericTypeTest.java/clean/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1842,
5908,
5482,
1435,
288,
202,
2211,
18,
2681,
14959,
4709,
12,
1082,
202,
2704,
514,
8526,
288,
9506,
202,
6,
60,
18,
6290,
3113,
759,
2429,
12275,
9506,
202,
6,
482,
667,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
5908,
5482,
1435,
288,
202,
2211,
18,
2681,
14959,
4709,
12,
1082,
202,
2704,
514,
8526,
288,
9506,
202,
6,
60,
18,
6290,
3113,
759,
2429,
12275,
9506,
202,
6,
482,
667,
113... |
{ List props = element.getInheritedMethods( ); if ( props.isEmpty( ) ) return; writeSectionHeader( "Inherited Methods" ); writeln( "<p class=\"section-text\">" ); Iterator iter = props.iterator( ); while ( iter.hasNext( ) ) { PropertyDefn method = (PropertyDefn) iter.next( ); write( makeMemberReference( null, method.definedBy( ).getName( ), METHOD_NAME, method.getName( ) ) ); if ( iter.hasNext( ) ) writeln( ", " ); } writeln( "</p>" ); } | { List props = element.getInheritedMethods( ); if ( props.isEmpty( ) ) return; writeSectionHeader( "Inherited Methods" ); writeln( "<p class=\"section-text\">" ); Iterator iter = props.iterator( ); while ( iter.hasNext( ) ) { PropertyDefn method = (PropertyDefn) iter.next( ); write( makeMemberReference( null, method.definedBy( ).getName( ), METHOD_NAME, method.getName( ) ) ); if ( iter.hasNext( ) ) writeln( ", " ); } writeln( "</p>" ); } | private void writeInheritedMethods( DocElement element ) { List props = element.getInheritedMethods( ); if ( props.isEmpty( ) ) return; writeSectionHeader( "Inherited Methods" ); writeln( "<p class=\"section-text\">" ); Iterator iter = props.iterator( ); while ( iter.hasNext( ) ) { PropertyDefn method = (PropertyDefn) iter.next( ); write( makeMemberReference( null, method.definedBy( ).getName( ), METHOD_NAME, method.getName( ) ) ); if ( iter.hasNext( ) ) writeln( ", " ); } writeln( "</p>" ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/2012a7e6d8d91844c6c396ee5b7b69a4345dea99/Generator.java/clean/model/org.eclipse.birt.report.model/romdoc/src/org/eclipse/birt/doc/romdoc/Generator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1045,
29078,
4712,
12,
3521,
1046,
930,
262,
202,
95,
202,
202,
682,
3458,
273,
930,
18,
588,
29078,
4712,
12,
11272,
202,
202,
430,
261,
3458,
18,
291,
1921,
12,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1045,
29078,
4712,
12,
3521,
1046,
930,
262,
202,
95,
202,
202,
682,
3458,
273,
930,
18,
588,
29078,
4712,
12,
11272,
202,
202,
430,
261,
3458,
18,
291,
1921,
12,
262,
... |
asm.emitLInt(KLUDGE_TI_REG, VM_Entrypoints.JNIRefsTopField.getOffset(), S0); | asm.emitLInt(KLUDGE_TI_REG, VM_Entrypoints.JNIRefsTopField.getOffsetAsInt(), S0); | private static void storeParameters(VM_Assembler asm, int frameSize, VM_Method method, VM_Class klass) { int nextOSArgReg, nextOSArgFloatReg, nextVMArgReg, nextVMArgFloatReg; // offset to the spill area in the callee (OS frame): int spillOffsetOS; if (VM.BuildForPowerOpenABI || VM.BuildForMachOABI) { // 1st spill = JNIEnv, 2nd spill = class spillOffsetOS = NATIVE_FRAME_HEADER_SIZE + 2*BYTES_IN_STACKSLOT; } else if (VM.BuildForSVR4ABI) { spillOffsetOS = NATIVE_FRAME_HEADER_SIZE; } else { if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED); } // offset to the spill area in the caller (RVM frame), relative to the callee's FP int spillOffsetVM = frameSize + STACKFRAME_HEADER_SIZE; // does NOT include implicit this or class ptr VM_TypeReference[] types = method.getParameterTypes(); // Set up the Reference table for GC // PR <- JREFS array base asm.emitLAddr(PROCESSOR_REGISTER, VM_Entrypoints.JNIRefsField.getOffset(), S0); // TI <- JREFS current top asm.emitLInt(KLUDGE_TI_REG, VM_Entrypoints.JNIRefsTopField.getOffset(), S0); // JREFS offset for current TOP asm.emitADD(KLUDGE_TI_REG, PROCESSOR_REGISTER, KLUDGE_TI_REG); // convert into address // TODO - count number of refs // TODO - emit overflow check for JNIRefs array // start a new JNIRefs frame on each transition from Java to native C // push current SavedFP ptr onto top of JNIRefs stack (use available S1 reg as a temp) // and make current TOP the new savedFP // asm.emitLInt (S1, VM_Entrypoints.JNIRefsSavedFPField.getOffset(), S0); asm.emitSTWU (S1, BYTES_IN_ADDRESS, KLUDGE_TI_REG); // push prev frame ptr onto JNIRefs array asm.emitSUBFC(S1, PROCESSOR_REGISTER, KLUDGE_TI_REG); // compute offset for new TOP asm.emitSTW (S1, VM_Entrypoints.JNIRefsSavedFPField.getOffset(), S0); // save new TOP as new frame ptr in JNIEnv // for static methods: caller has placed args in r3,r4,... // for non-static methods:"this" ptr is in r3, and args start in r4,r5,... // // for static methods: for nonstatic methods: // Java caller OS callee Java caller OS callee // ----------- ---------- ----------- ---------- // spill = arg11 -> new spill spill = arg11 -> new spill // spill = arg10 -> new spill spill = arg10 -> new spill // spill = arg9 -> new spill // spill = arg9 -> new spill // spill = arg8 -> new spill spill = arg8 -> new spill // R10 = arg7 -> new spill spill = arg7 -> new spill // R9 = arg6 -> new spill R10 = arg6 -> new spill // // R8 = arg5 -> R10 R9 = arg5 -> R10 // R7 = arg4 -> R9 R8 = arg4 -> R9 // R6 = arg3 -> R8 R7 = arg3 -> R8 // R5 = arg2 -> R7 R6 = arg2 -> R7 // R4 = arg1 -> R6 R5 = arg1 -> R6 // R3 = arg0 -> R5 R4 = arg0 -> R5 // R4 = class R3 = this -> R4 // R3 = JNIenv R3 = JNIenv // nextOSArgFloatReg = FIRST_OS_PARAMETER_FPR; nextVMArgFloatReg = FIRST_VOLATILE_FPR; nextOSArgReg = FIRST_OS_PARAMETER_GPR + 2; // 1st reg = JNIEnv, 2nd reg = class/this if (method.isStatic()) { nextVMArgReg = FIRST_VOLATILE_GPR; } else { nextVMArgReg = FIRST_VOLATILE_GPR+1; // 1st reg = this, to be processed separately } // The loop below assumes the following relationship: if (VM.VerifyAssertions) VM._assert(FIRST_OS_PARAMETER_FPR==FIRST_VOLATILE_FPR); if (VM.VerifyAssertions) VM._assert(LAST_OS_PARAMETER_FPR<=LAST_VOLATILE_FPR); if (VM.VerifyAssertions) VM._assert(FIRST_OS_PARAMETER_GPR==FIRST_VOLATILE_GPR); if (VM.VerifyAssertions) VM._assert(LAST_OS_PARAMETER_GPR<=LAST_VOLATILE_GPR); generateParameterPassingCode(asm, types, nextVMArgReg, nextVMArgFloatReg, spillOffsetVM, nextOSArgReg, nextOSArgFloatReg, spillOffsetOS ); // Now add the 2 JNI parameters: JNI environment and Class or "this" object // if static method, append ref for class, else append ref for "this" // and pass offset in JNIRefs array in r4 (as second arg to called native code) int SECOND_OS_PARAMETER_GPR = FIRST_OS_PARAMETER_GPR+1; if (method.isStatic()) { klass.getClassForType(); // ensure the Java class object is created // ASSMPTION: JTOC saved above in JNIEnv is still valid, // used by following emitLAddrToc asm.emitLAddrToc(SECOND_OS_PARAMETER_GPR, klass.getTibOffset()); // r4 <= TIB asm.emitLAddr(SECOND_OS_PARAMETER_GPR, TIB_TYPE_INDEX, SECOND_OS_PARAMETER_GPR); // r4 <= VM_Type asm.emitLAddr(SECOND_OS_PARAMETER_GPR, VM_Entrypoints.classForTypeField.getOffset(), SECOND_OS_PARAMETER_GPR); // r4 <- java.lang.Class asm.emitSTAddrU (SECOND_OS_PARAMETER_GPR, BYTES_IN_ADDRESS, KLUDGE_TI_REG); // append class ptr to end of JNIRefs array asm.emitSUBFC(SECOND_OS_PARAMETER_GPR, PROCESSOR_REGISTER, KLUDGE_TI_REG); // pass offset in bytes } else { asm.emitSTAddrU(T0, BYTES_IN_ADDRESS, KLUDGE_TI_REG); // append this ptr to end of JNIRefs array asm.emitSUBFC(SECOND_OS_PARAMETER_GPR, PROCESSOR_REGISTER, KLUDGE_TI_REG); // pass offset in bytes } // store the new JNIRefs array TOP back into JNIEnv asm.emitSUBFC(KLUDGE_TI_REG, PROCESSOR_REGISTER, KLUDGE_TI_REG); // compute offset for the current TOP asm.emitSTW(KLUDGE_TI_REG, VM_Entrypoints.JNIRefsTopField.getOffset(), S0); } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/3a1409586ed0fc007c4120f3a96d6f7a1ae3593c/VM_JNICompiler.java/clean/rvm/src/vm/arch/powerPC/jni/VM_JNICompiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
1707,
2402,
12,
7397,
67,
1463,
5747,
749,
20415,
16,
509,
2623,
1225,
16,
4766,
4202,
8251,
67,
1305,
707,
16,
8251,
67,
797,
7352,
13,
288,
565,
509,
1024,
4618,
4117,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
1707,
2402,
12,
7397,
67,
1463,
5747,
749,
20415,
16,
509,
2623,
1225,
16,
4766,
4202,
8251,
67,
1305,
707,
16,
8251,
67,
797,
7352,
13,
288,
565,
509,
1024,
4618,
4117,... |
public Remote toStub(Remote obj) | public Remote toStub(Remote ObjImpl) | public Remote toStub(Remote obj) throws NoSuchObjectException { return PortableServer.toStub(obj); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/PortableRemoteObjectDelegateImpl.java/buggy/core/src/classpath/gnu/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
6304,
358,
11974,
12,
5169,
18760,
2828,
13,
565,
1216,
5823,
921,
503,
225,
288,
565,
327,
6008,
429,
2081,
18,
869,
11974,
12,
2603,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
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,
6304,
358,
11974,
12,
5169,
18760,
2828,
13,
565,
1216,
5823,
921,
503,
225,
288,
565,
327,
6008,
429,
2081,
18,
869,
11974,
12,
2603,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-... |
private void pepLayout(Component editorPanel, Component buttonPanel) { SpringLayout layout = new SpringLayout(); this.setLayout(layout); this.add(editorPanel); layout.putConstraint(SpringLayout.WEST, editorPanel, 5, SpringLayout.WEST, this); layout.putConstraint(SpringLayout.NORTH, editorPanel, 5, SpringLayout.NORTH, this); layout.putConstraint(SpringLayout.EAST, this, 5, SpringLayout.EAST, editorPanel); layout.putConstraint(SpringLayout.SOUTH, this, 5, SpringLayout.SOUTH, editorPanel); this.add(buttonPanel); layout.putConstraint(SpringLayout.NORTH, buttonPanel, 5, SpringLayout.SOUTH, editorPanel); layout.putConstraint(SpringLayout.WEST, buttonPanel, 5, SpringLayout.WEST, this); layout.putConstraint(SpringLayout.EAST, buttonPanel, -5, SpringLayout.EAST, this); layout.putConstraint(SpringLayout.SOUTH, this, 5, SpringLayout.SOUTH, buttonPanel); } | 967 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/967/ad1d7a526540019e033079228544b3a802a556d3/PropertyEditorPane.java/clean/src/net/suberic/util/gui/propedit/PropertyEditorPane.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
293,
881,
3744,
12,
1841,
4858,
5537,
16,
5435,
3568,
5537,
13,
288,
3639,
22751,
3744,
3511,
273,
394,
22751,
3744,
5621,
565,
333,
18,
542,
3744,
12,
6741,
1769,
565,
333,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
293,
881,
3744,
12,
1841,
4858,
5537,
16,
5435,
3568,
5537,
13,
288,
3639,
22751,
3744,
3511,
273,
394,
22751,
3744,
5621,
565,
333,
18,
542,
3744,
12,
6741,
1769,
565,
333,
... | ||
catch (InvalidDataException e) { | } DebuggerInvocationUtil.invokeLater(myProject, new Runnable() { public void run() { updateBreakpointsUI(); | @SuppressWarnings({"HardCodedStringLiteral"}) public void run() { PsiDocumentManager.getInstance(myProject).commitAndRunReadAction(new Runnable() { @SuppressWarnings({"HardCodedStringLiteral"}) public void run() { final Map<String, Breakpoint> nameToBreakpointMap = new java.util.HashMap<String, Breakpoint>(); try { final List groups = parentNode.getChildren(); for (final Object group1 : groups) { final Element group = (Element)group1; final String category = group.getName(); Element anyExceptionBreakpointGroup; if (!AnyExceptionBreakpoint.ANY_EXCEPTION_BREAKPOINT.equals(category)) { // for compatibility with previous format anyExceptionBreakpointGroup = group.getChild(AnyExceptionBreakpoint.ANY_EXCEPTION_BREAKPOINT); final BreakpointFactory factory = BreakpointFactory.getInstance(category); if (factory != null) { for (final Object o : group.getChildren("breakpoint")) { Element breakpointNode = (Element)o; Breakpoint breakpoint = factory.createBreakpoint(myProject, breakpointNode); breakpoint.readExternal(breakpointNode); addBreakpoint(breakpoint); nameToBreakpointMap.put(breakpoint.getDisplayName(), breakpoint); } } } else { anyExceptionBreakpointGroup = group; } if (anyExceptionBreakpointGroup != null) { final Element breakpointElement = group.getChild("breakpoint"); if (breakpointElement != null) { myAnyExceptionBreakpoint.readExternal(breakpointElement); } } } } catch (InvalidDataException e) { } final Element rulesGroup = parentNode.getChild(RULES_GROUP_NAME); if (rulesGroup != null) { final List rules = rulesGroup.getChildren("rule"); for (final Object rule1 : rules) { final Element rule = (Element)rule1; final Element master = rule.getChild(MASTER_BREAKPOINT_TAGNAME); if (master == null) { continue; } final Element slave = rule.getChild(SLAVE_BREAKPOINT_TAGNAME); if (slave == null) { continue; } final Breakpoint masterBreakpoint = nameToBreakpointMap.get(master.getAttributeValue("name")); if (masterBreakpoint == null) { continue; } final Breakpoint slaveBreakpoint = nameToBreakpointMap.get(slave.getAttributeValue("name")); if (slaveBreakpoint == null) { continue; } addBreakpointRule(new EnableBreakpointRule(BreakpointManager.this, masterBreakpoint, slaveBreakpoint)); } } DebuggerInvocationUtil.invokeLater(myProject, new Runnable() { public void run() { updateBreakpointsUI(); } }); } }); myUIProperties.clear(); final Element props = parentNode.getChild("ui_properties"); if (props != null) { final List children = props.getChildren("property"); for (Object child : children) { Element property = (Element)child; final String name = property.getAttributeValue("name"); final String value = property.getAttributeValue("value"); if (name != null && value != null) { myUIProperties.put(name, value); } } } } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/367f378dd76c2ac779f7f3e4f8ad2bae5ccf7be5/BreakpointManager.java/buggy/debugger/impl/com/intellij/debugger/ui/breakpoints/BreakpointManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
632,
29282,
4312,
12590,
6,
29601,
1085,
72,
28565,
6,
6792,
1071,
918,
1086,
1435,
288,
1850,
453,
7722,
2519,
1318,
18,
588,
1442,
12,
4811,
4109,
2934,
7371,
1876,
1997,
1994,
1803,
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,
540,
632,
29282,
4312,
12590,
6,
29601,
1085,
72,
28565,
6,
6792,
1071,
918,
1086,
1435,
288,
1850,
453,
7722,
2519,
1318,
18,
588,
1442,
12,
4811,
4109,
2934,
7371,
1876,
1997,
1994,
1803,
12... |
this.streamInput = input; this.streamOutput = output; | input = new Channel(Character.TYPE, 1); output = new Channel (Character.TYPE, 2); | public void init () { setSplitter (WEIGHTED_ROUND_ROBIN (2, 1, 4, 2)); this.add (new Filter () { Channel input = new Channel(Character.TYPE, 1); Channel output = new Channel (Character.TYPE, 2); public void initIO () { this.streamInput = input; this.streamOutput = output; } public void work() { input.popChar (); output.pushChar (input.popChar ()); } }); this.add (new Filter () { Channel input = new Channel(Character.TYPE, 1); Channel output = new Channel (Character.TYPE, 8); public void initIO () { this.streamInput = input; this.streamOutput = output; } public void work() { char c = input.popChar (); output.pushChar (c); output.pushChar (c); output.pushChar (c); output.pushChar (c); output.pushChar (c); output.pushChar (c); output.pushChar (c); output.pushChar (c); } }); this.add (new Identity (Character.TYPE)); this.add(new CharPrinter()); setJoiner (WEIGHTED_ROUND_ROBIN (1, 2, 1, 0)); } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/a97ca875e1744ac20c2392ec0afd90513685e318/HelloWorld2.java/clean/streams/apps/tests/hello-splits/HelloWorld2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
11794,
1071,
918,
1208,
1832,
18701,
288,
27573,
444,
26738,
261,
6950,
16055,
6404,
67,
15092,
67,
1457,
12615,
261,
22,
16,
404,
16,
1059,
16,
576,
10019,
27573,
333,
18,
1289,
261,
2704,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
11794,
1071,
918,
1208,
1832,
18701,
288,
27573,
444,
26738,
261,
6950,
16055,
6404,
67,
15092,
67,
1457,
12615,
261,
22,
16,
404,
16,
1059,
16,
576,
10019,
27573,
333,
18,
1289,
261,
2704,
40... |
return new RubyFixnum(ruby, value); | public static RubyFixnum newFixnum(Ruby ruby, long value) { // Cache for Fixnums (Performance) if ((value & ~Ruby.FIXNUM_CACHE_MAX) == 0) { return ruby.fixnumCache[(int) value]; } return new RubyFixnum(ruby, value); } | 47984 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47984/786cea08c1dd2092a02d1254b49fbee371ace5f9/RubyFixnum.java/buggy/org/jruby/RubyFixnum.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
8585,
2107,
394,
8585,
2107,
12,
54,
10340,
22155,
16,
1525,
460,
13,
288,
3639,
368,
4379,
364,
12139,
21180,
261,
25024,
13,
3639,
309,
14015,
1132,
473,
4871,
54,
103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
8585,
2107,
394,
8585,
2107,
12,
54,
10340,
22155,
16,
1525,
460,
13,
288,
3639,
368,
4379,
364,
12139,
21180,
261,
25024,
13,
3639,
309,
14015,
1132,
473,
4871,
54,
103... | |
optionGroup.add(new JLabel("do () while:"), myDoWhileForceCombo); | optionGroup.add(new JLabel("do ... while():"), myDoWhileForceCombo); | private JPanel createForceBracesPanel() { OptionGroup optionGroup = new OptionGroup("Force Braces"); myIfForceCombo = createForceBracesCombo(); optionGroup.add(new JLabel("if ():"), myIfForceCombo); myForForceCombo = createForceBracesCombo(); optionGroup.add(new JLabel("for ():"), myForForceCombo); myWhileForceCombo = createForceBracesCombo(); optionGroup.add(new JLabel("while ():"), myWhileForceCombo); myDoWhileForceCombo = createForceBracesCombo(); optionGroup.add(new JLabel("do () while:"), myDoWhileForceCombo); return optionGroup.createPanel(); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/eeb77b3c2e3204ee481f4e7b2b3ac28f387adebd/CodeStyleIndentAndBracesPanel.java/buggy/source/com/intellij/application/options/CodeStyleIndentAndBracesPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
24048,
752,
10997,
38,
354,
764,
5537,
1435,
288,
565,
2698,
1114,
1456,
1114,
273,
394,
2698,
1114,
2932,
10997,
605,
354,
764,
8863,
565,
3399,
2047,
10997,
16156,
273,
752,
10997,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24048,
752,
10997,
38,
354,
764,
5537,
1435,
288,
565,
2698,
1114,
1456,
1114,
273,
394,
2698,
1114,
2932,
10997,
605,
354,
764,
8863,
565,
3399,
2047,
10997,
16156,
273,
752,
10997,
... |
public synchronized void addHierarchyListener(HierarchyListener l) { | public synchronized void addHierarchyListener(HierarchyListener l) { | public synchronized void addHierarchyListener(HierarchyListener l) { hierarchyListener = AWTEventMulticaster.add(hierarchyListener, l); if (hierarchyListener != null) enableEvents(AWTEvent.HIERARCHY_EVENT_MASK); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/Component.java/clean/core/src/classpath/java/java/awt/Component.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
527,
12074,
2223,
12,
12074,
2223,
328,
13,
288,
202,
202,
17937,
2223,
273,
432,
8588,
1133,
5049,
335,
2440,
18,
1289,
12,
17937,
2223,
16,
328,
1769,
202,
202,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
527,
12074,
2223,
12,
12074,
2223,
328,
13,
288,
202,
202,
17937,
2223,
273,
432,
8588,
1133,
5049,
335,
2440,
18,
1289,
12,
17937,
2223,
16,
328,
1769,
202,
202,
4... |
} for (Iterator pathIter = loadPath.iterator(); pathIter.hasNext();) { String entry = pathIter.next().toString(); if (entry.startsWith("jar:")) { JarFile current = (JarFile)jarFiles.get(entry); if(null == current) { try { current = new JarFile(entry.substring(4)); jarFiles.put(entry,current); } catch (FileNotFoundException ignored) { } catch (IOException e) { throw runtime.newIOErrorFromException(e); } | if (current.getJarEntry(name) != null) { try { return new LoadServiceResource(new URL(entry + name), entry + name); } catch (MalformedURLException e) { throw runtime.newIOErrorFromException(e); | private LoadServiceResource findFile(String name) { // try { if (name.startsWith("jar:")) { try { return new LoadServiceResource(new URL(name), name); } catch (MalformedURLException e) { throw runtime.newIOErrorFromException(e); } } // ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); JRubyFile file = JRubyFile.create(runtime.getCurrentDirectory(),name); if(file.isFile() && file.isAbsolute()) { try { return new LoadServiceResource(file.toURL(),name); } catch (MalformedURLException e) { throw runtime.newIOErrorFromException(e); } } ClassLoader classLoader = runtime.getJavaSupport().getJavaClassLoader(); String xname = name.replace('\\', '/'); // Look in classpath next (we do not use File as a test since UNC names will match) // Note: Jar resources must always begin with an '/'. if (xname.charAt(0) == '/') { URL loc = classLoader.getResource(xname); // Make sure this is not a directory or unavailable in some way if (isRequireable(loc)) { return new LoadServiceResource(loc, loc.getPath()); } } for (Iterator pathIter = loadPath.iterator(); pathIter.hasNext();) { String entry = pathIter.next().toString(); if (entry.startsWith("jar:")) { JarFile current = (JarFile)jarFiles.get(entry); if(null == current) { try { current = new JarFile(entry.substring(4)); jarFiles.put(entry,current); } catch (FileNotFoundException ignored) { } catch (IOException e) { throw runtime.newIOErrorFromException(e); } } if (current.getJarEntry(name) != null) { try { return new LoadServiceResource(new URL(entry + name), entry + name); } catch (MalformedURLException e) { throw runtime.newIOErrorFromException(e); } } } // // Load from local filesystem // NormalizedFile current = (NormalizedFile)new NormalizedFile(entry, name).getAbsoluteFile(); JRubyFile current = JRubyFile.create(JRubyFile.create(runtime.getCurrentDirectory(),entry).getAbsolutePath(), name); if (current.isFile()) { try { return new LoadServiceResource(current.toURL(), current.getPath()); } catch (MalformedURLException e) { throw runtime.newIOErrorFromException(e); } } // otherwise, try to load from classpath (Note: Jar resources always uses '/') URL loc = classLoader.getResource(entry.replace('\\', '/') + "/" + xname); // Make sure this is not a directory or unavailable in some way if (isRequireable(loc)) { return new LoadServiceResource(loc, loc.getPath()); } } // Try to load from classpath without prefix. "A/b.rb" will not load as // "./A/b.rb" in a jar file. (Note: Jar resources always uses '/') URL loc = classLoader.getResource(xname); return isRequireable(loc) ? new LoadServiceResource(loc, loc.getPath()) : null; // } catch (MalformedURLException e) { // throw runtime.newIOErrorFromException(e); // } } | 46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/d38821551a58969cd2593b463d93df5f32bf3c14/LoadService.java/clean/src/org/jruby/runtime/load/LoadService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
4444,
1179,
1420,
1104,
812,
12,
780,
508,
13,
288,
3639,
368,
3639,
775,
288,
5411,
309,
261,
529,
18,
17514,
1190,
2932,
11930,
2773,
3719,
288,
7734,
775,
288,
10792,
327,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
4444,
1179,
1420,
1104,
812,
12,
780,
508,
13,
288,
3639,
368,
3639,
775,
288,
5411,
309,
261,
529,
18,
17514,
1190,
2932,
11930,
2773,
3719,
288,
7734,
775,
288,
10792,
327,
394,
... |
private void loadDefaultProperties() { this.prop = new Properties(); | private void loadDefaultProperties() { this.prop = new Properties(); | private void loadDefaultProperties() { this.prop = new Properties(); prop.setProperty( "basic.show.header", "true" ); prop.setProperty( "basic.msg.empty_list", "Nothing found to display" ); prop.setProperty( "sort.behavior", "page" ); prop.setProperty( "export.banner", "Export options: {0}" ); prop.setProperty( "export.banner.sepchar", " | " ); prop.setProperty( "export.csv", "true" ); prop.setProperty( "export.csv.label", "CSV" ); prop.setProperty( "export.csv.mimetype", "text/csv" ); prop.setProperty( "export.csv.include_header", "false" ); prop.setProperty( "export.excel", "true" ); prop.setProperty( "export.excel.label", "Excel" ); prop.setProperty( "export.excel.mimetype", "application/vnd.ms-excel" ); prop.setProperty( "export.excel.include_header", "false" ); prop.setProperty( "export.xml", "true" ); prop.setProperty( "export.xml.label", "XML" ); prop.setProperty( "export.xml.mimetype", "text/xml" ); prop.setProperty( "export.amount", "page" ); prop.setProperty( "export.decorated", "true" ); prop.setProperty( "paging.banner.placement", "top" ); prop.setProperty( "paging.banner.item_name", "item" ); prop.setProperty( "paging.banner.items_name", "items" ); prop.setProperty( "paging.banner.no_items_found", "No {0} found." ); prop.setProperty( "paging.banner.one_item_found", "1 {0} found." ); prop.setProperty( "paging.banner.all_items_found", "{0} {1} found, showing all {2}" ); prop.setProperty( "paging.banner.some_items_found", "{0} {1} found, displaying {2} to {3}" ); prop.setProperty( "paging.banner.include_first_last", "false" ); prop.setProperty( "paging.banner.first_label", "First" ); prop.setProperty( "paging.banner.last_label", "Last" ); prop.setProperty( "paging.banner.prev_label", "Prev" ); prop.setProperty( "paging.banner.next_label", "Next" ); prop.setProperty( "paging.banner.group_size", "8" ); prop.setProperty( "error.msg.cant_find_bean", "Could not find bean {0} in scope {1}" ); prop.setProperty( "error.msg.invalid_bean", "The bean that you gave me is not a Collection I understand: {0}" ); prop.setProperty( "error.msg.no_column_tags", "Please provide column tags." ); prop.setProperty( "error.msg.illegal_access_exception", "IllegalAccessException trying to fetch property {0} on bean {1}" ); prop.setProperty( "error.msg.invocation_target_exception", "InvocationTargetException trying to fetch property {0} on bean {1}" ); prop.setProperty( "error.msg.nosuchmethod_exception", "NoSuchMethodException trying to fetch property {0} on bean {1}" ); prop.setProperty( "error.msg.invalid_decorator", "Decorator class is not a subclass of TableDecorator" ); prop.setProperty( "error.msg.invalid_page", "Invalid page ({0}) provided, value should be between 1 and {1}" ); } | 10316 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10316/08c9646d52e50d1acc1b275f065d301659beba20/TableTag.java/buggy/_OLD/displaytag08/src/org/apache/taglibs/display/TableTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
918,
1262,
1868,
2297,
1435,
282,
288,
1377,
333,
18,
5986,
273,
394,
6183,
5621,
1377,
2270,
18,
542,
1396,
12,
315,
13240,
18,
4500,
18,
3374,
3113,
315,
3767,
6,
11272,
1377,
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,
565,
3238,
918,
1262,
1868,
2297,
1435,
282,
288,
1377,
333,
18,
5986,
273,
394,
6183,
5621,
1377,
2270,
18,
542,
1396,
12,
315,
13240,
18,
4500,
18,
3374,
3113,
315,
3767,
6,
11272,
1377,
2... |
handleItemFull(contentHandler, xhtmlPrefix, spanQName, null, id, effectiveId, isMany, fullItemType, new XFormsSelect1Control.Item(true, getAttributes(itemsetAttributes, null, null), "$xforms-template-label$", "$xforms-template-value$", 1), "$xforms-item-index$", true); | handleItemFull(contentHandler, xhtmlPrefix, spanQName, null, id, effectiveId, isMany, fullItemType, new XFormsSelect1Control.Item(true, getAttributes(itemsetAttributes, null, null), "$xforms-template-label$", "$xforms-template-value$", 1), "$xforms-item-index$", true); | public void end(String uri, String localname, String qName) throws SAXException { final ContentHandler contentHandler = handlerContext.getController().getOutput(); final XFormsSelect1Control xformsSelect1Control = (XFormsSelect1Control) (handlerContext.isGenerateTemplate() ? null : (XFormsControl) containingDocument.getObjectById(pipelineContext, effectiveId)); final boolean isMany = localname.equals("select"); QName appearance; { final QName tempAppearance = getAppearance(elementAttributes); if (tempAppearance != null) appearance = tempAppearance; else if (isMany) appearance = XFormsConstants.XFORMS_COMPACT_APPEARANCE_QNAME;// default for xforms:select else appearance = XFormsConstants.XFORMS_MINIMAL_APPEARANCE_QNAME;// default for xforms:select1 } boolean isOpenSelection = "open".equals(elementAttributes.getValue("selection")); boolean isAutocomplete = isOpenSelection && XFormsConstants.XXFORMS_AUTOCOMPLETE_APPEARANCE_QNAME.equals(appearance); // NOTE: We don't support autocompletion with xforms:select for now, only with xforms:select1 if (isAutocomplete && isMany) { appearance = XFormsConstants.XFORMS_COMPACT_APPEARANCE_QNAME; isOpenSelection = false; isAutocomplete = false; } final boolean isFull = XFormsConstants.XFORMS_FULL_APPEARANCE_QNAME.equals(appearance); final boolean isCompact = XFormsConstants.XFORMS_COMPACT_APPEARANCE_QNAME.equals(appearance); final boolean isTree = XFormsConstants.XXFORMS_TREE_APPEARANCE_QNAME.equals(appearance); final boolean isMenu = XFormsConstants.XXFORMS_MENU_APPEARANCE_QNAME.equals(appearance); final boolean isAutocompleteNoFilter = isAutocomplete && "false".equals(elementAttributes.getValue(XFormsConstants.XXFORMS_NAMESPACE_URI, "filter")); // xforms:label handleLabelHintHelpAlert(effectiveId, "label", xformsSelect1Control); final AttributesImpl newAttributes; { final StringBuffer classes = getInitialClasses(localname, elementAttributes, xformsSelect1Control); if (isOpenSelection) classes.append(" xforms-select1-open"); if (isAutocompleteNoFilter) classes.append(" xforms-select1-open-autocomplete-nofilter"); if (isTree) classes.append(" xforms-initially-hidden"); if (!handlerContext.isGenerateTemplate()) { handleMIPClasses(classes, xformsSelect1Control); newAttributes = getAttributes(elementAttributes, classes.toString(), effectiveId); } else { newAttributes = getAttributes(elementAttributes, classes.toString(), effectiveId); } } final String xhtmlPrefix = handlerContext.findXHTMLPrefix(); if (!isStaticReadonly(xformsSelect1Control)) { if (isFull) { final String fullItemType = isMany ? "checkbox" : "radio"; final String spanQName = XMLUtils.buildQName(xhtmlPrefix, "span"); { contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "span", spanQName, newAttributes); int itemIndex = 0; for (Iterator i = items.iterator(); i.hasNext(); itemIndex++) { final XFormsSelect1Control.Item item = (XFormsSelect1Control.Item) i.next(); handleItemFull(contentHandler, xhtmlPrefix, spanQName, xformsSelect1Control, id, effectiveId, isMany, fullItemType, item, Integer.toString(itemIndex), itemIndex == 0); } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "span", spanQName); } if (hasItemset) { // Produce template reusableAttributes.clear(); reusableAttributes.addAttribute("", "id", "id", ContentHandlerHelper.CDATA, "xforms-select-template-" + effectiveId); reusableAttributes.addAttribute("", "class", "class", ContentHandlerHelper.CDATA, "xforms-select-template"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "span", spanQName, reusableAttributes); handleItemFull(contentHandler, xhtmlPrefix, spanQName, null, id, effectiveId, isMany, fullItemType, new XFormsSelect1Control.Item(true, getAttributes(itemsetAttributes, null, null), "$xforms-template-label$", "$xforms-template-value$", 1), "$xforms-item-index$", true); contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "span", spanQName); // TODO: in the future we should be able to handle multiple itemsets } } else { if (isOpenSelection) { if (isAutocomplete) { // Create xhtml:span final String spanQName = XMLUtils.buildQName(xhtmlPrefix, "span"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "span", spanQName, newAttributes); { { // Create xhtml:input final String inputQName = XMLUtils.buildQName(xhtmlPrefix, "input"); reusableAttributes.clear(); reusableAttributes.addAttribute("", "type", "type", ContentHandlerHelper.CDATA, "text"); reusableAttributes.addAttribute("", "name", "name", ContentHandlerHelper.CDATA, "xforms-select1-open-input-" + effectiveId); reusableAttributes.addAttribute("", "class", "class", ContentHandlerHelper.CDATA, "xforms-select1-open-input"); reusableAttributes.addAttribute("", "autocomplete", "autocomplete", ContentHandlerHelper.CDATA, "off"); final String value = (xformsSelect1Control == null) ? null : xformsSelect1Control.getValue(); reusableAttributes.addAttribute("", "value", "value", ContentHandlerHelper.CDATA, (value == null) ? "" : value); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "input", inputQName, reusableAttributes); contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "input", inputQName); } { // Create xhtml:select final String selectQName = XMLUtils.buildQName(xhtmlPrefix, "select"); reusableAttributes.clear(); reusableAttributes.addAttribute("", "class", "class", ContentHandlerHelper.CDATA, "xforms-select1-open-select"); if (isCompact) reusableAttributes.addAttribute("", "multiple", "multiple", ContentHandlerHelper.CDATA, "multiple"); // Handle accessibility attributes handleAccessibilityAttributes(elementAttributes, reusableAttributes); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "select", selectQName, reusableAttributes); final String optionQName = XMLUtils.buildQName(xhtmlPrefix, "option"); handleItemCompact(contentHandler, optionQName, xformsSelect1Control, isMany, new XFormsSelect1Control.Item(false, new AttributesImpl(), "", "", 1)); for (Iterator i = items.iterator(); i.hasNext();) { final XFormsSelect1Control.Item item = (XFormsSelect1Control.Item) i.next(); if (item.getValue() != null) handleItemCompact(contentHandler, optionQName, xformsSelect1Control, isMany, item); } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "select", selectQName); } } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "span", spanQName); } else { // We do not support other appearances or regular open selection for now throw new OXFException("Open selection currently only supports the xxforms:autocomplete appearance."); // TODO: Use ValidationException. } } else if (isTree) { // xxforms:tree appearance // Create xhtml:div with tree info final String divQName = XMLUtils.buildQName(xhtmlPrefix, "div"); handleReadOnlyAttribute(newAttributes, xformsSelect1Control); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName, newAttributes); outputJSONTreeInfo(xformsSelect1Control, isMany, contentHandler); contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName); } else if (isMenu) { // xxforms:menu appearance // Create enclosing xhtml:div final String divQName = XMLUtils.buildQName(xhtmlPrefix, "div"); final String ulQName = XMLUtils.buildQName(xhtmlPrefix, "ul"); final String liQName = XMLUtils.buildQName(xhtmlPrefix, "li"); final String aQName = XMLUtils.buildQName(xhtmlPrefix, "a"); handleReadOnlyAttribute(newAttributes, xformsSelect1Control); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName, newAttributes); // Create xhtml:div with initial menu entries reusableAttributes.clear(); reusableAttributes.addAttribute("", "class", "class", ContentHandlerHelper.CDATA, "yuimenubar"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName, reusableAttributes); { reusableAttributes.clear(); reusableAttributes.addAttribute("", "class", "class", ContentHandlerHelper.CDATA, "bd"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName, reusableAttributes); { reusableAttributes.clear(); reusableAttributes.addAttribute("", "class", "class", ContentHandlerHelper.CDATA, "first"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "ul", ulQName, reusableAttributes); { reusableAttributes.clear(); int index = 0; for (Iterator j = items.iterator(); j.hasNext(); index++) { final XFormsSelect1Control.Item currentItem = (XFormsSelect1Control.Item) j.next(); // Only care about item at level 1 if (currentItem.getLevel() != 1) continue; reusableAttributes.clear(); reusableAttributes.addAttribute("", "class", "class", ContentHandlerHelper.CDATA, (index == 0) ? "yuimenubaritem first" : "yuimenubaritem"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "li", liQName, reusableAttributes); { reusableAttributes.clear(); reusableAttributes.addAttribute("", "href", "href", ContentHandlerHelper.CDATA, "#"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "a", aQName, reusableAttributes); final String text = currentItem.getLabel(); contentHandler.characters(text.toCharArray(), 0, text.length()); contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "a", aQName); } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "li", liQName); } } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "ul", ulQName); } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName); } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName); // Create xhtml:div with tree info reusableAttributes.clear(); reusableAttributes.addAttribute("", "class", "class", ContentHandlerHelper.CDATA, "xforms-initially-hidden"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName, reusableAttributes); outputJSONTreeInfo(xformsSelect1Control, isMany, contentHandler); contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName); contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName); } else { // Create xhtml:select final String selectQName = XMLUtils.buildQName(xhtmlPrefix, "select"); if (isCompact) newAttributes.addAttribute("", "multiple", "multiple", ContentHandlerHelper.CDATA, "multiple"); // Handle accessibility attributes handleAccessibilityAttributes(elementAttributes, newAttributes); handleReadOnlyAttribute(newAttributes, xformsSelect1Control); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "select", selectQName, newAttributes); final String optionQName = XMLUtils.buildQName(xhtmlPrefix, "option"); final String optGroupQName = XMLUtils.buildQName(xhtmlPrefix, "optgroup"); int level = 0; for (Iterator j = items.iterator(); j.hasNext();) { final XFormsSelect1Control.Item currentItem = (XFormsSelect1Control.Item) j.next(); final String value = currentItem.getValue(); final int newLevel = currentItem.getLevel(); if (level - newLevel > 0) { // We are going down one or more levels for (int i = newLevel; i < level; i++) { // End xhtml:optgroup contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "optgroup", optGroupQName); } } if (value == null) { // Starting a new group final String label = currentItem.getLabel(); final AttributesImpl optGroupAttributes = getAttributes(currentItem.getAttributes(), null, null); if (label != null) optGroupAttributes.addAttribute("", "label", "label", ContentHandlerHelper.CDATA, label); // Start xhtml:optgroup contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "optgroup", optGroupQName, optGroupAttributes); } else { // Adding a new item handleItemCompact(contentHandler, optionQName, xformsSelect1Control, isMany, currentItem); } level = newLevel; } // Close brackets for (int i = level; i > 1; i--) { // End xhtml:optgroup contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "optgroup", optGroupQName); } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "select", selectQName); } } } else { // Read-only mode final String spanQName = XMLUtils.buildQName(xhtmlPrefix, "span"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "span", spanQName, newAttributes); if (!handlerContext.isGenerateTemplate()) { final String value = (xformsSelect1Control.getValue() == null) ? "" : xformsSelect1Control.getValue(); final StringBuffer sb = new StringBuffer(); int selectedFound = 0; for (Iterator i = items.iterator(); i.hasNext();) { final XFormsSelect1Control.Item currentItem = (XFormsSelect1Control.Item) i.next(); if (isSelected(isMany, value, currentItem.getValue())) { if (selectedFound > 0) sb.append(" - "); sb.append(currentItem.getLabel()); selectedFound++; } } if (sb.length() > 0) { final String result = sb.toString(); contentHandler.characters(result.toCharArray(), 0, result.length()); } } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "span", spanQName); } // xforms:help handleLabelHintHelpAlert(effectiveId, "help", xformsSelect1Control); // xforms:alert handleLabelHintHelpAlert(effectiveId, "alert", xformsSelect1Control); // xforms:hint handleLabelHintHelpAlert(effectiveId, "hint", xformsSelect1Control); } | 10097 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10097/05421f46b96c37b81e447acd15c2f6cdee98291f/XFormsSelect1Handler.java/clean/src/java/org/orbeon/oxf/xforms/processor/handlers/XFormsSelect1Handler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
679,
12,
780,
2003,
16,
514,
1191,
529,
16,
514,
22914,
13,
1216,
14366,
288,
3639,
727,
3697,
1503,
913,
1503,
273,
1838,
1042,
18,
588,
2933,
7675,
588,
1447,
5621,
3639,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
679,
12,
780,
2003,
16,
514,
1191,
529,
16,
514,
22914,
13,
1216,
14366,
288,
3639,
727,
3697,
1503,
913,
1503,
273,
1838,
1042,
18,
588,
2933,
7675,
588,
1447,
5621,
3639,
7... |
getJinFrameMenuBar().removePluginsMenu(conn); | JinFrameMenuBar menubar = getJinFrameMenuBar(); menubar.removePluginsMenu(conn); menubar.repaint(); | public void closeConnection(JinConnection conn){ Plugin [] plugins = (Plugin [])connsToPlugins.get(conn); for (int i=0;i<plugins.length;i++) try{ Plugin plugin = plugins[i]; if (plugin!=null){ System.out.println("Stopping "+plugin.getName()); plugin.stop(); } } catch (Throwable e){ // Make sure plugins don't bother other plugins. synchronized(System.err){ System.err.println("An exception occurred while stopping a plugin:"); e.printStackTrace(); } } System.out.println("Closing connection"); try{ if (conn.isConnected()){ conn.exit(); conn.disconnect(); } } catch (IOException e){ synchronized(System.err){ System.err.println("Failed to disconnect connection: "+conn); e.printStackTrace(); } } User user = (User)connsToUsers.get(conn); if (Jin.isKnownUser(user)){ if (user.isUserModified()){ System.out.println("Querying user about saving settings"); int result = JOptionPane.showConfirmDialog(this,"Save "+user.getUsername()+"'s settings into "+user.getFilename()+"?","Save settings?",JOptionPane.YES_NO_OPTION); if (result==JOptionPane.YES_OPTION){ System.out.println("Saving user settings"); Jin.save(user); } else{ System.out.println("Restoring user's original settings"); user.restore(); } } else{ System.out.println("Saving user's implicit settings"); Jin.save(user); } } else{ if (user.getUsername()!=null){ // Null means a guest. System.out.println("Querying user about creating a new account"); int result = JOptionPane.showConfirmDialog(this,"Would you like to create a new user named \""+user.getUsername()+"\"?","Create new user?",JOptionPane.YES_NO_OPTION); if (result==JOptionPane.YES_OPTION){ System.out.println("Creating new user, named "+user.getUsername()); Jin.save(user); } } } String userFilename = user.getFilename(); if (userFilename!=null){ System.out.println("Saving last user information"); Jin.setProperty("last.user", userFilename); } System.out.println("Removing connection from mappings"); connsToPlugins.remove(conn); connsToUsers.remove(conn); System.out.println("Removing plugins menu"); getJinFrameMenuBar().removePluginsMenu(conn); } | 1161 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1161/21abd566dc8bb907ae68dd63eb035dd443f84442/JinFrame.java/buggy/src/free/jin/JinFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1746,
1952,
12,
46,
267,
1952,
1487,
15329,
565,
6258,
5378,
4799,
273,
261,
3773,
5378,
13,
591,
2387,
774,
9461,
18,
588,
12,
4646,
1769,
565,
364,
261,
474,
277,
33,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1746,
1952,
12,
46,
267,
1952,
1487,
15329,
565,
6258,
5378,
4799,
273,
261,
3773,
5378,
13,
591,
2387,
774,
9461,
18,
588,
12,
4646,
1769,
565,
364,
261,
474,
277,
33,
20,
... |
Platform.addAuthorizationInfo(serverUrl, AUTH_REALM, AUTH_SCHEME, map); | try { Platform.addAuthorizationInfo(new URL(getUrl()), AUTH_REALM, AUTH_SCHEME, map); } catch (MalformedURLException ex) { Platform.addAuthorizationInfo(DEFAULT_URL, getUrl(), AUTH_SCHEME, map); } | public void setAuthenticationCredentials(String username, String password) { Map<String, String> map = Platform.getAuthorizationInfo(serverUrl, AUTH_REALM, AUTH_SCHEME); if (map == null) { map = new java.util.HashMap<String, String>(); } if (username != null) { map.put(AUTH_USERNAME, username); } if (password != null) { map.put(AUTH_PASSWORD, password); } try { // write the map to the keyring Platform.addAuthorizationInfo(serverUrl, AUTH_REALM, AUTH_SCHEME, map); } catch (CoreException e) { MylarStatusHandler.fail(e, "could not set authorization", true); } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/b86455249adfd805375ab5ef4f49dc4b9506e0d2/TaskRepository.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/provisional/tasklist/TaskRepository.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
6492,
6163,
12,
780,
2718,
16,
514,
2201,
13,
288,
202,
202,
863,
32,
780,
16,
514,
34,
852,
273,
11810,
18,
588,
6063,
966,
12,
3567,
1489,
16,
12790,
67,
31052,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
6492,
6163,
12,
780,
2718,
16,
514,
2201,
13,
288,
202,
202,
863,
32,
780,
16,
514,
34,
852,
273,
11810,
18,
588,
6063,
966,
12,
3567,
1489,
16,
12790,
67,
31052,
... |
BusyIndicator.showWhile(fDescriptionButton.getDisplay(), new Runnable() { | BusyIndicator.showWhile(fPointListViewer.getControl().getDisplay(), new Runnable() { | private void doShowDescription() { if (fShowDescriptionAction == null) fShowDescriptionAction = new ShowDescriptionAction(fCurrentPoint); else fShowDescriptionAction.setExtensionPoint(fCurrentPoint); BusyIndicator.showWhile(fDescriptionButton.getDisplay(), new Runnable() { public void run() { fShowDescriptionAction.run(); } }); } | 14404 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14404/67c7d5d0b0d525549acee2450c787ae16de799a4/PointSelectionPage.java/buggy/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/extension/PointSelectionPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
741,
5706,
3291,
1435,
288,
202,
202,
430,
261,
74,
5706,
3291,
1803,
422,
446,
13,
1082,
202,
74,
5706,
3291,
1803,
273,
394,
9674,
3291,
1803,
12,
74,
3935,
2148,
1769... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
741,
5706,
3291,
1435,
288,
202,
202,
430,
261,
74,
5706,
3291,
1803,
422,
446,
13,
1082,
202,
74,
5706,
3291,
1803,
273,
394,
9674,
3291,
1803,
12,
74,
3935,
2148,
1769... |
} | private void performDragSetData(DragSourceEvent event) { if (MarkerTransfer.getInstance().isSupportedType(event.dataType)) { event.data = ((IStructuredSelection) getViewer().getSelection()).toArray(); return; } if (TextTransfer.getInstance().isSupportedType(event.dataType)) { List selection = ((IStructuredSelection) getViewer().getSelection()).toList(); try { IMarker[] markers = new IMarker[selection.size()]; selection.toArray(markers); if (markers != null) { event.data = copyAction.createMarkerReport(markers); } } catch (ArrayStoreException e) { } } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/ea57ee1b804071939d5791d4c2986826074efe0c/MarkerView.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3073,
11728,
694,
751,
12,
11728,
1830,
1133,
871,
13,
288,
202,
202,
430,
261,
7078,
5912,
18,
588,
1442,
7675,
291,
7223,
559,
12,
2575,
18,
892,
559,
3719,
288,
1082,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3073,
11728,
694,
751,
12,
11728,
1830,
1133,
871,
13,
288,
202,
202,
430,
261,
7078,
5912,
18,
588,
1442,
7675,
291,
7223,
559,
12,
2575,
18,
892,
559,
3719,
288,
1082,... | |
for (i = 0; i < formalParameterList.length; i++) { | for (i = 0; i < actualParameterList.length; i++) { | private synchronized void executeProcedureInternal( final String procedureName, final ParameterListItem[] formalParameterList, final ParameterListItem[] actualParameterList, final TdsStatement stmt, final SQLWarningChain wChain, final int timeout, final boolean noMetaData) throws java.sql.SQLException, TdsException { // SAfe We need to check if all cancel requests were processed and wait // for any outstanding cancel. It could happen that we sent the // CANCEL after the server sent us all the data, so the answer is // going to come in a packet of its own.// while (cancelActive.booleanValue()) {// waitForDataOrTimeout(wChain, timeout);// // @todo Make sure the statement/resultset are not left in an inconsistent state.// processSubPacket();// } // A stored procedure has a packet type of 0x03 in the header packet. // for non-image date the packets consists of // offset length desc. // 0 1 The length of the name of the stored proc // 1 N1 The name of the stored proc // N1 + 1 2 unknown (filled with zeros?) // N1 + 3 2 unknown prefix for param 1 (zero filled?) // N1 + 5 1 datatype for param 1 // N1 + 6 1 max length of param 1 // N1 + 7 N2 parameter 1 data // ... // // For image data (datatype 0x22) the packet consists of // 0 1 The length of the name of the stored proc // 1 N1 The name of the stored proc // N1 + 1 2 unknown (filled with zeros?) // N1 + 3 2 unknown prefix for param 1 (zero filled?) // N1 + 5 1 datatype for param 1 // N1 + 6 4 length of param 1 // N1 + 10 4 length of param 1 (duplicated?) // N1 + 7 N2 parameter 1 data // ... checkMaxRows(stmt, wChain); int i; try { // SAfe We must not do this here, if an exception is thrown before // the packet is actually sent, we will deadlock in skipToEnd // with nothing to read. // moreResults = true; // Start sending the procedure execute packet. comm.startPacket(TdsComm.PROC); if (tdsVer == Tds.TDS70) { comm.appendTdsShort((short) (procedureName.length())); comm.appendChars(procedureName); } else { final byte[] nameBytes = conn.getEncoder().getBytes(procedureName); comm.appendByte((byte) nameBytes.length); comm.appendBytes(nameBytes); } // SAfe If this is set to 512 it means "don't return column // information" (useful for scrollable statements, to reduce // the amount of data passed around). comm.appendShort((short) (noMetaData ? 512 : 0)); // Now handle the parameters for (i = 0; i < formalParameterList.length; i++) { // SAfe We could try using actualParameterList here, instead // of formalParameterList. If it works (although it // shouldn't) it will solve a lot of problems. byte nativeType = cvtJdbcTypeToNativeType(formalParameterList[i].type); if (formalParameterList[i].formalName == null) { comm.appendByte((byte) 0); } else { // Send parameter name final String name = formalParameterList[i].formalName; comm.appendByte((byte) name.length()); if (tdsVer == Tds.TDS70) { comm.appendChars(name); } else { final byte[] nameBytes = conn.getEncoder().getBytes(name); comm.appendBytes(nameBytes); } } if (actualParameterList[i].isOutput) { comm.appendByte((byte) 1); if (nativeType == SYBBIT && actualParameterList[i].value == null) { actualParameterList[i].value = Boolean.FALSE; } } else { comm.appendByte((byte) 0); } if (actualParameterList[i].value == null && (nativeType == SYBINT1 || nativeType == SYBINT2 || nativeType == SYBINT4)) { nativeType = SYBINTN; } switch (nativeType) { case SYBCHAR: { String val; try { val = (String) actualParameterList[i].value; } catch (ClassCastException e) { if (actualParameterList[i].value instanceof Boolean) val = ((Boolean) actualParameterList[i].value).booleanValue() ? "1" : "0"; else val = actualParameterList[i].value.toString(); } if (tdsVer < TDS70 && val != null && val.length() == 0) { val = " "; } final int len = val != null ? val.length() : 0; final int max = formalParameterList[i].maxLength; // MJH - Do not use the formalType from the actual parameters as // this will be null where a cached stored procedure is reused by a // different PreparedStatement from the one that created it in the fist // place. Use the formalParameter data instead. // //if (actualParameterList[i].formalType != null && // actualParameterList[i].formalType.startsWith("n")) { // if (formalParameterList[i].formalType != null && formalParameterList[i].formalType.startsWith("n")) { /* * This is a Unicode column, safe to assume TDS 7.0 */ if (max > 4000) { comm.appendByte(SYBNTEXT); comm.appendTdsInt(max * 2); if (val == null) { comm.appendTdsInt(0xFFFFFFFF); } else { comm.appendTdsInt(len * 2); comm.appendChars(val); } } else { comm.appendByte((byte) (SYBNVARCHAR | 0x80)); comm.appendTdsShort((short) (max * 2)); if (val == null) { comm.appendTdsShort((short) 0xFFFF); } else { // MJH - Trap silent truncation problem if (val.length() > 4000) throw new java.io.IOException("Field too long"); comm.appendTdsShort((short) (len * 2)); comm.appendChars(val); } } } else { /* * Either VARCHAR or TEXT, TEXT can not happen * with TDS 7.0 as we would always use NTEXT there */ if (tdsVer != TDS70 && max > 255) { // TEXT comm.appendByte(SYBTEXT); if (actualParameterList[i].value instanceof byte[]) sendSybImage((byte[]) actualParameterList[i].value); else sendSybImage(conn.getEncoder().getBytes(val)); } else { // VARCHAR sendSybChar(val, formalParameterList[i].maxLength); } } break; } case SYBINTN: comm.appendByte(SYBINTN); comm.appendByte((byte) 4); // maximum length of the field, if (actualParameterList[i].value == null) { comm.appendByte((byte) 0); // actual length } else { comm.appendByte((byte) 4); // actual length comm.appendTdsInt(((Number) (actualParameterList[i].value)).intValue()); } break; case SYBINT4: comm.appendByte(SYBINT4); comm.appendTdsInt(((Number) (actualParameterList[i].value)).intValue()); break; case SYBINT2: comm.appendByte(SYBINT2); comm.appendTdsShort(((Number) (actualParameterList[i].value)).shortValue()); break; case SYBINT1: comm.appendByte(SYBINT1); comm.appendByte(((Number) (actualParameterList[i].value)).byteValue()); break; case SYBFLT8: case SYBFLTN: { if (actualParameterList[i].value == null) { comm.appendByte(SYBFLTN); comm.appendByte((byte) 8); comm.appendByte((byte) 0); } else { Double d = null; if (actualParameterList[i].value instanceof Double) { d = (Double) (actualParameterList[i].value); } else { final Number n = (Number) (actualParameterList[i].value); d = new Double(n.doubleValue()); } comm.appendByte(SYBFLT8); comm.appendFlt8(d); } break; } case SYBDATETIMN: { writeDatetimeValue(actualParameterList[i].value); break; } case SYBIMAGE: { comm.appendByte(nativeType); sendSybImage((byte[]) actualParameterList[i].value); break; } case SYBTEXT: { comm.appendByte(SYBTEXT); sendSybImage(conn.getEncoder().getBytes( (String) actualParameterList[i].value)); break; } case SYBBIT: case SYBBITN: { if (actualParameterList[i].value == null) { comm.appendByte(SYBBITN); comm.appendByte((byte) 1); comm.appendByte((byte) 0); } else { comm.appendByte(SYBBIT); if (actualParameterList[i].value.equals(Boolean.TRUE)) { comm.appendByte((byte) 1); } else { comm.appendByte((byte) 0); } } break; } case SYBNUMERIC: case SYBDECIMAL: { writeDecimalValue(actualParameterList[i].value, actualParameterList[i].type, actualParameterList[i].scale); break; } case SYBBINARY: case SYBVARBINARY: { final byte[] value = (byte[]) actualParameterList[i].value; final int maxLength = formalParameterList[i].maxLength; if (value == null) { comm.appendByte(SYBVARBINARY); comm.appendByte((byte) (maxLength)); comm.appendByte((byte) 0); } else { if (value.length > 255) { if (tdsVer != TDS70) { throw new java.io.IOException("Field too long"); } comm.appendByte(SYBBIGVARBINARY); if (maxLength < 0 || maxLength > 8000) { comm.appendTdsShort((short) 8000); } else { comm.appendTdsShort((short) maxLength); } comm.appendTdsShort((short) (value.length)); } else { comm.appendByte(SYBVARBINARY); comm.appendByte((byte) (maxLength)); comm.appendByte((byte) (value.length)); } comm.appendBytes(value); } break; } case SYBVOID: case SYBVARCHAR: case SYBDATETIME4: case SYBREAL: case SYBMONEY: case SYBDATETIME: case SYBMONEYN: case SYBMONEY4: default: { throw new SQLException("Not implemented for nativeType 0x" + Integer.toHexString(nativeType), "HY000"); } } } moreResults = true; comm.sendPacket(); waitForDataOrTimeout(wChain, timeout); } catch (java.io.IOException e) { e.printStackTrace(); throw new SQLException("Network error- " + e.getMessage(), "08S01"); } finally { comm.packetType = 0; } } | 2029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2029/3a3251044111ce7e2d595c1b6ee4b0f047ab39e5/Tds.java/buggy/src/main/net/sourceforge/jtds/jdbc/Tds.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3852,
918,
1836,
17213,
3061,
12,
5411,
727,
514,
12131,
461,
16,
5411,
727,
5498,
13575,
8526,
25739,
1662,
682,
16,
5411,
727,
5498,
13575,
8526,
3214,
1662,
682,
16,
5411,
727,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3852,
918,
1836,
17213,
3061,
12,
5411,
727,
514,
12131,
461,
16,
5411,
727,
5498,
13575,
8526,
25739,
1662,
682,
16,
5411,
727,
5498,
13575,
8526,
3214,
1662,
682,
16,
5411,
727,
3... |
arkNo = Long.parseLong(arkNumber); | arkNo = Long.parseLong(arkNumber) + 1; | private boolean parseARK(SimpleFieldSet fs) { USK ark = null; long arkNo = 0; try { String arkNumber = fs.get("ark.number"); if(arkNumber != null) { arkNo = Long.parseLong(arkNumber); } String arkPubKey = fs.get("ark.pubURI"); if(arkPubKey != null) { FreenetURI uri = new FreenetURI(arkPubKey); ClientSSK ssk = new ClientSSK(uri); ark = new USK(ssk, arkNo); } } catch (MalformedURLException e) { Logger.error(this, "Couldn't parse ARK info for "+this+": "+e, e); } catch (NumberFormatException e) { Logger.error(this, "Couldn't parse ARK info for "+this+": "+e, e); } if(ark != null) { if(myARK == null || (myARK != ark && !myARK.equals(ark))) { myARK = ark; return true; } } return false; } | 51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/c68f335b2e7b5963f848fe98c5fdf9f7c71ba69f/PeerNode.java/clean/src/freenet/node/PeerNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
1109,
9584,
12,
5784,
974,
694,
2662,
13,
288,
3639,
587,
11129,
419,
79,
273,
446,
31,
3639,
1525,
419,
79,
2279,
273,
374,
31,
3639,
775,
288,
540,
202,
780,
419,
79,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
1109,
9584,
12,
5784,
974,
694,
2662,
13,
288,
3639,
587,
11129,
419,
79,
273,
446,
31,
3639,
1525,
419,
79,
2279,
273,
374,
31,
3639,
775,
288,
540,
202,
780,
419,
79,
18... |
if (jj_scan_token(BIT_OR)) return true; if (jj_3R_216()) return true; | if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; | final private boolean jj_3R_249() { if (jj_scan_token(BIT_OR)) return true; if (jj_3R_216()) return true; return false; } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/b068fe5a79db07a544f081402e946a51a0f553c2/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,
29,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
15650,
67,
916,
3719,
327,
638,
31,
565,
309,
261,
78,
78,
67,
23,
54,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
3247,
29,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
15650,
67,
916,
3719,
327,
638,
31,
565,
309,
261,
78,
78,
67,
23,
54,
... |
case EOL: return s4; | public DFA.State transition(IntStream input) throws RecognitionException { switch ( input.LA(1) ) { case ID: case 53: return s3; case EOL: return s4; case 20: return s2; default: NoViableAltException nvae = new NoViableAltException("", 13, 1, input); throw nvae; } } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/afa2dad261bf082d1acd2655e8290f80c6bffb15/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
463,
2046,
18,
1119,
6007,
12,
1702,
1228,
810,
13,
1216,
9539,
288,
7734,
1620,
261,
810,
18,
2534,
12,
21,
13,
262,
288,
7734,
648,
1599,
30,
7734,
648,
15935,
30,
10792,
327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
463,
2046,
18,
1119,
6007,
12,
1702,
1228,
810,
13,
1216,
9539,
288,
7734,
1620,
261,
810,
18,
2534,
12,
21,
13,
262,
288,
7734,
648,
1599,
30,
7734,
648,
15935,
30,
10792,
327,
... | |
if (roots.contains(element)) { | if (false && isTreepathContentProvider) { ITreePathContentProvider treePathContentProvider = (ITreePathContentProvider) contentProvider; foundRoot = treePathContentProvider.getParents(element).length > 0; System.out.println("found root for " + element + " : " + foundRoot); element = null; } else if (roots.contains(element)) { | private Saveable[] computeSaveables() { ITreeContentProvider contentProvider = (ITreeContentProvider) viewer .getContentProvider(); Object viewerInput = viewer.getInput(); List result = new ArrayList(); Set roots = new HashSet(Arrays.asList(contentProvider .getElements(viewerInput))); SaveablesProvider[] saveablesProviders = getSaveablesProviders(); for (int i = 0; i < saveablesProviders.length; i++) { SaveablesProvider saveablesProvider = saveablesProviders[i]; Saveable[] saveables = saveablesProvider.getSaveables(); for (int j = 0; j < saveables.length; j++) { Saveable saveable = saveables[j]; Object[] elements = saveablesProvider.getElements(saveable); // the saveable is added to the result if at least one of the // elements representing the saveable appears in the tree, i.e. // if its parent chain leads to a root node. boolean foundRoot = false; for (int k = 0; !foundRoot && k < elements.length; k++) { Object element = elements[k]; while (!foundRoot && element != null) { if (roots.contains(element)) { // found a parent chain leading to a root. The // saveable is part of the tree. result.add(saveable); foundRoot = true; } else { element = contentProvider.getParent(element); } } } } } return (Saveable[]) result.toArray(new Saveable[result.size()]); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/9b4676789dcf60feae3ce4307e43ed05c9614f6a/NavigatorSaveablesService.java/buggy/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorSaveablesService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
7074,
429,
8526,
3671,
4755,
1538,
1435,
288,
202,
202,
1285,
992,
1350,
2249,
913,
2249,
273,
261,
1285,
992,
1350,
2249,
13,
14157,
9506,
202,
18,
588,
1350,
2249,
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,
225,
202,
1152,
7074,
429,
8526,
3671,
4755,
1538,
1435,
288,
202,
202,
1285,
992,
1350,
2249,
913,
2249,
273,
261,
1285,
992,
1350,
2249,
13,
14157,
9506,
202,
18,
588,
1350,
2249,
5621,
202,... |
Node internalInsertBefore(Node newChild, Node refChild,int mutationMask) throws DOMException { if (isReadOnly()) throw new DOMExceptionImpl( DOMException.NO_MODIFICATION_ALLOWED_ERR, "DOM001 Modification not allowed"); boolean errorChecking = ownerDocument.errorChecking; if (errorChecking && newChild.getOwnerDocument() != ownerDocument) { throw new DOMExceptionImpl(DOMException.WRONG_DOCUMENT_ERR, "DOM005 Wrong document"); } if (needsSyncChildren()) { synchronizeChildren(); } if (errorChecking) { // Prevent cycles in the tree boolean treeSafe = true; for (NodeImpl a = parentNode(); treeSafe && a != null; a = a.parentNode()) { treeSafe = newChild != a; } if(!treeSafe) { throw new DOMExceptionImpl(DOMException.HIERARCHY_REQUEST_ERR, "DOM006 Hierarchy request error"); } // refChild must in fact be a child of this node (or null) if(refChild != null && refChild.getParentNode() != this) { throw new DOMExceptionImpl(DOMException.NOT_FOUND_ERR, "DOM008 Not found"); } } if (newChild.getNodeType() == Node.DOCUMENT_FRAGMENT_NODE) { // SLOW BUT SAFE: We could insert the whole subtree without // juggling so many next/previous pointers. (Wipe out the // parent's child-list, patch the parent pointers, set the // ends of the list.) But we know some subclasses have special- // case behavior they add to insertBefore(), so we don't risk it. // This approch also takes fewer bytecodes. // NOTE: If one of the children is not a legal child of this // node, throw HIERARCHY_REQUEST_ERR before _any_ of the children // have been transferred. (Alternative behaviors would be to // reparent up to the first failure point or reparent all those // which are acceptable to the target node, neither of which is // as robust. PR-DOM-0818 isn't entirely clear on which it // recommends????? // No need to check kids for right-document; if they weren't, // they wouldn't be kids of that DocFrag. for (Node kid = newChild.getFirstChild(); // Prescan kid != null; kid = kid.getNextSibling()) { if (errorChecking && !ownerDocument.isKidOK(this, kid)) { throw new DOMExceptionImpl( DOMException.HIERARCHY_REQUEST_ERR, "DOM006 Hierarchy request error"); } } while (newChild.hasChildNodes()) { insertBefore(newChild.getFirstChild(), refChild); } } else if (errorChecking && (!(newChild instanceof ChildNode) || !ownerDocument.isKidOK(this, newChild))) { throw new DOMExceptionImpl(DOMException.HIERARCHY_REQUEST_ERR, "DOM006 Hierarchy request error"); } else { // Convert to internal type, to avoid repeated casting ChildNode newInternal = (ChildNode)newChild; EnclosingAttr enclosingAttr=null; if(MUTATIONEVENTS && (mutationMask&MUTATION_AGGREGATE)!=0) { // MUTATION PREPROCESSING // No direct pre-events, but if we're within the scope // of an Attr and DOMAttrModified was requested, // we need to preserve its previous value. LCount lc=LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED); if(lc.captures+lc.bubbles+lc.defaults>0) { enclosingAttr=getEnclosingAttr(); } } Node oldparent = newInternal.parentNode(); if (oldparent != null) { oldparent.removeChild(newInternal); } // Convert to internal type, to avoid repeated casting ChildNode refInternal = (ChildNode)refChild; ChildNode prev; // Find the node we're inserting after, if any (null if // inserting to head of list) prev = (refInternal == null) ? lastChild() : refInternal.previousSibling; // Attach up newInternal.ownerNode = this; newInternal.isOwned(true); // Attach after newInternal.previousSibling = prev; if (refInternal == firstChild) { firstChild = newInternal; newInternal.isFirstChild(true); } else { prev.nextSibling = newInternal; } // Attach before newInternal.nextSibling = refInternal; if (refInternal == null) { // store lastChild as previous sibling of first child firstChild.previousSibling = newInternal; } else { refInternal.previousSibling = newInternal; refInternal.isFirstChild(false); } changed(); // update cache if we have any if (nodeListLength != -1) { nodeListLength++; } if (nodeListIndex != -1) { // if the cache happens to be the refNode do the obvious if (nodeListNode == refInternal) { nodeListIndex--; nodeListNode = newInternal; } else { // otherwise just invalidate it nodeListIndex = -1; } } if(MUTATIONEVENTS) { // MUTATION POST-EVENTS: // "Local" events (non-aggregated) if( (mutationMask&MUTATION_LOCAL) != 0) { // New child is told it was inserted, and where LCount lc = LCount.lookup(MutationEventImpl.DOM_NODE_INSERTED); if(lc.captures+lc.bubbles+lc.defaults>0) { MutationEvent me= new MutationEventImpl(); //?????ownerDocument.createEvent("MutationEvents"); me.initMutationEvent( MutationEventImpl.DOM_NODE_INSERTED, true,false,this,null,null,null); newInternal.dispatchEvent(me); } // If within the Document, tell the subtree it's been added // to the Doc. lc=LCount.lookup( MutationEventImpl.DOM_NODE_INSERTED_INTO_DOCUMENT); if(lc.captures+lc.bubbles+lc.defaults>0) { NodeImpl eventAncestor=this; if(enclosingAttr!=null) eventAncestor= (NodeImpl)(enclosingAttr.node.getOwnerElement()); if(eventAncestor!=null) // Might have been orphan Attr { NodeImpl p=eventAncestor; while(p!=null) { eventAncestor=p; // Last non-null ancestor // In this context, ancestry includes // walking back from Attr to Element if(p.getNodeType()==ATTRIBUTE_NODE) p=(ElementImpl) ((AttrImpl)p).getOwnerElement(); else p=p.parentNode(); } if(eventAncestor.getNodeType()==Node.DOCUMENT_NODE) { MutationEvent me= new MutationEventImpl(); //??ownerDocument.createEvent("MutationEvents") me.initMutationEvent(MutationEventImpl .DOM_NODE_INSERTED_INTO_DOCUMENT, false,false, null,null,null,null); dispatchEventToSubtree(newInternal,me); } } } } // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified // (Common to most kinds of mutation) if( (mutationMask&MUTATION_AGGREGATE) != 0) dispatchAggregateEvents(enclosingAttr); } } return newChild; } // internalInsertBefore(Node,Node,int):Node | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/42188be95585cd27cb21281ae3b2fd0eb6e81439/ParentNode.java/clean/src/org/apache/xerces/dom/ParentNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
2029,
225,
2713,
4600,
4649,
12,
907,
225,
19783,
16,
225,
2029,
225,
1278,
1763,
16,
474,
225,
11934,
5796,
13,
5375,
1216,
225,
4703,
503,
225,
288,
540,
202,
430,
225,
261,
291,
1206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
2029,
225,
2713,
4600,
4649,
12,
907,
225,
19783,
16,
225,
2029,
225,
1278,
1763,
16,
474,
225,
11934,
5796,
13,
5375,
1216,
225,
4703,
503,
225,
288,
540,
202,
430,
225,
261,
291,
1206... | ||
private static ChoiceItem[] buildChoiceItems(String[] stringElements, Image[] imageElements, int choiceType, Style style) | protected static ChoiceItem[] buildChoiceItems(String[] stringElements, Image[] imageElements, int choiceType, Style style) | private static ChoiceItem[] buildChoiceItems(String[] stringElements, Image[] imageElements, int choiceType, Style style) { //#ifndef polish.skipArgumentCheck if (imageElements != null && imageElements.length != stringElements.length) { //#ifdef polish.verboseDebug throw new IllegalArgumentException("imageElements need to have the same length as the stringElements."); //#else //# throw new IllegalArgumentException(); //#endif } //#endif ChoiceItem[] items = new ChoiceItem[stringElements.length]; for (int i = 0; i < stringElements.length; ++i) { Image img = null; if (imageElements != null) { img = imageElements[i]; } items[i] = new ChoiceItem( stringElements[i], img, choiceType, style ); } return items; } | 9804 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9804/ea4ecf45305dae00d475324f70dd60e969446dbb/ChoiceGroup.java/clean/j2me/source/src/de/enough/polish/ui/ChoiceGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
16432,
1180,
8526,
1361,
10538,
3126,
12,
780,
8526,
533,
3471,
16,
3421,
8526,
1316,
3471,
16,
509,
6023,
559,
16,
9767,
2154,
13,
202,
95,
202,
202,
759,
7,
430,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
16432,
1180,
8526,
1361,
10538,
3126,
12,
780,
8526,
533,
3471,
16,
3421,
8526,
1316,
3471,
16,
509,
6023,
559,
16,
9767,
2154,
13,
202,
95,
202,
202,
759,
7,
430,
82,
... |
public void collapse() { Object[] nodeList = this.getContainedElements().toArray(); ConnectionSet cs = this.localGraphStruct.getConnectionSet(); this.localGraphStruct.getJGraph().getGraphLayoutCache().setVisible(new Object[]{this}, true); Iterator splitEdgeIter = localGraphStruct.getGraphModel().edges(this.getSplitter().getPort()); Iterator joinEdgeIter = localGraphStruct.getGraphModel().edges(this.getJoiner().getPort()); ArrayList edgesToRemove = new ArrayList(); while (joinEdgeIter.hasNext()) { DefaultEdge edge = (DefaultEdge) joinEdgeIter.next(); Iterator sourceIter = this.getJoiner().getSourceEdges().iterator(); while(sourceIter.hasNext()) { DefaultEdge target = (DefaultEdge) sourceIter.next(); if(target.equals(edge)) { cs.disconnect(edge, true); cs.connect(edge, this.getPort(), true); this.addSourceEdge(edge); edgesToRemove.add(edge); } } Iterator targetIter = this.getSplitter().getTargetEdges().iterator(); while(targetIter.hasNext()) { DefaultEdge source = (DefaultEdge) targetIter.next(); if (source.equals(edge)) { cs.disconnect(edge,false); cs.connect(edge, this.getPort(),false); this.addTargetEdge(edge); edgesToRemove.add(edge); } } } while (splitEdgeIter.hasNext()) { DefaultEdge edge = (DefaultEdge) splitEdgeIter.next(); Iterator sourceIter = this.getJoiner().getSourceEdges().iterator(); while(sourceIter.hasNext()) { DefaultEdge source = (DefaultEdge) sourceIter.next(); if(source.equals(edge)) { cs.disconnect(edge, true); cs.connect(edge, this.getPort(), true); this.addSourceEdge(edge); edgesToRemove.add(edge); } } Iterator targetIter = this.getSplitter().getTargetEdges().iterator(); while(targetIter.hasNext()) { DefaultEdge target = (DefaultEdge) targetIter.next(); if (target.equals(edge)) { cs.disconnect(edge,false); cs.connect(edge, this.getPort(),false); this.addTargetEdge(edge); edgesToRemove.add(edge); } } } Object[] removeArray = edgesToRemove.toArray(); for(int i = 0; i<removeArray.length;i++) { this.splitter.removeSourceEdge((DefaultEdge)removeArray[i]); this.splitter.removeTargetEdge((DefaultEdge)removeArray[i]); this.joiner.removeSourceEdge((DefaultEdge)removeArray[i]); this.joiner.removeTargetEdge((DefaultEdge)removeArray[i]); } GraphConstants.setAutoSize(this.attributes, true); this.localGraphStruct.getGraphModel().edit(localGraphStruct.getAttributes(), cs, null, null); this.localGraphStruct.getJGraph().getGraphLayoutCache().setVisible(nodeList, false); for (int i = level - 1; i >= 0; i--) { this.localGraphStruct.containerNodes.hideContainersAtLevel(i); } //JGraphLayoutManager manager = new JGraphLayoutManager(this.localGraphStruct.getJGraph()); JGraphLayoutManager manager = new JGraphLayoutManager(this.localGraphStruct); manager.arrange(); for (int i = level - 1; i >= 0; i--) { this.localGraphStruct.setLocationContainersAtLevel(i); } } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/9574bffa88473a3796b28f590b1c66b1a1a61c01/GEFeedbackLoop.java/clean/streams/src/streamit/eclipse/grapheditor/graph/GEFeedbackLoop.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6459,
21405,
1435,
202,
95,
202,
202,
921,
8526,
2159,
682,
33,
2211,
18,
588,
660,
8707,
3471,
7675,
31447,
5621,
202,
202,
1952,
694,
2143,
33,
2211,
18,
3729,
4137,
3823,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6459,
21405,
1435,
202,
95,
202,
202,
921,
8526,
2159,
682,
33,
2211,
18,
588,
660,
8707,
3471,
7675,
31447,
5621,
202,
202,
1952,
694,
2143,
33,
2211,
18,
3729,
4137,
3823,
1... | ||
} | protected void createButtonsForButtonBar(Composite parent) { // create OK and Cancel buttons by default okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); //do this here because setting the text will set enablement on the ok button text.setFocus(); if (value != null) { text.setText(value); text.selectAll(); }} | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/b55db1f8df03ebade4e59f55f97c8c3917057362/InputDialog.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/InputDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
752,
14388,
1290,
3616,
5190,
12,
9400,
982,
13,
288,
202,
759,
752,
7791,
471,
10347,
9502,
635,
805,
202,
601,
3616,
273,
752,
3616,
12,
2938,
16,
1599,
3529,
2918,
18,
3141,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
752,
14388,
1290,
3616,
5190,
12,
9400,
982,
13,
288,
202,
759,
752,
7791,
471,
10347,
9502,
635,
805,
202,
601,
3616,
273,
752,
3616,
12,
2938,
16,
1599,
3529,
2918,
18,
3141,
67... | |
return (Resource) resources.get(name); | Resource res = (Resource) resources.get(name); if (res == null) { res = createResource(name); resources.put(name, res); } return res; | public Resource getResource(String name) { update(); return (Resource) resources.get(name); } | 46029 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46029/7af9cc6a222e81c3d73450dc423d89bd58b55cd0/AbstractRepository.java/clean/src/helma/framework/repository/AbstractRepository.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2591,
5070,
12,
780,
508,
13,
288,
3639,
1089,
5621,
3639,
2591,
400,
273,
261,
1420,
13,
2703,
18,
588,
12,
529,
1769,
225,
309,
261,
455,
422,
446,
13,
288,
400,
273,
24317,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2591,
5070,
12,
780,
508,
13,
288,
3639,
1089,
5621,
3639,
2591,
400,
273,
261,
1420,
13,
2703,
18,
588,
12,
529,
1769,
225,
309,
261,
455,
422,
446,
13,
288,
400,
273,
24317,
1... |
KnowledgeFlowApp kna = KnowledgeFlowApp.getSingleton(); | final KnowledgeFlowApp kna = KnowledgeFlowApp.getSingleton(); | public GUIChooser() { super("Weka GUI Chooser"); Image icon = Toolkit.getDefaultToolkit(). getImage(ClassLoader.getSystemResource("weka/gui/weka_icon.gif")); setIconImage(icon); this.getContentPane().setLayout(new BorderLayout()); JPanel wbuts = new JPanel(); wbuts.setBorder(BorderFactory.createTitledBorder("GUI")); wbuts.setLayout(new GridLayout(3, 2)); wbuts.add(m_SimpleBut); wbuts.add(m_ExplorerBut); wbuts.add(m_ExperimenterBut); wbuts.add(m_KnowledgeFlowBut); wbuts.add(m_ArffViewerBut); wbuts.add(m_LogWindowBut); this.getContentPane().add(wbuts, BorderLayout.SOUTH); JPanel wekaPan = new JPanel(); wekaPan.setToolTipText("Weka, a native bird of New Zealand"); ImageIcon wii = new ImageIcon(m_weka); JLabel wekaLab = new JLabel(wii); wekaPan.add(wekaLab); this.getContentPane().add(wekaPan, BorderLayout.CENTER); JPanel titlePan = new JPanel(); titlePan.setLayout(new GridLayout(8,1)); titlePan.setBorder(BorderFactory.createEmptyBorder(10, 5, 10, 5)); titlePan.add(new JLabel("Waikato Environment for", SwingConstants.CENTER)); titlePan.add(new JLabel("Knowledge Analysis", SwingConstants.CENTER)); titlePan.add(new JLabel("")); titlePan.add(new JLabel("Version " + Version.VERSION, SwingConstants.CENTER)); titlePan.add(new JLabel("")); titlePan.add(new JLabel("(c) 1999 - 2005", SwingConstants.CENTER)); titlePan.add(new JLabel("University of Waikato", SwingConstants.CENTER)); titlePan.add(new JLabel("New Zealand", SwingConstants.CENTER)); this.getContentPane().add(titlePan, BorderLayout.NORTH); m_SimpleBut.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (m_SimpleCLI == null) { m_SimpleBut.setEnabled(false); try { m_SimpleCLI = new SimpleCLI(); } catch (Exception ex) { throw new Error("Couldn't start SimpleCLI!"); } m_SimpleCLI.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent w) { m_SimpleCLI.dispose(); m_SimpleCLI = null; m_SimpleBut.setEnabled(true); checkExit(); } }); m_SimpleCLI.setVisible(true); } } }); m_ExplorerBut.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (m_ExplorerFrame == null) { m_ExplorerBut.setEnabled(false); m_ExplorerFrame = new JFrame("Weka Explorer"); m_ExplorerFrame.getContentPane().setLayout(new BorderLayout()); m_ExplorerFrame.getContentPane() .add(new Explorer(), BorderLayout.CENTER); m_ExplorerFrame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent w) { m_ExplorerFrame.dispose(); m_ExplorerFrame = null; m_ExplorerBut.setEnabled(true); checkExit(); } }); m_ExplorerFrame.pack(); m_ExplorerFrame.setSize(800, 600); m_ExplorerFrame.setVisible(true); } } }); m_ExperimenterBut.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (m_ExperimenterFrame == null) { m_ExperimenterBut.setEnabled(false); m_ExperimenterFrame = new JFrame("Weka Experiment Environment"); m_ExperimenterFrame.getContentPane().setLayout(new BorderLayout()); m_ExperimenterFrame.getContentPane() .add(new Experimenter(false), BorderLayout.CENTER); m_ExperimenterFrame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent w) { m_ExperimenterFrame.dispose(); m_ExperimenterFrame = null; m_ExperimenterBut.setEnabled(true); checkExit(); } }); m_ExperimenterFrame.pack(); m_ExperimenterFrame.setSize(800, 600); m_ExperimenterFrame.setVisible(true); } } }); KnowledgeFlowApp.addStartupListener(new weka.gui.beans.StartUpListener() { public void startUpComplete() { if (m_KnowledgeFlowFrame == null) { KnowledgeFlowApp kna = KnowledgeFlowApp.getSingleton(); m_KnowledgeFlowBut.setEnabled(false); m_KnowledgeFlowFrame = new JFrame("Weka KnowledgeFlow Environment"); m_KnowledgeFlowFrame.getContentPane().setLayout(new BorderLayout()); m_KnowledgeFlowFrame.getContentPane() .add(kna, BorderLayout.CENTER); m_KnowledgeFlowFrame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent w) { m_KnowledgeFlowFrame.dispose(); m_KnowledgeFlowFrame = null; weka.gui.beans.BeanConnection.reset(); weka.gui.beans.BeanInstance.reset(null); m_KnowledgeFlowBut.setEnabled(true); checkExit(); } }); m_KnowledgeFlowFrame.pack(); m_KnowledgeFlowFrame.setSize(900, 600); m_KnowledgeFlowFrame.setVisible(true); } } }); m_KnowledgeFlowBut.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { KnowledgeFlow.startApp(); } }); m_ArffViewerBut.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ArffViewer av = new ArffViewer(); av.setVisible(true); m_ArffViewers.add(av); } }); m_LogWindowBut.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { m_LogWindow.setVisible(true); } }); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent w) { dispose(); checkExit(); } }); pack(); } | 6866 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6866/1e7c5001f8e3f4ea1839c1ea366643b1a1c8cd98/GUIChooser.java/clean/gui/GUIChooser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
10978,
17324,
1435,
288,
565,
2240,
2932,
3218,
7282,
10978,
1680,
83,
13164,
8863,
3639,
3421,
4126,
273,
13288,
8691,
18,
588,
1868,
6364,
8691,
7675,
565,
10567,
12,
7805,
18,
588,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10978,
17324,
1435,
288,
565,
2240,
2932,
3218,
7282,
10978,
1680,
83,
13164,
8863,
3639,
3421,
4126,
273,
13288,
8691,
18,
588,
1868,
6364,
8691,
7675,
565,
10567,
12,
7805,
18,
588,... |
} if (e.getAttribute("IsCategory").compareTo("true") == 0) { t.setIsCategory(true); } else { t.setIsCategory(false); } | } | public static ITask readTask(Node node, ITask root, TaskList tlist) { //extract node and create new sub task // Element e = (Element) node; ITask t; String handle = ""; if (e.hasAttribute("ID")) { handle = e.getAttribute("ID"); } else { handle = e.getAttribute("Handle"); } String label = e.getAttribute("Label"); String priority = e.getAttribute("Priority"); if (e.getAttribute("Bugzilla").compareTo("true") == 0) { t = new BugzillaTask(handle, label, true); BugzillaTask bt = (BugzillaTask) t; bt.setState(BugTaskState.FREE); bt.setLastRefresh(new Date(new Long(e.getAttribute("LastDate")) .longValue())); if (e.getAttribute("Dirty").compareTo("true") == 0) { bt.setDirty(true); } else { bt.setDirty(false); } if (bt.readBugReport() == false) { MylarPlugin.log("Failed to read bug report", null); } } else { t = new Task(handle, label); } t.setPriority(priority); t.setPath(e.getAttribute("Path")); if (e.getAttribute("Active").compareTo("true") == 0) { t.setActive(true); tlist.setActive(t, true); } else { t.setActive(false); } if (e.getAttribute("Complete").compareTo("true") == 0) { t.setCompleted(true); } else { t.setCompleted(false); } if (e.getAttribute("IsCategory").compareTo("true") == 0) { t.setIsCategory(true); } else { t.setIsCategory(false); } if (e.hasAttribute("Notes")) { t.setNotes(e.getAttribute("Notes")); } else { t.setNotes(""); } if (e.hasAttribute("Elapsed")) { t.setElapsedTime(e.getAttribute("Elapsed")); } else { t.setElapsedTime(""); } if (e.hasAttribute("Estimated")) { t.setEstimatedTime(e.getAttribute("Estimated")); } else { t.setEstimatedTime(""); } int i = 0; while (e.hasAttribute("link"+i)) { t.getRelatedLinks().add(e.getAttribute("link"+i)); i++; } if (!readVersion.equals("1.0.0")) { // for newer revisions // XXX: readVersion had to be read once to remove warning.. } i = 0; NodeList list = e.getChildNodes(); for (i = 0; i < list.getLength(); i++) { Node child = list.item(i); t.addSubtask(readTask(child, t, tlist)); } if (root != null) { t.setParent(root); } return t; } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/9fa4576e36e0ed40d7b1e9e3379eb977186a3224/XmlUtil.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/util/XmlUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
467,
2174,
855,
2174,
12,
907,
756,
16,
467,
2174,
1365,
16,
3837,
682,
268,
1098,
13,
288,
202,
202,
759,
8004,
756,
471,
752,
394,
720,
1562,
202,
202,
759,
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,
760,
467,
2174,
855,
2174,
12,
907,
756,
16,
467,
2174,
1365,
16,
3837,
682,
268,
1098,
13,
288,
202,
202,
759,
8004,
756,
471,
752,
394,
720,
1562,
202,
202,
759,
202,
202,... |
public void setAttribute(String name, Object value) { if( proxyFactory != null ) proxyFactory.setAttribute(name,value); | public void setAttribute (String name, Object value) { if (proxyFactory != null) { proxyFactory.setAttribute (name, value); } | public void setAttribute(String name, Object value) { if( proxyFactory != null ) proxyFactory.setAttribute(name,value); if (value == null) { attributes.remove(name); } else { attributes.put(name, value); } } | 4082 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4082/62d71000b6d84642b07f67c825f685d42190715c/LogFactoryImpl.java/clean/src/java/org/logicalcobwebs/logging/impl/LogFactoryImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4730,
12,
780,
508,
16,
1033,
460,
13,
288,
3639,
309,
12,
2889,
1733,
480,
446,
262,
5411,
2889,
1733,
18,
542,
1499,
12,
529,
16,
1132,
1769,
3639,
309,
261,
1132,
422,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4730,
12,
780,
508,
16,
1033,
460,
13,
288,
3639,
309,
12,
2889,
1733,
480,
446,
262,
5411,
2889,
1733,
18,
542,
1499,
12,
529,
16,
1132,
1769,
3639,
309,
261,
1132,
422,
4... |
path = getRepositoryPath(path); SVNLock lock = FSReader.getLockHelper(path, false, myReposRootDir); return lock; | try{ openRepository(); path = SVNPathUtil.canonicalizeAbsPath(getRepositoryPath(path)); SVNLock lock = FSReader.getLockHelper(path, false, myReposRootDir); return lock; }finally{ closeRepository(); } | public SVNLock getLock(String path) throws SVNException { path = getRepositoryPath(path); SVNLock lock = FSReader.getLockHelper(path, false, myReposRootDir); return lock; } | 2776 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2776/b3f8504a7a88adac90f7f3c9205942041f95e328/FSRepository.java/clean/javasvn/src/org/tmatesoft/svn/core/internal/io/fs/FSRepository.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
29537,
50,
2531,
22206,
12,
780,
589,
13,
1216,
29537,
50,
503,
288,
3639,
589,
273,
8261,
743,
12,
803,
1769,
3639,
29537,
50,
2531,
2176,
273,
9247,
2514,
18,
588,
2531,
2276,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
29537,
50,
2531,
22206,
12,
780,
589,
13,
1216,
29537,
50,
503,
288,
3639,
589,
273,
8261,
743,
12,
803,
1769,
3639,
29537,
50,
2531,
2176,
273,
9247,
2514,
18,
588,
2531,
2276,
1... |
"An error occurred while setting the value."); | BindingMessages.getString("ValueBinding_ErrorWhileSettingValue")); | public void updateModelFromTarget() { Object value = target.getValue(); String validationError = doValidateTarget(value); if (validationError == null) { try { model.setValue(converter.convertTargetToModel(value)); } catch (Exception ex) { context.updateValidationError(this, "An error occurred while setting the value."); } } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/72f1f804799a0ffd127eeb44d2c1cc0229cf194a/ValueBinding.java/buggy/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/binding/internal/ValueBinding.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1089,
1488,
1265,
2326,
1435,
288,
202,
202,
921,
460,
273,
1018,
18,
24805,
5621,
202,
202,
780,
3379,
668,
273,
741,
4270,
2326,
12,
1132,
1769,
202,
202,
430,
261,
868... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1089,
1488,
1265,
2326,
1435,
288,
202,
202,
921,
460,
273,
1018,
18,
24805,
5621,
202,
202,
780,
3379,
668,
273,
741,
4270,
2326,
12,
1132,
1769,
202,
202,
430,
261,
868... |
case LogChute.TRACE_ID: logger.debug(RuntimeConstants.TRACE_PREFIX + message); | case TRACE_ID: logger.debug(TRACE_PREFIX + message); | public void log(int level, String message) { /* * based on level, call the right logger method * and prefix with the appropos prefix */ switch (level) { case LogChute.WARN_ID: logger.warn( RuntimeConstants.WARN_PREFIX + message ); break; case LogChute.INFO_ID: logger.info( RuntimeConstants.INFO_PREFIX + message); break; case LogChute.DEBUG_ID: logger.debug( RuntimeConstants.DEBUG_PREFIX + message); break; case LogChute.TRACE_ID: logger.debug(RuntimeConstants.TRACE_PREFIX + message); break; case LogChute.ERROR_ID: logger.error(RuntimeConstants.ERROR_PREFIX + message); break; default: logger.info( message); break; } } | 9291 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9291/1b548b8f3043015b71b0698aa7fa1f775125d16c/AvalonLogChute.java/buggy/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
613,
12,
474,
1801,
16,
514,
883,
13,
565,
288,
3639,
1748,
540,
380,
2511,
603,
1801,
16,
745,
326,
2145,
1194,
707,
540,
380,
471,
1633,
598,
326,
6617,
917,
1633,
540,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
474,
1801,
16,
514,
883,
13,
565,
288,
3639,
1748,
540,
380,
2511,
603,
1801,
16,
745,
326,
2145,
1194,
707,
540,
380,
471,
1633,
598,
326,
6617,
917,
1633,
540,
1... |
if(subNode != null) { | if (subNode != null) { | public void layout() { // Determine all the up- and downlinks for each node for(int i=0; i < _layoutedClassNodes.size(); i++) { ClassdiagramNode classdiagramNode = getClassdiagramNode(i); if(!classdiagramNode.isPackage()) { Object node = classdiagramNode.getFigure().getOwner(); if ( ModelFacade.isAModelElement(node)) { Vector specs = new Vector(((MModelElement)node).getClientDependencies()); specs.addAll(ModelFacade.getSupplierDependencies(node)); for( Iterator iter = specs.iterator(); iter.hasNext(); ) { // Realizations are stored as MAbstractions with a stereotype 'realize'. // MAbstraction is a subclass of MDependency, so get all the dependencies // for this node to get the abstractions, too. Object dep = iter.next(); if( ModelFacade.isAAbstraction(dep)) { // Is this a abstraction? Object abstr = dep; if (ModelFacade.isRealize(abstr)) { // Is this node the class, that implements the interface? Collection clients = ModelFacade.getClients(abstr); for( Iterator iter2 = clients.iterator(); iter2.hasNext(); ) { MModelElement me = (MModelElement)iter2.next(); if(node == me) { Collection suppliers = ModelFacade.getSuppliers(abstr); for( Iterator iter3 = suppliers.iterator(); iter3.hasNext(); ) { Object me2 = iter3.next(); if(ModelFacade.isAClassifier(me2)) { ClassdiagramNode superNode = getClassdiagramNode4owner(me2); if(superNode != null) { classdiagramNode.addUplink(superNode); } } } } } // Or the implemented interface? Collection suppliers = ModelFacade.getSuppliers(abstr); for( Iterator iter2 = suppliers.iterator(); iter2.hasNext(); ) { MModelElement me = (MModelElement)iter2.next(); if(node == me) { clients = ModelFacade.getClients(abstr); for( Iterator iter3 = clients.iterator(); iter3.hasNext(); ) { Object me2 = iter3.next(); if(ModelFacade.isAClassifier(me2)) { ClassdiagramNode subNode = getClassdiagramNode4owner(me2); if(subNode != null) { classdiagramNode.addDownlink(subNode); } } } } } } } } } if ( ModelFacade.isAGeneralizableElement(node) ) { for( Iterator iter = ModelFacade.getGeneralizations(node) ; iter.hasNext(); ) { Object g = iter.next(); ClassdiagramNode superNode = getClassdiagramNode4owner(ModelFacade.getParent(g)); if(superNode != null) { classdiagramNode.addUplink(superNode); } } for( Iterator iter = ModelFacade.getSpecializations(node); iter.hasNext(); ) { Object s = iter.next(); ClassdiagramNode subNode = getClassdiagramNode4owner(ModelFacade.getChild(s)); if(subNode != null) { classdiagramNode.addDownlink(subNode); } } } } } // determine maximum package rank and move the classes below rankPackagesAndMoveClassesBelow(); // layout the Packages layoutPackages(); // weightAndPlaceClasses() weightAndPlaceClasses(); // center rows //centerPlacedRows(); ClassdiagramEdge.setVGap(_vGap); ClassdiagramEdge.setHGap(_hGap); for (int i = 0; i < _layoutedObjects.size(); i++) if (_layoutedObjects.elementAt(i) instanceof ClassdiagramEdge) ((ClassdiagramEdge)_layoutedObjects.elementAt(i)).layout(); // Globals.curEditor().damageAll(); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/ca3bcb5d6dd283c4553bcbfe50b108dc5d499768/ClassdiagramLayouter.java/clean/src_new/org/argouml/uml/diagram/static_structure/layout/ClassdiagramLayouter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3511,
1435,
288,
27573,
368,
10229,
777,
326,
731,
17,
471,
2588,
7135,
364,
1517,
756,
3639,
364,
12,
474,
277,
33,
20,
31,
277,
411,
389,
6741,
329,
797,
3205,
18,
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,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3511,
1435,
288,
27573,
368,
10229,
777,
326,
731,
17,
471,
2588,
7135,
364,
1517,
756,
3639,
364,
12,
474,
277,
33,
20,
31,
277,
411,
389,
6741,
329,
797,
3205,
18,
1467,
... |
patchView.showPatch(backEnd, repositoryRoot, null, null, status.getName()); | if (status.getState() == FileStatus.NEW) { DefaultListModel model = new DefaultListModel(); String[] lines = StringUtilities.readLinesFromFile(new File(repositoryRoot, status.getName()).getAbsolutePath()); for (int i = 0; i < lines.length; ++i) { model.addElement(lines[i]); } patchView.setModel(model); } else { patchView.showPatch(backEnd, repositoryRoot, null, null, status.getName()); } | public void valueChanged(ListSelectionEvent e) { if (e.getValueIsAdjusting()) { return; } final int selectedRow = statusesTable.getSelectedRow(); FileStatus status = statusesTableModel.getFileStatus(selectedRow); patchView.showPatch(backEnd, repositoryRoot, null, null, status.getName()); } | 10883 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10883/f41bb209e0b40f911f74c83e893d68ff307a7622/CheckInWindow.java/clean/trunk/src/e/scm/CheckInWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
460,
5033,
12,
682,
6233,
1133,
425,
13,
288,
7734,
309,
261,
73,
18,
24805,
2520,
10952,
310,
10756,
288,
10792,
327,
31,
7734,
289,
27573,
727,
509,
3170,
1999,
273,
13516,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
460,
5033,
12,
682,
6233,
1133,
425,
13,
288,
7734,
309,
261,
73,
18,
24805,
2520,
10952,
310,
10756,
288,
10792,
327,
31,
7734,
289,
27573,
727,
509,
3170,
1999,
273,
13516,
... |
if(aname.equals("PLAIN")) | else if(aname.equals("PLAIN")) | public void attribute(String aname, String value, boolean specified) { if(!specified) return; if(aname.equals("X")) config.x = Integer.parseInt(value); if(aname.equals("Y")) config.y = Integer.parseInt(value); if(aname.equals("WIDTH")) config.width = Integer.parseInt(value); if(aname.equals("HEIGHT")) config.height = Integer.parseInt(value); if(aname.equals("EXT_STATE")) config.extState = Integer.parseInt(value); if(aname.equals("PLAIN")) config.plainView = ("TRUE".equals(value)); } | 6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/2510b6194362251bb1ab1e1468c834b198fc4e91/PerspectiveManager.java/buggy/org/gjt/sp/jedit/PerspectiveManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
1566,
12,
780,
392,
339,
16,
514,
460,
16,
1250,
1269,
13,
202,
202,
95,
1082,
202,
430,
12,
5,
13827,
13,
9506,
202,
2463,
31,
1082,
202,
430,
12,
304,
339,
18,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1566,
12,
780,
392,
339,
16,
514,
460,
16,
1250,
1269,
13,
202,
202,
95,
1082,
202,
430,
12,
5,
13827,
13,
9506,
202,
2463,
31,
1082,
202,
430,
12,
304,
339,
18,
149... |
addOption(ruleBreakers, new GameOption("blind_drop", "Blind Drop", "If checked, the configuration of a Mech won't be shown in the Chatroom to your opponents.", false)); | addOption(ruleBreakers, new GameOption("blind_drop", "Blind Drop", "If checked, the configuration of a Mech won't be shown in the Chatroom to your opponents.", false)); addOption(ruleBreakers, new GameOption("real_blind_drop", "Real Blind Drop", "If checked, only own units are displayed. Defaults to false.", false)); | public void initialize() { // set up game options OptionGroup base = new OptionGroup("Base Options"); addGroup(base); addOption(base, new GameOption("friendly_fire", "Friendly fire", "If checked, the game considers mechs owned by a player, or on the same team as a player, as valid targets.\n\nDefaults to checked, but unchecks when a second player joins the server.", true)); addOption(base, new GameOption("skip_ineligable_movement", "Skip ineligable during movement", "If checked, the game will skip a unit during the movement phase if it is immobile or otherwise inactive.\n\nUnchecked by default.", false)); addOption(base, new GameOption("skip_ineligable_firing", "Skip ineligable during firing", "If checked, the game will skip a unit during the firing phase if it is inactive.\n\nUnchecked by default.", false)); addOption(base, new GameOption("skip_ineligable_physical", "Skip ineligable during physical", "If checked, the game will skip a unit during the physical phase if no attacks are possible or there are no valid targets.\n\nChecked by default.", true)); addOption(base, new GameOption("push_off_board", "Allow pushing off the map", "This options allows a mech to be pushed off the map and out of the game by push, charge or DFA attacks.\n\nChecked by default.", true)); addOption(base, new GameOption("check_victory", "Check for victory", "If checked, the server will enter the victory phase at the end of any turn where victory conditions are met. Even if unchecked or conditions are not met, server admins can force victory with the /victory command.\n\nDefaults to checked.", true)); addOption(base, new GameOption("rng_type", "RNG Type", "Note: any type other than 0 or 1 is completely unofficial.\n\nValid types:\n0 - SunRandom: Sun regular RNG\n1 - CryptoRandom: Java crypto-strength RNG\n2 - Pool36Random: Pool of 36 values, randomly shuffled\n\nDefaults to 1.", 1)); addOption(base, new GameOption("team_initiative", "Teams roll initiative", "When checked, teams roll initiative as one group. This team initative is used to order the units according to the normal method. Player order on a team is determined by their own initiative.\n\nChecked by default", true)); addOption(base, new GameOption("is_eq_limits", "Ammo & Equipment Limits", "If checked, Inner Sphere units will be limited to ammo & equipment available at their build year. Turning this option off will not remove invalid equipment.\n\nChecked by default", true)); addOption(base, new GameOption("autosave_msg", "Remind on Autosave", "If checked, the server will send a message each time an auto-save is performed.\n\nChecked by default", true)); addOption(base, new GameOption("paranoid_autosave", "Paranoid Autosave", "If checked, the game will auto-save every phase.\n\nUnchecked by default", false)); OptionGroup level2 = new OptionGroup("Optional Rules (Level 2)"); addGroup(level2); addOption(level2, new GameOption("flamer_heat", "Flamers can deal heat instead of damage", "If checked, flamers can increase the heat of their target by 2 instead of dealing 2 damage.\n\nChecked by default.", true)); addOption(level2, new GameOption("fire", "Fire and smoke", "If checked, fires may be set accidentally or intentionally.\n\nChecked by default.", true)); addOption(level2, new GameOption("indirect_fire", "Indirect fire", "If checked, LRMs may be fire indirectly, and players may choose to spot for indirect fire instead of attacking.\n\nChecked by default.", true)); addOption(level2, new GameOption("minefields", "Minefields", "If checked, minefields can be used.\n\nChecked by default.", true)); addOption(level2, new GameOption("temperature", "Temperature", "The temperature the game takes place at, for use with the Extreme Temperatures rule.\n\nDefaults to 25 degrees Celsius, thus having no effect.", 25)); addOption(level2, new GameOption("gravity", "Gravity", "The gravity of the world the game takes place at, for use with the High/Low Gravity rule.\n\nDefaults to 1 G, thus having no effect.", (float)1.0)); addOption(level2, new GameOption("vacuum", "Vacuum", "If checked, the game takes place in Vacuum.\n\nUnchecked by default.", false)); OptionGroup level3 = new OptionGroup("Optional Rules (Level 3)"); addGroup(level3); addOption(level3, new GameOption("double_blind", "Double blind", "If checked, enemy units will only be visible if they are in line of sight of one or more of your units.\n\nUnchecked by default.", false)); addOption(level3, new GameOption("team_vision", "Teams share vision", "If checked, teams will share vision in double-blind mode. Only valid in double-blind mode.\n\nChecked by default.", true)); addOption(level3, new GameOption("floating_crits", "Through-armor criticals will 'float'", "If checked, rolls of '2' on hit location will result in a new location being rolled for a critical hit, instead of just hitting the local torso.\n\nUnchecked by default.", false)); addOption(level3, new GameOption("engine_explosions", "MaxTech engine explosions", "If checked, any time a mech takes 2 or more engine crits in one round, a roll of '12' will cause a cascading engine explosion.", false)); addOption(level3, new GameOption("pilot_advantages", "MaxTech pilot advantages", "If checked, players can add additional advantages to their pilots through the 'configure mech' window.", false)); addOption(level3, new GameOption("maxtech_physical_BTH", "MaxTech physical BTHs", "If checked, BTHs for physical attacks will use MaxTech levels. These levels take into account the piloting skill of the attacking unit.", false)); addOption(level3, new GameOption("maxtech_physical_psr", "MaxTech physical PSR weight difference", "If checked, after being kicked or pushed the PSR is modified by the weight classes of the two mechs. The PSR is modified by 1 point per weight class difference. The difference is added to the PSR if the attacker is heavier or subtracted if the attacker is lighter.", false)); addOption(level3, new GameOption("maxtech_round_damage", "MaxTech damage per round", "If checked, units will have +1 to their piloting skill roll for every 20 damage taken, not just the first damage. Also, BTH is altered by weight class. Lights get +1 to BTH where as assaults get -2. Mediums and heavies are in between.", false)); addOption(level3, new GameOption("maxtech_prone_fire", "MaxTech firing while prone", "If checked, mechs that are prone can fire if they are missing one arm. Standard rules disallow firing when prone and missing an arm. All weapons are +1 BTH and weapons mounted in propping arm can not be fired.", false)); addOption(level3, new GameOption("maxtech_target_modifiers", "MaxTech target movement modifiers", "If checked, the target movement modifiers table is enhanced by 3 additional steps (14-18 hexes => +5, 19-24 hexes => +6 25+ hexes => +7.", false)); addOption(level3, new GameOption("maxtech_leg_damage", "MaxTech Leg Damage Rule", "If checked, hip criticals are cummulative with other damage to legs, but reduce movement by 2 instead of halving. Destroying both hips does not reduce MPs to zero.", false)); addOption(level3, new GameOption("maxtech_fire", "MaxTech Fire/Smoke Rules", "If checked, fires create smoke that drifts and dissipates, instead of remaining static. In addition, smoke is split into light and heavy varieties.", false)); addOption(level3, new GameOption("maxtech_range", "MaxTech Extreme Range Rules", "If checked, Weapons have an extreme range bracket past their long range distance.", false)); addOption(level3, new GameOption("maxtech_LOS1", "MaxTech Diagramming Line of Sight Rules", "If checked, LOS will be calculated using the Diagramming LOS rules from MaxTech revised, page 22", false)); addOption(level3, new GameOption("maxtech_altdmg", "MaxTech Altered Energy Weapons Damage", "If checked, the damage inflicted by energy weapons (Laser, Flamer, PPC) is altered as follows: Half damage (rounded up) at extreme range, -1 damage at long range, +1 damage at range <= 1. Defaults to false.", false)); OptionGroup ruleBreakers = new OptionGroup("Optional Rules (unofficial)"); addGroup(ruleBreakers); addOption(ruleBreakers, new GameOption("no_tac", "No through-armor criticals", "If checked, rolls of '2' on hit location will only result in a torso hit, and no critical roll. Only applies to mechs. Supercedes the floating criticals option.\n\nUnchecked by default.", false)); addOption(ruleBreakers, new GameOption("no_immobile_vehicles", "Vehicles not immobilized by crits", "If checked, vehicles with a drive or engine hit will not be counted as 'immobile' for purposes of determining to-hit numbers.\n\nUnchecked by default.", false)); addOption(ruleBreakers, new GameOption("vehicles_can_eject", "Vehicles can be abandoned", "If checked, vehicle crews can leave their unit (effectively removing it from the game).\n\nUnchecked by default.", false)); addOption(ruleBreakers, new GameOption("inf_move_last", "Infantry move after Meks and Vehicles", "If checked, all Meks and Vehicles will move before the first Infantry unit. The move order of Meks and Vehicles ignores the presence of Infantry.\n\nMutually exclusive with \"" + Game.INF_AND_PROTOS_MOVE_MULTI + " Infantry for every Mek or Vehicle\".\n\nUnchecked by default.", false)); addOption(ruleBreakers, new GameOption("inf_deploy_last", "Infantry deploy after Meks and Vehicles", "If checked, all Meks and Vehicles will deploy before the first Infantry unit.\n\nThe above option, \"Infantry move after Meks and Vehicles\" must also be checked to use this option.\n\nUnchecked by default.", false)); addOption(ruleBreakers, new GameOption("inf_move_multi", Game.INF_AND_PROTOS_MOVE_MULTI + " Infantry for every Mek or Vehicle", "If checked, " + Game.INF_AND_PROTOS_MOVE_MULTI + " infantry units will have to move in place of a single Mek or Vehicle. If there are less than " + Game.INF_AND_PROTOS_MOVE_MULTI + " units remaining, they all must move. The move order includes the presence of Infantry.\n\nMutually exclusive with \"Infantry move after Meks and Vehicles\".\n\nUnchecked by default.", false)); addOption(ruleBreakers, new GameOption("inf_move_later", "A players Infantry moves after that players other units", "If checked, each player must move all their other units before they move their Infantry. If \"A players Protomechs move after that players other units\" is also checked, then Infantry and Protomechs are lumped together into the same category.\n\nMutually exclusive with \"" + Game.INF_AND_PROTOS_MOVE_MULTI + " Infantry for every Mek or Vehicle\" and \"Infantry move after Meks and Vehicles\".\n\nUnchecked by default.", false)); addOption(ruleBreakers, new GameOption("protos_move_last", "Protomechs move after Meks and Vehicles", "If checked, all Meks and Vehicles will move before the first Protomech. The move order of Meks and Vehicles ignores the presence of Protomechs.\n\nMutually exclusive with \"" + Game.INF_AND_PROTOS_MOVE_MULTI + " Protomechs for every Mek or Vehicle\".\n\nUnchecked by default.", false)); addOption(ruleBreakers, new GameOption("protos_deploy_last", "Protomechs deploy after Meks and Vehicles", "If checked, all Meks and Vehicles will deploy before the first Protomech.\n\nThe above option, \"Protomechs move after Meks and Vehicles\" must also be checked to use this option.\n\nUnchecked by default.", false)); addOption(ruleBreakers, new GameOption("protos_move_multi", Game.INF_AND_PROTOS_MOVE_MULTI + " Protomechs for every Mek or Vehicle", "If checked, " + Game.INF_AND_PROTOS_MOVE_MULTI + " protomechs will have to move in place of a single Mek or Vehicle. If there are less than " + Game.INF_AND_PROTOS_MOVE_MULTI + " protos remaining, they all must move. The move order includes the presence of Protomechs.\n\nMutually exclusive with \"Protomechs move after Meks and Vehicles\".\n\nUnchecked by default.", false)); addOption(ruleBreakers, new GameOption("protos_move_later", "A players Protomechs move after that players other units", "If checked, each player must move all their other units before they move their Protomechs. If \"A players Infantry moves after that players other units\" is also checked, then Infantry and Protomechs are lumped together into the same category.\n\nMutually exclusive with \"" + Game.INF_AND_PROTOS_MOVE_MULTI + " Protomechs for every Mek or Vehicle\" and \"Protomechs move after Meks and Vehicles\".\n\nUnchecked by default.", false)); addOption(ruleBreakers, new GameOption("blind_drop", "Blind Drop", "If checked, the configuration of a Mech won't be shown in the Chatroom to your opponents.", false)); addOption(ruleBreakers, new GameOption("clan_ignore_eq_limits", "Ignore Clan Ammo Limitations", "If checked, Clan units can use ammo normally limited to IS units only; for example, Thunder-Augmented, Thunder-Inferno, and Thunder-Active LRM rounds.", false)); addOption(ruleBreakers, new GameOption("no_clan_physical", "No physical attacks for the clans", "If checked, clan Meks may not make physical attacks.\n\nUnchecked by default.", false)); addOption(ruleBreakers, new GameOption("no_hover_charge", "No charge attacks for Hover vehicles", "If checked, Hover vehicles may not make rams/charges.\n\nUnchecked by default.", false)); addOption(ruleBreakers, new GameOption("woods_burn_down", "Woods have a chance to burn down", "If checked, woods will burn down as if cleared on a roll of 11+.\n\nUnchecked by default.", false)); addOption(ruleBreakers, new GameOption("vechicles_safe_from_infernos", "Vehicles may not be the target of an Inferno missle attack.", "If checked, Vehicles cannot be the target of an Inferno SRM attack.\n\nUnchecked by default.", false)); addOption(ruleBreakers, new GameOption("protos_safe_from_infernos", "Protomechs may not be the target of an Inferno missle attack.", "If checked, Protomechs cannot be the target of an Inferno SRM attack.\n\nUnchecked by default.", false)); addOption(ruleBreakers, new GameOption("check_leg_breaches", "Check for Leg breaches in Level 1 water", "If checked, a Mek standing in Level 1 water will check for hull breaches (which is **against** the rules on page 94 of the BMRr).\n\nUnchecked by default.", false)); } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/28df75260f3e25c6327b43a9f2c570470b7a1758/GameOptions.java/buggy/megamek/src/megamek/common/GameOptions.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4046,
1435,
288,
3639,
368,
444,
731,
7920,
702,
3639,
2698,
1114,
1026,
273,
394,
2698,
1114,
2932,
2171,
5087,
8863,
3639,
18899,
12,
1969,
1769,
3639,
12966,
12,
1969,
16,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4046,
1435,
288,
3639,
368,
444,
731,
7920,
702,
3639,
2698,
1114,
1026,
273,
394,
2698,
1114,
2932,
2171,
5087,
8863,
3639,
18899,
12,
1969,
1769,
3639,
12966,
12,
1969,
16,
3... |
Result result = runQuery("with member [Measures].[Foo] as '[Gender].CurrentMember.Name'" + nl + "select {[Measures].[Foo]} on columns" + nl + "from Sales where ([Gender].[F])"); | Result result = executeQuery( wrap(new String[] { "with member [Measures].[Foo] as '[Gender].CurrentMember.Name'", "select {[Measures].[Foo]} on columns", "from Sales where ([Gender].[F])"})); | public void testCurrentMemberFromSlicer() { Result result = runQuery("with member [Measures].[Foo] as '[Gender].CurrentMember.Name'" + nl + "select {[Measures].[Foo]} on columns" + nl + "from Sales where ([Gender].[F])"); Assert.assertEquals("F", result.getCell(new int[]{0}).getValue()); } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/3041f930b5fc4bf6aa3339845b828801c1d8b366/FunctionTest.java/clean/testsrc/main/mondrian/olap/fun/FunctionTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
3935,
4419,
1265,
3738,
21349,
1435,
288,
3639,
3438,
563,
273,
1086,
1138,
2932,
1918,
3140,
306,
23177,
1823,
8009,
63,
42,
5161,
65,
487,
5271,
43,
2345,
8009,
3935,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
3935,
4419,
1265,
3738,
21349,
1435,
288,
3639,
3438,
563,
273,
1086,
1138,
2932,
1918,
3140,
306,
23177,
1823,
8009,
63,
42,
5161,
65,
487,
5271,
43,
2345,
8009,
3935,
4... |
assertTrue(assertArrayEqual(returnObject,null)); | assertTrue(assertArrayEqual(returnObject, null)); | public void testCustomArray() { BookInformation[] returnObject; System.out.println("minOccurs = 0 and nillable true"); try { returnObject = testCustomArray(null, MIN_EQUALS_ZERO_NILLABLE_TRUE_TEST); assertTrue(assertArrayEqual(returnObject,new BookInformation[]{null})); returnObject = testCustomArray(new BookInformation[]{null}, MIN_EQUALS_ZERO_NILLABLE_TRUE_TEST); assertTrue(assertArrayEqual(returnObject,new BookInformation[]{null})); returnObject = testCustomArray(new BookInformation[]{getBookInformation()}, MIN_EQUALS_ZERO_NILLABLE_TRUE_TEST); assertTrue(assertArrayEqual(returnObject,new BookInformation[]{getBookInformation()})); returnObject = testCustomArray(new BookInformation[]{getBookInformation(), null}, MIN_EQUALS_ZERO_NILLABLE_TRUE_TEST); assertTrue(assertArrayEqual(returnObject,new BookInformation[]{getBookInformation(), null})); } catch (Exception e) { fail(); } System.out.println("minOccurs = 0 and nillable false"); try { returnObject = testCustomArray(null, MIN_EQUALS_ZERO_NILLABLE_FALSE_TEST); assertTrue(assertArrayEqual(returnObject,null)); returnObject = testCustomArray(new BookInformation[]{null}, MIN_EQUALS_ZERO_NILLABLE_FALSE_TEST); assertTrue(assertArrayEqual(returnObject,null)); returnObject = testCustomArray(new BookInformation[]{getBookInformation()}, MIN_EQUALS_ZERO_NILLABLE_FALSE_TEST); assertTrue(assertArrayEqual(returnObject,new BookInformation[]{getBookInformation()})); returnObject = testCustomArray(new BookInformation[]{getBookInformation(), null}, MIN_EQUALS_ZERO_NILLABLE_FALSE_TEST); assertTrue(assertArrayEqual(returnObject,new BookInformation[]{getBookInformation()})); } catch (Exception e) { fail(); } System.out.println("minOccurs = 1 and nillable true"); try { returnObject = testCustomArray(null, MIN_EQUALS_ONE_NILLABLE_TRUE_TEST); assertTrue(assertArrayEqual(returnObject,new BookInformation[]{null})); returnObject = testCustomArray(new BookInformation[]{null}, MIN_EQUALS_ONE_NILLABLE_TRUE_TEST); assertTrue(assertArrayEqual(returnObject,new BookInformation[]{null})); returnObject = testCustomArray(new BookInformation[]{getBookInformation()}, MIN_EQUALS_ONE_NILLABLE_TRUE_TEST); assertTrue(assertArrayEqual(returnObject,new BookInformation[]{getBookInformation()})); returnObject = testCustomArray(new BookInformation[]{getBookInformation(), null}, MIN_EQUALS_ONE_NILLABLE_TRUE_TEST); assertTrue(assertArrayEqual(returnObject,new BookInformation[]{getBookInformation(), null})); } catch (Exception e) { fail(); } System.out.println("minOccurs = 1 and nillable false"); try { returnObject = testCustomArray(null, MIN_EQUALS_ONE_NILLABLE_FALSE_TEST); fail(); } catch (Exception e) { assertTrue(true); } try { returnObject = testCustomArray(new BookInformation[]{null}, MIN_EQUALS_ONE_NILLABLE_FALSE_TEST); fail(); } catch (Exception e) { assertTrue(true); } try { returnObject = testCustomArray(new BookInformation[]{getBookInformation(), null}, MIN_EQUALS_ONE_NILLABLE_FALSE_TEST); fail(); } catch (Exception e) { assertTrue(true); } try { returnObject = testCustomArray(new BookInformation[]{getBookInformation()}, MIN_EQUALS_ONE_NILLABLE_FALSE_TEST); assertTrue(assertArrayEqual(returnObject,new BookInformation[]{getBookInformation()})); } catch (Exception e) { fail(); } } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/efb17f5826a431ff64ff3509a07c970f05494c5c/CustomElementsTest.java/clean/modules/adb-codegen/test/org/apache/axis2/schema/testsuite/CustomElementsTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
3802,
1076,
1435,
288,
3639,
20258,
5369,
8526,
327,
921,
31,
3639,
2332,
18,
659,
18,
8222,
2932,
1154,
31084,
273,
374,
471,
515,
80,
429,
638,
8863,
3639,
775,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
3802,
1076,
1435,
288,
3639,
20258,
5369,
8526,
327,
921,
31,
3639,
2332,
18,
659,
18,
8222,
2932,
1154,
31084,
273,
374,
471,
515,
80,
429,
638,
8863,
3639,
775,
288,
... |
public MDLMolConvention(Convention conv) { super(conv); } | public MDLMolConvention(CDOInterface cdo) { super(cdo); }; | public MDLMolConvention(Convention conv) { super(conv); } | 45254 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45254/7524e92b94095827a503a45ad2672381853cd9ca/MDLMolConvention.java/buggy/org/openscience/cdk/io/cml/MDLMolConvention.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
490,
8914,
49,
355,
25947,
12,
25947,
6292,
13,
288,
202,
9565,
12,
4896,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
490,
8914,
49,
355,
25947,
12,
25947,
6292,
13,
288,
202,
9565,
12,
4896,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
protected void acceptType(char[] packageName, char[] typeName, int acceptFlags, boolean needQualification) { IType type= resolveType(packageName, typeName, acceptFlags); | protected void acceptType(char[] packageName, char[] typeName, int acceptFlags, boolean needQualification, boolean isDeclaration, int start, int end) { IType type = null; if(isDeclaration) { type = resolveTypeByLocation(packageName, typeName, acceptFlags, start, end); } else { type = resolveType(packageName, typeName, acceptFlags); } | protected void acceptType(char[] packageName, char[] typeName, int acceptFlags, boolean needQualification) { IType type= resolveType(packageName, typeName, acceptFlags); if (type != null) { addElement(type); if(SelectionEngine.DEBUG){ System.out.print("SELECTION - accept type("); //$NON-NLS-1$ System.out.print(type.toString()); System.out.println(")"); //$NON-NLS-1$ } } } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/3bf5bab95449ec256a601c2551910573083178b4/SelectionRequestor.java/clean/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SelectionRequestor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
2791,
559,
12,
3001,
8526,
9929,
16,
1149,
8526,
8173,
16,
509,
2791,
5094,
16,
1250,
1608,
21740,
13,
288,
202,
45,
559,
618,
33,
2245,
559,
12,
5610,
461,
16,
8173,
16,
2791,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
2791,
559,
12,
3001,
8526,
9929,
16,
1149,
8526,
8173,
16,
509,
2791,
5094,
16,
1250,
1608,
21740,
13,
288,
202,
45,
559,
618,
33,
2245,
559,
12,
5610,
461,
16,
8173,
16,
2791,
... |
} else { return hostname.hashCode(); | public int hashCode() { if (_address != null) { return _address.hashCode(); } else { return hostname.hashCode(); } } | 48807 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48807/70c8c802d0f80be37669510e15559106bb0959cd/FreenetInetAddress.java/buggy/src/freenet/io/comm/FreenetInetAddress.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
13374,
1435,
288,
202,
202,
430,
261,
67,
2867,
480,
446,
13,
288,
1082,
202,
2463,
389,
2867,
18,
2816,
1085,
5621,
202,
202,
97,
469,
288,
1082,
202,
2463,
5199,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
13374,
1435,
288,
202,
202,
430,
261,
67,
2867,
480,
446,
13,
288,
1082,
202,
2463,
389,
2867,
18,
2816,
1085,
5621,
202,
202,
97,
469,
288,
1082,
202,
2463,
5199,
18,
... | |
ClassInfo classInfo = new ClassInfo(); | ClassNameAndSuperclassInfo classInfo = new ClassNameAndSuperclassInfo(); | private void parseClassName(ICodeBaseEntry entry) { DataInputStream in = null; try { in = new DataInputStream(entry.openResource()); ClassParser parser = new ClassParser(in, null, entry); ClassInfo classInfo = new ClassInfo(); parser.parse(classInfo); entry.overrideResourceName(classInfo.getClassDescriptor().toResourceName()); } catch (IOException e) { errorLogger.logError("Invalid class resource " + entry.getResourceName() + " in " + entry, e); } catch (InvalidClassFileFormatException e) { errorLogger.logError("Invalid class resource " + entry.getResourceName() + " in " + entry, e); } finally { IO.close(in); } } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/f11afb3880be02835b159856c648d0faa28097f1/ClassPathBuilder.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/classfile/impl/ClassPathBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1109,
3834,
12,
45,
1085,
2171,
1622,
1241,
13,
288,
202,
202,
751,
4348,
316,
273,
446,
31,
202,
202,
698,
288,
1082,
202,
267,
273,
394,
29382,
12,
4099,
18,
3190,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
3834,
12,
45,
1085,
2171,
1622,
1241,
13,
288,
202,
202,
751,
4348,
316,
273,
446,
31,
202,
202,
698,
288,
1082,
202,
267,
273,
394,
29382,
12,
4099,
18,
3190,
1... |
setSelectionPath(value0); | setSelectionPath(path); | public void addSelectionPath(TreePath value0) { if (!isPathSelected(value0)) { if (isSelectionEmpty()) setSelectionPath(value0); else { TreePath[] temp = new TreePath[selection.length + 1]; System.arraycopy(selection, 0, temp, 0, selection.length); temp[temp.length - 1] = value0; selection = new TreePath[temp.length]; System.arraycopy(temp, 0, selection, 0, temp.length); } leadPath = value0; fireValueChanged(new TreeSelectionEvent(this, value0, true, leadPath, value0)); } } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/b84de612b47edf167d1a205db1270610dfb06eb8/DefaultTreeSelectionModel.java/clean/libraries/javalib/javax/swing/tree/DefaultTreeSelectionModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
527,
6233,
743,
12,
2471,
743,
460,
20,
13,
202,
95,
202,
202,
430,
16051,
291,
743,
7416,
12,
1132,
20,
3719,
202,
202,
95,
1082,
202,
430,
261,
291,
6233,
1921,
10756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
527,
6233,
743,
12,
2471,
743,
460,
20,
13,
202,
95,
202,
202,
430,
16051,
291,
743,
7416,
12,
1132,
20,
3719,
202,
202,
95,
1082,
202,
430,
261,
291,
6233,
1921,
10756... |
throw new ApplicationError(Debug.show(op)); | throw Debug.abort(Debug.show(op)); | private Item primitiveOp(Primitive op, Tree left, Tree right, MSILType resType) { // treat some special cases switch (op) { case CONCAT: genLoad(left, MSILType.OBJECT); genLoad(right, MSILType.OBJECT); code.Emit(OpCodes.Call, tc.CONCAT_OBJECT_OBJECT); return items.StackItem(MSILType.STRING); case ADD: if (tc.getType(right.type) == tc.STRING) { System.out.println("primaryOp().ADD: string concat!"); genLoad(left, MSILType.OBJECT); genLoad(right, MSILType.OBJECT); code.Emit(OpCodes.Call, tc.CONCAT_OBJECT_OBJECT); return items.StackItem(MSILType.STRING); } break; case IS: genLoad(left, MSILType.OBJECT); final Type type = tc.getType(right.type); code.Emit(OpCodes.Isinst, type); return mkCond(items.StackItem(msilType(type))); case AS: Item item = genLoad(left, MSILType.OBJECT); final Type type = tc.getType(right.type); final MSILType mtype = msilType(type); if (!item.type.equals(mtype) && !type.equals(MSILType.OBJECT)) { if (type.IsValueType()) { code.Emit(OpCodes.Unbox, type); if (type.IsEnum()) emitLdind(type.getUnderlyingType()); else code.Emit(OpCodes.Ldobj, type); } else { code.Emit(OpCodes.Castclass, type); } } return items.StackItem(mtype); case SYNCHRONIZED: // TODO: reuse temporary local variable whenever possible LocalBuilder tmp = code.DeclareLocal(tc.OBJECT); genLoad(left, MSILType.OBJECT); code.Emit(OpCodes.Stloc, tmp); code.Emit(OpCodes.Ldloc, tmp); code.Emit(OpCodes.Call, tc.MONITOR_ENTER); genLoad(right, MSILType.OBJECT); code.Emit(OpCodes.Ldloc, tmp); code.Emit(OpCodes.Call, tc.MONITOR_EXIT); return items.StackItem(MSILType.OBJECT); } Item iLeft = null; MSILType tleft = msilType(left); switch (left) { case Apply(Tree fun , Tree[] args): Primitive p = primitives.getPrimitive(fun.symbol()); switch (p) { case BOX: assert args.length == 1; iLeft = gen(args[0], msilType(args[0])); break; } break; default: iLeft = gen(left, tleft); } switch (op) { case THROW: load(iLeft); code.Emit(OpCodes.Throw);// code.Emit(OpCodes.Ldnull);// return items.StackItem(MSILType.NULL); //return coerce(loadNull(), resType); return loadNull(); case POS: return load(coerce(iLeft, resType)); case NEG: iLeft = load(coerce(iLeft, resType)); code.Emit(OpCodes.Neg); return iLeft; case NOT: iLeft = load(coerce(iLeft, resType)); code.Emit(OpCodes.Not); return iLeft; case ZNOT: return negate(mkCond(iLeft)); case ZOR: Item.CondItem lcond = mkCond(iLeft), rcond = null; Chain success = lcond.success, failure = lcond.failure; switch (lcond.test) { case True: return lcond; case False: return mkCond(gen(right, MSILType.BOOL)); case And(Test t): success = (success != null) ? success : new Chain(code.DefineLabel(), null); branch(negate(lcond.test), success); resolve(failure); failure = null; break; default: success = (success != null) ? success : new Chain(code.DefineLabel(), null); branch(negate(lcond.test), success); } rcond = mkCond((gen(right, MSILType.BOOL))); rcond = items.CondItem(Test.Or(rcond.test), merge(success, rcond.success), merge(failure, rcond.failure)); return rcond; case ZAND: Item.CondItem lcond = mkCond(iLeft), rcond = null; Chain success = lcond.success, failure = lcond.failure; switch (lcond.test) { case False: return lcond; case True: return mkCond(gen(right, MSILType.BOOL)); case Or(Test t): failure = (failure != null) ? failure : new Chain(code.DefineLabel(), null); branch(lcond.test, failure); resolve(success); success = null; break; default: failure = (failure != null) ? failure : new Chain(code.DefineLabel(), null); branch(lcond.test, failure); } rcond = mkCond(gen(right, MSILType.BOOL)); rcond = items.CondItem(Test.And(rcond.test), merge(success, rcond.success), merge(failure, rcond.failure)); return rcond; } MSILType toType = MSILType.arithmCoercion(iLeft.type.asPrimitive(), primitiveType(right.type)); load(coerce(iLeft, toType)); genLoad(right, toType); Item res = null; switch (op) { case ADD: code.Emit(OpCodes.Add); res = items.StackItem(toType); break; case SUB: code.Emit(OpCodes.Sub); res = items.StackItem(toType); break; case MUL: code.Emit(OpCodes.Mul); res = items.StackItem(toType); break; case DIV: code.Emit(OpCodes.Div); res = items.StackItem(toType); break; case MOD: code.Emit(OpCodes.Rem); res = items.StackItem(toType); break; case OR: code.Emit(OpCodes.Or); res = items.StackItem(toType); break; case XOR: code.Emit(OpCodes.Xor); res = items.StackItem(toType); break; case AND: code.Emit(OpCodes.And); res = items.StackItem(toType); break; case LSL: code.Emit(OpCodes.Shl); res = items.StackItem(toType); break; case LSR: code.Emit(OpCodes.Shr); res = items.StackItem(toType); break; case ASR: code.Emit(OpCodes.Shr_Un); res = items.StackItem(toType); break; case ID: case EQ: // FIXME?: should ID be treated as EQ? res = items.CondItem(Test.Binary(Test.EQ, toType), null, null); break; case NE: res = items.CondItem(Test.Binary(Test.NE, toType), null, null); break; case LT: res = items.CondItem(Test.Binary(Test.LT_IS, toType), null, null); break; case LE: res = items.CondItem(Test.Binary(Test.LE_IS, toType), null, null); break; case GT: res = items.CondItem(Test.Binary(Test.GT_IS, toType), null, null); break; case GE: res = items.CondItem(Test.Binary(Test.GE_IS, toType), null, null); break; default: throw new ApplicationError(Debug.show(op)); } return coerce(res, resType); } | 1156 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1156/61b0435b649aa845fb06533464edc239990b4927/GenMSIL.java/buggy/sources/scalac/backend/msil/GenMSIL.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
4342,
8225,
3817,
12,
9840,
1061,
16,
4902,
2002,
16,
4902,
2145,
16,
490,
2320,
48,
559,
400,
559,
13,
565,
288,
202,
759,
10116,
2690,
4582,
6088,
202,
9610,
261,
556,
13,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
4342,
8225,
3817,
12,
9840,
1061,
16,
4902,
2002,
16,
4902,
2145,
16,
490,
2320,
48,
559,
400,
559,
13,
565,
288,
202,
759,
10116,
2690,
4582,
6088,
202,
9610,
261,
556,
13,
288,
... |
dest.append(positiveSuffix, positiveSuffixRanges, positiveSuffixAttrs); | { dest.append(substituteCurrency(positiveSuffix, number), positiveSuffixRanges, positiveSuffixAttrs); } | private void formatInternal (double number, FormatBuffer dest, FieldPosition fieldPos) { // A very special case. if (Double.isNaN(number)) { dest.append(symbols.getNaN()); if (fieldPos != null && (fieldPos.getField() == INTEGER_FIELD || fieldPos.getFieldAttribute() == NumberFormat.Field.INTEGER)) { int index = dest.length(); fieldPos.setBeginIndex(index - symbols.getNaN().length()); fieldPos.setEndIndex(index); } return; } boolean is_neg = number < 0; if (is_neg) { if (negativePrefix != null) dest.append(negativePrefix, negativePrefixRanges, negativePrefixAttrs); else { dest.append(symbols.getMinusSign(), NumberFormat.Field.SIGN); dest.append(positivePrefix, positivePrefixRanges, positivePrefixAttrs); } number = - number; } else dest.append(positivePrefix, positivePrefixRanges, positivePrefixAttrs); int integerBeginIndex = dest.length(); int integerEndIndex = 0; int zeroStart = symbols.getZeroDigit() - '0'; if (Double.isInfinite (number)) { dest.append(symbols.getInfinity()); integerEndIndex = dest.length(); } else { number *= multiplier; // Compute exponent. long exponent = 0; double baseNumber; if (useExponentialNotation) { exponent = (long) Math.floor (Math.log(number) / Math.log(10)); exponent = exponent - (exponent % exponentRound); if (minimumIntegerDigits > 0) exponent -= minimumIntegerDigits - 1; baseNumber = (number / Math.pow(10.0, exponent)); } else baseNumber = number; // Round to the correct number of digits. baseNumber += 5 * Math.pow(10.0, - maximumFractionDigits - 1); int index = dest.length(); //double intPart = Math.floor(baseNumber); String intPart = Long.toString((long)Math.floor(baseNumber)); int count, groupPosition = intPart.length(); dest.setDefaultAttribute(NumberFormat.Field.INTEGER); for (count = 0; count < minimumIntegerDigits-intPart.length(); count++) dest.append(symbols.getZeroDigit()); for (count = 0; count < maximumIntegerDigits && count < intPart.length(); count++) { int dig = intPart.charAt(count); // Append group separator if required. if (groupingUsed && count > 0 && groupingSize != 0 && groupPosition % groupingSize == 0) { dest.append(symbols.getGroupingSeparator(), NumberFormat.Field.GROUPING_SEPARATOR); dest.setDefaultAttribute(NumberFormat.Field.INTEGER); } dest.append((char) (zeroStart + dig)); groupPosition--; } dest.setDefaultAttribute(null); integerEndIndex = dest.length(); int decimal_index = integerEndIndex; int consecutive_zeros = 0; int total_digits = 0; int localMaximumFractionDigits = maximumFractionDigits; if (useExponentialNotation) localMaximumFractionDigits += minimumIntegerDigits - count; // Strip integer part from NUMBER. double fracPart = baseNumber - Math.floor(baseNumber); if ( ((fracPart != 0 || minimumFractionDigits > 0) && localMaximumFractionDigits > 0) || decimalSeparatorAlwaysShown) { dest.append (symbols.getDecimalSeparator(), NumberFormat.Field.DECIMAL_SEPARATOR); } int fraction_begin = dest.length(); dest.setDefaultAttribute(NumberFormat.Field.FRACTION); for (count = 0; count < localMaximumFractionDigits && (fracPart != 0 || count < minimumFractionDigits); ++count) { ++total_digits; fracPart *= 10; long dig = (long) fracPart; if (dig == 0) ++consecutive_zeros; else consecutive_zeros = 0; dest.append((char) (symbols.getZeroDigit() + dig)); // Strip integer part from FRACPART. fracPart = fracPart - Math.floor (fracPart); } // Strip extraneous trailing `0's. We can't always detect // these in the loop. int extra_zeros = Math.min (consecutive_zeros, total_digits - minimumFractionDigits); if (extra_zeros > 0) { dest.cutTail(extra_zeros); total_digits -= extra_zeros; if (total_digits == 0 && !decimalSeparatorAlwaysShown) dest.cutTail(1); } if (fieldPos != null && fieldPos.getField() == FRACTION_FIELD) { fieldPos.setBeginIndex(fraction_begin); fieldPos.setEndIndex(dest.length()); } // Finally, print the exponent. if (useExponentialNotation) { dest.append(symbols.getExponential(), NumberFormat.Field.EXPONENT_SYMBOL); if (exponent < 0) { dest.append (symbols.getMinusSign (), NumberFormat.Field.EXPONENT_SIGN); exponent = - exponent; } index = dest.length(); dest.setDefaultAttribute(NumberFormat.Field.EXPONENT); String exponentString = Long.toString ((long) exponent); for (count = 0; count < minExponentDigits-exponentString.length(); count++) dest.append((char) symbols.getZeroDigit()); for (count = 0; count < exponentString.length(); ++count) { int dig = exponentString.charAt(count); dest.append((char) (zeroStart + dig)); } } } if (fieldPos != null && (fieldPos.getField() == INTEGER_FIELD || fieldPos.getFieldAttribute() == NumberFormat.Field.INTEGER)) { fieldPos.setBeginIndex(integerBeginIndex); fieldPos.setEndIndex(integerEndIndex); } if (is_neg && negativeSuffix != null) dest.append(negativeSuffix, negativeSuffixRanges, negativeSuffixAttrs); else dest.append(positiveSuffix, positiveSuffixRanges, positiveSuffixAttrs); } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/d845d1ea25a573e8772fa9e43624451bd759e437/DecimalFormat.java/clean/libraries/javalib/java/text/DecimalFormat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
740,
3061,
261,
9056,
1300,
16,
4077,
1892,
1570,
16,
9506,
4202,
2286,
2555,
652,
1616,
13,
225,
288,
565,
368,
432,
8572,
4582,
648,
18,
565,
309,
261,
5265,
18,
291,
21172... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
740,
3061,
261,
9056,
1300,
16,
4077,
1892,
1570,
16,
9506,
4202,
2286,
2555,
652,
1616,
13,
225,
288,
565,
368,
432,
8572,
4582,
648,
18,
565,
309,
261,
5265,
18,
291,
21172... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.