rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
order[j] = keys[piv]; | order[j] = piv; | boolean pqInit() { int p, r, i, j; int piv; Stack[] stack = new Stack[50]; for (int k = 0; k < stack.length; k++) { stack[k] = new Stack(); } int top = 0; int seed = 2016473283; /* Create an array of indirect pointers to the keys, so that we * the handles we have returned are still valid. */ order = new Object[size + 1];/* the previous line is a patch to compensate for the fact that IBM *//* machines return a null on a malloc of zero bytes (unlike SGI), *//* so we have to put in this defense to guard against a memory *//* fault four lines down. from fossum@austin.ibm.com. */ p = 0; r = size - 1; for (piv = 0, i = p; i <= r; ++piv, ++i) { order[i] = keys[piv]; } /* Sort the indirect pointers in descending order, * using randomized Quicksort */ stack[top].p = p; stack[top].r = r; ++top; while (--top >= 0) { p = stack[top].p; r = stack[top].r; while (r > p + 10) { seed = Math.abs(seed * 1539415821 + 1); i = p + seed % (r - p + 1); keys[piv] = order[i]; order[i] = order[p]; order[p] = keys[piv]; i = p - 1; j = r + 1; do { do { ++i; } while (GT(leq, order[i], keys[piv])); do { --j; } while (LT(leq, order[j], keys[piv])); Swap(order, i, j); } while (i < j); Swap(order, i, j); /* Undo last swap */ if (i - p < r - j) { stack[top].p = j + 1; stack[top].r = r; ++top; r = i - 1; } else { stack[top].p = p; stack[top].r = i - 1; ++top; p = j + 1; } } /* Insertion sort small lists */ for (i = p + 1; i <= r; ++i) { keys[piv] = order[i]; for (j = i; j > p && LT(leq, order[j - 1], keys[piv]); --j) { order[j] = order[j - 1]; } order[j] = keys[piv]; } } max = size; initialized = true; heap.pqInit(); /* always succeeds *//* #ifndef NDEBUG p = order; r = p + size - 1; for (i = p; i < r; ++i) { assert (LEQ( * * (i + 1), **i )); } #endif*/ return true; } | 46690 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46690/4c6d717f37d4a6cf50fd06056f1a2357815a9ccf/PriorityQSort.java/buggy/src/net/java/games/jogl/impl/tesselator/PriorityQSort.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1250,
14619,
2570,
1435,
288,
3639,
509,
293,
16,
436,
16,
277,
16,
525,
31,
3639,
509,
293,
427,
31,
3639,
7283,
8526,
2110,
273,
394,
7283,
63,
3361,
15533,
3639,
364,
261,
474,
417,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14619,
2570,
1435,
288,
3639,
509,
293,
16,
436,
16,
277,
16,
525,
31,
3639,
509,
293,
427,
31,
3639,
7283,
8526,
2110,
273,
394,
7283,
63,
3361,
15533,
3639,
364,
261,
474,
417,
... |
final String signature = location.method().signature(); final String name = location.method().name(); if(location.declaringType() == null) return -1; | final String methodSignature = location.method().signature(); if (methodSignature == null) { return -1; } final String methodName = location.method().name(); if(methodName == null) { return -1; } if(location.declaringType() == null) { return -1; } | private int calcLineIndex(PsiFile psiFile, Location location) { LOG.assertTrue(myDebugProcess != null); if (location == null) { return -1; } int lineNumber; try { lineNumber = location.lineNumber() - 1; } catch (InternalError e) { lineNumber = -1; } if (psiFile instanceof PsiCompiledElement || lineNumber < 0) { final String signature = location.method().signature(); final String name = location.method().name(); if(location.declaringType() == null) return -1; final String className = location.declaringType().name(); if(name == null || signature == null) return -1; final PsiClass[] compiledClass = new PsiClass[1]; final PsiMethod[] compiledMethod = new PsiMethod[1]; PsiRecursiveElementVisitor visitor = new PsiRecursiveElementVisitor() { public void visitClass(PsiClass aClass) { List<ReferenceType> allClasses = myDebugProcess.getPositionManager().getAllClasses(SourcePosition.createFromElement(aClass)); for (Iterator<ReferenceType> iterator = allClasses.iterator(); iterator.hasNext();) { ReferenceType referenceType = iterator.next(); if(referenceType.name().equals(className)) { compiledClass[0] = aClass; } } aClass.acceptChildren(this); } public void visitMethod(PsiMethod method) { try { String methodName = method.isConstructor() ? "<init>" : method.getName(); PsiClass containingClass = method.getContainingClass(); if(containingClass != null && containingClass.equals(compiledClass[0]) && name.equals(methodName) && JVMNameUtil.getJVMSignature(method).getName(myDebugProcess).equals(signature)) { compiledMethod[0] = method; } } catch (EvaluateException e) { LOG.debug(e); } } }; psiFile.accept(visitor); if(compiledMethod [0] != null) { Document document = PsiDocumentManager.getInstance(myDebugProcess.getProject()).getDocument(psiFile); if(document != null){ return document.getLineNumber(compiledMethod[0].getTextOffset()); } } return -1; } return lineNumber; } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/2b538441ae02633bc3fb134c0a3a3651e6c0b647/PositionManagerImpl.java/clean/source/com/intellij/debugger/engine/PositionManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
509,
7029,
1670,
1016,
12,
52,
7722,
812,
23921,
812,
16,
18701,
7050,
2117,
13,
288,
565,
2018,
18,
11231,
5510,
12,
4811,
2829,
2227,
480,
446,
1769,
565,
309,
261,
3562,
422,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
509,
7029,
1670,
1016,
12,
52,
7722,
812,
23921,
812,
16,
18701,
7050,
2117,
13,
288,
565,
2018,
18,
11231,
5510,
12,
4811,
2829,
2227,
480,
446,
1769,
565,
309,
261,
3562,
422,
4... |
setModified(true); | public void setHomeURL(String homeURL) { if (((homeURL == null) && (_homeURL != null)) || ((homeURL != null) && (_homeURL == null)) || ((homeURL != null) && (_homeURL != null) && !homeURL.equals(_homeURL))) { if (!XSS_ALLOW_HOMEURL) { homeURL = XSSUtil.strip(homeURL); } _homeURL = homeURL; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/CompanyModel.java/clean/portal-ejb/src/com/liferay/portal/model/CompanyModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
8684,
1785,
12,
780,
6382,
1785,
13,
288,
202,
202,
430,
261,
12443,
8712,
1785,
422,
446,
13,
597,
261,
67,
8712,
1785,
480,
446,
3719,
747,
9506,
202,
12443,
8712,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
8684,
1785,
12,
780,
6382,
1785,
13,
288,
202,
202,
430,
261,
12443,
8712,
1785,
422,
446,
13,
597,
261,
67,
8712,
1785,
480,
446,
3719,
747,
9506,
202,
12443,
8712,... | |
oldValue = liveWord.prepareWord(); newValue = oldValue.or(mask); | oldValue = liveWord.prepareWord(); newValue = oldValue.or(mask); | protected static final void liveAddress(Address address, boolean atomic) throws InlinePragma { Word oldValue, newValue; Address liveWord = getLiveWordAddress(address); Word mask = getMask(address, true); if (atomic) { do { oldValue = liveWord.prepareWord(); newValue = oldValue.or(mask); } while(!liveWord.attempt(oldValue, newValue)); } else liveWord.store(liveWord.loadWord().or(mask)); } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/758ed5c231ce2489135a1eef3a6d5c0ec6ce00d7/SegregatedFreeList.java/buggy/MMTk/src/org/mmtk/utility/alloc/SegregatedFreeList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
760,
727,
918,
8429,
1887,
12,
1887,
1758,
16,
1250,
7960,
13,
565,
1216,
16355,
2050,
9454,
288,
565,
9926,
11144,
16,
6129,
31,
565,
5267,
8429,
3944,
273,
9014,
688,
3944,
1887,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
727,
918,
8429,
1887,
12,
1887,
1758,
16,
1250,
7960,
13,
565,
1216,
16355,
2050,
9454,
288,
565,
9926,
11144,
16,
6129,
31,
565,
5267,
8429,
3944,
273,
9014,
688,
3944,
1887,
... |
GridBagConstraints c = new GridBagConstraints(); c.ipadx = 3; c.ipady = 3; c.weightx = 0.0; c.weighty = 0.0; c.anchor = GridBagConstraints.EAST; | GridBagConstraints c = new GridBagConstraints(); c.ipadx = 3; c.ipady = 3; c.weightx = 0.0; c.weighty = 0.0; c.anchor = GridBagConstraints.EAST; | public WizStepCue(Wizard w, String cue) { // store wizard? _instructions.setText(cue); _instructions.setWrapStyleWord(true); _instructions.setEditable(false); _instructions.setBorder(null); _instructions.setBackground(_mainPanel.getBackground()); _mainPanel.setBorder(new EtchedBorder()); GridBagLayout gb = new GridBagLayout(); _mainPanel.setLayout(gb); GridBagConstraints c = new GridBagConstraints(); c.ipadx = 3; c.ipady = 3; c.weightx = 0.0; c.weighty = 0.0; c.anchor = GridBagConstraints.EAST; JLabel image = new JLabel(""); //image.setMargin(new Insets(0, 0, 0, 0)); image.setIcon(WIZ_ICON); image.setBorder(null); c.gridx = 0; c.gridheight = GridBagConstraints.REMAINDER; c.gridy = 0; c.anchor = GridBagConstraints.NORTH; gb.setConstraints(image, c); _mainPanel.add(image); c.weightx = 1.0; c.gridx = 2; c.gridheight = GridBagConstraints.REMAINDER; c.gridwidth = 3; c.gridy = 0; c.fill = GridBagConstraints.HORIZONTAL; gb.setConstraints(_instructions, c); _mainPanel.add(_instructions); c.gridx = 1; c.gridy = 1; c.weightx = 0.0; c.gridwidth = 1; c.fill = GridBagConstraints.NONE; SpacerPanel spacer2 = new SpacerPanel(); gb.setConstraints(spacer2, c); _mainPanel.add(spacer2); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/ca3bcb5d6dd283c4553bcbfe50b108dc5d499768/WizStepCue.java/buggy/src_new/org/argouml/cognitive/ui/WizStepCue.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
678,
452,
4160,
39,
344,
12,
27130,
341,
16,
514,
276,
344,
13,
288,
565,
368,
1707,
24204,
35,
565,
389,
25758,
18,
542,
1528,
12,
8007,
1769,
565,
389,
25758,
18,
542,
2964,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
678,
452,
4160,
39,
344,
12,
27130,
341,
16,
514,
276,
344,
13,
288,
565,
368,
1707,
24204,
35,
565,
389,
25758,
18,
542,
1528,
12,
8007,
1769,
565,
389,
25758,
18,
542,
2964,
2... |
protected void changeToInactive(boolean etherealize_objects) { if (poaListener != null) poaListener.poaStateChanged(this, POAConstants.INACTIVE); monitor.changeState("changed to inactive ..."); // notify everybody who is waiting for request completion requestController.resetPreviousCompletionCall(); // continue the request dispatching requestController.continueToWork(); // wait for completion of all active requests requestController.waitForCompletion(); /* etherialize all active objects */ if (etherealize && isRetain() && useServantManager()) { if (logTrace.test(3)) logTrace.printLog("etherialize all servants ..."); aom.removeAll((ServantActivator) servantManager, this, true); if (logTrace.test(3)) logTrace.printLog("... done"); if (monitor != null) monitor.changeState("inactive (etherialization completed)"); } else { if (monitor != null) monitor.changeState("inactive (no etherialization)"); } } | 46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/a74dc4ac69615c8e503cb9145c3594f1702d4c75/POA.java/buggy/src/org/jacorb/poa/POA.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
2549,
774,
24384,
12,
6494,
13750,
822,
287,
554,
67,
6911,
13,
377,
288,
10402,
309,
261,
1631,
69,
2223,
480,
446,
13,
2398,
8275,
69,
2223,
18,
1631,
69,
1119,
5033,
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,
4750,
918,
2549,
774,
24384,
12,
6494,
13750,
822,
287,
554,
67,
6911,
13,
377,
288,
10402,
309,
261,
1631,
69,
2223,
480,
446,
13,
2398,
8275,
69,
2223,
18,
1631,
69,
1119,
5033,
12,
... | ||
createFactories(); | init(); | public PluginLoader(URL url) throws PluginException { super(new URL[]{url}); createFactories(); } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/f81050d86c6e4bed0fc90e4fdf19527da4e50557/PluginLoader.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/PluginLoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6258,
2886,
12,
1785,
880,
13,
1216,
6258,
503,
288,
202,
202,
9565,
12,
2704,
1976,
63,
7073,
718,
22938,
202,
202,
2640,
19271,
5621,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6258,
2886,
12,
1785,
880,
13,
1216,
6258,
503,
288,
202,
202,
9565,
12,
2704,
1976,
63,
7073,
718,
22938,
202,
202,
2640,
19271,
5621,
202,
97,
2,
-100,
-100,
-100,
-100,
-10... |
public void optionChanged(OptionEvent<Color> oce) { updateColors(); } | public void optionChanged(OptionEvent<Color> oce) { updateColors(); } | public void optionChanged(OptionEvent<Color> oce) { updateColors(); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/66cf5c18c85c49dd4268e6eb5e205df7e4243a71/ColoringView.java/buggy/drjava/src/edu/rice/cs/drjava/model/definitions/ColoringView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1456,
5033,
12,
1895,
1133,
32,
2957,
34,
320,
311,
13,
288,
1377,
1089,
12570,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1456,
5033,
12,
1895,
1133,
32,
2957,
34,
320,
311,
13,
288,
1377,
1089,
12570,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
private JViewport getViewport() | protected JViewport getViewport() | private JViewport getViewport() { Container container = getParent(); while(!(container instanceof JScrollPane)) container = container.getParent(); return ((JScrollPane)container).getViewport(); } | 10874 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10874/901d319fbb796b9a03a36a00f864e17f8b16baa2/FeatureList.java/clean/uk/ac/sanger/artemis/components/FeatureList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
804,
22743,
8893,
655,
1435,
225,
288,
565,
4039,
1478,
273,
5089,
5621,
565,
1323,
12,
5,
12,
3782,
1276,
804,
26360,
3719,
1377,
1478,
273,
1478,
18,
588,
3054,
5621,
565,
327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
804,
22743,
8893,
655,
1435,
225,
288,
565,
4039,
1478,
273,
5089,
5621,
565,
1323,
12,
5,
12,
3782,
1276,
804,
26360,
3719,
1377,
1478,
273,
1478,
18,
588,
3054,
5621,
565,
327,
... |
Axis oldPrimaryAxis = getAxisYForProcessing( (ChartWithAxes) chartModel, axisIndex ); if ( oldPrimaryAxis.isPrimaryAxis( ) ) { int yAxisSize = getOrthogonalAxisNumber( chartModel ); Axis newPrimaryAxis = null; if ( axisIndex + 1 < yAxisSize ) { newPrimaryAxis = getAxisYForProcessing( (ChartWithAxes) chartModel, axisIndex + 1 ); } else { newPrimaryAxis = getAxisYForProcessing( (ChartWithAxes) chartModel, 0 ); } newPrimaryAxis.setPrimaryAxis( true ); newPrimaryAxis.setOrigin( oldPrimaryAxis.getOrigin( ) ); newPrimaryAxis.setLabelPosition( oldPrimaryAxis.getLabelPosition( ) ); newPrimaryAxis.setTitlePosition( oldPrimaryAxis.getTitlePosition( ) ); } return null; | newPrimaryAxis = getAxisYForProcessing( (ChartWithAxes) chartModel, axisIndex + 1 ); | public static void removeAxis( final Chart chartModel, final int axisIndex ) { if ( chartModel instanceof ChartWithoutAxes ) { return; } ChartAdapter.changeChartWithoutNotification( new IChangeWithoutNotification( ) { public Object run( ) { // Ensure one primary axis existent Axis oldPrimaryAxis = getAxisYForProcessing( (ChartWithAxes) chartModel, axisIndex ); if ( oldPrimaryAxis.isPrimaryAxis( ) ) { int yAxisSize = getOrthogonalAxisNumber( chartModel ); Axis newPrimaryAxis = null; if ( axisIndex + 1 < yAxisSize ) { newPrimaryAxis = getAxisYForProcessing( (ChartWithAxes) chartModel, axisIndex + 1 ); } else { newPrimaryAxis = getAxisYForProcessing( (ChartWithAxes) chartModel, 0 ); } // Retain the properties of primary axis newPrimaryAxis.setPrimaryAxis( true ); newPrimaryAxis.setOrigin( oldPrimaryAxis.getOrigin( ) ); newPrimaryAxis.setLabelPosition( oldPrimaryAxis.getLabelPosition( ) ); newPrimaryAxis.setTitlePosition( oldPrimaryAxis.getTitlePosition( ) ); } return null; } } ); // Remove the orthogonal axis getAxisXForProcessing( (ChartWithAxes) chartModel ).getAssociatedAxes( ) .remove( axisIndex ); // Remove the sample data of the axis // int iSDIndexFirst = getLastSeriesIndexWithinAxis( chartModel, // axisIndex - 1 ) + 1; // int iSDIndexLast = getLastSeriesIndexWithinAxis( chartModel, // axisIndex ); // EList list = chartModel.getSampleData( ).getOrthogonalSampleData( ); // for ( int i = 0; i < list.size( ); i++ ) // { // if ( i >= iSDIndexFirst && i <= iSDIndexLast ) // { // list.remove( i ); // i--; // iSDIndexLast--; // } // } } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/6070850730627cbb40c6152758346d1710bb384f/ChartUIUtil.java/clean/chart/org.eclipse.birt.chart.ui/src/org/eclipse/birt/chart/ui/util/ChartUIUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
1206,
6558,
12,
727,
14804,
4980,
1488,
16,
727,
509,
2654,
1016,
262,
202,
95,
202,
202,
430,
261,
4980,
1488,
1276,
14804,
8073,
26494,
262,
202,
202,
95,
1082,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
1206,
6558,
12,
727,
14804,
4980,
1488,
16,
727,
509,
2654,
1016,
262,
202,
95,
202,
202,
430,
261,
4980,
1488,
1276,
14804,
8073,
26494,
262,
202,
202,
95,
1082,
20... |
IEditorReference[] editors = editorPresentation.getEditors(); | IEditorReference[] editors = page.getEditorReferences(); | private List collectDirtyEditors() { List result = new ArrayList(3); IEditorReference[] editors = editorPresentation.getEditors(); for (int i = 0; i < editors.length; i++) { IEditorPart part = (IEditorPart) editors[i].getPart(false); if (part != null && part.isDirty()) result.add(part); } return result; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/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,
3238,
987,
3274,
10785,
4666,
1383,
1435,
288,
3639,
987,
563,
273,
394,
2407,
12,
23,
1769,
3639,
467,
6946,
2404,
8526,
29431,
273,
1363,
18,
588,
6946,
8221,
5621,
3639,
364,
261,
474,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
3274,
10785,
4666,
1383,
1435,
288,
3639,
987,
563,
273,
394,
2407,
12,
23,
1769,
3639,
467,
6946,
2404,
8526,
29431,
273,
1363,
18,
588,
6946,
8221,
5621,
3639,
364,
261,
474,... |
buffer.append("</tr>"); return buffer.toString(); } | private String getHeader() { StringBuffer buffer = new StringBuffer(); buffer.append("<tr>"); for (int i = 0; i < weekDaysShort.length; i++) { buffer.append("<th abbr=\""); buffer.append(weekDaysLong[i]); buffer.append("\">"); buffer.append(weekDaysShort[i]); buffer.append("</th>"); } buffer.append("</tr>"); return buffer.toString(); } | 6853 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6853/ce40bc073404655fdd633d72fd1b9e545d632e66/Month.java/clean/src/org/snipsnap/date/Month.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
514,
7911,
1435,
288,
565,
6674,
1613,
273,
394,
6674,
5621,
565,
1613,
18,
6923,
2932,
32,
313,
2984,
1769,
565,
364,
261,
474,
277,
273,
374,
31,
277,
411,
4860,
9384,
4897,
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,
282,
3238,
514,
7911,
1435,
288,
565,
6674,
1613,
273,
394,
6674,
5621,
565,
1613,
18,
6923,
2932,
32,
313,
2984,
1769,
565,
364,
261,
474,
277,
273,
374,
31,
277,
411,
4860,
9384,
4897,
18,... | |
buf.append(key).append(" = ").append(val).append("<br />\n"); | buf.append(DataHelper.stripHTML(key)).append(" = ").append(DataHelper.stripHTML(val)).append("<br />\n"); | private void renderRouterInfo(StringBuffer buf, RouterInfo info, boolean isUs) { if (isUs) { buf.append("<b>Our info: </b><br />\n"); } else { String hash = info.getIdentity().getHash().toBase64(); buf.append("<a name=\"").append(hash.substring(0, 6)).append("\" />"); buf.append("<b>Peer info for:</b> ").append(hash).append("<br />\n"); } long age = _context.clock().now() - info.getPublished(); if (age > 0) buf.append("Published: <i>").append(DataHelper.formatDuration(age)).append(" ago</i><br />\n"); else buf.append("Published: <i>in ").append(DataHelper.formatDuration(0-age)).append("???</i><br />\n"); buf.append("Address(es): <i>"); for (Iterator iter = info.getAddresses().iterator(); iter.hasNext(); ) { RouterAddress addr = (RouterAddress)iter.next(); buf.append(addr.getTransportStyle()).append(": "); for (Iterator optIter = addr.getOptions().keySet().iterator(); optIter.hasNext(); ) { String name = (String)optIter.next(); String val = addr.getOptions().getProperty(name); buf.append('[').append(name).append('=').append(val).append("] "); } } buf.append("</i><br />\n"); buf.append("Stats: <br /><i><code>\n"); for (Iterator iter = info.getOptions().keySet().iterator(); iter.hasNext(); ) { String key = (String)iter.next(); String val = info.getOptions().getProperty(key); buf.append(key).append(" = ").append(val).append("<br />\n"); } buf.append("</code></i><hr />\n"); } | 27437 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27437/fbe9fe1ba89136f62739fc96cd5486d5b438cb59/KademliaNetworkDatabaseFacade.java/clean/router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1743,
8259,
966,
12,
780,
1892,
1681,
16,
9703,
966,
1123,
16,
1250,
353,
3477,
13,
288,
3639,
309,
261,
291,
3477,
13,
288,
5411,
1681,
18,
6923,
2932,
32,
70,
34,
51,
295... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1743,
8259,
966,
12,
780,
1892,
1681,
16,
9703,
966,
1123,
16,
1250,
353,
3477,
13,
288,
3639,
309,
261,
291,
3477,
13,
288,
5411,
1681,
18,
6923,
2932,
32,
70,
34,
51,
295... |
if(state != null) { | if (state != null) { | void interrupted(Context cx) { synchronized(swingMonitor) { if(java.awt.EventQueue.isDispatchThread()) { dispatcherIsWaiting++; if(nonDispatcherWaiting) { // Another thread is stopped in the debugger // process events until it resumes and we // can enter java.awt.EventQueue eventQ = java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue(); while(nonDispatcherWaiting) { try { AWTEvent event = eventQ.getNextEvent(); if(event instanceof ActiveEvent) { ((ActiveEvent)event).dispatch(); } else { Object source = event.getSource(); if(source instanceof Component) { Component comp = (Component)source; // Suppress Window/InputEvent's that aren't // directed to the Debugger // if(!(event instanceof InputEvent || //event instanceof WindowEvent)|| //shouldDispatchTo(comp)) { comp.dispatchEvent(event); //} } else if(source instanceof MenuComponent) { ((MenuComponent)source).dispatchEvent(event); } } if(this.returnValue == EXIT) { return; } swingMonitor.wait(1); } catch(InterruptedException exc) { return; } } } } else { while(isInterrupted || dispatcherIsWaiting > 0) { try { swingMonitor.wait(); } catch(InterruptedException exc) { return; } } nonDispatcherWaiting = true; } isInterrupted = true; } do { currentContext = cx; DebuggableEngine engine = cx.getDebuggableEngine(); Thread thread = Thread.currentThread(); statusBar.setText("Thread: " + thread.toString()); ThreadState state = (ThreadState)threadState.get(thread); int stopAtFrameDepth = -1; if(state != null) { stopAtFrameDepth = state.stopAtFrameDepth; } if(runToCursorFile != null && thread == runToCursorThread) { int frameCount = engine.getFrameCount(); if(frameCount > 0) { DebugFrame frame = engine.getFrame(0); String sourceName = frame.getSourceName(); if(sourceName != null) { if(sourceName.equals(runToCursorFile)) { int lineNumber = frame.getLineNumber(); if(lineNumber == runToCursorLine) { stopAtFrameDepth = -1; runToCursorFile = null; } else { FileWindow w = getFileWindow(sourceName); if(w == null || !w.isBreakPoint(lineNumber)) { return; } else { runToCursorFile = null; } } } } } else { } } if(stopAtFrameDepth > 0) { if (engine.getFrameCount() > stopAtFrameDepth) { break; } } if(state != null) { state.stopAtFrameDepth = -1; } threadState.remove(thread); int frameCount = engine.getFrameCount(); this.frameIndex = frameCount -1; int line = 0; if(frameCount == 0) { break; } DebugFrame frame = engine.getFrame(0); String fileName = frame.getSourceName(); engine.setBreakNextLine(false); line = frame.getLineNumber(); int enterCount = 0; boolean isDispatchThread = java.awt.EventQueue.isDispatchThread(); if(!isDispatchThread) { // detach cx from its thread so the debugger (in the awt // dispatcher thread) can enter it if necessary cx.exit(); while(Context.getCurrentContext() != null) { Context.exit(); enterCount++; } } if(fileName != null && !fileName.equals("<stdin>")) { FileWindow w = (FileWindow)getFileWindow(fileName); if(w != null) { SetFilePosition action = new SetFilePosition(this, w, line); swingInvoke(action); } else { Vector v = (Vector)sourceNames.get(fileName); String source = ((SourceEntry)v.elementAt(0)).source.toString(); CreateFileWindow action = new CreateFileWindow(this, fileName, source, line); swingInvoke(action); } } else { if(console.isVisible()) { final JSInternalConsole finalConsole = console; swingInvoke(new Runnable() { public void run() { finalConsole.show(); } }); } } swingInvoke(new EnterInterrupt(this, cx)); swingInvoke(new UpdateContext(this, cx)); int returnValue; if(!isDispatchThread) { synchronized(monitor) { this.returnValue = -1; try { while(this.returnValue == -1) { monitor.wait(); } returnValue = this.returnValue; } catch(InterruptedException exc) { break; } } } else { java.awt.EventQueue eventQ = java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue(); this.returnValue = -1; while(this.returnValue == -1) { try { AWTEvent event = eventQ.getNextEvent(); if(event instanceof ActiveEvent) { ((ActiveEvent)event).dispatch(); } else { Object source = event.getSource(); if(source instanceof Component) { Component comp = (Component)source; // Suppress Window/InputEvent's that aren't // directed to the Debugger // if(!(event instanceof InputEvent || //event instanceof WindowEvent)|| // shouldDispatchTo(comp)) { //comp.dispatchEvent(event); //} comp.dispatchEvent(event); } else if(source instanceof MenuComponent) { ((MenuComponent)source).dispatchEvent(event); } } } catch(InterruptedException exc) { } } returnValue = this.returnValue; } swingInvoke(new ExitInterrupt(this)); if(!isDispatchThread) { // reattach cx to its thread Context current; if((current = Context.enter(cx)) != cx) { System.out.println("debugger error: cx = " + cx + " current = " + current); } while(enterCount > 0) { Context.enter(); enterCount--; } } switch(returnValue) { case STEP_OVER: engine.setBreakNextLine(true); stopAtFrameDepth = engine.getFrameCount(); if(state == null) { state = new ThreadState(); } state.stopAtFrameDepth = stopAtFrameDepth; threadState.put(thread, state); break; case STEP_INTO: engine.setBreakNextLine(true); if(state != null) { state.stopAtFrameDepth = -1; } break; case STEP_OUT: stopAtFrameDepth = engine.getFrameCount() -1; if(stopAtFrameDepth > 0) { engine.setBreakNextLine(true); if(state == null) { state = new ThreadState(); } state.stopAtFrameDepth = stopAtFrameDepth; threadState.put(thread, state); } break; case RUN_TO_CURSOR: engine.setBreakNextLine(true); if(state != null) { state.stopAtFrameDepth = -1; } break; } } while(false); synchronized(swingMonitor) { isInterrupted = false; if(java.awt.EventQueue.isDispatchThread()) { dispatcherIsWaiting--; } else { nonDispatcherWaiting = false; } swingMonitor.notifyAll(); } } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/b9766e81693411fa600b26b9a0763dcf621b2770/Main.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
15711,
12,
1042,
9494,
13,
288,
3639,
3852,
12,
5328,
310,
7187,
13,
288,
5411,
309,
12,
6290,
18,
2219,
88,
18,
1133,
3183,
18,
291,
5325,
3830,
10756,
288,
7734,
7393,
2520,
1594... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15711,
12,
1042,
9494,
13,
288,
3639,
3852,
12,
5328,
310,
7187,
13,
288,
5411,
309,
12,
6290,
18,
2219,
88,
18,
1133,
3183,
18,
291,
5325,
3830,
10756,
288,
7734,
7393,
2520,
1594... |
public Object execute(URIResolver uriResolver, Object context, VariableContextImpl variableContext) { | public Object execute(URIResolver uriResolver, Object context, VariableContextImpl variableContext, DocumentContext documentContext) { | public Object execute(URIResolver uriResolver, Object context, VariableContextImpl variableContext) { List result = new ArrayList(); List selected = Utils.evaluateToList(uriResolver, context, variableContext, getLocationData(), select, namespaceContext); Context jaxenContext = new Context(null); jaxenContext.setSize(selected.size()); for (int i = 0; i < selected.size(); i++) { jaxenContext.setPosition(i + 1); jaxenContext.setNodeSet(Arrays.asList(new Object[]{selected.get(i)})); Object statementsResult = Utils.execute(uriResolver, jaxenContext, variableContext, statements); if (statementsResult instanceof List) { result.addAll((List) statementsResult); } else { result.add(statementsResult); } } return result.size() == 1 ? result.get(0) : result; } | 52783 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52783/d806a39459dae4e0952f05860297e8edce1d2b2f/ForEach.java/buggy/src/java/org/orbeon/oxf/transformer/xupdate/statement/ForEach.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1836,
12,
3098,
4301,
2003,
4301,
16,
1033,
819,
16,
7110,
1042,
2828,
2190,
1042,
16,
4319,
1042,
1668,
1042,
13,
288,
3639,
987,
563,
273,
394,
2407,
5621,
3639,
987,
3170,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1836,
12,
3098,
4301,
2003,
4301,
16,
1033,
819,
16,
7110,
1042,
2828,
2190,
1042,
16,
4319,
1042,
1668,
1042,
13,
288,
3639,
987,
563,
273,
394,
2407,
5621,
3639,
987,
3170,
... |
searchString.replace(',', ';'); | public static Entry[] convertStringEntries(final String searchString) { searchString.replace(',', ';'); final StringTokenizer tokenizer = new StringTokenizer(searchString.trim(), ";"); final List entriesList = new ArrayList(); while (tokenizer.hasMoreElements()) { final String token = tokenizer.nextToken(); final PropertyEntry entry = new PropertyEntry(); entry.name = token.substring(0, token.indexOf("=")).trim(); entry.value = token.substring(token.indexOf("=") + 1).trim(); entriesList.add(entry); } LOG.debug("Entry List: " + entriesList); final Entry[] arrEntries; if (entriesList.size() == 0) { arrEntries = null; } else { arrEntries = (Entry[]) entriesList.toArray(new Entry[entriesList.size()]); } return arrEntries; } | 55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/37d62e62a99fb32ce23983211038579a2901fcb0/ReggieUtil.java/clean/contrib/distributed/src/net/sourceforge/cruisecontrol/distributed/util/ReggieUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
3841,
8526,
1765,
780,
5400,
12,
6385,
514,
1623,
780,
13,
288,
9079,
727,
16370,
10123,
273,
394,
16370,
12,
3072,
780,
18,
5290,
9334,
11430,
1769,
3639,
727,
987,
3222,
682,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3841,
8526,
1765,
780,
5400,
12,
6385,
514,
1623,
780,
13,
288,
9079,
727,
16370,
10123,
273,
394,
16370,
12,
3072,
780,
18,
5290,
9334,
11430,
1769,
3639,
727,
987,
3222,
682,... | |
public org.quickfix.field.WorkingIndicator getWorkingIndicator() throws FieldNotFound { org.quickfix.field.WorkingIndicator value = new org.quickfix.field.WorkingIndicator(); | public quickfix.field.WorkingIndicator getWorkingIndicator() throws FieldNotFound { quickfix.field.WorkingIndicator value = new quickfix.field.WorkingIndicator(); | public org.quickfix.field.WorkingIndicator getWorkingIndicator() throws FieldNotFound { org.quickfix.field.WorkingIndicator value = new org.quickfix.field.WorkingIndicator(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/OrderCancelReject.java/clean/src/java/src/quickfix/fix43/OrderCancelReject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14836,
13140,
336,
14836,
13140,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14836,
13140,
460,
273,
394,
2358,
18,
195... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14836,
13140,
336,
14836,
13140,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14836,
13140,
460,
273,
394,
2358,
18,
195... |
public static String[] list(String name) throws RemoteException, MalformedURLException { | public static String[] list(String name) throws RemoteException, MalformedURLException { | public static String[] list(String name) throws RemoteException, MalformedURLException { return (getRegistry(parseURL(name)).list());} | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/392a873c7dc1067cc2cc414042ead4e3b43e4483/Naming.java/clean/core/src/classpath/java/java/rmi/Naming.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
760,
514,
8526,
666,
12,
780,
508,
13,
1216,
18361,
16,
20710,
288,
202,
2463,
261,
588,
4243,
12,
2670,
1785,
12,
529,
13,
2934,
1098,
10663,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
760,
514,
8526,
666,
12,
780,
508,
13,
1216,
18361,
16,
20710,
288,
202,
2463,
261,
588,
4243,
12,
2670,
1785,
12,
529,
13,
2934,
1098,
10663,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100... |
this.language = language; | this.language = language; | public void setLanguage(String language) { this.language = language; } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/f2ed60b5417a9a7d4bcf5fcf0cdc3f70cc3c9b8f/BookBean.java/buggy/src/net/sourceforge/fenixedu/dataTransferObject/research/result/publication/BookBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
28993,
12,
780,
2653,
13,
288,
3639,
333,
18,
4923,
273,
2653,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
28993,
12,
780,
2653,
13,
288,
3639,
333,
18,
4923,
273,
2653,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
VM_Entrypoints.arrayIndexTrapParamField.getOffset(), | VM_Entrypoints.arrayIndexTrapParamField.getOffsetAsInt(), | private final void genBoundsCheck (VM_Assembler asm, byte indexReg, byte arrayRefReg ) { asm.emitCMP_RegDisp_Reg(arrayRefReg, VM_ObjectModel.getArrayLengthOffset(), indexReg); // compare index to array length VM_ForwardReference fr = asm.forwardJcc(asm.LGT); // Jmp around trap if index is OK // "pass" index param to C trap handler VM_ProcessorLocalState.emitMoveRegToField(asm, VM_Entrypoints.arrayIndexTrapParamField.getOffset(), indexReg); asm.emitINT_Imm(VM_Runtime.TRAP_ARRAY_BOUNDS + RVM_TRAP_BASE ); // trap fr.resolve(asm); } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/71f0481e0131f8f2137e2feea85ae32a28daffcc/VM_Compiler.java/buggy/rvm/src/vm/arch/intel/compilers/baseline/VM_Compiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
727,
918,
3157,
5694,
1564,
261,
7397,
67,
1463,
5747,
749,
20415,
16,
1160,
770,
1617,
16,
1160,
526,
1957,
1617,
262,
288,
377,
20415,
18,
18356,
39,
4566,
67,
1617,
1669,
84,
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,
282,
3238,
727,
918,
3157,
5694,
1564,
261,
7397,
67,
1463,
5747,
749,
20415,
16,
1160,
770,
1617,
16,
1160,
526,
1957,
1617,
262,
288,
377,
20415,
18,
18356,
39,
4566,
67,
1617,
1669,
84,
6... |
} | */ | public void doPost (HttpServletRequest req, HttpServletResponse res) throws ServletException,IOException { String caCN =(String)req.getParameter("CN"); String caOU =(String)req.getParameter("OU"); String caO =(String)req.getParameter("O"); String caL =(String)req.getParameter("L"); String caST =(String)req.getParameter("ST"); String caC =(String)req.getParameter("C"); String ldapURL = (String)req.getParameter("LDAPurl"); String validity = (String)req.getParameter("Validity"); String envelope = (String)req.getParameter("timeEnvelope"); String requirePending = (String)req.getParameter("RequirePending"); String keySize = (String)req.getParameter("KeySize"); String nodeIsSigner = (String)req.getParameter("nodeIsSigner"); String caDN = "cn=" + caCN + ", ou=" + caOU + ", o=" + caO + ", l=" + caL + ", st=" + caST + ", c=" + caC + ", t=" + CertificateCacheConstants.CERT_TITLE_CA; if (log.isDebugEnabled()) { log.debug("Creating CA key for: " + caDN); } // Build a hashtable of (attribute, value) pairs to replace // attributes with their value in a template XML file. Hashtable attributeTable = new Hashtable(); attributeTable.put("distinguishedName", caDN); attributeTable.put("ldapURL", ldapURL); attributeTable.put("keysize", keySize); attributeTable.put("validity", validity); attributeTable.put("timeEnvelope", envelope); attributeTable.put("requirePending", requirePending); attributeTable.put("nodeIsSigner", nodeIsSigner); PrintWriter out=res.getWriter(); /* try { X500Name dname = new X500Name(caDN); } catch (IOException e) { out.println("Unable to create CA certificate: " + e); e.printStackTrace(out); out.flush(); out.close(); return; } */ X500Principal p = new X500Principal(caDN); agentIdentity = (AgentIdentityService) support.getServiceBroker().getService(new CAIdentityClientImpl(p), AgentIdentityService.class, null); try { agentIdentity.acquire(null); } catch (Exception e) { out.println("Unable to generate CA key: " + e); e.printStackTrace(out); out.flush(); out.close(); return; } generateCaPolicy(attributeTable); out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">"); out.println("<html>"); out.println("<head>"); out.println("<title>CA key generation</title>"); out.println("</head>"); out.println("<body>"); out.println("<H2>CA key generation</H2>"); out.println("CA key has been generated.<br><br>"); out.println("CA private key has been stored in:<br>" + certificateCacheService.getKeyStorePath()); out.println("<br><br>CA certificate has been stored in:<br>" + certificateCacheService.getCaKeyStorePath()); out.println("<br></body></html>"); out.flush(); out.close(); } | 13209 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13209/bd8456fd3e3beb92f87bc43c49c6b8290dc865dc/CreateCaKeyServlet.java/buggy/certauthority/src/org/cougaar/core/security/certauthority/servlet/CreateCaKeyServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
741,
3349,
261,
2940,
18572,
225,
1111,
16,
12446,
400,
13,
565,
1216,
16517,
16,
14106,
225,
288,
565,
514,
3474,
12821,
273,
12,
780,
13,
3658,
18,
588,
1662,
2932,
12821,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
3349,
261,
2940,
18572,
225,
1111,
16,
12446,
400,
13,
565,
1216,
16517,
16,
14106,
225,
288,
565,
514,
3474,
12821,
273,
12,
780,
13,
3658,
18,
588,
1662,
2932,
12821,
... |
out.println("info." + setter + "(tightUnmarshalByteSequence(dataIn, bs));"); | out.println(" info." + setter + "(tightUnmarshalByteSequence(dataIn, bs));"); | protected void generateTightUnmarshalBodyForProperty(PrintWriter out, JProperty property, JAnnotationValue size) { out.print(" "); String setter = property.getSetter().getSimpleName(); String type = property.getType().getSimpleName(); if (type.equals("boolean")) { out.println("info." + setter + "(bs.readBoolean());"); } else if (type.equals("byte")) { out.println("info." + setter + "(dataIn.readByte());"); } else if (type.equals("char")) { out.println("info." + setter + "(dataIn.readChar());"); } else if (type.equals("short")) { out.println("info." + setter + "(dataIn.readShort());"); } else if (type.equals("int")) { out.println("info." + setter + "(dataIn.readInt());"); } else if (type.equals("long")) { out.println("info." + setter + "(tightUnmarshalLong(wireFormat, dataIn, bs));"); } else if (type.equals("String")) { out.println("info." + setter + "(tightUnmarshalString(dataIn, bs));"); } else if (type.equals("byte[]")) { if (size != null) { out.println("info." + setter + "(tightUnmarshalConstByteArray(dataIn, bs, "+ size.asInt() +"));"); } else { out.println("info." + setter + "(tightUnmarshalByteArray(dataIn, bs));"); } } else if (type.equals("ByteSequence")) { out.println("info." + setter + "(tightUnmarshalByteSequence(dataIn, bs));"); } else if (isThrowable(property.getType())) { out.println("info." + setter + "((" + property.getType().getQualifiedName() + ") tightUnmarsalThrowable(wireFormat, dataIn, bs));"); } else if (isCachedProperty(property)) { out.println("info." + setter + "((" + property.getType().getQualifiedName() + ") tightUnmarsalCachedObject(wireFormat, dataIn, bs));"); } else { out.println("info." + setter + "((" + property.getType().getQualifiedName() + ") tightUnmarsalNestedObject(wireFormat, dataIn, bs));"); } } | 11783 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11783/cd0fb615deb6accf8dfdc07fbe58b53cf6b972a2/OpenWireJavaMarshallingScript.java/buggy/activemq-core/src/gram/java/org/apache/activemq/openwire/tool/OpenWireJavaMarshallingScript.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
2103,
56,
750,
9593,
2250,
1290,
1396,
12,
5108,
2289,
596,
16,
804,
1396,
1272,
16,
804,
3257,
620,
963,
13,
288,
3639,
596,
18,
1188,
2932,
3639,
315,
1769,
3639,
514,
7794... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2103,
56,
750,
9593,
2250,
1290,
1396,
12,
5108,
2289,
596,
16,
804,
1396,
1272,
16,
804,
3257,
620,
963,
13,
288,
3639,
596,
18,
1188,
2932,
3639,
315,
1769,
3639,
514,
7794... |
void parseChildren(MITuple tuple, List aList) { MIResult[] results = tuple.getMIResults(); for (int i = 0; i < results.length; i++) { String var = results[i].getVariable(); if (var.equals("child")) { MIValue value = results[i].getMIValue(); if (value instanceof MITuple) { aList.add(new MIVar((MITuple)value)); | void parseChildren(MIValue val, List aList) { MIResult[] results = null; if (val instanceof MITuple) { results = ((MITuple)val).getMIResults(); } else if (val instanceof MIList) { results = ((MIList)val).getMIResults(); } if (results != null) { for (int i = 0; i < results.length; i++) { String var = results[i].getVariable(); if (var.equals("child")) { MIValue value = results[i].getMIValue(); if (value instanceof MITuple) { aList.add(new MIVar((MITuple)value)); } | void parseChildren(MITuple tuple, List aList) { MIResult[] results = tuple.getMIResults(); for (int i = 0; i < results.length; i++) { String var = results[i].getVariable(); if (var.equals("child")) { //$NON-NLS-1$ MIValue value = results[i].getMIValue(); if (value instanceof MITuple) { aList.add(new MIVar((MITuple)value)); } } } } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/0d24c793131595db414209353579f81af2de393e/MIVarListChildrenInfo.java/clean/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIVarListChildrenInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
1109,
4212,
12,
6068,
2268,
3193,
16,
987,
279,
682,
13,
288,
202,
202,
7492,
1253,
8526,
1686,
273,
3193,
18,
588,
7492,
3447,
5621,
202,
202,
1884,
261,
474,
277,
273,
374,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
1109,
4212,
12,
6068,
2268,
3193,
16,
987,
279,
682,
13,
288,
202,
202,
7492,
1253,
8526,
1686,
273,
3193,
18,
588,
7492,
3447,
5621,
202,
202,
1884,
261,
474,
277,
273,
374,... |
Object getChars ( ) { assert _state == CUR && _cur.isText(); Object src = _cur.getChars( -1 ); _offSrc = _cur._offSrc; _cchSrc = _cur._cchSrc; return src; } | 3520 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3520/c2050878358a3543cf38c8b9bf0a37703cce78e1/Saver.java/clean/src/store/org/apache/xmlbeans/impl/store/Saver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1033,
336,
7803,
261,
262,
3639,
288,
5411,
1815,
389,
2019,
422,
4706,
597,
389,
1397,
18,
291,
1528,
5621,
5411,
1033,
1705,
273,
389,
1397,
18,
588,
7803,
12,
300,
21,
11272,
13491,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
336,
7803,
261,
262,
3639,
288,
5411,
1815,
389,
2019,
422,
4706,
597,
389,
1397,
18,
291,
1528,
5621,
5411,
1033,
1705,
273,
389,
1397,
18,
588,
7803,
12,
300,
21,
11272,
13491,
... | ||
if ( fileName == null || fileName.length() <= 0 ) { fileName = getReport( request ); fileName = fileName.substring( 0, fileName.lastIndexOf( '.' ) ) + ".rptdocument"; } if ( fileName != null && fileName.length() > 0 ) { if ( isRelativePath( fileName ) ) { if ( fileName.startsWith( File.separator ) ) { fileName = workingFolder + fileName; } else { fileName = workingFolder + File.separator + fileName; } } } return fileName; | return filePath; | public static String getReportDocument( HttpServletRequest request ) { String fileName = getParameter( request, PARAM_REPORT_DOCUMENT ); if ( fileName == null ) { fileName = ""; //$NON-NLS-1$ } else { fileName = fileName.trim( ); } if ( fileName == null || fileName.length() <= 0 ) { fileName = getReport( request ); fileName = fileName.substring( 0, fileName.lastIndexOf( '.' ) ) + ".rptdocument"; //$NON-NLS-1$ } if ( fileName != null && fileName.length() > 0 ) { // Get absolute report location. if ( isRelativePath( fileName ) ) { if ( fileName.startsWith( File.separator ) ) { fileName = workingFolder + fileName; } else { fileName = workingFolder + File.separator + fileName; } } } return fileName; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/4f8d9ec70a9a4bdebe627870db17ed54ddb4e8ef/ParameterAccessor.java/buggy/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/utility/ParameterAccessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
22452,
2519,
12,
9984,
590,
262,
202,
95,
202,
202,
780,
3968,
273,
5575,
12,
590,
16,
4655,
67,
22710,
67,
18450,
11272,
9506,
202,
430,
261,
3968,
422,
446,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
22452,
2519,
12,
9984,
590,
262,
202,
95,
202,
202,
780,
3968,
273,
5575,
12,
590,
16,
4655,
67,
22710,
67,
18450,
11272,
9506,
202,
430,
261,
3968,
422,
446,
262,
... |
private void recursecheckTreeIntegrity(int node) { if (nodeIsTerminal(node) && (taxonNumberOfNode(node)<0)) { System.out.println("*Error in tree " + getName() + ": terminal node with number 0; node= " + Integer.toString(node) + " (taxa: " + taxa.getName()+ ")]"); dump(); System.out.println(outputcheckTreeIntegrity(root)); } if (!nodeIsTerminal(node) && (taxonNumberOfNode(node)>=0)) { System.out.println("*Error in tree " + getName() + ": internal node with number non zero; node= " + Integer.toString(node) + " (taxa: " + taxa.getName()+ ")]"); dump(); System.out.println(outputcheckTreeIntegrity(root)); } if (!daughterOf(node, motherOfNode(node))) { System.out.println("*Error in tree " + getName() + ": node is not mother's daughter; node= " + Integer.toString(node) + " (taxa: " + taxa.getName()+ ")]"); dump(); System.out.println(outputcheckTreeIntegrity(root)); } if (node!=root) if (!daughterOf(motherOfNode(node), motherOfNode(motherOfNode(node)))) { System.out.println("*Error in tree " + getName() + ": mother is not grandmother's daughter; node= " + Integer.toString(node) + " (taxa: " + taxa.getName()+ ")]"); dump(); System.out.println(outputcheckTreeIntegrity(root)); } int thisSister = firstDaughterOfNode(node); while (nodeExists(thisSister)) { recursecheckTreeIntegrity(thisSister); thisSister = nextSisterOfNode(thisSister); } } | 56479 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56479/c150b559bc39c5d510d0bbd29c1d04982a6173bb/MesquiteTree.java/buggy/Source/mesquite/lib/MesquiteTree.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
11502,
1893,
2471,
30669,
12,
474,
756,
13,
288,
202,
202,
430,
261,
2159,
2520,
11336,
12,
2159,
13,
597,
261,
8066,
265,
9226,
907,
12,
2159,
13,
32,
20,
3719,
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,
1152,
918,
11502,
1893,
2471,
30669,
12,
474,
756,
13,
288,
202,
202,
430,
261,
2159,
2520,
11336,
12,
2159,
13,
597,
261,
8066,
265,
9226,
907,
12,
2159,
13,
32,
20,
3719,
288,
... | ||
public int compare(Object o1, Object o2) { EnrollmentDecorator enr1 = (EnrollmentDecorator)o1; EnrollmentDecorator enr2 = (EnrollmentDecorator)o2; | public int compare(EnrollmentDecorator enr1, EnrollmentDecorator enr2) { | public int compare(Object o1, Object o2) { EnrollmentDecorator enr1 = (EnrollmentDecorator)o1; EnrollmentDecorator enr2 = (EnrollmentDecorator)o2; CourseSection section1 = (CourseSection)enr1.getCategoryToSectionMap().get(categoryId); CourseSection section2 = (CourseSection)enr2.getCategoryToSectionMap().get(categoryId); if(section1 == null && section2 != null) { return sortAscending ? -1 : 1; } if(section1 != null && section2 == null) { return sortAscending ? 1 : -1; } if(section1 == null && section2 == null) { return getNameComparator(sortAscending).compare(o1, o2); } int comparison = 0; if(section1.getTitle().equals(section2.getTitle())) { // Use the student name for comparison if the titles are equal comparison = enr1.getUser().getUserUid().compareTo(enr2.getUser().getSortName()); } else { // Use the section title for comparison if the titles are different comparison = section1.getTitle().compareTo(section2.getTitle()); } return sortAscending ? comparison : (-1 * comparison); } | 2021 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2021/c73dec0fd0c50168bcccf1a48e6c34ab05a09b43/EnrollmentDecorator.java/buggy/sections/sections-app/src/java/org/sakaiproject/tool/section/decorator/EnrollmentDecorator.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,
664,
17118,
10361,
570,
86,
21,
273,
261,
664,
17118,
10361,
13,
83,
21,
31,
9506,
202,
664,
17118,
1036... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
664,
17118,
10361,
570,
86,
21,
273,
261,
664,
17118,
10361,
13,
83,
21,
31,
9506,
202,
664,
17118,
1036... |
data.widthHint = SIZING_LISTS_WIDTH; data.heightHint = SIZING_LISTS_HEIGHT; | int availableRows = Dialog.availableRows(parent); if(availableRows > 50){ data.heightHint = SIZING_LISTS_HEIGHT; } else{ data.heightHint = availableRows * 3; } | public void createControl(Composite parent) { Font font = parent.getFont(); // create composite for page. Composite outerContainer = new Composite(parent, SWT.NONE); outerContainer.setLayout(new GridLayout()); outerContainer.setLayoutData(new GridData( GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); outerContainer.setFont(font); Label messageLabel = new Label(outerContainer,SWT.NONE); messageLabel.setText(message); messageLabel.setFont(font); //Create a table for the list Table table = new Table(outerContainer, SWT.BORDER); GridData data = new GridData(GridData.FILL_BOTH); data.widthHint = SIZING_LISTS_WIDTH; data.heightHint = SIZING_LISTS_HEIGHT; table.setLayoutData(data); table.setFont(font); // the list viewer wizardSelectionViewer = new TableViewer(table); wizardSelectionViewer.setContentProvider(new WorkbenchContentProvider()); wizardSelectionViewer.setLabelProvider(new WorkbenchLabelProvider()); wizardSelectionViewer.setSorter(new WorkbenchViewerSorter()); wizardSelectionViewer.addSelectionChangedListener(this); wizardSelectionViewer.addDoubleClickListener(this); wizardSelectionViewer.setInput(wizardElements); restoreWidgetValues(); setControl(outerContainer);} | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/c3096f43946ed4cf4aeef3ed7bf00c155797a68f/WorkbenchWizardListSelectionPage.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchWizardListSelectionPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
752,
3367,
12,
9400,
982,
13,
288,
202,
202,
5711,
3512,
273,
982,
18,
588,
5711,
5621,
202,
759,
752,
9635,
364,
1363,
18,
202,
9400,
6390,
2170,
273,
394,
14728,
12,
2938,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
752,
3367,
12,
9400,
982,
13,
288,
202,
202,
5711,
3512,
273,
982,
18,
588,
5711,
5621,
202,
759,
752,
9635,
364,
1363,
18,
202,
9400,
6390,
2170,
273,
394,
14728,
12,
2938,
16,
... |
throw new IndexError(getRuntime(), "Index too large"); | throw getRuntime().newIndexError("Index too large"); | public IRubyObject aset(IRubyObject[] args) { int argc = checkArgumentCount(args, 2, 3); if (argc == 3) { long beg = RubyNumeric.fix2long(args[0]); long len = RubyNumeric.fix2long(args[1]); replace(beg, len, args[2]); return args[2]; } if (args[0] instanceof RubyFixnum) { store(RubyNumeric.fix2long(args[0]), args[1]); return args[1]; } if (args[0] instanceof RubyRange) { long[] begLen = ((RubyRange) args[0]).getBeginLength(getLength(), false, true); replace(begLen[0], begLen[1], args[1]); return args[1]; } if (args[0] instanceof RubyBignum) { throw new IndexError(getRuntime(), "Index too large"); } store(RubyNumeric.num2long(args[0]), args[1]); return args[1]; } | 46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyArray.java/buggy/src/org/jruby/RubyArray.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
487,
278,
12,
7937,
10340,
921,
8526,
833,
13,
288,
3639,
509,
1501,
71,
273,
10788,
1380,
12,
1968,
16,
576,
16,
890,
1769,
3639,
309,
261,
3175,
71,
422,
890,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15908,
10340,
921,
487,
278,
12,
7937,
10340,
921,
8526,
833,
13,
288,
3639,
509,
1501,
71,
273,
10788,
1380,
12,
1968,
16,
576,
16,
890,
1769,
3639,
309,
261,
3175,
71,
422,
890,... |
} else { x = false; } } if (!(y.elems == null && z.elems == null)) { if (y.elems != null && z.elems != null && (z.elems.size() == y.elems.size())) { for (int i = 0; i < z.elems.size(); i++) { x = x && ((Boolean)z.elems.elementAt(i).accept(this, y.elems.elementAt(i))).booleanValue(); | } if (!(y.elems == null && z.elems == null)) { if (y.elems != null && z.elems != null && (z.elems.size() == y.elems.size())) { for (int i = 0; i < z.elems.size(); i++) { x = x && ((Boolean) z.elems.elementAt(i).accept( this, y.elems.elementAt(i))).booleanValue(); } } else { x = false; | public Object visitCompilationUnit(CompilationUnit y, Object o) { Boolean _tmp = (Boolean)prep(y,o); if (_tmp!=null) return _tmp; if (!(o instanceof CompilationUnit)) return new Boolean(false); boolean x = true; CompilationUnit z = (CompilationUnit)o; x = x && (y.pkgName == null && z.pkgName == null || (y.pkgName != null && z.pkgName != null && ((Boolean)(y.pkgName.accept(this, z.pkgName))).booleanValue())); if (!(y.lexicalPragmas == null && z.lexicalPragmas == null)) { if (y.lexicalPragmas != null && z.lexicalPragmas != null && (z.lexicalPragmas.size() == y.lexicalPragmas.size())) { for (int i = 0; i < z.lexicalPragmas.size(); i++) { x = x && ((Boolean)z.lexicalPragmas.elementAt(i).accept(this, y.lexicalPragmas.elementAt(i))).booleanValue(); } } else { x = false; } } if (!(y.imports == null && z.imports == null)) { if (y.imports != null && z.imports != null && (z.imports.size() == y.imports.size())) { for (int i = 0; i < z.imports.size(); i++) { x = x && ((Boolean)z.imports.elementAt(i).accept(this, y.imports.elementAt(i))).booleanValue(); } } else { x = false; } } if (!(y.elems == null && z.elems == null)) { if (y.elems != null && z.elems != null && (z.elems.size() == y.elems.size())) { for (int i = 0; i < z.elems.size(); i++) { x = x && ((Boolean)z.elems.elementAt(i).accept(this, y.elems.elementAt(i))).booleanValue(); } } else { x = false; } } return new Boolean(x); } | 46634 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46634/88c3a23ce6920080a820fcffe73c2469f7571ad9/EqualityVisitorSuper.java/buggy/src/escjava/trunk/ESCTools/Rcc/java/rcc/ast/EqualityVisitorSuper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
1033,
3757,
19184,
2802,
12,
19184,
2802,
677,
16,
1033,
320,
13,
288,
1377,
3411,
389,
5645,
273,
261,
5507,
13,
19109,
12,
93,
16,
83,
1769,
1377,
309,
261,
67,
5645,
5,
33,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
1033,
3757,
19184,
2802,
12,
19184,
2802,
677,
16,
1033,
320,
13,
288,
1377,
3411,
389,
5645,
273,
261,
5507,
13,
19109,
12,
93,
16,
83,
1769,
1377,
309,
261,
67,
5645,
5,
33,
2... |
argcls[i] = name.getClass(); | argcls[i] = name.getClass(); | public int callMember(String appletID, String name, StringBuffer value, java.util.List args) { Object [] objs = getObjectField(appletID, name); if(objs == null) return JError; try { Main.debug("callMember: " + name); Object obj; Class c = objs[0].getClass(); String type; Class [] argcls = new Class[args.size()]; for (int i = 0; i < args.size(); i++) argcls[i] = name.getClass(); // String for now Method m = findMethod(c, (String) objs[1], argcls); Object [] argobj = new Object[args.size()]; for (int i = 0; i < args.size(); i++) argobj[i] = args.get(i); //for now Object retval = m.invoke(objs[0], argobj); if (retval == null) return JVoid; // void return getTypedValue(retval, value); } catch (Exception e) { Main.debug("callMember throwed exception: " + e.toString()); e.printStackTrace(); } return JError; } | 1818 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1818/78f14736dea83c836b3fc5b8a0e71bc6bce07272/KJASAppletContext.java/clean/khtml/java/org/kde/kjas/server/KJASAppletContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
745,
4419,
12,
780,
21853,
734,
16,
514,
508,
16,
6674,
460,
16,
2252,
18,
1367,
18,
682,
833,
13,
565,
288,
3639,
1033,
5378,
12721,
273,
6455,
974,
12,
438,
1469,
734,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
745,
4419,
12,
780,
21853,
734,
16,
514,
508,
16,
6674,
460,
16,
2252,
18,
1367,
18,
682,
833,
13,
565,
288,
3639,
1033,
5378,
12721,
273,
6455,
974,
12,
438,
1469,
734,
16... |
fRestrictedRedefinedGroupRegistry.put(fTargetNSURIString+","+oldName, new Boolean(true)); | fRestrictedRedefinedGroupRegistry.put(fTargetNSURIString+","+restrictedName, new Boolean(true)); | private boolean validateRedefineNameChange(String eltLocalname, String oldName, String newName, Element child) throws Exception { if (eltLocalname.equals(SchemaSymbols.ELT_SIMPLETYPE)) { QName processedTypeName = new QName(-1, fStringPool.addSymbol(oldName), fStringPool.addSymbol(oldName), fTargetNSURI); Element grandKid = XUtil.getFirstChildElement(child); if (grandKid == null) { fRedefineSucceeded = false; // REVISIT: Localize reportGenericSchemaError("a simpleType child of a <redefine> must have a restriction element as a child"); } else { String grandKidName = grandKid.getLocalName(); if(grandKidName.equals(SchemaSymbols.ELT_ANNOTATION)) { grandKid = XUtil.getNextSiblingElement(grandKid); grandKidName = grandKid.getLocalName(); } if (grandKid == null) { fRedefineSucceeded = false; // REVISIT: Localize reportGenericSchemaError("a simpleType child of a <redefine> must have a restriction element as a child"); } else if(!grandKidName.equals(SchemaSymbols.ELT_RESTRICTION)) { fRedefineSucceeded = false; // REVISIT: Localize reportGenericSchemaError("a simpleType child of a <redefine> must have a restriction element as a child"); } else { String derivedBase = grandKid.getAttribute( SchemaSymbols.ATT_BASE ); QName processedDerivedBase = parseBase(derivedBase); if(!processedTypeName.equals(processedDerivedBase)) { fRedefineSucceeded = false; // REVISIT: Localize reportGenericSchemaError("the base attribute of the restriction child of a simpleType child of a redefine must have the same value as the simpleType's type attribute"); } else { // now we have to do the renaming... String prefix = ""; int colonptr = derivedBase.indexOf(":"); if ( colonptr > 0) prefix = derivedBase.substring(0,colonptr) + ":"; grandKid.setAttribute( SchemaSymbols.ATT_BASE, prefix + newName ); return true; } } } } else if (eltLocalname.equals(SchemaSymbols.ELT_COMPLEXTYPE)) { QName processedTypeName = new QName(-1, fStringPool.addSymbol(oldName), fStringPool.addSymbol(oldName), fTargetNSURI); Element grandKid = XUtil.getFirstChildElement(child); if (grandKid == null) { fRedefineSucceeded = false; // REVISIT: Localize reportGenericSchemaError("a complexType child of a <redefine> must have a restriction or extension element as a grandchild"); } else { if(grandKid.getLocalName().equals(SchemaSymbols.ELT_ANNOTATION)) { grandKid = XUtil.getNextSiblingElement(grandKid); } if (grandKid == null) { fRedefineSucceeded = false; // REVISIT: Localize reportGenericSchemaError("a complexType child of a <redefine> must have a restriction or extension element as a grandchild"); } else { // have to go one more level down; let another pass worry whether complexType is valid. Element greatGrandKid = XUtil.getFirstChildElement(grandKid); if (greatGrandKid == null) { fRedefineSucceeded = false; // REVISIT: Localize reportGenericSchemaError("a complexType child of a <redefine> must have a restriction or extension element as a grandchild"); } else { String greatGrandKidName = greatGrandKid.getLocalName(); if(greatGrandKidName.equals(SchemaSymbols.ELT_ANNOTATION)) { greatGrandKid = XUtil.getNextSiblingElement(greatGrandKid); greatGrandKidName = greatGrandKid.getLocalName(); } if (greatGrandKid == null) { fRedefineSucceeded = false; // REVISIT: Localize reportGenericSchemaError("a complexType child of a <redefine> must have a restriction or extension element as a grandchild"); } else if(!greatGrandKidName.equals(SchemaSymbols.ELT_RESTRICTION) && !greatGrandKidName.equals(SchemaSymbols.ELT_EXTENSION)) { fRedefineSucceeded = false; // REVISIT: Localize reportGenericSchemaError("a complexType child of a <redefine> must have a restriction or extension element as a grandchild"); } else { String derivedBase = greatGrandKid.getAttribute( SchemaSymbols.ATT_BASE ); QName processedDerivedBase = parseBase(derivedBase); if(!processedTypeName.equals(processedDerivedBase)) { fRedefineSucceeded = false; // REVISIT: Localize reportGenericSchemaError("the base attribute of the restriction or extension grandchild of a complexType child of a redefine must have the same value as the complexType's type attribute"); } else { // now we have to do the renaming... String prefix = ""; int colonptr = derivedBase.indexOf(":"); if ( colonptr > 0) prefix = derivedBase.substring(0,colonptr) + ":"; greatGrandKid.setAttribute( SchemaSymbols.ATT_BASE, prefix + newName ); return true; } } } } } } else if (eltLocalname.equals(SchemaSymbols.ELT_ATTRIBUTEGROUP)) { QName processedBaseName = new QName(-1, fStringPool.addSymbol(oldName), fStringPool.addSymbol(oldName), fTargetNSURI); int attGroupRefsCount = changeRedefineGroup(processedBaseName, eltLocalname, newName, child); if(attGroupRefsCount > 1) { fRedefineSucceeded = false; // REVISIT: localize reportGenericSchemaError("if an attributeGroup child of a <redefine> element contains an attributeGroup ref'ing itself, it must have exactly 1; this one has " + attGroupRefsCount); } else if (attGroupRefsCount == 1) { return true; } else fRedefineAttributeGroupMap.put(oldName, newName); } else if (eltLocalname.equals(SchemaSymbols.ELT_GROUP)) { QName processedBaseName = new QName(-1, fStringPool.addSymbol(oldName), fStringPool.addSymbol(oldName), fTargetNSURI); int groupRefsCount = changeRedefineGroup(processedBaseName, eltLocalname, newName, child); if(!fRedefineSucceeded) { fRestrictedRedefinedGroupRegistry.put(fTargetNSURIString+","+oldName, new Boolean(false)); } if(groupRefsCount > 1) { fRedefineSucceeded = false; fRestrictedRedefinedGroupRegistry.put(fTargetNSURIString+","+oldName, new Boolean(false)); // REVISIT: localize reportGenericSchemaError("if a group child of a <redefine> element contains a group ref'ing itself, it must have exactly 1; this one has " + groupRefsCount); } else if (groupRefsCount == 1) { fRestrictedRedefinedGroupRegistry.put(fTargetNSURIString+","+oldName, new Boolean(false)); return true; } else { fGroupNameRegistry.put(fTargetNSURIString + "," + oldName, newName); fRestrictedRedefinedGroupRegistry.put(fTargetNSURIString+","+oldName, new Boolean(true)); } } else { fRedefineSucceeded = false; // REVISIT: Localize reportGenericSchemaError("internal Xerces error; please submit a bug with schema as testcase"); } // if we get here then we must have reported an error and failed somewhere... return false; } // validateRedefineNameChange | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/b46c36ebcbb2de3ea2d6e5e522451ca58133dcb4/TraverseSchema.java/buggy/src/org/apache/xerces/validators/schema/TraverseSchema.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
1954,
426,
11255,
461,
3043,
12,
780,
11572,
2042,
529,
16,
514,
22916,
16,
514,
13253,
16,
3010,
1151,
13,
1216,
1185,
288,
3639,
309,
261,
20224,
2042,
529,
18,
14963,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
1954,
426,
11255,
461,
3043,
12,
780,
11572,
2042,
529,
16,
514,
22916,
16,
514,
13253,
16,
3010,
1151,
13,
1216,
1185,
288,
3639,
309,
261,
20224,
2042,
529,
18,
14963,
12,
... |
methodClass.defineMethod("arity", arity); methodClass.defineMethod("[]", call); methodClass.defineMethod("call", call); | methodClass.defineMethod("arity", arity); methodClass.defineMethod("[]", call); methodClass.defineMethod("call", call); | public static RubyClass createMethodClass(Ruby ruby) { RubyCallbackMethod arity = new ReflectionCallbackMethod(RubyMethod.class, "arity"); RubyCallbackMethod call = new ReflectionCallbackMethod(RubyMethod.class, "call", true); RubyClass methodClass = ruby.defineClass("Method", ruby.getClasses().getObjectClass()); methodClass.defineMethod("arity", arity); methodClass.defineMethod("[]", call); methodClass.defineMethod("call", call); return methodClass; } | 46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyMethod.java/buggy/org/jruby/RubyMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
19817,
797,
752,
1305,
797,
12,
54,
10340,
22155,
13,
288,
202,
202,
54,
10340,
2428,
1305,
19353,
273,
1082,
202,
2704,
5685,
2428,
1305,
12,
54,
10340,
1305,
18,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19817,
797,
752,
1305,
797,
12,
54,
10340,
22155,
13,
288,
202,
202,
54,
10340,
2428,
1305,
19353,
273,
1082,
202,
2704,
5685,
2428,
1305,
12,
54,
10340,
1305,
18,
1106,
... |
byte buf[] = new byte[32*1024]; | byte buf[] = new byte[8*1024]; | public void run() { long lastRead = System.currentTimeMillis(); long now = lastRead; try { InputStream in = _socket.getInputStream(); byte buf[] = new byte[32*1024]; int read = 0; while ( (read = in.read(buf)) != -1) { now = System.currentTimeMillis(); _totalReceived += read; _context.statManager().addRateData("swarm." + getConnectionId() + ".totalReceived", _totalReceived, 0); _log.debug("Receiving " + _connectionId + " with " + read + " after " + (now-lastRead)); lastRead = now; } } catch (Exception e) { _log.error("Error listening to the flood", e); } } | 45677 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45677/a2c7c5a5169ba52abc4f332f800367e4b5ac2a0c/TestSwarm.java/clean/apps/ministreaming/java/src/net/i2p/client/streaming/TestSwarm.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
1086,
1435,
288,
7734,
1525,
1142,
1994,
273,
2332,
18,
2972,
28512,
5621,
7734,
1525,
2037,
273,
1142,
1994,
31,
7734,
775,
288,
10792,
5037,
316,
273,
389,
7814,
18,
588,
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,
2398,
1071,
918,
1086,
1435,
288,
7734,
1525,
1142,
1994,
273,
2332,
18,
2972,
28512,
5621,
7734,
1525,
2037,
273,
1142,
1994,
31,
7734,
775,
288,
10792,
5037,
316,
273,
389,
7814,
18,
588,
43... |
List condList = new LinkedList(); | List condList = FastList.newInstance(); | public static List readSubConditions(ModelMenuItem modelMenuItem, Element conditionElement) { List condList = new LinkedList(); List subElementList = UtilXml.childElementList(conditionElement); Iterator subElementIter = subElementList.iterator(); while (subElementIter.hasNext()) { Element subElement = (Element) subElementIter.next(); condList.add(readCondition(modelMenuItem, subElement)); } return condList; } | 45953 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45953/bea65ea45beef59c08af0af4f4e416e0f35e2523/ModelMenuCondition.java/buggy/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
987,
855,
1676,
8545,
12,
1488,
12958,
938,
12958,
16,
3010,
2269,
1046,
13,
288,
3639,
987,
6941,
682,
273,
9545,
682,
18,
2704,
1442,
5621,
3639,
987,
720,
1046,
682,
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,
760,
987,
855,
1676,
8545,
12,
1488,
12958,
938,
12958,
16,
3010,
2269,
1046,
13,
288,
3639,
987,
6941,
682,
273,
9545,
682,
18,
2704,
1442,
5621,
3639,
987,
720,
1046,
682,
273,
... |
return node.getFirstParentOfType(ASTMethodDeclaration.class) == null ? "" : ((MethodScope) node.getScope().getEnclosingMethodScope()).getName(); | return methodName; | public String getMethodName() { return node.getFirstParentOfType(ASTMethodDeclaration.class) == null ? "" : ((MethodScope) node.getScope().getEnclosingMethodScope()).getName(); } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/04ab35e4ab798ef548e76adbea901c7ea75b12f2/RuleViolation.java/buggy/pmd/src/net/sourceforge/pmd/RuleViolation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
26058,
1435,
288,
3639,
327,
4918,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
26058,
1435,
288,
3639,
327,
4918,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
UnicodeSet temp = cldrfile.getExemplarSet("standard"); | UnicodeSet temp = resolvedFile.getExemplarSet("standard"); | public CheckCLDR setCldrFileToCheck(CLDRFile cldrfile, List possibleErrors) { if (cldrfile == null) return this; skip = true; super.setCldrFileToCheck(cldrfile, possibleErrors); if (cldrfile.getLocaleID().equals("root")) { return this; } exemplars = cldrfile.getExemplarSet(""); if (exemplars == null) { CheckStatus item = new CheckStatus().setType(CheckStatus.errorType) .setMessage("Failure to Initialize: {0} (need resolved locale)", new Object[]{this.getClass().getName()}); possibleErrors.add(item); return this; } UnicodeSet temp = cldrfile.getExemplarSet("standard"); if (temp != null) exemplars.addAll(temp); UnicodeSet auxiliary = cldrfile.getExemplarSet("auxiliary"); if (auxiliary != null) exemplars.addAll(auxiliary); exemplars.addAll(commonAndInherited); skip = false; return this; } | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/16857eb6dbf01991146a0b2e8a7ae854ac996b85/CheckForExemplars.java/clean/tools/java/org/unicode/cldr/test/CheckForExemplars.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2073,
5017,
6331,
11440,
14796,
812,
18126,
12,
5017,
6331,
812,
927,
3069,
768,
16,
987,
3323,
4229,
13,
288,
202,
202,
430,
261,
830,
3069,
768,
422,
446,
13,
327,
333,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2073,
5017,
6331,
11440,
14796,
812,
18126,
12,
5017,
6331,
812,
927,
3069,
768,
16,
987,
3323,
4229,
13,
288,
202,
202,
430,
261,
830,
3069,
768,
422,
446,
13,
327,
333,
31,
... |
protected abstract VersionArtifactMetadata retrieveFromRemoteRepository( Artifact artifact, ArtifactRepository remoteRepository, VersionArtifactMetadata localMetadata ) throws ArtifactMetadataRetrievalException; | protected VersionArtifactMetadata retrieveFromRemoteRepository( Artifact artifact, ArtifactRepository remoteRepository, VersionArtifactMetadata localMetadata ) throws ArtifactMetadataRetrievalException, ResourceDoesNotExistException { AbstractVersionArtifactMetadata metadata = createMetadata( artifact ); metadata.retrieveFromRemoteRepository( remoteRepository, wagonManager ); return metadata; } | protected abstract VersionArtifactMetadata retrieveFromRemoteRepository( Artifact artifact, ArtifactRepository remoteRepository, VersionArtifactMetadata localMetadata ) throws ArtifactMetadataRetrievalException; | 11530 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11530/6f81043b7bb808d0e2bbf036a7c9edc1ec44f2cd/AbstractVersionTransformation.java/buggy/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/AbstractVersionTransformation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
8770,
4049,
7581,
2277,
4614,
1265,
5169,
3305,
12,
14022,
6462,
16,
28524,
2398,
14022,
3305,
2632,
3305,
16,
28524,
2398,
4049,
7581,
2277,
1191,
2277,
262,
3639,
1216,
14022,
2277,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
8770,
4049,
7581,
2277,
4614,
1265,
5169,
3305,
12,
14022,
6462,
16,
28524,
2398,
14022,
3305,
2632,
3305,
16,
28524,
2398,
4049,
7581,
2277,
1191,
2277,
262,
3639,
1216,
14022,
2277,
... |
jj_la = xla; jj_lastpos = jj_scanpos = token; boolean retval = !jj_3_117(); jj_save(116, xla); return retval; } | jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_117(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(116, xla); } } | static final private boolean jj_2_117(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; boolean retval = !jj_3_117(); jj_save(116, xla); return retval; } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/23e69d576250f417c265d779703b8da08a67aaed/CPPParser.java/clean/pmd/src/net/sourceforge/pmd/cpd/cppast/CPPParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
727,
3238,
1250,
10684,
67,
22,
67,
23454,
12,
474,
619,
11821,
13,
288,
3639,
10684,
67,
11821,
273,
619,
11821,
31,
3639,
10684,
67,
2722,
917,
273,
10684,
67,
9871,
917,
273,
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,
377,
760,
727,
3238,
1250,
10684,
67,
22,
67,
23454,
12,
474,
619,
11821,
13,
288,
3639,
10684,
67,
11821,
273,
619,
11821,
31,
3639,
10684,
67,
2722,
917,
273,
10684,
67,
9871,
917,
273,
11... |
getRandomSpeed(speed); particles[i].recreateParticle(speed, getRandomLifeSpan()); | getRandomSpeed(particleSpeed); particles[i].recreateParticle(particleSpeed, getRandomLifeSpan()); | public void update(float secondsPassed) { secondsPassed *= getSpeed(); if (isActive()) { currentTime += secondsPassed; if (currentTime >= getMinTime() && currentTime <= getMaxTime()) { Vector3f speed = new Vector3f(); if (controlFlow) { if (currentTime - releaseTime > 1000.0) { released = 0; releaseTime = currentTime; } particlesToCreate = (int) ( (float) releaseRate * secondsPassed * (1.0f + releaseVariance * (FastMath.nextRandomFloat() - 0.5f))); if (particlesToCreate <= 0) particlesToCreate = 1; if (releaseRate - released <= 0) particlesToCreate = 0; } int i = 0; while (i < noParticles) { if (particles[i].updateAndCheck(secondsPassed) && (!controlFlow || particlesToCreate > 0)) { if (particles[i].status == RenParticle.DEAD && getRepeatType() == RT_CLAMP) { ; } else { if (controlFlow) { released++; particlesToCreate--; } getRandomSpeed(speed); particles[i].recreateParticle(speed, getRandomLifeSpan()); particles[i].status = RenParticle.ALIVE; switch (getGeometry()) { case 1: particles[i].initialLocation.set(getLine().random()); break; case 2: particles[i].initialLocation.set(getRectangle().random()); break; default: particles[i].initialLocation.set(originCenter); break; } particles[i].location.set(particles[i].initialLocation); particles[i].updateVerts(); } } i++; } particlesGeometry.setVertices(geometryCoordinates); particlesGeometry.setColors(appearanceColors); } } } | 19503 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19503/c194f5f13060d42e9bad1df9b12ae08aebc688d1/RenParticleManager.java/buggy/src/com/jme/effects/RenParticleManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1089,
12,
5659,
3974,
22530,
13,
288,
565,
3974,
22530,
6413,
1322,
5868,
5621,
565,
309,
261,
291,
3896,
10756,
288,
1377,
6680,
1011,
3974,
22530,
31,
1377,
309,
261,
2972,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1089,
12,
5659,
3974,
22530,
13,
288,
565,
3974,
22530,
6413,
1322,
5868,
5621,
565,
309,
261,
291,
3896,
10756,
288,
1377,
6680,
1011,
3974,
22530,
31,
1377,
309,
261,
2972,
9... |
m_excludePackages.add(excludePackage + "."); | m_excludePackages.add(excludePackage + '.'); | public void addExcludePackage(final String excludePackage) { synchronized (m_excludePackages) { m_excludePackages.add(excludePackage + "."); } } | 7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/e87104257d4f708d3e516de07f3fc9f815bf5018/SystemDefinition.java/clean/aspectwerkz2/src/main/org/codehaus/aspectwerkz/definition/SystemDefinition.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
12689,
2261,
12,
6385,
514,
4433,
2261,
13,
288,
3639,
3852,
261,
81,
67,
10157,
11425,
13,
288,
5411,
312,
67,
10157,
11425,
18,
1289,
12,
10157,
2261,
397,
2611,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
12689,
2261,
12,
6385,
514,
4433,
2261,
13,
288,
3639,
3852,
261,
81,
67,
10157,
11425,
13,
288,
5411,
312,
67,
10157,
11425,
18,
1289,
12,
10157,
2261,
397,
2611,
1769,
... |
text.clear(); | setPrevious(text); | public void startElement( String namespace, String name, String qname, Attributes attributes) throws SAXException { // calculate number of real attributes: // don't store namespace declarations int attrLength = attributes.getLength(); String attrQName; String attrNS; for (int i = 0; i < attributes.getLength(); i++) { attrNS = attributes.getURI(i); attrQName = attributes.getQName(i); if (attrQName.startsWith("xmlns") || attrNS.equals(Serializer.EXIST_NS)) --attrLength; } ElementImpl last = null; ElementImpl node = null; int p = qname.indexOf(':'); String prefix = (p != Constants.STRING_NOT_FOUND) ? qname.substring(0, p) : ""; QName qn = broker.getSymbols().getQName(Node.ELEMENT_NODE, namespace, name, prefix); if (!stack.empty()) { last = (ElementImpl) stack.peek(); if (charBuf != null) { if(charBuf.isWhitespaceOnly()) { if (suppressWSmixed) { if(charBuf.length() > 0 && last.getChildCount() > 0) { text.setData(charBuf); text.setOwnerDocument(document); last.appendChildInternal(prevNode, text); prevNode = text; if (!validate) storeText(); text.clear(); } } } else if(charBuf.length() > 0) { // mixed element content: don't normalize the text node, just check // if there is any text at all text.setData(charBuf); text.setOwnerDocument(document); last.appendChildInternal(prevNode, text); prevNode = text; if (!validate) storeText(); text.clear(); } charBuf.reset(); } if (!usedElements.isEmpty()) { node = (ElementImpl) usedElements.pop(); node.setNodeName(qn); } else node = new ElementImpl(qn); // copy xml:space setting node.setPreserveSpace(last.preserveSpace()); // append the node to its parent // (computes the node id and updates the parent's child count) last.appendChildInternal(prevNode, node); prevNode = null; node.setOwnerDocument(document); node.setAttributes((short) attrLength); if (nsMappings != null && nsMappings.size() > 0) { node.setNamespaceMappings(nsMappings); nsMappings.clear(); } stack.push(node); currentPath.addComponent(qn); node.setPosition(elementCnt++); if (!validate) { if (childCnt != null) node.setChildCount(childCnt[node.getPosition()]); storeElement(node); } } else { if (validate) node = new ElementImpl(0, qn); else node = new ElementImpl(1, qn); rootNode = node; prevNode = null; node.setNodeId(broker.getBrokerPool().getNodeFactory().createInstance()); node.setOwnerDocument(document); node.setAttributes((short) attrLength); if (nsMappings != null && nsMappings.size() > 0) { node.setNamespaceMappings(nsMappings); nsMappings.clear(); } stack.push(node); currentPath.addComponent(qn); node.setPosition(elementCnt++); if (!validate) { if (childCnt != null) node.setChildCount(childCnt[node.getPosition()]); storeElement(node); } document.appendChild(node); } level++; if (document.getMaxDepth() < level) document.setMaxDepth(level); String attrPrefix; String attrLocalName; for (int i = 0; i < attributes.getLength(); i++) { attrNS = attributes.getURI(i); attrLocalName = attributes.getLocalName(i); attrQName = attributes.getQName(i); // skip xmlns-attributes and attributes in eXist's namespace if (attrQName.startsWith("xmlns") || attrNS.equals(Serializer.EXIST_NS)) --attrLength; else { p = attrQName.indexOf(':'); attrPrefix = (p != Constants.STRING_NOT_FOUND) ? attrQName.substring(0, p) : null; final AttrImpl attr = (AttrImpl)NodeObjectPool.getInstance().borrowNode(AttrImpl.class); attr.setNodeName(document.getSymbols().getQName(Node.ATTRIBUTE_NODE, attrNS, attrLocalName, attrPrefix)); attr.setValue(attributes.getValue(i)); attr.setOwnerDocument(document); if (attributes.getType(i).equals(ATTR_ID_TYPE)) { attr.setType(AttrImpl.ID); } else if (attr.getQName().equalsSimple(Namespaces.XML_ID_QNAME)) { // an xml:id attribute. Normalize the attribute and set its type to ID attr.setValue(StringValue.trimWhitespace(StringValue.collapseWhitespace(attr.getValue()))); if (!XMLChar.isValidNCName(attr.getValue())) throw new SAXException("Value of xml:id attribute is not a valid NCName: " + attr.getValue()); attr.setType(AttrImpl.ID); } else if (attr.getQName().equalsSimple(Namespaces.XML_SPACE_QNAME)) { node.setPreserveSpace("preserve".equals(attr.getValue())); } node.appendChildInternal(prevNode, attr); prevNode = attr; if (!validate) broker.storeNode(transaction, attr, currentPath); attr.release(); } } if (attrLength > 0) node.setAttributes((short) attrLength); // notify observers about progress every 100 lines if (locator != null) { currentLine = locator.getLineNumber(); if (!validate) { progress.setValue(currentLine); if (progress.changed()) { setChanged(); notifyObservers(progress); } } } } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/63eb67e2063fc364f3092099509d4497d2051a6b/Indexer.java/clean/src/org/exist/Indexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
13591,
12,
202,
202,
780,
1981,
16,
202,
202,
780,
508,
16,
202,
202,
780,
12621,
16,
202,
202,
2498,
1677,
13,
1216,
14366,
288,
202,
202,
759,
4604,
1300,
434,
2863,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13591,
12,
202,
202,
780,
1981,
16,
202,
202,
780,
508,
16,
202,
202,
780,
12621,
16,
202,
202,
2498,
1677,
13,
1216,
14366,
288,
202,
202,
759,
4604,
1300,
434,
2863,
... |
throw new CDIException("GDBServer does not support attaching"); | throw new CDIException(MIPlugin.getResourceString("src.GDBServerDebugger.GDBServer_attaching_unsupported")); | public ICDISession createAttachSession(ILaunchConfiguration config, IFile exe, int pid) throws CDIException { throw new CDIException("GDBServer does not support attaching"); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/f3a9fae6384fd8bb36474b1661bb6d0b65b38d5f/GDBServerDebugger.java/buggy/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
26899,
2565,
2157,
752,
4761,
2157,
12,
2627,
4760,
1750,
642,
16,
467,
812,
15073,
16,
509,
4231,
13,
1216,
385,
2565,
503,
288,
202,
202,
12849,
394,
385,
2565,
503,
2932,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
26899,
2565,
2157,
752,
4761,
2157,
12,
2627,
4760,
1750,
642,
16,
467,
812,
15073,
16,
509,
4231,
13,
1216,
385,
2565,
503,
288,
202,
202,
12849,
394,
385,
2565,
503,
2932,
4... |
public void redoChoice(String path, String choice) { try { XsdNode currentNode = rootNode; /* never a choice on rootNode */ String nextIndexes = path.substring(path.indexOf(".") + 1); int index = 0; Annotated annotated = (Annotated) (currentNode.getUserObject()); /* for each element on the path */ while (nextIndexes.length() > 0) { /* if choice do it */ annotated = (Annotated) (currentNode.getUserObject()); /* if not extended, do it */ if (!currentNode.isExtended) { extendPath(currentNode); } else { if (nextIndexes.indexOf(".") >= 0) { index = Integer.parseInt(nextIndexes.substring(0, nextIndexes.indexOf("."))); nextIndexes = nextIndexes.substring(nextIndexes .indexOf(".") + 1); try { currentNode = (XsdNode) currentNode .getChildAt(index); } catch (java.lang.ArrayIndexOutOfBoundsException aiobe) { /* * to keep compatibility: if mapping done without * auto-duplication of nodes and applied without * this option, an exception will be rised if the * node has not been manually duplicated. In this * case try to duplicate "upper" node. */ /* get upper node's index */ duplicateNode((XsdNode) currentNode .getChildAt(index - 1)); currentNode = (XsdNode) currentNode .getChildAt(index); } } else { index = Integer.parseInt(nextIndexes); nextIndexes = "-1"; try { currentNode = (XsdNode) currentNode .getChildAt(index); } catch (ArrayIndexOutOfBoundsException e) { return; } } } } /* add choice */ Group g = (Group) annotated; try { if (g.getOrder().getType() == Order.CHOICE && manageChoices) { XsdNode parent = (XsdNode) currentNode.getParent(); int position = parent.getIndex(currentNode); ArrayList choices = getChoices(g); ArrayList possibilities = new ArrayList(); for (int i = 0; i < choices.size(); i++) { try { possibilities.add(((ElementDecl) choices.get(i)) .getName()); } catch (ClassCastException e) { /* a group: give an overview */ possibilities.add(XsdNode .choiceToString((Group) choices.get(i))); } } XsdNode newNode; newNode = new XsdNode((Annotated) choices.get(possibilities .indexOf(choice))); newNode.isRequired = currentNode.isRequired; newNode.min = currentNode.min; newNode.max = currentNode.max; newNode.originalParent = currentNode; currentNode.transparent = true; currentNode.add(newNode); currentNode = newNode; } } catch (StringIndexOutOfBoundsException e) { return; } } catch (ArrayIndexOutOfBoundsException aioobe) { System.out.println("path not found: " + path); throw aioobe; } check((XsdNode) treeModel.getRoot()); treeModel.reload((XsdNode) treeModel.getRoot()); } | 6189 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6189/5204b77ab43997e9929ad9205a5ca9c8a50b5bb0/AbstractXsdTreeStruct.java/buggy/psi/mi/tools/xmlMakerFlattener/src/psidev/psi/mi/filemakers/xsd/AbstractXsdTreeStruct.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
24524,
10538,
12,
780,
589,
16,
514,
6023,
13,
288,
202,
202,
698,
288,
1082,
202,
60,
6427,
907,
13425,
273,
10181,
31,
1082,
202,
20308,
5903,
279,
6023,
603,
10181,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
24524,
10538,
12,
780,
589,
16,
514,
6023,
13,
288,
202,
202,
698,
288,
1082,
202,
60,
6427,
907,
13425,
273,
10181,
31,
1082,
202,
20308,
5903,
279,
6023,
603,
10181,
11... | ||
else if (arg.equals ("-f")) | if (something_done) return; getInterpreter(); if (iArg < args.length) | public static void main(String args[]) { int iArg = 0; boolean something_done = false; for ( ; iArg < args.length; iArg++) { String arg = args[iArg]; if (arg.equals ("-c") || arg.equals ("-e")) { iArg++; if (iArg == args.length) bad_option (arg); getInterpreter(); setArgs (args, iArg+1); if (arg.equals ("-c")) checkInitFile(); Shell.runString(args[iArg], Interpreter.defaultInterpreter, Environment.getCurrent()); something_done = true; } else if (arg.equals ("-f")) { iArg++; if (iArg == args.length) bad_option (arg); getInterpreter(); setArgs (args, iArg+1); checkInitFile(); Shell.runFile (args[iArg]); something_done = true; } else if (arg.equals ("-s") || arg.equals ("--")) { iArg++; getInterpreter(); setArgs (args, iArg); checkInitFile(); Shell.run(Interpreter.defaultInterpreter, Environment.getCurrent()); return; } else if (arg.equals ("-w")) { getInterpreter(); setArgs (args, iArg); checkInitFile(); // Do this instead of just new GuiConsole in case we have // configured --without-awt. try { Class.forName("kawa.GuiConsole").newInstance(); } catch (Exception ex) { System.err.println("failed to create Kawa window: "+ex); System.exit (-1); } something_done = true; } else if (arg.equals ("-d")) { iArg++; if (iArg == args.length) bad_option (arg); compilationDirectory = args[iArg]; } else if (arg.equals ("-P")) { iArg++; if (iArg == args.length) bad_option (arg); compilationPrefix = args[iArg]; } else if (arg.equals ("-T")) { iArg++; if (iArg == args.length) bad_option (arg); compilationTopname = args[iArg]; } else if (arg.equals ("-C")) { ++iArg; getInterpreter(); if (iArg == args.length) bad_option (arg); for ( ; iArg < args.length; iArg++) { arg = args[iArg]; try { System.err.println("(compiling "+arg+")"); SourceMessages messages = new SourceMessages(); CompileFile.compile_to_files(arg, compilationDirectory, compilationPrefix, compilationTopname, messages); boolean sawErrors = messages.seenErrors(); messages.checkErrors(System.err, 50); if (sawErrors) System.exit(-1); } catch (Throwable ex) { System.err.println("Internal error while compiling "+arg); ex.printStackTrace(System.err); System.exit(-1); } } return; } else if (arg.equals("--connect")) { getInterpreter(); ++iArg; if (iArg == args.length) bad_option (arg); int port; if (args[iArg].equals("-")) port = 0; else { try { port = Integer.parseInt(args[iArg]); } catch (NumberFormatException ex) { bad_option ("--connect port#"); port = -1; // never seen. } } try { java.net.Socket socket = new java.net.Socket("localhost",port); Telnet conn = new Telnet(socket, true); java.io.InputStream sin = conn.getInputStream(); java.io.OutputStream sout = conn.getOutputStream(); java.io.PrintStream pout = new PrintStream (sout, true); System.setIn(sin); System.setOut(pout); System.setErr(pout); } catch (java.io.IOException ex) { ex.printStackTrace(System.err); throw new Error(ex.toString()); } } else if (arg.equals("--server")) { getInterpreter(); ++iArg; if (iArg == args.length) bad_option (arg); int port; if (args[iArg].equals("-")) port = 0; else { try { port = Integer.parseInt(args[iArg]); } catch (NumberFormatException ex) { bad_option ("--server port#"); port = -1; // never seen. } } try { java.net.ServerSocket ssocket = new java.net.ServerSocket(port); port = ssocket.getLocalPort(); System.err.println("Listening on port "+port); for (;;) { System.err.print("waiting ... "); System.err.flush(); java.net.Socket client = ssocket.accept(); System.err.println("got connection from " +client.getInetAddress() +" port:"+client.getPort()); serveTelnet(Interpreter.defaultInterpreter, client); } } catch (java.io.IOException ex) { throw new Error(ex.toString()); } } else if (arg.equals("--main")) { Compilation.generateMainDefault = true; } else if (arg.equals("--applet")) { Compilation.generateAppletDefault = true; } else if (arg.equals("--debug-dump-zip")) { gnu.expr.ModuleExp.dumpZipPrefix = "kawa-zip-dump-"; } else if (arg.equals("--module-static")) { gnu.expr.Compilation.moduleStatic = 1; } else if (arg.equals("--fewer-classes")) { gnu.expr.Compilation.fewerClasses = true; } else if (arg.equals("--cps")) { gnu.expr.Compilation.fewerClasses = true; gnu.expr.Compilation.usingTailCalls = true; gnu.expr.Compilation.usingCPStyle = true; } else if (arg.equals("--full-tailcalls")) { gnu.expr.Compilation.usingTailCalls = true; } else if (arg.equals("--no-full-tailcalls")) { gnu.expr.Compilation.usingTailCalls = false; } else if (arg.equals("--version")) { System.out.print("Kawa "); System.out.print(Version.getVersion()); System.out.println(); System.out.println("Copyright (C) 2000 Per Bothner"); something_done = true; } else if (arg.length () > 0 && arg.charAt(0) == '-') { // Check if arg is a known language name. Interpreter previous = Interpreter.defaultInterpreter; String name = arg; if (name.length() > 2 && name.charAt(0) == '-') name = name.substring(name.charAt(1) == '-' ? 2 :1); Interpreter interpreter = Interpreter.getInstance(name); if (interpreter == null) bad_option(arg); else { Interpreter.defaultInterpreter = interpreter; if (previous == null) Environment.setCurrent(interpreter.getEnvironment()); } } else break; } if (something_done) return; getInterpreter(); if (iArg < args.length) { setArgs (args, iArg+1); checkInitFile(); Shell.runFile (args[iArg]); } else { setArgs (args, iArg); checkInitFile(); Shell.run(Interpreter.defaultInterpreter); } } | 37648 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37648/73c117ed4b16a90610354178984a39a40a355c0e/repl.java/buggy/kawa/repl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
833,
63,
5717,
225,
288,
565,
509,
277,
4117,
273,
374,
31,
565,
1250,
5943,
67,
8734,
273,
629,
31,
565,
364,
261,
274,
225,
277,
4117,
411,
833,
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,
282,
1071,
760,
918,
2774,
12,
780,
833,
63,
5717,
225,
288,
565,
509,
277,
4117,
273,
374,
31,
565,
1250,
5943,
67,
8734,
273,
629,
31,
565,
364,
261,
274,
225,
277,
4117,
411,
833,
18,
... |
String pulldown = element.getAttribute(ATT_PULLDOWN); | String pulldown = element.getAttribute(ActionDescriptor.STYLE_PULLDOWN); | protected ActionDescriptor createActionDescriptor( IConfigurationElement element) { // As of 2.1, the "pulldown" attribute was deprecated and replaced by // the attribute "style". See doc for more details. boolean pullDownStyle = false; String style = element.getAttribute(ActionDescriptor.ATT_STYLE); if (style != null) { pullDownStyle = style.equals(ActionDescriptor.STYLE_PULLDOWN); } else { String pulldown = element.getAttribute(ATT_PULLDOWN); pullDownStyle = pulldown != null && pulldown.equals("true"); //$NON-NLS-1$ } ActionDescriptor desc = null; if (pullDownStyle) desc = new ActionDescriptor(element, ActionDescriptor.T_WORKBENCH_PULLDOWN, window); else desc = new ActionDescriptor(element, ActionDescriptor.T_WORKBENCH, window); WWinPluginAction action = (WWinPluginAction) desc.getAction(); action.setActionSetId(actionSet.getDesc().getId()); actionSet.addPluginAction(action); return desc; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/b97ada8a49178173d33f907e1eb89e1b33e5ddcd/PluginActionSetBuilder.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionSetBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
4382,
3187,
752,
1803,
3187,
12,
5411,
467,
1750,
1046,
930,
13,
288,
3639,
368,
2970,
434,
576,
18,
21,
16,
326,
315,
13469,
2378,
6,
1566,
1703,
6849,
471,
8089,
635,
3639,
368,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
4382,
3187,
752,
1803,
3187,
12,
5411,
467,
1750,
1046,
930,
13,
288,
3639,
368,
2970,
434,
576,
18,
21,
16,
326,
315,
13469,
2378,
6,
1566,
1703,
6849,
471,
8089,
635,
3639,
368,... |
public void expandToLevel(Object elementOrTreePath, int level) { Widget w = internalExpand(elementOrTreePath, true); if (w != null) { internalExpandToLevel(w, level); } | public void expandToLevel(int level) { expandToLevel(getRoot(), level); | public void expandToLevel(Object elementOrTreePath, int level) { Widget w = internalExpand(elementOrTreePath, true); if (w != null) { internalExpandToLevel(w, level); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/062c32b8e3287ec1a2e491d34fe552dae26fe5f6/AbstractTreeViewer.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4542,
774,
2355,
12,
921,
930,
1162,
2471,
743,
16,
509,
1801,
13,
288,
3639,
11103,
341,
273,
2713,
12271,
12,
2956,
1162,
2471,
743,
16,
638,
1769,
3639,
309,
261,
91,
480,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4542,
774,
2355,
12,
921,
930,
1162,
2471,
743,
16,
509,
1801,
13,
288,
3639,
11103,
341,
273,
2713,
12271,
12,
2956,
1162,
2471,
743,
16,
638,
1769,
3639,
309,
261,
91,
480,... |
public ActionForward editObjectives(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws FenixActionException, FenixFilterException { HttpSession session = request.getSession(false); Integer objectCode = getObjectCode(request); String curricularCourseCodeString = request.getParameter("curricularCourseCode"); Integer curricularCourseCode = new Integer(curricularCourseCodeString); DynaActionForm objectivesForm = (DynaActionForm) form; InfoCurriculum infoCurriculumNew = new InfoCurriculum(); infoCurriculumNew.setIdInternal(curricularCourseCode); infoCurriculumNew.setGeneralObjectives((String) objectivesForm.get("generalObjectives")); infoCurriculumNew.setGeneralObjectivesEn((String) objectivesForm.get("generalObjectivesEn")); infoCurriculumNew.setOperacionalObjectives((String) objectivesForm.get("operacionalObjectives")); infoCurriculumNew.setOperacionalObjectivesEn((String) objectivesForm .get("operacionalObjectivesEn")); UserView userView = (UserView) session.getAttribute(SessionConstants.U_VIEW); Object args[] = { objectCode, curricularCourseCode, infoCurriculumNew, userView.getUtilizador() }; try { ServiceManagerServiceFactory.executeService(userView, "EditObjectives", args); } catch (FenixServiceException e) { throw new FenixActionException(e); } return viewObjectives(mapping, form, request, response); } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/f1790994e90150a41f878ae3110bab38ce01b720/TeacherAdministrationViewerDispatchAction.java/clean/src/net/sourceforge/fenixedu/presentationTier/Action/teacher/TeacherAdministrationViewerDispatchAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4382,
8514,
3874,
921,
3606,
12,
1803,
3233,
2874,
16,
4382,
1204,
646,
16,
5411,
9984,
590,
16,
12446,
766,
13,
1216,
478,
275,
697,
1803,
503,
16,
5411,
478,
275,
697,
1586,
503... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4382,
8514,
3874,
921,
3606,
12,
1803,
3233,
2874,
16,
4382,
1204,
646,
16,
5411,
9984,
590,
16,
12446,
766,
13,
1216,
478,
275,
697,
1803,
503,
16,
5411,
478,
275,
697,
1586,
503... | ||
} | } | public static Object[] fetchAllChanges(Map changedPaths, RandomAccessFile changesFile, boolean prefolded, Map mapCopyfrom) throws SVNException { changedPaths = changedPaths != null ? changedPaths : new HashMap(); mapCopyfrom = mapCopyfrom != null ? mapCopyfrom : new HashMap(); FSChange change = FSReader.readChange(changesFile); while(change != null){ foldChange(changedPaths, change, mapCopyfrom); if((FSPathChangeKind.FS_PATH_CHANGE_DELETE == change.getKind() || FSPathChangeKind.FS_PATH_CHANGE_REPLACE == change.getKind()) && !prefolded){ Collection keySet = changedPaths.keySet(); Iterator curIter = keySet.iterator(); while(curIter.hasNext()){ String hashKeyPath = (String)curIter.next(); //If we come across our own path, ignore it if(change.getPath().equals(hashKeyPath)){ continue; } //If we come across a child of our path, remove it if(SVNPathUtil.pathIsChild(change.getPath(), hashKeyPath) != null){ changedPaths.remove(hashKeyPath); } } } change = FSReader.readChange(changesFile); } Object[] result = new Object[2]; result[0] = changedPaths; result[1] = mapCopyfrom; return result; } | 2776 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2776/301b41972a7066eab6163f5cfa465ea5a3156e2d/FSReader.java/clean/javasvn/src/org/tmatesoft/svn/core/internal/io/fs/FSReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
8526,
12817,
7173,
12,
863,
3550,
4466,
16,
8072,
26933,
3478,
812,
16,
1250,
675,
9002,
785,
16,
1635,
852,
2951,
2080,
13,
1216,
29537,
50,
503,
288,
7734,
3550,
4466,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
8526,
12817,
7173,
12,
863,
3550,
4466,
16,
8072,
26933,
3478,
812,
16,
1250,
675,
9002,
785,
16,
1635,
852,
2951,
2080,
13,
1216,
29537,
50,
503,
288,
7734,
3550,
4466,
... |
MIMETCPStreamer(final Pipeline pipeline) { | MIMETCPStreamer(final Pipeline pipeline, boolean disposeWhenComplete) { m_disposeWhenComplete = disposeWhenComplete; | MIMETCPStreamer(final Pipeline pipeline) { //TODO bscott Remove this debugging m_logger.debug("Created Complete MIME message streamer"); try { File file = m_msg.toFile(new FileFactory() { public File createFile(String name) throws IOException { return createFile(); } public File createFile() throws IOException { return pipeline.mktemp(); } }); m_logger.debug("File is of length: " + file.length()); m_fos = new FileInputStream(file); m_channel = m_fos.getChannel(); } catch(Exception ex) { m_logger.error(ex); close(); } } | 49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/0b597f8de7682ed82641ddca2311f99964d7cd72/CompleteMIMEToken.java/buggy/tran/mail/main/com/metavize/tran/mail/papi/smtp/CompleteMIMEToken.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
13195,
13891,
1228,
264,
12,
6385,
13671,
5873,
16,
1250,
15825,
9434,
6322,
13,
288,
312,
67,
2251,
4150,
9434,
6322,
273,
15825,
9434,
6322,
31,
1377,
368,
6241,
324,
1017,
352,
88,
358... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13195,
13891,
1228,
264,
12,
6385,
13671,
5873,
16,
1250,
15825,
9434,
6322,
13,
288,
312,
67,
2251,
4150,
9434,
6322,
273,
15825,
9434,
6322,
31,
1377,
368,
6241,
324,
1017,
352,
88,
358... |
public Object execMethod (int methodId, IdFunction function, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { switch (methodId) { case Id_abs: return wrap_double (js_abs(ScriptRuntime.toNumber(args, 0))); case Id_acos: return wrap_double (js_acos(ScriptRuntime.toNumber(args, 0))); case Id_asin: return wrap_double (js_asin(ScriptRuntime.toNumber(args, 0))); case Id_atan: return wrap_double (js_atan(ScriptRuntime.toNumber(args, 0))); case Id_atan2: return wrap_double (js_atan2(ScriptRuntime.toNumber(args, 0), ScriptRuntime.toNumber(args, 1))); case Id_ceil: return wrap_double (js_ceil(ScriptRuntime.toNumber(args, 0))); case Id_cos: return wrap_double (js_cos(ScriptRuntime.toNumber(args, 0))); case Id_exp: return wrap_double (js_exp(ScriptRuntime.toNumber(args, 0))); case Id_floor: return wrap_double (js_floor(ScriptRuntime.toNumber(args, 0))); case Id_log: return wrap_double (js_log(ScriptRuntime.toNumber(args, 0))); case Id_max: return wrap_double (js_max(args)); case Id_min: return wrap_double (js_min(args)); case Id_pow: return wrap_double (js_pow(ScriptRuntime.toNumber(args, 0), ScriptRuntime.toNumber(args, 1))); case Id_random: return wrap_double (js_random()); case Id_round: return wrap_double (js_round(ScriptRuntime.toNumber(args, 0))); case Id_sin: return wrap_double (js_sin(ScriptRuntime.toNumber(args, 0))); case Id_sqrt: return wrap_double (js_sqrt(ScriptRuntime.toNumber(args, 0))); case Id_tan: return wrap_double (js_tan(ScriptRuntime.toNumber(args, 0))); } return null; } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/b6331020dcf96bb85dae57ee2a2ce947b6b0477a/NativeMath.java/clean/js/rhino/src/org/mozilla/javascript/NativeMath.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
3639,
261,
474,
707,
548,
16,
3124,
2083,
445,
16,
540,
1772,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
3639,
261,
474,
707,
548,
16,
3124,
2083,
445,
16,
540,
1772,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
... | ||
final int rowsToAdd = 100; count = 0; for(int i=1; i<=rowsToAdd; i++) { pStmt.setInt(1, i); count += pStmt.executeUpdate(); | final int rowsToAdd = 100; count = 0; for (int i = 1; i <= rowsToAdd; i++) { pStmt.setInt(1, i); count += pStmt.executeUpdate(); } assertTrue("count: " + count + " rowsToAdd: " + rowsToAdd,count == rowsToAdd); pStmt.close(); pStmt = con.prepareStatement("select i from #t0003 order by i"); int rowLimit = 32; pStmt.setMaxRows(rowLimit); assertTrue(pStmt.getMaxRows() == rowLimit); ResultSet rs = pStmt.executeQuery(); count = 0; while (rs.next()) { int n = rs.getInt("i"); count++; } assertTrue(count == rowLimit); | public void testMaxRows0003() throws Exception { dropTable("#t0003"); Statement stmt = con.createStatement(); int count = stmt.executeUpdate("create table #t0003 " + " (i integer not null) "); PreparedStatement pStmt = con.prepareStatement( "insert into #t0003 values (?)"); final int rowsToAdd = 100; count = 0; for(int i=1; i<=rowsToAdd; i++) { pStmt.setInt(1, i); count += pStmt.executeUpdate(); } assertTrue("count: " + count + " rowsToAdd: " + rowsToAdd,count == rowsToAdd); pStmt.close(); pStmt = con.prepareStatement( "select i from #t0003 order by i"); int rowLimit = 32; pStmt.setMaxRows(rowLimit); assertTrue(pStmt.getMaxRows() == rowLimit); ResultSet rs = pStmt.executeQuery(); count = 0; while(rs.next()) { int n = rs.getInt("i"); count++; } assertTrue(count == rowLimit); } | 2029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2029/d48066e24a9a4b4edf35b9545de98ba05acafd4d/CSUnitTest.java/clean/src/test/net/sourceforge/jtds/test/CSUnitTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
2747,
4300,
30770,
1435,
1216,
1185,
288,
565,
3640,
1388,
2932,
7,
88,
30770,
8863,
565,
8056,
3480,
273,
356,
18,
2640,
3406,
5621,
565,
509,
1056,
273,
3480,
18,
8837,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
2747,
4300,
30770,
1435,
1216,
1185,
288,
565,
3640,
1388,
2932,
7,
88,
30770,
8863,
565,
8056,
3480,
273,
356,
18,
2640,
3406,
5621,
565,
509,
1056,
273,
3480,
18,
8837,... |
if (DEBUG_ENTITY_REF) { System.out.println(text.getNodeValue()+"->"+text1.getNodeValue()+"->"+text2.getNodeValue()); } | protected int buildAttrEntityRefs(Text text, XMLAttributes attributes, int attrIndex, int entityCount, int entityIndex, int textOffset) { // iterate over entities String textString = text.getNodeValue(); int textLength = textString.length(); int i = entityIndex; while (i < entityCount) { // get entity information String entityName = attributes.getEntityName(attrIndex, i); int entityOffset = attributes.getEntityOffset(attrIndex, i); int entityLength = attributes.getEntityLength(attrIndex, i); // is this entity not in this text? // if (DEBUG_ENTITY_REF) { System.out.println("==>"+textString); System.out.println(i+". &"+entityName+";"); } // is this entity not in this text? // int tempLength= text.getNodeValue().length(); if ( tempLength == 0 || entityOffset >= textOffset + tempLength) { break; } // split text into 3 parts; first part remains the // text node that was passed into this method Text text1 = text.splitText(entityOffset - textOffset); Text text2 = text1.splitText(entityLength); if (DEBUG_ENTITY_REF) { System.out.println(text.getNodeValue()+"->"+text1.getNodeValue()+"->"+text2.getNodeValue()); } // create entity reference EntityReference entityRef = fDocument.createEntityReference(entityName); ((EntityReferenceImpl)entityRef).setReadOnly(false, false); // insert entity ref into tree and append middle text Node parent = text.getParentNode(); parent.replaceChild(entityRef, text1); entityRef.appendChild(text1); // see if there are any nested entity refs if (i < entityCount - 1) { int nextEntityOffset = attributes.getEntityOffset(attrIndex, i + 1); if (nextEntityOffset < entityOffset + entityLength) { // NOTE: Notice that we're incrementing the entity // index variable. Since the following call will // "consume" some of the entities. i += buildAttrEntityRefs(text1, attributes, attrIndex, entityCount, i + 1, entityOffset); } } ((EntityReferenceImpl)entityRef).setReadOnly(true, false); // adjust text node textOffset += text.getLength() + entityLength; text = text2; // increment and keep going i++; } // return number of entities we handled return i - entityIndex; } // buildAttrEntityRefs(Text,XMLAttributes,int,int,int,int):int | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/0f2aae2c22c5dc0957f0413b6320b4c5497482e8/AbstractDOMParser.java/clean/src/org/apache/xerces/parsers/AbstractDOMParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
509,
1361,
3843,
1943,
9837,
12,
1528,
977,
16,
3167,
2498,
1677,
16,
4766,
4202,
509,
1604,
1016,
16,
4766,
4202,
509,
1522,
1380,
16,
509,
1522,
1016,
16,
4766,
4202,
509,
977,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
509,
1361,
3843,
1943,
9837,
12,
1528,
977,
16,
3167,
2498,
1677,
16,
4766,
4202,
509,
1604,
1016,
16,
4766,
4202,
509,
1522,
1380,
16,
509,
1522,
1016,
16,
4766,
4202,
509,
977,
... | |
globReg.configure(usedHttpConfig, usedHttpsConfig); | globReg.configure(usedHttpPort, usedHttpsPort); | public void start() { super.start(); try { // start the server, set the "usedHttp[s]Config"s startServer(); } catch (RuntimeException re) { throw re; } catch (Exception e) { throw new RuntimeException(e.getMessage()); } try { // configure the reg, which alters the rootReg globReg.configure(usedHttpConfig, usedHttpsConfig); } catch (RuntimeException re) { servEng.stop(); throw re; } catch (Exception e) { servEng.stop(); throw new RuntimeException(e.getMessage()); } // create and advertise our service this.rootSP = new RootServletServiceProviderImpl(); sb.addService(ServletService.class, rootSP); } | 11321 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11321/b4a5272cd65b7fa9e822053d9ca602637d44ca8e/RootServletServiceComponent.java/clean/webserver/src/org/cougaar/lib/web/service/RootServletServiceComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
787,
1435,
288,
565,
2240,
18,
1937,
5621,
565,
775,
288,
1377,
368,
787,
326,
1438,
16,
444,
326,
315,
3668,
2940,
63,
87,
65,
809,
6,
87,
1377,
787,
2081,
5621,
565,
289,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
787,
1435,
288,
565,
2240,
18,
1937,
5621,
565,
775,
288,
1377,
368,
787,
326,
1438,
16,
444,
326,
315,
3668,
2940,
63,
87,
65,
809,
6,
87,
1377,
787,
2081,
5621,
565,
289,... |
BugzillaProductPage page = new BugzillaProductPage(PlatformUI.getWorkbench(), null, repository, null); | BugzillaProductPage page = new BugzillaProductPage(PlatformUI.getWorkbench(), null, repository); | public void testPlatformOptions() throws Exception { NewBugzillaReport newReport = new NewBugzillaReport(IBugzillaConstants.TEST_BUGZILLA_220_URL, "1"); TaskRepository repository = new TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_220_URL); BugzillaServerFacade.setupNewBugAttributes(repository.getUrl(), null, repository.getUserName(), repository.getPassword(), newReport, null); BugzillaProductPage page = new BugzillaProductPage(PlatformUI.getWorkbench(), null, repository, null); page.setPlatformOptions(newReport); String os = Platform.getOS(); if (os.equals("win32")) assertEquals("Windows", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue()); else if (os.equals("solaris")) assertEquals("Solaris", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue()); else if (os.equals("qnx")) assertEquals("QNX-Photon", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue()); else if (os.equals("macosx")) assertEquals("Mac OS", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue()); else if (os.equals("linux")) assertEquals("Linux", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue()); else if (os.equals("hpux")) assertEquals("HP-UX", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue()); else if (os.equals("aix")) assertEquals("AIX", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue()); String platform = Platform.getOSArch(); if (platform.equals("x86")) assertEquals("PC", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue()); else if (platform.equals("x86_64")) assertEquals("PC", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue()); else if (platform.equals("ia64")) assertEquals("PC", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue()); else if (platform.equals("ia64_32")) assertEquals("PC", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue()); else if (platform.equals("sparc")) assertEquals("Sun", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue()); else if (platform.equals("ppc")) assertEquals("Power", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue()); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/c780278ed1d6198b551d81f2d98cdde6b34e4099/NewBugWizardTest.java/buggy/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
8201,
1320,
1435,
1216,
1185,
288,
202,
202,
1908,
19865,
15990,
4820,
394,
4820,
273,
394,
1166,
19865,
15990,
4820,
12,
13450,
637,
15990,
2918,
18,
16961,
67,
4827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8201,
1320,
1435,
1216,
1185,
288,
202,
202,
1908,
19865,
15990,
4820,
394,
4820,
273,
394,
1166,
19865,
15990,
4820,
12,
13450,
637,
15990,
2918,
18,
16961,
67,
4827,
... |
return 16; | return 16 + getAdditionalHeight(); | public int getIconHeight() { return 16; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ae9ec43c5570a0f69e3d8c8b733283719f52a770/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
21724,
2686,
1435,
377,
288,
1377,
327,
2872,
397,
26660,
2686,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
21724,
2686,
1435,
377,
288,
1377,
327,
2872,
397,
26660,
2686,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Binary.mutate(s,INT_ADD,y,B.copy(),val2); | return Binary.create(INT_ADD,y,B.copy(),val2); | private static void transformForInt(OPT_Instruction s, OPT_Instruction def) { // s is y = A + c OPT_RegisterOperand y = Binary.getResult(s); OPT_RegisterOperand A = Binary.getVal1(s).asRegister(); int c = Binary.getVal2(s).asIntConstant().value; if (s.operator == INT_SUB) c = -c; // A = B + d OPT_RegisterOperand B = Binary.getVal1(def).asRegister(); int d = Binary.getVal2(def).asIntConstant().value; if (def.operator == INT_SUB) d = -d; // rewrite so y = B + (c+d) OPT_IntConstantOperand val2 = new OPT_IntConstantOperand(c+d); Binary.mutate(s,INT_ADD,y,B.copy(),val2); } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/6a89b937e3451eefc9cbd2add21ece41fe5c6011/OPT_ExpressionFolding.java/buggy/rvm/src/vm/compilers/optimizing/optimizations/global/ssa/expressionFolding/OPT_ExpressionFolding.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
2510,
1290,
1702,
12,
15620,
67,
11983,
272,
16,
16456,
67,
11983,
1652,
13,
288,
565,
368,
272,
353,
677,
273,
432,
397,
276,
565,
16456,
67,
3996,
10265,
677,
273,
789... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
2510,
1290,
1702,
12,
15620,
67,
11983,
272,
16,
16456,
67,
11983,
1652,
13,
288,
565,
368,
272,
353,
677,
273,
432,
397,
276,
565,
16456,
67,
3996,
10265,
677,
273,
789... |
uaManager.stop(); | ua.stop(); | public void testRegistrationOnStartup() throws Exception { StandardDirectoryAgent da = new StandardDirectoryAgent(); StandardDirectoryAgentManager daManager = new StandardDirectoryAgentManager(); da.setDirectoryAgentManager(daManager); daManager.setUDPConnector(new SocketUDPConnector()); daManager.setTCPConnector(new SocketTCPConnector()); da.setConfiguration(getDefaultConfiguration()); da.start(); try { sleep(500); StandardServiceAgent sa = new StandardServiceAgent(); StandardServiceAgentManager saManager = new StandardServiceAgentManager(); sa.setServiceAgentManager(saManager); saManager.setUDPConnector(new SocketUDPConnector()); saManager.setTCPConnector(new SocketTCPConnector()); sa.setConfiguration(getDefaultConfiguration()); ServiceURL serviceURL = new ServiceURL("service:jmx:rmi:///jndi/rmi:///ssat1", ServiceURL.LIFETIME_MAXIMUM - 1); Scopes scopes = new Scopes(new String[]{"scope1", "scope2"}); ServiceInfo service = new ServiceInfo(null, serviceURL, scopes, null, Locale.getDefault().getLanguage()); sa.register(service); sa.start(); try { sleep(500); StandardUserAgent ua = new StandardUserAgent(); StandardUserAgentManager uaManager = new StandardUserAgentManager(); ua.setUserAgentManager(uaManager); uaManager.setUDPConnector(new SocketUDPConnector()); uaManager.setTCPConnector(new SocketTCPConnector()); ua.setConfiguration(getDefaultConfiguration()); ua.start(); try { List serviceInfos = ua.findServices(serviceURL.getServiceType(), scopes, null, null); assert serviceInfos != null; assert serviceInfos.size() == 1; ServiceURL discoveredServiceURL = ((ServiceInfo)serviceInfos.get(0)).getServiceURL(); assert discoveredServiceURL != null; assert serviceURL.equals(discoveredServiceURL); assert serviceURL.getLifetime() == discoveredServiceURL.getLifetime(); } finally { uaManager.stop(); } } finally { saManager.stop(); } } finally { da.stop(); } } | 6331 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6331/d27166d30cc3b6c11dabd620bba4d02fbcca1a01/StandardServiceAgentTest.java/buggy/livetribe/trunk/livetribe-slp/src/test/java/org/livetribe/slp/api/sa/StandardServiceAgentTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
7843,
1398,
22178,
1435,
1216,
1185,
565,
288,
3639,
8263,
2853,
3630,
5248,
273,
394,
8263,
2853,
3630,
5621,
3639,
8263,
2853,
3630,
1318,
5248,
1318,
273,
394,
8263,
285... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7843,
1398,
22178,
1435,
1216,
1185,
565,
288,
3639,
8263,
2853,
3630,
5248,
273,
394,
8263,
2853,
3630,
5621,
3639,
8263,
2853,
3630,
1318,
5248,
1318,
273,
394,
8263,
285... |
synPredMatched273 = false; | synPredMatched272 = false; | public final void forInClause() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST forInClause_AST = null; Token i = null; AST i_AST = null; { boolean synPredMatched273 = false; if (((_tokenSet_12.member(LA(1))) && (_tokenSet_107.member(LA(2))))) { int _m273 = mark(); synPredMatched273 = true; inputState.guessing++; try { { declarationStart(); } } catch (RecognitionException pe) { synPredMatched273 = false; } rewind(_m273); inputState.guessing--; } if ( synPredMatched273 ) { singleDeclarationNoInit(); astFactory.addASTChild(currentAST, returnAST); } else if ((LA(1)==IDENT) && (LA(2)==LITERAL_in)) { AST tmp188_AST = null; tmp188_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp188_AST); match(IDENT); } else { throw new NoViableAltException(LT(1), getFilename()); } } i = LT(1); i_AST = astFactory.create(i); astFactory.makeASTRoot(currentAST, i_AST); match(LITERAL_in); if ( inputState.guessing==0 ) { i_AST.setType(FOR_IN_ITERABLE); } shiftExpression(); astFactory.addASTChild(currentAST, returnAST); forInClause_AST = (AST)currentAST.root; returnAST = forInClause_AST; } | 6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/402b6bb60ff460172ee2d793373e0aa52b284687/GroovyRecognizer.java/buggy/src/main/org/codehaus/groovy/antlr/parser/GroovyRecognizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
364,
382,
7044,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5621,
202,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
364,
382,
7044,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5621,
202,
20... |
IRubyObject convertToFloat(); | RubyFloat convertToFloat(); | IRubyObject convertToFloat(); | 45298 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45298/803c66ee682936beecc8a43fe2cfc90fe5645b22/IRubyObject.java/buggy/src/org/jruby/runtime/builtin/IRubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
15908,
10340,
921,
8137,
4723,
5621,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
15908,
10340,
921,
8137,
4723,
5621,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
log.error(ex); | System.err.println(ex); | public void testBarrier() { RemoveOneItem[] removers=new RemoveOneItem[10]; int num_dead=0; for(int i=0; i < removers.length; i++) { removers[i]=new RemoveOneItem(i); removers[i].start(); } Util.sleep(1000); System.out.println("-- adding element 99"); try { queue.add(new Long(99)); } catch(Exception ex) { log.error(ex); } Util.sleep(5000); System.out.println("-- adding element 100"); try { queue.add(new Long(100)); } catch(Exception ex) { log.error(ex); } Util.sleep(1000); for(int i=0; i < removers.length; i++) { System.out.println("remover #" + i + " is " + (removers[i].isAlive() ? "alive" : "terminated")); if(!removers[i].isAlive()) { num_dead++; } } assertEquals(num_dead, 2); } | 51463 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51463/5ad015d9a78e1da3350d9b398b46b2f5d4508564/QueueTest.java/clean/tests/junit/org/jgroups/tests/QueueTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
5190,
10342,
1435,
288,
3639,
3581,
3335,
1180,
8526,
2797,
414,
33,
2704,
3581,
3335,
1180,
63,
2163,
15533,
3639,
509,
818,
67,
22097,
33,
20,
31,
3639,
364,
12,
474,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5190,
10342,
1435,
288,
3639,
3581,
3335,
1180,
8526,
2797,
414,
33,
2704,
3581,
3335,
1180,
63,
2163,
15533,
3639,
509,
818,
67,
22097,
33,
20,
31,
3639,
364,
12,
474,
... |
try { doc.getFile(); } catch (IllegalStateException ise) { fail("file does not exist"); } | try { doc.getFile(); } | public void testForceFileOpen() throws BadLocationException, IOException, OperationCanceledException, AlreadyOpenException { final File tempFile1 = writeToNewTempFile(FOO_TEXT); final File tempFile2 = writeToNewTempFile(BAR_TEXT); // don't catch and fail! TestListener listener = new TestListener() { public void fileOpened(OpenDefinitionsDocument doc) { //File file = null; try { //file = doc.getFile(); } catch (IllegalStateException ise) { // We know file should exist fail("file does not exist"); } catch (FileMovedException fme) { // We know file should exist fail("file does not exist"); } openCount++; } public void fileClosed(OpenDefinitionsDocument doc) { /* opening a file closes the empty document created on startup [Corky: 10-8-04]*/// assertTrue(doc.isUntitled());// assertFalse(doc.isModifiedSinceSave()); } }; _model.addListener(listener); // Open file 1 OpenDefinitionsDocument doc = _model.openFile(new FileSelector(tempFile1)); listener.assertOpenCount(1); assertModified(false, doc); assertContents(FOO_TEXT, doc); // Get file 1 OpenDefinitionsDocument doc1 = _model.getDocumentForFile(tempFile1); listener.assertOpenCount(1); assertEquals("opened document", doc, doc1); assertContents(FOO_TEXT, doc1); // Get file 2, forcing it to be opened OpenDefinitionsDocument doc2 = _model.getDocumentForFile(tempFile2); listener.assertOpenCount(2); assertContents(BAR_TEXT, doc2); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/aafaf7b848d738e58eee48a6cbc4b800c8027685/GlobalModelIOTest.java/buggy/drjava/src/edu/rice/cs/drjava/model/GlobalModelIOTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
10997,
812,
3678,
1435,
565,
1216,
6107,
2735,
503,
16,
1860,
16,
4189,
23163,
503,
16,
565,
17009,
3678,
503,
225,
288,
565,
727,
1387,
18286,
21,
273,
12870,
1908,
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,
282,
1071,
918,
1842,
10997,
812,
3678,
1435,
565,
1216,
6107,
2735,
503,
16,
1860,
16,
4189,
23163,
503,
16,
565,
17009,
3678,
503,
225,
288,
565,
727,
1387,
18286,
21,
273,
12870,
1908,
2018... |
private void generateJava() throws ModelloException, IOException { Model objectModel = getModel(); for ( Iterator i = objectModel.getInterfaces( getGeneratedVersion() ).iterator(); i.hasNext(); ) { ModelInterface modelInterface = (ModelInterface) i.next(); String packageName = null; if ( isPackageWithVersion() ) { packageName = modelInterface.getPackageName( true, getGeneratedVersion() ); } else { packageName = modelInterface.getPackageName( false, null ); } String directory = packageName.replace( '.', '/' ); File f = new File( new File( getOutputDirectory(), directory ), modelInterface.getName() + ".java" ); if ( !f.getParentFile().exists() ) { f.getParentFile().mkdirs(); } FileWriter writer = new FileWriter( f ); JSourceWriter sourceWriter = new JSourceWriter( writer ); JInterface jInterface = new JInterface( modelInterface.getName() ); jInterface.addImport( "java.util.*" ); jInterface.setPackageName( packageName ); if ( modelInterface.getSuperInterface() != null ) { jInterface.addInterface( modelInterface.getSuperInterface() ); } if ( modelInterface.getCodeSegments( getGeneratedVersion() ) != null ) { for ( Iterator iterator = modelInterface.getCodeSegments( getGeneratedVersion() ).iterator(); iterator.hasNext(); ) { CodeSegment codeSegment = (CodeSegment) iterator.next(); //TODO : add this method to jInterface or remove codeSegments and add method tag //jInterface.addSourceCode( codeSegment.getCode() ); } } jInterface.print( sourceWriter ); writer.flush(); writer.close(); } for ( Iterator i = objectModel.getClasses( getGeneratedVersion() ).iterator(); i.hasNext(); ) { ModelClass modelClass = (ModelClass) i.next(); JavaClassMetadata javaClassMetadata = (JavaClassMetadata) modelClass.getMetadata( JavaClassMetadata.ID ); String packageName = null; if ( isPackageWithVersion() ) { packageName = modelClass.getPackageName( true, getGeneratedVersion() ); } else { packageName = modelClass.getPackageName( false, null ); } String directory = packageName.replace( '.', '/' ); File f = new File( new File( getOutputDirectory(), directory ), modelClass.getName() + ".java" ); if ( !f.getParentFile().exists() ) { f.getParentFile().mkdirs(); } FileWriter writer = new FileWriter( f ); JSourceWriter sourceWriter = new JSourceWriter( writer ); JClass jClass = new JClass( modelClass.getName() ); jClass.addImport( "java.util.*" ); addModelImports( jClass, modelClass ); jClass.setPackageName( packageName ); if ( javaClassMetadata.isAbstract() ) { jClass.getModifiers().setAbstract( true ); } if ( modelClass.getSuperClass() != null ) { jClass.setSuperClass( modelClass.getSuperClass() ); } if ( modelClass.getInterfaces().size() > 0 ) { for( Iterator j = modelClass.getInterfaces().iterator(); j.hasNext(); ) { ModelInterface modelInterface = (ModelInterface) j.next(); jClass.addInterface( modelInterface.getName() ); } } jClass.addInterface( Serializable.class.getName() ); for ( Iterator j = modelClass.getFields( getGeneratedVersion() ).iterator(); j.hasNext(); ) { ModelField modelField = (ModelField) j.next(); if ( modelField instanceof ModelAssociation ) { createAssociation( jClass, (ModelAssociation) modelField ); } else { createField( jClass, modelField ); } } if ( modelClass.getCodeSegments( getGeneratedVersion() ) != null ) { for ( Iterator iterator = modelClass.getCodeSegments( getGeneratedVersion() ).iterator(); iterator.hasNext(); ) { CodeSegment codeSegment = (CodeSegment) iterator.next(); jClass.addSourceCode( codeSegment.getCode() ); } } jClass.print( sourceWriter ); writer.flush(); writer.close(); } } | 47828 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47828/10f1d1506c4d29824aea5150bd7e1903efbd44cb/JavaModelloGenerator.java/clean/modello/modello-core/src/main/java/org/codehaus/modello/plugin/java/JavaModelloGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
225,
918,
225,
2103,
5852,
1435,
7734,
1216,
225,
3164,
383,
503,
16,
225,
1860,
3639,
288,
7734,
3164,
225,
733,
1488,
225,
273,
225,
7454,
5621,
7734,
364,
225,
261,
225,
4498,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3238,
225,
918,
225,
2103,
5852,
1435,
7734,
1216,
225,
3164,
383,
503,
16,
225,
1860,
3639,
288,
7734,
3164,
225,
733,
1488,
225,
273,
225,
7454,
5621,
7734,
364,
225,
261,
225,
4498,
... | ||
public void run() { if (event.getJob().getResult().getCode() == Status.OK && event.getJob().getResult().getMessage() != null) {// // Attach context if (getAttachContext()) { IWorkbench wb = PlatformUI.getWorkbench(); IProgressService ps = wb.getProgressService(); try { ps.busyCursorWhile(new IRunnableWithProgress() { public void run(IProgressMonitor pm) { try { bugzillaRepositoryConnector.attachContext(repository, modifiedTask, "", TasksUiPlugin.getDefault().getProxySettings()); } catch (Exception e) { MylarStatusHandler.fail(e, "Failed to attach task context.\n\n" + e.getMessage(), true); } } }); } catch (InvocationTargetException e1) { MylarStatusHandler.fail(e1.getCause(), "Failed to attach task context.\n\n" + e1.getMessage(), true); } catch (InterruptedException e1) { // ignore } } if (modifiedTask != null) { // TODO: This is set to null in order for update // to bypass // ui override check with user // Need to change how this is achieved. //modifiedTask.setTaskData(null); TasksUiPlugin.getSynchronizationManager().synchronize(connector, modifiedTask, true, new JobChangeAdapter() { @Override public void done(IJobChangeEvent event) { close(); TaskUiUtil.openEditor(modifiedTask, false); } }); Set<AbstractRepositoryQuery> queriesWithHandle = TasksUiPlugin.getTaskListManager() .getTaskList().getQueriesForHandle(modifiedTask.getHandleIdentifier()); // Sync Queries that have this task TasksUiPlugin.getSynchronizationManager().synchronize(connector, queriesWithHandle, null, Job.SHORT, 0, false); // Sync any tasks that might have changed as a // result of this action // TODO: removed since we don't have a way to exclude currently submitted task // and others will be synched later by background sync anyway (or manual sync) //TasksUiPlugin.getSynchronizationManager().synchronizeChanged(connector, repository); } else { TaskUiUtil.openRepositoryTask(repository.getUrl(), BugzillaTaskEditor.this .getRepositoryTaskData().getId(), repository.getUrl() + IBugzillaConstants.URL_GET_SHOW_BUG + BugzillaTaskEditor.this.getRepositoryTaskData().getId()); close(); } return; } else if (event.getJob().getResult().getCode() == Status.INFO) { WebBrowserDialog.openAcceptAgreement(null, IBugzillaConstants.REPORT_SUBMIT_ERROR, event .getJob().getResult().getMessage(), event.getJob().getResult().getException() .getMessage()); submitButton.setEnabled(true); BugzillaTaskEditor.this.showBusy(false); } else if (event.getJob().getResult().getCode() == Status.ERROR) { MessageDialog.openError(null, IBugzillaConstants.REPORT_SUBMIT_ERROR, event.getResult() .getMessage()); submitButton.setEnabled(true); BugzillaTaskEditor.this.showBusy(false); } } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/ae6d1d8e8f64e8ff722972ae7d06a9023e6ed588/BugzillaTaskEditor.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
202,
482,
918,
1086,
1435,
288,
25083,
202,
430,
261,
2575,
18,
588,
2278,
7675,
588,
1253,
7675,
588,
1085,
1435,
422,
2685,
18,
3141,
6862,
9506,
202,
10,
10,
871,
18,
588,
2278,
767... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
202,
482,
918,
1086,
1435,
288,
25083,
202,
430,
261,
2575,
18,
588,
2278,
7675,
588,
1253,
7675,
588,
1085,
1435,
422,
2685,
18,
3141,
6862,
9506,
202,
10,
10,
871,
18,
588,
2278,
767... | ||
.substring(10)); | .substring(Constants.PROPSFILE.length())); | public static void main(String[] args) throws IOException { boolean haltError = false; boolean haltFail = false; boolean stackfilter = true; Properties props = new Properties(); boolean showOut = false; boolean logTestListenerEvents = false; if (args.length == 0) { System.err.println("required argument TestClassName missing"); System.exit(ERRORS); } if (args[0].startsWith("testsfile=")) { multipleTests = true; args[0] = args[0].substring(10 /* "testsfile=".length() */); } for (int i = 1; i < args.length; i++) { if (args[i].startsWith("haltOnError=")) { haltError = Project.toBoolean(args[i].substring(12)); } else if (args[i].startsWith("haltOnFailure=")) { haltFail = Project.toBoolean(args[i].substring(14)); } else if (args[i].startsWith("filtertrace=")) { stackfilter = Project.toBoolean(args[i].substring(12)); } else if (args[i].startsWith("crashfile=")) { crashFile = args[i].substring(12); registerTestCase("BeforeFirstTest"); } else if (args[i].startsWith("formatter=")) { try { createAndStoreFormatter(args[i].substring(10)); } catch (BuildException be) { System.err.println(be.getMessage()); System.exit(ERRORS); } } else if (args[i].startsWith("propsfile=")) { FileInputStream in = new FileInputStream(args[i] .substring(10)); props.load(in); in.close(); } else if (args[i].startsWith("showoutput=")) { showOut = Project.toBoolean(args[i].substring(11)); } else if (args[i].startsWith("logtestlistenerevents=")) { logTestListenerEvents = Project.toBoolean(args[i].substring(22)); } } // Add/overlay system properties on the properties from the Ant project Hashtable p = System.getProperties(); for (Enumeration e = p.keys(); e.hasMoreElements();) { Object key = e.nextElement(); props.put(key, p.get(key)); } int returnCode = SUCCESS; if (multipleTests) { try { java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.FileReader(args[0])); String testCaseName; int code = 0; boolean errorOccurred = false; boolean failureOccurred = false; String line = null; while ((line = reader.readLine()) != null) { StringTokenizer st = new StringTokenizer(line, ","); testCaseName = st.nextToken(); JUnitTest t = new JUnitTest(testCaseName); t.setTodir(new File(st.nextToken())); t.setOutfile(st.nextToken()); code = launch(t, haltError, stackfilter, haltFail, showOut, logTestListenerEvents, props); errorOccurred = (code == ERRORS); failureOccurred = (code != SUCCESS); if (errorOccurred || failureOccurred) { if ((errorOccurred && haltError) || (failureOccurred && haltFail)) { registerNonCrash(); System.exit(code); } else { if (code > returnCode) { returnCode = code; } System.out.println("TEST " + t.getName() + " FAILED"); } } } } catch (IOException e) { e.printStackTrace(); } } else { returnCode = launch(new JUnitTest(args[0]), haltError, stackfilter, haltFail, showOut, logTestListenerEvents, props); } registerNonCrash(); System.exit(returnCode); } | 639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/d2e6dcf66da83b17eb4a13f4ff7f374521fe29ec/JUnitTestRunner.java/buggy/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1860,
288,
3639,
1250,
18389,
668,
273,
629,
31,
3639,
1250,
18389,
3754,
273,
629,
31,
3639,
1250,
2110,
2188,
273,
638,
31,
3639,
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,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1860,
288,
3639,
1250,
18389,
668,
273,
629,
31,
3639,
1250,
18389,
3754,
273,
629,
31,
3639,
1250,
2110,
2188,
273,
638,
31,
3639,
6... |
if (c == 'u') | if (c == 'u') { identifierStart = true; | public int getToken() throws IOException { int c; tokenno++; // Check for pushed-back token if (this.pushbackToken != EOF) { int result = this.pushbackToken; this.pushbackToken = EOF; return result; } // Eat whitespace, possibly sensitive to newlines. do { c = in.read(); if (c == '\n') if ((flags & TSF_NEWLINES) != 0) break; } while (isJSSpace(c) || c == '\n'); if (c == EOF_CHAR) return EOF; // identifier/keyword/instanceof? // watch out for starting with a <backslash> boolean isUnicodeEscapeStart = false; if (c == '\\') { c = in.read(); if (c == 'u') isUnicodeEscapeStart = true; else c = '\\'; // always unread the 'u' or whatever, we need // to start the string below at the <backslash>. in.unread(); } if (isUnicodeEscapeStart || Character.isJavaIdentifierStart((char)c)) { in.startString(); boolean containsEscape = isUnicodeEscapeStart; do { c = in.read(); if (c == '\\') { c = in.read(); containsEscape = (c == 'u'); } } while (Character.isJavaIdentifierPart((char)c)); in.unread(); int result; String str = in.getString(); // OPT we shouldn't have to make a string (object!) to // check if it's a keyword. // strictly speaking we should probably push-back // all the bad characters if the <backslash>uXXXX // sequence is malformed. But since there isn't a // correct context(is there?) for a bad Unicode // escape sequence after an identifier, we can report // an error here. if (containsEscape) { char ca[] = str.toCharArray(); int L = str.length(); int destination = 0; for (int i = 0; i != L;) { c = ca[i]; ++i; if (c == '\\' && i != L && ca[i] == 'u') { boolean goodEscape = false; if (i + 4 < L) { int val = xDigitToInt(ca[i + 1]); if (val >= 0) { val = (val << 4) | xDigitToInt(ca[i + 2]); if (val >= 0) { val = (val << 4) | xDigitToInt(ca[i + 3]); if (val >= 0) { val = (val << 4) | xDigitToInt(ca[i + 4]); if (val >= 0) { c = (char)val; i += 5; goodEscape = true; } } } } } if (!goodEscape) { reportSyntaxError("msg.invalid.escape", null); return ERROR; } } ca[destination] = (char)c; ++destination; } str = new String(ca, 0, destination); } else { // Return the corresponding token if it's a keyword result = stringToKeyword(str); if (result != EOF) { if (result != RESERVED) { return result; } else if (!Context.getContext().hasFeature( Context.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER)) { return result; } else { // If implementation permits to use future reserved // keywords in violation with the EcmaScript standard, // treat it as name but issue warning Object[] errArgs = { str }; reportSyntaxWarning("msg.reserved.keyword", errArgs); result = EOF; } } } this.string = str; return NAME; } // is it a number? if (isDigit(c) || (c == '.' && isDigit(in.peek()))) { int base = 10; in.startString(); if (c == '0') { c = in.read(); if (c == 'x' || c == 'X') { c = in.read(); base = 16; // restart the string, losing leading 0x in.startString(); } else if (isDigit(c)) { base = 8; } } while (0 <= xDigitToInt(c)) { if (base < 16) { if (isAlpha(c)) break; /* * We permit 08 and 09 as decimal numbers, which * makes our behavior a superset of the ECMA * numeric grammar. We might not always be so * permissive, so we warn about it. */ if (base == 8 && c >= '8') { Object[] errArgs = { c == '8' ? "8" : "9" }; reportSyntaxWarning("msg.bad.octal.literal", errArgs); base = 10; } } c = in.read(); } boolean isInteger = true; if (base == 10 && (c == '.' || c == 'e' || c == 'E')) { isInteger = false; if (c == '.') { do { c = in.read(); } while (isDigit(c)); } if (c == 'e' || c == 'E') { c = in.read(); if (c == '+' || c == '-') { c = in.read(); } if (!isDigit(c)) { in.getString(); // throw away string in progress reportSyntaxError("msg.missing.exponent", null); return ERROR; } do { c = in.read(); } while (isDigit(c)); } } in.unread(); String numString = in.getString(); double dval; if (base == 10 && !isInteger) { try { // Use Java conversion to number from string... dval = (Double.valueOf(numString)).doubleValue(); } catch (NumberFormatException ex) { Object[] errArgs = { ex.getMessage() }; reportSyntaxError("msg.caught.nfe", errArgs); return ERROR; } } else { dval = ScriptRuntime.stringToNumber(numString, 0, base); } this.number = dval; return NUMBER; } // is it a string? if (c == '"' || c == '\'') { // We attempt to accumulate a string the fast way, by // building it directly out of the reader. But if there // are any escaped characters in the string, we revert to // building it out of a StringBuffer. StringBuffer stringBuf = null; int quoteChar = c; int val = 0; c = in.read(); in.startString(); // start after the first " while(c != quoteChar) { if (c == '\n' || c == EOF_CHAR) { in.unread(); in.getString(); // throw away the string in progress reportSyntaxError("msg.unterminated.string.lit", null); return ERROR; } if (c == '\\') { // We've hit an escaped character; revert to the // slow method of building a string. if (stringBuf == null) { // Don't include the backslash in.unread(); stringBuf = new StringBuffer(in.getString()); in.read(); } switch (c = in.read()) { case 'b': c = '\b'; break; case 'f': c = '\f'; break; case 'n': c = '\n'; break; case 'r': c = '\r'; break; case 't': c = '\t'; break; case 'v': c = '\u000B'; break; // \v a late addition to the ECMA spec. // '\v' doesn't seem to be valid Java. default: if (isDigit(c) && c < '8') { val = c - '0'; c = in.read(); if (isDigit(c) && c < '8') { val = 8 * val + c - '0'; c = in.read(); if (isDigit(c) && c < '8') { val = 8 * val + c - '0'; c = in.read(); } } in.unread(); if (val > 0377) { reportSyntaxError("msg.oct.esc.too.large", null); return ERROR; } c = val; } else if (c == 'u') { /* * Get 4 hex digits; if the u escape is not * followed by 4 hex digits, use 'u' + the literal * character sequence that follows. Do some manual * match (OK because we're in a string) to avoid * multi-char match on the underlying stream. */ int c1 = in.read(); c = xDigitToInt(c1); if (c < 0) { in.unread(); c = 'u'; } else { int c2 = in.read(); c = (c << 4) | xDigitToInt(c2); if (c < 0) { in.unread(); stringBuf.append('u'); c = c1; } else { int c3 = in.read(); c = (c << 4) | xDigitToInt(c3); if (c < 0) { in.unread(); stringBuf.append('u'); stringBuf.append((char)c1); c = c2; } else { int c4 = in.read(); c = (c << 4) | xDigitToInt(c4); if (c < 0) { in.unread(); stringBuf.append('u'); stringBuf.append((char)c1); stringBuf.append((char)c2); c = c3; } else { // got 4 hex digits! Woo Hoo! } } } } } else if (c == 'x') { /* Get 2 hex digits, defaulting to 'x' + literal * sequence, as above. */ int c1 = in.read(); c = xDigitToInt(c1); if (c < 0) { in.unread(); c = 'x'; } else { int c2 = in.read(); c = (c << 4) | xDigitToInt(c2); if (c < 0) { in.unread(); stringBuf.append('x'); c = c1; } else { // got 2 hex digits } } } } } if (stringBuf != null) stringBuf.append((char) c); c = in.read(); } if (stringBuf != null) this.string = stringBuf.toString(); else { in.unread(); // miss the trailing " this.string = in.getString(); in.read(); } return STRING; } switch (c) { case '\n': return EOL; case ';': return SEMI; case '[': return LB; case ']': return RB; case '{': return LC; case '}': return RC; case '(': return LP; case ')': return RP; case ',': return COMMA; case '?': return HOOK; case ':': return COLON; case '.': return DOT; case '|': if (in.match('|')) { return OR; } else if (in.match('=')) { this.op = BITOR; return ASSIGN; } else { return BITOR; } case '^': if (in.match('=')) { this.op = BITXOR; return ASSIGN; } else { return BITXOR; } case '&': if (in.match('&')) { return AND; } else if (in.match('=')) { this.op = BITAND; return ASSIGN; } else { return BITAND; } case '=': if (in.match('=')) { if (in.match('=')) this.op = SHEQ; else this.op = EQ; return EQOP; } else { this.op = NOP; return ASSIGN; } case '!': if (in.match('=')) { if (in.match('=')) this.op = SHNE; else this.op = NE; return EQOP; } else { this.op = NOT; return UNARYOP; } case '<': /* NB:treat HTML begin-comment as comment-till-eol */ if (in.match('!')) { if (in.match('-')) { if (in.match('-')) { while ((c = in.read()) != EOF_CHAR && c != '\n') /* skip to end of line */; in.unread(); return getToken(); // in place of 'goto retry' } in.unread(); } in.unread(); } if (in.match('<')) { if (in.match('=')) { this.op = LSH; return ASSIGN; } else { this.op = LSH; return SHOP; } } else { if (in.match('=')) { this.op = LE; return RELOP; } else { this.op = LT; return RELOP; } } case '>': if (in.match('>')) { if (in.match('>')) { if (in.match('=')) { this.op = URSH; return ASSIGN; } else { this.op = URSH; return SHOP; } } else { if (in.match('=')) { this.op = RSH; return ASSIGN; } else { this.op = RSH; return SHOP; } } } else { if (in.match('=')) { this.op = GE; return RELOP; } else { this.op = GT; return RELOP; } } case '*': if (in.match('=')) { this.op = MUL; return ASSIGN; } else { return MUL; } case '/': // is it a // comment? if (in.match('/')) { while ((c = in.read()) != EOF_CHAR && c != '\n') /* skip to end of line */; in.unread(); return getToken(); } if (in.match('*')) { while ((c = in.read()) != -1 && !(c == '*' && in.match('/'))) { ; // empty loop body } if (c == EOF_CHAR) { reportSyntaxError("msg.unterminated.comment", null); return ERROR; } return getToken(); // `goto retry' } // is it a regexp? if ((flags & TSF_REGEXP) != 0) { // We don't try to use the in.startString/in.getString // approach, because escaped characters (which break it) // seem likely to be common. StringBuffer re = new StringBuffer(); while ((c = in.read()) != '/') { if (c == '\n' || c == EOF_CHAR) { in.unread(); reportSyntaxError("msg.unterminated.re.lit", null); return ERROR; } if (c == '\\') { re.append((char) c); c = in.read(); } re.append((char) c); } StringBuffer flagsBuf = new StringBuffer(); while (true) { if (in.match('g')) flagsBuf.append('g'); else if (in.match('i')) flagsBuf.append('i'); else if (in.match('m')) flagsBuf.append('m'); else break; } if (isAlpha(in.peek())) { reportSyntaxError("msg.invalid.re.flag", null); return ERROR; } this.string = re.toString(); this.regExpFlags = flagsBuf.toString(); return OBJECT; } if (in.match('=')) { this.op = DIV; return ASSIGN; } else { return DIV; } case '%': this.op = MOD; if (in.match('=')) { return ASSIGN; } else { return MOD; } case '~': this.op = BITNOT; return UNARYOP; case '+': case '-': if (in.match('=')) { if (c == '+') { this.op = ADD; return ASSIGN; } else { this.op = SUB; return ASSIGN; } } else if (in.match((char) c)) { if (c == '+') { return INC; } else { return DEC; } } else if (c == '-') { return SUB; } else { return ADD; } default: reportSyntaxError("msg.illegal.character", null); return ERROR; } } | 19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/5220fdb55a7afd4a0c4a0d02f8a489ee87fa676c/TokenStream.java/clean/src/org/mozilla/javascript/TokenStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
9162,
1435,
1216,
1860,
288,
3639,
509,
276,
31,
3639,
1147,
2135,
9904,
31,
3639,
368,
2073,
364,
18543,
17,
823,
1147,
3639,
309,
261,
2211,
18,
6206,
823,
1345,
480,
6431,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
9162,
1435,
1216,
1860,
288,
3639,
509,
276,
31,
3639,
1147,
2135,
9904,
31,
3639,
368,
2073,
364,
18543,
17,
823,
1147,
3639,
309,
261,
2211,
18,
6206,
823,
1345,
480,
6431,
... |
case ( LineStyle.DASH_DOTTED ) : | case ( LineStyle.DASH_DOTTED ) : | public void drawRectangle( RectangleRenderEvent rre ) throws ChartException { // CHECK IF THE LINE ATTRIBUTES ARE CORRECTLY DEFINED final LineAttributes lia = rre.getOutline( ); if ( !validateLineAttributes( rre.getSource( ), lia ) ) { return; } // SETUP THE FOREGROUND COLOR (DARKER BACKGROUND IF DEFINED AS NULL) final Color cFG = (Color) validateEdgeColor( lia.getColor( ), rre.getBackground( ), _ids ); if ( cFG == null ) { return; } // DRAW THE RECTANGLE WITH THE APPROPRIATE LINE STYLE final int iOldLineStyle = _gc.getLineStyle( ); final int iOldLineWidth = _gc.getLineWidth( ); int iLineStyle = SWT.LINE_SOLID; switch ( lia.getStyle( ).getValue( ) ) { case ( LineStyle.DOTTED ) : iLineStyle = SWT.LINE_DOT; break; case ( LineStyle.DASH_DOTTED ) : iLineStyle = SWT.LINE_DASHDOT; break; case ( LineStyle.DASHED ) : iLineStyle = SWT.LINE_DASH; break; } _gc.setLineStyle( iLineStyle ); _gc.setLineWidth( lia.getThickness( ) ); final Bounds bo = normalizeBounds( rre.getBounds( ) ); _gc.setForeground( cFG ); R31Enhance.setAlpha( _gc, lia.getColor( ) ); _gc.drawRectangle( (int) ( ( bo.getLeft( ) + dTranslateX ) * dScale ), (int) ( ( bo.getTop( ) + dTranslateY ) * dScale ), (int) ( bo.getWidth( ) * dScale ) - 1, (int) ( bo.getHeight( ) * dScale ) - 1 ); _gc.setLineStyle( iOldLineStyle ); _gc.setLineWidth( iOldLineWidth ); cFG.dispose( ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/bd39aef05872b463576ce02ea4142048cb79a103/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,
3724,
19463,
12,
13264,
3420,
1133,
436,
266,
262,
1216,
14804,
503,
202,
95,
202,
202,
759,
14565,
11083,
12786,
14340,
14043,
18744,
432,
862,
28359,
4512,
7076,
2030,
7263... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3724,
19463,
12,
13264,
3420,
1133,
436,
266,
262,
1216,
14804,
503,
202,
95,
202,
202,
759,
14565,
11083,
12786,
14340,
14043,
18744,
432,
862,
28359,
4512,
7076,
2030,
7263... |
if (beginLong > endLong) { if (isStrict) { throw getRuntime().newRangeError(inspect().toString() + " out of range."); } return null; | if (beginLong > endLong && isStrict) { throw getRuntime().newRangeError(inspect().toString() + " out of range."); | public long[] getBeginLength(long limit, boolean truncate, boolean isStrict) { long beginLong = RubyNumeric.num2long(begin); long endLong = RubyNumeric.num2long(end); if (! isExclusive) { endLong++; } if (beginLong < 0) { beginLong += limit; if (beginLong < 0) { if (isStrict) { throw getRuntime().newRangeError(inspect().toString() + " out of range."); } return null; } } if (truncate && beginLong > limit) { if (isStrict) { throw getRuntime().newRangeError(inspect().toString() + " out of range."); } return null; } if (truncate && endLong > limit) { endLong = limit; } if (endLong < 0 || (!isExclusive && endLong == 0)) { endLong += limit; if (endLong < 0) { if (isStrict) { throw getRuntime().newRangeError(inspect().toString() + " out of range."); } return null; } } if (beginLong > endLong) { if (isStrict) { throw getRuntime().newRangeError(inspect().toString() + " out of range."); } return null; } return new long[] { beginLong, endLong - beginLong }; } | 45221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45221/60631867f8ea7a39c6966c08ea0adb7b49393e6a/RubyRange.java/clean/src/org/jruby/RubyRange.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1525,
8526,
25282,
1782,
12,
5748,
1800,
16,
1250,
10310,
16,
1250,
353,
14809,
13,
288,
3639,
1525,
2376,
3708,
273,
19817,
9902,
18,
2107,
22,
5748,
12,
10086,
1769,
3639,
1525,
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,
1071,
1525,
8526,
25282,
1782,
12,
5748,
1800,
16,
1250,
10310,
16,
1250,
353,
14809,
13,
288,
3639,
1525,
2376,
3708,
273,
19817,
9902,
18,
2107,
22,
5748,
12,
10086,
1769,
3639,
1525,
6... |
element instanceof PsiDoWhileStatement || element instanceof PsiForeachStatement || element instanceof PsiForStatement; | element instanceof PsiDoWhileStatement || element instanceof PsiForeachStatement || element instanceof PsiForStatement; | private static boolean isLoop(@NotNull PsiElement element){ return element instanceof PsiWhileStatement || element instanceof PsiDoWhileStatement || element instanceof PsiForeachStatement || element instanceof PsiForStatement; } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/b54c8091338ae57ef7018b62fb0717085d77cda8/ControlFlowUtils.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/psiutils/ControlFlowUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
353,
6452,
26964,
5962,
453,
7722,
1046,
930,
15329,
3639,
327,
930,
1276,
453,
7722,
15151,
3406,
747,
27573,
930,
1276,
453,
7722,
3244,
15151,
3406,
747,
27573,
930,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
377,
3238,
760,
1250,
353,
6452,
26964,
5962,
453,
7722,
1046,
930,
15329,
3639,
327,
930,
1276,
453,
7722,
15151,
3406,
747,
27573,
930,
1276,
453,
7722,
3244,
15151,
3406,
747,
27573,
930,
127... |
if (contentProvider != null) { contentProvider.dispose(); } if (labelProvider != null) { labelProvider.dispose(); } | try { if (contentProvider != null) { contentProvider.dispose(); } if (labelProvider != null) { labelProvider.dispose(); } } catch (Throwable t) { String msg = t.getMessage() != null ? t.getMessage() : t.toString() ; NavigatorPlugin.logError(0, msg, t); } | public void dispose() { try { synchronized (this) { if (contentProvider != null) { contentProvider.dispose(); } if (labelProvider != null) { labelProvider.dispose(); } } } finally { isDisposed = true; } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/9657fbef59474027d3657e55a8ce4f7a8cd8f9f1/NavigatorContentExtension.java/buggy/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentExtension.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
15825,
1435,
288,
202,
202,
698,
288,
1082,
202,
22043,
261,
2211,
13,
288,
9506,
202,
430,
261,
1745,
2249,
480,
446,
13,
288,
6862,
202,
1745,
2249,
18,
2251,
4150,
562... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15825,
1435,
288,
202,
202,
698,
288,
1082,
202,
22043,
261,
2211,
13,
288,
9506,
202,
430,
261,
1745,
2249,
480,
446,
13,
288,
6862,
202,
1745,
2249,
18,
2251,
4150,
562... |
_messageEncoding = browser().messageEncodingForLanguage(_localizer.language()); | if (browser()!= null) { _messageEncoding = browser().messageEncodingForLanguage(_localizer.language()); } | public void setLanguage(String language) { ERXLocalizer newLocalizer = ERXLocalizer.localizerForLanguage(language); if (! newLocalizer.equals(_localizer)) { if (_localizer == null && ! WOApplication.application().isCachingEnabled()) observer().registerForLocalizationDidResetNotification(); _localizer = newLocalizer; ERXLocalizer.setCurrentLocalizer(_localizer); _messageEncoding = browser().messageEncodingForLanguage(_localizer.language()); NSMutableArray languageList = new NSMutableArray(_localizer.language()); if (! languageList.containsObject("Nonlocalized")) languageList.addObject("Nonlocalized"); setLanguages(languageList); } } | 17168 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17168/f8c916a8c7daa084550de4d8e57a06ce7fc8a070/ERXSession.java/buggy/Common/Frameworks/ERExtensions/Sources/er/extensions/ERXSession.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
28993,
12,
780,
2653,
13,
288,
3639,
4232,
60,
2042,
1824,
394,
2042,
1824,
273,
4232,
60,
2042,
1824,
18,
3729,
1824,
1290,
3779,
12,
4923,
1769,
3639,
309,
16051,
394,
2042,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
28993,
12,
780,
2653,
13,
288,
3639,
4232,
60,
2042,
1824,
394,
2042,
1824,
273,
4232,
60,
2042,
1824,
18,
3729,
1824,
1290,
3779,
12,
4923,
1769,
3639,
309,
16051,
394,
2042,
... |
false ); | false, this.session ); | private void makeFirstPassToMultiPassFilter( FilterPassController filterPass ) throws DataException { filterPass.setForceReset( true ); // First set pass level to first, the value of pass level will finally // affect the behavior of TopN/BottomN filters, that is, the instance of // org.eclipse.birt.data.engine.script.NEvaluator filterPass.setPassLevel( FilterPassController.FIRST_PASS ); filterPass.setRowCount( populator.getCache( ).getCount( ) ); List temp = new ArrayList( ); temp.addAll( filterByRow.getFilterList( ) ); filterByRow.getFilterList( ).clear( ); for ( int i = 0; i < temp.size( ); i++ ) { if ( FilterUtil.isFilterNeedMultiPass( (IFilterDefinition) temp.get( i ) ) ) { filterByRow.getFilterList( ).add( temp.get( i ) ); } } PassUtil.pass( populator, new OdiResultSetWrapper( populator.getResultIterator( ) ), false ); filterByRow.getFilterList( ).clear( ); filterByRow.getFilterList( ).addAll( temp ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/0049044a5bef6d7cacb43d07aaac96e021a89ed5/FilterCalculator.java/clean/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/transform/pass/FilterCalculator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1221,
3759,
6433,
774,
5002,
6433,
1586,
12,
4008,
6433,
2933,
1034,
6433,
262,
1082,
202,
15069,
1910,
503,
202,
95,
202,
202,
2188,
6433,
18,
542,
10997,
7013,
12,
638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1221,
3759,
6433,
774,
5002,
6433,
1586,
12,
4008,
6433,
2933,
1034,
6433,
262,
1082,
202,
15069,
1910,
503,
202,
95,
202,
202,
2188,
6433,
18,
542,
10997,
7013,
12,
638,
... |
VM_Address oldContent = VM_Address.fromInt(slots[slot]); slots[slot] = newContent.toInt(); VM_RCBuffers.addIncrementAndDecrement(newContent, oldContent, VM_Processor.getCurrentProcessor()); | VM.sysWrite("WARNING - setSlotContents of int for reference slot, value = "); VM.sysWrite(value); VM.sysWrite("\n"); | static void setSlotContents(int slot, Object object) { VM_Address newContent = VM_Magic.objectAsAddress(object); if (VM.BuildForConcurrentGC && VM.runningVM) { VM_Address oldContent = VM_Address.fromInt(slots[slot]); slots[slot] = newContent.toInt(); //-#if RVM_WITH_CONCURRENT_GC // because VM_RCBuffers only available for concurrent memory managers VM_RCBuffers.addIncrementAndDecrement(newContent, oldContent, VM_Processor.getCurrentProcessor()); //-#endif } else slots[slot] = newContent.toInt(); } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/4bdcfd89af42d1c4725b81c48f2ebe6f7e29ed82/VM_Statics.java/buggy/rvm/src/vm/runtime/VM_Statics.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
918,
444,
8764,
6323,
12,
474,
4694,
16,
1033,
733,
13,
288,
1377,
8251,
67,
1887,
24358,
273,
8251,
67,
19289,
18,
1612,
1463,
1887,
12,
1612,
1769,
1377,
309,
261,
7397,
18,
3116... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
8764,
6323,
12,
474,
4694,
16,
1033,
733,
13,
288,
1377,
8251,
67,
1887,
24358,
273,
8251,
67,
19289,
18,
1612,
1463,
1887,
12,
1612,
1769,
1377,
309,
261,
7397,
18,
3116... |
XRLog.layout(Level.FINEST, "is a fixed child: " + body_box.isChildrenExceedBounds()); | XRLog.layout(Level.FINEST, "is a fixed child: " + root.isChildrenExceedBounds()); | public void doActualLayout(Graphics g) { //Uu.p("doActualLayout called"); this.removeAll(); if (g == null) { return; } if (doc == null) { return; }// set up CSS Context c = newContext(pageInfo, (Graphics2D) g); synchronized (this) { if (this.layout_context != null) this.layout_context.stopRendering(); this.layout_context = c; } c.setRenderQueue(queue); setRenderWidth((int) c.getExtents().getWidth()); getRenderingContext().getTextRenderer().setupGraphics(c.getGraphics());//TODO: maybe temporary hack if (c.getBlockFormattingContext() != null) c.popBFC();//we set one for the top level before // do the actual layout//Uu.p("doing actual layout here"); Box root = Boxing.preLayout(c, new DomToplevelNode(doc)); setRootBox(root); Boxing.realLayout(c, root, new DomToplevelNode(doc));//Uu.p("body box = " + body_box); if (!c.isStylesAllPopped()) { XRLog.layout(Level.SEVERE, "mismatch in style popping and pushing"); } if (c.shouldStop()) {//interrupted layout return; } XRLog.layout(Level.FINEST, "is a fixed child: " + body_box.isChildrenExceedBounds());// if there is a fixed child then we need to set opaque to false// so that the entire viewport will be repainted. this is slower// but that's the hit you get from using fixed layout if (body_box.isChildrenExceedBounds()) { super.setOpaque(false); } else { super.setOpaque(true); } getRenderingContext().setRootBox(body_box); XRLog.layout(Level.FINEST, "after layout: " + body_box); intrinsic_size = new Dimension(getContext().getMaxWidth(), body_box.height); //Uu.p("intrinsic size = " + intrinsic_size); if (intrinsic_size.width != this.getWidth()) { //Uu.p("intrisic and this widths don't match: " + this.getSize() + " " + intrinsic_size); this.setPreferredSize(new Dimension(intrinsic_size.width, this.getHeight())); //this.setPreferredSize(intrinsic_size); this.revalidate(); } // if doc is shorter than viewport // then stretch canvas to fill viewport exactly // then adjust the body element accordingly if (enclosingScrollPane != null) { if (intrinsic_size.height < enclosingScrollPane.getViewport().getHeight()) { //Uu.p("int height is less than viewport height"); if (enclosingScrollPane.getViewport().getHeight() != this.getHeight()) { this.setPreferredSize(new Dimension(getWidth(), enclosingScrollPane.getViewport().getHeight())); this.revalidate(); } //Uu.p("need to do the body hack"); if (body_box != null) { body_box.height = enclosingScrollPane.getViewport().getHeight(); bodyExpandHack(body_box, body_box.height); intrinsic_size.height = body_box.height; } } else { // if doc is taller than viewport if (this.getHeight() != intrinsic_size.height) { this.setPreferredSize(new Dimension(getWidth(), intrinsic_size.height)); this.revalidate(); } } // turn on simple scrolling mode if there's any fixed elements if (body_box.isFixedDescendant()) { // Uu.p("is fixed"); enclosingScrollPane.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE); } else { // Uu.p("is not fixed"); enclosingScrollPane.getViewport().setScrollMode(default_scroll_mode); } } queue.dispatchRepaintEvent(new ReflowEvent(ReflowEvent.LAYOUT_COMPLETE)); this.fireDocumentLoaded(); } | 53937 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53937/2486e0a7d32e8bf7a5ba0aa3c3626b52ad12da3c/RootPanel.java/clean/src/java/org/xhtmlrenderer/swing/RootPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
11266,
3744,
12,
17558,
314,
13,
288,
3639,
368,
57,
89,
18,
84,
2932,
2896,
11266,
3744,
2566,
8863,
3639,
333,
18,
4479,
1595,
5621,
3639,
309,
261,
75,
422,
446,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
11266,
3744,
12,
17558,
314,
13,
288,
3639,
368,
57,
89,
18,
84,
2932,
2896,
11266,
3744,
2566,
8863,
3639,
333,
18,
4479,
1595,
5621,
3639,
309,
261,
75,
422,
446,
13,
... |
this.properSupertypeListInBFSOrder = new ArrayList<ObjectType>(); | this.supertypeListInBFSOrder = new ArrayList<ObjectType>(); | public SubtypeQueryResult() { this.supertypeSet = new BitSet(); this.properSupertypeListInBFSOrder = new ArrayList<ObjectType>(); this.missingClassList = emptyList; } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/dba9d5cfffd6dd9e5f91fca2aaeab761e67f9e71/SubtypeQueryResult.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/ba/type/SubtypeQueryResult.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2592,
723,
23583,
1435,
288,
202,
202,
2211,
18,
9565,
723,
694,
273,
394,
21199,
5621,
202,
202,
2211,
18,
22754,
8051,
723,
682,
382,
38,
4931,
2448,
273,
394,
2407,
32,
176... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2592,
723,
23583,
1435,
288,
202,
202,
2211,
18,
9565,
723,
694,
273,
394,
21199,
5621,
202,
202,
2211,
18,
22754,
8051,
723,
682,
382,
38,
4931,
2448,
273,
394,
2407,
32,
176... |
throw new InvalidConfigValueException("Negative values not supported"); | throw new InvalidConfigValueException("Negative or zero values not supported"); | public void set(long val) throws InvalidConfigValueException { if(val < 0) throw new InvalidConfigValueException("Negative values not supported"); envMutableConfig.setCacheSize(val); } | 51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/467b47f618151c0e29727408b4581a3e6334c383/Node.java/buggy/src/freenet/node/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
444,
12,
5748,
1244,
13,
1216,
1962,
809,
9738,
288,
9506,
202,
430,
12,
1125,
411,
374,
13,
6862,
202,
12849,
394,
1962,
809,
9738,
2932,
14959,
924,
486,
3260,
8863,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
444,
12,
5748,
1244,
13,
1216,
1962,
809,
9738,
288,
9506,
202,
430,
12,
1125,
411,
374,
13,
6862,
202,
12849,
394,
1962,
809,
9738,
2932,
14959,
924,
486,
3260,
8863,
9... |
ha = new Attribute(key, (String) Store.get(key)); | ha = new SportletUserImplAttribute(key, (String) Store.get(key)); | private void convert2vector() { Enumeration allkeys = Store.keys(); Attribute ha = null; while (allkeys.hasMoreElements()) { String key = (String) allkeys.nextElement(); ha = new Attribute(key, (String) Store.get(key)); ha.setUser(this); Attributes.add(ha); } } | 49343 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49343/b05a2186ca9ab0f19dec819b672eef48742732b4/SportletUserImpl.java/buggy/src/org/gridlab/gridsphere/portlet/impl/SportletUserImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1765,
22,
7737,
1435,
288,
3639,
13864,
777,
2452,
273,
4994,
18,
2452,
5621,
3639,
3601,
10677,
273,
446,
31,
3639,
1323,
261,
454,
2452,
18,
5332,
7417,
3471,
10756,
288,
541... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1765,
22,
7737,
1435,
288,
3639,
13864,
777,
2452,
273,
4994,
18,
2452,
5621,
3639,
3601,
10677,
273,
446,
31,
3639,
1323,
261,
454,
2452,
18,
5332,
7417,
3471,
10756,
288,
541... |
addMenuItem(menu, "SGF Position...", KeyEvent.VK_S, "export-sgf-position"); addMenuItem(menu, "LaTeX Main Variation...", KeyEvent.VK_L, "export-latex"); addMenuItem(menu, "LaTeX Position...", KeyEvent.VK_P, "export-latex-position"); addMenuItem(menu, "Text Position...", KeyEvent.VK_T, "export-ascii"); | menu.addItem("SGF Position...", KeyEvent.VK_S, "export-sgf-position"); menu.addItem("LaTeX Main Variation...", KeyEvent.VK_L, "export-latex"); menu.addItem("LaTeX Position...", KeyEvent.VK_P, "export-latex-position"); menu.addItem("Text Position...", KeyEvent.VK_T, "export-ascii"); | private JMenu createMenuExport() { JMenu menu = new JMenu("Export"); menu.setMnemonic(KeyEvent.VK_E); addMenuItem(menu, "SGF Position...", KeyEvent.VK_S, "export-sgf-position"); addMenuItem(menu, "LaTeX Main Variation...", KeyEvent.VK_L, "export-latex"); addMenuItem(menu, "LaTeX Position...", KeyEvent.VK_P, "export-latex-position"); addMenuItem(menu, "Text Position...", KeyEvent.VK_T, "export-ascii"); return menu; } | 51310 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51310/d10ef3afb87b5fa533364efda721c197866c21a6/GoGuiMenuBar.java/buggy/src/net/sf/gogui/gogui/GoGuiMenuBar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
804,
4599,
752,
4599,
6144,
1435,
565,
288,
3639,
804,
4599,
3824,
273,
394,
804,
4599,
2932,
6144,
8863,
3639,
3824,
18,
542,
29668,
20918,
12,
653,
1133,
18,
58,
47,
67,
41,
176... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
804,
4599,
752,
4599,
6144,
1435,
565,
288,
3639,
804,
4599,
3824,
273,
394,
804,
4599,
2932,
6144,
8863,
3639,
3824,
18,
542,
29668,
20918,
12,
653,
1133,
18,
58,
47,
67,
41,
176... |
saveProjectItemActionPerformed(evt); } | saveProjectItemActionPerformed(evt); } | public void actionPerformed(java.awt.event.ActionEvent evt) { saveProjectItemActionPerformed(evt); } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/4748a5a9b76f3dd763ee6bc7755c932a711bd6a6/FindBugsFrame.java/clean/findbugs/src/java/edu/umd/cs/findbugs/gui/FindBugsFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
918,
26100,
12,
6290,
18,
2219,
88,
18,
2575,
18,
1803,
1133,
6324,
13,
288,
10792,
1923,
4109,
1180,
19449,
12,
73,
11734,
1769,
7734,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
918,
26100,
12,
6290,
18,
2219,
88,
18,
2575,
18,
1803,
1133,
6324,
13,
288,
10792,
1923,
4109,
1180,
19449,
12,
73,
11734,
1769,
7734,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
protected static String proxyToString(Object aProxy) { | protected static String proxyToString(Object aProxy) { | protected static String proxyToString(Object aProxy) { return aProxy.getClass().getInterfaces()[0].getName() + '@' + Integer.toHexString(aProxy.hashCode()); } | 13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/c385b2e9fc8073db7044d932ee6cd2f136fea61a/XPCOMJavaProxy.java/clean/extensions/java/xpcom/XPCOMJavaProxy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
760,
514,
2889,
5808,
12,
921,
279,
3886,
13,
225,
288,
565,
327,
279,
3886,
18,
588,
797,
7675,
588,
10273,
1435,
63,
20,
8009,
17994,
1435,
397,
9175,
397,
6647,
2144,
18,
869,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
282,
4750,
760,
514,
2889,
5808,
12,
921,
279,
3886,
13,
225,
288,
565,
327,
279,
3886,
18,
588,
797,
7675,
588,
10273,
1435,
63,
20,
8009,
17994,
1435,
397,
9175,
397,
6647,
2144,
18,
869,
... |
if(!hex.containsTerrain(Terrains.FUEL_TANK) && !hex.containsTerrain(Terrains.JUNGLE) && !hex.containsTerrain(Terrains.MAGMA) && !hex.containsTerrain(Terrains.MUD) && !hex.containsTerrain(Terrains.RUBBLE) && !hex.containsTerrain(Terrains.WATER) && !hex.containsTerrain(Terrains.WOODS) && doSkillCheckInPlace(t, psr)) { int elevation = Math.max(hex.terrainLevel(Terrains.BLDG_ELEV), hex.terrainLevel(Terrains.BRIDGE_ELEV)); elevation = Math.max(elevation,0); elevation = Math.min(elevation, t.getElevation()); t.setElevation(elevation); } else { vDesc.addAll(crashVTOL((VTOL)t)); | int elevation = Math.max(hex.terrainLevel(Terrains.BLDG_ELEV), hex.terrainLevel(Terrains.BRIDGE_ELEV)); elevation = Math.max(elevation,0); elevation = Math.min(elevation, t.getElevation()); if(t.getElevation() > elevation) { if(!hex.containsTerrain(Terrains.FUEL_TANK) && !hex.containsTerrain(Terrains.JUNGLE) && !hex.containsTerrain(Terrains.MAGMA) && !hex.containsTerrain(Terrains.MUD) && !hex.containsTerrain(Terrains.RUBBLE) && !hex.containsTerrain(Terrains.WATER) && !hex.containsTerrain(Terrains.WOODS)) { r = new Report(2180); r.subject = t.getId(); r.addDesc(t); r.add(psr.getLastPlainDesc(), true); vDesc.add(r); final int diceRoll = Compute.d6(2); r = new Report(2185); r.subject = t.getId(); r.add(psr.getValueAsString()); r.add(psr.getDesc()); r.add(diceRoll); if (diceRoll < psr.getValue()) { r.choose(false); vDesc.add(r); vDesc.addAll(crashVTOL((VTOL)t)); } else { r.choose(true); vDesc.add(r); t.setElevation(elevation); } } else { vDesc.addAll(crashVTOL((VTOL)t)); } | private Vector<Report> criticalTank(Tank t, int loc, int critMod) { Vector<Report> vDesc = new Vector<Report>(); Report r; //roll the critical r = new Report(6305); r.subject = t.getId(); r.indent(2); r.add(t.getLocationAbbr(loc)); r.newlines = 0; vDesc.add(r); int roll = Compute.d6(2); r = new Report(6310); r.subject = t.getId(); String rollString = ""; if ( critMod != 0 ) { rollString = "(" + roll; if ( critMod > 0 ) { rollString += "+"; } rollString += critMod + ") = "; roll += critMod; } rollString += roll; r.add(rollString); r.newlines = 0; vDesc.add(r); HitData hit; //now look up on vehicle crits table int critType = t.getCriticalEffect(roll, loc); switch(critType) { case Tank.CRIT_NONE: //no effect r = new Report(6005); r.subject = t.getId(); vDesc.add(r); break; case Tank.CRIT_AMMO: //ammo explosion r = new Report(6610); r.subject = t.getId(); vDesc.add(r); int damage = 0; for(Mounted m:t.getAmmo()) { m.setHit(true); int tmp = m.getShotsLeft() * ((AmmoType)m.getType()).getDamagePerShot(); damage += tmp; r = new Report(6390); r.subject = t.getId(); r.add(m.getName()); r.add(tmp); r.newlines = 0; vDesc.add(r); } hit = new HitData(loc); vDesc.addAll(damageEntity(t, hit, damage, true)); break; case Tank.CRIT_CARGO: //Cargo/infantry damage r = new Report(6615); r.subject = t.getId(); vDesc.add(r); Vector<Entity> passengers = t.getLoadedUnits(); Entity target = passengers.get(Compute.randomInt(passengers.size())); hit = target.rollHitLocation(ToHitData.HIT_NORMAL, ToHitData.SIDE_FRONT); vDesc.addAll(damageEntity(t, hit, 10)); //FIXME should be original weapon damage break; case Tank.CRIT_COMMANDER: r = new Report(6600); r.subject = t.getId(); vDesc.add(r); t.setCommanderHit(true); break; case Tank.CRIT_DRIVER: r = new Report(6605); r.subject = t.getId(); vDesc.add(r); t.setCommanderHit(true); break; case Tank.CRIT_CREW_KILLED: r = new Report(6190); r.subject = t.getId(); vDesc.add(r); t.getCrew().setDoomed(true); break; case Tank.CRIT_CREW_STUNNED: r = new Report(6185); r.subject = t.getId(); vDesc.add(r); t.stunCrew(); break; case Tank.CRIT_ENGINE: r = new Report(6210); r.subject = t.getId(); vDesc.add(r); t.immobilize(); t.lockTurret(); for(Mounted m:t.getWeaponList()) { WeaponType wtype = (WeaponType)m.getType(); if(wtype.hasFlag(WeaponType.F_ENERGY)) m.setBreached(true); //not destroyed, just unpowered } if(t instanceof VTOL) { PilotingRollData psr = t.getBasePilotingRoll(); IHex hex = game.getBoard().getHex(t.getPosition()); psr.addModifier(4, "forced landing"); if(!hex.containsTerrain(Terrains.FUEL_TANK) && !hex.containsTerrain(Terrains.JUNGLE) && !hex.containsTerrain(Terrains.MAGMA) && !hex.containsTerrain(Terrains.MUD) && !hex.containsTerrain(Terrains.RUBBLE) && !hex.containsTerrain(Terrains.WATER) && !hex.containsTerrain(Terrains.WOODS) && doSkillCheckInPlace(t, psr)) { int elevation = Math.max(hex.terrainLevel(Terrains.BLDG_ELEV), hex.terrainLevel(Terrains.BRIDGE_ELEV)); elevation = Math.max(elevation,0); elevation = Math.min(elevation, t.getElevation()); t.setElevation(elevation); } else { vDesc.addAll(crashVTOL((VTOL)t)); } } break; case Tank.CRIT_FUEL_TANK: r = new Report(6215); r.subject = t.getId(); vDesc.add(r); vDesc.addAll(destroyEntity(t, "fuel explosion", false, false)); break; case Tank.CRIT_SENSOR: r = new Report(6620); r.subject = t.getId(); vDesc.add(r); t.setSensorHits(t.getSensorHits() + 1); break; case Tank.CRIT_STABILIZER: r = new Report(6625); r.subject = t.getId(); vDesc.add(r); t.setStabiliserHit(loc); break; case Tank.CRIT_TURRET_DESTROYED: r = new Report(6630); r.subject = t.getId(); vDesc.add(r); destroyLocation(t,Tank.LOC_TURRET); break; case Tank.CRIT_TURRET_JAM: //TODO: this should be clearable r = new Report(6635); r.subject = t.getId(); vDesc.add(r); t.lockTurret(); break; case Tank.CRIT_TURRET_LOCK: r = new Report(6640); r.subject = t.getId(); vDesc.add(r); t.lockTurret(); break; case Tank.CRIT_WEAPON_DESTROYED: { r = new Report(6305); r.subject = t.getId(); ArrayList<Mounted> weapons = t.getWeaponList(); Mounted weapon = weapons.get(Compute.randomInt(weapons.size())); weapon.setHit(true); weapon.setDestroyed(true); r.add(weapon.getName()); vDesc.add(r); break; } case Tank.CRIT_WEAPON_JAM: { r = new Report(6645); r.subject = t.getId(); ArrayList<Mounted> weapons = t.getWeaponList(); Mounted weapon = weapons.get(Compute.randomInt(weapons.size())); weapon.setJammed(true); r.add(weapon.getName()); vDesc.add(r); break; } case VTOL.CRIT_PILOT: r = new Report(6650); r.subject = t.getId(); vDesc.add(r); t.setDriverHit(true); PilotingRollData psr = t.getBasePilotingRoll(); psr.addModifier(0, "pilot injury"); if(!doSkillCheckInPlace(t, psr)) { r = new Report(6675); r.subject = t.getId(); r.addDesc(t); vDesc.add(r); boolean crash = true; if(t.canGoDown()) { t.setElevation(t.getElevation() - 1); crash = !t.canGoDown(); } if(crash) { vDesc.addAll(crashVTOL((VTOL)t)); } } break; case VTOL.CRIT_COPILOT: r = new Report(6655); r.subject = t.getId(); vDesc.add(r); t.setCommanderHit(true); break; case VTOL.CRIT_ROTOR_DAMAGE: { r = new Report(6660); r.subject = t.getId(); vDesc.add(r); int mp = t.getOriginalWalkMP(); if(mp > 1) t.setOriginalWalkMP(mp - 1); else if (mp==1) { t.setOriginalWalkMP(0); crashVTOL((VTOL)t); } break; } case VTOL.CRIT_ROTOR_DESTROYED: r = new Report(6670); r.subject = t.getId(); vDesc.add(r); t.immobilize(); destroyLocation(t,VTOL.LOC_ROTOR); vDesc.addAll(crashVTOL((VTOL)t)); break; case VTOL.CRIT_FLIGHT_STABILIZER: r = new Report(6665); r.subject = t.getId(); vDesc.add(r); t.setStabiliserHit(VTOL.LOC_ROTOR); break; } return vDesc; } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/3258318bac3f852831eb239b069f10b7ded41baa/Server.java/clean/megamek/src/megamek/server/Server.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
5589,
32,
4820,
34,
11239,
56,
2304,
12,
56,
2304,
268,
16,
509,
1515,
16,
509,
7921,
1739,
13,
288,
3639,
5589,
32,
4820,
34,
331,
4217,
273,
394,
5589,
32,
4820,
34,
5621,
363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5589,
32,
4820,
34,
11239,
56,
2304,
12,
56,
2304,
268,
16,
509,
1515,
16,
509,
7921,
1739,
13,
288,
3639,
5589,
32,
4820,
34,
331,
4217,
273,
394,
5589,
32,
4820,
34,
5621,
363... |
private void displayError(final String message) { parentShell.getDisplay().syncExec(new Runnable() { | private void displayError(final IStatus status) { messageShell.getDisplay().syncExec(new Runnable() { | private void displayError(final String message) { parentShell.getDisplay().syncExec(new Runnable() { public void run() { MessageDialog.openError(parentShell, getProblemsTitle(), message); } }); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/4e60ccf650cbf211e49b0a25380ae798b0e6efaa/CopyFilesAndFoldersOperation.java/buggy/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyFilesAndFoldersOperation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2562,
668,
12,
6385,
514,
883,
13,
288,
202,
202,
2938,
13220,
18,
588,
4236,
7675,
8389,
1905,
12,
2704,
10254,
1435,
288,
1082,
202,
482,
918,
1086,
1435,
288,
9506,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2562,
668,
12,
6385,
514,
883,
13,
288,
202,
202,
2938,
13220,
18,
588,
4236,
7675,
8389,
1905,
12,
2704,
10254,
1435,
288,
1082,
202,
482,
918,
1086,
1435,
288,
9506,
2... |
if (t1 > t2) { | if (t1 > t2) { | JobTreeElement[] getJobInfos() { JobTreeElement[] all; if(keptjobinfos.isEmpty()) { return EMPTY_INFOS; } synchronized (keptjobinfos) { all = (JobTreeElement[]) keptjobinfos .toArray(new JobTreeElement[keptjobinfos.size()]); } Arrays.sort(all, new Comparator() { public int compare(Object o1, Object o2) { long t1 = getFinishedDateAsLong((JobTreeElement) o1); long t2 = getFinishedDateAsLong((JobTreeElement) o2); if (t1 < t2) { return -1; } if (t1 > t2) { return 1; } return 0; } }); return all; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/61a3852dd97cae660315c88e82302cd4c0301d5d/FinishedJobs.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/FinishedJobs.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3956,
2471,
1046,
8526,
13024,
7655,
1435,
288,
3639,
3956,
2471,
1046,
8526,
777,
31,
202,
202,
430,
12,
4491,
337,
4688,
18227,
18,
291,
1921,
10756,
288,
1082,
202,
2463,
8984,
67,
592... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2471,
1046,
8526,
13024,
7655,
1435,
288,
3639,
3956,
2471,
1046,
8526,
777,
31,
202,
202,
430,
12,
4491,
337,
4688,
18227,
18,
291,
1921,
10756,
288,
1082,
202,
2463,
8984,
67,
592... |
protected MenuManager createMenuManager() { MenuManager result = new MenuManager("menu"); final MenuManager menuManagerFile = new MenuManager("File"); result.add(menuManagerFile); menuManagerFile.add(newFileAction); menuManagerFile.add(openFileAction); menuManagerFile.add(new Separator()); String[] mruFiles = UserPreferences.getInstance().getMRUFiles(); if (mruFiles != null & mruFiles.length > 0) { for (int i = 0; i < mruFiles.length; i++) { String fileName = mruFiles[i]; String menuItem = "&" + (i + 1) + " " + new File(fileName).getName(); IAction nextMRUAction = new MRUFileAction(fileName, menuItem); menuManagerFile.add(nextMRUAction); } menuManagerFile.add(new Separator()); } menuManagerFile.add(saveFileAction); menuManagerFile.add(saveFileAsAction); menuManagerFile.add(new Separator()); final MenuManager menuManagerExportTo = new MenuManager("Export To"); menuManagerFile.add(menuManagerExportTo); menuManagerExportTo.add(exportToTextAction); menuManagerExportTo.add(exportToXMLAction); final MenuManager menuManagerImportFrom = new MenuManager("Import From"); menuManagerFile.add(menuManagerImportFrom); menuManagerImportFrom.add(importFromTextAction); menuManagerImportFrom.add(importFromXMLAction); menuManagerFile.add(new Separator()); menuManagerFile.add(exitAppAction); final MenuManager menuManagerEdit = new MenuManager("Edit"); result.add(menuManagerEdit); menuManagerEdit.add(addRecordAction); menuManagerEdit.add(editRecordAction); menuManagerEdit.add(deleteRecordAction); menuManagerEdit.add(new Separator()); menuManagerEdit.add(copyPasswordAction); menuManagerEdit.add(copyUsernameAction); menuManagerEdit.add(clearClipboardAction); final MenuManager menuManagerView = new MenuManager("View"); result.add(menuManagerView); menuManagerView.add(viewAsListAction); menuManagerView.add(viewAsTreeAction); final MenuManager menuManagerManage = new MenuManager("Manage"); result.add(menuManagerManage); menuManagerManage.add(changeSafeCombinationAction); menuManagerManage.add(new Separator()); menuManagerManage.add(optionsAction); final MenuManager menuManagerHelp = new MenuManager("Help"); result.add(menuManagerHelp); menuManagerHelp.add(helpAction); menuManagerHelp.add(new Separator()); menuManagerHelp.add(visitPasswordSafeWebsiteAction); menuManagerHelp.add(new Separator()); menuManagerHelp.add(aboutAction); return result; } | 5951 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5951/65a2b20cfc96e0d9804e136df0076651309900f1/PasswordSafeJFace.java/buggy/pwsafe/Java/PasswordSafeSWT/src/org/pwsafe/passwordsafeswt/PasswordSafeJFace.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
4599,
1318,
2640,
4599,
1318,
1435,
95,
202,
202,
4599,
1318,
2088,
33,
2704,
4599,
1318,
2932,
5414,
8863,
202,
202,
6385,
4599,
49,
940,
1035,
2104,
1318,
812,
33,
2704,
4599... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4599,
1318,
2640,
4599,
1318,
1435,
95,
202,
202,
4599,
1318,
2088,
33,
2704,
4599,
1318,
2932,
5414,
8863,
202,
202,
6385,
4599,
49,
940,
1035,
2104,
1318,
812,
33,
2704,
4599... | ||
MatchLoop: do | do | private final int jjMoveNfa_0(int startState, int curPos){ int strKind = jjmatchedKind; int strPos = jjmatchedPos; int seenUpto; input_stream.backup(seenUpto = curPos + 1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { throw new Error("Internal Error"); } curPos = 0; int[] nextStates; int startsAt = 0; jjnewStateCnt = 7; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 4: if ((0xefffffffffffffffL & l) != 0L) { if (kind > 7) kind = 7; jjCheckNAdd(5); } else if (curChar == 60) { if (kind > 7) kind = 7; } if ((0x100002600L & l) != 0L) { if (kind > 1) kind = 1; jjCheckNAdd(0); } else if (curChar == 60) jjstateSet[jjnewStateCnt++] = 1; break; case 0: if ((0x100002600L & l) == 0L) break; if (kind > 1) kind = 1; jjCheckNAdd(0); break; case 1: if (curChar == 33) jjCheckNAddTwoStates(2, 3); break; case 2: if ((0xbfffffffffffffffL & l) != 0L) jjCheckNAddTwoStates(2, 3); break; case 3: if (curChar == 62 && kind > 2) kind = 2; break; case 5: if ((0xefffffffffffffffL & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAdd(5); break; case 6: if (curChar == 60 && kind > 7) kind = 7; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 4: case 5: if (kind > 7) kind = 7; jjCheckNAdd(5); break; case 2: jjAddStates(0, 1); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 4: case 5: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 7) kind = 7; jjCheckNAdd(5); break; case 2: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjAddStates(0, 1); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 7 - (jjnewStateCnt = startsAt))) break; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { break; } } if (jjmatchedPos > strPos) return curPos; int toRet = Math.max(curPos, seenUpto); if (curPos < toRet) for (i = toRet - Math.min(curPos, seenUpto); i-- > 0; ) try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { throw new Error("Internal Error : Please send a bug report."); } if (jjmatchedPos < strPos) { jjmatchedKind = strKind; jjmatchedPos = strPos; } else if (jjmatchedPos == strPos && jjmatchedKind > strKind) jjmatchedKind = strKind; return toRet;} | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/01ac829cf7ae29319b3a7b2aa1463f4ce4c192ed/ParserTokenManager.java/buggy/core/org.eclipse.birt.core/src/org/eclipse/birt/core/template/ParserTokenManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
727,
509,
10684,
7607,
50,
507,
67,
20,
12,
474,
787,
1119,
16,
509,
662,
1616,
15329,
282,
509,
609,
5677,
273,
10684,
11073,
5677,
31,
282,
509,
609,
1616,
273,
10684,
11073,
1616,
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,
3238,
727,
509,
10684,
7607,
50,
507,
67,
20,
12,
474,
787,
1119,
16,
509,
662,
1616,
15329,
282,
509,
609,
5677,
273,
10684,
11073,
5677,
31,
282,
509,
609,
1616,
273,
10684,
11073,
1616,
3... |
PsiTreeUtil.getParentOfType(elementToCheck, PsiSynchronizedStatement.class); if (syncStatement != null) { final PsiExpression lockExpression = syncStatement.getLockExpression(); if (lockExpression instanceof PsiReferenceExpression) { final PsiReferenceExpression reference = (PsiReferenceExpression) lockExpression; final PsiElement referent = reference.resolve(); if (referent instanceof PsiField) { final PsiField referentField = (PsiField) referent; if (referentField.hasModifierProperty(PsiModifier.STATIC)) { isLockedOnClass = true; } else { isLockedOnInstance = true; } | PsiTreeUtil.getParentOfType(elementToCheck, PsiSynchronizedStatement.class); if (syncStatement == null) { break; } final PsiExpression lockExpression = syncStatement.getLockExpression(); if (lockExpression instanceof PsiReferenceExpression) { final PsiReferenceExpression reference = (PsiReferenceExpression) lockExpression; final PsiElement referent = reference.resolve(); if (referent instanceof PsiField) { final PsiField referentField = (PsiField) referent; if (referentField.hasModifierProperty( PsiModifier.STATIC)) { isLockedOnClass = true; } else { isLockedOnInstance = true; | public void visitReferenceExpression(PsiReferenceExpression expression) { super.visitReferenceExpression(expression); boolean isLockedOnInstance = false; boolean isLockedOnClass = false; final PsiMethod containingMethod = PsiTreeUtil.getParentOfType(expression, PsiMethod.class); if (containingMethod != null) { if (containingMethod.hasModifierProperty(PsiModifier.SYNCHRONIZED)) { if (containingMethod.hasModifierProperty(PsiModifier.STATIC)) { isLockedOnClass = true; } else { isLockedOnInstance = true; } } } PsiElement elementToCheck = expression; while (elementToCheck != null) { final PsiSynchronizedStatement syncStatement = PsiTreeUtil.getParentOfType(elementToCheck, PsiSynchronizedStatement.class); if (syncStatement != null) { final PsiExpression lockExpression = syncStatement.getLockExpression(); if (lockExpression instanceof PsiReferenceExpression) { final PsiReferenceExpression reference = (PsiReferenceExpression) lockExpression; final PsiElement referent = reference.resolve(); if (referent instanceof PsiField) { final PsiField referentField = (PsiField) referent; if (referentField.hasModifierProperty(PsiModifier.STATIC)) { isLockedOnClass = true; } else { isLockedOnInstance = true; } } } else if (lockExpression instanceof PsiThisExpression) { isLockedOnInstance = true; } else if (lockExpression instanceof PsiClassObjectAccessExpression) { isLockedOnClass = true; } } elementToCheck = syncStatement; } if (isLockedOnInstance && !isLockedOnClass) { final PsiElement referent = expression.resolve(); if (referent instanceof PsiField) { final PsiField referredField = (PsiField) referent; if (referredField.hasModifierProperty(PsiModifier.STATIC) && !isConstant(referredField)) { registerError(expression); } } } } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/2f5f667fbf5d68204e8e4a012b5d91dd367d29b0/AccessToStaticFieldLockedOnInstanceInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/threading/AccessToStaticFieldLockedOnInstanceInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
2404,
2300,
12,
52,
7722,
2404,
2300,
2652,
13,
288,
5411,
2240,
18,
11658,
2404,
2300,
12,
8692,
1769,
5411,
1250,
31753,
1398,
1442,
273,
629,
31,
5411,
1250,
31753,
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,
540,
1071,
918,
3757,
2404,
2300,
12,
52,
7722,
2404,
2300,
2652,
13,
288,
5411,
2240,
18,
11658,
2404,
2300,
12,
8692,
1769,
5411,
1250,
31753,
1398,
1442,
273,
629,
31,
5411,
1250,
31753,
13... |
public void setConstraints( Component comp, GridBagConstraints cons) { comptable.put(comp, (GridBagConstraints)cons.clone()); } | public void setConstraints (Component component, GridBagConstraints constraints) { GridBagConstraints clone = (GridBagConstraints) constraints.clone(); if (clone.gridx < 0) clone.gridx = GridBagConstraints.RELATIVE; if (clone.gridy < 0) clone.gridy = GridBagConstraints.RELATIVE; if (clone.gridwidth == 0) clone.gridwidth = GridBagConstraints.REMAINDER; else if (clone.gridwidth < 0 && clone.gridwidth != GridBagConstraints.REMAINDER && clone.gridwidth != GridBagConstraints.RELATIVE) clone.gridwidth = 1; if (clone.gridheight == 0) clone.gridheight = GridBagConstraints.REMAINDER; else if (clone.gridheight < 0 && clone.gridheight != GridBagConstraints.REMAINDER && clone.gridheight != GridBagConstraints.RELATIVE) clone.gridheight = 1; comptable.put (component, clone); } | public void setConstraints( Component comp, GridBagConstraints cons) { // System.out.println( "set: " + this + " " + comp.getClass().getName() + " " + cons); comptable.put(comp, (GridBagConstraints)cons.clone());} | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/7da54aaf9824e32bcd3983ba1ed0a4b66d7abe7b/GridBagLayout.java/clean/libraries/javalib/java/awt/GridBagLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
444,
4878,
12,
5435,
1161,
16,
13075,
1959,
13,
288,
202,
759,
202,
3163,
18,
659,
18,
8222,
12,
315,
542,
30,
315,
397,
333,
397,
315,
315,
397,
1161,
18,
588,
797,
7675,
17994... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
444,
4878,
12,
5435,
1161,
16,
13075,
1959,
13,
288,
202,
759,
202,
3163,
18,
659,
18,
8222,
12,
315,
542,
30,
315,
397,
333,
397,
315,
315,
397,
1161,
18,
588,
797,
7675,
17994... |
public void handleFiles(List files) { try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.newDocument(); Element overviewRoot = Util.addChildElement(doc, "overview-frame", null); Iterator iter = files.iterator(); while (iter.hasNext()) { File file = (File) iter.next(); if (!file.exists() || !file.canRead()) { continue; } Document xmlDoc = handleFile(file); if (xmlDoc != null) { String shortname = Util.getElementValue( xmlDoc.getDocumentElement(), "body/taglib/shortname"); Util.addChildElement(overviewRoot, "shortname", shortname); File reportHtml = new File(destdir, shortname + "-report.html"); Source xml = new DOMSource(xmlDoc); Source xsl = new StreamSource( this.getClass().getResourceAsStream( "/resources/taglibreport/taglib-report.xsl")); Result out = new StreamResult(reportHtml); TransformerFactory tf = TransformerFactory.newInstance(); Transformer t = tf.newTransformer(xsl); t.transform(xml, out); } } Source xml = new DOMSource(overviewRoot); Source xsl = new StreamSource( this.getClass().getResourceAsStream( "/resources/taglibreport/index.xsl")); Result out = new StreamResult(new File(destdir, "index.html")); TransformerFactory tf = TransformerFactory.newInstance(); Transformer t = tf.newTransformer(xsl); t.transform(xml, out); xsl = new StreamSource( this.getClass().getResourceAsStream( "/resources/taglibreport/overview-frame.xsl")); out = new StreamResult(new File(destdir, "overview-frame.html")); t = tf.newTransformer(xsl); t.transform(xml, out); Util.copyFile( "/resources/taglibreport/stylesheet.css", new File(destdir, "stylesheet.css")); Util.copyFile( "/resources/taglibreport/xbPositionableElement.js", new File(destdir, "xbPositionableElement.js")); } catch (Exception e) { e.printStackTrace(); } } | 54704 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54704/bcf54ee9560f4fd9a0ff083d3f0ea7c829a28aea/TaglibReport.java/clean/contrib/tag-doc/src/java/org/apache/struts/taskdefs/TaglibReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6459,
4110,
2697,
12,
682,
2354,
15329,
202,
202,
698,
95,
1082,
202,
2519,
20692,
1966,
74,
33,
2519,
20692,
18,
2704,
1442,
5621,
1082,
202,
2519,
1263,
1966,
33,
1966,
74,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6459,
4110,
2697,
12,
682,
2354,
15329,
202,
202,
698,
95,
1082,
202,
2519,
20692,
1966,
74,
33,
2519,
20692,
18,
2704,
1442,
5621,
1082,
202,
2519,
1263,
1966,
33,
1966,
74,
... | ||
getLogger().debug( "Building Maven global-level settings from: '" + globalRegistryFile.getAbsolutePath() + "'" ); getLogger().debug( "Building Maven user-level settings from: '" + userRegistryFile.getAbsolutePath() + "'" ); | getLogger().debug( "Building Maven global-level plugin registry from: '" + globalRegistryFile.getAbsolutePath() + "'" ); getLogger().debug( "Building Maven user-level plugin registry from: '" + userRegistryFile.getAbsolutePath() + "'" ); | public void initialize() { userRegistryFile = getFile( userRegistryPath, "user.home", MavenPluginRegistryBuilder.ALT_USER_PLUGIN_REG_LOCATION ); globalRegistryFile = getFile( globalRegistryPath, "maven.home", MavenPluginRegistryBuilder.ALT_GLOBAL_PLUGIN_REG_LOCATION ); getLogger().debug( "Building Maven global-level settings from: '" + globalRegistryFile.getAbsolutePath() + "'" ); getLogger().debug( "Building Maven user-level settings from: '" + userRegistryFile.getAbsolutePath() + "'" ); } | 1315 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1315/6f81043b7bb808d0e2bbf036a7c9edc1ec44f2cd/DefaultPluginRegistryBuilder.java/buggy/maven-plugin-registry/src/main/java/org/apache/maven/plugin/registry/DefaultPluginRegistryBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4046,
1435,
565,
288,
3639,
729,
4243,
812,
273,
6034,
12,
729,
4243,
743,
16,
315,
1355,
18,
8712,
3113,
17176,
3773,
4243,
1263,
18,
18255,
67,
4714,
67,
19415,
67,
5937,
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,
1071,
918,
4046,
1435,
565,
288,
3639,
729,
4243,
812,
273,
6034,
12,
729,
4243,
743,
16,
315,
1355,
18,
8712,
3113,
17176,
3773,
4243,
1263,
18,
18255,
67,
4714,
67,
19415,
67,
5937,
6... |
if(size >= min && size <= max) { | if((size >= min) && (size <= max)) { | public synchronized long paddedLength() { long size = dataLength; if(size < minPaddedSize) size = minPaddedSize; if(size == minPaddedSize) return size; long min = minPaddedSize; long max = minPaddedSize << 1; while(true) { if(max < 0) throw new Error("Impossible size: "+size+" - min="+min+", max="+max); if(size < min) throw new IllegalStateException("???"); if(size >= min && size <= max) { Logger.minor(this, "Padded: "+max+" was: "+dataLength+" for "+getName()); return max; } min = max; max = max << 1; } } | 49933 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49933/ca136843ae9ecb30cadada58a33a5dc2cf8ad064/PaddedEphemerallyEncryptedBucket.java/buggy/src/freenet/support/PaddedEphemerallyEncryptedBucket.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
1525,
14426,
1782,
1435,
288,
202,
202,
5748,
963,
273,
27972,
31,
202,
202,
430,
12,
1467,
411,
1131,
52,
9665,
1225,
13,
963,
273,
1131,
52,
9665,
1225,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
1525,
14426,
1782,
1435,
288,
202,
202,
5748,
963,
273,
27972,
31,
202,
202,
430,
12,
1467,
411,
1131,
52,
9665,
1225,
13,
963,
273,
1131,
52,
9665,
1225,
31,
202,
202,
... |
public RpcDbc(RpcDb rdb, Dbc dbc, boolean isJoin) { this.rdb = rdb; this.rdbenv = rdb.rdbenv; this.dbc = dbc; this.isJoin = isJoin; } | public RpcDbc(RpcDb rdb, Cursor dbc, boolean isJoin) { this.rdb = rdb; this.rdbenv = rdb.rdbenv; this.dbc = dbc; this.isJoin = isJoin; } | public RpcDbc(RpcDb rdb, Dbc dbc, boolean isJoin) { this.rdb = rdb; this.rdbenv = rdb.rdbenv; this.dbc = dbc; this.isJoin = isJoin; } | 2921 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2921/d03f220fde879509cab2ac1c73b71b7efb52b737/RpcDbc.java/buggy/db/rpc_server/java/RpcDbc.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
18564,
4331,
71,
12,
11647,
4331,
436,
1966,
16,
8408,
71,
9881,
16,
1250,
353,
4572,
13,
202,
95,
202,
202,
2211,
18,
86,
1966,
273,
436,
1966,
31,
202,
202,
2211,
18,
86,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18564,
4331,
71,
12,
11647,
4331,
436,
1966,
16,
8408,
71,
9881,
16,
1250,
353,
4572,
13,
202,
95,
202,
202,
2211,
18,
86,
1966,
273,
436,
1966,
31,
202,
202,
2211,
18,
86,
... |
if ( ch != null && ch.length() > 1 ) | if ( ch != null && ch.length() > 1 ) { | public String getCh() { String ch; // Make sure that the access key is a single character. ch = getAttribute( "char" ); if ( ch != null && ch.length() > 1 ) ch = ch.substring( 0, 1 ); return ch; } | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/d40922cee15442d7e2b69a1b40e8663d02f7a1cd/HTMLTableRowElementImpl.java/clean/src/org/apache/html/dom/HTMLTableRowElementImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
336,
782,
1435,
565,
288,
3639,
514,
565,
462,
31,
7734,
368,
4344,
3071,
716,
326,
2006,
498,
353,
279,
2202,
3351,
18,
3639,
462,
273,
4061,
12,
315,
3001,
6,
11272,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
336,
782,
1435,
565,
288,
3639,
514,
565,
462,
31,
7734,
368,
4344,
3071,
716,
326,
2006,
498,
353,
279,
2202,
3351,
18,
3639,
462,
273,
4061,
12,
315,
3001,
6,
11272,
3639,
... |
public SelSearchNode getSelection( int fPos ) { | public ITextSelection getSelection( int fPos ) { | public SelSearchNode getSelection( int fPos ) { IDocumentProvider prov = ( fEditor != null ) ? fEditor.getDocumentProvider() : null; IDocument doc = ( prov != null ) ? prov.getDocument(fEditor.getEditorInput()) : null; if( doc == null ) return null; int pos= fPos; char c; int fStartPos =0, fEndPos=0; int nonJavaStart=-1, nonJavaEnd=-1; String selectedWord=null; try{ while (pos >= 0) { c= doc.getChar(pos); // TODO this logic needs to be improved // ex: ~destr[cursor]uctors, p2->ope[cursor]rator=(zero), etc if (nonJavaStart == -1 && !Character.isJavaIdentifierPart(c)) { nonJavaStart=pos+1; } if (Character.isWhitespace(c)) break; --pos; } fStartPos= pos + 1; pos= fPos; int length= doc.getLength(); while (pos < length) { c= doc.getChar(pos); if (nonJavaEnd == -1 && !Character.isJavaIdentifierPart(c)) { nonJavaEnd=pos; } if (Character.isWhitespace(c)) break; ++pos; } fEndPos= pos; selectedWord = doc.get(fStartPos, (fEndPos - fStartPos)); } catch(BadLocationException e){ } SelSearchNode sel = new SelSearchNode(); boolean selectedOperator=false; if (selectedWord != null && selectedWord.indexOf(OPERATOR) >= 0 && fPos >= fStartPos + selectedWord.indexOf(OPERATOR) && fPos < fStartPos + selectedWord.indexOf(OPERATOR) + OPERATOR.length()) { selectedOperator=true; } // if the operator was selected, get its proper bounds if (selectedOperator && fEditor.getEditorInput() instanceof IFileEditorInput && CoreModel.hasCCNature(((IFileEditorInput)fEditor.getEditorInput()).getFile().getProject())) { int actualStart=fStartPos + selectedWord.indexOf(OPERATOR); int actualEnd=getOperatorActualEnd(doc, fStartPos + selectedWord.indexOf(OPERATOR) + OPERATOR.length()); actualEnd=(actualEnd>0?actualEnd:fEndPos); try { sel.selText = doc.get(actualStart, actualEnd - actualStart); } catch (BadLocationException e) {} sel.selStart = actualStart; sel.selEnd = actualEnd; // TODO Devin this only works for definitions of destructors right now // if there is a destructor and the cursor is in the destructor name's segment then get the entire destructor } else if (selectedWord != null && selectedWord.indexOf('~') >= 0 && fPos - 2 >= fStartPos + selectedWord.lastIndexOf(new String(Keywords.cpCOLONCOLON))) { int tildePos = selectedWord.indexOf('~'); int actualStart=fStartPos + tildePos; int length=0; char temp; char[] lastSegment = selectedWord.substring(tildePos).toCharArray(); for(int i=1; i<lastSegment.length; i++) { temp = lastSegment[i]; if (!Character.isJavaIdentifierPart(temp)) { length=i; break; } } // if the cursor is after the destructor name then use the regular boundaries if (fPos >= actualStart + length) { try { sel.selText = doc.get(nonJavaStart, (nonJavaEnd - nonJavaStart)); } catch (BadLocationException e) {} sel.selStart = nonJavaStart; sel.selEnd = nonJavaEnd; } else { try { sel.selText = doc.get(actualStart, length); } catch (BadLocationException e) {} sel.selStart = actualStart; sel.selEnd = actualStart + length; } } else { // otherwise use the non-java identifier parts as boundaries for the selection try { sel.selText = doc.get(nonJavaStart, (nonJavaEnd - nonJavaStart)); } catch (BadLocationException e) {} sel.selStart = nonJavaStart; sel.selEnd = nonJavaEnd; } return sel; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/090476da2dec6e339aa45e73008cbb87da2b34d4/SelectionParseAction.java/buggy/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/SelectionParseAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
1528,
6233,
23204,
12,
509,
284,
1616,
262,
288,
3196,
202,
734,
504,
650,
2249,
17197,
273,
261,
284,
6946,
480,
446,
262,
692,
284,
6946,
18,
588,
2519,
2249,
1435,
294... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
1528,
6233,
23204,
12,
509,
284,
1616,
262,
288,
3196,
202,
734,
504,
650,
2249,
17197,
273,
261,
284,
6946,
480,
446,
262,
692,
284,
6946,
18,
588,
2519,
2249,
1435,
294... |
if(checkBlocks[i] == null) | if(checkBlocks[i] != null) { checkBlockInserters[i] = new SingleBlockInserter(parent.parent, checkBlocks[i], (short)-1, FreenetURI.EMPTY_CHK_URI, blockInsertContext, this, false, CHKBlock.DATA_LENGTH, i + dataBlocks.length, getCHKOnly, false, false, parent.token); checkBlockInserters[i].schedule(); fin = false; } else | public void start() throws InserterException { Logger.minor(this, "Starting segment "+segNo+" of "+parent+" ("+parent.dataLength+"): "+this+" ( finished="+finished+" encoded="+encoded+" hasURIs="+hasURIs+")"); boolean fin = true; for(int i=0;i<dataBlockInserters.length;i++) { if(dataBlocks[i] != null) { // else already finished on creation dataBlockInserters[i] = new SingleBlockInserter(parent.parent, dataBlocks[i], (short)-1, FreenetURI.EMPTY_CHK_URI, blockInsertContext, this, false, CHKBlock.DATA_LENGTH, i, getCHKOnly, false, false, parent.token); dataBlockInserters[i].schedule(); fin = false; } else { parent.parent.completedBlock(true); } } //parent.parent.notifyClients(); started = true; if(!encoded) Logger.minor(this, "Segment "+segNo+" of "+parent+" ("+parent.dataLength+") is not encoded"); if(splitfileAlgo != null && !encoded) { Logger.minor(this, "Encoding segment "+segNo+" of "+parent+" ("+parent.dataLength+")"); // Encode blocks Thread t = new Thread(new EncodeBlocksRunnable(), "Blocks encoder"); t.setDaemon(true); t.start(); fin = false; } else if(encoded) { for(int i=0;i<checkBlockInserters.length;i++) { if(checkBlocks[i] == null) parent.parent.completedBlock(true); else fin = false; } } if(encoded) { onEncodedSegment(); parent.encodedSegment(this); } if(hasURIs) { parent.segmentHasURIs(this); } if(fin) finish(); if(finished) { parent.segmentFinished(this); } } | 50653 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50653/e6accf6fde724c33588e68c749fd47456ab50691/SplitFileInserterSegment.java/buggy/src/freenet/client/async/SplitFileInserterSegment.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
787,
1435,
1216,
657,
550,
387,
503,
288,
202,
202,
3328,
18,
17364,
12,
2211,
16,
315,
11715,
3267,
13773,
5680,
2279,
9078,
434,
13773,
2938,
9078,
7566,
15,
2938,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
787,
1435,
1216,
657,
550,
387,
503,
288,
202,
202,
3328,
18,
17364,
12,
2211,
16,
315,
11715,
3267,
13773,
5680,
2279,
9078,
434,
13773,
2938,
9078,
7566,
15,
2938,
18,
... |
this.refresher = new Thread(new Refresher(world)); | this.refresher = new Thread(new MonitorThreadRefresher(world)); | public MonitorThread(WorldObject world){ this.depth = DEFAULT_DEPTH; this.ttr = DEFAULT_TTR; this.refresh = false; this.refresher = new Thread(new Refresher(world)); } | 14315 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14315/64a00b6d313fc2b3680346148d1257ba4095e408/MonitorThread.java/clean/ic2d-plugins/org.objectweb.proactive.ic2d.monitoring/src/org/objectweb/proactive/ic2d/monitoring/data/MonitorThread.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
14086,
3830,
12,
18071,
921,
9117,
15329,
202,
202,
2211,
18,
5979,
273,
3331,
67,
27479,
31,
202,
202,
2211,
18,
88,
313,
273,
3331,
67,
1470,
54,
31,
202,
202,
2211,
18,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
14086,
3830,
12,
18071,
921,
9117,
15329,
202,
202,
2211,
18,
5979,
273,
3331,
67,
27479,
31,
202,
202,
2211,
18,
88,
313,
273,
3331,
67,
1470,
54,
31,
202,
202,
2211,
18,
9... |
for (int i = getInputFormat().numAttributes() - 1; i >= 0; i--) { | String foName = null; for(int i = 0; i < instanceInfo.numAttributes(); i++) { | public boolean inputFormat(Instances instanceInfo) throws Exception { super.inputFormat(instanceInfo); m_DeltaCols.setUpper(getInputFormat().numAttributes() - 1); for (int i = getInputFormat().numAttributes() - 1; i >= 0; i--) { if (m_DeltaCols.isInRange(i) && (getInputFormat().attribute(i).type() != Attribute.NUMERIC)) { throw new Exception("Selected attributes must be all numeric"); } } // Create the output buffer Instances outputFormat = new Instances(instanceInfo, 0); boolean inRange = false; for (int i = getInputFormat().numAttributes() - 1; i >= 0; i--) { if (m_DeltaCols.isInRange(i)) { // If they want the class column modified, unassign it if (i == outputFormat.classIndex()) { outputFormat.setClassIndex(-1); } String foName = outputFormat.attribute(i).name(); foName = "'FO " + foName.replace('\'', ' ').trim() + '\''; outputFormat.deleteAttributeAt(i); // Create the new attribute if (inRange) { Attribute newAttrib = new Attribute(foName); outputFormat.insertAttributeAt(newAttrib, i); } inRange = true; } } setOutputFormat(outputFormat); return true; } | 4773 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4773/18f2e5861379830b993ab3f6892fcf72a8e6cc7d/FirstOrderFilter.java/buggy/weka/filters/FirstOrderFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
810,
1630,
12,
5361,
791,
966,
13,
1216,
1185,
288,
565,
2240,
18,
2630,
1630,
12,
1336,
966,
1769,
565,
312,
67,
9242,
8011,
18,
542,
5988,
12,
588,
1210,
1630,
7675,
2107,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
810,
1630,
12,
5361,
791,
966,
13,
1216,
1185,
288,
565,
2240,
18,
2630,
1630,
12,
1336,
966,
1769,
565,
312,
67,
9242,
8011,
18,
542,
5988,
12,
588,
1210,
1630,
7675,
2107,... |
return ((ValueBaseHolder) has).value; | if (has instanceof ValueBaseHolder) return ((ValueBaseHolder) has).value; else { Field f = has.getClass().getField("value"); return (Serializable) f.get(has); } | public Serializable extract_Value() throws BAD_OPERATION { try { return ((ValueBaseHolder) has).value; } catch (ClassCastException ex) { return new BAD_OPERATION("Value type expected"); } } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/c326ce46be7bf3d4d41d68e3d56b83040dab26dc/gnuAny.java/clean/libraries/javalib/gnu/CORBA/gnuAny.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13687,
2608,
67,
620,
1435,
11794,
1216,
16467,
67,
22040,
225,
288,
565,
775,
1377,
288,
3639,
309,
261,
5332,
1276,
1445,
2171,
6064,
13,
327,
14015,
620,
2171,
6064,
13,
711,
293... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13687,
2608,
67,
620,
1435,
11794,
1216,
16467,
67,
22040,
225,
288,
565,
775,
1377,
288,
3639,
309,
261,
5332,
1276,
1445,
2171,
6064,
13,
327,
14015,
620,
2171,
6064,
13,
711,
293... |
private FSNodeHistory historyPrev(File reposRootDir, /*FSNodeHistory hist,*/ boolean crossCopies, FSRevisionNodePool revNodesPool)throws SVNException{ String path = historyEntry.getPath(); SVNLocationEntry commitEntry; long revision = historyEntry.getRevision(); boolean reported = isInteresting; | private FSNodeHistory historyPrev(File reposRootDir, boolean crossCopies, FSRevisionNodePool revNodesPool) throws SVNException { String path = historyEntry.getPath(); long revision = historyEntry.getRevision(); boolean reported = isInteresting; | private FSNodeHistory historyPrev(File reposRootDir, /*FSNodeHistory hist,*/ boolean crossCopies, FSRevisionNodePool revNodesPool)throws SVNException{ String path = historyEntry.getPath();//String path = hist.getHistoryEntry().getPath(); SVNLocationEntry commitEntry; long revision = historyEntry.getRevision();//long revision = hist.getHistoryEntry().getRevision(); boolean reported = isInteresting;//boolean reported = hist.getInterest(); //If our last history report left us hints about where to pickup //the chase, then our last report was on the destination of a //copy. If we are crossing copies, start from those locations, //otherwise, we're all done here// if((hist.getSearchResumeEntry() != null) && (hist.getSearchResumeEntry().getPath() != null) && FSRepository.isValidRevision(hist.getSearchResumeEntry().getRevision()) ){ if(searchResumeEntry != null && FSRepository.isValidRevision(searchResumeEntry.getRevision())){ reported = false; if(crossCopies == false){ return null; } path = searchResumeEntry.getPath();//path = hist.getSearchResumeEntry().getPath(); revision = searchResumeEntry.getRevision();//revision = hist.getSearchResumeEntry().getRevision(); } //Construct a ROOT for the current revision FSRevisionNode root = revNodesPool.getRootRevisionNode(revision, reposRootDir);/*FSReader.getRootRevNode(reposRootDir, revision);*/ //Open path/revision and get all necessary info: node-id, ... FSParentPath parentPath = revNodesPool.getParentPath(FSRoot.createRevisionRoot(root.getId().getRevision(), root), path, true, reposRootDir); FSRevisionNode revNode = parentPath.getRevNode(); commitEntry = new SVNLocationEntry(revNode.getId().getRevision(), revNode.getCreatedPath()); //The Subversion filesystem is written in such a way that a given //line of history may have at most one interesting history point //per filesystem revision. Either that node was edited (and //possibly copied), or it was copied but not edited. And a copy //source cannot be from the same revision as its destination. So, //if our history revision matches its node's commit revision, we //know that ... FSNodeHistory prevHist = null; if(revision == commitEntry.getRevision()){ if(reported == false){ prevHist = new FSNodeHistory(new SVNLocationEntry(commitEntry.getRevision(), commitEntry.getPath()), true, new SVNLocationEntry(FSConstants.SVN_INVALID_REVNUM, null)); return prevHist; } //... or we *have* reported on this revision, and must now //progress toward this node's predecessor (unless there is //no predecessor, in which case we're all done!) FSID predId = revNode.getPredecessorId(); if(predId == null || predId.getRevision() < 0 ){ return prevHist; } //Replace NODE and friends with the information from its predecessor revNode = FSReader.getRevNodeFromID(reposRootDir, predId); commitEntry = new SVNLocationEntry(revNode.getId().getRevision(), revNode.getCreatedPath()); } //Find the youngest copyroot in the path of this node, including itself SVNLocationEntry copyrootEntry = FSNodeHistory.findYoungestCopyroot(reposRootDir, parentPath); SVNLocationEntry srcEntry = new SVNLocationEntry(FSConstants.SVN_INVALID_REVNUM, null); long dstRev = FSConstants.SVN_INVALID_REVNUM; if(copyrootEntry.getRevision() > commitEntry.getRevision()){ FSRevisionNode copyrootRoot = revNodesPool.getRootRevisionNode(copyrootEntry.getRevision(), reposRootDir);// FSRevisionNode copyrootRoot = FSReader.getRootRevNode(reposRootDir, copyrootEntry.getRevision()); revNode = revNodesPool.getRevisionNode(copyrootRoot, copyrootEntry.getPath(), reposRootDir);// revNode = FSReader.getRevisionNode(reposRootDir, copyrootEntry.getPath(), copyrootRoot, 0); String copyDst = revNode.getCreatedPath(); /* If our current path was the very destination of the copy, then our new current path will be the copy source. If our current path was instead the *child* of the destination of the copy, then figure out its previous location by taking its path relative to the copy destination and appending that to the copy source. Finally, if our current path doesn't meet one of these other criteria ... ### for now just fallback to the old copy hunt algorithm. */ String reminder = new String(); if(path.equals(copyDst)){ reminder = "/"; }else{ reminder = SVNPathUtil.pathIsChild(copyDst, path); } if(reminder != null){ /* If we get here, then our current path is the destination of, or the child of the destination of, a copy. Fill in the return values and get outta here. */ String copySrc = revNode.getCopyFromPath(); srcEntry = new SVNLocationEntry(revNode.getCopyFromRevision(), SVNPathUtil.concatToAbs(copySrc, reminder)); dstRev = copyrootEntry.getRevision(); } } //If we calculated a copy source path and revision, we'll make a //'copy-style' history object. if(srcEntry.getPath() != null && FSRepository.isValidRevision(srcEntry.getRevision())){ /* It's possible for us to find a copy location that is the same as the history point we've just reported. If that happens, we simply need to take another trip through this history search */ boolean retry = false; if(dstRev == revision && reported){ retry = true; } return new FSNodeHistory(new SVNLocationEntry(dstRev, path), retry ? false : true, new SVNLocationEntry(srcEntry.getRevision(), srcEntry.getPath())); } return new FSNodeHistory(commitEntry, true, new SVNLocationEntry(FSConstants.SVN_INVALID_REVNUM, null)); } | 2776 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2776/3de4e7e298b05186659154d8fdb3899509e55875/FSNodeHistory.java/buggy/javasvn/src/org/tmatesoft/svn/core/internal/io/fs/FSNodeHistory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
9247,
907,
5623,
4927,
9958,
12,
812,
13686,
27322,
16,
1748,
4931,
907,
5623,
5356,
16,
5549,
1250,
6828,
15670,
16,
9247,
7939,
907,
2864,
5588,
3205,
2864,
13,
15069,
29537,
50,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9247,
907,
5623,
4927,
9958,
12,
812,
13686,
27322,
16,
1748,
4931,
907,
5623,
5356,
16,
5549,
1250,
6828,
15670,
16,
9247,
7939,
907,
2864,
5588,
3205,
2864,
13,
15069,
29537,
50,
... |
new Thread(this).run(); | new Thread(this).start(); | TextModeClientInterface(Node n) { this.n = n; this.r = n.random; new Thread(this).run(); } | 46035 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46035/d69dceaa72feee5ece14b8de951841aa9b614188/TextModeClientInterface.java/clean/src/freenet/node/TextModeClientInterface.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3867,
2309,
1227,
1358,
12,
907,
290,
13,
288,
3639,
333,
18,
82,
273,
290,
31,
3639,
333,
18,
86,
273,
290,
18,
9188,
31,
3639,
394,
4884,
12,
2211,
2934,
1937,
5621,
565,
289,
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,
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,
3867,
2309,
1227,
1358,
12,
907,
290,
13,
288,
3639,
333,
18,
82,
273,
290,
31,
3639,
333,
18,
86,
273,
290,
18,
9188,
31,
3639,
394,
4884,
12,
2211,
2934,
1937,
5621,
565,
289,
2,
... |
public void commandStarted(CommandEvent event) { | public void commandStarted(@NotNull CommandEvent event) { | public void commandStarted(CommandEvent event) { } | 14939 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14939/c96805306193eb595f762fc2f92dce68a3880c8e/ModuleRepositoryView.java/buggy/source/jetbrains/mps/ide/moduleRepositoryViewer/ModuleRepositoryView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1296,
9217,
26964,
5962,
3498,
1133,
871,
13,
288,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1296,
9217,
26964,
5962,
3498,
1133,
871,
13,
288,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.