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 |
|---|---|---|---|---|---|---|
window, canCancel); | window, canCancel, false); | private boolean promptForSavingIfNecessary(final IWorkbenchWindow window, Set modelsClosing, boolean canCancel) { // TODO prompt for saving of dirty modelsDecrementing but not closing // (changes // won't be lost) List modelsToSave = new ArrayList(); for (Iterator it = modelsClosing.iterator(); it.hasNext();) { Saveable modelClosing = (Saveable) it.next(); if (modelClosing.isDirty()) { modelsToSave.add(modelClosing); } } return modelsToSave.isEmpty() ? false : promptForSaving(modelsToSave, window, canCancel); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/df12730bcbbbbef7c231ca80bd3d6375def0bd04/SaveablesList.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveablesList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
6866,
1290,
24660,
26034,
12,
6385,
467,
2421,
22144,
3829,
2742,
16,
1082,
202,
694,
3679,
15745,
16,
1250,
848,
6691,
13,
288,
202,
202,
759,
2660,
6866,
364,
12392,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
6866,
1290,
24660,
26034,
12,
6385,
467,
2421,
22144,
3829,
2742,
16,
1082,
202,
694,
3679,
15745,
16,
1250,
848,
6691,
13,
288,
202,
202,
759,
2660,
6866,
364,
12392,
43... |
namenode.blockReceived(localName, blockArray); | public void offerService() throws Exception { long lastHeartbeat = 0, lastBlockReport = 0; long sendStart = System.currentTimeMillis(); LOG.info("using BLOCKREPORT_INTERVAL of " + blockReportInterval + "msec"); // // Now loop for a long time.... // while (shouldRun) { long now = System.currentTimeMillis(); // // Every so often, send heartbeat or block-report // synchronized (receivedBlockList) { if (now - lastHeartbeat > HEARTBEAT_INTERVAL) { // // All heartbeat messages include following info: // -- Datanode name // -- data transfer port // -- Total capacity // -- Bytes remaining // namenode.sendHeartbeat(localName, data.getCapacity(), data.getRemaining()); //LOG.info("Just sent heartbeat, with name " + localName); lastHeartbeat = now; } if (now - lastBlockReport > blockReportInterval) { // // Send latest blockinfo report if timer has expired. // Get back a list of local block(s) that are obsolete // and can be safely GC'ed. // Block toDelete[] = namenode.blockReport(localName, data.getBlockReport()); data.invalidate(toDelete); lastBlockReport = now; continue; } if (receivedBlockList.size() > 0) { // // Send newly-received blockids to namenode // Block blockArray[] = (Block[]) receivedBlockList.toArray(new Block[receivedBlockList.size()]); receivedBlockList.removeAllElements(); namenode.blockReceived(localName, blockArray); } // // Only perform block operations (transfer, delete) after // a startup quiet period. The assumption is that all the // datanodes will be started together, but the namenode may // have been started some time before. (This is esp. true in // the case of network interruptions.) So, wait for some time // to pass from the time of connection to the first block-transfer. // Otherwise we transfer a lot of blocks unnecessarily. // if (now - sendStart > datanodeStartupPeriod) { // // Check to see if there are any block-instructions from the // namenode that this datanode should perform. // BlockCommand cmd = namenode.getBlockwork(localName, xmitsInProgress); if (cmd != null && cmd.transferBlocks()) { // // Send a copy of a block to another datanode // Block blocks[] = cmd.getBlocks(); DatanodeInfo xferTargets[][] = cmd.getTargets(); for (int i = 0; i < blocks.length; i++) { if (!data.isValidBlock(blocks[i])) { String errStr = "Can't send invalid block " + blocks[i]; LOG.info(errStr); namenode.errorReport(localName, errStr); break; } else { if (xferTargets[i].length > 0) { LOG.info("Starting thread to transfer block " + blocks[i] + " to " + xferTargets[i][0].getName() + (xferTargets[i].length > 1 ? " and " + (xferTargets[i].length-1) + " more destination(s)" : "" )); new Daemon(new DataTransfer(xferTargets[i], blocks[i])).start(); } } } } else if (cmd != null && cmd.invalidateBlocks()) { // // Some local block(s) are obsolete and can be // safely garbage-collected. // data.invalidate(cmd.getBlocks()); } } // // There is no work to do; sleep until hearbeat timer elapses, // or work arrives, and then iterate again. // long waitTime = HEARTBEAT_INTERVAL - (now - lastHeartbeat); if (waitTime > 0 && receivedBlockList.size() == 0) { try { receivedBlockList.wait(waitTime); } catch (InterruptedException ie) { } } } } } | 50331 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50331/baed592763834f576e1a5b3bebfecf4dd51aa47b/DataNode.java/clean/src/java/org/apache/hadoop/dfs/DataNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
10067,
1179,
1435,
1216,
1185,
288,
3639,
1525,
1142,
15894,
273,
374,
16,
1142,
1768,
4820,
273,
374,
31,
3639,
1525,
1366,
1685,
273,
2332,
18,
2972,
28512,
5621,
3639,
2018,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10067,
1179,
1435,
1216,
1185,
288,
3639,
1525,
1142,
15894,
273,
374,
16,
1142,
1768,
4820,
273,
374,
31,
3639,
1525,
1366,
1685,
273,
2332,
18,
2972,
28512,
5621,
3639,
2018,
... | |
myPanel = new InspectionToolsPanel(myInspectionProfile.getName(), myProject, myChooseDifferentProfile, profileManager); | myPanel = myChooseDifferentProfile ? new InspectionToolsPanel(myInspectionProfile.getName(), project, profileManager) : new SingleInspectionProfilePanel(myInspectionProfile.getName(), inspectionProfile.getModifiableModel(), project, profileManager); | public InspectionToolsConfigurable(final Project project, final boolean chooseDifferentProfile, final ProfileManager profileManager, final InspectionProfileImpl inspectionProfile, final String selectedTool) { myProject = project; myChooseDifferentProfile = chooseDifferentProfile; myInspectionProfile = inspectionProfile; mySelectedTool = selectedTool; myPanel = new InspectionToolsPanel(myInspectionProfile.getName(), myProject, myChooseDifferentProfile, profileManager); } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/75b0a23e4485ce07bcfbe8d0cce3046f1f003148/EditInspectionToolsSettingsAction.java/buggy/inspections/impl/com/intellij/codeInspection/ex/EditInspectionToolsSettingsAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
22085,
7017,
10348,
31660,
12,
6385,
5420,
1984,
16,
4766,
4202,
727,
1250,
9876,
26270,
4029,
16,
4766,
4202,
727,
11357,
1318,
3042,
1318,
16,
4766,
4202,
727,
22085,
7017,
4029,
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,
377,
1071,
22085,
7017,
10348,
31660,
12,
6385,
5420,
1984,
16,
4766,
4202,
727,
1250,
9876,
26270,
4029,
16,
4766,
4202,
727,
11357,
1318,
3042,
1318,
16,
4766,
4202,
727,
22085,
7017,
4029,
28... |
return RubyBoolean.newBoolean(recv.getRuntime(), | return recv.getRuntime().newBoolean( | public static RubyBoolean directory_p(IRubyObject recv, RubyString filename) { return RubyBoolean.newBoolean(recv.getRuntime(), new File(filename.getValue()).isDirectory()); } | 46258 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46258/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyFileTest.java/buggy/src/org/jruby/RubyFileTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
5507,
1867,
67,
84,
12,
7937,
10340,
921,
10665,
16,
19817,
780,
1544,
13,
288,
3639,
327,
10665,
18,
588,
5576,
7675,
2704,
5507,
12,
1171,
394,
1387,
12,
3459,
18,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
5507,
1867,
67,
84,
12,
7937,
10340,
921,
10665,
16,
19817,
780,
1544,
13,
288,
3639,
327,
10665,
18,
588,
5576,
7675,
2704,
5507,
12,
1171,
394,
1387,
12,
3459,
18,
2... |
public boolean absolute(int index) throws SQLException { // index is 1-based, but internally we use 0-based indices int internalIndex; if (index==0) throw new SQLException("Cannot move to index of 0"); //if index<0, count from the end of the result set, but check //to be sure that it is not beyond the first index if (index<0) if (index>=-rows.size()) internalIndex=rows.size()+index; else { beforeFirst(); return false; } //must be the case that index>0, //find the correct place, assuming that //the index is not too large if (index<=rows.size()) internalIndex = index-1; else { afterLast(); return false; } current_row=internalIndex; this_row = (byte [][])rows.elementAt(internalIndex); return true; } | 46409 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46409/45b5d792afa60ae24d57cdceaaec0e03cf6abb2a/ResultSet.java/clean/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
4967,
12,
474,
770,
13,
1216,
6483,
565,
288,
202,
759,
770,
353,
404,
17,
12261,
16,
1496,
12963,
732,
999,
374,
17,
12261,
4295,
202,
474,
2713,
1016,
31,
202,
430,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
4967,
12,
474,
770,
13,
1216,
6483,
565,
288,
202,
759,
770,
353,
404,
17,
12261,
16,
1496,
12963,
732,
999,
374,
17,
12261,
4295,
202,
474,
2713,
1016,
31,
202,
430,
261,
... | ||
"showcomplete", createImageDescriptor(LOCAL + "showcomplete_tsk.gif")); | "showcomplete", IDEWorkbenchPlugin.getIDEImageDescriptor("elcl16/showcomplete_tsk.gif")); | static void createImageDescriptors() { String LOCAL = "elcl16/";//$NON-NLS-1$ String LOCAL_DISABLED = "dlcl16/";//$NON-NLS-1$ String OBJ = "obj16/";//$NON-NLS-1$ imageDescriptors = new HashMap(51); imageDescriptors .put( "header_complete", createImageDescriptor("obj16/header_complete.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors .put( "header_priority", createImageDescriptor("obj16/header_priority.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors.put( "task", createImageDescriptor(OBJ + "taskmrk_tsk.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors.put( "error", createImageDescriptor(OBJ + "error_tsk.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors.put( "warn", createImageDescriptor(OBJ + "warn_tsk.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors.put( "info", createImageDescriptor(OBJ + "info_tsk.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors.put( "hprio", createImageDescriptor(OBJ + "hprio_tsk.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors.put( "lprio", createImageDescriptor(OBJ + "lprio_tsk.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors .put( "complete_tsk", createImageDescriptor(OBJ + "complete_tsk.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors .put( "incomplete_tsk", createImageDescriptor(OBJ + "incomplete_tsk.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors.put( "gotoobj", createImageDescriptor(LOCAL + "gotoobj_tsk.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors.put( "addtsk", createImageDescriptor(LOCAL + "addtsk_tsk.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors .put( "addtsk_disabled", createImageDescriptor(LOCAL_DISABLED + "addtsk_tsk.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors .put( "showcomplete", createImageDescriptor(LOCAL + "showcomplete_tsk.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors .put( "selected_mode", createImageDescriptor(LOCAL + "selected_mode.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors .put( "selected_mode_disabled", createImageDescriptor(LOCAL_DISABLED + "selected_mode.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors .put( "showchild_mode", createImageDescriptor(LOCAL + "showchild_mode.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors .put( "showchild_mode_disabled", createImageDescriptor(LOCAL_DISABLED + "showchild_mode.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors .put( "showerr_disabled", createImageDescriptor(LOCAL_DISABLED + "showerr_tsk.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors .put( "showwarn_disabled", createImageDescriptor(LOCAL_DISABLED + "showwarn_tsk.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors .put( "showtsk_disabled", createImageDescriptor(LOCAL_DISABLED + "showtsk_tsk.gif"));//$NON-NLS-2$//$NON-NLS-1$ imageDescriptors.put( "filter", createImageDescriptor(LOCAL + "filter_ps.gif"));//$NON-NLS-2$//$NON-NLS-1$ } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/c67b11f8cbea2950c016fc00cf62dc5d8d538b36/MarkerUtil.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/MarkerUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
918,
28301,
12705,
1435,
288,
3639,
514,
15234,
273,
315,
292,
830,
2313,
4898,
31,
759,
8,
3993,
17,
5106,
17,
21,
8,
3639,
514,
15234,
67,
24493,
273,
315,
5761,
830,
2313,
4898,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
918,
28301,
12705,
1435,
288,
3639,
514,
15234,
273,
315,
292,
830,
2313,
4898,
31,
759,
8,
3993,
17,
5106,
17,
21,
8,
3639,
514,
15234,
67,
24493,
273,
315,
5761,
830,
2313,
4898,... |
for (PsiElement element : children) { PsiFileSystemItem child = (PsiFileSystemItem)element; | ((PsiDirectoryImpl)context).processChildren(new PsiElementProcessor<PsiFileSystemItem>() { public boolean execute(final PsiFileSystemItem element) { if (equalsTo(element.getName())) { processingChildrenResult[0] = element; return false; } | private final ResolveResult[] innerResolve() { final Collection<PsiElement> contexts = getContexts(); Collection<ResolveResult> result = new ArrayList<ResolveResult>(contexts.size()); for (PsiElement context : contexts) { PsiElement resolved = null; if (context instanceof WebDirectoryElement) { if (".".equals(myText)) { resolved = context; } else if ("..".equals(myText)) { resolved = ((WebDirectoryElement)context).getParentDirectory(); } else { WebDirectoryElement[] children = ((WebDirectoryElement)context).getChildren(); for (WebDirectoryElement child : children) { if (equalsTo(child)) { resolved = child.isDirectory() ? child : child.getOriginalFile(); break; } } } } else if (context instanceof PsiDirectory) { if (".".equals(myText)) { resolved = context; } else if ("..".equals(myText)) { resolved = ((PsiDirectory)context).getParentDirectory(); } else { PsiElement[] children = context.getChildren(); for (PsiElement element : children) { PsiFileSystemItem child = (PsiFileSystemItem)element; if (equalsTo(child)) { resolved = child; break; } } } } if (resolved != null) { result.add(new PsiElementResolveResult(resolved)); } } return result.size() > 0? result.toArray(new ResolveResult[result.size()]): ResolveResult.EMPTY_ARRAY; } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/07af9f6ec3a98d0e30f38cfc43c074983ef893d4/FileReference.java/clean/source/com/intellij/psi/impl/source/resolve/reference/impl/providers/FileReference.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
727,
9910,
1253,
8526,
3443,
8460,
1435,
288,
565,
727,
2200,
32,
52,
7722,
1046,
34,
5781,
273,
6474,
87,
5621,
565,
2200,
32,
8460,
1253,
34,
563,
273,
394,
2407,
32,
8460,
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,
282,
3238,
727,
9910,
1253,
8526,
3443,
8460,
1435,
288,
565,
727,
2200,
32,
52,
7722,
1046,
34,
5781,
273,
6474,
87,
5621,
565,
2200,
32,
8460,
1253,
34,
563,
273,
394,
2407,
32,
8460,
1253... |
public static RubyObject stdout(Ruby ruby, RubyClass rubyClass) { | public static RubyObject stdout(Ruby ruby, RubyClass rubyClass, OutputStream outStream) { | public static RubyObject stdout(Ruby ruby, RubyClass rubyClass) { RubyIO io = new RubyIO(ruby, rubyClass); io.outStream = ruby.getRuntime().getOutputStream(); io.writeable = true; return io; } | 1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/d31a76ee29d5978a9bec41e3ac9134cee024bcab/RubyIO.java/clean/org/jruby/RubyIO.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
921,
3909,
12,
54,
10340,
22155,
16,
19817,
797,
22155,
797,
16,
8962,
28997,
13,
288,
3639,
19817,
4294,
2527,
273,
394,
19817,
4294,
12,
27768,
16,
22155,
797,
1769,
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,
760,
19817,
921,
3909,
12,
54,
10340,
22155,
16,
19817,
797,
22155,
797,
16,
8962,
28997,
13,
288,
3639,
19817,
4294,
2527,
273,
394,
19817,
4294,
12,
27768,
16,
22155,
797,
1769,
3... |
public String toString() { | public String toString(int options) { | public String toString() { return "(?" +(this.add == 0 ? "" : REUtil.createOptionString(this.add)) +(this.mask == 0 ? "" : REUtil.createOptionString(this.mask)) +":" +this.child.toString() +")"; } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/a0bbc4dd8c8a7fc81862f96dec1f28070b5ed1ff/Token.java/buggy/src/org/apache/xerces/utils/regex/Token.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
514,
1762,
12,
474,
702,
13,
288,
5411,
327,
315,
3680,
6,
7734,
397,
12,
2211,
18,
1289,
422,
374,
692,
1408,
294,
2438,
1304,
18,
2640,
1895,
780,
12,
2211,
18,
1289,
3719,
77... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
1762,
12,
474,
702,
13,
288,
5411,
327,
315,
3680,
6,
7734,
397,
12,
2211,
18,
1289,
422,
374,
692,
1408,
294,
2438,
1304,
18,
2640,
1895,
780,
12,
2211,
18,
1289,
3719,
77... |
for (int i = 0; i < array.length; i++) array[i] = String.valueOf(editorsTable.getColumn(i).getWidth()); | for (int i = 0; i < array.length; i++) { array[i] = String.valueOf(editorsTable.getColumn(i).getWidth()); } | private void saveDialogSettings() { IDialogSettings s = getDialogSettings(); s.put(ALLPERSP, showAllPersp); s.put(SORT, sortColumn); bounds = getShell().getBounds(); String array[] = new String[4]; array[0] = String.valueOf(bounds.x); array[1] = String.valueOf(bounds.y); array[2] = String.valueOf(bounds.width); array[3] = String.valueOf(bounds.height); s.put(BOUNDS, array); array = new String[editorsTable.getColumnCount()]; for (int i = 0; i < array.length; i++) array[i] = String.valueOf(editorsTable.getColumn(i).getWidth()); s.put(COLUMNS, array); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/WorkbenchEditorsDialog.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchEditorsDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1923,
6353,
2628,
1435,
288,
3639,
1599,
3529,
2628,
272,
273,
31774,
2628,
5621,
3639,
272,
18,
458,
12,
4685,
3194,
3118,
16,
2405,
1595,
14781,
84,
1769,
3639,
272,
18,
458,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1923,
6353,
2628,
1435,
288,
3639,
1599,
3529,
2628,
272,
273,
31774,
2628,
5621,
3639,
272,
18,
458,
12,
4685,
3194,
3118,
16,
2405,
1595,
14781,
84,
1769,
3639,
272,
18,
458,... |
public Id(String stValue) throws IllegalArgumentException { try { setValue(stValue); } catch (IllegalArgumentException e) { throw new IllegalArgumentException(); } | public Id() { super(); | public Id(String stValue) throws IllegalArgumentException { try { setValue(stValue); } catch (IllegalArgumentException e) { // recast normalizedString exception as token exception throw new IllegalArgumentException(); //Messages.getMessage("badIdType00") + "data=[" + //stValue + "]"); } } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/2c9c3102ebe608634f4f654cae03aabbc5807cc9/Id.java/buggy/modules/adb/src/org/apache/axis2/databinding/types/Id.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3124,
12,
780,
384,
620,
13,
1216,
2754,
288,
3639,
775,
288,
5411,
5524,
12,
334,
620,
1769,
3639,
289,
3639,
1044,
261,
31237,
425,
13,
288,
5411,
368,
1950,
689,
5640,
780,
152... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3124,
12,
780,
384,
620,
13,
1216,
2754,
288,
3639,
775,
288,
5411,
5524,
12,
334,
620,
1769,
3639,
289,
3639,
1044,
261,
31237,
425,
13,
288,
5411,
368,
1950,
689,
5640,
780,
152... |
try { int[][] returnedArray = readUnivStudents ( zonalStudentsInputFileName ); inputZonalStudents = returnedArray[0]; inputZonalUnivDistricts = returnedArray[1]; } catch (Exception e) { logger.fatal ("Exception reading input zonal students summary file.", e); System.exit(1); | if ( zonalStudentsInputFileName != null ) { try { int[][] returnedArray = readUnivStudents ( zonalStudentsInputFileName ); inputZonalStudents = returnedArray[0]; inputZonalUnivDistricts = returnedArray[1]; } catch (Exception e) { logger.fatal ("Exception reading input zonal students summary file.", e); System.exit(1); } | public HH[][] buildPop(String zonalStudentsInputFileName, String zonalStudentsOutputFileName) { lastZone = zoneTable.getRowCount(); HH[][] zonalHHs = new HH[lastZone + 1][]; sumHouseholdsInTableData(); seed2D = populate2WaySeedTables(); seed3D = populate3WaySeedTables(); int hhsPosition = zoneTable.getColumnPosition(HHS_FIELD); int HHsInZone; int hhNumber = 0; int[] inputZonalStudents = null; int[] inputZonalUnivDistricts = null; // read the control totals for number of university students in each zone try { int[][] returnedArray = readUnivStudents ( zonalStudentsInputFileName ); inputZonalStudents = returnedArray[0]; inputZonalUnivDistricts = returnedArray[1]; } catch (Exception e) { logger.fatal ("Exception reading input zonal students summary file.", e); System.exit(1); } // open output stream for writing number of students per zone file PrintWriter outStream = null; if ( zonalStudentsOutputFileName != null ) { try { outStream = new PrintWriter (new BufferedWriter( new FileWriter(zonalStudentsOutputFileName) ) ); outStream.println ( "taz,cotadist,nonworkerTotal,controlTotal,synpopTotal,newStudentsTotal,newNonworkersTotal"); } catch (IOException e) { logger.fatal ("I/O exception opening zonal students summary file.", e); System.exit(1); } } // create an array to store the number of students in each income // category and in each of 1, 2, 3, 4+ household sizes // generate the synthetic population for each zone for (int zone = firstZone; zone <= lastZone; zone++) { int newStudentsTotal = 0; int newNonworkersTotal = 0; int univStudentsTotal = 0; int nonWorkAdultTotal = 0; HHsInZone = (int) zoneTable.getValueAt(zone, hhsPosition); HH[] hhList = null; if (HHsInZone > 0) hhList = getZonalHHs(zone); if ( hhList != null && hhList.length > 0 ) { for (int i = 0; i < hhList.length; i++) { // count the number of university students residing in zone for (int j=0; j < hhList[i].personTypes.length; j++) { if ( hhList[i].personTypes[j] == PersonType.STUDENT ) { univStudentsTotal++; } else if ( hhList[i].personTypes[j] == PersonType.NONWORKER ) { nonWorkAdultTotal++; } } hhList[i].setHHNumber(hhNumber); hhNumber++; } try { // change some students to nonworkers if inputZonalStudents[zone] < univStudentsTotal to // match exactly the control total if an OSU district zone. Leave students alone if outside OSU district. if ( inputZonalUnivDistricts[zone] == OSU_COTADIST ) { if ( inputZonalStudents[zone] < univStudentsTotal ) { reduceStudents ( hhList, inputZonalStudents[zone], univStudentsTotal ); } else if ( inputZonalStudents[zone] > univStudentsTotal ) { hhList = increaseStudents ( hhList, inputZonalStudents[zone] - univStudentsTotal, hhNumber ); hhNumber = hhList[hhList.length-1].getHHNumber() + 1; } } // increase the number of students outside OSU district by the control total else { hhList = increaseStudents ( hhList, inputZonalStudents[zone], hhNumber ); hhNumber = hhList[hhList.length-1].getHHNumber() + 1; } } catch (Exception e) { logger.error ( "Exception caught modifying number of students for zone " + zone, e); System.exit(1); } zonalHHs[zone] = hhList; // sum up new students in zone for (int i = 0; i < hhList.length; i++) { // count the number of university students residing in zone for (int j=0; j < hhList[i].personTypes.length; j++) { if ( hhList[i].personTypes[j] == PersonType.STUDENT ) newStudentsTotal++; else if ( hhList[i].personTypes[j] == PersonType.NONWORKER ) newNonworkersTotal++; } } } else { // TableDataSet values are stored with zero based indexing setZonalFinalTargets(zone - 1, new Vector(zeroHHSize), new Vector(zeroWorker), new Vector(zeroIncome)); } if ( outStream != null ) { outStream.print ( zone + "," + inputZonalUnivDistricts[zone] + "," + nonWorkAdultTotal + "," + inputZonalStudents[zone] + "," + univStudentsTotal + "," + newStudentsTotal + "," + newNonworkersTotal ); outStream.print( "\n" ); } } if ( outStream != null ) { outStream.close(); } return zonalHHs; } | 1120 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1120/6d84dcee0e71acc16701f91abf80306d8e25e779/SyntheticPopulation.java/clean/src/java/com/pb/morpc/synpop/SyntheticPopulation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
20842,
63,
6362,
65,
1361,
7049,
12,
780,
998,
9528,
19943,
4877,
1210,
4771,
16,
514,
998,
9528,
19943,
4877,
1447,
4771,
13,
288,
7734,
1142,
4226,
273,
4157,
1388,
18,
588,
26359... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20842,
63,
6362,
65,
1361,
7049,
12,
780,
998,
9528,
19943,
4877,
1210,
4771,
16,
514,
998,
9528,
19943,
4877,
1447,
4771,
13,
288,
7734,
1142,
4226,
273,
4157,
1388,
18,
588,
26359... |
AST tmp1897_AST_in = (AST)_t; | AST tmp1896_AST_in = (AST)_t; | public final void array_subscript(AST _t) throws RecognitionException { AST array_subscript_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t339 = _t; AST tmp1896_AST_in = (AST)_t; match(_t,Array_subscript); _t = _t.getFirstChild(); AST tmp1897_AST_in = (AST)_t; match(_t,LEFTBRACE); _t = _t.getNextSibling(); expression(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case FOR: { AST tmp1898_AST_in = (AST)_t; match(_t,FOR); _t = _t.getNextSibling(); expression(_t); _t = _retTree; break; } case RIGHTBRACE: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp1899_AST_in = (AST)_t; match(_t,RIGHTBRACE); _t = _t.getNextSibling(); _t = __t339; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/041a16c78289f1c3ae5e575d3edc5e893a658e50/JPTreeParser.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparserbase/JPTreeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
526,
67,
1717,
4263,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
526,
67,
1717,
4263,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
526,
67,
1717,
4263,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
526,
67,
1717,
4263,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
... |
g.drawImage(this.nextScreenImage, 0, 0, Graphics.TOP | Graphics.LEFT); | g.drawImage(this.nextCanvasImage, 0, 0, Graphics.TOP | Graphics.LEFT); | public void paint(Graphics g) { //#if polish.Bugs.fullScreenInPaint if (! this.fullScreenModeSet) { setFullScreenMode(true); this.fullScreenModeSet = true; } //#endif g.drawImage(this.lastScreenImage, 0, 0, Graphics.TOP | Graphics.LEFT); //#if polish.css.flash-screen-change-animation-color g.setColor(this.color); //#else g.setColor(0); //#endif g.drawRect(0, this.currentY - 1, this.screenWidth, 0); g.drawRect(0, this.currentY + this.currentSize, this.screenWidth, 0); g.setClip(0, this.currentY, this.screenWidth, this.currentSize); g.drawImage(this.nextScreenImage, 0, 0, Graphics.TOP | Graphics.LEFT); this.display.callSerially(this); } | 9804 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9804/15bccb42c3eebb1053a4bbc1d0283c9bd9645b4b/FlashScreenChangeAnimation.java/clean/enough-polish-j2me/source/src/de/enough/polish/ui/screenanimations/FlashScreenChangeAnimation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
12574,
12,
17558,
314,
13,
202,
95,
202,
202,
759,
7,
430,
2952,
1468,
18,
31559,
18,
2854,
7956,
382,
12699,
202,
202,
430,
16051,
333,
18,
2854,
7956,
2309,
694,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
12574,
12,
17558,
314,
13,
202,
95,
202,
202,
759,
7,
430,
2952,
1468,
18,
31559,
18,
2854,
7956,
382,
12699,
202,
202,
430,
16051,
333,
18,
2854,
7956,
2309,
694,
13,
... |
if (lockedMethodSet.contains(callSite.getMethod())) continue; CallGraphNode target = edge.getTarget(); if (lockedMethodSet.remove(target.getMethod())) | if (obviouslyLockedSites.contains(callSite) || lockedMethodSet.contains(callSite.getMethod())) { CallGraphNode target = edge.getTarget(); if (lockedMethodSet.add(target.getMethod())) | private Set<Method> findLockedMethods(ClassContext classContext) throws CFGBuilderException, DataflowAnalysisException { JavaClass javaClass = classContext.getJavaClass(); Method[] methodList = javaClass.getMethods(); // Build self-call graph SelfCalls selfCalls = new SelfCalls(classContext) { public boolean wantCallsFor(Method method) { return !method.isPublic(); } }; selfCalls.execute(); CallGraph callGraph = selfCalls.getCallGraph(); // Find call edges that are obviously locked Set<CallSite> obviouslyLockedSites = findObviouslyLockedCallSites(classContext, selfCalls); // Initially, assume all methods are locked Set<Method> lockedMethodSet = new HashSet<Method>(); lockedMethodSet.addAll(Arrays.asList(methodList)); // Assume all public methods are unlocked for (int i = 0; i < methodList.length; ++i) { Method method = methodList[i]; if (method.isPublic()) { lockedMethodSet.remove(method); } } // Explore the self-call graph to find nonpublic methods // that can be called from an unlocked context. boolean change; do { change = false; for (Iterator<CallGraphEdge> i = callGraph.edgeIterator(); i.hasNext(); ) { CallGraphEdge edge = i.next(); CallSite callSite = edge.getCallSite(); // Ignore obviously locked edges if (obviouslyLockedSites.contains(callSite)) continue; // If the calling method is locked, ignore the edge if (lockedMethodSet.contains(callSite.getMethod())) continue; // Calling method is unlocked, so the called method // is also unlocked. CallGraphNode target = edge.getTarget(); if (lockedMethodSet.remove(target.getMethod())) change = true; } } while (change); if (DEBUG) { System.out.println("Apparently locked methods:"); for (Iterator<Method> i = lockedMethodSet.iterator(); i.hasNext(); ) { Method method = i.next(); System.out.println("\t" + method.getName()); } } // We assume that any methods left in the locked set // are called only from a locked context. return lockedMethodSet; } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/7390cb77a328bee310139a77864ef1e653fa8c41/FindInconsistentSync2.java/clean/findbugs/src/java/edu/umd/cs/findbugs/detect/FindInconsistentSync2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1000,
32,
1305,
34,
1104,
8966,
4712,
12,
797,
1042,
667,
1042,
13,
202,
202,
15069,
7577,
1263,
503,
16,
1910,
2426,
9418,
503,
288,
202,
202,
5852,
797,
2252,
797,
273,
667... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1000,
32,
1305,
34,
1104,
8966,
4712,
12,
797,
1042,
667,
1042,
13,
202,
202,
15069,
7577,
1263,
503,
16,
1910,
2426,
9418,
503,
288,
202,
202,
5852,
797,
2252,
797,
273,
667... |
XMLUtil.writeXmlFile(lineCountsBuilder.getDocument(), lineCountsFileName); | cacheBuilder.updateBinaryStatus(builder.getFileBuilders().values(), repositoryFileManager.getRootRevisionNumber()); XMLUtil.writeXmlFile(cacheBuilder.getDocument(), cacheFileName); | protected void handleLineCounts(SAXParserFactory factory) throws IOException { long startTime = System.currentTimeMillis(); String xmlFile = ConfigurationOptions.getCacheDir() + REPOSITORIES_XML; RepositoriesBuilder repositoriesBuilder = new RepositoriesBuilder(); try { FileInputStream repositoriesFile = new FileInputStream(xmlFile); SAXParser parser = factory.newSAXParser(); parser.parse(repositoriesFile, new SvnXmlRepositoriesFileHandler(repositoriesBuilder)); } catch (ParserConfigurationException e) { } catch (SAXException e) { } catch (IOException e) { } String lineCountsFileName = ConfigurationOptions.getCacheDir() + repositoriesBuilder.getFileName(repositoryFileManager.getRepositoryUuid()); XMLUtil.writeXmlFile(repositoriesBuilder.getDocument(), xmlFile); logger.fine("parsing repositories finished in " + (System.currentTimeMillis() - startTime) + " ms."); startTime = System.currentTimeMillis(); CacheBuilder lineCountsBuilder = new CacheBuilder(builder, repositoryFileManager); try { FileInputStream lineCountsFile = new FileInputStream(lineCountsFileName); SAXParser parser = factory.newSAXParser(); parser.parse(lineCountsFile, new SvnXmlCacheFileHandler(lineCountsBuilder)); } catch (ParserConfigurationException e) { } catch (SAXException e) { } catch (IOException e) { } logger.fine("parsing line counts finished in " + (System.currentTimeMillis() - startTime) + " ms."); startTime = System.currentTimeMillis(); int limit = 20000; int c = 0; Collection fileBuilders = builder.getFileBuilders().values(); for (Iterator iter = fileBuilders.iterator(); iter.hasNext();) { FileBuilder fileBuilder = (FileBuilder) iter.next(); if (fileBuilder.isBinary()) continue; String fileName = fileBuilder.getName(); List revisions = fileBuilder.getRevisions(); for (int i = 0; i < revisions.size(); i++) { if (i + 1 < revisions.size() && ((RevisionData) revisions.get(i)).hasNoLines() && !((RevisionData) revisions.get(i)).isDeletion()) { if (((RevisionData) revisions.get(i + 1)).isDeletion()) continue; String revNrNew = ((RevisionData) revisions.get(i)).getRevisionNumber(); String revNrOld = ((RevisionData) revisions.get(i + 1)).getRevisionNumber(); int lineDiff[]; try { lineDiff = repositoryFileManager.getLineDiff(revNrOld, revNrNew, fileName); } catch (BinaryDiffException e) { // file is binary and has been deleted fileBuilder.setBinary(true); break; } if (lineDiff[0] != -1 && lineDiff[1] != -1) { builder.updateRevision(fileName, revNrNew, lineDiff[0], lineDiff[1]); lineCountsBuilder.newRevision(fileName, revNrNew, lineDiff[0] + "", lineDiff[1] + ""); } else { System.out.println("unknown behaviour; to be investigated"); } } } if (c++ > limit) break; } XMLUtil.writeXmlFile(lineCountsBuilder.getDocument(), lineCountsFileName); logger.fine("parsing svn diff finished in " + (System.currentTimeMillis() - startTime) + " ms."); } | 49097 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49097/4988f36e074300907505f8c9b5030fa8378a0ff2/SvnLogfileParser.java/buggy/src/net/sf/statcvs/input/SvnLogfileParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1640,
1670,
9211,
12,
55,
2501,
2678,
1733,
3272,
13,
1216,
1860,
288,
3639,
1525,
8657,
273,
2332,
18,
2972,
28512,
5621,
377,
202,
780,
2025,
812,
273,
4659,
1320,
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,
377,
4750,
918,
1640,
1670,
9211,
12,
55,
2501,
2678,
1733,
3272,
13,
1216,
1860,
288,
3639,
1525,
8657,
273,
2332,
18,
2972,
28512,
5621,
377,
202,
780,
2025,
812,
273,
4659,
1320,
18,
588,
... |
XMLElement req = new XMLElement(AccountService.CREATE_DATA_SOURCE_REQUEST); | XMLElement req = new XMLElement(AdminService.CREATE_DATA_SOURCE_REQUEST); req.addElement(AdminService.E_ID).setText(account.getId()); | public DataSource createDataSource(Account account, DataSource.Type dsType, String dsName, Map<String, Object> attrs) throws ServiceException { XMLElement req = new XMLElement(AccountService.CREATE_DATA_SOURCE_REQUEST); Element ds = req.addElement(AccountService.E_DATA_SOURCE); ds.addAttribute(AccountService.A_NAME, dsName); ds.addAttribute(AccountService.A_TYPE, dsType.name()); addAttrElementsMailService(ds, attrs); Element response = invokeOnTargetAccount(req, account.getId()).getElement(AccountService.E_DATA_SOURCE); return new SoapDataSource(response); } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/92431db638fb3b73b3fa681e60e832207053332c/SoapProvisioning.java/buggy/ZimbraServer/src/java/com/zimbra/cs/account/soap/SoapProvisioning.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
12806,
752,
8597,
12,
3032,
2236,
16,
12806,
18,
559,
3780,
559,
16,
514,
3780,
461,
16,
1635,
32,
780,
16,
1033,
34,
3422,
13,
1216,
16489,
288,
3639,
1139,
11155,
1111,
273,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
12806,
752,
8597,
12,
3032,
2236,
16,
12806,
18,
559,
3780,
559,
16,
514,
3780,
461,
16,
1635,
32,
780,
16,
1033,
34,
3422,
13,
1216,
16489,
288,
3639,
1139,
11155,
1111,
273,
394... |
after.setAmount(cb, (amountSupplied * UNITS_OF_CARGO_PER_WAGON) + amountAlready); | after.setAmount(cb, (amountSupplied) + amountAlready); | public void update(World w) { NonNullElements nonNullStations = new NonNullElements(KEY.STATIONS, w); while (nonNullStations.next()) { StationModel station = (StationModel)nonNullStations.getElement(); SupplyAtStation supply = station.getSupply(); CargoBundle cargoBundle = (CargoBundle)w.get(KEY.CARGO_BUNDLES, station.getCargoBundleNumber()); CargoBundle before = cargoBundle.getCopy(); CargoBundle after = cargoBundle.getCopy(); int stationNumber = nonNullStations.getIndex(); /* Let the cargo have a half life of one year, so half the existing cargo wastes away.*/ Iterator it = after.cargoBatchIterator(); while (it.hasNext()) { CargoBatch cb = (CargoBatch)it.next(); int amount = after.getAmount(cb); if (amount > 0) { after.setAmount(cb, amount / 2); } } for (int i = 0; i < w.size(KEY.CARGO_TYPES); i++) { int amountSupplied = supply.getSupply(i); CargoType cargoType = (CargoType) w.get(KEY.CARGO_TYPES, i); if (amountSupplied > 0) { CargoBatch cb = new CargoBatch(i, station.x, station.y, 0, stationNumber); int amountAlready = after.getAmount(cb); after.setAmount(cb, (amountSupplied * UNITS_OF_CARGO_PER_WAGON) + amountAlready); } } Move m = new ChangeCargoBundleMove(before, after, station.getCargoBundleNumber()); moveReceiver.processMove(m); } } | 9170 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9170/2f6a3a09b7e25110476bcad7e6573853d7efc8d0/CargoAtStationsGenerator.java/buggy/railz/src/jfreerails/server/CargoAtStationsGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1089,
12,
18071,
341,
13,
288,
3639,
7869,
3471,
31062,
510,
1012,
273,
394,
7869,
3471,
12,
3297,
18,
882,
15297,
16,
341,
1769,
3639,
1323,
261,
5836,
2041,
510,
1012,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1089,
12,
18071,
341,
13,
288,
3639,
7869,
3471,
31062,
510,
1012,
273,
394,
7869,
3471,
12,
3297,
18,
882,
15297,
16,
341,
1769,
3639,
1323,
261,
5836,
2041,
510,
1012,
18,
... |
if (!selectionIsOfType(IResource.PROJECT)) | if (!selectionIsOfType(IResource.PROJECT)) return false; Iterator resources = getSelectedResources().iterator(); while (resources.hasNext()) { IProject currentResource = (IProject) resources.next(); if (!currentResource.isOpen()) { return true; } } | protected boolean updateSelection(IStructuredSelection s) { // don't call super since we want to enable if closed project is selected. if (!selectionIsOfType(IResource.PROJECT)) return false; Iterator resources = getSelectedResources().iterator(); while (resources.hasNext()) { IProject currentResource = (IProject)resources.next(); if (!currentResource.isOpen()) { return true; } } return false;} | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/698979fab03fafd802fa0d1da93feb7d6f6fee7f/OpenResourceAction.java/buggy/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/actions/OpenResourceAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
1250,
1089,
6233,
12,
45,
30733,
6233,
272,
13,
288,
202,
759,
2727,
1404,
745,
2240,
3241,
732,
2545,
358,
4237,
309,
4375,
1984,
353,
3170,
18,
202,
202,
430,
16051,
10705,
2520,
18859... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
1089,
6233,
12,
45,
30733,
6233,
272,
13,
288,
202,
759,
2727,
1404,
745,
2240,
3241,
732,
2545,
358,
4237,
309,
4375,
1984,
353,
3170,
18,
202,
202,
430,
16051,
10705,
2520,
18859... |
IRunTask runTask = engine.createRunTask( report ); | IRunTask runTask = engine.createRunTask(report); | protected void createReportDocument( String reportdesign, String reportdocument ) throws Exception { // open an report archive, it is a folder archive. IDocArchiveWriter archive = new FileArchiveWriter( reportdocument ); // open the report runnable to execute. IReportRunnable report = engine.openReportDesign( reportdesign ); // create an IRunTask IRunTask runTask = engine.createRunTask( report ); // execute the report to create the report document. runTask.setAppContext( new HashMap( ) ); runTask.run( archive ); // close the task, release the resource. runTask.close( ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/4bce1ae0cad8677a83e260503bb7af276ddd5e48/DataExtractionTaskTest.java/clean/testsuites/org.eclipse.birt.report.tests.engine/src/org/eclipse/birt/report/tests/engine/api/DataExtractionTaskTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
752,
4820,
2519,
12,
514,
2605,
16934,
16,
1082,
202,
780,
2605,
5457,
262,
1216,
1185,
202,
95,
202,
202,
759,
1696,
392,
2605,
5052,
16,
518,
353,
279,
3009,
5052,
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,
1117,
918,
752,
4820,
2519,
12,
514,
2605,
16934,
16,
1082,
202,
780,
2605,
5457,
262,
1216,
1185,
202,
95,
202,
202,
759,
1696,
392,
2605,
5052,
16,
518,
353,
279,
3009,
5052,
18,... |
return true; | if (derived.getXSType() == XSTypeDecl.ANYSIMPLE_TYPE) return (base.getXSType() & XSTypeDecl.UR_TYPE) != 0; if ((base.getXSType() & XSTypeDecl.COMPLEX_TYPE) != 0) { if (base.getXSType() == XSTypeDecl.ANY_TYPE) base = SchemaGrammar.SG_SchemaNS.getGlobalTypeDecl(SchemaSymbols.ATTVAL_ANYSIMPLETYPE); else return false; } return checkSimpleDerivation((DatatypeValidator)derived, (DatatypeValidator)base, block); | boolean checkSimpleDerivationOk(DatatypeValidator derived, XSTypeDecl base, int block) { // REVISIT: to implement and move to common place return true; } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/860cb3b9c2ad281211d6d52beb871b2439720fa5/SchemaValidator.java/buggy/src/org/apache/xerces/impl/v2/SchemaValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1250,
866,
5784,
12041,
8482,
8809,
12,
20228,
5126,
10379,
16,
1139,
55,
559,
3456,
1026,
16,
509,
1203,
13,
288,
3639,
368,
2438,
26780,
1285,
30,
358,
2348,
471,
3635,
358,
2975,
3166,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1250,
866,
5784,
12041,
8482,
8809,
12,
20228,
5126,
10379,
16,
1139,
55,
559,
3456,
1026,
16,
509,
1203,
13,
288,
3639,
368,
2438,
26780,
1285,
30,
358,
2348,
471,
3635,
358,
2975,
3166,... |
public org.quickfix.field.ContractMultiplier getContractMultiplier() throws FieldNotFound { org.quickfix.field.ContractMultiplier value = new org.quickfix.field.ContractMultiplier(); | public quickfix.field.ContractMultiplier getContractMultiplier() throws FieldNotFound { quickfix.field.ContractMultiplier value = new quickfix.field.ContractMultiplier(); | public org.quickfix.field.ContractMultiplier getContractMultiplier() throws FieldNotFound { org.quickfix.field.ContractMultiplier value = new org.quickfix.field.ContractMultiplier(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/MassQuote.java/buggy/src/java/src/quickfix/fix42/MassQuote.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8924,
23365,
336,
8924,
23365,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8924,
23365,
460,
273,
394,
2358,
18,
19525,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8924,
23365,
336,
8924,
23365,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8924,
23365,
460,
273,
394,
2358,
18,
19525,... |
IEditorReference[] editors = editorPresentation.getEditors(); | IEditorReference[] editors = page.getEditorReferences(); | public boolean containsEditor(IEditorReference ref) { IEditorReference[] editors = editorPresentation.getEditors(); for (int i = 0; i < editors.length; i++) { if (ref == editors[i]) return true; } return false; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/45ab2bee3420234882ba61c9b99fecd868b62e8f/EditorManager.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1914,
6946,
12,
45,
6946,
2404,
1278,
13,
288,
3639,
467,
6946,
2404,
8526,
29431,
273,
1363,
18,
588,
6946,
8221,
5621,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1914,
6946,
12,
45,
6946,
2404,
1278,
13,
288,
3639,
467,
6946,
2404,
8526,
29431,
273,
1363,
18,
588,
6946,
8221,
5621,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
29... |
String detailType = propTag.getAttribute( DETAIL_TYPE_ATTRIB ); | String subType = propTag.getAttribute( SUB_TYPE_ATTRIB ); | ExtensionPropertyDefn loadProperty( IConfigurationElement elementTag, IConfigurationElement propTag, ExtensionElementDefn elementDefn ) throws ExtensionException { // load required parts String name = propTag.getAttribute( NAME_ATTRIB ); String type = propTag.getAttribute( TYPE_ATTRIB ); checkRequiredAttribute( NAME_ATTRIB, name ); checkRequiredAttribute( TYPE_ATTRIB, type ); // load optional parts String displayNameID = propTag .getAttribute( DISPLAY_NAME_ID_ATTRIB ); String canInherit = propTag.getAttribute( CAN_INHERIT_ATTRIB ); String defaultValue = propTag.getAttribute( DEFAULT_VALUE_ATTRIB ); String isEncrypted = propTag.getAttribute( IS_ENCRYPTABLE_ATTRIB ); String defaultDisplayName = propTag .getAttribute( DEFAULT_DISPLAY_NAME_ATTRIB ); String detailType = propTag.getAttribute( DETAIL_TYPE_ATTRIB ); // by default set it to 'string' type if ( StringUtil.isBlank( detailType ) ) detailType = PropertyType.STRING_TYPE_NAME; PropertyType propType = MetaDataDictionary.getInstance( ) .getPropertyType( type ); // not well-recognized or not supported by extension, fire error if ( propType == null || !getAllowedPropertyTypes( ).contains( propType ) ) throw new ExtensionException( new String[]{type}, ExtensionException.DESIGN_EXCEPTION_INVALID_PROPERTY_TYPE ); PropertyType subType = null; if ( propType.getTypeCode( ) == PropertyType.LIST_TYPE ) { subType = MetaDataDictionary.getInstance( ).getPropertyType( detailType ); if ( subType == null || !getAllowedSubPropertyTypes( ).contains( subType ) ) throw new ExtensionException( new String[]{name, detailType}, MetaDataException.DESIGN_EXCEPTION_UNSUPPORTED_SUB_TYPE ); } ExtensionPropertyDefn extPropDefn = new ExtensionPropertyDefn( ( (PeerExtensionElementDefn) elementDefn ) .getReportItemFactory( ).getMessages( ) ); extPropDefn.setName( name ); extPropDefn.setDisplayNameID( displayNameID ); extPropDefn.setType( propType ); extPropDefn.setSubType( subType ); try { Object value = extPropDefn.validateXml( null, defaultValue ); extPropDefn.setDefault( value ); } catch ( PropertyValueException e ) { throw new ExtensionException( new String[]{defaultValue}, ExtensionException.DESIGN_EXCEPTION_INVALID_DEFAULT_VALUE ); } extPropDefn.setIntrinsic( false ); extPropDefn.setStyleProperty( false ); extPropDefn.setDefaultDisplayName( defaultDisplayName ); if ( !StringUtil.isBlank( canInherit ) ) extPropDefn.setCanInherit( Boolean.valueOf( canInherit ) .booleanValue( ) ); if ( !StringUtil.isBlank( isEncrypted ) ) extPropDefn.setIsEncryptable( Boolean.valueOf( isEncrypted ) .booleanValue( ) ); List choiceList = new ArrayList( ); IConfigurationElement[] elements = propTag.getChildren( ); for ( int k = 0; k < elements.length; k++ ) { if ( CHOICE_TAG.equalsIgnoreCase( elements[k].getName( ) ) ) { ExtensionChoice choiceDefn = new ExtensionChoice( ( (PeerExtensionElementDefn) elementDefn ) .getReportItemFactory( ).getMessages( ) ); loadChoice( elements[k], choiceDefn, extPropDefn ); choiceList.add( choiceDefn ); } } if ( choiceList.size( ) > 0 ) { Choice[] choices = new Choice[choiceList.size( )]; choiceList.toArray( choices ); ChoiceSet choiceSet = new ChoiceSet( ); choiceSet.setChoices( choices ); extPropDefn.setDetails( choiceSet ); } return extPropDefn; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/0e9769fff005888b1ab32cf98f3dca93ff69326a/PeerExtensionLoader.java/buggy/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/metadata/PeerExtensionLoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
3625,
1396,
3262,
82,
1262,
1396,
12,
467,
1750,
1046,
930,
1805,
16,
9506,
202,
45,
1750,
1046,
2270,
1805,
16,
10021,
1046,
3262,
82,
930,
3262,
82,
262,
9506,
202,
15069,
10021,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3625,
1396,
3262,
82,
1262,
1396,
12,
467,
1750,
1046,
930,
1805,
16,
9506,
202,
45,
1750,
1046,
2270,
1805,
16,
10021,
1046,
3262,
82,
930,
3262,
82,
262,
9506,
202,
15069,
10021,
... |
int colon2 = name.lastIndexOf(':'); if (name.startsWith(fXmlnsSymbol)) { if (colon < 0) { uri = fNamespaceBinder.getURI(fEmptySymbol); localUri=fLocalNSBinder.getURI(fEmptySymbol); if (localUri == null) { value = fSymbolTable.addSymbol(value); fNamespaceBinder.declarePrefix(fEmptySymbol, value); fLocalNSBinder.declarePrefix(fEmptySymbol, value); removeDefault(attr, attributes); } continue; } else if (colon == colon2) { prefix = name.substring(6); prefix = (prefix.length() ==0) ? fEmptySymbol :fSymbolTable.addSymbol(prefix); if (prefix.length() == 0) { } else if (value.length() == 0) { } uri = fNamespaceBinder.getURI(prefix); localUri = fLocalNSBinder.getURI(prefix); if (uri == null || localUri == null) { if (value.length() != 0) { value = fSymbolTable.addSymbol(value); fNamespaceBinder.declarePrefix(prefix, value); fLocalNSBinder.declarePrefix(prefix, value); } } } } removeDefault(attr, attributes); | protected void namespaceFixUp (ElementImpl element, AttributeMap attributes){ if (DEBUG) { System.out.println("[ns-fixup] element:" +element.getNodeName()+ " uri: "+element.getNamespaceURI()); } String uri = element.getNamespaceURI(); String prefix = element.getPrefix(); // --------------------------------------------------------- // Fix up namespaces for element: per DOM L3 // Need to consider the following cases: // // case 1: <foo:elem xmlns:ns1="myURI" xmlns="default"/> // Assume "foo", "ns1" are declared on the parent. We should not miss // redeclaration for both "ns1" and default namespace. To solve this // we add a local binder that stores declaration only for current element. // This way we avoid outputing duplicate declarations for the same element // as well as we are not omitting redeclarations. // // case 2: <elem xmlns="" xmlns="default"/> // We need to bind default namespace to empty string, to be able to // omit duplicate declarations for the same element // // --------------------------------------------------------- // check if prefix/namespace is correct for current element // --------------------------------------------------------- if (uri != null) { // Element has a namespace uri = fSymbolTable.addSymbol(uri); prefix = (prefix == null || prefix.length() == 0) ? fEmptySymbol :fSymbolTable.addSymbol(prefix); if (fNamespaceBinder.getURI(prefix) == uri) { // The xmlns:prefix=namespace or xmlns="default" was declared at parent. // The binder always stores mapping of empty prefix to "". } else { // the prefix is either undeclared // or // conflict: the prefix is bound to another URI addNamespaceDecl(prefix, uri, element); fLocalNSBinder.declarePrefix(prefix, uri); fNamespaceBinder.declarePrefix(prefix, uri); // send startPrefixMapping call if (fValidationHandler != null) { fValidationHandler.startPrefixMapping(prefix, uri, null); } } } else { // Element has no namespace String tagName = element.getNodeName(); int colon = tagName.indexOf(':'); if (colon > -1) { // DOM Level 1 node! int colon2 = tagName.lastIndexOf(':'); if (colon != colon2) { //not a QName: report an error if (fErrorHandler != null) { // REVISIT: the namespace fix up will be done only in case namespace // processing was performed. modifyDOMError("Element's name is not a QName: "+tagName, DOMError.SEVERITY_ERROR, element); boolean continueProcess = fErrorHandler.handleError(fDOMError); // REVISIT: should we terminate upon request? } } else { // A valid QName however element is not bound to namespace // REVISIT: should we report an error in case prefix is not bound to anything? if (fErrorHandler != null) { modifyDOMError("Element <"+tagName+ "> does not belong to any namespace: prefix could be undeclared or bound to some namespace", DOMError.SEVERITY_WARNING, element); boolean continueProcess = fErrorHandler.handleError(fDOMError); // REVISIT: should we terminate upon request? } } } else { // uri=null and no colon (DOM L2 node) uri = fNamespaceBinder.getURI(fEmptySymbol); if (uri !=null && uri.length() > 0) { // undeclare default namespace declaration (before that element // bound to non-zero length uir), but adding xmlns="" decl addNamespaceDecl (fEmptySymbol, fEmptySymbol, element); fLocalNSBinder.declarePrefix(fEmptySymbol, fEmptySymbol); fNamespaceBinder.declarePrefix(fEmptySymbol, fEmptySymbol); if (fValidationHandler != null) { fValidationHandler.startPrefixMapping(fEmptySymbol, fEmptySymbol, null); } } } } // ----------------------------------------- // Fix up namespaces for attributes: per DOM L3 // check if prefix/namespace is correct the attributes // ----------------------------------------- String localUri, value, name; if (attributes != null) { // REVISIT: common code for handling namespace attributes for DOM L2 nodes // and DOM L1 nodes. Currently because we don't skip invalid declarations // for L1, we might output more namespace declarations than we would have // if namespace processing was performed (duplicate decls on different elements) // Open issues: // 1. Is it allowed to mix DOM L1 with DOM L2 nodes // 2. Should we skip invalid namespace declarations or attributes not with QName // [what should be the default behaviour] // 3. What should happen if the tree is DOM L1 tree (no namespace processing was // performed)? Should we attempt any fixup?? // // clone content of the attributes attributes.cloneMap(fAttributeList); for (int i = 0; i < fAttributeList.size(); i++) { Attr attr = (Attr) fAttributeList.elementAt(i); // normalize attribute value attr.normalize(); if (DEBUG) { System.out.println("==>[ns-fixup] process attribute: "+attr.getNodeName()); } value = attr.getValue(); name = attr.getNodeName(); uri = attr.getNamespaceURI(); // make sure that value is never null. if (value == null) { value=fEmptySymbol; } if (uri != null) { // attribute has namespace !=null prefix = attr.getPrefix(); prefix = (prefix == null || prefix.length() == 0) ? fEmptySymbol :fSymbolTable.addSymbol(prefix); String localpart = fSymbolTable.addSymbol( attr.getLocalName()); // check if attribute is a namespace decl if (prefix == fXmlnsSymbol) { //xmlns:prefix uri = fNamespaceBinder.getURI(localpart); // global prefix mapping localUri = fLocalNSBinder.getURI(localpart); // local prefix mapping value = fSymbolTable.addSymbol(value); if (uri == null || localUri == null) { if (value.length() != 0) { fNamespaceBinder.declarePrefix(localpart, value); fLocalNSBinder.declarePrefix(localpart, value); if (fValidationHandler != null) { fValidationHandler.startPrefixMapping(localpart, value, null); } } else { // REVISIT: we issue error on invalid declarations // xmlns:foo = "" } } removeDefault(attr, attributes); continue; } else if (localpart == fXmlnsSymbol && prefix == fEmptySymbol) { // xmlns // empty prefix is always bound ("" or some string) uri = fNamespaceBinder.getURI(fEmptySymbol); localUri=fLocalNSBinder.getURI(fEmptySymbol); value = fSymbolTable.addSymbol(value); if (localUri == null) { // there was no local default ns decl fLocalNSBinder.declarePrefix(fEmptySymbol, value); fNamespaceBinder.declarePrefix(fEmptySymbol, value); if (fValidationHandler != null) { fValidationHandler.startPrefixMapping(fEmptySymbol, value, null); } } removeDefault(attr, attributes); continue; } // we don't need to fix anything for default attributes removeDefault(attr, attributes); uri = fSymbolTable.addSymbol(uri); // find if for this prefix a URI was already declared String declaredURI = fNamespaceBinder.getURI(prefix); if (prefix == fEmptySymbol || declaredURI != uri) { // attribute has no prefix (default namespace decl does not apply to attributes) // OR // attribute prefix is not declared // OR // conflict: attr URI does not match the prefix in scope name = attr.getNodeName(); // Find if any prefix for attributes namespace URI is available // in the scope String declaredPrefix = fNamespaceBinder.getPrefix(uri); if (declaredPrefix == null || declaredPrefix == fEmptySymbol) { // could not find a prefix/prefix is empty string if (DEBUG) { System.out.println("==> cound not find prefix for the attribute: " +prefix); } if (prefix != fEmptySymbol) { // no need to create a new prefix: // use the one on the attribute } else { // create new prefix prefix = PREFIX +fNamespaceCounter++; } // add declaration for the new prefix addNamespaceDecl(prefix, uri, element); value = fSymbolTable.addSymbol(value); fLocalNSBinder.declarePrefix(prefix, value); fNamespaceBinder.declarePrefix(prefix, uri); if (fValidationHandler != null) { fValidationHandler.startPrefixMapping(prefix, uri, null); } } else { // use the prefix that was found (declared previously for this URI prefix = declaredPrefix; } // change prefix for this attribute attr.setPrefix(prefix); } } else { // attribute uri == null // data int colon = name.indexOf(':'); int colon2 = name.lastIndexOf(':'); // // process namespace declarations // if (name.startsWith(fXmlnsSymbol)) { // // DOM Level 1 node! // if (colon < 0) { // xmlns decl // empty prefix is always bound ("" or some string) uri = fNamespaceBinder.getURI(fEmptySymbol); localUri=fLocalNSBinder.getURI(fEmptySymbol); if (localUri == null) { value = fSymbolTable.addSymbol(value); fNamespaceBinder.declarePrefix(fEmptySymbol, value); fLocalNSBinder.declarePrefix(fEmptySymbol, value); removeDefault(attr, attributes); } continue; } else if (colon == colon2) { // xmlns:prefix decl // get prefix prefix = name.substring(6); prefix = (prefix.length() ==0) ? fEmptySymbol :fSymbolTable.addSymbol(prefix); if (prefix.length() == 0) { // REVISIT: report an error - invalid namespace declaration } else if (value.length() == 0) { // REVISIT: report an error } uri = fNamespaceBinder.getURI(prefix); // global prefix mapping localUri = fLocalNSBinder.getURI(prefix); // local prefix mapping if (uri == null || localUri == null) { // REVISIT: we are skipping invalid decls // xmlns:foo = "" if (value.length() != 0) { value = fSymbolTable.addSymbol(value); fNamespaceBinder.declarePrefix(prefix, value); fLocalNSBinder.declarePrefix(prefix, value); } // REVISIT: only if we can skip continue; } } } // remove default attribute removeDefault(attr, attributes); if (colon > -1) { // // DOM Level 1 node! // if (colon != colon2) { //REVISIT: not a QName: report an error if (fErrorHandler != null) { modifyDOMError("Attribute's name is not a QName: "+name, DOMError.SEVERITY_ERROR, attr); boolean continueProcess = fErrorHandler.handleError(fDOMError); // REVISIT: stop? } } else { // REVISIT: if we got here no namespace processing was performed // report warnings if (fErrorHandler != null) { modifyDOMError("Attribute '"+name+"' does not belong to any namespace: prefix could be undeclared or bound to some namespace", DOMError.SEVERITY_WARNING, attr); boolean continueProcess = fErrorHandler.handleError(fDOMError); } } } else { // uri=null and no colon // no fix up is needed: default namespace decl does not } } } } // end loop for attributes } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/db7e9f6d5f052c838c6ea661bf6b6fa0668be7c5/DOMNormalizer.java/buggy/src/org/apache/xerces/dom/DOMNormalizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1981,
8585,
1211,
261,
1046,
2828,
930,
16,
3601,
863,
1677,
15329,
3639,
309,
261,
9394,
13,
288,
5411,
2332,
18,
659,
18,
8222,
2932,
63,
2387,
17,
904,
416,
65,
930,
2773,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1981,
8585,
1211,
261,
1046,
2828,
930,
16,
3601,
863,
1677,
15329,
3639,
309,
261,
9394,
13,
288,
5411,
2332,
18,
659,
18,
8222,
2932,
63,
2387,
17,
904,
416,
65,
930,
2773,... | |
return handleImage(image, context, "custom", false); | return handleImage( image, context, "custom", false ); | public String onCustomImage(IImage image, Object context) { return handleImage(image, context, "custom", false); //$NON-NLS-1$ } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/1d8d582eae226915b0af0dada3168441cc0fb0a2/HTMLServerImageHandler.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/HTMLServerImageHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
603,
3802,
2040,
12,
45,
2040,
1316,
16,
1033,
819,
13,
202,
95,
202,
202,
2463,
1640,
2040,
12,
1316,
16,
819,
16,
315,
3662,
3113,
629,
11272,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
603,
3802,
2040,
12,
45,
2040,
1316,
16,
1033,
819,
13,
202,
95,
202,
202,
2463,
1640,
2040,
12,
1316,
16,
819,
16,
315,
3662,
3113,
629,
11272,
4329,
3993,
17,
5106,
1... |
if (hints != null) { | hints = CSSUtilities.convertTextRendering (e, hints); if (hints != null) | public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e) { TextNode node = (TextNode)super.createGraphicsNode(ctx, e); if (node == null) { return null; } // specify the text painter to use if (ctx.getTextPainter() != null) { node.setTextPainter(ctx.getTextPainter()); } // 'text-rendering' and 'color-rendering' RenderingHints hints = CSSUtilities.convertTextRendering(e, null); hints = CSSUtilities.convertColorRendering(e, hints); if (hints != null) { node.setRenderingHints(hints); } node.setLocation(getLocation(ctx, e)); return node; } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/1400bf64fd115d900b6f146057cbff15e0cf8380/SVGTextElementBridge.java/buggy/sources/org/apache/batik/bridge/SVGTextElementBridge.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
16830,
907,
752,
17558,
907,
12,
13691,
1042,
1103,
16,
3010,
425,
13,
288,
3639,
3867,
907,
756,
273,
261,
17299,
13,
9565,
18,
2640,
17558,
907,
12,
5900,
16,
425,
1769,
3639,
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,
16830,
907,
752,
17558,
907,
12,
13691,
1042,
1103,
16,
3010,
425,
13,
288,
3639,
3867,
907,
756,
273,
261,
17299,
13,
9565,
18,
2640,
17558,
907,
12,
5900,
16,
425,
1769,
3639,
3... |
else in.seek(0); | else in.reset(); | protected void initFile(String id) throws FormatException, IOException { super.initFile(id); in = new RandomAccessFile(id, "r"); little = true; location = 0; // some DICOM files have a 128 byte header followed by a 4 byte identifier byte[] four = new byte[4]; in.seek(128); in.read(four); if ((new String(four)).equals("DICM")) { // header exists, so we'll read it in.seek(0); byte[] header = new byte[128]; in.read(header); metadata.put("Header information", new String(header)); in.skipBytes(4); location = 128; } else in.seek(0); boolean decodingTags = true; boolean signed = false; while (decodingTags) { int tag = getNextTag(); if ((location & 1) != 0) oddLocations = true; if (inSequence) { addInfo(tag, null); if (in.getFilePointer() >= (in.length() - 4)) decodingTags = false; continue; } String s; switch (tag) { case TRANSFER_SYNTAX_UID: byte[] st = new byte[elementLength]; in.read(st); s = new String(st); addInfo(tag, s); if (s.indexOf("1.2.4") > -1 || s.indexOf("1.2.5") > -1) { throw new FormatException("Sorry, compressed DICOM images not " + "supported"); } if (s.indexOf("1.2.840.10008.1.2.2") >= 0) { bigEndianTransferSyntax = true; } break; case NUMBER_OF_FRAMES: st = new byte[elementLength]; in.read(st); s = new String(st); addInfo(tag, s); double frames = Double.parseDouble(s); if (frames > 1.0) numImages = (int) frames; break; case SAMPLES_PER_PIXEL: int samplesPerPixel = DataTools.read2SignedBytes(in, little); addInfo(tag, samplesPerPixel); break; case PHOTOMETRIC_INTERPRETATION: st = new byte[elementLength]; in.read(st); String photoInterpretation = new String(st); addInfo(tag, photoInterpretation); break; case PLANAR_CONFIGURATION: int planarConfiguration = DataTools.read2SignedBytes(in, little); addInfo(tag, planarConfiguration); break; case ROWS: height = DataTools.read2SignedBytes(in, little); addInfo(tag, height); break; case COLUMNS: width = DataTools.read2SignedBytes(in, little); addInfo(tag, width); break; case PIXEL_SPACING: st = new byte[elementLength]; in.read(st); String scale = new String(st); addInfo(tag, scale); break; case SLICE_SPACING: st = new byte[elementLength]; in.read(st); String spacing = new String(st); addInfo(tag, spacing); break; case BITS_ALLOCATED: bitsPerPixel = DataTools.read2SignedBytes(in, little); addInfo(tag, bitsPerPixel); break; case PIXEL_REPRESENTATION: int pixelRepresentation = DataTools.read2SignedBytes(in, little); signed = pixelRepresentation == 1; addInfo(tag, pixelRepresentation); break; case WINDOW_CENTER: case WINDOW_WIDTH: case RESCALE_INTERCEPT: case RESCALE_SLOPE: st = new byte[elementLength]; in.read(st); String c = new String(st); addInfo(tag, c); break; case PIXEL_DATA: if (elementLength != 0) { offsets = (int) in.getFilePointer(); addInfo(tag, location); decodingTags = false; } else addInfo(tag, null); break; case 0x7f880010: if (elementLength != 0) { offsets = location + 4; decodingTags = false; } break; default: addInfo(tag, null); } if (in.getFilePointer() >= (in.length() - 4)) decodingTags = false; } if (numImages == 0) numImages = 1; // populate OME-XML node if (ome != null) { OMETools.setPixels(ome, new Integer((String) metadata.get("Columns")), // SizeX new Integer((String) metadata.get("Rows")), // SizeY new Integer(numImages), // SizeZ new Integer(1), // SizeC new Integer(1), // SizeT "int" + ((String) metadata.get("Bits Allocated")), // PixelType new Boolean(!little), // BigEndian "XYZTC"); OMETools.setImage(ome, null, // name ((String) metadata.get("Content Date")) + "T" + ((String) metadata.get("Content Time")), // CreationDate (String) metadata.get("Image Type")); OMETools.setInstrument(ome, (String) metadata.get("Manufacturer"), (String) metadata.get("Manufacturer's Model Name"), null, null); } } | 46826 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46826/91859a26506b8a1d312b398da2c3ecd94e02fa60/DicomReader.java/clean/loci/formats/DicomReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1208,
812,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
2240,
18,
2738,
812,
12,
350,
1769,
565,
316,
273,
394,
8072,
26933,
12,
350,
16,
315,
86,
8863,
565,
1272... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1208,
812,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
2240,
18,
2738,
812,
12,
350,
1769,
565,
316,
273,
394,
8072,
26933,
12,
350,
16,
315,
86,
8863,
565,
1272... |
public org.quickfix.field.EncodedIssuer getEncodedIssuer() throws FieldNotFound { org.quickfix.field.EncodedIssuer value = new org.quickfix.field.EncodedIssuer(); | public quickfix.field.EncodedIssuer getEncodedIssuer() throws FieldNotFound { quickfix.field.EncodedIssuer value = new quickfix.field.EncodedIssuer(); | public org.quickfix.field.EncodedIssuer getEncodedIssuer() throws FieldNotFound { org.quickfix.field.EncodedIssuer value = new org.quickfix.field.EncodedIssuer(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/QuoteStatusRequest.java/buggy/src/java/src/quickfix/fix42/QuoteStatusRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
16667,
28799,
16667,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
16667,
460,
273,
394,
2358,
18,
19525,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
16667,
28799,
16667,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
16667,
460,
273,
394,
2358,
18,
19525,
9... |
if (gridColumnCountESet) result.append(gridColumnCount); else result.append("<unset>"); | if (gridColumnCountESet) result.append(gridColumnCount); else result.append("<unset>"); | public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (version: "); result.append(version); result.append(", type: "); result.append(type); result.append(", subType: "); result.append(subType); result.append(", dimension: "); if (dimensionESet) result.append(dimension); else result.append("<unset>"); result.append(", script: "); result.append(script); result.append(", units: "); result.append(units); result.append(", seriesThickness: "); if (seriesThicknessESet) result.append(seriesThickness); else result.append("<unset>"); result.append(", gridColumnCount: "); if (gridColumnCountESet) result.append(gridColumnCount); else result.append("<unset>"); result.append(')'); return result.toString(); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/ChartImpl.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/impl/ChartImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
565,
288,
3639,
309,
261,
73,
2520,
3886,
10756,
327,
2240,
18,
10492,
5621,
3639,
6674,
563,
273,
394,
6674,
12,
9565,
18,
10492,
10663,
3639,
563,
18,
6923,
2932,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
565,
288,
3639,
309,
261,
73,
2520,
3886,
10756,
327,
2240,
18,
10492,
5621,
3639,
6674,
563,
273,
394,
6674,
12,
9565,
18,
10492,
10663,
3639,
563,
18,
6923,
2932,... |
select += " AND n.nspname LIKE '"+escapeQuotes(schemaPattern.toLowerCase())+"' "; | select += " AND n.nspname LIKE '"+escapeQuotes(schemaPattern)+"' "; | public java.sql.ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String types[]) throws SQLException { String select; String orderby; String useSchemas; if (connection.haveMinimumServerVersion("7.3")) { useSchemas = "SCHEMAS"; select = "SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, c.relname AS TABLE_NAME, "+ " CASE n.nspname LIKE 'pg\\\\_%' "+ " WHEN true THEN CASE n.nspname "+ " WHEN 'pg_catalog' THEN CASE c.relkind "+ " WHEN 'r' THEN 'SYSTEM TABLE' "+ " WHEN 'v' THEN 'SYSTEM VIEW' "+ " WHEN 'i' THEN 'SYSTEM INDEX' "+ " ELSE NULL "+ " END "+ " WHEN 'pg_toast' THEN CASE c.relkind "+ " WHEN 'r' THEN 'SYSTEM TOAST TABLE' "+ " WHEN 'i' THEN 'SYSTEM TOAST INDEX' "+ " ELSE NULL "+ " END "+ " ELSE CASE c.relkind "+ " WHEN 'r' THEN 'TEMPORARY TABLE' "+ " WHEN 'i' THEN 'TEMPORARY INDEX' "+ " ELSE NULL "+ " END "+ " END "+ " WHEN false THEN CASE c.relkind "+ " WHEN 'r' THEN 'TABLE' "+ " WHEN 'i' THEN 'INDEX' "+ " WHEN 'S' THEN 'SEQUENCE' "+ " WHEN 'v' THEN 'VIEW' "+ " ELSE NULL "+ " END "+ " ELSE NULL "+ " END "+ " AS TABLE_TYPE, d.description AS REMARKS "+ " FROM pg_catalog.pg_namespace n, pg_catalog.pg_class c "+ " LEFT JOIN pg_catalog.pg_description d ON (c.oid = d.objoid) "+ " LEFT JOIN pg_catalog.pg_class dc ON (d.classoid=dc.oid AND dc.relname='pg_class') "+ " LEFT JOIN pg_catalog.pg_namespace dn ON (dn.oid=dc.relnamespace AND dn.nspname='pg_catalog') "+ " WHERE c.relnamespace = n.oid "; if (schemaPattern != null && !"".equals(schemaPattern)) { select += " AND n.nspname LIKE '"+escapeQuotes(schemaPattern.toLowerCase())+"' "; } if (tableNamePattern != null) { select += " AND c.relname LIKE '"+escapeQuotes(tableNamePattern.toLowerCase())+"' "; } orderby = " ORDER BY TABLE_TYPE,TABLE_SCHEM,TABLE_NAME "; } else { useSchemas = "NOSCHEMAS"; String tableType = ""+ " CASE c.relname LIKE 'pg\\\\_%' "+ " WHEN true THEN CASE c.relname LIKE 'pg\\\\_toast\\\\_%' "+ " WHEN true THEN CASE c.relkind "+ " WHEN 'r' THEN 'SYSTEM TOAST TABLE' "+ " WHEN 'i' THEN 'SYSTEM TOAST INDEX' "+ " ELSE NULL "+ " END "+ " WHEN false THEN CASE c.relname LIKE 'pg\\\\_temp\\\\_%' "+ " WHEN true THEN CASE c.relkind "+ " WHEN 'r' THEN 'TEMPORARY TABLE' "+ " WHEN 'i' THEN 'TEMPORARY INDEX' "+ " ELSE NULL "+ " END "+ " WHEN false THEN CASE c.relkind "+ " WHEN 'r' THEN 'SYSTEM TABLE' "+ " WHEN 'v' THEN 'SYSTEM VIEW' "+ " WHEN 'i' THEN 'SYSTEM INDEX' "+ " ELSE NULL "+ " END "+ " ELSE NULL "+ " END "+ " ELSE NULL "+ " END "+ " WHEN false THEN CASE c.relkind "+ " WHEN 'r' THEN 'TABLE' "+ " WHEN 'i' THEN 'INDEX' "+ " WHEN 'S' THEN 'SEQUENCE' "+ " WHEN 'v' THEN 'VIEW' "+ " ELSE NULL "+ " END "+ " ELSE NULL "+ " END "; orderby = " ORDER BY TABLE_TYPE,TABLE_NAME "; if (connection.haveMinimumServerVersion("7.1")) { select = "SELECT NULL AS TABLE_CAT, NULL AS TABLE_SCHEM, c.relname AS TABLE_NAME, "+tableType+" AS TABLE_TYPE, d.description AS REMARKS "+ " FROM pg_class c "+ " LEFT JOIN pg_description d ON (c.oid=d.objoid) "+ " LEFT JOIN pg_class dc ON (d.classoid = dc.oid AND dc.relname='pg_class') "+ " WHERE true "; } else { select = "SELECT NULL AS TABLE_CAT, NULL AS TABLE_SCHEM, c.relname AS TABLE_NAME, "+tableType+" AS TABLE_TYPE, NULL AS REMARKS "+ " FROM pg_class c "+ " WHERE true "; } } if (types == null) { types = defaultTableTypes; } String sql = select; sql += " AND (false "; for (int i=0; i<types.length; i++) { Hashtable clauses = (Hashtable)tableTypeClauses.get(types[i]); if (clauses != null) { String clause = (String)clauses.get(useSchemas); sql += " OR ( "+clause+" ) "; } } sql += ") "; sql += orderby; return connection.createStatement().executeQuery(sql); } | 45454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45454/fdf6b4ff936167388fc18276cbcf88c54dd0d3b7/AbstractJdbc1DatabaseMetaData.java/clean/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
29002,
12,
780,
6222,
16,
514,
1963,
3234,
16,
514,
4775,
3234,
16,
514,
1953,
63,
5717,
1216,
6483,
202,
95,
202,
202,
780,
2027,
31,
202,
202,
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,
225,
202,
482,
2252,
18,
4669,
18,
13198,
29002,
12,
780,
6222,
16,
514,
1963,
3234,
16,
514,
4775,
3234,
16,
514,
1953,
63,
5717,
1216,
6483,
202,
95,
202,
202,
780,
2027,
31,
202,
202,
7... |
boolean moreData = true; | protected String readGestureResponses(Layer layer, Projection proj, OMGridGenerator generator) throws IOException, EOFException { OMGraphic graphic; long startTime = System.currentTimeMillis(); String header = null; int gestureType; boolean moreData = true; float ver = link.dis.readFloat(); if (ver != version) { if (ver == .1) {// Big difference.... throw new IOException("LinkActionList: Versions do not match! DANGER!"); } else { Debug.message("link", "LinkActionList: Versions do not match"); } } properties = new LinkProperties(link); Debug.message("link", "LinkActionList: reading actions:"); while (true) { graphic = null; // Just consume the header, don't create a useless // string object. header = link.readDelimiter(false); if (header == Link.END_TOTAL || header == Link.END_SECTION) { long endTime = System.currentTimeMillis(); if (Debug.debugging("link")) { Debug.output("LinkActionList: received in " + (float) (endTime - startTime) / 1000.0f + " seconds"); } return header; } gestureType = link.dis.readInt(); int length; String data; switch (gestureType) { case ACTION_GRAPHICS: int graphicAction = link.dis.readInt(); if (updates == null) { updates = new Vector(); } if (LinkUtil.isMask(graphicAction, UPDATE_ADD_GRAPHIC_MASK) || LinkUtil.isMask(graphicAction, UPDATE_GRAPHIC_MASK)) { updates.addElement(readGraphic(graphicAction, proj, generator)); } else { LinkProperties props = new LinkProperties(link); updates.addElement(new GraphicUpdate(graphicAction, props.getProperty(LPC_GRAPHICID))); } reacted = true; break; case ACTION_GUI: break; case ACTION_MAP: mapUpdate = true; mapProperties = new LinkProperties(link); break; default: System.err.println("LinkActionList: received unknown gesture type."); } } } | 47208 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47208/2419f21f3cca678ab2c0f7da5e9a3cef0bdffbf7/LinkActionList.java/clean/src/openmap/com/bbn/openmap/layer/link/LinkActionList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
855,
43,
16704,
12222,
12,
4576,
3018,
16,
21288,
10296,
16,
4766,
1850,
28839,
6313,
3908,
4456,
13,
5411,
1216,
1860,
16,
30051,
288,
3639,
28839,
29459,
19548,
31,
3639,
1525,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
855,
43,
16704,
12222,
12,
4576,
3018,
16,
21288,
10296,
16,
4766,
1850,
28839,
6313,
3908,
4456,
13,
5411,
1216,
1860,
16,
30051,
288,
3639,
28839,
29459,
19548,
31,
3639,
1525,... | |
end= i; | end= i + 1; | public static String getIndentString(String line, int tabWidth) { int size= line.length(); int end= 0; int blanks= 0; for (int i= 0; i < size; i++) { char c= line.charAt(i); if (c == '\t') { end= i; blanks= 0; } else if (isIndentChar(c)) { blanks++; if (blanks == tabWidth) { end= i; blanks= 0; } } else { break; } } if (end == 0) return ""; //$NON-NLS-1$ else if (end == size) return line; else return line.substring(0, end + 1); } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/82119b3fba249a608f58d1602aa8c652e22478d0/Strings.java/buggy/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/Strings.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
336,
7790,
780,
12,
780,
980,
16,
509,
3246,
2384,
13,
288,
202,
202,
474,
963,
33,
980,
18,
2469,
5621,
202,
202,
474,
679,
33,
374,
31,
202,
202,
474,
7052,
87... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
336,
7790,
780,
12,
780,
980,
16,
509,
3246,
2384,
13,
288,
202,
202,
474,
963,
33,
980,
18,
2469,
5621,
202,
202,
474,
679,
33,
374,
31,
202,
202,
474,
7052,
87... |
&& javaMethod.getReturnType().isAssignableFrom(Matcher.class); | && Matcher.class.isAssignableFrom(javaMethod.getReturnType()); | protected boolean isFactoryMethod(Method javaMethod) { return isStatic(javaMethod.getModifiers()) && isPublic(javaMethod.getModifiers()) && javaMethod.getAnnotation(Factory.class) != null && javaMethod.getReturnType().isAssignableFrom(Matcher.class); } | 52711 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52711/90fce3d24f75296423c380ac6f3a7347f506ef17/ReflectiveFactoryReader.java/clean/hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1250,
353,
1733,
1305,
12,
1305,
2252,
1305,
13,
288,
3639,
327,
16116,
12,
6290,
1305,
18,
588,
11948,
10756,
7734,
597,
19620,
12,
6290,
1305,
18,
588,
11948,
10756,
7734,
597,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
353,
1733,
1305,
12,
1305,
2252,
1305,
13,
288,
3639,
327,
16116,
12,
6290,
1305,
18,
588,
11948,
10756,
7734,
597,
19620,
12,
6290,
1305,
18,
588,
11948,
10756,
7734,
597,
22... |
for(int i = 0; i < plafItems.length; ++i) { | for (int i = 0; i < plafItems.length; ++i) { | Menubar(Main db) { super(); this.db = db; String[] fileItems = {"Open...", "Run...", "", "Exit"}; String[] fileCmds = {"Open", "Load", "", "Exit"}; char[] fileShortCuts = {'0', 'N', '\0', 'X'}; int[] fileAccelerators = {KeyEvent.VK_O, KeyEvent.VK_N, 0, KeyEvent.VK_Q}; String[] editItems = {"Cut", "Copy", "Paste", "Go to function..."}; char[] editShortCuts = {'T', 'C', 'P', 'F'}; String[] debugItems = {"Break", "Go", "Step Into", "Step Over", "Step Out"}; char[] debugShortCuts = {'B', 'G', 'I', 'O', 'T'}; String[] plafItems = {"Metal", "Windows", "Motif"}; char [] plafShortCuts = {'M', 'W', 'F'}; int[] debugAccelerators = {KeyEvent.VK_PAUSE, KeyEvent.VK_F5, KeyEvent.VK_F11, KeyEvent.VK_F7, KeyEvent.VK_F8, 0, 0}; JMenu fileMenu = new JMenu("File"); fileMenu.setMnemonic('F'); JMenu editMenu = new JMenu("Edit"); editMenu.setMnemonic('E'); JMenu plafMenu = new JMenu("Platform"); plafMenu.setMnemonic('P'); JMenu debugMenu = new JMenu("Debug"); debugMenu.setMnemonic('D'); windowMenu = new JMenu("Window"); windowMenu.setMnemonic('W'); for(int i = 0; i < fileItems.length; ++i) { if(fileItems[i].length() == 0) { fileMenu.addSeparator(); } else { JMenuItem item = new JMenuItem(fileItems[i], fileShortCuts[i]); item.setActionCommand(fileCmds[i]); item.addActionListener(this); fileMenu.add(item); if(fileAccelerators[i] != 0) { KeyStroke k = KeyStroke.getKeyStroke(fileAccelerators[i], Event.CTRL_MASK); item.setAccelerator(k); } } } for(int i = 0; i < editItems.length; ++i) { JMenuItem item = new JMenuItem(editItems[i], editShortCuts[i]); item.addActionListener(this); editMenu.add(item); } for(int i = 0; i < plafItems.length; ++i) { JMenuItem item = new JMenuItem(plafItems[i], plafShortCuts[i]); item.addActionListener(this); plafMenu.add(item); } for(int i = 0; i < debugItems.length; ++i) { JMenuItem item = new JMenuItem(debugItems[i], debugShortCuts[i]); item.addActionListener(this); if(debugAccelerators[i] != 0) { KeyStroke k = KeyStroke.getKeyStroke(debugAccelerators[i], 0); item.setAccelerator(k); } if(i != 0) { item.setEnabled(false); } debugMenu.add(item); } breakOnExceptions = new JCheckBoxMenuItem("Break on Exceptions"); breakOnExceptions.setMnemonic('X'); breakOnExceptions.addActionListener(this); breakOnExceptions.setSelected(false); debugMenu.add(breakOnExceptions); add(fileMenu); add(editMenu); //add(plafMenu); add(debugMenu); JMenuItem item; windowMenu.add(item = new JMenuItem("Cascade", 'A')); item.addActionListener(this); windowMenu.add(item = new JMenuItem("Tile", 'T')); item.addActionListener(this); windowMenu.addSeparator(); windowMenu.add(item = new JMenuItem("Console", 'C')); item.addActionListener(this); add(windowMenu); } | 19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/bebd557da53b74c60ab8525aa96904d4cee6224c/Main.java/buggy/toolsrc/org/mozilla/javascript/tools/debugger/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
490,
275,
373,
297,
12,
6376,
1319,
13,
288,
3639,
2240,
5621,
3639,
333,
18,
1966,
273,
1319,
31,
3639,
514,
8526,
585,
3126,
225,
273,
12528,
3678,
7070,
16,
315,
1997,
7070,
16,
2345... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
490,
275,
373,
297,
12,
6376,
1319,
13,
288,
3639,
2240,
5621,
3639,
333,
18,
1966,
273,
1319,
31,
3639,
514,
8526,
585,
3126,
225,
273,
12528,
3678,
7070,
16,
315,
1997,
7070,
16,
2345... |
public CommandTyrant(Emperor emperor) { _app = Application.application(); _emperor = emperor; _controlTyrant = emperor.getControlTyrant (); _breakpointTyrant = emperor.getBreakpointTyrant(); _sourceTyrant = emperor.getSourceTyrant (); _stackTyrant = emperor.getStackTyrant (); _watchTyrant = emperor.getWatchTyrant (); _consoleTyrant = emperor.getConsoleTyrant (); _inspectorTyrant = emperor.getInspectorTyrant (); // figure out if native clipboard is supported... try { Class.forName("java.awt.datatransfer.Clipboard"); Class.forName("netscape.application.jdk11compatibility.JDKClipboard");// if(ASS)System.out.println( "using native clipboard"); } catch(Exception e) { _usingLocalClipboard = true;// if(ASS)System.out.println( "using local clipboard"); } if(ASS)ER.T(null!=_controlTyrant ,"emperor init order problem", this); if(ASS)ER.T(null!=_breakpointTyrant,"emperor init order problem", this); if(ASS)ER.T(null!=_sourceTyrant ,"emperor init order problem", this); if(ASS)ER.T(null!=_stackTyrant ,"emperor init order problem", this); if(ASS)ER.T(null!=_watchTyrant ,"emperor init order problem", this); if(ASS)ER.T(null!=_consoleTyrant ,"emperor init order problem", this); if(ASS)ER.T(null!=_inspectorTyrant ,"emperor init order problem", this); _controlTyrant.addObserver(this); _sourceTyrant.addObserver(this); _breakpointTyrant.addObserver(this); _initCmdStates(); refreshCmdStates(); } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/2de73cf99dce60cce549e7757f841284b68d1220/CommandTyrant.java/buggy/js/jsdj/classes/com/netscape/jsdebugging/ifcui/CommandTyrant.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3498,
56,
93,
6890,
12,
1514,
457,
280,
801,
457,
280,
13,
565,
288,
3639,
389,
2910,
273,
4257,
18,
3685,
5621,
3639,
389,
351,
457,
280,
273,
801,
457,
280,
31,
3639,
389,
709... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3498,
56,
93,
6890,
12,
1514,
457,
280,
801,
457,
280,
13,
565,
288,
3639,
389,
2910,
273,
4257,
18,
3685,
5621,
3639,
389,
351,
457,
280,
273,
801,
457,
280,
31,
3639,
389,
709... | ||
fieldDescriptor)); | fieldDescriptor, classloader)); | static VM_Field findOrCreateField(VM_Atom classDescriptor, VM_Atom fieldName, VM_Atom fieldDescriptor) { return VM_FieldDictionary.getValue(findOrCreateFieldId(classDescriptor, fieldName, fieldDescriptor)); } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/b50ef93406b2ef984f8285babf993d262ec89fae/VM_ClassLoader.java/clean/rvm/src/vm/classLoader/VM_ClassLoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
8251,
67,
974,
1104,
17717,
974,
12,
7397,
67,
3641,
667,
3187,
16,
4405,
565,
8251,
67,
3641,
4289,
16,
4405,
565,
8251,
67,
3641,
652,
3187,
13,
288,
565,
327,
8251,
67,
974,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
8251,
67,
974,
1104,
17717,
974,
12,
7397,
67,
3641,
667,
3187,
16,
4405,
565,
8251,
67,
3641,
4289,
16,
4405,
565,
8251,
67,
3641,
652,
3187,
13,
288,
565,
327,
8251,
67,
974,
1... |
Messages.getString( "exception.missing.component.interaction", getULocale( ) ) ); | Messages.getString( "SwtRendererImpl.exception.missing.component.interaction", getULocale( ) ) ); | public void enableInteraction( InteractionEvent iev ) throws ChartException { if ( _iun == null ) { logger.log( ILogger.WARNING, Messages.getString( "exception.missing.component.interaction", getULocale( ) ) ); //$NON-NLS-1$ return; } final Trigger[] tga = iev.getTriggers( ); if ( tga == null ) { return; } Region clipping = new Region( ); _gc.getClipping( clipping ); // CREATE AND SETUP THE SHAPES FOR INTERACTION TriggerCondition tc; ArrayList al; final PrimitiveRenderEvent pre = iev.getHotSpot( ); if ( pre instanceof PolygonRenderEvent ) { final Location[] loa = ( (PolygonRenderEvent) pre ).getPoints( ); for ( int i = 0; i < tga.length; i++ ) { tc = tga[i].getCondition( ); al = (ArrayList) _lhmAllTriggers.get( tc ); if ( al == null ) { al = new ArrayList( 4 ); // UNDER NORMAL CONDITIONS _lhmAllTriggers.put( tc, al ); } al.add( new RegionAction( iev.getStructureSource( ), loa, tga[i].getAction( ), dTranslateX, dTranslateY, dScale, clipping ) ); } } else if ( pre instanceof RectangleRenderEvent ) { final Bounds bo = ( (RectangleRenderEvent) pre ).getBounds( ); for ( int i = 0; i < tga.length; i++ ) { tc = tga[i].getCondition( ); al = (ArrayList) _lhmAllTriggers.get( tc ); if ( al == null ) { al = new ArrayList( 4 ); // UNDER NORMAL CONDITIONS _lhmAllTriggers.put( tc, al ); } al.add( new RegionAction( iev.getStructureSource( ), bo, tga[i].getAction( ), dTranslateX, dTranslateY, dScale, clipping ) ); } } else if ( pre instanceof OvalRenderEvent ) { final Bounds boEllipse = ( (OvalRenderEvent) pre ).getBounds( ); for ( int i = 0; i < tga.length; i++ ) { tc = tga[i].getCondition( ); al = (ArrayList) _lhmAllTriggers.get( tc ); if ( al == null ) { al = new ArrayList( 4 ); // UNDER NORMAL CONDITIONS _lhmAllTriggers.put( tc, al ); } // using rectangle to simulate the oval due to swt limitation. al.add( new RegionAction( iev.getStructureSource( ), boEllipse, tga[i].getAction( ), dTranslateX, dTranslateY, dScale, clipping ) ); } } else if ( pre instanceof ArcRenderEvent ) { final ArcRenderEvent are = (ArcRenderEvent) pre; final Bounds boEllipse = are.getEllipseBounds( ); double dStart = are.getStartAngle( ); double dExtent = are.getAngleExtent( ); int iArcType = are.getStyle( ); for ( int i = 0; i < tga.length; i++ ) { tc = tga[i].getCondition( ); al = (ArrayList) _lhmAllTriggers.get( tc ); if ( al == null ) { al = new ArrayList( 4 ); // UNDER NORMAL CONDITIONS _lhmAllTriggers.put( tc, al ); } // using rectangle to simulate the arc due to swt limitation. al.add( new RegionAction( iev.getStructureSource( ), boEllipse, dStart, dExtent, iArcType == ArcRenderEvent.SECTOR, tga[i].getAction( ), dTranslateX, dTranslateY, dScale, clipping ) ); } } else if ( pre instanceof AreaRenderEvent ) { final Bounds bo = ( (AreaRenderEvent) pre ).getBounds( ); for ( int i = 0; i < tga.length; i++ ) { tc = tga[i].getCondition( ); al = (ArrayList) _lhmAllTriggers.get( tc ); if ( al == null ) { al = new ArrayList( 4 ); // UNDER NORMAL CONDITIONS _lhmAllTriggers.put( tc, al ); } al.add( new RegionAction( iev.getStructureSource( ), bo, tga[i].getAction( ), dTranslateX, dTranslateY, dScale, clipping ) ); } } // free the clip region resource. clipping.dispose( ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/3143fdf952766bc9929f556edf6ff3030dcc5ed4/SwtRendererImpl.java/clean/chart/org.eclipse.birt.chart.device.swt/src/org/eclipse/birt/chart/device/swt/SwtRendererImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4237,
17419,
12,
5294,
1128,
1133,
9228,
90,
262,
1216,
14804,
503,
202,
95,
202,
202,
430,
261,
389,
77,
318,
422,
446,
262,
202,
202,
95,
1082,
202,
4901,
18,
1330,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4237,
17419,
12,
5294,
1128,
1133,
9228,
90,
262,
1216,
14804,
503,
202,
95,
202,
202,
430,
261,
389,
77,
318,
422,
446,
262,
202,
202,
95,
1082,
202,
4901,
18,
1330,
1... |
public void set_Type(java.lang.Integer _Type) | public void set_Type(java.lang.String _Type) | public void set_Type(java.lang.Integer _Type) { this._Type = _Type; } | 14127 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14127/45c621729e1c4236083dbe7e04095e230362319d/ShipmentKey.java/clean/OpenXavaTest/gen-src/org/openxava/test/ejb/ShipmentKey.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
444,
67,
559,
12,
6290,
18,
4936,
18,
780,
389,
559,
13,
282,
288,
1377,
333,
6315,
559,
273,
389,
559,
31,
282,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
444,
67,
559,
12,
6290,
18,
4936,
18,
780,
389,
559,
13,
282,
288,
1377,
333,
6315,
559,
273,
389,
559,
31,
282,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
public org.quickfix.field.LocaleOfIssue getLocaleOfIssue() throws FieldNotFound { org.quickfix.field.LocaleOfIssue value = new org.quickfix.field.LocaleOfIssue(); | public quickfix.field.LocaleOfIssue getLocaleOfIssue() throws FieldNotFound { quickfix.field.LocaleOfIssue value = new quickfix.field.LocaleOfIssue(); | public org.quickfix.field.LocaleOfIssue getLocaleOfIssue() throws FieldNotFound { org.quickfix.field.LocaleOfIssue value = new org.quickfix.field.LocaleOfIssue(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/SecurityListRequest.java/buggy/src/java/src/quickfix/fix43/SecurityListRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
3916,
951,
12956,
9595,
951,
12956,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
3916,
951,
12956,
460,
273,
394,
2358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
3916,
951,
12956,
9595,
951,
12956,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
3916,
951,
12956,
460,
273,
394,
2358,
... |
container.setText("Open Bug Reports With"); | container.setText("Open Repository Tasks With"); | private void createBugzillaReportOption(Composite parent) { Group container = new Group(parent, SWT.SHADOW_ETCHED_IN); container.setLayout(new GridLayout(2, false)); container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); container.setText("Open Bug Reports With"); reportEditor = new Button(container, SWT.RADIO); reportEditor.setText("Bug editor"); reportEditor.setSelection(getPreferenceStore().getBoolean(TaskListPreferenceConstants.REPORT_OPEN_EDITOR)); reportInternal = new Button(container, SWT.RADIO); reportInternal.setText("Internal browser"); reportInternal.setSelection(getPreferenceStore().getBoolean(TaskListPreferenceConstants.REPORT_OPEN_INTERNAL)); // reportExternal = new Button(container, SWT.RADIO); // reportExternal.setText("External browser"); // reportExternal.setSelection(getPreferenceStore().getBoolean(MylarTaskListPlugin.REPORT_OPEN_EXTERNAL)); // reportExternal.setEnabled(false); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/1b8564cf84029d69c897f7cecd362a2609268ddc/MylarTaskListPreferencePage.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/preferences/MylarTaskListPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
19865,
15990,
4820,
1895,
12,
9400,
982,
13,
288,
202,
202,
1114,
1478,
273,
394,
3756,
12,
2938,
16,
348,
8588,
18,
2664,
1880,
7306,
67,
9235,
2056,
67,
706,
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,
752,
19865,
15990,
4820,
1895,
12,
9400,
982,
13,
288,
202,
202,
1114,
1478,
273,
394,
3756,
12,
2938,
16,
348,
8588,
18,
2664,
1880,
7306,
67,
9235,
2056,
67,
706,
1769... |
renderView(LIST_SERVICE_GROUP_JSP, req, res); } | renderView(LIST_SERVICE_GROUP_JSP, req, res); } | protected void processListServiceGroups(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { Iterator serviceGroups = configContext.getAxisConfiguration().getServiceGroups(); HashMap services = configContext.getAxisConfiguration().getServices(); req.getSession().setAttribute(Constants.SERVICE_MAP, services); req.getSession().setAttribute(Constants.SERVICE_GROUP_MAP, serviceGroups); renderView(LIST_SERVICE_GROUP_JSP, req, res); } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/9cd28cc48911efea6c6eeda6bb202d386774bc29/AdminAgent.java/buggy/modules/core/src/org/apache/axis2/transport/http/AdminAgent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1207,
682,
1179,
3621,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
565,
1216,
1860,
16,
16517,
288,
565,
4498,
1156,
3621,
273,
642,
1042,
18,
588,
6558,
1750,
7675,
588,
1179,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1207,
682,
1179,
3621,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
565,
1216,
1860,
16,
16517,
288,
565,
4498,
1156,
3621,
273,
642,
1042,
18,
588,
6558,
1750,
7675,
588,
1179,
... |
protected void updateOccurrenceAnnotations(ITextSelection selection, CompilationUnit astRoot) { // TODO disabled as we currently do not support "occurencies" highlighting // super.updateOccurrenceAnnotations(selection, astRoot); } | 2697 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2697/9172c855702891832150db512a17bbe6ab1f046e/BytecodeClassFileEditor.java/buggy/eclipse/plugin/src/de/loskutov/bco/editors/BytecodeClassFileEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1089,
24267,
5655,
12,
1285,
408,
6233,
4421,
16,
3639,
22416,
2802,
3364,
2375,
13,
288,
3639,
368,
2660,
5673,
487,
732,
4551,
741,
486,
2865,
315,
25049,
18842,
13689,
6,
88... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4750,
918,
1089,
24267,
5655,
12,
1285,
408,
6233,
4421,
16,
3639,
22416,
2802,
3364,
2375,
13,
288,
3639,
368,
2660,
5673,
487,
732,
4551,
741,
486,
2865,
315,
25049,
18842,
13689,
6,
88... | ||
if (item instanceof Item) return getExpanded((Item) item); | if (item instanceof Item) { return getExpanded((Item) item); } | public boolean getExpandedState(Object elementOrTreePath) { Assert.isNotNull(elementOrTreePath); Widget item = internalGetWidgetToSelect(elementOrTreePath); if (item instanceof Item) return getExpanded((Item) item); return false; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/391f2606b4ea2c1fb5052d938ca90877ee7631f6/AbstractTreeViewer.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
336,
17957,
1119,
12,
921,
930,
1162,
2471,
743,
13,
288,
3639,
5452,
18,
291,
5962,
12,
2956,
1162,
2471,
743,
1769,
3639,
11103,
761,
273,
2713,
967,
4609,
774,
3391,
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,
1250,
336,
17957,
1119,
12,
921,
930,
1162,
2471,
743,
13,
288,
3639,
5452,
18,
291,
5962,
12,
2956,
1162,
2471,
743,
1769,
3639,
11103,
761,
273,
2713,
967,
4609,
774,
3391,
12,
... |
layoutEmitter = new TableLayoutEmitter( (TableItemDesign) list, emitter ); | layoutEmitter = new TableLayoutEmitter( ( TableItemDesign ) list, emitter ); | protected void accessGroupHeader( ListingDesign list, int index, IContentEmitter emitter ) { groupIndex = index; TableGroupDesign group = ( (TableItemDesign) list ).getGroup( index ); if ( group != null ) { TableBandDesign band = group.getHeader( ); if ( layoutEmitter == null && tableInfo.hasDropCells( index ) ) { layoutEmitter = new TableLayoutEmitter( (TableItemDesign) list, emitter ); outputEmitter = layoutEmitter; } accessTableBand( band, outputEmitter, null ); } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/3ff8c8c7dcc1456137e4ae046739e5dc4d3f729d/TableItemExecutor.java/clean/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/executor/TableItemExecutor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
2006,
1114,
1864,
12,
987,
310,
15478,
666,
16,
509,
770,
16,
1082,
202,
45,
1350,
13476,
11520,
262,
202,
95,
202,
202,
1655,
1016,
273,
770,
31,
202,
202,
1388,
1114,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
2006,
1114,
1864,
12,
987,
310,
15478,
666,
16,
509,
770,
16,
1082,
202,
45,
1350,
13476,
11520,
262,
202,
95,
202,
202,
1655,
1016,
273,
770,
31,
202,
202,
1388,
1114,
... |
private void updateIncarnation( MessageAddress agentId, long currentInc) { if (currentInc <= 0) { return; | private int updateIncarnation(MessageAddress agentId, long inc) { if (inc <= 0) { return 0; | private void updateIncarnation( MessageAddress agentId, long currentInc) { if (currentInc <= 0) { // wp cache miss or unknown return; } List callbacks = null; synchronized (incarnationMap) { Entry e = (Entry) incarnationMap.get(agentId); if (e == null) { // unsubscribed? return; } long cachedInc = e.getIncarnation(null); if (cachedInc < currentInc) { // increase if (log.isInfoEnabled()) { log.info( "Update agent "+agentId+ " from "+cachedInc+ " to "+currentInc); } } callbacks = e.updateIncarnation(currentInc); } // invoke callbacks in our thread int n = (callbacks == null ? 0 : callbacks.size()); for (int i = 0; i < n; i++) { IncarnationService.Callback cb = (IncarnationService.Callback) callbacks.get(i); if (log.isDebugEnabled()) { log.debug( "Invoking callback("+agentId+", "+currentInc+")["+ i+" / "+n+"]: "+cb); } cb.incarnationChanged(agentId, currentInc); } } | 7981 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7981/8342654875281e9ca7867c6fb7ffbdeddff6482f/Incarnation.java/buggy/core/src/org/cougaar/core/node/Incarnation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1089,
14559,
1303,
367,
12,
1377,
2350,
1887,
4040,
548,
16,
1377,
1525,
783,
14559,
13,
288,
565,
309,
261,
2972,
14559,
1648,
374,
13,
288,
1377,
368,
6357,
1247,
12543,
578,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
14559,
1303,
367,
12,
1377,
2350,
1887,
4040,
548,
16,
1377,
1525,
783,
14559,
13,
288,
565,
309,
261,
2972,
14559,
1648,
374,
13,
288,
1377,
368,
6357,
1247,
12543,
578,... |
PAD_FRACTION = conf.getFloat("mapred.jobtracker.taskalloc.capacitypad", 0.1f); MIN_SLOTS_FOR_PADDING = 3 * maxCurrentTasks; | PAD_FRACTION = conf.getFloat("mapred.jobtracker.taskalloc.capacitypad", 0.01f); | JobTracker(Configuration conf) throws IOException { // // Grab some static constants // maxCurrentTasks = conf.getInt("mapred.tasktracker.tasks.maximum", 2); RETIRE_JOB_INTERVAL = conf.getLong("mapred.jobtracker.retirejob.interval", 24 * 60 * 60 * 1000); RETIRE_JOB_CHECK_INTERVAL = conf.getLong("mapred.jobtracker.retirejob.check", 60 * 1000); TASK_ALLOC_EPSILON = conf.getFloat("mapred.jobtracker.taskalloc.loadbalance.epsilon", 0.2f); PAD_FRACTION = conf.getFloat("mapred.jobtracker.taskalloc.capacitypad", 0.1f); MIN_SLOTS_FOR_PADDING = 3 * maxCurrentTasks; // This is a directory of temporary submission files. We delete it // on startup, and can delete any files that we're done with this.conf = conf; JobConf jobConf = new JobConf(conf); this.systemDir = jobConf.getSystemDir(); this.fs = FileSystem.get(conf); fs.delete(systemDir); fs.mkdirs(systemDir); // Same with 'localDir' except it's always on the local disk. jobConf.deleteLocalFiles(SUBDIR); // Set ports, start RPC servers, etc. InetSocketAddress addr = getAddress(conf); this.localMachine = addr.getHostName(); this.port = addr.getPort(); this.interTrackerServer = RPC.getServer(this, addr.getPort(), 10, false, conf); this.interTrackerServer.start(); Properties p = System.getProperties(); for (Iterator it = p.keySet().iterator(); it.hasNext(); ) { String key = (String) it.next(); String val = (String) p.getProperty(key); LOG.info("Property '" + key + "' is " + val); } this.infoPort = conf.getInt("mapred.job.tracker.info.port", 50030); this.infoServer = new StatusHttpServer("job", infoPort, false); this.infoServer.start(); this.startTime = System.currentTimeMillis(); new Thread(this.expireTrackers).start(); new Thread(this.retireJobs).start(); new Thread(this.initJobs).start(); expireLaunchingTaskThread.start(); } | 49248 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49248/51b0536a45e19d6c2518e01b9121d6ca5d465076/JobTracker.java/clean/src/java/org/apache/hadoop/mapred/JobTracker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3956,
8135,
12,
1750,
2195,
13,
1216,
1860,
288,
3639,
368,
3639,
368,
17150,
2690,
760,
6810,
3639,
368,
3639,
943,
3935,
6685,
273,
2195,
18,
588,
1702,
2932,
1458,
1118,
18,
4146,
1654... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3956,
8135,
12,
1750,
2195,
13,
1216,
1860,
288,
3639,
368,
3639,
368,
17150,
2690,
760,
6810,
3639,
368,
3639,
943,
3935,
6685,
273,
2195,
18,
588,
1702,
2932,
1458,
1118,
18,
4146,
1654... |
public void removeCallback(int reason) { callbacks.remove(new Integer(reason)); | public void removeCallback(int eventCode) { callbacks.remove(new Integer(eventCode)); | public void removeCallback(int reason) { callbacks.remove(new Integer(reason)); } | 47447 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47447/aadf4ff3a60fdc44724931034a48f55542237ab3/CanvasCmd.java/clean/trunk/hecl/midp20/org/hecl/midp20/lcdui/CanvasCmd.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1206,
2428,
12,
474,
3971,
13,
288,
202,
13316,
18,
4479,
12,
2704,
2144,
12,
10579,
10019,
565,
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,
377,
1071,
918,
1206,
2428,
12,
474,
3971,
13,
288,
202,
13316,
18,
4479,
12,
2704,
2144,
12,
10579,
10019,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
private void add( ) { MapRuleBuilder builder = new MapRuleBuilder( getShell( ), Messages.getString( "MapPreferencePage.text.Title" ), //$NON-NLS-1$ provider ); builder.updateHandle( null, fTableViewer.getTable( ).getItemCount( ) ); builder.setDesignHandle( (DesignElementHandle) model ); if ( builder.open( ) == Window.OK ) { fTableViewer.add( builder.getHandle( ) ); int itemCount = fTableViewer.getTable().getItemCount(); fTableViewer.getTable().deselectAll(); fTableViewer.getTable().select(itemCount -1); fTableViewer.getTable( ).setFocus( ); updateButtons( ); refreshTableItemView( ); } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/14e0e0b168f383468901a548978e32966e9bbbc0/MapPreferencePage.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/MapPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
527,
12,
262,
202,
95,
202,
202,
863,
2175,
1263,
2089,
273,
394,
1635,
2175,
1263,
12,
7932,
1165,
12,
262,
16,
9506,
202,
5058,
18,
588,
780,
12,
315,
863,
9624,
196... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
12,
262,
202,
95,
202,
202,
863,
2175,
1263,
2089,
273,
394,
1635,
2175,
1263,
12,
7932,
1165,
12,
262,
16,
9506,
202,
5058,
18,
588,
780,
12,
315,
863,
9624,
196... | ||
for(int i=0; i<commandLine.length; i++){ | for (int i = 0; i < commandLine.length; i++){ | private String executeToString(Execute execute){ StringBuffer stringBuffer = new StringBuffer(250); String[] commandLine = execute.getCommandline(); for(int i=0; i<commandLine.length; i++){ stringBuffer.append(commandLine[i]); stringBuffer.append(" "); } String newLine = StringUtils.LINE_SEP; String[] variableArray = execute.getEnvironment(); if(variableArray != null){ stringBuffer.append(newLine); stringBuffer.append(newLine); stringBuffer.append("environment:"); stringBuffer.append(newLine); for(int z=0; z<variableArray.length; z++){ stringBuffer.append(newLine); stringBuffer.append("\t"); stringBuffer.append(variableArray[z]); } } return stringBuffer.toString(); } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/0e1127c22ce00b23a65cbf90b3abf1cee81133ab/AbstractCvsTask.java/buggy/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
1836,
5808,
12,
5289,
1836,
15329,
3639,
6674,
533,
1892,
273,
394,
6674,
12,
26520,
1769,
3639,
514,
8526,
20894,
273,
1836,
18,
588,
2189,
1369,
5621,
3639,
364,
261,
474,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
1836,
5808,
12,
5289,
1836,
15329,
3639,
6674,
533,
1892,
273,
394,
6674,
12,
26520,
1769,
3639,
514,
8526,
20894,
273,
1836,
18,
588,
2189,
1369,
5621,
3639,
364,
261,
474,
27... |
_clockSkew = Short.MIN_VALUE; | _clockSkew = 0; | public PeerState(I2PAppContext ctx) { _context = ctx; _log = ctx.logManager().getLog(PeerState.class); _remotePeer = null; _currentMACKey = null; _currentCipherKey = null; _nextMACKey = null; _nextCipherKey = null; _nextKeyingMaterial = null; _rekeyBeganLocally = false; _keyEstablishedTime = -1; _clockSkew = Short.MIN_VALUE; _currentReceiveSecond = -1; _lastSendTime = -1; _lastReceiveTime = -1; _currentACKs = new ArrayList(8); _currentSecondECNReceived = false; _remoteWantsPreviousACKs = false; _sendWindowBytes = DEFAULT_SEND_WINDOW_BYTES; _sendWindowBytesRemaining = DEFAULT_SEND_WINDOW_BYTES; _slowStartThreshold = MAX_SEND_WINDOW_BYTES/2; _lastSendRefill = _context.clock().now(); _receivePeriodBegin = _lastSendRefill; _sendBps = 0; _sendBytes = 0; _receiveBps = 0; _lastCongestionOccurred = -1; _remoteIP = null; _remotePort = -1; _remoteRequiresIntroduction = false; _weRelayToThemAs = 0; _theyRelayToUsAs = 0; _mtu = DEFAULT_MTU; _mtuLastChecked = -1; _lastACKSend = -1; _rtt = 1000; _rttDeviation = _rtt; _rto = 6000; _messagesReceived = 0; _messagesSent = 0; _context.statManager().createRateStat("udp.congestionOccurred", "How large the cwin was when congestion occurred (duration == sendBps)", "udp", new long[] { 60*60*1000, 24*60*60*1000 }); _context.statManager().createRateStat("udp.congestedRTO", "retransmission timeout after congestion (duration == rtt dev)", "udp", new long[] { 60*60*1000, 24*60*60*1000 }); } | 3808 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3808/3de23d4206b3b3daf0fa46f3cd965a0a2e0fa0bf/PeerState.java/clean/router/java/src/net/i2p/router/transport/udp/PeerState.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10669,
1119,
12,
45,
22,
52,
3371,
1042,
1103,
13,
288,
3639,
389,
2472,
273,
1103,
31,
3639,
389,
1330,
273,
1103,
18,
1330,
1318,
7675,
588,
1343,
12,
6813,
1119,
18,
1106,
1769... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10669,
1119,
12,
45,
22,
52,
3371,
1042,
1103,
13,
288,
3639,
389,
2472,
273,
1103,
31,
3639,
389,
1330,
273,
1103,
18,
1330,
1318,
7675,
588,
1343,
12,
6813,
1119,
18,
1106,
1769... |
return rect.intersectsLine(_x, _y, _x+_w, _y+_h); | return intersects(rect); | public boolean intersectsPerimeter(Rectangle rect) { return rect.intersectsLine(_x, _y, _x+_w, _y+_h); } | 1732 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1732/470aee9c52e5a1369ce1dfdc4d63afbaa70b6991/FigLine.java/buggy/src/org/tigris/gef/presentation/FigLine.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
19791,
2173,
28051,
12,
19463,
4917,
13,
288,
3639,
327,
19791,
12,
2607,
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,
... | [
1,
1,
1,
1,
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,
1250,
19791,
2173,
28051,
12,
19463,
4917,
13,
288,
3639,
327,
19791,
12,
2607,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return (double) event.totalBlocks; | return event.totalBlocks; | public double getTotalBlocks(){ return (double) event.totalBlocks; } | 46731 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46731/ca136843ae9ecb30cadada58a33a5dc2cf8ad064/SimpleProgressMessage.java/clean/src/freenet/node/fcp/SimpleProgressMessage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1645,
12831,
6450,
1435,
95,
202,
202,
2463,
261,
9056,
13,
871,
18,
4963,
6450,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1645,
12831,
6450,
1435,
95,
202,
202,
2463,
261,
9056,
13,
871,
18,
4963,
6450,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return nodeDir.getPath(); | return tempDir.getPath(); | public String get() { return nodeDir.getPath(); } | 46731 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46731/f43dcd3eaa49682824e40c5d428fa750be4517fe/Node.java/clean/src/freenet/node/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
202,
482,
514,
336,
1435,
288,
25083,
202,
2463,
756,
1621,
18,
588,
743,
5621,
6862,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
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,
4405,
202,
482,
514,
336,
1435,
288,
25083,
202,
2463,
756,
1621,
18,
588,
743,
5621,
6862,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if (VM.VerifyAssertions) VM.assert(bcIndex <= bcLength); | if (VM.VerifyAssertions) VM._assert(bcIndex <= bcLength); | private final int readUnsignedShort() { if (VM.VerifyAssertions) VM.assert(bcIndex <= bcLength); int i = (bcodes[bcIndex++] & 0xFF) << 8; i |= (bcodes[bcIndex++] & 0xFF); return (int)i; } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/40e21dc6ed844793c7ae07ad49c4ba40eadcacf4/VM_BytecodeStream.java/clean/rvm/src/vm/utility/VM_BytecodeStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
727,
509,
28198,
1435,
288,
565,
309,
261,
7397,
18,
8097,
8213,
1115,
13,
8251,
6315,
11231,
12,
13459,
1016,
1648,
6533,
1782,
1769,
565,
509,
277,
273,
261,
70,
7000,
63,
13459,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
509,
28198,
1435,
288,
565,
309,
261,
7397,
18,
8097,
8213,
1115,
13,
8251,
6315,
11231,
12,
13459,
1016,
1648,
6533,
1782,
1769,
565,
509,
277,
273,
261,
70,
7000,
63,
13459,
... |
public int methodArity(int methodId) | public int methodArity(IdFunction f) | public int methodArity(int methodId) { if (methodId == Id_JavaAdapter) { return 1; } throw IdFunction.onBadMethodId(this, methodId); } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/3526c0f6981dc6716171a07605c6bcc7b6b20cb3/JavaAdapter.java/clean/src/org/mozilla/javascript/JavaAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
707,
686,
560,
12,
548,
2083,
284,
13,
565,
288,
3639,
309,
261,
2039,
548,
422,
3124,
67,
5852,
4216,
13,
288,
327,
404,
31,
289,
3639,
604,
3124,
2083,
18,
265,
6434,
307... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
707,
686,
560,
12,
548,
2083,
284,
13,
565,
288,
3639,
309,
261,
2039,
548,
422,
3124,
67,
5852,
4216,
13,
288,
327,
404,
31,
289,
3639,
604,
3124,
2083,
18,
265,
6434,
307... |
final char ch = (char) (data[0] & 0xff); if (ch == '\n') { break; } | } catch (EOFException e) { eof = true; } | public final String readLine() throws IOException { final StringBuffer buffer = new StringBuffer(); final byte[] data = new byte[1]; boolean eof = false; while (true) { if (read(data, 0, 1) != 1) { eof = true; break; } final char ch = (char) (data[0] & 0xff); if (ch == '\n') { break; } if (ch == '\r') { // Check for '\r\n' // Note that we don't know whether the InputStream // implements mark() and reset(), but we're using // them anyway. If they don't, then characters // after a lone '\r' will be elided from the input // (ie, this is a bug). We could override mark() // and reset() to always provide at least a // one-character buffer, but then we'd violate // the spec, which says to inherit these from // FilterInputStream... super.mark(1); if (read(data, 0, 1) == 1 && data[0] != '\n') { try { super.reset(); } catch (IOException e) { } } break; } buffer.append(ch); } if (eof && buffer.length() == 0) { return (null); } return (buffer.toString());} | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/1ec8969a05c3f09c4b5b6551bf396137acb82de2/DataInputStream.java/buggy/libraries/javalib/java/io/DataInputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
727,
514,
12273,
1435,
1216,
1860,
288,
202,
6385,
6674,
1613,
273,
394,
6674,
5621,
202,
6385,
1160,
8526,
501,
273,
394,
1160,
63,
21,
15533,
202,
6494,
14813,
273,
629,
31,
202,
17523... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
727,
514,
12273,
1435,
1216,
1860,
288,
202,
6385,
6674,
1613,
273,
394,
6674,
5621,
202,
6385,
1160,
8526,
501,
273,
394,
1160,
63,
21,
15533,
202,
6494,
14813,
273,
629,
31,
202,
17523... |
newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; | firstEndOffset); edit.added.add(newEl1); edit.removed.add(current); if (current.getEndOffset() != endOffset) recreateLeafs = true; else offsetLastIndex = true; } else { offsetLastIndex = true; offsetLastIndexReplace = true; | private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(pos); Element current = paragraph.getElement(index); int newEndOffset = pos + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (pos != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), pos); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), pos, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), pos, newEndOffset); pos = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != pos) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), pos); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), pos, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultStyledDocument.java/buggy/core/src/classpath/javax/javax/swing/text/DefaultStyledDocument.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2243,
3759,
1350,
1805,
12,
1046,
1990,
8526,
501,
13,
565,
288,
5411,
3010,
1990,
1122,
273,
501,
63,
20,
15533,
1377,
15449,
1046,
10190,
273,
261,
7108,
1046,
13,
930,
2624,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2243,
3759,
1350,
1805,
12,
1046,
1990,
8526,
501,
13,
565,
288,
5411,
3010,
1990,
1122,
273,
501,
63,
20,
15533,
1377,
15449,
1046,
10190,
273,
261,
7108,
1046,
13,
930,
2624,... |
if (!f.exists() || !f.isDirectory()) { | if (!f.exists()) { | public int executeInVM(CommandlineJava commandline) throws BuildException { jdepend.textui.JDepend jdepend; if ("xml".equals(format)) { jdepend = new jdepend.xmlui.JDepend(); } else { jdepend = new jdepend.textui.JDepend(); } FileWriter fw = null; if (getOutputFile() != null) { try { fw = new FileWriter(getOutputFile().getPath()); } catch (IOException e) { String msg = "JDepend Failed when creating the output file: " + e.getMessage(); log(msg); throw new BuildException(msg); } jdepend.setWriter(new PrintWriter(fw)); log("Output to be stored in " + getOutputFile().getPath()); } try { if (getClassespath() != null) { // This is the new, better way - use classespath instead // of sourcespath. The code is currently the same - you // need class files in a directory to use this - jar files // coming soon.... String[] cP = getClassespath().list(); for (int i = 0; i < cP.length; i++) { File f = new File(cP[i]); // not necessary as JDepend would fail, but why loose // some time? if (!f.exists() || !f.isDirectory()) { String msg = "\"" + f.getPath() + "\" does not represent a valid" + " directory. JDepend would fail."; log(msg); throw new BuildException(msg); } try { jdepend.addDirectory(f.getPath()); } catch (IOException e) { String msg = "JDepend Failed when adding a class directory: " + e.getMessage(); log(msg); throw new BuildException(msg); } } } else if (getSourcespath() != null) { // This is the old way and is deprecated - classespath is // the right way to do this and is above String[] sP = getSourcespath().list(); for (int i = 0; i < sP.length; i++) { File f = new File(sP[i]); // not necessary as JDepend would fail, but why loose // some time? if (!f.exists() || !f.isDirectory()) { String msg = "\"" + f.getPath() + "\" does not represent a valid" + " directory. JDepend would fail."; log(msg); throw new BuildException(msg); } try { jdepend.addDirectory(f.getPath()); } catch (IOException e) { String msg = "JDepend Failed when adding a source directory: " + e.getMessage(); log(msg); throw new BuildException(msg); } } } // This bit turns <exclude> child tags into patters to ignore String[] patterns = defaultPatterns.getExcludePatterns(getProject()); if (patterns != null && patterns.length > 0) { if (setFilter != null) { Vector v = new Vector(); for (int i = 0; i < patterns.length; i++) { v.addElement(patterns[i]); } try { Object o = packageFilterC.newInstance(new Object[] {v}); setFilter.invoke(jdepend, new Object[] {o}); } catch (Throwable e) { log("excludes will be ignored as JDepend doesn't like me: " + e.getMessage(), Project.MSG_WARN); } } else { log("Sorry, your version of JDepend doesn't support excludes", Project.MSG_WARN); } } jdepend.analyze(); } finally { FileUtils.close(fw); } return SUCCESS; } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/b3b45f91c261f0dbf1b5acdb545ae2fe600d60cf/JDependTask.java/buggy/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
1836,
382,
7397,
12,
2189,
1369,
5852,
28305,
13,
1216,
18463,
288,
3639,
525,
5817,
18,
955,
4881,
18,
46,
4584,
525,
5817,
31,
3639,
309,
7566,
2902,
9654,
14963,
12,
2139,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
1836,
382,
7397,
12,
2189,
1369,
5852,
28305,
13,
1216,
18463,
288,
3639,
525,
5817,
18,
955,
4881,
18,
46,
4584,
525,
5817,
31,
3639,
309,
7566,
2902,
9654,
14963,
12,
2139,
... |
return computeOverallProbability(tokenProbabilityStrengths); | return computeOverallProbability(tokenProbabilityStrengths, workCorpus); | public double computeSpamProbability(Reader stream) throws java.io.IOException { //Build a set of the tokens in the Stream. Set tokens = parse(stream); //Assign their probabilities from the Corpus (using an additional //calculation to determine spamminess). SortedSet tokenProbabilityStrengths = getTokenProbabilityStrengths(tokens); //Compute and return the overall probability that the //stream is SPAM. return computeOverallProbability(tokenProbabilityStrengths); } | 47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/35e9d45b9c3172643e66a21c01d888afa0b3b08b/BayesianAnalyzer.java/buggy/src/java/org/apache/james/util/BayesianAnalyzer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1645,
3671,
3389,
301,
25598,
12,
2514,
1407,
13,
565,
1216,
2252,
18,
1594,
18,
14106,
288,
3639,
368,
3116,
279,
444,
434,
326,
2430,
316,
326,
3961,
18,
3639,
1000,
2430,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1645,
3671,
3389,
301,
25598,
12,
2514,
1407,
13,
565,
1216,
2252,
18,
1594,
18,
14106,
288,
3639,
368,
3116,
279,
444,
434,
326,
2430,
316,
326,
3961,
18,
3639,
1000,
2430,
273,
... |
addAction(dropDown, IClasspathInformationProvider.EDIT_FILTERS); | addAction(dropDown, 4); | public DialogPackageExplorerActionGroup(IClasspathInformationProvider provider, IClasspathModifierListener listener) { super(); fLastType= UNDEFINED; fListeners= new ArrayList(); fActions= new ClasspathModifierAction[8]; ClasspathModifierOperation op; op= new AddSelectedSourceFolderOperation(listener, provider); // TODO User disabled image when available addAction(new ClasspathModifierAction(op, JavaPluginImages.DESC_ELCL_ADD_AS_SOURCE_FOLDER, null, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_AddSelSFToCP_label, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_AddSelSFToCP_tooltip, IAction.AS_PUSH_BUTTON), IClasspathInformationProvider.ADD_SEL_SF_TO_BP); op= new RemoveFromClasspathOperation(listener, provider); addAction(new ClasspathModifierAction(op, JavaPluginImages.DESC_ELCL_REMOVE_AS_SOURCE_FOLDER, JavaPluginImages.DESC_DLCL_REMOVE_AS_SOURCE_FOLDER, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_RemoveFromCP_label, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_RemoveFromCP_tooltip, IAction.AS_PUSH_BUTTON), IClasspathInformationProvider.REMOVE_FROM_BP); /*op= new IncludeOperation(listener, provider); addAction(new ClasspathModifierAction(op, JavaPluginImages.DESC_ELCL_INCLUSION, JavaPluginImages.DESC_DLCL_INCLUSION, NewWizardMessages.getString("NewSourceContainerWorkbookPage.ToolBar.Include.label"), //$NON-NLS-1$ NewWizardMessages.getString("NewSourceContainerWorkbookPage.ToolBar.Include.tooltip"), IAction.AS_PUSH_BUTTON), //$NON-NLS-1$ IClasspathInformationProvider.INCLUDE); op= new UnincludeOperation(listener, provider); addAction(new ClasspathModifierAction(op, JavaPluginImages.DESC_ELCL_INCLUSION_UNDO, JavaPluginImages.DESC_DLCL_INCLUSION_UNDO, NewWizardMessages.getString("NewSourceContainerWorkbookPage.ToolBar.Uninclude.label"), //$NON-NLS-1$ NewWizardMessages.getString("NewSourceContainerWorkbookPage.ToolBar.Uninclude.tooltip"), IAction.AS_PUSH_BUTTON), //$NON-NLS-1$ IClasspathInformationProvider.UNINCLUDE);*/ op= new ExcludeOperation(listener, provider); addAction(new ClasspathModifierAction(op, JavaPluginImages.DESC_ELCL_EXCLUDE_FROM_BUILDPATH, JavaPluginImages.DESC_DLCL_EXCLUDE_FROM_BUILDPATH, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_Exclude_label, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_Exclude_tooltip, IAction.AS_PUSH_BUTTON), IClasspathInformationProvider.EXCLUDE); op= new UnexcludeOperation(listener, provider); addAction(new ClasspathModifierAction(op, JavaPluginImages.DESC_ELCL_INCLUDE_ON_BUILDPATH, JavaPluginImages.DESC_DLCL_INCLUDE_ON_BUILDPATH, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_Unexclude_label, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_Unexclude_tooltip, IAction.AS_PUSH_BUTTON), IClasspathInformationProvider.UNEXCLUDE); op= new EditFiltersOperation(listener, provider); ClasspathModifierAction action= new ClasspathModifierAction(op, JavaPluginImages.DESC_ELCL_CONFIGURE_BUILDPATH_FILTERS, JavaPluginImages.DESC_DLCL_CONFIGURE_BUILDPATH_FILTERS, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_Edit_label, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_Edit_tooltip, IAction.AS_PUSH_BUTTON); ClasspathModifierDropDownAction dropDown= new ClasspathModifierDropDownAction(action, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_Configure_label, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_Configure_tooltip); addAction(dropDown, IClasspathInformationProvider.EDIT_FILTERS); op= new EditOutputFolderOperation(listener, provider); action= new ClasspathModifierAction(op, JavaPluginImages.DESC_ELCL_CONFIGURE_OUTPUT_FOLDER, JavaPluginImages.DESC_DLCL_CONFIGURE_OUTPUT_FOLDER, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_EditOutput_label, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_EditOutput_tooltip, IAction.AS_PUSH_BUTTON); dropDown.addAction(action); /*addAction(new ClasspathModifierAction(op, JavaPluginImages.DESC_OBJS_TEXT_EDIT, JavaPluginImages.DESC_DLCL_TEXT_EDIT, NewWizardMessages.getString("NewSourceContainerWorkbookPage.ToolBar.Edit.label"), //$NON-NLS-1$ NewWizardMessages.getString("NewSourceContainerWorkbookPage.ToolBar.Edit.tooltip"), IAction.AS_PUSH_BUTTON), //$NON-NLS-1$ IClasspathInformationProvider.EDIT);*/ op= new LinkedSourceFolderOperation(listener, provider); addAction(new ClasspathModifierAction(op, JavaPluginImages.DESC_ELCL_ADD_LINKED_SOURCE_TO_BUILDPATH, JavaPluginImages.DESC_DLCL_ADD_LINKED_SOURCE_TO_BUILDPATH, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_Link_label, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_Link_tooltip, IAction.AS_PUSH_BUTTON), IClasspathInformationProvider.CREATE_LINK); op= new ResetAllOperation(listener, provider); addAction(new ClasspathModifierAction(op, JavaPluginImages.DESC_ELCL_CLEAR, JavaPluginImages.DESC_DLCL_CLEAR, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_ClearAll_label, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_ClearAll_tooltip, IAction.AS_PUSH_BUTTON), IClasspathInformationProvider.RESET_ALL); op= new CreateFolderOperation(listener, provider); addAction(new ClasspathModifierAction(op, JavaPluginImages.DESC_OBJS_PACKFRAG_ROOT, null, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_CreateSrcFolder_label, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_CreateSrcFolder_tooltip , IAction.AS_PUSH_BUTTON), 7); } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/1eb904955720573de21b1ae3217e5b0b2051d66d/DialogPackageExplorerActionGroup.java/clean/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/DialogPackageExplorerActionGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
17242,
2261,
20938,
1803,
1114,
12,
45,
17461,
5369,
2249,
2893,
16,
467,
17461,
9829,
2223,
2991,
13,
288,
3639,
2240,
5621,
3639,
284,
3024,
559,
33,
21919,
31,
3639,
284,
5583,
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,
17242,
2261,
20938,
1803,
1114,
12,
45,
17461,
5369,
2249,
2893,
16,
467,
17461,
9829,
2223,
2991,
13,
288,
3639,
2240,
5621,
3639,
284,
3024,
559,
33,
21919,
31,
3639,
284,
5583,
3... |
IEditorReference ref = (IEditorReference) getReference(newPart); makeActiveEditor(ref); } | makeActiveEditor((IEditorReference)realPartRef); } | private void setActivePart(IWorkbenchPart newPart) { // Optimize it. if (getActivePart() == newPart) { return; } if (partBeingActivated != null) { if (partBeingActivated.getPart(false) != newPart) { WorkbenchPlugin.log(new RuntimeException(NLS.bind( "WARNING: Prevented recursive attempt to activate part {0} while still in the middle of activating part {1}", //$NON-NLS-1$ getId(newPart), getId(partBeingActivated)))); } return; } //No need to change the history if the active editor is becoming the // active part String label = null; // debugging only if (UIStats.isDebugging(UIStats.ACTIVATE_PART)) { label = newPart != null ? newPart.getTitle() : "none"; //$NON-NLS-1$ } try { IWorkbenchPartReference partref = getReference(newPart); partBeingActivated = partref; UIStats.start(UIStats.ACTIVATE_PART, label); // Notify perspective. It may deactivate fast view. Perspective persp = getActivePerspective(); if (persp != null) persp.partActivated(newPart); // Deactivate old part IWorkbenchPart oldPart = getActivePart(); if (oldPart != null) { deactivatePart(oldPart); } // Set active part. if (newPart != null) { activationList.setActive(newPart); if (newPart instanceof IEditorPart) { IEditorReference ref = (IEditorReference) getReference(newPart); makeActiveEditor(ref); } } activatePart(newPart); actionSwitcher.updateActivePart(newPart); partList.setActivePart(partref); } finally { partBeingActivated = null; Object blame = newPart == null ? (Object)this : newPart; UIStats.end(UIStats.ACTIVATE_PART, blame, label); } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/eec5a82bdca9737f7a027bde1b5f1d85d8d97a80/WorkbenchPage.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
20669,
1988,
12,
45,
2421,
22144,
1988,
394,
1988,
13,
288,
3639,
368,
12056,
10153,
518,
18,
3639,
309,
261,
588,
3896,
1988,
1435,
422,
394,
1988,
13,
288,
5411,
327,
31,
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,
918,
20669,
1988,
12,
45,
2421,
22144,
1988,
394,
1988,
13,
288,
3639,
368,
12056,
10153,
518,
18,
3639,
309,
261,
588,
3896,
1988,
1435,
422,
394,
1988,
13,
288,
5411,
327,
31,
3... |
getAdvisor().postWindowCreate(getWindowConfigurer()); getAdvisor().openIntro(getWindowConfigurer()); | fireWindowCreated(); getWindowAdvisor().openIntro(); | public int open() { if (getPages().length == 0) { showEmptyWindowContents(); } getAdvisor().postWindowCreate(getWindowConfigurer()); getAdvisor().openIntro(getWindowConfigurer()); int result = super.open(); getWorkbenchImpl().fireWindowOpened(this); getAdvisor().postWindowOpen(getWindowConfigurer()); if (perspectiveSwitcher != null) { perspectiveSwitcher.updatePerspectiveBar(); perspectiveSwitcher.updateBarParent(); } return result; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/92fddd9e283b3d2205169f9018cf3345ab8feddf/WorkbenchWindow.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
1696,
1435,
288,
377,
202,
430,
261,
588,
5716,
7675,
2469,
422,
374,
13,
288,
377,
202,
202,
4500,
1921,
3829,
6323,
5621,
377,
202,
97,
3639,
336,
28087,
7675,
2767,
3829,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
1696,
1435,
288,
377,
202,
430,
261,
588,
5716,
7675,
2469,
422,
374,
13,
288,
377,
202,
202,
4500,
1921,
3829,
6323,
5621,
377,
202,
97,
3639,
336,
28087,
7675,
2767,
3829,
... |
if (PhaseMetadata.PHASE_TRANSPORTIN.equals(phaseName) || PhaseMetadata.PHASE_DISPATCH.equals(phaseName) || PhaseMetadata.PHASE_POST_DISPATCH.equals(phaseName) || PhaseMetadata.PHASE_PRE_DISPATCH.equals(phaseName)) { return true; } return false; | return ((PhaseMetadata.PHASE_TRANSPORTIN.equals(phaseName)) || (PhaseMetadata.PHASE_DISPATCH.equals(phaseName)) || (PhaseMetadata.PHASE_POST_DISPATCH.equals(phaseName)) || (PhaseMetadata.PHASE_PRE_DISPATCH.equals(phaseName))); | public static boolean isSystemPhases(String phaseName) { if (PhaseMetadata.PHASE_TRANSPORTIN.equals(phaseName) || PhaseMetadata.PHASE_DISPATCH.equals(phaseName) || PhaseMetadata.PHASE_POST_DISPATCH.equals(phaseName) || PhaseMetadata.PHASE_PRE_DISPATCH.equals(phaseName)) { return true; } return false; } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/b6b3a1e7c436fbae471d373811a01838ae696f95/PhaseValidator.java/clean/modules/core/src/org/apache/axis2/phaseresolver/util/PhaseValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
353,
3163,
3731,
3304,
12,
780,
6855,
461,
13,
288,
3639,
309,
261,
11406,
2277,
18,
8939,
4429,
67,
8989,
31943,
706,
18,
14963,
12,
13961,
461,
13,
747,
7734,
19459,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
353,
3163,
3731,
3304,
12,
780,
6855,
461,
13,
288,
3639,
309,
261,
11406,
2277,
18,
8939,
4429,
67,
8989,
31943,
706,
18,
14963,
12,
13961,
461,
13,
747,
7734,
19459,
... |
protected void initToolBar() { | public void initToolBar() { | protected void initToolBar() { _toolBar = new ToolBar(); _toolBar.putClientProperty("JToolBar.isRollover", Boolean.TRUE); //_toolBar.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); _toolBar.add(_actionSelect); _toolBar.add(_actionBroom); _toolBar.addSeparator(); _toolBar.add(_actionObject); _toolBar.addSeparator(); _toolBar.add(_actionLinkWithStimulusCall); _toolBar.add(_actionLinkWithStimulusCreate); _toolBar.add(_actionLinkWithStimulusDestroy); _toolBar.add(_actionLinkWithStimulusSend); _toolBar.add(_actionLinkWithStimulusReturn); // other actions _toolBar.addSeparator(); _toolBar.add(ActionAddNote.SINGLETON); _toolBar.addSeparator(); _toolBar.add(_actionRectangle); _toolBar.add(_actionRRectangle); _toolBar.add(_actionCircle); _toolBar.add(_actionLine); _toolBar.add(_actionText); _toolBar.add(_actionPoly); _toolBar.add(_actionSpline); _toolBar.add(_actionInk); _toolBar.addSeparator(); _toolBar.add(_diagramName.getJComponent()); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/572942db4c4f6d20e35374ca749225016b6a394d/UMLSequenceDiagram.java/buggy/src_new/org/argouml/uml/diagram/sequence/ui/UMLSequenceDiagram.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
6364,
5190,
1435,
288,
3639,
389,
6738,
5190,
273,
394,
13288,
5190,
5621,
3639,
389,
6738,
5190,
18,
458,
1227,
1396,
2932,
46,
6364,
5190,
18,
291,
4984,
21896,
3113,
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,
1208,
6364,
5190,
1435,
288,
3639,
389,
6738,
5190,
273,
394,
13288,
5190,
5621,
3639,
389,
6738,
5190,
18,
458,
1227,
1396,
2932,
46,
6364,
5190,
18,
291,
4984,
21896,
3113,
3... |
if (rowCount == 0) { internalFetchRows(); } if (hitEndOfData) return; if (rowIndex > 0 && rowIndex < rowCount) { System.arraycopy(rowCache,rowIndex,rowCache,0,rowCount-rowIndex); rowCount -= rowIndex; rowIndex = 0; } else reallocCache(); while (!hitEndOfData) { do { PacketRowResult row = fetchNextRow(); if (hitEndOfData) { break; } | if( rowCount == 0 ) internalFetchRows(); | void fetchIntoCache() throws SQLException { if (rowCount == 0) { internalFetchRows(); } if (hitEndOfData) return; if (rowIndex > 0 && rowIndex < rowCount) { System.arraycopy(rowCache,rowIndex,rowCache,0,rowCount-rowIndex); rowCount -= rowIndex; rowIndex = 0; } else reallocCache(); while (!hitEndOfData) { do { PacketRowResult row = fetchNextRow(); if (hitEndOfData) { break; } rowCache[rowCount] = row; rowCount++; } while (rowCount < fetchSize); if (!hitEndOfData) reallocCache(); } return ; } | 2029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2029/32392a05000c2cc18ee482dbd1f8975eaa93af63/TdsResultSet.java/buggy/src.old/main/com/internetcds/jdbc/tds/TdsResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
2158,
5952,
1649,
1435,
1216,
6483,
565,
288,
1377,
309,
261,
492,
1380,
422,
374,
13,
288,
3639,
2713,
5005,
4300,
5621,
1377,
289,
1377,
309,
261,
15989,
23358,
751,
13,
327,
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,
918,
2158,
5952,
1649,
1435,
1216,
6483,
565,
288,
1377,
309,
261,
492,
1380,
422,
374,
13,
288,
3639,
2713,
5005,
4300,
5621,
1377,
289,
1377,
309,
261,
15989,
23358,
751,
13,
327,
31,
... |
if (shortName != 0 && opt.getShortName() == shortName) | if ((isPlainShort || opt.isJoined()) && opt.getShortName() == shortName) | private void handleLongOption(String real, int index) throws OptionException { String option = real.substring(index); String justName = option; int eq = option.indexOf('='); if (eq != - 1) justName = option.substring(0, eq); char shortName = 0; if (justName.length() == 1) shortName = justName.charAt(0); Option found = null; for (int i = options.size() - 1; i >= 0; --i) { Option opt = (Option) options.get(i); if (justName.equals(opt.getLongName())) { found = opt; break; } if (shortName != 0 && opt.getShortName() == shortName) { found = opt; break; } } if (found == null) { String msg = MessageFormat.format(Messages.getString("Parser.Unrecognized"), //$NON-NLS-1$ new Object[] { real }); throw new OptionException(msg); } String argument = null; if (found.getTakesArgument()) { if (eq == - 1) argument = getArgument(real); else argument = option.substring(eq + 1); } else if (eq != - 1) { String msg = MessageFormat.format(Messages.getString("Parser.NoArg"), //$NON-NLS-1$ new Object[] { real.substring(0, eq + index) }); throw new OptionException(msg); } found.parsed(argument); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/bd3c4af88fcde25afb91781dd0bd56ebcfa8a15b/Parser.java/clean/core/src/classpath/tools/gnu/classpath/tools/getopt/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1640,
3708,
1895,
12,
780,
2863,
16,
509,
770,
13,
1216,
2698,
503,
225,
288,
565,
514,
1456,
273,
2863,
18,
28023,
12,
1615,
1769,
565,
514,
2537,
461,
273,
1456,
31,
565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1640,
3708,
1895,
12,
780,
2863,
16,
509,
770,
13,
1216,
2698,
503,
225,
288,
565,
514,
1456,
273,
2863,
18,
28023,
12,
1615,
1769,
565,
514,
2537,
461,
273,
1456,
31,
565,
... |
}); } | if (getCurrentTarget() instanceof TaskCategory) { ((TaskCategory) getCurrentTarget()).addTask(source); source.setCategory((TaskCategory) getCurrentTarget()); } else if (getCurrentTarget() instanceof ITask) { ITask target = (ITask) getCurrentTarget(); source.setCategory(null); target.addSubTask(source); source.setParent(target); } getViewer().refresh(); if (MylarTasklistPlugin.getDefault() != null) { MylarTasklistPlugin.getDefault().saveTaskListAndContexts(); } return true; } else if (selectedObject instanceof ITaskListElement && MylarTasklistPlugin.getDefault().getTaskHandlerForElement((ITaskListElement) selectedObject) != null && getCurrentTarget() instanceof TaskCategory) { MylarTasklistPlugin.getDefault().getTaskHandlerForElement((ITaskListElement) selectedObject).dropItem((ITaskListElement) selectedObject, (TaskCategory) getCurrentTarget()); getViewer().refresh(); if (MylarTasklistPlugin.getDefault() != null) { MylarTasklistPlugin.getDefault().saveTaskListAndContexts(); } return true; } return false; } @Override public boolean validateDrop(Object targetObject, int operation, TransferData transferType) { Object selectedObject = ((IStructuredSelection) ((TreeViewer) getViewer()).getSelection()).getFirstElement(); if (selectedObject instanceof ITaskListElement && ((ITaskListElement) selectedObject).isDragAndDropEnabled()) { if (getCurrentTarget() != null && getCurrentTarget() instanceof TaskCategory) { return true; } else { return false; } } return TextTransfer.getInstance().isSupportedType(transferType); } }); } | private void initDragAndDrop(Composite parent) { Transfer[] types = new Transfer[] { TextTransfer.getInstance(), PluginTransfer.getInstance() }; getViewer().addDragSupport(DND.DROP_MOVE, types, new DragSourceListener() { public void dragStart(DragSourceEvent event) { if (((StructuredSelection) getViewer().getSelection()).isEmpty()) { event.doit = false; } } public void dragSetData(DragSourceEvent event) { StructuredSelection selection = (StructuredSelection) getViewer().getSelection(); if (selection.getFirstElement() instanceof ITaskListElement) { ITaskListElement element = (ITaskListElement)selection.getFirstElement(); if (!selection.isEmpty() && element.isDragAndDropEnabled()) { event.data = "" + element.getHandle(); } else { event.data = "null"; } } } public void dragFinished(DragSourceEvent event) { // don't care if the drag is done } }); getViewer().addDropSupport(DND.DROP_MOVE, types, new ViewerDropAdapter(getViewer()) { { setFeedbackEnabled(false); } @Override public boolean performDrop(Object data) { Object selectedObject = ((IStructuredSelection) ((TreeViewer) getViewer()) .getSelection()).getFirstElement(); if (selectedObject instanceof ITask) { ITask source = (ITask) selectedObject; if (source.getCategory() != null) { source.getCategory().removeTask(source); } else if (source.getParent() != null) { source.getParent().removeSubTask(source); } else { MylarTasklistPlugin.getTaskListManager().getTaskList().getRootTasks().remove(source); } if (getCurrentTarget() instanceof TaskCategory) { ((TaskCategory) getCurrentTarget()).addTask(source); source.setCategory((TaskCategory)getCurrentTarget()); } else if (getCurrentTarget() instanceof ITask) { ITask target = (ITask) getCurrentTarget(); source.setCategory(null); target.addSubTask(source); source.setParent(target); } // getViewer().setSelection(null); getViewer().refresh(); if (MylarTasklistPlugin.getDefault() != null) { MylarTasklistPlugin.getDefault().saveTaskListAndContexts(); } return true; } else if(selectedObject instanceof ITaskListElement && MylarTasklistPlugin.getDefault().getTaskHandlerForElement((ITaskListElement)selectedObject) != null && getCurrentTarget() instanceof TaskCategory){ MylarTasklistPlugin.getDefault().getTaskHandlerForElement((ITaskListElement)selectedObject).dropItem((ITaskListElement)selectedObject, (TaskCategory)getCurrentTarget());// getViewer().setSelection(null); getViewer().refresh(); if (MylarTasklistPlugin.getDefault() != null) { MylarTasklistPlugin.getDefault().saveTaskListAndContexts(); } return true; } return false; } @Override public boolean validateDrop(Object targetObject, int operation, TransferData transferType) { Object selectedObject = ((IStructuredSelection) ((TreeViewer) getViewer()) .getSelection()).getFirstElement(); if (selectedObject instanceof ITaskListElement && ((ITaskListElement)selectedObject).isDragAndDropEnabled()) { if (getCurrentTarget() != null && getCurrentTarget() instanceof TaskCategory) { return true; } else { return false; } } return TextTransfer.getInstance().isSupportedType(transferType); } }); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/d4f4b7adbac6f3f4b67fbc7714a5fbeb8cd7ff7e/TaskListView.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
11728,
1876,
7544,
12,
9400,
982,
13,
288,
3639,
12279,
8526,
1953,
273,
394,
12279,
8526,
288,
3867,
5912,
18,
588,
1442,
9334,
6258,
5912,
18,
588,
1442,
1435,
289,
31,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
11728,
1876,
7544,
12,
9400,
982,
13,
288,
3639,
12279,
8526,
1953,
273,
394,
12279,
8526,
288,
3867,
5912,
18,
588,
1442,
9334,
6258,
5912,
18,
588,
1442,
1435,
289,
31,... |
public void saveRequested() { if (MylarTaskListPlugin.getDefault().isShellActive() || forceBackgroundSave) { try { saveTaskListAndContexts();// ErrorLogger.log("Automatically saved task list", this); } catch (Exception e) { ErrorLogger.fail(e, "Could not auto save task list", false); } } } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/7eccfb28dedd459743750c638a989764ca6d450f/TaskListSaveManager.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/TaskListSaveManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1923,
11244,
1435,
288,
202,
202,
430,
261,
12062,
7901,
2174,
682,
3773,
18,
588,
1868,
7675,
291,
13220,
3896,
1435,
747,
2944,
8199,
4755,
13,
288,
1082,
202,
698,
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,
225,
202,
482,
918,
1923,
11244,
1435,
288,
202,
202,
430,
261,
12062,
7901,
2174,
682,
3773,
18,
588,
1868,
7675,
291,
13220,
3896,
1435,
747,
2944,
8199,
4755,
13,
288,
1082,
202,
698,
288,
... | ||
decl.load(null, ReferenceExp.DONT_DEREFERENCE, | decl.load(owner, ReferenceExp.DONT_DEREFERENCE, | public void compile (Compilation comp, Target target) { if (new_value instanceof LambdaExp && target instanceof IgnoreTarget && ((LambdaExp) new_value).getInlineOnly()) return; Type type; gnu.bytecode.CodeAttr code = comp.getCode(); // FIXME - handle isSetIfUnbound boolean needValue = getHasValue() && ! (target instanceof IgnoreTarget); // set the following to true if the value has been pushed. // this is used to detect not implemented cases. // when all cases are implemented, remove this. boolean valuePushed = false; // This code is kind of kludgy, because it handles a number of // different cases: assignments and definitions to both local and // global variables. Some of the complication is because we want // to generate fields for module-level definitions; this is how // bindings are exported from modules. Object value; Declaration decl = binding; Expression declValue = decl.getValue(); if (decl.getFlag(Declaration.EARLY_INIT) && isDefining() && ! decl.ignorable()) { BindingInitializer.create(decl, new_value, comp); } else if (declValue instanceof LambdaExp && decl.context instanceof ModuleExp && (! decl.isPrivate() || declValue instanceof ClassExp) && ((LambdaExp) declValue).getName() != null // FIXME && declValue == new_value) { ((LambdaExp) new_value).compileSetField(comp); } else if (decl.context instanceof ModuleExp && (new_value instanceof QuoteExp || (decl.getFlag(Declaration.IS_CONSTANT) || decl.isAlias())) && isDefining() && declValue != null) { // This is handled in ModuleExp's allocFields method. But: if (needValue) { decl.load(null, 0, comp, Target.pushObject); valuePushed = true; } } else { if (! isDefining()) decl = Declaration.followAliases(decl); if (decl.ignorable()) new_value.compile (comp, Target.Ignore); else if (decl.isAlias() && isDefining()) { decl.load(null, ReferenceExp.DONT_DEREFERENCE, comp, Target.pushObject); ClassType locType = ClassType.make("gnu.mapping.IndirectableLocation"); code.emitCheckcast(locType); new_value.compile(comp, Target.pushObject); Method meth = locType.getDeclaredMethod("setAlias", 1); code.emitInvokeVirtual(meth); } else if (decl.isIndirectBinding() && (isSetIfUnbound() || ! isDefining() || decl.isPublic())) { decl.load(null, ReferenceExp.DONT_DEREFERENCE, comp, Target.pushObject); if (isSetIfUnbound()) { if (needValue) { code.emitDup(); valuePushed = true; } code.pushScope(); code.emitDup(); Variable symLoc = code.addLocal(Compilation.typeLocation); code.emitStore(symLoc); code.emitInvokeVirtual(Compilation.typeLocation .getDeclaredMethod("isBound", 0)); code.emitIfIntEqZero(); code.emitLoad(symLoc); } new_value.compile (comp, Target.pushObject); if (needValue && ! isSetIfUnbound()) { code.emitDupX(); valuePushed = true; } String setterName = "set"; code.emitInvokeVirtual(Compilation.typeLocation .getDeclaredMethod(setterName, 1)); if (isSetIfUnbound()) { code.emitFi(); code.popScope(); } } else if (decl.isFluid()) { decl.load(null, ReferenceExp.DONT_DEREFERENCE, comp, Target.pushObject); new_value.compile(comp, Type.pointer_type); code.emitInvokeVirtual(Compilation.typeLocation .getDeclaredMethod("set", 1)); } else if (decl.isSimple ()) { type = decl.getType(); new_value.compile (comp, type); if (needValue) { code.emitDup(type); // dup or dup2 valuePushed = true; } Variable var = decl.getVariable(); if (var == null) var = decl.allocateVariable(code); code.emitStore(var); } else if (decl.context instanceof ClassExp && decl.field == null && ! getFlag(PROCEDURE) && ((ClassExp) decl.context).isMakingClassPair()) { String setName = ClassExp.slotToMethodName("set", decl.getName()); ClassExp cl = (ClassExp) decl.context; Method setter = cl.type.getDeclaredMethod(setName, 1); cl.loadHeapFrame(comp); new_value.compile(comp, decl.getType()); if (needValue) { code.emitDupX(); valuePushed = true; } code.emitInvoke(setter); } else { Field field = decl.field; if (! field.getStaticFlag()) decl.loadOwningObject(null, comp); type = field.getType(); new_value.compile (comp, type); if (field.getStaticFlag()) { if (needValue) { code.emitDup(type); valuePushed = true; } code.emitPutStatic(field); } else { if (needValue) { code.emitDupX(); valuePushed = true; } code.emitPutField(field); } } } if (needValue && ! valuePushed) throw new Error("SetExp.compile: not implemented - return value"); if (needValue) target.compileFromStack(comp, getType()); else comp.compileConstant(Values.empty, target); } | 37648 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37648/f525ea41b4380e2b2e69fbe8acaaeac1d8735f65/SetExp.java/clean/gnu/expr/SetExp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
4074,
261,
19184,
1161,
16,
5916,
1018,
13,
225,
288,
565,
309,
261,
2704,
67,
1132,
1276,
12801,
2966,
202,
10,
10,
1018,
1276,
8049,
2326,
202,
10,
10,
14015,
12025,
2966,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4074,
261,
19184,
1161,
16,
5916,
1018,
13,
225,
288,
565,
309,
261,
2704,
67,
1132,
1276,
12801,
2966,
202,
10,
10,
1018,
1276,
8049,
2326,
202,
10,
10,
14015,
12025,
2966,
... |
setJMenuBar(GUIUtilities.loadMenuBar("view.mbar")); inputHandler = new DefaultInputHandler(this,(DefaultInputHandler) jEdit.getInputHandler()); | View(Buffer buffer, String splitConfig) { enableEvents(AWTEvent.KEY_EVENT_MASK); setIconImage(GUIUtilities.getEditorIcon()); dockableWindowManager = new DockableWindowManager(this); toolBars = new JPanel(new VariableGridLayout( VariableGridLayout.FIXED_NUM_COLUMNS, 1)); getContentPane().add(BorderLayout.NORTH,toolBars); getContentPane().add(BorderLayout.CENTER,dockableWindowManager); getContentPane().add(BorderLayout.SOUTH,status = new StatusBar(this)); Component comp = restoreSplitConfig(buffer,splitConfig); dockableWindowManager.add(comp); status.updateBufferStatus(); status.updateMiscStatus(); EditBus.addToBus(this); setJMenuBar(GUIUtilities.loadMenuBar("view.mbar")); inputHandler = new DefaultInputHandler(this,(DefaultInputHandler) jEdit.getInputHandler()); propertiesChanged(); setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); addWindowListener(new WindowHandler()); dockableWindowManager.init(); } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/2bae6486afc07217a28fb65047dd9e8ae8b7d6a2/View.java/buggy/org/gjt/sp/jedit/View.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1767,
12,
1892,
1613,
16,
514,
1416,
809,
13,
202,
95,
202,
202,
7589,
3783,
12,
37,
8588,
1133,
18,
3297,
67,
10454,
67,
11704,
1769,
202,
202,
542,
5554,
2040,
12,
43,
5370,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1767,
12,
1892,
1613,
16,
514,
1416,
809,
13,
202,
95,
202,
202,
7589,
3783,
12,
37,
8588,
1133,
18,
3297,
67,
10454,
67,
11704,
1769,
202,
202,
542,
5554,
2040,
12,
43,
5370,
11... | |
final int attr = ScriptableObject.DONTENUM | ScriptableObject.READONLY | ScriptableObject.PERMANENT; | final int attr = ScriptableObject.DONTENUM; | private void setupDefaultPrototype() { NativeObject obj = new NativeObject(); final int attr = ScriptableObject.DONTENUM | ScriptableObject.READONLY | ScriptableObject.PERMANENT; obj.defineProperty("constructor", this, attr); // put the prototype property into the object now, then in the // wacky case of a user defining a function Object(), we don't // get an infinite loop trying to find the prototype. prototypeProperty = obj; Scriptable proto = getObjectPrototype(this); if (proto != obj) { // not the one we just made, it must remain grounded obj.setPrototype(proto); } } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/882189d2fddb2a44261816cc05aa622127582061/BaseFunction.java/clean/js/rhino/src/org/mozilla/javascript/BaseFunction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3875,
1868,
15846,
1435,
565,
288,
3639,
16717,
921,
1081,
273,
394,
16717,
921,
5621,
3639,
727,
509,
1604,
273,
22780,
921,
18,
40,
10079,
16509,
571,
7682,
22780,
921,
18,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3875,
1868,
15846,
1435,
565,
288,
3639,
16717,
921,
1081,
273,
394,
16717,
921,
5621,
3639,
727,
509,
1604,
273,
22780,
921,
18,
40,
10079,
16509,
571,
7682,
22780,
921,
18,
6... |
public void vmNotResponding(VMObject vmObject); | public void vmNotResponding(); | public void vmNotResponding(VMObject vmObject); | 58694 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58694/1984fae7ac80cb835589c1be36fc0f8533f1ef2f/VMObjectListener.java/buggy/src/org/objectweb/proactive/ic2d/event/VMObjectListener.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4268,
1248,
19577,
310,
12,
7397,
921,
4268,
921,
1769,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4268,
1248,
19577,
310,
12,
7397,
921,
4268,
921,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
WorkbenchMessages.getString("AboutFeaturesDialog.pluginInfoTitle"), WorkbenchMessages.format("AboutFeaturesDialog.pluginInfoMessage", new Object[] {info.getFeatureLabel()}), | IDEWorkbenchMessages.getString("AboutFeaturesDialog.pluginInfoTitle"), IDEWorkbenchMessages.format("AboutFeaturesDialog.pluginInfoMessage", new Object[] {info.getFeatureLabel()}), | protected void buttonPressed(int buttonId) { switch (buttonId) { case MORE_ID : { TableItem[] items = table.getSelection(); if (items.length > 0) { AboutInfo info = (AboutInfo)items[0].getData(); IFeature feature = getFeatureFor(info); if (feature != null) { IURLEntry entry = feature.getLicense(); if (entry != null) { openLink(entry.getURL().toString()); return; } } MessageDialog.openInformation( getShell(), WorkbenchMessages.getString("AboutFeaturesDialog.noInfoTitle"), //$NON-NLS-1$ WorkbenchMessages.getString("AboutFeaturesDialog.noInformation")); //$NON-NLS-1$ } return; } case PLUGINS_ID : { TableItem[] items = table.getSelection(); if (items.length > 0) { AboutInfo info = (AboutInfo)items[0].getData(); IFeature feature = getFeatureFor(info); IPluginDescriptor[] descriptors; if (feature == null) descriptors = new IPluginDescriptor[0]; else descriptors = getPluginsFor(feature); AboutPluginsDialog d = new AboutPluginsDialog( getShell(), primaryInfo, descriptors, WorkbenchMessages.getString("AboutFeaturesDialog.pluginInfoTitle"), //$NON-NLS-1$ WorkbenchMessages.format("AboutFeaturesDialog.pluginInfoMessage", new Object[] {info.getFeatureLabel()}), //$NON-NLS-1$ IHelpContextIds.ABOUT_FEATURES_PLUGINS_DIALOG); d.open(); } return; } } super.buttonPressed(buttonId); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/11827c078a0649e2471215c6f22b6a98cb0993d2/AboutFeaturesDialog.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/dialogs/AboutFeaturesDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
3568,
24624,
12,
474,
3568,
548,
13,
288,
202,
202,
9610,
261,
5391,
548,
13,
288,
1082,
202,
3593,
490,
8607,
67,
734,
294,
288,
9506,
202,
1388,
1180,
8526,
1516,
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,
225,
202,
1117,
918,
3568,
24624,
12,
474,
3568,
548,
13,
288,
202,
202,
9610,
261,
5391,
548,
13,
288,
1082,
202,
3593,
490,
8607,
67,
734,
294,
288,
9506,
202,
1388,
1180,
8526,
1516,
273,... |
paramterChooser = new ComboBoxCellEditor( table, new String[0], | paramterChooser = new ComboBoxCellEditor( table, new String[0], | private void createBindingTable( ) { Label label = new Label( displayArea, SWT.NONE ); label.setText( LABEL_REPORT_PARAMETER ); label.setLayoutData( new GridData( GridData.VERTICAL_ALIGN_BEGINNING ) ); paramBindingTable = new TableViewer( displayArea, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION ); Table table = paramBindingTable.getTable( ); GridData gd = new GridData( GridData.FILL_BOTH ); gd.horizontalSpan = 2; table.setLayoutData( gd ); table.setLinesVisible( true ); table.setHeaderVisible( true ); TableColumn parameterColumn = new TableColumn( table, SWT.LEFT ); parameterColumn.setText( COLUMN_PARAMETER ); parameterColumn.setResizable( true ); parameterColumn.setWidth( 150 ); TableColumn valueColumn = new TableColumn( table, SWT.LEFT ); valueColumn.setText( COLUMN_VALUE ); valueColumn.setResizable( true ); valueColumn.setWidth( 180 ); table.addKeyListener( new KeyAdapter( ) { /** * @see org.eclipse.swt.events.KeyAdapter#keyReleased(org.eclipse.swt.events.KeyEvent) */ public void keyReleased( KeyEvent e ) { // If Delete pressed, delete the selected row if ( e.keyCode == SWT.DEL ) { deleteRow( ); } } } ); paramBindingTable.setColumnProperties( new String[]{ COLUMN_PARAMETER, COLUMN_VALUE } ); paramterChooser = new ComboBoxCellEditor( table, new String[0], SWT.READ_ONLY ); ExpressionCellEditor valueEditor = new ExpressionCellEditor( table ); valueEditor.setDataSetList( dataSetList ); paramBindingTable.setCellEditors( new CellEditor[]{ paramterChooser, valueEditor } ); paramBindingTable.setContentProvider( contentProvider ); paramBindingTable.setLabelProvider( labelProvider ); paramBindingTable.setCellModifier( cellModifier ); paramBindingTable.setInput( bindingList ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/f5e62342ed517a2b257e427a5f18c7dee2b63f6d/HyperlinkBuilder.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/HyperlinkBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
5250,
1388,
12,
262,
202,
95,
202,
202,
2224,
1433,
273,
394,
5287,
12,
2562,
5484,
16,
348,
8588,
18,
9826,
11272,
202,
202,
1925,
18,
542,
1528,
12,
18210,
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,
225,
202,
1152,
918,
752,
5250,
1388,
12,
262,
202,
95,
202,
202,
2224,
1433,
273,
394,
5287,
12,
2562,
5484,
16,
348,
8588,
18,
9826,
11272,
202,
202,
1925,
18,
542,
1528,
12,
18210,
67,
... |
throw new TypeError(getRuntime(), inspect().getValue() + " is not a symbol"); | throw getRuntime().newTypeError(inspect().getValue() + " is not a symbol"); | public String asSymbol() { throw new TypeError(getRuntime(), inspect().getValue() + " is not a symbol"); } | 46258 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46258/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyObject.java/buggy/src/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
487,
5335,
1435,
288,
3639,
604,
18814,
7675,
2704,
19030,
12,
12009,
7675,
24805,
1435,
397,
315,
353,
486,
279,
3273,
8863,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
487,
5335,
1435,
288,
3639,
604,
18814,
7675,
2704,
19030,
12,
12009,
7675,
24805,
1435,
397,
315,
353,
486,
279,
3273,
8863,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
return ctx[2].getClassLoader(); | return ctx[4].getClassLoader(); | public static ClassLoader getCallingClassLoader() { Class[] ctx = getClassContext(); if (ctx.length < 3) return null; return ctx[2].getClassLoader(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/29fb7e0d8d953f7b4ddcb83adae29275ae740eee/VMStackWalker.java/buggy/core/src/classpath/vm/gnu/classpath/VMStackWalker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
9403,
336,
19677,
7805,
1435,
288,
202,
202,
797,
8526,
1103,
273,
2900,
1042,
5621,
202,
202,
430,
261,
5900,
18,
2469,
411,
890,
13,
1082,
202,
2463,
446,
31,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
9403,
336,
19677,
7805,
1435,
288,
202,
202,
797,
8526,
1103,
273,
2900,
1042,
5621,
202,
202,
430,
261,
5900,
18,
2469,
411,
890,
13,
1082,
202,
2463,
446,
31,
202,
202,... |
setToolTipText( "Remove selected favorites" ); | setToolTipText( "Remove Selected Favorites" ); | public DeleteFavoriteAction(FavoritesView favoritesView, boolean deleteAllFavorites) { deleteAll = deleteAllFavorites; // set the appropriate icons and tool tips for the action depending // on whether it will delete all items or not if (deleteAll) { setToolTipText("Remove all favorites"); setText("Remove all"); setImageDescriptor(BugzillaImages.REMOVE_ALL); } else { setToolTipText( "Remove selected favorites" ); setText( "Remove" ); setImageDescriptor(BugzillaImages.REMOVE); } view = favoritesView; } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/e90e752c830fb8e325f7f24a5dd9d1be3c558205/DeleteFavoriteAction.java/clean/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/favorites/actions/DeleteFavoriteAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2504,
31745,
1137,
1803,
12,
31745,
2997,
1767,
18552,
2997,
1767,
16,
1250,
27283,
31745,
2997,
13,
225,
202,
95,
202,
202,
3733,
1595,
273,
27283,
31745,
2997,
31,
9506,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2504,
31745,
1137,
1803,
12,
31745,
2997,
1767,
18552,
2997,
1767,
16,
1250,
27283,
31745,
2997,
13,
225,
202,
95,
202,
202,
3733,
1595,
273,
27283,
31745,
2997,
31,
9506,
202,
... |
|| element.getExtendsElement( ) != null ) | || element.getExtendsName( ) != null ) | private void doAdd( DesignElement content, int slotID, int newPos ) throws ContentException, NameException { assert content.getContainer( ) == null; // Ensure that the content can be put into the container. ElementDefn metaData = (ElementDefn) element.getDefn( ); if ( !metaData.isContainer( ) ) throw new ContentException( element, slotID, ContentException.DESIGN_EXCEPTION_NOT_CONTAINER ); SlotDefn slotInfo = (SlotDefn) metaData.getSlot( slotID ); if ( slotInfo == null ) throw new ContentException( element, slotID, ContentException.DESIGN_EXCEPTION_SLOT_NOT_FOUND ); if ( !slotInfo.canContain( content ) ) throw new ContentException( element, slotID, content, ContentException.DESIGN_EXCEPTION_WRONG_TYPE ); // Can not change the structure of child element or a virtual element( // inside the child ). if ( element.isVirtualElement( ) || element.getExtendsElement( ) != null ) throw new ContentException( element, slotID, content, ContentException.DESIGN_EXCEPTION_STRUCTURE_CHANGE_FORBIDDEN ); // This element is already the content of the element to add. if ( element.isContentOf( content ) ) throw new ContentException( element, slotID, content, ContentException.DESIGN_EXCEPTION_RECURSIVE ); // If this is a single-item slot, ensure that the slot is empty. if ( !slotInfo.isMultipleCardinality( ) && element.getSlot( slotID ).getCount( ) > 0 ) { throw new ContentException( element, slotID, ContentException.DESIGN_EXCEPTION_SLOT_IS_FULL ); } if ( slotID == Module.COMPONENT_SLOT ) { if ( StringUtil.isBlank( content.getName( ) ) ) throw new ContentException( element, slotID, content, ContentException.DESIGN_EXCEPTION_CONTENT_NAME_REQUIRED ); } if ( !element.canContain( module, slotID, content ) ) throw new ContentException( element, slotID, content, ContentException.DESIGN_EXCEPTION_INVALID_CONTEXT_CONTAINMENT ); // do some checks about the template issues TemplateCommand cmd = new TemplateCommand( module, element ); TemplateParameterDefinition templateParam = cmd.checkAdd( content, slotID ); ContentRecord addTemplateParam = null; if ( templateParam != null ) addTemplateParam = new ContentRecord( module, module, ReportDesign.TEMPLATE_PARAMETER_DEFINITION_SLOT, templateParam, true ); // Add the item to the container. ContentRecord addRecord; if ( newPos == -1 ) { addRecord = new ContentRecord( module, element, slotID, content, true ); } else { addRecord = new ContentRecord( module, element, slotID, content, newPos ); } ActivityStack stack = getActivityStack( ); stack.startTrans( addRecord.getLabel( ) ); try { // add the template parameter definition first if ( addTemplateParam != null ) stack.execute( addTemplateParam ); // add the element stack.execute( addRecord ); // check the name of the content and all its children and add names // of them to the namespace addElementNames( content ); } catch ( NameException e ) { stack.rollback( ); throw e; } stack.commit( ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/4d1bbc698089b74d5bd5af83ca44b1a160b35c9b/ContentCommand.java/clean/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/command/ContentCommand.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
741,
986,
12,
29703,
1046,
913,
16,
509,
4694,
734,
16,
509,
394,
1616,
262,
1082,
202,
15069,
3697,
503,
16,
1770,
503,
202,
95,
202,
202,
11231,
913,
18,
588,
2170,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
986,
12,
29703,
1046,
913,
16,
509,
4694,
734,
16,
509,
394,
1616,
262,
1082,
202,
15069,
3697,
503,
16,
1770,
503,
202,
95,
202,
202,
11231,
913,
18,
588,
2170,
... |
StringBuffer names = new StringBuffer(); | StringBuilder names = new StringBuilder(); | public static Class getProxyClass(ClassLoader loader, Class[] interfaces) throws IllegalArgumentException { // check that interfaces are a valid array of visible interfaces if (interfaces == null) throw new NullPointerException(); String commonPackageName = null; for (int i = 0, length = interfaces.length; i < length; i++) { Class next = interfaces[i]; if (next == null) throw new NullPointerException(); String name = next.getName(); if (!next.isInterface()) throw new IllegalArgumentException(Msg.getString("K00ed", name)); if (loader != next.getClassLoader()) { try { if (next != Class.forName(name, false, loader)) throw new IllegalArgumentException(Msg.getString( "K00ee", name)); } catch (ClassNotFoundException ex) { throw new IllegalArgumentException(Msg.getString("K00ee", name)); } } for (int j = i + 1; j < length; j++) if (next == interfaces[j]) throw new IllegalArgumentException(Msg.getString("K00ef", name)); if (!Modifier.isPublic(next.getModifiers())) { int last = name.lastIndexOf('.'); String p = last == -1 ? "" : name.substring(0, last); if (commonPackageName == null) commonPackageName = p; else if (!commonPackageName.equals(p)) throw new IllegalArgumentException(Msg.getString("K00f0")); } } // search cache for matching proxy class using the class loader synchronized (loaderCache) { Map interfaceCache = (Map) loaderCache.get(loader); if (interfaceCache == null) loaderCache.put(loader, (interfaceCache = new HashMap())); String interfaceKey = ""; if (interfaces.length == 1) { interfaceKey = interfaces[0].getName(); } else { StringBuffer names = new StringBuffer(); for (int i = 0, length = interfaces.length; i < length; i++) { names.append(interfaces[i].getName()); names.append(' '); } interfaceKey = names.toString(); } Class newClass; WeakReference ref = (WeakReference) interfaceCache .get(interfaceKey); if (ref == null) { String nextClassName = "$Proxy" + NextClassNameIndex++; if (commonPackageName != null) nextClassName = commonPackageName + "." + nextClassName; byte[] classFileBytes = ProxyClassFile.generateBytes( nextClassName, interfaces); if (loader == null) loader = ClassLoader.getSystemClassLoader(); newClass = defineClassImpl(loader, nextClassName.replace('.', '/'), classFileBytes); // Need a weak reference to the class so it can // be unloaded if the class loader is discarded interfaceCache.put(interfaceKey, new WeakReference(newClass)); synchronized (proxyCache) { proxyCache.put(newClass, ""); // the value is unused } } else { newClass = (Class) ref.get(); } return newClass; } } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/90f9b4729635e29222e3e595ee2466179781a90e/Proxy.java/buggy/modules/luni/src/main/java/java/lang/reflect/Proxy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1659,
18992,
797,
12,
7805,
4088,
16,
1659,
8526,
7349,
13,
1082,
202,
15069,
2754,
288,
202,
202,
759,
866,
716,
7349,
854,
279,
923,
526,
434,
6021,
7349,
202,
202,
430... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1659,
18992,
797,
12,
7805,
4088,
16,
1659,
8526,
7349,
13,
1082,
202,
15069,
2754,
288,
202,
202,
759,
866,
716,
7349,
854,
279,
923,
526,
434,
6021,
7349,
202,
202,
430... |
visiblePanelMapping.add(i, new Integer(-1)); | visiblePanelMapping.add(count, new Integer(-1)); | private void loadPanels() throws Exception { // Initialisation java.util.List panelsOrder = installdata.panelsOrder; int i; int size = panelsOrder.size(); String className; Class objectClass; Constructor constructor; Object object; IzPanel panel; Class[] paramsClasses = new Class[2]; paramsClasses[0] = Class.forName("com.izforge.izpack.installer.InstallerFrame"); paramsClasses[1] = Class.forName("com.izforge.izpack.installer.InstallData"); Object[] params = { this, installdata}; // We load each of them int curVisPanelNumber = 0; int lastVis = 0; for (i = 0; i < size; i++) { // We add the panel Panel p = (Panel) panelsOrder.get(i); if (!OsConstraint.oneMatchesCurrentSystem(p.osConstraints)) continue; className = p.className; String praefix = "com.izforge.izpack.panels."; if (className.indexOf('.') > -1) // Full qualified class name praefix = ""; objectClass = Class.forName(praefix + className); constructor = objectClass.getDeclaredConstructor(paramsClasses); object = constructor.newInstance(params); panel = (IzPanel) object; installdata.panels.add(panel); if (panel.isHidden()) visiblePanelMapping.add(i, new Integer(-1)); else { visiblePanelMapping.add(i, new Integer(curVisPanelNumber)); curVisPanelNumber++; lastVis = i; } // We add the XML data panel root XMLElement panelRoot = new XMLElement(className); installdata.xmlData.addChild(panelRoot); } visiblePanelMapping.add(i,new Integer(lastVis)); } | 46579 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46579/549f7e63531736b94c9f5512636a03dd2e42aff0/InstallerFrame.java/clean/src/lib/com/izforge/izpack/installer/InstallerFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1262,
5537,
87,
1435,
1216,
1185,
565,
288,
3639,
368,
10188,
10742,
3639,
2252,
18,
1367,
18,
682,
20582,
2448,
273,
3799,
892,
18,
7355,
10558,
2448,
31,
3639,
509,
277,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1262,
5537,
87,
1435,
1216,
1185,
565,
288,
3639,
368,
10188,
10742,
3639,
2252,
18,
1367,
18,
682,
20582,
2448,
273,
3799,
892,
18,
7355,
10558,
2448,
31,
3639,
509,
277,
31,
... |
public static Logger getLogger(String name) | public static Logger getLogger(org.apache.avalon.framework.configuration.Configuration config, String name) | public static Logger getLogger(String name) { try { if (sConfiguration_ == null) { sConfiguration_ = org.jacorb.config.Configuration.getConfiguration(null, null, false); } return sConfiguration_.getNamedLogger(name); } catch (ConfigurationException e) { return new LogKitLogger(Hierarchy.getDefaultHierarchy().getLoggerFor(name)); } } | 46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/63bb0914f2c6c44eae3288880434571f03a9600c/LogUtil.java/buggy/src/org/jacorb/notification/util/LogUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
4242,
7156,
12,
3341,
18,
19211,
18,
842,
287,
265,
18,
12303,
18,
7025,
18,
1750,
642,
16,
514,
508,
13,
565,
288,
3639,
775,
3639,
288,
5411,
309,
261,
87,
1750,
67,
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,
377,
1071,
760,
4242,
7156,
12,
3341,
18,
19211,
18,
842,
287,
265,
18,
12303,
18,
7025,
18,
1750,
642,
16,
514,
508,
13,
565,
288,
3639,
775,
3639,
288,
5411,
309,
261,
87,
1750,
67,
422,... |
} | } | void make() { // makes the leaf shape // FIXME: add code here if necessary } | 7659 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7659/23e8c9696fabf00623b3f7cb5a915d458eabb308/Leaf.java/clean/arbaro/tree/Leaf.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1221,
1435,
288,
202,
759,
7297,
326,
7839,
2179,
202,
759,
9852,
30,
527,
981,
2674,
309,
4573,
565,
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,
377,
918,
1221,
1435,
288,
202,
759,
7297,
326,
7839,
2179,
202,
759,
9852,
30,
527,
981,
2674,
309,
4573,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
objectClass.defineMethod("method_missing", CallbackFactory.getOptMethod(RubyObject.class, "method_missing", IRubyObject.class)); | objectClass.defineMethod("method_missing", CallbackFactory.getOptMethod(RubyObject.class, "method_missing")); | public static void createObjectClass(RubyModule objectClass) { objectClass.defineMethod("==", CallbackFactory.getMethod(RubyObject.class, "equal", IRubyObject.class)); objectClass.defineMethod("=~", CallbackFactory.getFalseMethod(1)); objectClass.defineMethod("clone", CallbackFactory.getMethod(RubyObject.class, "rbClone")); objectClass.defineMethod("dup", CallbackFactory.getMethod(RubyObject.class, "dup")); objectClass.defineMethod("eql?", CallbackFactory.getMethod(RubyObject.class, "equal", IRubyObject.class)); objectClass.defineMethod("respond_to?", CallbackFactory.getOptMethod(RubyObject.class, "respond_to")); objectClass.defineMethod("extend", CallbackFactory.getOptMethod(RubyObject.class, "extend")); objectClass.defineMethod("freeze", CallbackFactory.getMethod(RubyObject.class, "freeze")); objectClass.defineMethod("frozen?", CallbackFactory.getMethod(RubyObject.class, "frozen")); objectClass.defineMethod("id", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("hash", CallbackFactory.getMethod(RubyObject.class, "hash")); objectClass.defineMethod("__id__", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("inspect", CallbackFactory.getMethod(RubyObject.class, "inspect")); objectClass.defineMethod("instance_eval", CallbackFactory.getOptMethod(RubyObject.class, "instance_eval")); objectClass.defineMethod("instance_of?", CallbackFactory.getMethod(RubyObject.class, "instance_of", RubyModule.class)); objectClass.defineMethod("instance_variables", CallbackFactory.getMethod(RubyObject.class, "instance_variables")); objectClass.defineMethod("is_a?", CallbackFactory.getMethod(RubyObject.class, "kind_of", RubyModule.class)); objectClass.defineMethod("kind_of?", CallbackFactory.getMethod(RubyObject.class, "kind_of", RubyModule.class)); objectClass.defineMethod("method", CallbackFactory.getMethod(RubyObject.class, "method", IRubyObject.class)); objectClass.defineMethod("methods", CallbackFactory.getMethod(RubyObject.class, "methods")); objectClass.defineMethod("nil?", CallbackFactory.getFalseMethod(0)); objectClass.defineMethod("private_methods", CallbackFactory.getMethod(RubyObject.class, "private_methods")); objectClass.defineMethod("protected_methods", CallbackFactory.getMethod(RubyObject.class, "protected_methods")); objectClass.defineMethod("public_methods", CallbackFactory.getMethod(RubyObject.class, "methods")); objectClass.defineMethod("send", CallbackFactory.getOptMethod(RubyObject.class, "send", IRubyObject.class)); objectClass.defineMethod("__send__", CallbackFactory.getOptMethod(RubyObject.class, "send", IRubyObject.class)); objectClass.defineMethod("taint", CallbackFactory.getMethod(RubyObject.class, "taint")); objectClass.defineMethod("tainted?", CallbackFactory.getMethod(RubyObject.class, "tainted")); objectClass.defineMethod("to_a", CallbackFactory.getMethod(RubyObject.class, "to_a")); objectClass.defineMethod("to_s", CallbackFactory.getMethod(RubyObject.class, "to_s")); objectClass.defineMethod("type", CallbackFactory.getMethod(RubyObject.class, "type")); objectClass.defineMethod("untaint", CallbackFactory.getMethod(RubyObject.class, "untaint")); objectClass.defineMethod("method_missing", CallbackFactory.getOptMethod(RubyObject.class, "method_missing", IRubyObject.class)); objectClass.defineAlias("===", "=="); objectClass.defineAlias("class", "type"); objectClass.defineAlias("equal?", "=="); } | 48072 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48072/cfb1b4132c30e5186c41e9dbf0b92acca72fcf81/RubyObject.java/buggy/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
17109,
797,
12,
54,
10340,
3120,
23992,
13,
288,
3639,
23992,
18,
11255,
1305,
2932,
631,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
921,
18,
1106,
16,
315,
9729,
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,
760,
918,
17109,
797,
12,
54,
10340,
3120,
23992,
13,
288,
3639,
23992,
18,
11255,
1305,
2932,
631,
3113,
8444,
1733,
18,
588,
1305,
12,
54,
10340,
921,
18,
1106,
16,
315,
9729,
3... |
(Map) PrivilegedAccessor.getValue(rs.getMessageRouter(), | (Map) PrivilegedAccessor.getValue(RouterService.getMessageRouter(), | public void testDownloadProgressQueryDoneNoPurge() throws Exception { keepAllAlive(testUP); // clear up any messages before we begin the test. drainAll(); // luckily there is hacky little way to go through the download paces - // download from yourself :) . Message m = null; byte[] guid = rs.newQueryGUID(); rs.query(guid, "metadata"); ((MyCallback)getCallback()).setGUID(new GUID(guid)); QueryRequest qr = (QueryRequest) getFirstInstanceOfMessageType(testUP[0], QueryRequest.class); assertNotNull(qr); assertTrue(qr.desiresOutOfBandReplies()); // just return ONE real result and the rest junk Response resp = null; QueryReply reply = null; { // get a correct response object QueryRequest qrTemp = QueryRequest.createQuery("metadata"); testUP[0].send(qrTemp); testUP[0].flush(); reply = (QueryReply) getFirstInstanceOfMessageType(testUP[0], QueryReply.class); assertNotNull(reply); resp = (Response) (reply.getResultsAsList()).get(0); } assertNotNull(reply); assertNotNull(resp); Response[] res = new Response[] { resp }; // this isn't really needed but just for completeness send it back to // the test Leaf m = new QueryReply(guid, (byte) 1, SERVER_PORT, myIP(), 0, res, GUID.makeGuid(), new byte[0], false, false, true, true, false, false, null); testUP[0].send(m); testUP[0].flush(); // send back a lot of results via TCP so you konw the UDP one will be // bypassed for (int i = 0; i < testUP.length; i++) { res = new Response[75]; for (int j = 0; j < res.length; j++) res[j] = new Response(10+j+i, 10+j+i, "berkeley "+ j + i); m = new QueryReply(guid, (byte) 1, testUP[0].getPort(), myIP(), 0, res, GUID.makeGuid(), new byte[0], false, false, true, true, false, false, null); testUP[i].send(m); testUP[i].flush(); } // allow for processing Thread.sleep(3000); { // now we should make sure MessageRouter has not bypassed anything // yet Map _bypassedResults = (Map) PrivilegedAccessor.getValue(rs.getMessageRouter(), "_bypassedResults"); assertNotNull(_bypassedResults); assertEquals(0, _bypassedResults.size()); Set endpoints = (Set) _bypassedResults.get(new GUID(qr.getGUID())); assertNull(endpoints); } // send back a UDP response and make sure it was saved in bypassed... { ReplyNumberVendorMessage vm = new ReplyNumberVendorMessage(new GUID(guid), 1); ByteArrayOutputStream baos = new ByteArrayOutputStream(); vm.write(baos); DatagramPacket pack = new DatagramPacket(baos.toByteArray(), baos.toByteArray().length, testUP[0].getInetAddress(), SERVER_PORT); UDP_ACCESS[0].send(pack); } // allow for processing Thread.sleep(500); { // all the UDP ReplyNumberVMs should have been bypassed Map _bypassedResults = (Map) PrivilegedAccessor.getValue(rs.getMessageRouter(), "_bypassedResults"); assertNotNull(_bypassedResults); assertEquals(1, _bypassedResults.size()); Set endpoints = (Set) _bypassedResults.get(new GUID(guid)); assertNotNull(endpoints); assertEquals(1, endpoints.size()); } // now do the download, wait for it to finish, and then bypassed results // should be empty again RemoteFileDesc rfd = resp.toRemoteFileDesc(reply.getHostData()); assertFalse("file should not be saved yet", new File( _savedDir, "metadata.mp3").exists()); assertTrue("file should be shared", new File(_sharedDir, "metadata.mp3").exists()); rs.download(new RemoteFileDesc[] { rfd }, false, new GUID(guid)); UploadSettings.UPLOAD_SPEED.setValue(5); rs.stopQuery(new GUID(guid)); ((MyCallback)getCallback()).clearGUID(); { // download still in progress, don't purge Map _bypassedResults = (Map) PrivilegedAccessor.getValue(rs.getMessageRouter(), "_bypassedResults"); assertNotNull(_bypassedResults); assertEquals(1, _bypassedResults.size()); Set endpoints = (Set) _bypassedResults.get(new GUID(guid)); assertNotNull(endpoints); assertEquals(1, endpoints.size()); } UploadSettings.UPLOAD_SPEED.setValue(100); // sleep to make sure the download starts Thread.sleep(10000); assertTrue("file should saved", new File( _savedDir, "metadata.mp3").exists()); assertTrue("file should be shared", new File(_sharedDir, "metadata.mp3").exists()); { // now we should make sure MessageRouter clears the map Map _bypassedResults = (Map) PrivilegedAccessor.getValue(rs.getMessageRouter(), "_bypassedResults"); assertNotNull(_bypassedResults); assertEquals(0, _bypassedResults.size()); Set endpoints = (Set) _bypassedResults.get(new GUID(qr.getGUID())); assertNull(endpoints); } } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/bcf714a065208ec9a744852808b9282fcf9c0ea1/ClientSideOOBRequeryTest.java/buggy/components/gnutella-core/src/test/java/com/limegroup/gnutella/ClientSideOOBRequeryTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
7109,
5491,
1138,
7387,
2279,
21422,
1435,
540,
1216,
1185,
288,
3639,
3455,
1595,
10608,
12,
3813,
3079,
1769,
3639,
368,
2424,
731,
1281,
2743,
1865,
732,
2376,
326,
1842... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7109,
5491,
1138,
7387,
2279,
21422,
1435,
540,
1216,
1185,
288,
3639,
3455,
1595,
10608,
12,
3813,
3079,
1769,
3639,
368,
2424,
731,
1281,
2743,
1865,
732,
2376,
326,
1842... |
if (isRoot) new SingleThreadServiceProvider().makeServices(the_sb); | if (isRoot) { threadServiceProvider = new SingleThreadServiceProvider(); threadServiceProvider.setServiceBroker(the_sb); threadServiceProvider.initialize(); threadServiceProvider.load(); threadServiceProvider.start(); } | public void load() { super.load(); ServiceBroker the_sb = sb; isRoot = !the_sb.hasService(ThreadService.class); String type = System.getProperty(SERVICE_TYPE_PROPERTY, "hierarchical"); if (type.equals("trivial")) { if (isRoot) new TrivialThreadServiceProvider().makeServices(the_sb); return; } else if (type.equals("single")) { if (isRoot) new SingleThreadServiceProvider().makeServices(the_sb); return; } // Hierarchical service makePools(); // check if this component was added with parameters if (name == null) { // Make default values from position in containment hierarcy AgentIdentificationService ais = (AgentIdentificationService) the_sb.getService(this, AgentIdentificationService.class, null); MessageAddress agentAddr = ais.getMessageAddress(); the_sb.releaseService(this, AgentIdentificationService.class, ais); NodeIdentificationService nis = (NodeIdentificationService) the_sb.getService(this, NodeIdentificationService.class, null); MessageAddress nodeAddr = nis.getMessageAddress(); the_sb.releaseService(this, NodeIdentificationService.class, nis); name = isRoot ? "Node "+nodeAddr : "Agent_"+agentAddr; } if (isRoot) { Starter.startThread(); Reclaimer.startThread(); // use the root service broker NodeControlService ncs = (NodeControlService) sb.getService(this, NodeControlService.class, null); the_sb = ncs.getRootServiceBroker(); } ThreadService parent = (ThreadService) the_sb.getService(this, ThreadService.class, null); final TreeNode node = makeProxies(parent); provideServices(the_sb); if (isRoot) { statusProxy = new ThreadStatusService() { public int iterateOverStatus(ThreadStatusService.Body body) { return node.iterateOverQueuedThreads(body) + node.iterateOverRunningThreads(body); } }; the_sb.addService(ThreadStatusService.class, this); } } | 7981 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7981/c067a0dcefa4982f3978854fd7545d5d469df162/ThreadServiceProvider.java/clean/core/src/org/cougaar/core/thread/ThreadServiceProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1262,
1435,
377,
288,
202,
9565,
18,
945,
5621,
202,
202,
1179,
11194,
326,
67,
18366,
273,
2393,
31,
202,
291,
2375,
273,
401,
5787,
67,
18366,
18,
5332,
1179,
12,
3830,
117... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1262,
1435,
377,
288,
202,
9565,
18,
945,
5621,
202,
202,
1179,
11194,
326,
67,
18366,
273,
2393,
31,
202,
291,
2375,
273,
401,
5787,
67,
18366,
18,
5332,
1179,
12,
3830,
117... |
assertNextToken(lexer, Token.NUMBER, "1"); assertNextToken(lexer, Token.MULTIPLY, "*"); assertNextToken(lexer, Token.NUMBER, "2"); assertNextToken(lexer, Token.END, null); } | assertNextToken(lexer, Token.NUMBER, "1"); assertNextToken(lexer, Token.MULTIPLY, "*"); assertNextToken(lexer, Token.NUMBER, "2"); assertNextToken(lexer, Token.END, null); } | public void testTokenisesMultiplyOperator() throws Exception { Lexer lexer = new Lexer("1*2"); assertNextToken(lexer, Token.NUMBER, "1"); assertNextToken(lexer, Token.MULTIPLY, "*"); assertNextToken(lexer, Token.NUMBER, "2"); assertNextToken(lexer, Token.END, null); } | 2796 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2796/a917aff361c58c31c5dce12a5e8052df6803dbe1/LexerTest.java/clean/jmock/examples/calculator/src/test/jmock/examples/calculator/LexerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1345,
6141,
26040,
5592,
1435,
1216,
1185,
288,
202,
202,
13356,
8512,
273,
394,
14234,
2932,
21,
14,
22,
8863,
202,
202,
11231,
9399,
12,
31731,
16,
3155,
18,
9931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1345,
6141,
26040,
5592,
1435,
1216,
1185,
288,
202,
202,
13356,
8512,
273,
394,
14234,
2932,
21,
14,
22,
8863,
202,
202,
11231,
9399,
12,
31731,
16,
3155,
18,
9931,
... |
if(elementOrTreePath instanceof TreePath) { | if (elementOrTreePath instanceof TreePath) { | protected Widget internalGetWidgetToSelect(Object elementOrTreePath) { if(elementOrTreePath instanceof TreePath) { TreePath treePath = (TreePath) elementOrTreePath; if(treePath.getSegmentCount()==0) { return null; } Widget[] candidates = findItems(treePath.getLastSegment()); for (int i = 0; i < candidates.length; i++) { Widget candidate = candidates[i]; if(!(candidate instanceof Item)) { continue; } if(treePath.equals(getTreePathFromItem((Item) candidate), getComparer())) { return candidate; } } return null; } return findItem(elementOrTreePath); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/7dea322b00f8363f209617dc36ba0b47497db00d/AbstractTreeViewer.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
11103,
2713,
967,
4609,
774,
3391,
12,
921,
930,
1162,
2471,
743,
13,
288,
202,
202,
430,
12,
2956,
1162,
2471,
743,
1276,
4902,
743,
13,
288,
1082,
202,
2471,
743,
2151,
743... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11103,
2713,
967,
4609,
774,
3391,
12,
921,
930,
1162,
2471,
743,
13,
288,
202,
202,
430,
12,
2956,
1162,
2471,
743,
1276,
4902,
743,
13,
288,
1082,
202,
2471,
743,
2151,
743... |
result = BugzillaRepositoryUtil.uploadAttachment(repository, BugzillaTask.getTaskIdAsInt(task .getHandleIdentifier()), longComment, MYLAR_CONTEXT_DESCRIPTION, sourceContextFile, CONTENTTYPE_APPLICATION_XML, false); if (result) { synchronize(task, false, null); | File folder = sourceContextFile.getParentFile(); if (folder != null && folder.exists() && folder.isDirectory()) { List<ITask> tasksToExport = new ArrayList<ITask>(); tasksToExport.add(task); TaskDataExportJob job = new TaskDataExportJob(MylarPlugin.getDefault().getDataDirectory(), false, false, true, true, sourceContextFile.getName() + ZIPFILE_EXTENSION, tasksToExport); try { job.run(new NullProgressMonitor()); File zippedContextFile = new File(MylarPlugin.getDefault().getDataDirectory() + File.separator + sourceContextFile.getName() + ZIPFILE_EXTENSION); if (zippedContextFile != null && zippedContextFile.exists()) { result = BugzillaRepositoryUtil.uploadAttachment(repository, BugzillaTask .getTaskIdAsInt(task.getHandleIdentifier()), longComment, MYLAR_CONTEXT_DESCRIPTION, zippedContextFile, APPLICATION_OCTET_STREAM, false); if (result) { synchronize(task, false, null); } } } catch (InvocationTargetException e) { MylarStatusHandler.fail(e, "Could not export task context as zip file", true); } catch (InterruptedException e) { MylarStatusHandler.fail(e, "Could not export task context as zip file", true); } | public boolean attachContext(TaskRepository repository, AbstractRepositoryTask task, String longComment) throws IOException { if (!repository.hasCredentials()) { MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), MylarTaskListPlugin.TITLE_DIALOG, "Repository credentials missing or invalid."); return false; } else { boolean result = false; MylarPlugin.getContextManager().saveContext(task.getHandleIdentifier()); File sourceContextFile = MylarPlugin.getContextManager().getFileForContext(task.getHandleIdentifier()); if (sourceContextFile != null && sourceContextFile.exists()) { result = BugzillaRepositoryUtil.uploadAttachment(repository, BugzillaTask.getTaskIdAsInt(task .getHandleIdentifier()), longComment, MYLAR_CONTEXT_DESCRIPTION, sourceContextFile, CONTENTTYPE_APPLICATION_XML, false); if (result) { synchronize(task, false, null); } } return result; } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/ab7a1d4bcf94a9c0a716621c435b62a346b3ac5b/BugzillaRepositoryConnector.java/clean/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositoryConnector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3306,
1042,
12,
2174,
3305,
3352,
16,
4115,
3305,
2174,
1562,
16,
514,
1525,
4469,
13,
1082,
202,
15069,
1860,
288,
202,
202,
430,
16051,
9071,
18,
5332,
6163,
10756,
288,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3306,
1042,
12,
2174,
3305,
3352,
16,
4115,
3305,
2174,
1562,
16,
514,
1525,
4469,
13,
1082,
202,
15069,
1860,
288,
202,
202,
430,
16051,
9071,
18,
5332,
6163,
10756,
288,... |
private void restoreFilters() { IDialogSettings settings = getFiltersSection(false); | private void restoreFilters(IMemento memento) { | private void restoreFilters() { IDialogSettings settings = getFiltersSection(false); if (settings == null){ //Check if we have an old filter setting around IDialogSettings mainSettings = getDialogSettings(); IDialogSettings filtersSection = mainSettings.getSection(OLD_FILTER_SECTION); if(filtersSection != null){ MarkerFilter markerFilter = createFilter(MarkerMessages.MarkerFilter_defaultFilterName); markerFilter.restoreState(filtersSection); setFilters(new MarkerFilter[] {markerFilter}); } } else{ IDialogSettings[] sections = settings.getSections(); MarkerFilter[] newFilters = new MarkerFilter[sections.length]; for (int i = 0; i < sections.length; i++) { newFilters[i] = createFilter(sections[i].getName()); newFilters[i].restoreState(sections[i]); } setFilters(newFilters); } if (markerFilters.length == 0){// Make sure there is at least a default MarkerFilter filter = createFilter( MarkerMessages.MarkerFilter_defaultFilterName); filter.resetState(); setFilters(new MarkerFilter[] { filter }); } } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/09a4c864bb83fb62a685d497a2df9ce5451376bd/MarkerView.java/buggy/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,
5217,
5422,
1435,
288,
202,
202,
734,
3529,
2628,
1947,
273,
25175,
5285,
12,
5743,
1769,
202,
202,
430,
261,
4272,
422,
446,
15329,
1082,
202,
759,
1564,
309,
732,
1240,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
5217,
5422,
1435,
288,
202,
202,
734,
3529,
2628,
1947,
273,
25175,
5285,
12,
5743,
1769,
202,
202,
430,
261,
4272,
422,
446,
15329,
1082,
202,
759,
1564,
309,
732,
1240,
... |
private List<IProject> getProjectsForSolution(int solutionID) throws Exception { List<IProject> projects = new LinkedList<IProject>(); SQLSelect select = new SQLSelect(); select.addTable(ProjectInfo.TABLE_NAME); select.addColumn("project_id"); select.addColumn("solution_id"); select.addColumn("project_name"); select.addColumn("project_info"); select.addColumn("lm_date"); select.addCondition("solution_id =", solutionID); // executing query ResultSet resultSet = null; resultSet = _dbManager.select(select); ProjectManager projectManager = (ProjectManager) _currentSolution.getProjectManager(); try { while (resultSet.next()) { Project project = (Project) projectManager.createProject(); // loading task project.getInfo().load(resultSet); projectManager.addProject(project); projects.add(project); } } catch (Exception e) { LOGGER.fatal("", e); resultSet.close(); throw e; } resultSet.close(); return projects; } | 12741 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12741/c6e0d80f0e9b696ca275787b4040c335b5a24483/SolutionManager.java/clean/salomon/platform/trunk/src/salomon/engine/solution/SolutionManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
987,
32,
45,
4109,
34,
11080,
28388,
16135,
12,
474,
6959,
734,
13,
202,
15069,
1185,
202,
95,
202,
202,
682,
32,
45,
4109,
34,
10137,
273,
394,
10688,
32,
45,
4109,
34,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
987,
32,
45,
4109,
34,
11080,
28388,
16135,
12,
474,
6959,
734,
13,
202,
15069,
1185,
202,
95,
202,
202,
682,
32,
45,
4109,
34,
10137,
273,
394,
10688,
32,
45,
4109,
34,
56... | ||
if (!routes.containsKey(hops[i])) routes.put(hops[i], new HashMap()); HashMap prevs = (HashMap)routes.get(hops[i]); if (!prevs.containsKey(hops[i-1])) prevs.put(hops[i-1], new HashSet()); HashSet nexts = (HashSet)prevs.get(hops[i-1]); nexts.add(hops[i+1]); | if (prev.containsKey(hops[i])) if (prev.get(hops[i]) != hops[i-1]) Utils.fail("More than one previous tile for a single data item"); prev.put(hops[i], hops[i-1]); if (!next.containsKey(hops[i])) next.put(hops[i], new HashSet()); ((HashSet)next.get(hops[i])).add(hops[i+1]); | private void generateSwitchCode(FlatNode fire, List dests) { //keeps the next hop for the sends HashSet sends = new HashSet(); //keeps routes for all of the intermediate hops //this hashset points to a hashset //the secode hash map is indexed by the sources of //the route instructions for the tile //the second hashmap points to a hashset //of all the dest for a given source HashMap routes = new HashMap(); //maps receivers to their previous hop HashMap receives = new HashMap(); //fill the maps ListIterator destsIt = dests.listIterator(); while (destsIt.hasNext()) { FlatNode dest = (FlatNode)destsIt.next(); Coordinate[] hops = (Coordinate[])Router.getRoute(fire, dest).toArray(new Coordinate[0]); //add each route to the maps sends.add(hops[1]); //add the intermediate routes for (int i = 1; i < hops.length -1; i++) { if (!routes.containsKey(hops[i])) routes.put(hops[i], new HashMap()); HashMap prevs = (HashMap)routes.get(hops[i]); if (!prevs.containsKey(hops[i-1])) prevs.put(hops[i-1], new HashSet()); HashSet nexts = (HashSet)prevs.get(hops[i-1]); nexts.add(hops[i+1]); } //add the receive receives.put(hops[hops.length-1], hops[hops.length - 2]); } //now generate the send, routes, and receives addSends(fire, sends); addRoutes(routes); addReceives(receives); } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/d128ad91d88ab731e2e9128b614b0ee77eff79df/Simulator.java/buggy/streams/src/at/dms/kjc/raw/Simulator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
10200,
1085,
12,
16384,
907,
4452,
16,
987,
1570,
87,
13,
377,
288,
202,
759,
10102,
87,
326,
1024,
19055,
364,
326,
9573,
202,
13482,
9573,
273,
394,
6847,
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,
377,
3238,
918,
2103,
10200,
1085,
12,
16384,
907,
4452,
16,
987,
1570,
87,
13,
377,
288,
202,
759,
10102,
87,
326,
1024,
19055,
364,
326,
9573,
202,
13482,
9573,
273,
394,
6847,
5621,
202,
... |
try{ | try { | protected IStatus run(IProgressMonitor monitor) { try{ op.run(monitor); } catch (Exception e){ MylarPlugin.log(e, "Failed to submit bug"); return new Status(Status.ERROR, "org.eclipse.mylar.bugzilla.ui", Status.ERROR, "Failed to submit bug", e); } PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable(){ public void run() { if(TaskListView.getDefault() != null && TaskListView.getDefault().getViewer() != null) { // TODO: left off here // find the bug task // tell it to refresh, not in a job // call update on the task new RefreshBugzillaReportsAction().run(); } } }); return Status.OK_STATUS; } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/175b3471b8f3ebe4611aa1721b1c96ed45badae8/ExistingBugEditor.java/clean/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/editor/ExistingBugEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
1117,
467,
1482,
1086,
12,
45,
5491,
7187,
6438,
13,
288,
9506,
202,
698,
95,
6862,
202,
556,
18,
2681,
12,
10259,
1769,
9506,
202,
97,
1044,
261,
503,
425,
15329,
6862,
202,
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,
1875,
202,
1117,
467,
1482,
1086,
12,
45,
5491,
7187,
6438,
13,
288,
9506,
202,
698,
95,
6862,
202,
556,
18,
2681,
12,
10259,
1769,
9506,
202,
97,
1044,
261,
503,
425,
15329,
6862,
202,
1206... |
if (defaultWORoot == null) { defaultWORoot = getProject().getProperty(WO_ROOT); | if (woRoot == null) { woRoot = getProject().getProperty(WO_ROOT); | public String getWORoot() { if (defaultWORoot == null) { defaultWORoot = getProject().getProperty(WO_ROOT); if (defaultWORoot == null) { defaultWORoot = getEnvironmentProperty(WO_ROOT); if (defaultWORoot == null) { defaultWORoot = "/"; } } } return defaultWORoot; } | 47899 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47899/4aec489a04eee9cc526fdc56e5be772982269a94/WOPropertiesHandler.java/buggy/src/java/org/objectstyle/woproject/ant/WOPropertiesHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
336,
5613,
1632,
1435,
288,
202,
202,
430,
261,
1886,
5613,
1632,
422,
446,
13,
288,
1082,
202,
1886,
5613,
1632,
273,
11080,
7675,
588,
1396,
12,
59,
51,
67,
9185,
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,
482,
514,
336,
5613,
1632,
1435,
288,
202,
202,
430,
261,
1886,
5613,
1632,
422,
446,
13,
288,
1082,
202,
1886,
5613,
1632,
273,
11080,
7675,
588,
1396,
12,
59,
51,
67,
9185,
1769,... |
final public String getSystemId() | public final String getSystemId() | final public String getSystemId() { return systemId; } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/f32ff77e61a964d6bd357cc7a4c399132b7ad9af/DomExtern.java/buggy/libraries/javalib/gnu/xml/dom/DomExtern.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
514,
12996,
548,
1435,
225,
288,
565,
327,
30083,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
514,
12996,
548,
1435,
225,
288,
565,
327,
30083,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
CheckOutScmResult result = store.getCheckOutScmResultForProject( projectId ); | CheckOutScmResult result = continuum.getCheckOutScmResultForProject( projectId ); | public Hashtable getProject( String projectId ) { try { Set excludedProperties = new HashSet(); excludedProperties.add( "configuration" ); ContinuumProject project = store.getProject( projectId ); Hashtable hashtable = xmlRpcHelper.objectToHashtable( project, excludedProperties ); Properties configuration = project.getConfiguration(); Hashtable configurationHashtable = new Hashtable(); for ( Iterator it = configuration.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); configurationHashtable.put( entry.getKey().toString(), entry.getValue().toString() ); } hashtable.put( "configuration", configurationHashtable ); CheckOutScmResult result = store.getCheckOutScmResultForProject( projectId ); if ( result != null ) { hashtable.put( "checkOutScmResult", xmlRpcHelper.objectToHashtable( result ) ); } return makeHashtable( "project", hashtable ); } catch ( Throwable e ) { return handleException( "ContinuumXmlRpc.getProject(): project id: '" + projectId + "'.", e ); } } | 48499 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48499/032504e5256c4f1f7a10a2b680b8ce1285696f3d/DefaultContinuumXmlRpc.java/clean/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
18559,
11080,
12,
514,
9882,
262,
565,
288,
3639,
775,
3639,
288,
5411,
1000,
8845,
2297,
273,
394,
6847,
5621,
5411,
8845,
2297,
18,
1289,
12,
315,
7025,
6,
11272,
5411,
1816,
6860... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18559,
11080,
12,
514,
9882,
262,
565,
288,
3639,
775,
3639,
288,
5411,
1000,
8845,
2297,
273,
394,
6847,
5621,
5411,
8845,
2297,
18,
1289,
12,
315,
7025,
6,
11272,
5411,
1816,
6860... |
throw new IOException(AdaptorMsg.formatter.getString("RELIABLEFILE_DELETE_FAILED")); | throw new IOException(ReliableMsg.formatter.getString("RELIABLEFILE_DELETE_FAILED")); | private static void rm(File file) throws IOException { if (file.exists() && !file.delete()) { throw new IOException(AdaptorMsg.formatter.getString("RELIABLEFILE_DELETE_FAILED")); } } | 2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/5fa10b65ce041aae473ede2dcfdda63cac21b968/ReliableFile.java/buggy/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/framework/internal/reliablefile/ReliableFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
6692,
12,
812,
585,
13,
1216,
1860,
288,
202,
202,
430,
261,
768,
18,
1808,
1435,
597,
401,
768,
18,
3733,
10756,
288,
1082,
202,
12849,
394,
1860,
12,
29888,
3332,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
6692,
12,
812,
585,
13,
1216,
1860,
288,
202,
202,
430,
261,
768,
18,
1808,
1435,
597,
401,
768,
18,
3733,
10756,
288,
1082,
202,
12849,
394,
1860,
12,
29888,
3332,... |
boolean nil = false; | if (fCurrentElemDecl != null && !fCurrentElemDecl.isNillable()) reportSchemaError("cvc-elt.3.1", new Object[]{element.rawname, URI_XSI+","+XSI_NIL}); | void getXsiNil(QName element, String xsiNil) { // get nil: true or false boolean nil = false; if (xsiNil.equals(SchemaSymbols.ATTVAL_TRUE) || xsiNil.equals(SchemaSymbols.ATTVAL_TRUE_1)) { if (fCurrentElemDecl == null || fCurrentElemDecl.isNillable()) { nil = true; } else { reportGenericSchemaError("xsi:nil must not be specified for the element '"+ element.rawname + "' with {nillable} equals 'false'"); } } else if (!xsiNil.equals(SchemaSymbols.ATTVAL_FALSE) && !xsiNil.equals(SchemaSymbols.ATTVAL_FALSE_0)) { reportGenericSchemaError("value '" + xsiNil + "' of xsi:nil attribute is not a valid boolean value"); } // REVISIT: have a stack to hold it, because it's checked at endElement } | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/49a1f89340917cfe3a2c4eb4d62fb1efa79f8f01/SchemaValidator.java/clean/src/org/apache/xerces/impl/v2/SchemaValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
6538,
7722,
12616,
12,
13688,
930,
16,
514,
619,
7722,
12616,
13,
288,
3639,
368,
336,
515,
30,
638,
578,
629,
1850,
309,
261,
74,
3935,
7498,
3456,
480,
446,
597,
401,
74,
3935,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6538,
7722,
12616,
12,
13688,
930,
16,
514,
619,
7722,
12616,
13,
288,
3639,
368,
336,
515,
30,
638,
578,
629,
1850,
309,
261,
74,
3935,
7498,
3456,
480,
446,
597,
401,
74,
3935,
... |
( (DialChart) currentChart ).setDialSuperimposition( sNewSubType.equals( SUPERIMPOSED_SUBTYPE_LITERAL ) ); | ( (DialChart) currentChart ).setDialSuperimposition( sNewSubType.equals( SUPERIMPOSED_SUBTYPE_LITERAL ) ); | private Chart getConvertedChart( Chart currentChart, String sNewSubType, String sNewDimension ) { Chart helperModel = (Chart) EcoreUtil.copy( currentChart ); if ( currentChart instanceof ChartWithAxes ) { // Create a new instance of the correct type and set initial // properties currentChart = DialChartImpl.create( ); currentChart.setType( TYPE_LITERAL ); currentChart.setSubType( sNewSubType ); currentChart.setDimension( getDimensionFor( sNewDimension ) ); // Copy generic chart properties from the old chart currentChart.setBlock( helperModel.getBlock( ) ); currentChart.setDescription( helperModel.getDescription( ) ); currentChart.setGridColumnCount( helperModel.getGridColumnCount( ) ); currentChart.getInteractivity().setEnable( helperModel.getInteractivity().isEnable()); currentChart.getInteractivity().setLegendBehavior( helperModel.getInteractivity().getLegendBehavior()); if ( !currentChart.getType( ).equals( LineChart.TYPE_LITERAL ) && !currentChart.getType( ).equals( PieChart.TYPE_LITERAL ) && !currentChart.getType( ).equals( BarChart.TYPE_LITERAL ) && !currentChart.getType( ).equals( AreaChart.TYPE_LITERAL ) ) { currentChart.setSampleData( getConvertedSampleData( helperModel.getSampleData( ) ) ); } currentChart.getTitle( ) .getLabel( ) .getCaption( ) .setValue( CHART_TITLE ); currentChart.setScript( helperModel.getScript( ) ); currentChart.setUnits( helperModel.getUnits( ) ); if ( helperModel.getGridColumnCount( ) > 0 ) { currentChart.setGridColumnCount( helperModel.getGridColumnCount( ) ); } else { currentChart.setGridColumnCount( 1 ); } // Copy series definitions from old chart ( (ChartWithoutAxes) currentChart ).getSeriesDefinitions( ) .add( ( (Axis) ( (ChartWithAxes) helperModel ).getAxes( ) .get( 0 ) ).getSeriesDefinitions( ).get( 0 ) ); Vector vOSD = new Vector( ); // Only convert series in primary orthogonal axis. Axis primaryOrthogonalAxis = ( (ChartWithAxes) helperModel ).getPrimaryOrthogonalAxis( (Axis) ( (ChartWithAxes) helperModel ).getAxes( ) .get( 0 ) ); EList osd = primaryOrthogonalAxis.getSeriesDefinitions( ); for ( int j = 0; j < osd.size( ); j++ ) { SeriesDefinition sd = (SeriesDefinition) osd.get( j ); Series series = sd.getDesignTimeSeries( ); sd.getSeries( ).clear( ); sd.getSeries( ).add( getConvertedSeries( series ) ); vOSD.add( sd ); } ( (SeriesDefinition) ( (ChartWithoutAxes) currentChart ).getSeriesDefinitions( ) .get( 0 ) ).getSeriesDefinitions( ).clear( ); ( (SeriesDefinition) ( (ChartWithoutAxes) currentChart ).getSeriesDefinitions( ) .get( 0 ) ).getSeriesDefinitions( ).addAll( vOSD ); currentChart.getLegend( ) .setItemType( LegendItemType.SERIES_LITERAL ); // Ensure base query is not null EList dataDefinitions = ( (SeriesDefinition) ( (DialChart) currentChart ).getSeriesDefinitions( ) .get( 0 ) ).getDesignTimeSeries( ).getDataDefinition( ); if ( dataDefinitions.size( ) == 0 ) { dataDefinitions.add( QueryImpl.create( BLANK_QUERY ) ); } else { Query query = ( (Query) dataDefinitions.get( 0 ) ); if ( query.getDefinition( ) == null || query.getDefinition( ).trim( ).length( ) == 0 ) { query.setDefinition( BLANK_QUERY ); } } } else if ( currentChart instanceof ChartWithoutAxes ) { if ( currentChart.getType( ).equals( TYPE_LITERAL ) ) { currentChart.setSubType( sNewSubType ); ( (DialChart) currentChart ).setDialSuperimposition( sNewSubType.equals( SUPERIMPOSED_SUBTYPE_LITERAL ) ); if ( !currentChart.getDimension( ) .equals( getDimensionFor( sNewDimension ) ) ) { currentChart.setDimension( getDimensionFor( sNewDimension ) ); } } else { // Create a new instance of the correct type and set initial // properties currentChart = DialChartImpl.create( ); currentChart.setType( TYPE_LITERAL ); currentChart.setSubType( sNewSubType ); currentChart.setDimension( getDimensionFor( sNewDimension ) ); ( (DialChart) currentChart ).setDialSuperimposition( sNewSubType.equals( SUPERIMPOSED_SUBTYPE_LITERAL ) ); // Copy generic chart properties from the old chart currentChart.setBlock( helperModel.getBlock( ) ); currentChart.setDescription( helperModel.getDescription( ) ); currentChart.setGridColumnCount( helperModel.getGridColumnCount( ) ); currentChart.setSampleData( helperModel.getSampleData( ) ); currentChart.setScript( helperModel.getScript( ) ); currentChart.setUnits( helperModel.getUnits( ) ); currentChart.getInteractivity().setEnable( helperModel.getInteractivity().isEnable()); currentChart.getInteractivity().setLegendBehavior( helperModel.getInteractivity().getLegendBehavior()); // Clear existing series definitions ( (ChartWithoutAxes) currentChart ).getSeriesDefinitions( ) .clear( ); // Copy series definitions ( (ChartWithoutAxes) currentChart ).getSeriesDefinitions( ) .add( ( (ChartWithoutAxes) helperModel ).getSeriesDefinitions( ) .get( 0 ) ); // Update the series EList seriesdefinitions = ( (SeriesDefinition) ( (ChartWithoutAxes) currentChart ).getSeriesDefinitions( ) .get( 0 ) ).getSeriesDefinitions( ); Series series; for ( int j = 0; j < seriesdefinitions.size( ); j++ ) { series = ( (SeriesDefinition) seriesdefinitions.get( j ) ).getDesignTimeSeries( ); series = getConvertedSeries( series ); // Clear any existing series ( (SeriesDefinition) seriesdefinitions.get( j ) ).getSeries( ) .clear( ); // Add the new series ( (SeriesDefinition) seriesdefinitions.get( j ) ).getSeries( ) .add( series ); } currentChart.getLegend( ) .setItemType( LegendItemType.SERIES_LITERAL ); currentChart.getTitle( ) .getLabel( ) .getCaption( ) .setValue( CHART_TITLE ); } // Ensure base query is not null EList dataDefinitions = ( (SeriesDefinition) ( (DialChart) currentChart ).getSeriesDefinitions( ) .get( 0 ) ).getDesignTimeSeries( ).getDataDefinition( ); if ( dataDefinitions.size( ) == 0 ) { dataDefinitions.add( QueryImpl.create( BLANK_QUERY ) ); } else { Query query = ( (Query) dataDefinitions.get( 0 ) ); if ( query.getDefinition( ) == null || query.getDefinition( ).trim( ).length( ) == 0 ) { query.setDefinition( BLANK_QUERY ); } } } else { return null; } return currentChart; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/182827fe6ad4e223adc4bf4bcf44d469847b773d/MeterChart.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/type/MeterChart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
14804,
336,
22063,
7984,
12,
14804,
783,
7984,
16,
514,
272,
1908,
30511,
16,
1082,
202,
780,
272,
1908,
8611,
262,
202,
95,
202,
202,
7984,
4222,
1488,
273,
261,
7984,
13,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
14804,
336,
22063,
7984,
12,
14804,
783,
7984,
16,
514,
272,
1908,
30511,
16,
1082,
202,
780,
272,
1908,
8611,
262,
202,
95,
202,
202,
7984,
4222,
1488,
273,
261,
7984,
13,
5... |
SuiteInfo suite1 = (SuiteInfo) o1; SuiteInfo suite2 = (SuiteInfo) o2; return suite1.getName().compareTo(suite2.getName()); } | SuiteInfo suite1 = (SuiteInfo) o1; SuiteInfo suite2 = (SuiteInfo) o2; return suite1.getName().compareToIgnoreCase(suite2.getName()); } | public int compare(Object o1, Object o2) { SuiteInfo suite1 = (SuiteInfo) o1; SuiteInfo suite2 = (SuiteInfo) o2; return suite1.getName().compareTo(suite2.getName()); } | 57344 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57344/a52e797a2b316f9732be3c8b748eef1bff7d39cf/SuitesPreferences.java/buggy/clients/JavaGE/src/org/genepattern/gpge/ui/preferences/SuitesPreferences.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
509,
3400,
12,
921,
320,
21,
16,
1033,
320,
22,
13,
288,
9506,
202,
13587,
966,
11371,
21,
273,
261,
13587,
966,
13,
320,
21,
31,
9506,
202,
13587,
966,
11371,
22,
273,
261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
509,
3400,
12,
921,
320,
21,
16,
1033,
320,
22,
13,
288,
9506,
202,
13587,
966,
11371,
21,
273,
261,
13587,
966,
13,
320,
21,
31,
9506,
202,
13587,
966,
11371,
22,
273,
261... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.