rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
public void contextDestroyed(ServletContextEvent arg0) { | public void contextDestroyed(ServletContextEvent sce) { | public void contextDestroyed(ServletContextEvent arg0) { // Does nothing } | 47226 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47226/1ea2830cd6fa94de7199a14aef58e99a40937d03/TextFilterListener.java/clean/src/main/java/org/osaf/cosmo/jackrabbit/query/TextFilterListener.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
819,
28414,
12,
4745,
1042,
1133,
272,
311,
13,
288,
3639,
368,
9637,
5083,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
819,
28414,
12,
4745,
1042,
1133,
272,
311,
13,
288,
3639,
368,
9637,
5083,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Debug.error("ScenarioGraphicLoader: problem with location file: " + | Debug.error("ScenarioGraphicLoader: problem finding the location file: " + | public synchronized ScenarioGraphicList createData() { ScenarioGraphicList list = new ScenarioGraphicList(); Hashtable library = new Hashtable(); // Create location data if (locationFile != null && nameIndex != -1) { Debug.message("scenario", "Reading location file..."); try { CSVFile locations = new CSVFile(locationFile); locations.loadData(); Iterator records = locations.iterator(); while (records.hasNext()) { String name = null; String icon = null; Vector record = (Vector) records.next(); name = (String)record.elementAt(nameIndex); if (iconIndex != -1) { icon = (String)record.elementAt(iconIndex); } if (name != null) { ScenarioPoint location = new ScenarioPoint(name, icon); location.setShowName(showNames); drawingAttributes.setTo(location); library.put(name.intern(), location); list.add(location); } else { Debug.error("ScenaroGraphicLoader: no name to use to create location: " + name); } } } catch (MalformedURLException murle) { Debug.error("ScenarioGraphicLoader: problem with location file: " + locationFile); return list; } catch (ArrayIndexOutOfBoundsException aioobe) { Debug.error("ScenarioGraphicLoader: problem parsing location file: " + locationFile); } catch (NullPointerException npe) { Debug.error("ScenarioGraphicLoader (" + getName() + ") null pointer exception, most likely a problem finding the organization data file"); } } else { Debug.error("ScenarioGraphicLoader(" + getName() + "): Location file (" + locationFile + ") not configured."); return list; } // OK, got the locations built up, need to fill up the scenario // Create location data if (activityFile != null && activityNameIndex != -1 && latIndex != -1 && lonIndex != -1 && timeIndex != -1) { Debug.message("scenario", "Reading activity file..."); try { CSVFile activities = new CSVFile(activityFile); activities.loadData(); // numbers as strings == false Iterator records = activities.iterator(); while (records.hasNext()) { String name = null; float lat; float lon; long time; Vector record = (Vector) records.next(); name = record.elementAt(activityNameIndex).toString().intern(); try { lat = ((Double)record.elementAt(latIndex)).floatValue(); lon = ((Double)record.elementAt(lonIndex)).floatValue(); // parse time from string, ending up with // milliseconds from time epoch. String timeString = (String)record.elementAt(timeIndex); timeDate = timeFormat.parse(timeString); time = timeDate.getTime(); if (time < startTime) { startTime = time; } if (time > endTime) { endTime = time; } dataBounds.add((double)lon, (double)lat); if (name != null) { ScenarioPoint point = (ScenarioPoint)library.get(name); if (point != null) { TimeStamp ts = new TimeStamp(lat, lon, time); point.addTimeStamp(ts); } else { Debug.error("SenaroGraphicLoader: ScenarioPoint not found for " + name + ", entry: " + record); } } else { Debug.error("SenaroGraphicLoader: no name to use to create activity point: " + name); } } catch (ClassCastException cce) { Object obj0 = record.elementAt(activityNameIndex); Object obj1 = record.elementAt(latIndex); Object obj2 = record.elementAt(lonIndex); Object obj3 = record.elementAt(timeIndex); Debug.error( "ScenarioGraphicLoader(" + getName() + ") has problem with indexes in activity file for " + obj0 + " (" + obj0.getClass().getName() + ")" + ":\n\tlat index = " + latIndex + ", value = " + obj1 + " (" + obj1.getClass().getName() + ")\n\t lon index = " + lonIndex + ", value = " + obj2 + " (" + obj2.getClass().getName() + ")\n\t time index = " + timeIndex + ", value = " + obj3 + " (" + obj3.getClass().getName() + ")"); } catch (ParseException pe) { Debug.output("ScenarioGraphicLoader(" + getName() + ") has problem with time format. " + pe.getMessage()); } } } catch (MalformedURLException murle) { Debug.error("ScenarioGraphicLoader: problem with activity file: " + activityFile); return list; } catch (NullPointerException npe) { Debug.error("ScenarioGraphicLoader (" + getName() + ") null pointer exception, most likely a problem finding the activites data file"); } } else { Debug.error("ScenarioGraphicLoader(" + getName() + "): Activity file (" + activityFile + ") not configured."); return list; } this.time = startTime; Debug.message("scenario", "Reading files OK"); return list; } | 3071 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3071/96b1bb77f22226b8ff30eac5a3196e7150e17ac1/ScenarioGraphicLoader.java/buggy/src/openmap/com/bbn/openmap/graphicLoader/scenario/ScenarioGraphicLoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
2850,
7754,
29459,
682,
752,
751,
1435,
288,
3639,
2850,
7754,
29459,
682,
666,
273,
394,
2850,
7754,
29459,
682,
5621,
3639,
18559,
5313,
273,
394,
18559,
5621,
3639,
368,
1788... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
2850,
7754,
29459,
682,
752,
751,
1435,
288,
3639,
2850,
7754,
29459,
682,
666,
273,
394,
2850,
7754,
29459,
682,
5621,
3639,
18559,
5313,
273,
394,
18559,
5621,
3639,
368,
1788... |
mipmapLevel, | private static TextureData newTextureDataImpl(File file, int mipmapLevel, int internalFormat, int pixelFormat, String fileSuffix) throws IOException { for (Iterator iter = textureProviders.iterator(); iter.hasNext(); ) { TextureProvider provider = (TextureProvider) iter.next(); TextureData data = provider.newTextureData(file, mipmapLevel, internalFormat, pixelFormat, fileSuffix); if (data != null) { return data; } } return null; } | 47282 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47282/a295d66a868c897b71104f3dd4c94601c7463840/TextureIO.java/clean/src/classes/com/sun/opengl/utils/TextureIO.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
28582,
751,
394,
10967,
751,
2828,
12,
812,
585,
16,
4766,
7734,
509,
4766,
7734,
509,
2713,
1630,
16,
4766,
7734,
509,
4957,
1630,
16,
4766,
7734,
514,
585,
5791,
13,
1216,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
28582,
751,
394,
10967,
751,
2828,
12,
812,
585,
16,
4766,
7734,
509,
4766,
7734,
509,
2713,
1630,
16,
4766,
7734,
509,
4957,
1630,
16,
4766,
7734,
514,
585,
5791,
13,
1216,
... | |
@NotNull @Validate(Integer.class) Set ids, Map options) | @NotNull @Validate(Long.class) Set ids, Map options) | public Map getCollectionCount(@NotNull String type, @NotNull String property, @NotNull @Validate(Integer.class) Set ids, Map options) { Map results = new HashMap(); String alphaNumeric = "^\\w+$"; String alphaNumericDotted = "^\\w[.\\w]+$"; // TODO annotations if (!type.matches(alphaNumericDotted)) { throw new IllegalArgumentException("Type argument to getCollectionCount may ONLY be alpha-numeric with dots ("+alphaNumericDotted+")"); } if (!property.matches(alphaNumeric)) { throw new IllegalArgumentException("Property argument to getCollectionCount may ONLY be alpha-numeric ("+alphaNumeric+")"); } if (iQuery.checkType(type)) { throw new IllegalArgumentException(type+"."+property+" is an unknown type."); } if (iQuery.checkProperty(type,property)) { throw new IllegalArgumentException(type+"."+property+" is an unknown property on type "+type); } String query = "select size(table."+property+") from "+type+" table where table.id = ?"; // FIXME: optimize by doing new list(id,size(table.property)) ... group by id for (Iterator iter = ids.iterator(); iter.hasNext();) { Integer id = (Integer) iter.next(); Integer count = (Integer) iQuery.queryUnique(query,new Object[]{id}); results.put(id,count); } return results; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0b36a8e77f5bacb7e122d76ffce01866205b09d7/PojosImpl.java/clean/components/server/src/ome/logic/PojosImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1635,
12075,
1380,
26964,
5962,
514,
618,
16,
632,
5962,
514,
1272,
16,
2398,
632,
5962,
632,
4270,
12,
3708,
18,
1106,
13,
1000,
3258,
16,
1635,
702,
13,
565,
288,
7734,
1635,
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,
1635,
12075,
1380,
26964,
5962,
514,
618,
16,
632,
5962,
514,
1272,
16,
2398,
632,
5962,
632,
4270,
12,
3708,
18,
1106,
13,
1000,
3258,
16,
1635,
702,
13,
565,
288,
7734,
1635,
16... |
} | } | public void resetLastActionCount() { lastAction = null; lastActionCount = 0; } | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/e558666642895259956d98b00ac352973beb1d14/InputHandler.java/buggy/org/gjt/sp/jedit/gui/InputHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2715,
3024,
1803,
1380,
1435,
202,
95,
202,
202,
2722,
1803,
273,
446,
31,
202,
202,
2722,
1803,
1380,
273,
374,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
202,
482,
918,
2715,
3024,
1803,
1380,
1435,
202,
95,
202,
202,
2722,
1803,
273,
446,
31,
202,
202,
2722,
1803,
1380,
273,
374,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
_t = __t359; | _t = __t363; | public final void accumulatestate(AST _t) throws RecognitionException { AST accumulatestate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t359 = _t; AST tmp246_AST_in = (AST)_t; match(_t,ACCUMULATE); _t = _t.getFirstChild(); { _loop361: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Form_item)) { display_item(_t); _t = _retTree; } else { break _loop361; } } while (true); } state_end(_t); _t = _retTree; _t = __t359; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/JPTreeParser.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparserbase/JPTreeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
8822,
270,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
8822,
270,
395,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
8822,
270,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
8822,
270,
395,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
... |
if (selectedFileName != null) setDestinationValue(selectedFileName); } | if (selectedFileName != null) setDestinationValue(selectedFileName); } | protected void handleDestinationBrowseButtonPressed() { FileDialog dialog = new FileDialog(getContainer().getShell(), SWT.SAVE); dialog.setText(PreferencesMessages .getString("WizardPreferencesExportPage1.saveAs")); //$NON-NLS-1$ dialog.setFilterPath(getDestinationValue()); dialog.setFilterExtensions(new String[] { "*.epf" }); //$NON-NLS-1$ String selectedFileName = dialog.open(); if (selectedFileName != null) setDestinationValue(selectedFileName); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/07624c67770db65cb83e43199aa059a496edb575/WizardPreferencesPage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1640,
5683,
27304,
3616,
24624,
1435,
288,
202,
202,
812,
6353,
6176,
273,
394,
1387,
6353,
12,
588,
2170,
7675,
588,
13220,
9334,
348,
8588,
18,
25242,
1769,
202,
202,
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,
225,
202,
1117,
918,
1640,
5683,
27304,
3616,
24624,
1435,
288,
202,
202,
812,
6353,
6176,
273,
394,
1387,
6353,
12,
588,
2170,
7675,
588,
13220,
9334,
348,
8588,
18,
25242,
1769,
202,
202,
12... |
JavaType mappedType = typeToJavaType(cArgType, true, machDesc); | JavaType mappedType = typeToJavaType(cArgType, true, curMachDesc); | private MethodBinding bindFunction(FunctionSymbol sym, JavaType containingType, Type containingCType) { MethodBinding binding = new MethodBinding(sym, containingType, containingCType); binding.setRenamedMethodName(cfg.getJavaMethodRename(sym.getName())); if (cfg.returnsString(binding.getName())) { PointerType prt = sym.getReturnType().asPointer(); if (prt == null || prt.getTargetType().asInt() == null || prt.getTargetType().getSize(machDesc) != 1) { throw new RuntimeException( "Cannot apply ReturnsString configuration directive to \"" + sym + "\". ReturnsString requires native method to have return type \"char *\""); } binding.setJavaReturnType(javaType(java.lang.String.class)); } else { binding.setJavaReturnType(typeToJavaType(sym.getReturnType(), false, machDesc)); } // List of the indices of the arguments in this function that should be // converted from byte[] to String List stringArgIndices = cfg.stringArguments(binding.getName()); for (int i = 0; i < sym.getNumArguments(); i++) { Type cArgType = sym.getArgumentType(i); JavaType mappedType = typeToJavaType(cArgType, true, machDesc); //System.out.println("C arg type -> \"" + cArgType + "\"" ); //System.out.println(" Java -> \"" + mappedType + "\"" ); // Take into account any ArgumentIsString configuration directives that apply if (stringArgIndices != null && stringArgIndices.contains(new Integer(i))) { //System.out.println("Forcing conversion of " + binding.getName() + " arg #" + i + " from byte[] to String "); if (mappedType.isCVoidPointerType() || mappedType.isCCharPointerType() || (mappedType.isArray() && mappedType.getJavaClass() == ArrayTypes.byteBufferArrayClass)) { // convert mapped type from void* and byte[] to String, or ByteBuffer[] to String[] if (mappedType.getJavaClass() == ArrayTypes.byteBufferArrayClass) { mappedType = javaType(ArrayTypes.stringArrayClass); } else { mappedType = javaType(String.class); } } else { throw new RuntimeException( "Cannot apply ArgumentIsString configuration directive to " + "argument " + i + " of \"" + sym + "\": argument type is not " + "a \"void*\", \"char *\", or \"char**\" equivalent"); } } binding.addJavaArgumentType(mappedType); //System.out.println("During binding of [" + sym + "], added mapping from C type: " + cArgType + " to Java type: " + mappedType); } //System.err.println("---> " + binding); //System.err.println(" ---> " + binding.getCSymbol()); return binding; } | 47282 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47282/875a3de8f54704604d006badf0f0747347319025/JavaEmitter.java/buggy/src/classes/com/sun/gluegen/JavaEmitter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
2985,
5250,
1993,
2083,
12,
2083,
5335,
5382,
16,
19694,
5110,
559,
4191,
559,
16,
19694,
1412,
4191,
39,
559,
13,
288,
565,
2985,
5250,
5085,
273,
394,
2985,
5250,
12,
8117,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
2985,
5250,
1993,
2083,
12,
2083,
5335,
5382,
16,
19694,
5110,
559,
4191,
559,
16,
19694,
1412,
4191,
39,
559,
13,
288,
565,
2985,
5250,
5085,
273,
394,
2985,
5250,
12,
8117,
16,
... |
if (x == null || x.equals("")) { if (y == null || y.equals("")) { return ""; } else { return y; } } else if (y == null || y.equals("")) { return x; } else { return x + ", " + y; } } | if (x == null || x.equals("")) { if (y == null || y.equals("")) { return ""; } else { return y; } } else if (y == null || y.equals("")) { return x; } else { return x + ", " + y; } } | private static String addLists(String x, String y) { if (x == null || x.equals("")) { if (y == null || y.equals("")) { return ""; } else { return y; } } else if (y == null || y.equals("")) { return x; } else { return x + ", " + y; } } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/b5b5168edc3af09cb74945a80b0c36e6630ed502/XmlFileTask.java/clean/src/main/mondrian/resource/XmlFileTask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
527,
7432,
12,
780,
619,
16,
514,
677,
13,
288,
202,
202,
430,
261,
92,
422,
446,
747,
619,
18,
14963,
2932,
6,
3719,
288,
1082,
202,
430,
261,
93,
422,
446,
747,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
527,
7432,
12,
780,
619,
16,
514,
677,
13,
288,
202,
202,
430,
261,
92,
422,
446,
747,
619,
18,
14963,
2932,
6,
3719,
288,
1082,
202,
430,
261,
93,
422,
446,
747,
67... |
boolean enable = !ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE.equals( configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, "" ) ); | boolean enable = !ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE.equals( configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, "" ) ); | protected void initializeButtons( ILaunchConfiguration configuration ) { try { boolean enable = !ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE.equals( configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, "" ) ); if ( fAutoSoLibButton != null ) fAutoSoLibButton.setEnabled( enable ); if ( fStopOnSolibEventsButton != null ) fStopOnSolibEventsButton.setEnabled( enable ); } catch( CoreException e ) { } } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/ea9c35588917a0214a5924a0d7080932ed7fc249/GDBSolibBlock.java/clean/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/GDBSolibBlock.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
4046,
14388,
12,
467,
9569,
1750,
1664,
262,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
6494,
4237,
273,
401,
2871,
40,
5967,
4760,
1750,
2918,
18,
9394,
3101,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
4046,
14388,
12,
467,
9569,
1750,
1664,
262,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
6494,
4237,
273,
401,
2871,
40,
5967,
4760,
1750,
2918,
18,
9394,
3101,
67,... |
IMessage message = MessageUtility.getUtility().getMessage(vc, IMessagePrefixEjb20Constants.CHKJ2801, IEJBValidationContext.ERROR, bean, this); | IMessage message = MessageUtility.getUtility().getMessage(vc, IEJBValidatorMessageConstants.CHKJ2801, IEJBValidationContext.ERROR, bean, this); | public void validateEJBNameElement(IEJBValidationContext vc, EJBJar ejbJar, EnterpriseBean bean) { if (bean == null) { return; } String name = bean.getName(); if ((name == null) || (name.equals(""))) { //$NON-NLS-1$ IMessage message = MessageUtility.getUtility().getMessage(vc, IMessagePrefixEjb20Constants.CHKJ2801, IEJBValidationContext.ERROR, bean, this); vc.addMessage(message); } if(bean.isContainerManagedEntity() && bean.getVersionID() >= J2EEVersionConstants.EJB_2_0_ID) { if(!ValidationRuleUtility.isValidJavaIdentifier(name)) { IMessage message = MessageUtility.getUtility().getMessage(vc, IMessagePrefixEjb20Constants.CHKJ2813, IEJBValidationContext.WARNING, bean, this); vc.addMessage(message); } // p. 466 // "The name for an entity bean with cmp-version 2.x must conform // to the lexical rules for an NMTOKEN. The name for an entity bean with // cmp-version 2.x must not be a reserved literal in EJB QL. if(ValidationRuleUtility.isReservedWord(name)) { IMessage message = MessageUtility.getUtility().getMessage(vc, IMessagePrefixEjb20Constants.CHKJ2859, IEJBValidationContext.INFO, bean, this); vc.addMessage(message); } } } | 8196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8196/18a2a3b489fef7cefb688b690beaeaf64c4480fd/EnterpriseBean20VRule.java/buggy/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/model/internal/validation/EnterpriseBean20VRule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1954,
22719,
461,
1046,
12,
8732,
8877,
4354,
1042,
12802,
16,
12157,
10813,
18024,
10813,
16,
26919,
3381,
3931,
13,
288,
202,
202,
430,
261,
14496,
422,
446,
13,
288,
108... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1954,
22719,
461,
1046,
12,
8732,
8877,
4354,
1042,
12802,
16,
12157,
10813,
18024,
10813,
16,
26919,
3381,
3931,
13,
288,
202,
202,
430,
261,
14496,
422,
446,
13,
288,
108... |
super.write(b, off, len); written = written+len; | out.write(b, off, len); written += len; | public synchronized void write(byte b[], int off, int len) throws IOException { super.write(b, off, len); written = written+len;} | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/95d260b512472e38ee918e1baed66dc4a74bb560/DataOutputStream.java/clean/libraries/javalib/java/io/DataOutputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
3852,
918,
1045,
12,
7229,
324,
63,
6487,
509,
3397,
16,
509,
562,
13,
1216,
1860,
288,
202,
9565,
18,
2626,
12,
70,
16,
3397,
16,
562,
1769,
202,
9748,
273,
5941,
15,
1897,
31,
97,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3852,
918,
1045,
12,
7229,
324,
63,
6487,
509,
3397,
16,
509,
562,
13,
1216,
1860,
288,
202,
9565,
18,
2626,
12,
70,
16,
3397,
16,
562,
1769,
202,
9748,
273,
5941,
15,
1897,
31,
97,
... |
out = new LineWriter(new FileWriter(impliedDotFile)); | out = new LineWriter(new FileOutputStream(impliedDotFile)); | public static void main(String[] argv) { try { List args = new ArrayList(Arrays.asList(argv)); // can't mod the original if (args.size() == 0 || args.remove("-h") || args.remove("-?") || args.remove("?") || args.remove("/?")) { dumpUsage(null, false, false); System.exit(1); } if (args.remove("-help")) { dumpUsage(null, true, false); System.exit(1); } if (args.remove("-dbhelp")) { dumpUsage(null, true, true); System.exit(1); } long start = System.currentTimeMillis(); long startGraphingDetails = start; long startSummarizing = start; // allow '=' in param specs args = fixupArgs(args); final boolean generateHtml = !args.remove("-nohtml"); final boolean includeImpliedConstraints = !args.remove("-noimplied"); String outputDirName = getParam(args, "-o", true, false); // quoting command-line arguments sometimes leaves the trailing " if (outputDirName.endsWith("\"")) outputDirName = outputDirName.substring(0, outputDirName.length() - 1); File outputDir = new File(outputDirName).getCanonicalFile(); if (!outputDir.isDirectory()) { if (!outputDir.mkdir()) { System.err.println("Failed to create directory '" + outputDir + "'"); System.exit(2); } } if (generateHtml) { new File(outputDir, "tables").mkdir(); new File(outputDir, "graphs/summary").mkdirs(); } String dbType = getParam(args, "-t", false, false); if (dbType == null) dbType = "ora"; StringBuffer propertiesLoadedFrom = new StringBuffer(); Properties properties = getDbProperties(dbType, propertiesLoadedFrom); String user = getParam(args, "-u", true, false); String password = getParam(args, "-p", false, false); String schema = null; try { schema = getParam(args, "-s", false, true); } catch (Exception schemaNotSpecified) { } String classpath = getParam(args, "-cp", false, false); String css = getParam(args, "-css", false, false); if (css == null) css = "schemaSpy.css"; int maxDbThreads = getMaxDbThreads(args, properties); if (!args.remove("-nologo")) { // nasty hack, but passing this info everywhere churns my stomach System.setProperty("sourceforgelogo", "true"); } Pattern exclusions; String exclude = getParam(args, "-i", false, false); if (exclude != null) { exclusions = Pattern.compile(exclude); } else { exclusions = Pattern.compile("[^.]"); // match nothing } ConnectionURLBuilder urlBuilder = null; try { urlBuilder = new ConnectionURLBuilder(dbType, args, properties); } catch (IllegalArgumentException badParam) { System.err.println(badParam.getMessage()); System.exit(1); } String dbName = urlBuilder.getDbName(); if (args.size() != 0) { System.out.print("Warning: Unrecognized option(s):"); for (Iterator iter = args.iterator(); iter.hasNext(); ) { System.out.print(" " + iter.next()); } System.out.println(); } if (generateHtml) StyleSheet.init(new BufferedReader(getStyleSheet(css))); String driverClass = properties.getProperty("driver"); String driverPath = properties.getProperty("driverPath"); if (classpath != null) driverPath = classpath + File.pathSeparator + driverPath; Connection connection = getConnection(user, password, urlBuilder.getConnectionURL(), driverClass, driverPath, propertiesLoadedFrom.toString()); DatabaseMetaData meta = connection.getMetaData(); if (schema == null && meta.supportsSchemasInTableDefinitions()) { schema = user; } if (generateHtml) { System.out.println("Connected to " + meta.getDatabaseProductName() + " - " + meta.getDatabaseProductVersion()); System.out.println(); System.out.print("Gathering schema details"); } // // create the spy // SchemaSpy spy = new SchemaSpy(connection, meta, dbName, schema, properties, maxDbThreads); Database db = spy.getDatabase(); LineWriter out; Collection tables = new ArrayList(db.getTables()); tables.addAll(db.getViews()); if (tables.isEmpty()) { dumpNoTablesMessage(schema, user, meta); System.exit(2); }// DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();// DocumentBuilder builder = factory.newDocumentBuilder();// Document document = builder.newDocument();// Element schemaNode = document.createElement("schema");// document.appendChild(schemaNode);// if (schema != null)// DOMUtil.appendAttribute(schemaNode, "name", schema);// DOMUtil.appendAttribute(schemaNode, "databaseType", db.getDatabaseProduct()); if (generateHtml) { startSummarizing = System.currentTimeMillis(); System.out.println("(" + (startSummarizing - start) / 1000 + "sec)"); System.out.print("Writing/graphing summary"); System.out.print("."); File graphsDir = new File(outputDir, "graphs/summary"); String dotBaseFilespec = "relationships"; out = new LineWriter(new FileWriter(new File(graphsDir, dotBaseFilespec + ".real.compact.dot"))); WriteStats stats = new WriteStats(exclusions, includeImpliedConstraints); DotFormatter.getInstance().writeRealRelationships(tables, true, stats, out); boolean hasRelationships = stats.getNumTablesWritten() > 0 || stats.getNumViewsWritten() > 0; stats = new WriteStats(stats); out.close(); if (hasRelationships) { System.out.print("."); out = new LineWriter(new FileWriter(new File(graphsDir, dotBaseFilespec + ".real.large.dot"))); DotFormatter.getInstance().writeRealRelationships(tables, false, stats, out); stats = new WriteStats(stats); out.close(); } // getting implied constraints has a side-effect of associating the parent/child tables, so don't do it // here unless they want that behavior List impliedConstraints = null; if (includeImpliedConstraints) impliedConstraints = DBAnalyzer.getImpliedConstraints(tables); else impliedConstraints = new ArrayList(); List orphans = DBAnalyzer.getOrphans(tables); boolean hasOrphans = !orphans.isEmpty() && Dot.getInstance().isValid(); if (hasRelationships) { System.out.print("."); File impliedDotFile = new File(graphsDir, dotBaseFilespec + ".implied.compact.dot"); out = new LineWriter(new FileWriter(impliedDotFile)); stats = new WriteStats(exclusions, includeImpliedConstraints); DotFormatter.getInstance().writeAllRelationships(tables, true, stats, out); boolean hasImplied = stats.wroteImplied(); Set excludedColumns = stats.getExcludedColumns(); stats = new WriteStats(stats); out.close(); if (hasImplied) { impliedDotFile = new File(graphsDir, dotBaseFilespec + ".implied.large.dot"); out = new LineWriter(new FileWriter(impliedDotFile)); DotFormatter.getInstance().writeAllRelationships(tables, false, stats, out); stats = new WriteStats(stats); out.close(); } else { impliedDotFile.delete(); } out = new LineWriter(new FileWriter(new File(outputDir, dotBaseFilespec + ".html"))); hasRelationships = HtmlGraphFormatter.getInstance().write(db, graphsDir, dotBaseFilespec, hasOrphans, hasImplied, excludedColumns, out); out.close(); } System.out.print("."); dotBaseFilespec = "utilities"; out = new LineWriter(new FileWriter(new File(outputDir, dotBaseFilespec + ".html"))); HtmlGraphFormatter.getInstance().writeOrphans(db, orphans, hasRelationships, graphsDir, out); stats = new WriteStats(stats); out.close(); System.out.print("."); out = new LineWriter(new FileWriter(new File(outputDir, "index.html")), 64 * 1024); HtmlMainIndexFormatter.getInstance().write(db, tables, hasRelationships, hasOrphans, out); stats = new WriteStats(stats); out.close(); System.out.print("."); List constraints = DBAnalyzer.getForeignKeyConstraints(tables); out = new LineWriter(new FileWriter(new File(outputDir, "constraints.html")), 256 * 1024); HtmlConstraintIndexFormatter constraintIndexFormatter = HtmlConstraintIndexFormatter.getInstance(); constraintIndexFormatter.write(db, constraints, tables, hasRelationships, hasOrphans, out); stats = new WriteStats(stats); out.close(); System.out.print("."); out = new LineWriter(new FileWriter(new File(outputDir, "anomalies.html")), 16 * 1024); HtmlAnomaliesFormatter.getInstance().write(db, tables, impliedConstraints, hasRelationships, hasOrphans, out); stats = new WriteStats(stats); out.close(); System.out.print("."); out = new LineWriter(new FileWriter(new File(outputDir, "columns.html")), 16 * 1024); HtmlColumnsFormatter.getInstance().write(db, tables, hasRelationships, hasOrphans, out); stats = new WriteStats(stats); out.close(); startGraphingDetails = System.currentTimeMillis(); System.out.println("(" + (startGraphingDetails - startSummarizing) / 1000 + "sec)"); System.out.print("Writing/graphing results"); HtmlTableFormatter tableFormatter = HtmlTableFormatter.getInstance(); for (Iterator iter = tables.iterator(); iter.hasNext(); ) { System.out.print('.'); Table table = (Table)iter.next(); out = new LineWriter(new FileWriter(new File(outputDir, "tables/" + table.getName() + ".html")), 24 * 1024); tableFormatter.write(db, table, hasRelationships, hasOrphans, outputDir, stats, out); stats = new WriteStats(stats); out.close();// XmlTableFormatter.getInstance().appendTable(schemaNode, table, outputDir); } out = new LineWriter(new FileWriter(new File(outputDir, "schemaSpy.css"))); StyleSheet.getInstance().write(out); out.close(); out = new LineWriter(new FileWriter(new File(outputDir, "schemaSpy.js"))); JavaScriptFormatter.getInstance().write(out); out.close(); }// out = new LineWriter(new FileWriter(new File(outputDir, "schemaSpy.xml")), 24 * 1024);// document.getDocumentElement().normalize();// DOMUtil.printDOM(document, out);// out.close(); List recursiveConstraints = new ArrayList(); // side effect is that the RI relationships get trashed // also populates the recursiveConstraints collection List orderedTables = spy.sortTablesByRI(recursiveConstraints); out = new LineWriter(new FileWriter(new File(outputDir, "insertionOrder.txt")), 16 * 1024); TextFormatter.getInstance().write(db, orderedTables, false, out); out.close(); out = new LineWriter(new FileWriter(new File(outputDir, "deletionOrder.txt")), 16 * 1024); Collections.reverse(orderedTables); TextFormatter.getInstance().write(db, orderedTables, false, out); out.close(); /* we'll eventually want to put this functionality back in with a * database independent implementation File constraintsFile = new File(outputDir, "removeRecursiveConstraints.sql"); constraintsFile.delete(); if (!recursiveConstraints.isEmpty()) { out = new LineWriter(new FileWriter(constraintsFile), 4 * 1024); writeRemoveRecursiveConstraintsSql(recursiveConstraints, schema, out); out.close(); } constraintsFile = new File(outputDir, "restoreRecursiveConstraints.sql"); constraintsFile.delete(); if (!recursiveConstraints.isEmpty()) { out = new LineWriter(new FileWriter(constraintsFile), 4 * 1024); writeRestoreRecursiveConstraintsSql(recursiveConstraints, schema, out); out.close(); } */ if (generateHtml) { long end = System.currentTimeMillis(); System.out.println("(" + (end - startGraphingDetails) / 1000 + "sec)"); System.out.println("Wrote relationship details of " + tables.size() + " tables/views to directory '" + new File(outputDirName) + "' in " + (end - start) / 1000 + " seconds."); System.out.println("Start with " + new File(outputDirName, "index.html")); } } catch (Exception exc) { System.err.println(); exc.printStackTrace(); } } | 49072 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49072/a75d0134d8ff720e2fd347527018dd7ed7698d92/Main.java/clean/src/net/sourceforge/schemaspy/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
5261,
13,
288,
3639,
775,
288,
5411,
987,
833,
273,
394,
2407,
12,
12726,
18,
345,
682,
12,
19485,
10019,
368,
848,
1404,
681,
326,
2282,
5411,
309,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
5261,
13,
288,
3639,
775,
288,
5411,
987,
833,
273,
394,
2407,
12,
12726,
18,
345,
682,
12,
19485,
10019,
368,
848,
1404,
681,
326,
2282,
5411,
309,... |
protected ObservableSet(Realm realm, Set wrappedSet, Object elementType) { super(realm); this.wrappedSet = wrappedSet; this.elementType = elementType; | protected ObservableSet(Set wrappedSet, Object elementType) { this(Realm.getDefault(), wrappedSet, elementType); | protected ObservableSet(Realm realm, Set wrappedSet, Object elementType) { super(realm); this.wrappedSet = wrappedSet; this.elementType = elementType; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/6aecdb31231a8602dbf72944625703c440949c78/ObservableSet.java/buggy/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ObservableSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
4310,
694,
12,
22545,
11319,
16,
1000,
5805,
694,
16,
1033,
21427,
13,
288,
202,
202,
9565,
12,
24056,
1769,
202,
202,
2211,
18,
18704,
694,
273,
5805,
694,
31,
202,
202,
221... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
4310,
694,
12,
22545,
11319,
16,
1000,
5805,
694,
16,
1033,
21427,
13,
288,
202,
202,
9565,
12,
24056,
1769,
202,
202,
2211,
18,
18704,
694,
273,
5805,
694,
31,
202,
202,
221... |
RubyNumeric other = numericValue(num); if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuby(), getDoubleValue()).op_plus(other); } return bigNorm(getRuby(), getValue().add(bigIntValue(other))); } | RubyNumeric other = numericValue(num); if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuby(), getDoubleValue()).op_plus(other); } return bigNorm(getRuby(), getValue().add(bigIntValue(other))); } | public RubyNumeric op_plus(RubyObject num) { RubyNumeric other = numericValue(num); if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuby(), getDoubleValue()).op_plus(other); } return bigNorm(getRuby(), getValue().add(bigIntValue(other))); } | 48300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48300/1cc89bd397c0f049e6fa3045916fd6d9a3cdada8/RubyBignum.java/buggy/org/jruby/RubyBignum.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
9902,
1061,
67,
10103,
12,
54,
10340,
921,
818,
13,
288,
3639,
19817,
9902,
1308,
273,
6389,
620,
12,
2107,
1769,
3639,
309,
261,
3011,
1276,
19817,
4723,
13,
288,
5411,
327,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
9902,
1061,
67,
10103,
12,
54,
10340,
921,
818,
13,
288,
3639,
19817,
9902,
1308,
273,
6389,
620,
12,
2107,
1769,
3639,
309,
261,
3011,
1276,
19817,
4723,
13,
288,
5411,
327,... |
servant.removeCodomainMap(mapCtx); | servant.setActive(w, active); | public void doCall() { servant.removeCodomainMap(mapCtx); } | 55636 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55636/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingControlProxy.java/clean/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
741,
1477,
1435,
288,
4697,
202,
550,
7445,
18,
4479,
29633,
1530,
863,
12,
1458,
6442,
1769,
1082,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
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,
1875,
202,
482,
918,
741,
1477,
1435,
288,
4697,
202,
550,
7445,
18,
4479,
29633,
1530,
863,
12,
1458,
6442,
1769,
1082,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
bug = BugzillaRepositoryUtil.getBug(hit.getServer(), hit.getId()); | bug = BugzillaRepositoryUtil.getBug(hit.getRepository(), hit.getId()); | public BugReport getBug() throws MalformedURLException, LoginException, IOException { if (bug == null) { // get the bug report bug = BugzillaRepositoryUtil.getBug(hit.getServer(), hit.getId()); } return bug; } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/b380ea052e535a9796ce74a73e94c971859b45d0/BugzillaReportNode.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaReportNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
16907,
4820,
2882,
637,
1435,
1216,
20710,
16,
11744,
503,
16,
1860,
288,
202,
202,
430,
261,
925,
422,
446,
13,
288,
1082,
202,
759,
336,
326,
7934,
2605,
1082,
202,
925,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
16907,
4820,
2882,
637,
1435,
1216,
20710,
16,
11744,
503,
16,
1860,
288,
202,
202,
430,
261,
925,
422,
446,
13,
288,
1082,
202,
759,
336,
326,
7934,
2605,
1082,
202,
925,
273... |
return Argo.localize("UMLMenu", "dialog.title.add-associated-usecases"); } | return Argo.localize("UMLMenu", "dialog.title.add-associated-usecases"); } | protected String getAddDialogTitle() { return Argo.localize("UMLMenu", "dialog.title.add-associated-usecases"); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/ca3bcb5d6dd283c4553bcbfe50b108dc5d499768/UMLUseCaseAssociationListModel.java/clean/src_new/org/argouml/uml/ui/behavior/use_cases/UMLUseCaseAssociationListModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
514,
336,
986,
6353,
4247,
1435,
288,
202,
202,
2463,
1201,
3240,
18,
3729,
554,
2932,
57,
1495,
4599,
3113,
315,
12730,
18,
2649,
18,
1289,
17,
28441,
17,
1202,
22186,
8863,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
514,
336,
986,
6353,
4247,
1435,
288,
202,
202,
2463,
1201,
3240,
18,
3729,
554,
2932,
57,
1495,
4599,
3113,
315,
12730,
18,
2649,
18,
1289,
17,
28441,
17,
1202,
22186,
8863,
... |
Picture p = mAlbum.getPicture( index ); | Picture p = getCurrentAlbum().getPicture( index ); | public Component getListCellRendererComponent( JList list, Object value, int index, boolean selected, boolean hasFocus ) { super.getListCellRendererComponent( list, value, index, selected, hasFocus ); if (value != null && index != -1) { Picture p = mAlbum.getPicture( index ); File f = p.getSource(); if ( GalleryRemote.getInstance().properties.getShowThumbnails() ) { ImageIcon icon = getThumbnail( p ); setIcon( icon ); setIconTextGap( 4 + GalleryRemote.getInstance().properties.getThumbnailSize().width - icon.getIconWidth() ); } StringBuffer text = new StringBuffer(); text.append("<html><p>"); text.append(f.getName()); if ( GalleryRemote.getInstance().properties.getShowPath() ) { text.append(" [").append(f.getParent()).append("]</p>"); } if (p.getCaption() != null) { text.append("<p><font color=\"gray\">").append(p.getEscapedCaption()).append("</font></p>"); } text.append("</html>"); //Log.log(Log.TRACE, MODULE, text.toString()); setText( text.toString() ); } else { setText("dummy"); } return this; } | 9402 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9402/d38b36bd8d592825505f09f643524173c9dfac53/MainFrame.java/buggy/com/gallery/GalleryRemote/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
5435,
10033,
4020,
6747,
1841,
12,
9506,
202,
46,
682,
666,
16,
1033,
460,
16,
509,
770,
16,
9506,
202,
6494,
3170,
16,
1250,
711,
9233,
262,
288,
1082,
202,
9565,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
5435,
10033,
4020,
6747,
1841,
12,
9506,
202,
46,
682,
666,
16,
1033,
460,
16,
509,
770,
16,
9506,
202,
6494,
3170,
16,
1250,
711,
9233,
262,
288,
1082,
202,
9565,
18,
588,
... |
Rectangle2D glyphBounds = tempLogicalBounds[i].getBounds2D(); | Rectangle2D glyphBounds = tempLogicalBounds[i].getBounds2D(); | private void computeGlyphLogicalBounds() { GVTLineMetrics lineMetrics = gvtFont.getLineMetrics("By", awtGlyphVector.getFontRenderContext()); float ascent = lineMetrics.getAscent() * scaleFactor; float descent = lineMetrics.getDescent() * scaleFactor; Shape[] tempLogicalBounds = new Shape[getNumGlyphs()]; boolean[] rotated = new boolean[getNumGlyphs()]; double maxWidth = -1; double maxHeight = -1; for (int i = 0; i < getNumGlyphs(); i++) { if (glyphVisible[i]) { AffineTransform glyphTransform = getGlyphTransform(i); if (glyphTransform == null) { GVTGlyphMetrics glyphMetrics = getGlyphMetrics(i); float glyphX = (float)(getGlyphPosition(i).getX()); float glyphY = (float)getGlyphPosition(i).getY() - ascent; float glyphWidth = glyphMetrics.getHorizontalAdvance(); float glyphHeight = glyphMetrics.getVerticalAdvance(); tempLogicalBounds[i] = new Rectangle2D.Double(glyphX, glyphY, glyphWidth, glyphHeight); if (glyphWidth > maxWidth) maxWidth = glyphWidth; if (glyphHeight > maxHeight) maxHeight = glyphHeight; rotated[i] = false; } else { // the glyph is transformed Shape glyphOutline = awtGlyphVector.getGlyphOutline(i); Rectangle2D glyphBounds = glyphOutline.getBounds2D(); // store three corner points so we can determine whether the glyph is rotated Point2D p1 = new Point2D.Double(glyphBounds.getMinX(), glyphBounds.getMinY()); Point2D p2 = new Point2D.Double(glyphBounds.getMaxX(), glyphBounds.getMinY()); Point2D p3 = new Point2D.Double(glyphBounds.getMinX(), glyphBounds.getMaxY()); AffineTransform tr = AffineTransform.getTranslateInstance(getGlyphPosition(i).getX(), getGlyphPosition(i).getY()); tr.concatenate(glyphTransform); tr.scale(scaleFactor, scaleFactor); tempLogicalBounds[i] = tr.createTransformedShape(glyphBounds); Point2D tp1 = new Point2D.Double(); Point2D tp2 = new Point2D.Double(); Point2D tp3 = new Point2D.Double(); tr.transform(p1, tp1); tr.transform(p2, tp2); tr.transform(p3, tp3); if ((Math.abs(tp1.getX() - tp2.getX()) < 0.001 || Math.abs(tp1.getX() - tp3.getX()) < 0.001) && (Math.abs(tp1.getY() - tp2.getY()) < 0.001 || Math.abs(tp1.getY() - tp3.getY()) < 0.001)) { rotated[i] = false; } else { rotated[i] = true; } if (glyphBounds.isEmpty()) { if (i > 0) { // can't tell if rotated or not, make it the same as the // previous glyph rotated[i] = rotated[i-1]; } else { rotated[i] = true; } } Rectangle2D rectBounds = tempLogicalBounds[i].getBounds2D(); if (rectBounds.getWidth() > maxWidth) maxWidth = rectBounds.getWidth(); if (rectBounds.getHeight() > maxHeight) maxHeight = rectBounds.getHeight(); } } else { // the glyph is not drawn tempLogicalBounds[i] = null; } } // if appropriate, join adjacent glyph logical bounds GeneralPath logicalBoundsPath = new GeneralPath(); for (int i = 0; i < getNumGlyphs(); i++) { if (tempLogicalBounds[i] != null) { logicalBoundsPath.append(tempLogicalBounds[i], false); } } Rectangle2D fullBounds = logicalBoundsPath.getBounds2D(); if (fullBounds.getHeight() < maxHeight*1.5) { // make all glyphs tops and bottoms the same as the full bounds for (int i = 0; i < getNumGlyphs(); i++) { // first make sure that the glyph logical bounds are not rotated if (!rotated[i] && tempLogicalBounds[i] != null) { Rectangle2D glyphBounds = tempLogicalBounds[i].getBounds2D(); double x = glyphBounds.getMinX(); double width = glyphBounds.getWidth(); if (i < getNumGlyphs()-1 && tempLogicalBounds[i+1] != null) { // make this glyph extend to the start of the next one Rectangle2D nextGlyphBounds = tempLogicalBounds[i+1].getBounds2D(); if (nextGlyphBounds.getX() > x) { // going left to right width = nextGlyphBounds.getX() - x; } else { double newGlyphX = nextGlyphBounds.getX() + nextGlyphBounds.getWidth(); width += (x - newGlyphX); x = newGlyphX; } } tempLogicalBounds[i] = new Rectangle2D.Double(x, fullBounds.getMinY(), width, fullBounds.getHeight()); } } } if (fullBounds.getWidth() < maxWidth*1.5) { // make all glyphs left and right edges the same as the full bounds for (int i = 0; i < getNumGlyphs(); i++) { // first make sure that the glyph logical bounds are not rotated if (!rotated[i] && tempLogicalBounds[i] != null) { Rectangle2D glyphBounds = tempLogicalBounds[i].getBounds2D(); double y = glyphBounds.getMinY(); double height = glyphBounds.getHeight(); if (i < getNumGlyphs()-1 && tempLogicalBounds[i+1] != null) { // make this glyph extend to the start of the next one Rectangle2D nextGlyphBounds = tempLogicalBounds[i+1].getBounds2D(); if (nextGlyphBounds.getY() > y) { // going top to bottom height = nextGlyphBounds.getY() - y; } else { double newGlyphY = nextGlyphBounds.getY() + nextGlyphBounds.getHeight(); height += (y - newGlyphY); y = newGlyphY; } } tempLogicalBounds[i] = new Rectangle2D.Double(fullBounds.getMinX(), y, fullBounds.getWidth(), height); } } } for (int i = 0; i < getNumGlyphs(); i++) { glyphLogicalBounds[i] = tempLogicalBounds[i]; } } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/32fa5d6f134dbc7519ade5bde79d3c0386deef5e/AWTGVTGlyphVector.java/buggy/sources/org/apache/batik/gvt/font/AWTGVTGlyphVector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3671,
15141,
17955,
5694,
1435,
288,
3639,
611,
58,
56,
1670,
5653,
980,
5653,
273,
11404,
88,
5711,
18,
588,
1670,
5653,
2932,
858,
3113,
8237,
15141,
5018,
18,
588,
5711,
342... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3671,
15141,
17955,
5694,
1435,
288,
3639,
611,
58,
56,
1670,
5653,
980,
5653,
273,
11404,
88,
5711,
18,
588,
1670,
5653,
2932,
858,
3113,
8237,
15141,
5018,
18,
588,
5711,
342... |
String[] phoneString = { (String) fieldValues.get(homePhoneFieldName), (String) fieldValues.get(workPhoneFieldName), (String) fieldValues.get(mobilePhoneFieldName), (String) fieldValues.get(faxPhoneFieldName)}; String[] phoneTypeString = { (String) fieldValues.get(homePhoneMenuName), (String) fieldValues.get(workPhoneMenuName), (String) fieldValues.get(mobilePhoneMenuName), (String) fieldValues.get(faxPhoneMenuName)}; | String[] phoneString = {(String) fieldValues.get(homePhoneFieldName), (String) fieldValues.get(workPhoneFieldName), (String) fieldValues.get(mobilePhoneFieldName), (String) fieldValues.get(faxPhoneFieldName)}; String[] phoneTypeString = {(String) fieldValues.get(homePhoneMenuName), (String) fieldValues.get(workPhoneMenuName), (String) fieldValues.get(mobilePhoneMenuName), (String) fieldValues.get(faxPhoneMenuName)}; | public boolean store(IWContext iwc) { try { GroupBusiness groupBiz = getGroupBusiness(getEventIWContext()); Group group = groupBiz.getGroupByGroupID(getGroupId()); if (getGroupId() > -1) { String[] phoneString = { (String) fieldValues.get(homePhoneFieldName), (String) fieldValues.get(workPhoneFieldName), (String) fieldValues.get(mobilePhoneFieldName), (String) fieldValues.get(faxPhoneFieldName)}; String[] phoneTypeString = { (String) fieldValues.get(homePhoneMenuName), (String) fieldValues.get(workPhoneMenuName), (String) fieldValues.get(mobilePhoneMenuName), (String) fieldValues.get(faxPhoneMenuName)}; for (int i = 0; i < phoneString.length; i++) { if (phoneString[i] != null && phoneString[i].length() > 0) { getGroupBusiness(iwc).updateGroupPhone(group, Integer.parseInt(phoneTypeString[i]), phoneString[i]); } } if ((String) fieldValues.get(emailFieldName) != null && ((String) fieldValues.get(emailFieldName)).length() > 0) { getGroupBusiness(iwc).updateGroupMail(group, (String) fieldValues.get(emailFieldName)); } } if ((String) fieldValues.get(homepageFieldName) != null && ((String) fieldValues.get(homepageFieldName)).length() > 0) { group.setHomePageURL((String) fieldValues.get(homepageFieldName)); } } catch (Exception e) { e.printStackTrace(System.err); throw new RuntimeException("update group exception"); } return true; } | 57353 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57353/3d3a9f8444e1b2e2c1c4c7d5e71a685e7f0aa419/GroupOfficeContactTab.java/buggy/src/java/is/idega/idegaweb/member/presentation/GroupOfficeContactTab.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1707,
12,
45,
59,
1042,
25522,
71,
13,
288,
202,
202,
698,
288,
1082,
202,
1114,
13423,
1041,
38,
452,
273,
11751,
13423,
12,
588,
1133,
45,
59,
1042,
10663,
1082,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1707,
12,
45,
59,
1042,
25522,
71,
13,
288,
202,
202,
698,
288,
1082,
202,
1114,
13423,
1041,
38,
452,
273,
11751,
13423,
12,
588,
1133,
45,
59,
1042,
10663,
1082,
202,
... |
set(parameterIndex, Long.toString(x)); | bind(parameterIndex, "'"+Long.toString(x)+"'", PG_INT8); | public void setLong(int parameterIndex, long x) throws SQLException { set(parameterIndex, Long.toString(x)); } | 45534 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45534/2232172e447db0224c4ececd148ddf6d6e1e5c84/AbstractJdbc1Statement.java/buggy/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
3708,
12,
474,
25412,
16,
1525,
619,
13,
1216,
6483,
202,
95,
202,
202,
542,
12,
6775,
1016,
16,
3407,
18,
10492,
12,
92,
10019,
202,
97,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
3708,
12,
474,
25412,
16,
1525,
619,
13,
1216,
6483,
202,
95,
202,
202,
542,
12,
6775,
1016,
16,
3407,
18,
10492,
12,
92,
10019,
202,
97,
2,
-100,
-100,
-100,
-100... |
{ return m_launcherFrame; } | { return m_launcherFrame; } | public LauncherFrame getLauncherFrame() { return m_launcherFrame; } | 8339 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8339/56d6044f3c26ae582283532b1c4dbc9b76c22921/GameTypePanel.java/clean/src/games/strategy/engine/framework/ui/GameTypePanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
14643,
264,
3219,
9014,
4760,
264,
3219,
1435,
225,
288,
565,
327,
312,
67,
20738,
264,
3219,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
14643,
264,
3219,
9014,
4760,
264,
3219,
1435,
225,
288,
565,
327,
312,
67,
20738,
264,
3219,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if(test.indexOf(":") != -1 && (test.length() == 4 || test.length() == 5)) | if (test.indexOf(":") != -1 && (test.length() == 4 || test.length() == 5)) | protected void updateTimeButtons() { Object[] keys = mAvailableActions.keySet().toArray(); ArrayList availableTimeActions = new ArrayList(); for(int i = 0; i < keys.length; i++) { Action action = (Action)mAvailableActions.get(keys[i]); String test = action.getValue(Action.NAME).toString(); if(test.indexOf(":") != -1 && (test.length() == 4 || test.length() == 5)) availableTimeActions.add(keys[i].toString()); } String scrollTo = MainFrame.mLocalizer.msg("menuinfo.scrollTo", "Scroll to") + ": "; // create Time Buttons int[] array = Settings.propTimeButtons.getIntArray(); Action timeButtonAction; for (int i = 0; i < array.length; i++) { int hour = array[i] / 60; final int scrollTime = array[i]; String time = String.valueOf(array[i] % 60); if (time.length() == 1) time = hour + ":0" + time; else time = hour + ":" + time; if(availableTimeActions.contains(new String("#scrollTo" + time))) { availableTimeActions.remove(new String("#scrollTo" + time)); continue; } timeButtonAction = createAction(time, "#scrollTo" + time, scrollTo + time, IconLoader.getInstance() .getIconFromTheme("actions", "go-down", 16), IconLoader.getInstance().getIconFromTheme("actions", "go-down", 22), ToolBar.BUTTON_ACTION, new ActionListener() { public void actionPerformed(ActionEvent e) { MainFrame.getInstance().scrollToTime(scrollTime); } }); mAvailableActions.put("#scrollTo" + time, timeButtonAction); } Iterator it = availableTimeActions.iterator(); while(it.hasNext()) { Action action = (Action)mAvailableActions.remove(it.next()); if(mVisibleActions.contains(action)) mVisibleActions.remove(action); } } | 9266 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9266/82613e27f32a4b89f61783e56b109e05d99cb088/DefaultToolBarModel.java/clean/tvbrowser/src/tvbrowser/ui/mainframe/toolbar/DefaultToolBarModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1089,
950,
14388,
1435,
288,
565,
1033,
8526,
1311,
273,
312,
5268,
6100,
18,
856,
694,
7675,
31447,
5621,
565,
2407,
2319,
950,
6100,
273,
394,
2407,
5621,
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,
282,
4750,
918,
1089,
950,
14388,
1435,
288,
565,
1033,
8526,
1311,
273,
312,
5268,
6100,
18,
856,
694,
7675,
31447,
5621,
565,
2407,
2319,
950,
6100,
273,
394,
2407,
5621,
3639,
364,
12,
474,... |
if (node == NULL) return EMPTYSTRING; | if ((node == NULL) || (node > _treeNodeLimit)) return EMPTYSTRING; | public String getNodeValue(final int node) { if (node == NULL) return EMPTYSTRING; switch(_type[node]) { case ROOT: return getNodeValue(_offsetOrChild[node]); case TEXT: case COMMENT: case PROCESSING_INSTRUCTION: return makeStringValue(node); default: if (node < _firstAttributeNode) return getElementValue(node); // element string value else return makeStringValue(node); // attribute value } } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/9407e2a16f2ba6b2b5350f6d3a28cbeefd2a4f78/DOMImpl.java/buggy/src/org/apache/xalan/xsltc/dom/DOMImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
28587,
12,
6385,
509,
756,
13,
288,
202,
430,
261,
2159,
422,
3206,
13,
327,
8984,
5804,
31,
202,
9610,
24899,
723,
63,
2159,
5717,
288,
202,
3593,
11011,
30,
202,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
28587,
12,
6385,
509,
756,
13,
288,
202,
430,
261,
2159,
422,
3206,
13,
327,
8984,
5804,
31,
202,
9610,
24899,
723,
63,
2159,
5717,
288,
202,
3593,
11011,
30,
202,
565,
327,
... |
/*if (_model.getDebugManager() != null) { try { _debugPanel = new DebugPanel(_model, this); } catch(NoClassDefFoundError e) { _debugPanel = null; } } else { _debugPanel = null; }*/ | private void _setUpTabs() { _outputPane = new OutputPane(_model); _errorPanel = new CompilerErrorPanel(_model, this); _interactionsPane = new InteractionsPane(_model); _findReplace = new FindReplaceDialog(this, _model); // Try to create debug panel (see if JSwat is around) /*if (_model.getDebugManager() != null) { try { _debugPanel = new DebugPanel(_model, this); } catch(NoClassDefFoundError e) { // Don't use the debugger _debugPanel = null; } } else { _debugPanel = null; }*/ final JScrollPane outputScroll = new JScrollPane(_outputPane); _junitPanel = new JUnitPanel(_model, this); _tabbedPane = new JTabbedPane(); if (CodeStatus.DEVELOPMENT) { _tabbedPane.addChangeListener(new ChangeListener () { public void stateChanged(ChangeEvent e) { if (_tabbedPane.getSelectedComponent() == outputScroll) { outputScroll.revalidate(); outputScroll.repaint(); } } }); } _tabbedPane.add("Interactions", new BorderlessScrollPane(_interactionsPane)); _tabbedPane.add("Console", outputScroll); _tabs = new LinkedList(); _tabs.addLast(_errorPanel); _tabs.addLast(_junitPanel); _tabs.addLast(_findReplace); // Show compiler output pane by default showTab(_errorPanel); _tabbedPane.setSelectedIndex(0); // Select interactions pane when interactions tab is selected _tabbedPane.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { if (_tabbedPane.getSelectedIndex() == INTERACTIONS_TAB) { _interactionsPane.requestFocus(); } } }); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/9252a1853f289706bd8613c5b3a7e1dae6638ae1/MainFrame.java/buggy/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
389,
542,
1211,
17348,
1435,
288,
565,
389,
2844,
8485,
273,
394,
3633,
8485,
24899,
2284,
1769,
565,
389,
1636,
5537,
273,
394,
12972,
668,
5537,
24899,
2284,
16,
333,
1769,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
389,
542,
1211,
17348,
1435,
288,
565,
389,
2844,
8485,
273,
394,
3633,
8485,
24899,
2284,
1769,
565,
389,
1636,
5537,
273,
394,
12972,
668,
5537,
24899,
2284,
16,
333,
1769,
5... | |
Reference ref; | public void run() { while(true) { Reference ref; try { ref = queue.remove(); // System.err.println("Cleaned: " + ref); } catch (InterruptedException ie) { continue; } if (ref instanceof ReferenceCleared) { ReferenceCleared rc = (ReferenceCleared)ref; rc.cleared(); } } } | 46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/555f41e6ae7a83b0c6d2fd5b62c683f132f9e778/CleanerThread.java/buggy/sources/org/apache/batik/util/CleanerThread.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
3639,
1323,
12,
3767,
13,
288,
15604,
775,
288,
7734,
1278,
273,
2389,
18,
4479,
5621,
7734,
368,
2332,
18,
370,
18,
8222,
2932,
7605,
329,
30,
315,
397,
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,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
3639,
1323,
12,
3767,
13,
288,
15604,
775,
288,
7734,
1278,
273,
2389,
18,
4479,
5621,
7734,
368,
2332,
18,
370,
18,
8222,
2932,
7605,
329,
30,
315,
397,
127... | |
return -1; | System.err.println("lastModified"); return System.currentTimeMillis(); | protected long getLastModified(HttpServletRequest request) { AbstractExternalizeManager extMgr; try { extMgr = getExternalizeManager(request); } catch (Exception e) { return -1; } String pathInfo = request.getPathInfo(); //System.err.println("LAST MODIFIED: " + pathInfo); if (extMgr != null && pathInfo != null && pathInfo.length() > 1) { String identifier = pathInfo.substring(1); ExternalizedResource info = extMgr.getExternalizedResource(identifier); if (info != null) { //System.err.println(" **>" + info.getLastModified()); return info.getLastModified(); } } return -1; } | 3911 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3911/219945c939279377792798b2a84b90d4e451cf78/WingServlet.java/clean/wings/src/org/wings/session/WingServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1525,
27068,
12,
2940,
18572,
590,
13,
288,
3639,
4115,
6841,
554,
1318,
1110,
9455,
31,
3639,
775,
288,
5411,
1110,
9455,
273,
22319,
554,
1318,
12,
2293,
1769,
3639,
289,
3639,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1525,
27068,
12,
2940,
18572,
590,
13,
288,
3639,
4115,
6841,
554,
1318,
1110,
9455,
31,
3639,
775,
288,
5411,
1110,
9455,
273,
22319,
554,
1318,
12,
2293,
1769,
3639,
289,
3639,
10... |
public void setTo(JID to) { setTo(to.toString()); | public void setTo(String to) { element.addAttribute("to", to); | public void setTo(JID to) { setTo(to.toString()); } | 8076 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8076/103f02e5da18a913a9f4fab3518b65ae15b36472/Packet.java/buggy/source/java/org/xmpp/packet/Packet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
19892,
12,
46,
734,
358,
13,
288,
3639,
19892,
12,
869,
18,
10492,
10663,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
19892,
12,
46,
734,
358,
13,
288,
3639,
19892,
12,
869,
18,
10492,
10663,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
attachment = new ReportAttachment(); | attachment = new RepositoryAttachment(attributeFactory); | public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { characters = new StringBuffer(); BugzillaReportElement tag = BugzillaReportElement.UNKNOWN; try { tag = BugzillaReportElement.valueOf(localName.trim().toUpperCase()); } catch (RuntimeException e) { if (e instanceof IllegalArgumentException) { // ignore unrecognized tags return; } throw e; } switch (tag) { case BUGZILLA: // Note: here we can get the bugzilla version if necessary break; case BUG: if (attributes != null && (attributes.getValue("error") != null)) { errorMessage = attributes.getValue("error"); } break; case LONG_DESC: comment = new Comment(report, commentNum++); break; case ATTACHMENT: attachment = new ReportAttachment(); if (attributes != null && (attributes.getValue(BugzillaReportElement.IS_OBSOLETE.getKeyString()) != null)) { attachment.addAttribute(BugzillaReportElement.IS_OBSOLETE, new RepositoryTaskAttribute( BugzillaReportElement.IS_OBSOLETE)); } break; } } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/d6adf902ecafbef942349464348e4435750dd099/SaxBugReportContentHandler.java/clean/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugReportContentHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
13591,
12,
780,
2003,
16,
514,
11927,
16,
514,
22914,
16,
9055,
1677,
13,
1216,
14366,
288,
202,
202,
20558,
273,
394,
6674,
5621,
202,
202,
19865,
15990,
4820,
1046,
1047,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
780,
2003,
16,
514,
11927,
16,
514,
22914,
16,
9055,
1677,
13,
1216,
14366,
288,
202,
202,
20558,
273,
394,
6674,
5621,
202,
202,
19865,
15990,
4820,
1046,
1047,... |
public static ToHitData toHit(IGame game, int attackerId, Targetable target, Mounted club) { final Entity ae = game.getEntity(attackerId); if (ae == null || target == null) { throw new IllegalArgumentException("Attacker or target not valid"); } if (club == null) { throw new IllegalArgumentException("Club is null"); } if (club.getType() == null) { throw new IllegalArgumentException("Club type is null"); } String impossible = toHitIsImpossible(game, ae, target); if(impossible != null) { return new ToHitData(ToHitData.IMPOSSIBLE, impossible); } if (!(ae instanceof Mech)) { return new ToHitData(ToHitData.IMPOSSIBLE, "Non-mechs can't club"); } if (ae.entityIsQuad()) { return new ToHitData(ToHitData.IMPOSSIBLE, "Attacker is a quad"); } IHex attHex = game.getBoard().getHex(ae.getPosition()); IHex targHex = game.getBoard().getHex(target.getPosition()); final int attackerElevation = ae.getElevation() + attHex.getElevation(); final int attackerHeight = attackerElevation + ae.height(); final int targetElevation = target.getElevation() + targHex.getElevation(); final int targetHeight = targetElevation + target.getHeight(); final boolean bothArms = (club.getType().hasFlag(MiscType.F_CLUB) && ((MiscType)club.getType()).hasSubType(MiscType.S_CLUB)); final boolean hasClaws = ( ((BipedMech)ae).hasClaw(Mech.LOC_RARM) || ((BipedMech)ae).hasClaw(Mech.LOC_LARM) ); final boolean shield = ((MiscType)club.getType()).isShield(); ToHitData toHit; if (bothArms) { if (ae.isLocationBad(Mech.LOC_RARM) || ae.isLocationBad(Mech.LOC_LARM)) { return new ToHitData(ToHitData.IMPOSSIBLE, "Arm missing"); } if (ae.weaponFiredFrom(Mech.LOC_RARM) || ae.weaponFiredFrom(Mech.LOC_LARM)) { return new ToHitData(ToHitData.IMPOSSIBLE, "Weapons fired from arm this turn"); } if (!ae.hasWorkingSystem(Mech.ACTUATOR_SHOULDER, Mech.LOC_RARM) || !ae.hasWorkingSystem(Mech.ACTUATOR_SHOULDER, Mech.LOC_LARM)) { return new ToHitData(ToHitData.IMPOSSIBLE, "Shoulder actuator destroyed"); } if ( (!ae.hasWorkingSystem(Mech.ACTUATOR_HAND, Mech.LOC_RARM) || !ae.hasWorkingSystem(Mech.ACTUATOR_HAND, Mech.LOC_LARM)) && !hasClaws) { return new ToHitData(ToHitData.IMPOSSIBLE, "Hand actuator destroyed"); } } else if (shield) { if (!ae.hasPassiveShield(club.getLocation())) { return new ToHitData(ToHitData.IMPOSSIBLE, "Shield not in passive mode"); } } else { if (ae.isLocationBad(club.getLocation())) { return new ToHitData(ToHitData.IMPOSSIBLE, "Arm missing"); } if (ae.weaponFiredFrom(club.getLocation())) { return new ToHitData(ToHitData.IMPOSSIBLE, "Weapons fired from arm this turn"); } if (!ae.hasWorkingSystem(Mech.ACTUATOR_SHOULDER, club.getLocation())) { return new ToHitData(ToHitData.IMPOSSIBLE, "Shoulder actuator destroyed"); } if (!ae.hasWorkingSystem(Mech.ACTUATOR_HAND, club.getLocation()) && !hasClaws) { return new ToHitData(ToHitData.IMPOSSIBLE, "Hand actuator destroyed"); } } if (!shield && ae.getBadCriticals(CriticalSlot.TYPE_EQUIPMENT, ae.getEquipmentNum(club), club.getLocation()) > 0) { return new ToHitData(ToHitData.IMPOSSIBLE, "Club is damaged"); } int targetMaxElevation = attackerHeight; if(target instanceof VTOL) { targetMaxElevation ++; } if (targetHeight < attackerElevation || targetElevation > targetMaxElevation) { return new ToHitData(ToHitData.IMPOSSIBLE, "Target elevation not in range"); } int clubArc = bothArms ? Compute.ARC_FORWARD : (club.getLocation() == Mech.LOC_LARM ? Compute.ARC_LEFTARM : Compute.ARC_RIGHTARM); if ( !Compute.isInArc( ae.getPosition(), ae.getSecondaryFacing(), target.getPosition(), clubArc ) ) { return new ToHitData(ToHitData.IMPOSSIBLE, "Target not in arc"); } if (ae.isProne()) { return new ToHitData(ToHitData.IMPOSSIBLE, "Attacker is prone"); } if ( target.getTargetType() == Targetable.TYPE_BUILDING || target instanceof GunEmplacement ) { return new ToHitData( ToHitData.AUTOMATIC_SUCCESS, "Targeting adjacent building." ); } int base = 4; if ( game.getOptions().booleanOption("maxtech_physical_BTH") ) { base = ae.getCrew().getPiloting() - 1; } if (((MiscType)club.getType()).hasSubType(MiscType.S_SWORD)) { base -= 1; } else if ((((MiscType)club.getType()).hasSubType(MiscType.S_DUAL_SAW)) || (((MiscType)club.getType()).hasSubType(MiscType.S_CHAINSAW))) { base += 1; } else if ((((MiscType)club.getType()).hasSubType(MiscType.S_MACE_THB)) || (((MiscType)club.getType()).hasSubType(MiscType.S_MACE)) || (((MiscType)club.getType()).hasSubType(MiscType.S_BACKHOE))) { base += 2; } else if (((MiscType)club.getType()).hasSubType(MiscType.S_PILE_DRIVER)) { base += 3; } else if (((MiscType)club.getType()).hasSubType(MiscType.S_SHIELD_LARGE)) { base -= 3; } else if (((MiscType)club.getType()).hasSubType(MiscType.S_SHIELD_MEDIUM)) { base -= 2; } else if (((MiscType)club.getType()).hasSubType(MiscType.S_SHIELD_SMALL)) { base -= 1; } toHit = new ToHitData(base, "base"); setCommonModifiers(toHit, game, ae, target); if (bothArms) { if (!ae.hasWorkingSystem(Mech.ACTUATOR_UPPER_ARM, Mech.LOC_RARM)) { toHit.addModifier(2, "Upper arm actuator destroyed"); } if (!ae.hasWorkingSystem(Mech.ACTUATOR_UPPER_ARM, Mech.LOC_LARM)) { toHit.addModifier(2, "Upper arm actuator destroyed"); } if (!ae.hasWorkingSystem(Mech.ACTUATOR_LOWER_ARM, Mech.LOC_RARM)) { toHit.addModifier(2, "Lower arm actuator missing or destroyed"); } if (!ae.hasWorkingSystem(Mech.ACTUATOR_LOWER_ARM, Mech.LOC_LARM)) { toHit.addModifier(2, "Lower arm actuator missing or destroyed"); } if (hasClaws) { toHit.addModifier(2, "Mek has claws"); } } else { if (!ae.hasWorkingSystem(Mech.ACTUATOR_UPPER_ARM, club.getLocation())) { toHit.addModifier(2, "Upper arm actuator destroyed"); } if (!ae.hasWorkingSystem(Mech.ACTUATOR_LOWER_ARM, club.getLocation())) { toHit.addModifier(2, "Lower arm actuator missing or destroyed"); } if (hasClaws) { toHit.addModifier(2, "Mek has claws"); } } if (attackerElevation == targetElevation) { if (shield) toHit.setHitTable(ToHitData.HIT_PUNCH); else toHit.setHitTable(ToHitData.HIT_NORMAL); } else if (attackerElevation < targetElevation) { if (target.getHeight() == 0) { if (shield ) toHit.setHitTable(ToHitData.HIT_PUNCH); else toHit.setHitTable(ToHitData.HIT_NORMAL); } else { toHit.setHitTable(ToHitData.HIT_KICK); } } else { toHit.setHitTable(ToHitData.HIT_PUNCH); } toHit.setSideTable(Compute.targetSideTable(ae,target)); return toHit; | public ToHitData toHit(IGame game) { return toHit(game, getEntityId(), game.getTarget(getTargetType(), getTargetId()), getClub()); | public static ToHitData toHit(IGame game, int attackerId, Targetable target, Mounted club) { final Entity ae = game.getEntity(attackerId); // arguments legal? if (ae == null || target == null) { throw new IllegalArgumentException("Attacker or target not valid"); } if (club == null) { throw new IllegalArgumentException("Club is null"); } if (club.getType() == null) { throw new IllegalArgumentException("Club type is null"); } String impossible = toHitIsImpossible(game, ae, target); if(impossible != null) { return new ToHitData(ToHitData.IMPOSSIBLE, impossible); } // non-mechs can't club if (!(ae instanceof Mech)) { return new ToHitData(ToHitData.IMPOSSIBLE, "Non-mechs can't club"); } //Quads can't club if (ae.entityIsQuad()) { return new ToHitData(ToHitData.IMPOSSIBLE, "Attacker is a quad"); } IHex attHex = game.getBoard().getHex(ae.getPosition()); IHex targHex = game.getBoard().getHex(target.getPosition()); final int attackerElevation = ae.getElevation() + attHex.getElevation(); final int attackerHeight = attackerElevation + ae.height(); final int targetElevation = target.getElevation() + targHex.getElevation(); final int targetHeight = targetElevation + target.getHeight(); final boolean bothArms = (club.getType().hasFlag(MiscType.F_CLUB) && ((MiscType)club.getType()).hasSubType(MiscType.S_CLUB)); final boolean hasClaws = ( ((BipedMech)ae).hasClaw(Mech.LOC_RARM) || ((BipedMech)ae).hasClaw(Mech.LOC_LARM) ); final boolean shield = ((MiscType)club.getType()).isShield(); ToHitData toHit; if (bothArms) { // check if both arms are present & operational if (ae.isLocationBad(Mech.LOC_RARM) || ae.isLocationBad(Mech.LOC_LARM)) { return new ToHitData(ToHitData.IMPOSSIBLE, "Arm missing"); } // check if attacker has fired arm-mounted weapons if (ae.weaponFiredFrom(Mech.LOC_RARM) || ae.weaponFiredFrom(Mech.LOC_LARM)) { return new ToHitData(ToHitData.IMPOSSIBLE, "Weapons fired from arm this turn"); } // need shoulder and hand actuators if (!ae.hasWorkingSystem(Mech.ACTUATOR_SHOULDER, Mech.LOC_RARM) || !ae.hasWorkingSystem(Mech.ACTUATOR_SHOULDER, Mech.LOC_LARM)) { return new ToHitData(ToHitData.IMPOSSIBLE, "Shoulder actuator destroyed"); } if ( (!ae.hasWorkingSystem(Mech.ACTUATOR_HAND, Mech.LOC_RARM) || !ae.hasWorkingSystem(Mech.ACTUATOR_HAND, Mech.LOC_LARM)) && !hasClaws) { return new ToHitData(ToHitData.IMPOSSIBLE, "Hand actuator destroyed"); } } else if (shield) { if (!ae.hasPassiveShield(club.getLocation())) { return new ToHitData(ToHitData.IMPOSSIBLE, "Shield not in passive mode"); } } else { // check if arm is present if (ae.isLocationBad(club.getLocation())) { return new ToHitData(ToHitData.IMPOSSIBLE, "Arm missing"); } // check if attacker has fired arm-mounted weapons if (ae.weaponFiredFrom(club.getLocation())) { return new ToHitData(ToHitData.IMPOSSIBLE, "Weapons fired from arm this turn"); } // need shoulder and hand actuators if (!ae.hasWorkingSystem(Mech.ACTUATOR_SHOULDER, club.getLocation())) { return new ToHitData(ToHitData.IMPOSSIBLE, "Shoulder actuator destroyed"); } if (!ae.hasWorkingSystem(Mech.ACTUATOR_HAND, club.getLocation()) && !hasClaws) { return new ToHitData(ToHitData.IMPOSSIBLE, "Hand actuator destroyed"); } } // club must not be damaged if (!shield && ae.getBadCriticals(CriticalSlot.TYPE_EQUIPMENT, ae.getEquipmentNum(club), club.getLocation()) > 0) { return new ToHitData(ToHitData.IMPOSSIBLE, "Club is damaged"); } // check elevation (target must be within one level, except for VTOL) int targetMaxElevation = attackerHeight; if(target instanceof VTOL) { targetMaxElevation ++; } if (targetHeight < attackerElevation || targetElevation > targetMaxElevation) { return new ToHitData(ToHitData.IMPOSSIBLE, "Target elevation not in range"); } // check facing int clubArc = bothArms ? Compute.ARC_FORWARD : (club.getLocation() == Mech.LOC_LARM ? Compute.ARC_LEFTARM : Compute.ARC_RIGHTARM); if ( !Compute.isInArc( ae.getPosition(), ae.getSecondaryFacing(), target.getPosition(), clubArc ) ) { return new ToHitData(ToHitData.IMPOSSIBLE, "Target not in arc"); } // can't club while prone if (ae.isProne()) { return new ToHitData(ToHitData.IMPOSSIBLE, "Attacker is prone"); } // Attacks against adjacent buildings automatically hit. if ( target.getTargetType() == Targetable.TYPE_BUILDING || target instanceof GunEmplacement ) { return new ToHitData( ToHitData.AUTOMATIC_SUCCESS, "Targeting adjacent building." ); } //Set the base BTH int base = 4; if ( game.getOptions().booleanOption("maxtech_physical_BTH") ) { base = ae.getCrew().getPiloting() - 1; } // Various versions of physical weapons have different base bonuses and penalties. if (((MiscType)club.getType()).hasSubType(MiscType.S_SWORD)) { base -= 1; } else if ((((MiscType)club.getType()).hasSubType(MiscType.S_DUAL_SAW)) || (((MiscType)club.getType()).hasSubType(MiscType.S_CHAINSAW))) { base += 1; } else if ((((MiscType)club.getType()).hasSubType(MiscType.S_MACE_THB)) || (((MiscType)club.getType()).hasSubType(MiscType.S_MACE)) || (((MiscType)club.getType()).hasSubType(MiscType.S_BACKHOE))) { base += 2; } else if (((MiscType)club.getType()).hasSubType(MiscType.S_PILE_DRIVER)) { base += 3; } else if (((MiscType)club.getType()).hasSubType(MiscType.S_SHIELD_LARGE)) { base -= 3; } else if (((MiscType)club.getType()).hasSubType(MiscType.S_SHIELD_MEDIUM)) { base -= 2; } else if (((MiscType)club.getType()).hasSubType(MiscType.S_SHIELD_SMALL)) { base -= 1; } toHit = new ToHitData(base, "base"); setCommonModifiers(toHit, game, ae, target); // damaged or missing actuators if (bothArms) { if (!ae.hasWorkingSystem(Mech.ACTUATOR_UPPER_ARM, Mech.LOC_RARM)) { toHit.addModifier(2, "Upper arm actuator destroyed"); } if (!ae.hasWorkingSystem(Mech.ACTUATOR_UPPER_ARM, Mech.LOC_LARM)) { toHit.addModifier(2, "Upper arm actuator destroyed"); } if (!ae.hasWorkingSystem(Mech.ACTUATOR_LOWER_ARM, Mech.LOC_RARM)) { toHit.addModifier(2, "Lower arm actuator missing or destroyed"); } if (!ae.hasWorkingSystem(Mech.ACTUATOR_LOWER_ARM, Mech.LOC_LARM)) { toHit.addModifier(2, "Lower arm actuator missing or destroyed"); } if (hasClaws) { toHit.addModifier(2, "Mek has claws"); } } else { if (!ae.hasWorkingSystem(Mech.ACTUATOR_UPPER_ARM, club.getLocation())) { toHit.addModifier(2, "Upper arm actuator destroyed"); } if (!ae.hasWorkingSystem(Mech.ACTUATOR_LOWER_ARM, club.getLocation())) { toHit.addModifier(2, "Lower arm actuator missing or destroyed"); } //Rules state +2 bth if your using a club with claws. if (hasClaws) { toHit.addModifier(2, "Mek has claws"); } } // elevation if (attackerElevation == targetElevation) { if (shield) toHit.setHitTable(ToHitData.HIT_PUNCH); else toHit.setHitTable(ToHitData.HIT_NORMAL); } else if (attackerElevation < targetElevation) { if (target.getHeight() == 0) { if (shield ) toHit.setHitTable(ToHitData.HIT_PUNCH); else toHit.setHitTable(ToHitData.HIT_NORMAL); } else { toHit.setHitTable(ToHitData.HIT_KICK); } } else { toHit.setHitTable(ToHitData.HIT_PUNCH); } // factor in target side toHit.setSideTable(Compute.targetSideTable(ae,target)); // done! return toHit; } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/9e5c8530da3d1aaa4a48b9b7c6c56bf003fe518b/ClubAttackAction.java/buggy/megamek/src/megamek/common/actions/ClubAttackAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
2974,
13616,
751,
358,
13616,
12,
3047,
339,
7920,
16,
509,
13843,
264,
548,
16,
5916,
429,
1018,
16,
13076,
329,
927,
373,
13,
288,
3639,
727,
3887,
14221,
273,
7920,
18,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
2974,
13616,
751,
358,
13616,
12,
3047,
339,
7920,
16,
509,
13843,
264,
548,
16,
5916,
429,
1018,
16,
13076,
329,
927,
373,
13,
288,
3639,
727,
3887,
14221,
273,
7920,
18,
58... |
if (fMethod.getDeclaringType().isInterface()){ | if (! fMethod.isConstructor() && fMethod.getDeclaringType().isInterface()){ | public RefactoringStatus checkActivation(IProgressMonitor pm) throws JavaModelException { IMethod orig= (IMethod)WorkingCopyUtil.getOriginal(fMethod); if (orig == null || ! orig.exists()) return RefactoringStatus.createFatalErrorStatus("The selected method has been deleted from '" + fMethod.getCompilationUnit().getElementName()+ "'."); fMethod= orig; RefactoringStatus result= Checks.checkIfCuBroken(fMethod); if (result.hasFatalError()) return result; if (MethodChecks.isVirtual(fMethod)){ result.merge(MethodChecks.checkIfComesFromInterface(getMethod(), new SubProgressMonitor(pm, 1))); if (result.hasFatalError()) return result; result.merge(MethodChecks.checkIfOverridesAnother(getMethod(), new SubProgressMonitor(pm, 1))); if (result.hasFatalError()) return result; } if (fMethod.getDeclaringType().isInterface()){ result.merge(MethodChecks.checkIfOverridesAnother(getMethod(), new SubProgressMonitor(pm, 1))); if (result.hasFatalError()) return result; } return result; } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/60755fb2f4047fdb67f321c49fb537c0abb0b55a/ReorderParametersRefactoring.java/buggy/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ReorderParametersRefactoring.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
868,
3493,
6053,
1482,
866,
14857,
12,
45,
5491,
7187,
7430,
13,
1216,
5110,
1488,
503,
288,
202,
202,
45,
1305,
1647,
33,
261,
45,
1305,
13,
14836,
2951,
1304,
18,
588,
8176,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
868,
3493,
6053,
1482,
866,
14857,
12,
45,
5491,
7187,
7430,
13,
1216,
5110,
1488,
503,
288,
202,
202,
45,
1305,
1647,
33,
261,
45,
1305,
13,
14836,
2951,
1304,
18,
588,
8176,... |
{ ButtonModel bmodel = null; if (c instanceof AbstractButton) bmodel = ((AbstractButton) c).getModel(); Color darkShadow = MetalLookAndFeel.getControlDarkShadow(); Color shadow = MetalLookAndFeel.getControlShadow(); Color light = MetalLookAndFeel.getControlHighlight(); Color middle = MetalLookAndFeel.getControl(); if (c.isEnabled()) { g.setColor(darkShadow); g.drawRect(x, y, w - 2, h - 2); if (!bmodel.isPressed()) { g.setColor(light); g.drawRect(x + 1, y + 1, w - 2, h - 2); g.setColor(middle); g.drawLine(x + 1, y + h - 2, x + 1, y + h - 2); g.drawLine(x + w - 2, y + 1, x + w - 2, y + 1); } else { g.setColor(light); g.drawLine(x + w - 1, y + 1, x + w - 1, y + h - 1); g.drawLine(x + 1, y + h - 1, x + w - 1, y + h - 1); g.setColor(middle); g.drawLine(x + 1, y + 1, x + w - 2, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 2); g.setColor(shadow); g.drawRect(x + 1, y + h - 2, 0, 0); g.drawRect(x + w - 2, y + 1, 0, 0); } } else { g.setColor(MetalLookAndFeel.getInactiveControlTextColor()); g.drawRect(x, y, w - 2, h - 2); } | paintDefaultButtonBorder(c, g, x, y, w, h); | public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { // With the OceanTheme the button border is painted entirely different. // However, I couldn't figure out how this is determined besides checking // for instanceof OceanTheme. The button painting is definitely not // influenced by a UI default property and it is definitely performed // by the same Border class. if (MetalLookAndFeel.getCurrentTheme() instanceof OceanTheme) paintOceanButtonBorder(c, g, x, y, w, h); else { ButtonModel bmodel = null; if (c instanceof AbstractButton) bmodel = ((AbstractButton) c).getModel(); Color darkShadow = MetalLookAndFeel.getControlDarkShadow(); Color shadow = MetalLookAndFeel.getControlShadow(); Color light = MetalLookAndFeel.getControlHighlight(); Color middle = MetalLookAndFeel.getControl(); if (c.isEnabled()) { // draw dark border g.setColor(darkShadow); g.drawRect(x, y, w - 2, h - 2); if (!bmodel.isPressed()) { // draw light border g.setColor(light); g.drawRect(x + 1, y + 1, w - 2, h - 2); // draw crossing pixels of both borders g.setColor(middle); g.drawLine(x + 1, y + h - 2, x + 1, y + h - 2); g.drawLine(x + w - 2, y + 1, x + w - 2, y + 1); } else { // draw light border g.setColor(light); g.drawLine(x + w - 1, y + 1, x + w - 1, y + h - 1); g.drawLine(x + 1, y + h - 1, x + w - 1, y + h - 1); // draw shadow border g.setColor(middle); g.drawLine(x + 1, y + 1, x + w - 2, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 2); // draw crossing pixels of both borders g.setColor(shadow); g.drawRect(x + 1, y + h - 2, 0, 0); g.drawRect(x + w - 2, y + 1, 0, 0); } } else { // draw disabled border g.setColor(MetalLookAndFeel.getInactiveControlTextColor()); g.drawRect(x, y, w - 2, h - 2); } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4b6281ed01a542e70503c69a67129ff6df618649/MetalBorders.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalBorders.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
12574,
8107,
12,
1841,
276,
16,
16830,
314,
16,
509,
619,
16,
509,
677,
16,
509,
341,
16,
18701,
509,
366,
13,
565,
288,
1377,
368,
3423,
326,
531,
31393,
8335,
326,
3568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12574,
8107,
12,
1841,
276,
16,
16830,
314,
16,
509,
619,
16,
509,
677,
16,
509,
341,
16,
18701,
509,
366,
13,
565,
288,
1377,
368,
3423,
326,
531,
31393,
8335,
326,
3568,
... |
newArray.append(aref(new IRubyObject[] {args[i]})); | IRubyObject o = aref(new IRubyObject[] {args[i]}); if (args[i] instanceof RubyRange) { if (o instanceof RubyArray) { for (Iterator j = ((RubyArray) o).getList().iterator(); j.hasNext();) { newArray.append((IRubyObject) j.next()); } } } else { newArray.append(o); } | public IRubyObject values_at(IRubyObject[] args) { RubyArray newArray = getRuntime().newArray(); for (int i = 0; i < args.length; i++) { newArray.append(aref(new IRubyObject[] {args[i]})); } return newArray; } | 46217 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46217/0493e2e7e2224d8d24a2559a6955a926c489fac7/RubyArray.java/clean/src/org/jruby/RubyArray.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
924,
67,
270,
12,
7937,
10340,
921,
8526,
833,
13,
288,
377,
202,
54,
10340,
1076,
11653,
273,
18814,
7675,
2704,
1076,
5621,
377,
202,
1884,
261,
474,
277,
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,
15908,
10340,
921,
924,
67,
270,
12,
7937,
10340,
921,
8526,
833,
13,
288,
377,
202,
54,
10340,
1076,
11653,
273,
18814,
7675,
2704,
1076,
5621,
377,
202,
1884,
261,
474,
277,
273,
... |
if (varChild_lVal == COM.CHILDID_SELF) event.childID = ACC.CHILDID_SELF; else if (control instanceof Tree) event.childID = varChild_lVal; else event.childID = varChild_lVal - 1; | event.childID = osToChildID(varChild_lVal); | int get_accChild(int varChild_vt, int varChild_reserved1, int varChild_lVal, int varChild_reserved2, int ppdispChild) { if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED; if ((varChild_vt & 0xFFFF) != COM.VT_I4) return COM.E_INVALIDARG; if (accessibleControlListeners.size() == 0) { int code = iaccessible.get_accChild(varChild_vt, varChild_reserved1, varChild_lVal, varChild_reserved2, ppdispChild); if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID return code; } AccessibleControlEvent event = new AccessibleControlEvent(this); if (varChild_lVal == COM.CHILDID_SELF) event.childID = ACC.CHILDID_SELF; else if (control instanceof Tree) event.childID = varChild_lVal; // Tree item childIDs are pointers else event.childID = varChild_lVal - 1; // All other childIDs are 1-based indices for (int i = 0; i < accessibleControlListeners.size(); i++) { AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i); listener.getChild(event); } Accessible accessible = event.accessible; if (accessible != null) { COM.MoveMemory(ppdispChild, new int[] { accessible.objIAccessible.getAddress() }, 4); return COM.S_OK; } return COM.S_FALSE; } | 12413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12413/a29ead267e20209d48db539a375ce453914d2d9b/Accessible.java/clean/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
474,
336,
67,
8981,
1763,
12,
474,
569,
1763,
67,
11734,
16,
509,
569,
1763,
67,
18898,
21,
16,
509,
569,
1763,
67,
80,
3053,
16,
509,
569,
1763,
67,
18898,
22,
16,
509,
8228,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
474,
336,
67,
8981,
1763,
12,
474,
569,
1763,
67,
11734,
16,
509,
569,
1763,
67,
18898,
21,
16,
509,
569,
1763,
67,
80,
3053,
16,
509,
569,
1763,
67,
18898,
22,
16,
509,
8228,
... |
break; | return EOL; | 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; } retry: for (;;) { // Eat whitespace, possibly sensitive to newlines. for (;;) { c = getChar(); if (c == EOF_CHAR) { return EOF; } else if (c == '\n') { flags &= ~TSF_DIRTYLINE; if ((flags & TSF_NEWLINES) != 0) { break; } } else if (!isJSSpace(c)) { if (c != '-') { flags |= TSF_DIRTYLINE; } break; } } // identifier/keyword/instanceof? // watch out for starting with a <backslash> boolean identifierStart; boolean isUnicodeEscapeStart = false; if (c == '\\') { c = getChar(); if (c == 'u') { identifierStart = true; isUnicodeEscapeStart = true; stringBufferTop = 0; } else { identifierStart = false; ungetChar(c); c = '\\'; } } else { identifierStart = Character.isJavaIdentifierStart((char)c); if (identifierStart) { stringBufferTop = 0; addToString(c); } } if (identifierStart) { boolean containsEscape = isUnicodeEscapeStart; for (;;) { if (isUnicodeEscapeStart) { // 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 in an identifier, we can report // an error here. int escapeVal = 0; for (int i = 0; i != 4; ++i) { c = getChar(); escapeVal = (escapeVal << 4) | xDigitToInt(c); // Next check takes care about c < 0 and bad escape if (escapeVal < 0) { break; } } if (escapeVal < 0) { reportSyntaxError("msg.invalid.escape", null); return ERROR; } addToString(escapeVal); isUnicodeEscapeStart = false; } else { c = getChar(); if (c == '\\') { c = getChar(); if (c == 'u') { isUnicodeEscapeStart = true; containsEscape = true; } else { reportSyntaxError("msg.illegal.character", null); return ERROR; } } else { if (c == EOF_CHAR || !Character.isJavaIdentifierPart((char)c)) { break; } addToString(c); } } } ungetChar(c); String str = getStringFromBuffer(); if (!containsEscape) { // OPT we shouldn't have to make a string (object!) to // check if it's a keyword. // Return the corresponding token if it's a keyword int 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); } } } this.string = (String)allStrings.intern(str); return NAME; } // is it a number? if (isDigit(c) || (c == '.' && isDigit(peekChar()))) { stringBufferTop = 0; int base = 10; if (c == '0') { c = getChar(); if (c == 'x' || c == 'X') { base = 16; c = getChar(); } else if (isDigit(c)) { base = 8; } else { addToString('0'); } } if (base == 16) { while (0 <= xDigitToInt(c)) { addToString(c); c = getChar(); } } else { while ('0' <= c && c <= '9') { /* * 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; } addToString(c); c = getChar(); } } boolean isInteger = true; if (base == 10 && (c == '.' || c == 'e' || c == 'E')) { isInteger = false; if (c == '.') { do { addToString(c); c = getChar(); } while (isDigit(c)); } if (c == 'e' || c == 'E') { addToString(c); c = getChar(); if (c == '+' || c == '-') { addToString(c); c = getChar(); } if (!isDigit(c)) { reportSyntaxError("msg.missing.exponent", null); return ERROR; } do { addToString(c); c = getChar(); } while (isDigit(c)); } } ungetChar(c); String numString = getStringFromBuffer(); 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. int quoteChar = c; stringBufferTop = 0; c = getChar(); strLoop: while (c != quoteChar) { if (c == '\n' || c == EOF_CHAR) { ungetChar(c); reportSyntaxError("msg.unterminated.string.lit", null); return ERROR; } if (c == '\\') { // We've hit an escaped character int escapeVal; c = getChar(); switch (c) { 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; // \v a late addition to the ECMA spec, // it is not in Java, so use 0xb case 'v': c = 0xb; break; case 'u': // Get 4 hex digits; if the u escape is not // followed by 4 hex digits, use 'u' + the // literal character sequence that follows. int escapeStart = stringBufferTop; addToString('u'); escapeVal = 0; for (int i = 0; i != 4; ++i) { c = getChar(); escapeVal = (escapeVal << 4) | xDigitToInt(c); if (escapeVal < 0) { continue strLoop; } addToString(c); } // prepare for replace of stored 'u' sequence // by escape value stringBufferTop = escapeStart; c = escapeVal; break; case 'x': // Get 2 hex digits, defaulting to 'x'+literal // sequence, as above. c = getChar(); escapeVal = xDigitToInt(c); if (escapeVal < 0) { addToString('x'); continue strLoop; } else { int c1 = c; c = getChar(); escapeVal = (escapeVal << 4) | xDigitToInt(c); if (escapeVal < 0) { addToString('x'); addToString(c1); continue strLoop; } else { // got 2 hex digits c = escapeVal; } } break; default: if ('0' <= c && c < '8') { int val = c - '0'; c = getChar(); if ('0' <= c && c < '8') { val = 8 * val + c - '0'; c = getChar(); if ('0' <= c && c < '8' && val <= 037) { // c is 3rd char of octal sequence only // if the resulting val <= 0377 val = 8 * val + c - '0'; c = getChar(); } } ungetChar(c); c = val; } } } addToString(c); c = getChar(); } String str = getStringFromBuffer(); this.string = (String)allStrings.intern(str); 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 (matchChar('|')) { return OR; } else if (matchChar('=')) { this.op = BITOR; return ASSIGN; } else { return BITOR; } case '^': if (matchChar('=')) { this.op = BITXOR; return ASSIGN; } else { return BITXOR; } case '&': if (matchChar('&')) { return AND; } else if (matchChar('=')) { this.op = BITAND; return ASSIGN; } else { return BITAND; } case '=': if (matchChar('=')) { if (matchChar('=')) this.op = SHEQ; else this.op = EQ; return EQOP; } else { this.op = NOP; return ASSIGN; } case '!': if (matchChar('=')) { if (matchChar('=')) 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 (matchChar('!')) { if (matchChar('-')) { if (matchChar('-')) { skipLine(); continue retry; } ungetChar('-'); } ungetChar('!'); } if (matchChar('<')) { if (matchChar('=')) { this.op = LSH; return ASSIGN; } else { this.op = LSH; return SHOP; } } else { if (matchChar('=')) { this.op = LE; return RELOP; } else { this.op = LT; return RELOP; } } case '>': if (matchChar('>')) { if (matchChar('>')) { if (matchChar('=')) { this.op = URSH; return ASSIGN; } else { this.op = URSH; return SHOP; } } else { if (matchChar('=')) { this.op = RSH; return ASSIGN; } else { this.op = RSH; return SHOP; } } } else { if (matchChar('=')) { this.op = GE; return RELOP; } else { this.op = GT; return RELOP; } } case '*': if (matchChar('=')) { this.op = MUL; return ASSIGN; } else { return MUL; } case '/': // is it a // comment? if (matchChar('/')) { skipLine(); continue retry; } if (matchChar('*')) { boolean lookForSlash = false; for (;;) { c = getChar(); if (c == EOF_CHAR) { reportSyntaxError("msg.unterminated.comment", null); return ERROR; } else if (c == '*') { lookForSlash = true; } else if (c == '/') { if (lookForSlash) { continue retry; } } else { lookForSlash = false; } } } // is it a regexp? if ((flags & TSF_REGEXP) != 0) { stringBufferTop = 0; while ((c = getChar()) != '/') { if (c == '\n' || c == EOF_CHAR) { ungetChar(c); reportSyntaxError("msg.unterminated.re.lit", null); return ERROR; } if (c == '\\') { addToString(c); c = getChar(); } addToString(c); } int reEnd = stringBufferTop; while (true) { if (matchChar('g')) addToString('g'); else if (matchChar('i')) addToString('i'); else if (matchChar('m')) addToString('m'); else break; } if (isAlpha(peekChar())) { reportSyntaxError("msg.invalid.re.flag", null); return ERROR; } this.string = new String(stringBuffer, 0, reEnd); this.regExpFlags = new String(stringBuffer, reEnd, stringBufferTop - reEnd); return REGEXP; } if (matchChar('=')) { this.op = DIV; return ASSIGN; } else { return DIV; } case '%': this.op = MOD; if (matchChar('=')) { return ASSIGN; } else { return MOD; } case '~': this.op = BITNOT; return UNARYOP; case '+': if (matchChar('=')) { this.op = ADD; return ASSIGN; } else if (matchChar('+')) { return INC; } else { return ADD; } case '-': if (matchChar('=')) { this.op = SUB; c = ASSIGN; } else if (matchChar('-')) { if (0 == (flags & TSF_DIRTYLINE)) { // treat HTML end-comment after possible whitespace // after line start as comment-utill-eol if (matchChar('>')) { skipLine(); continue retry; } } c = DEC; } else { c = SUB; } flags |= TSF_DIRTYLINE; return c; default: reportSyntaxError("msg.illegal.character", null); return ERROR; } } } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/56c3f65ac92dbd3ff9f471a1829280e95bd7ddf4/TokenStream.java/buggy/js/rhino/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,
... |
public void expander() throws RecognitionException { String name = null; String config=null; try { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:277:17: ( 'expander' (name= dotted_name )? ( ';' )? opt_eol ) // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:277:17: 'expander' (name= dotted_name )? ( ';' )? opt_eol { match(input,18,FOLLOW_18_in_expander240); // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:277:28: (name= dotted_name )? int alt7=2; int LA7_0 = input.LA(1); if ( LA7_0==ID ) { alt7=1; } else if ( LA7_0==-1||LA7_0==EOL||LA7_0==15||(LA7_0>=17 && LA7_0<=20)||LA7_0==26||LA7_0==28 ) { alt7=2; } else { NoViableAltException nvae = new NoViableAltException("277:28: (name= dotted_name )?", 7, 0, input); throw nvae; } switch (alt7) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:277:29: name= dotted_name { following.push(FOLLOW_dotted_name_in_expander245); name=dotted_name(); following.pop(); } break; } // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:277:48: ( ';' )? int alt8=2; int LA8_0 = input.LA(1); if ( LA8_0==15 ) { alt8=1; } else if ( LA8_0==-1||LA8_0==EOL||(LA8_0>=17 && LA8_0<=20)||LA8_0==26||LA8_0==28 ) { alt8=2; } else { NoViableAltException nvae = new NoViableAltException("277:48: ( \';\' )?", 8, 0, input); throw nvae; } switch (alt8) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:277:48: ';' { match(input,15,FOLLOW_15_in_expander249); } break; } following.push(FOLLOW_opt_eol_in_expander252); opt_eol(); following.pop(); if (expanderResolver == null) throw new IllegalArgumentException("Unable to use expander. Make sure a expander or dsl config is being passed to the parser. [ExpanderResolver was not set]."); if ( expander != null ) throw new IllegalArgumentException( "Only one 'expander' statement per file is allowed" ); expander = expanderResolver.get( name, config ); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/297a1e0ef2967d8b4f7be9c022102a5a56e97489/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4542,
264,
1435,
1216,
9539,
288,
6647,
514,
508,
273,
446,
31,
1171,
202,
202,
780,
642,
33,
2011,
31,
540,
202,
3639,
775,
288,
5411,
368,
385,
5581,
15298,
64,
10649,
8464... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
264,
1435,
1216,
9539,
288,
6647,
514,
508,
273,
446,
31,
1171,
202,
202,
780,
642,
33,
2011,
31,
540,
202,
3639,
775,
288,
5411,
368,
385,
5581,
15298,
64,
10649,
8464... | ||
double devSX = Math.sqrt(sx*sx + shy*shy); double devSY = Math.sqrt(sy*sy + shx*shx); | public RenderedImage createRendering(RenderContext renderContext){ // Get user space to device space transform AffineTransform usr2dev = renderContext.getTransform(); if(usr2dev == null){ usr2dev = new AffineTransform(); } // As per specification, a value of zero for the // x-axis or y-axis causes the filter to produce // nothing. // The processing is done as follows: // + if the x resolution is zero, this is a no-op // else compute the x scale. // + if the y resolution is zero, this is a no-op // else compute the y resolution from the x scale // and compute the corresponding y scale. // + if the y or x scale is less than one, insert // an AffineRable. // Else, return the source as is. float filterResolutionX = this.filterResolutionX; float filterResolutionY = this.filterResolutionY; // System.out.println("FilterResRable: " + filterResolutionX + "x" + // filterResolutionY); // Find out the renderable area Rectangle2D imageRect = getBounds2D(); Rectangle devRect; devRect = usr2dev.createTransformedShape(imageRect).getBounds(); if(filterResolutionX > 1) { // Now, compare the devRect with the filter // resolution hints float scaleX = 1; float scaleY = 1; if(filterResolutionX < devRect.width){ scaleX = filterResolutionX / (float)devRect.width; } if(filterResolutionY != 0){ if(filterResolutionY < 0){ filterResolutionY = scaleX*(float)devRect.height; } if(filterResolutionY < devRect.height) { scaleY = filterResolutionY / (float)devRect.height; } // Only resample if either scaleX or scaleY is // smaller than 1 RenderableImage localSource = getSource(); RenderContext localRenderContext = renderContext; if((scaleX < 1) || (scaleY < 1)){ // System.out.println("filterRes X " + filterResolutionX + // " Y : " + filterResolutionY); scaleX = scaleX < scaleY ? scaleX : scaleY; scaleY = scaleX; // // Create a rendering that will be less than // or equal to filterResolutionX by filterResolutionY. // AffineTransform newUsr2Dev = AffineTransform.getScaleInstance(scaleX, scaleY); newUsr2Dev.concatenate(usr2dev); // This splits out the scale so we know how much to pad // in user space so we have a pixel surround in device // space for the affine. double sx = newUsr2Dev.getScaleX(); double sy = newUsr2Dev.getScaleY(); double shx = newUsr2Dev.getShearX(); double shy = newUsr2Dev.getShearY(); // The Scale is roughly the "hypotonose" of the // matrix vectors. double devSX = Math.sqrt(sx*sx + shy*shy); double devSY = Math.sqrt(sy*sy + shx*shx); // // Create a new RenderingContext // RenderContext newRenderContext = (RenderContext)renderContext.clone(); newRenderContext.setTransform(newUsr2Dev); Shape aoi = renderContext.getAreaOfInterest(); if (aoi == null) aoi = getBounds2D(); // // We need to grow the area of interest by a few // pixels in device space so the AffineRed can // interpolate at the edges.. // Rectangle2D newAOI = aoi.getBounds2D(); newAOI = new Rectangle2D.Double (newAOI.getX()-1/devSX, newAOI.getY()-1/devSY, newAOI.getWidth()+2/devSX, newAOI.getHeight()+2/devSY); newRenderContext.setAreaOfInterest(newAOI); // // Now, use an AffineRable that will apply the // resampling // AffineTransform resampleTxf = AffineTransform.getScaleInstance(1/scaleX, 1/scaleY); RenderedImage result = null; result = localSource.createRendering(newRenderContext); // org.ImageDisplay.showImage("AT: " + newUsr2Dev, result); if (result != null) result = new AffineRed (GraphicsUtil.wrap(result), resampleTxf, renderContext.getRenderingHints()); return result; } return localSource.createRendering(localRenderContext); } } return null; } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/4a4a1ca3f7e19e5a5e3bf63d73ec840e6eff093f/FilterResRable8Bit.java/buggy/sources/org/apache/batik/ext/awt/image/renderable/FilterResRable8Bit.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6987,
329,
2040,
752,
14261,
12,
3420,
1042,
28678,
15329,
3639,
368,
968,
729,
3476,
358,
2346,
3476,
2510,
3639,
23906,
558,
4059,
16575,
22,
5206,
273,
28678,
18,
588,
4059,
5621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6987,
329,
2040,
752,
14261,
12,
3420,
1042,
28678,
15329,
3639,
368,
968,
729,
3476,
358,
2346,
3476,
2510,
3639,
23906,
558,
4059,
16575,
22,
5206,
273,
28678,
18,
588,
4059,
5621,
... | |
new ImageIcon(getClass().getResource("images/biffUnknown.gif")); | new ImageIcon("ui/images/biffUnknown.gif"); | public BiffIcon() { if (fIconUnknown == null) { fIconUnknown = new ImageIcon(getClass().getResource("images/biffUnknown.gif")); fIconNew = new ImageIcon(getClass().getResource("images/biffNew.gif")); fIconNone = new ImageIcon(getClass().getResource("images/biffNone.gif")); } setText(null); // Necessary for icon size to be used for preferred size setBiffState(MailDrop.UNKNOWN); fThread = BiffThread.Get(); fThread.addChangeListener(this); setBiffState(fThread.getBiffState()); } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/3cd6e9d81112e3ab17a910eaef36b9e56b2a8b6a/BiffIcon.java/buggy/grendel/sources/grendel/ui/BiffIcon.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
605,
3048,
5554,
1435,
288,
565,
309,
261,
74,
5554,
4874,
422,
446,
13,
288,
1377,
284,
5554,
4874,
273,
3639,
394,
3421,
5554,
2932,
4881,
19,
7369,
19,
70,
3048,
4874,
18,
1390... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
605,
3048,
5554,
1435,
288,
565,
309,
261,
74,
5554,
4874,
422,
446,
13,
288,
1377,
284,
5554,
4874,
273,
3639,
394,
3421,
5554,
2932,
4881,
19,
7369,
19,
70,
3048,
4874,
18,
1390... |
private static void generateCtor(ClassFileWriter cfw, String adapterName, Class superClass) { cfw.startMethod("<init>", "(Lorg/mozilla/javascript/Scriptable;)V", ClassFileWriter.ACC_PUBLIC); // Invoke base class constructor cfw.add(ByteCode.ALOAD_0); // this cfw.add(ByteCode.INVOKESPECIAL, superClass.getName().replace('.', '/'), "<init>", "()", "V"); // Save parameter in instance variable "self" cfw.add(ByteCode.ALOAD_0); // this cfw.add(ByteCode.ALOAD_1); // first arg cfw.add(ByteCode.PUTFIELD, adapterName, "self", "Lorg/mozilla/javascript/Scriptable;"); // Set the prototype of the js object to be a LiveConnect // wapper of the generated class's object cfw.add(ByteCode.ALOAD_1); // first arg cfw.add(ByteCode.ALOAD_0); // this cfw.add(ByteCode.INVOKESTATIC, "org/mozilla/javascript/ScriptRuntime", "setAdapterProto", "(Lorg/mozilla/javascript/Scriptable;" + "Ljava/lang/Object;)", "V"); cfw.add(ByteCode.RETURN); cfw.stopMethod((short)20, null); // TODO: magic number "20" } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/9a0f128be44e151cb511e8f524bcf6e360ad5635/JavaAdapter.java/buggy/js/rhino/org/mozilla/javascript/JavaAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
2103,
27425,
12,
797,
812,
2289,
6080,
91,
16,
514,
4516,
461,
16,
4766,
1377,
1659,
18846,
13,
377,
288,
3639,
6080,
91,
18,
1937,
1305,
2932,
32,
2738,
2984,
16,
7682,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
2103,
27425,
12,
797,
812,
2289,
6080,
91,
16,
514,
4516,
461,
16,
4766,
1377,
1659,
18846,
13,
377,
288,
3639,
6080,
91,
18,
1937,
1305,
2932,
32,
2738,
2984,
16,
7682,... | ||
catch(Exception e) { if(myLogger.isLoggable(Logger.WARNING)) myLogger.log(Logger.WARNING,"Link failure!"); return false; } finally { impl.releaseAgentDescriptor(agentID); | else { throw new NotFoundException("Agent agentID not found"); | private boolean transferIdentity(AID agentID, Location src, Location dest) throws IMTPException, NotFoundException { //log("Transferring identity of agent "+agentID+" from "+src.getName()+" to "+dest.getName(), 2); if(myLogger.isLoggable(Logger.INFO)) myLogger.log(Logger.INFO,"Transferring identity of agent "+agentID+" from "+src.getName()+" to "+dest.getName()); MainContainer impl = myContainer.getMain(); if(impl != null) { AgentDescriptor ad = impl.acquireAgentDescriptor(agentID); if (ad != null) { try { AgentMobilitySlice srcSlice = (AgentMobilitySlice)getSlice(src.getName()); AgentMobilitySlice destSlice = (AgentMobilitySlice)getSlice(dest.getName()); boolean srcReady = false; boolean destReady = false; try { srcReady = srcSlice.prepare(); } catch(IMTPException imtpe) { srcSlice = (AgentMobilitySlice)getFreshSlice(src.getName()); srcReady = srcSlice.prepare(); } //log("Source "+src.getName()+" "+srcReady, 2); if(myLogger.isLoggable(Logger.INFO)) myLogger.log(Logger.INFO,"Source "+src.getName()+" "+srcReady); try { destReady = destSlice.prepare(); } catch(IMTPException imtpe) { destSlice = (AgentMobilitySlice)getFreshSlice(dest.getName()); destReady = destSlice.prepare(); } //log("Destination "+dest.getName()+" "+destReady, 2); if(myLogger.isLoggable(Logger.INFO)) myLogger.log(Logger.INFO,"Destination "+dest.getName()+" "+destReady); if(srcReady && destReady) { // Commit transaction impl.movedAgent(agentID, (ContainerID)src, (ContainerID)dest); return true; } else { // Problems on a participant slice: abort transaction return false; } } catch(Exception e) { // Link failure: abort transaction //log("Link failure!", 2); if(myLogger.isLoggable(Logger.WARNING)) myLogger.log(Logger.WARNING,"Link failure!"); return false; } finally { impl.releaseAgentDescriptor(agentID); } } else { throw new NotFoundException("Agent agentID not found"); } } else { // Do nothing for now, but could also use another slice as transaction coordinator... //log("Not a main!", 2); if(myLogger.isLoggable(Logger.WARNING)) myLogger.log(Logger.WARNING,"Not a main!"); return false; } } | 5505 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5505/46dba8df2358fb752e8d0a7cd2a512d0a633dbd6/AgentMobilityService.java/buggy/src/jade/core/mobility/AgentMobilityService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
7412,
4334,
12,
37,
734,
4040,
734,
16,
7050,
1705,
16,
7050,
1570,
13,
1216,
467,
14636,
503,
16,
12323,
288,
202,
202,
759,
1330,
2932,
1429,
74,
20245,
4215,
434,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
7412,
4334,
12,
37,
734,
4040,
734,
16,
7050,
1705,
16,
7050,
1570,
13,
1216,
467,
14636,
503,
16,
12323,
288,
202,
202,
759,
1330,
2932,
1429,
74,
20245,
4215,
434,
40... |
return (GeronimoMessageListener[])getMessageListener(); | return (GeronimoMessageListener[]) getMessageListener(); | public GeronimoMessageListener[] getGeronimoMessageListener() { return (GeronimoMessageListener[])getMessageListener(); } | 12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/aee780fd2f220ae6864db486839f571cb0932649/GeronimoMessageAdapter.java/buggy/modules/core/src/java/org/apache/geronimo/deployment/model/geronimo/connector/GeronimoMessageAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
611,
264,
265,
381,
83,
1079,
2223,
8526,
7162,
264,
265,
381,
83,
1079,
2223,
1435,
288,
3639,
327,
261,
43,
264,
265,
381,
83,
1079,
2223,
63,
5717,
2381,
2223,
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,
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,
611,
264,
265,
381,
83,
1079,
2223,
8526,
7162,
264,
265,
381,
83,
1079,
2223,
1435,
288,
3639,
327,
261,
43,
264,
265,
381,
83,
1079,
2223,
63,
5717,
2381,
2223,
5621,
565,
289,
... |
public void setParentsForAllPushOptionOptions(DatasetView d) throws ConfigurationException { | public void setParentsForAllPushOptionOptions(DatasetView d) throws ConfigurationException { | public void setParentsForAllPushOptionOptions(DatasetView d) throws ConfigurationException { setParentsForAllPushOptionOptions(d, getOptions()); } | 2000 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2000/16a9b4a2f910dae8967a02428e2bfad83cc46e96/FilterDescription.java/buggy/src/java/org/ensembl/mart/lib/config/FilterDescription.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
12548,
28388,
1595,
7621,
1895,
1320,
12,
10656,
1767,
302,
13,
202,
202,
15069,
22196,
288,
202,
202,
542,
13733,
1290,
1595,
7621,
1895,
1320,
12,
72,
16,
9849,
10663,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
12548,
28388,
1595,
7621,
1895,
1320,
12,
10656,
1767,
302,
13,
202,
202,
15069,
22196,
288,
202,
202,
542,
13733,
1290,
1595,
7621,
1895,
1320,
12,
72,
16,
9849,
10663,
20... |
NavigatorContentExtension[] resultInstances = findRelevantContentExtensions(anElement); | NavigatorContentExtension[] resultInstances = findContentExtensionsByTriggerPoint(anElement); | public ITreeContentProvider[] findParentContentProviders(Object anElement) { NavigatorContentExtension[] resultInstances = findRelevantContentExtensions(anElement); return extractContentProviders(resultInstances); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/1869fb0f66846c5ed765b0677f0e3907b2d6a068/NavigatorContentService.java/buggy/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/internal/NavigatorContentService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
2471,
1350,
2249,
8526,
1104,
3054,
1350,
10672,
12,
921,
392,
1046,
13,
288,
202,
202,
22817,
1350,
3625,
8526,
563,
5361,
273,
1104,
17018,
7445,
1350,
7513,
12,
304,
104... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
2471,
1350,
2249,
8526,
1104,
3054,
1350,
10672,
12,
921,
392,
1046,
13,
288,
202,
202,
22817,
1350,
3625,
8526,
563,
5361,
273,
1104,
17018,
7445,
1350,
7513,
12,
304,
104... |
public void __delitem__(String key) { __delitem__(new PyString(key)); | public void __delitem__(PyObject key) { throw Py.AttributeError("__delitem__"); | public void __delitem__(String key) { __delitem__(new PyString(key)); } | 6527 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6527/00be5cae3adac1a66f2dbada82636559618608f7/PyObject.java/buggy/org/python/core/PyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1001,
3771,
1726,
972,
12,
780,
498,
13,
288,
202,
565,
1001,
3771,
1726,
972,
12,
2704,
4707,
780,
12,
856,
10019,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
202,
482,
918,
1001,
3771,
1726,
972,
12,
780,
498,
13,
288,
202,
565,
1001,
3771,
1726,
972,
12,
2704,
4707,
780,
12,
856,
10019,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if(ext.equals("js")) { | if (ext.equals("js")) { | void init() { setJMenuBar(menubar = new Menubar(this)); toolBar = new JToolBar(); JButton button; JButton breakButton, goButton, stepIntoButton, stepOverButton, stepOutButton; String [] toolTips = {"Break (Pause)", "Go (F5)", "Step Into (F11)", "Step Over (F7)", "Step Out (F8)"}; int count = 0; button = breakButton = new JButton("Break"); JButton focusButton = button; button.setToolTipText("Break"); button.setActionCommand("Break"); button.addActionListener(menubar); button.setEnabled(true); button.setToolTipText(toolTips[count++]); button = goButton = new JButton("Go"); button.setToolTipText("Go"); button.setActionCommand("Go"); button.addActionListener(menubar); button.setEnabled(false); button.setToolTipText(toolTips[count++]); button = stepIntoButton = new JButton("Step Into"); button.setToolTipText("Step Into"); button.setActionCommand("Step Into"); button.addActionListener(menubar); button.setEnabled(false); button.setToolTipText(toolTips[count++]); button = stepOverButton = new JButton("Step Over"); button.setToolTipText("Step Over"); button.setActionCommand("Step Over"); button.setEnabled(false); button.addActionListener(menubar); button.setToolTipText(toolTips[count++]); button = stepOutButton = new JButton("Step Out"); button.setToolTipText("Step Out"); button.setActionCommand("Step Out"); button.setEnabled(false); button.addActionListener(menubar); button.setToolTipText(toolTips[count++]); Dimension dim = stepOverButton.getPreferredSize(); breakButton.setPreferredSize(dim); breakButton.setMinimumSize(dim); breakButton.setMaximumSize(dim); breakButton.setSize(dim); goButton.setPreferredSize(dim); goButton.setMinimumSize(dim); goButton.setMaximumSize(dim); stepIntoButton.setPreferredSize(dim); stepIntoButton.setMinimumSize(dim); stepIntoButton.setMaximumSize(dim); stepOverButton.setPreferredSize(dim); stepOverButton.setMinimumSize(dim); stepOverButton.setMaximumSize(dim); stepOutButton.setPreferredSize(dim); stepOutButton.setMinimumSize(dim); stepOutButton.setMaximumSize(dim); toolBar.add(breakButton); toolBar.add(goButton); toolBar.add(stepIntoButton); toolBar.add(stepOverButton); toolBar.add(stepOutButton); JPanel contentPane = new JPanel(); contentPane.setLayout(new BorderLayout()); getContentPane().add(toolBar, BorderLayout.NORTH); getContentPane().add(contentPane, BorderLayout.CENTER); desk = new JDesktopPane(); desk.setPreferredSize(new Dimension(600, 300)); desk.setMinimumSize(new Dimension(150, 50)); desk.add(console = new JSInternalConsole("JavaScript Console")); context = new ContextWindow(this); context.setPreferredSize(new Dimension(600, 120)); context.setMinimumSize(new Dimension(50, 50)); split1 = new JSplitPane(JSplitPane.VERTICAL_SPLIT, desk, context); split1.setOneTouchExpandable(true); Main.setResizeWeight(split1, 0.66); contentPane.add(split1, BorderLayout.CENTER); statusBar = new JLabel(); statusBar.setText("Thread: "); contentPane.add(statusBar, BorderLayout.SOUTH); dlg = new JFileChooser(); javax.swing.filechooser.FileFilter filter = new javax.swing.filechooser.FileFilter() { public boolean accept(File f) { if(f.isDirectory()) { return true; } String n = f.getName(); int i = n.lastIndexOf('.'); if(i > 0 && i < n.length() -1) { String ext = n.substring(i + 1).toLowerCase(); if(ext.equals("js")) { return true; } } return false; } public String getDescription() { return "JavaScript Files (*.js)"; } }; dlg.addChoosableFileFilter(filter); final Main self = this; addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { self.Exit(); } }); } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/b9766e81693411fa600b26b9a0763dcf621b2770/Main.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1208,
1435,
288,
3639,
444,
46,
4599,
5190,
12,
27617,
373,
297,
273,
394,
490,
275,
373,
297,
12,
2211,
10019,
3639,
5226,
5190,
273,
394,
804,
6364,
5190,
5621,
3639,
28804,
3568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
1435,
288,
3639,
444,
46,
4599,
5190,
12,
27617,
373,
297,
273,
394,
490,
275,
373,
297,
12,
2211,
10019,
3639,
5226,
5190,
273,
394,
804,
6364,
5190,
5621,
3639,
28804,
3568,
... |
if (!isMsgType(msgType)) { throw new FieldException(SessionRejectReason.INVALID_MSGTYPE); } } | if (!isMsgType(msgType)) { throw new FieldException(SessionRejectReason.INVALID_MSGTYPE); } } | private void checkMsgType(String msgType) { if (!isMsgType(msgType)) { throw new FieldException(SessionRejectReason.INVALID_MSGTYPE); } } | 6257 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6257/47d1964ddafa7f6ee47d33846c3320c71d9e789f/DataDictionary.java/clean/src/quickfix/DataDictionary.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
3332,
559,
12,
780,
1234,
559,
13,
288,
3639,
309,
16051,
291,
3332,
559,
12,
3576,
559,
3719,
288,
5411,
604,
394,
2286,
503,
12,
2157,
21705,
8385,
18,
9347,
67,
11210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
3332,
559,
12,
780,
1234,
559,
13,
288,
3639,
309,
16051,
291,
3332,
559,
12,
3576,
559,
3719,
288,
5411,
604,
394,
2286,
503,
12,
2157,
21705,
8385,
18,
9347,
67,
11210... |
public boolean isSet(org.quickfix.field.AllocAccount field) | public boolean isSet(quickfix.field.AllocAccount field) | public boolean isSet(org.quickfix.field.AllocAccount field) { return isSetField(field); } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/NewOrderMultileg.java/buggy/src/java/src/quickfix/fix43/NewOrderMultileg.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
13532,
12,
19525,
904,
18,
1518,
18,
8763,
3032,
652,
13,
225,
288,
327,
13532,
974,
12,
1518,
1769,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
13532,
12,
19525,
904,
18,
1518,
18,
8763,
3032,
652,
13,
225,
288,
327,
13532,
974,
12,
1518,
1769,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
} else if (!student.hasAnyStudentCurricularPlans()) { final ActionMessages actionMessages = new ActionMessages(); actionMessages.add("error.student.curricularPlan.nonExistent", new ActionMessage("error.student.curricularPlan.nonExistent")); saveMessages(request, actionMessages); | public ActionForward prepare(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { final Person person = SessionUtils.getUserView(request).getPerson(); final Student student = person.getStudentByUsername(); if (student.getStudentCurricularPlansCount() > 1) { request.setAttribute("student", student); request.setAttribute("studentCurricularPlans", student.getStudentCurricularPlans()); if (student.getActiveStudentCurricularPlan().getEnrolmentsExecutionYears().isEmpty()) { final ActionMessages actionMessages = new ActionMessages(); actionMessages.add("message.no.enrolments", new ActionMessage("message.no.enrolments")); saveMessages(request, actionMessages); } else { request.setAttribute("executionYears", student.getActiveStudentCurricularPlan().getEnrolmentsExecutionYears()); } } else if (!student.hasAnyStudentCurricularPlans()) { final ActionMessages actionMessages = new ActionMessages(); actionMessages.add("error.student.curricularPlan.nonExistent", new ActionMessage("error.student.curricularPlan.nonExistent")); saveMessages(request, actionMessages); } return mapping.findForward("createDocumentRequests"); } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/c6db24c01d9099fb93ee69dabe2d6cdfc14877f4/DocumentRequestDispatchAction.java/clean/src/net/sourceforge/fenixedu/presentationTier/Action/student/administrativeOfficeServices/DocumentRequestDispatchAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4382,
8514,
2911,
12,
1803,
3233,
2874,
16,
4382,
1204,
1301,
1204,
16,
9984,
590,
16,
12446,
766,
13,
288,
3639,
727,
11573,
6175,
273,
3877,
1989,
18,
588,
1299,
1767,
12,
2293,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2911,
12,
1803,
3233,
2874,
16,
4382,
1204,
1301,
1204,
16,
9984,
590,
16,
12446,
766,
13,
288,
3639,
727,
11573,
6175,
273,
3877,
1989,
18,
588,
1299,
1767,
12,
2293,
... | |
if (LayoutUtil.isBlockOrInlineElementBox(c, box)) { if (box.margin == null) { box.margin = box.getContent().getStyle().getMarginWidth(); } | if (box.margin == null) { box.margin = c.getCurrentStyle().getMarginWidth(); | public static Border getMargin(Context c, Box box) { if (LayoutUtil.isBlockOrInlineElementBox(c, box)) { if (box.margin == null) { box.margin = box.getContent().getStyle().getMarginWidth(); } } return box.margin; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/e65470765b9501b251ba6faf1734b383bb9b1578/DefaultLayout.java/clean/src/java/org/xhtmlrenderer/layout/DefaultLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
13525,
2108,
5243,
12,
1042,
276,
16,
8549,
3919,
13,
288,
3639,
309,
261,
3744,
1304,
18,
291,
1768,
1162,
10870,
1046,
3514,
12,
71,
16,
3919,
3719,
288,
5411,
309,
261,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
13525,
2108,
5243,
12,
1042,
276,
16,
8549,
3919,
13,
288,
3639,
309,
261,
3744,
1304,
18,
291,
1768,
1162,
10870,
1046,
3514,
12,
71,
16,
3919,
3719,
288,
5411,
309,
261,
21... |
SortedBag bag3 = decorateBag(emptyBag, null); | SortedBag bag3 = decorateBag(new TreeBag(), null); | public void testDecorate() { SortedBag bag = decorateBag(emptyBag, stringClass); try { SortedBag bag3 = decorateBag(emptyBag, null); fail("Expecting IllegalArgumentException for null predicate"); } catch (IllegalArgumentException e) {} try { SortedBag bag4 = decorateBag(nullBag, stringClass); fail("Expecting IllegalArgumentException for null bag"); } catch (IllegalArgumentException e) {} } | 55609 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55609/ae60862fd63c00004799e02ca5f1c930e1752970/TestTypedSortedBag.java/clean/src/test/org/apache/commons/collections/bag/TestTypedSortedBag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
7859,
340,
1435,
288,
3639,
13717,
5013,
13189,
273,
15752,
5013,
12,
5531,
5013,
16,
533,
797,
1769,
3639,
775,
288,
5411,
13717,
5013,
13189,
23,
273,
15752,
5013,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
7859,
340,
1435,
288,
3639,
13717,
5013,
13189,
273,
15752,
5013,
12,
5531,
5013,
16,
533,
797,
1769,
3639,
775,
288,
5411,
13717,
5013,
13189,
23,
273,
15752,
5013,
12,
... |
version = Version.read_version(din); | version = Version.read_version(istream); | public void read(java.io.InputStream istream) throws MARSHAL { try { DataInputStream din = new DataInputStream(istream); byte[] xMagic = new byte[ MAGIC.length ]; din.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) throw new MARSHAL("Not a GIOP message"); version = Version.read_version(din); flags = (byte) din.read(); /** TODO implement support for the little endian. */ if (!isBigEndian()) throw new MARSHAL("Little endian unsupported."); message_type = (byte) din.read(); message_size = din.readInt(); } catch (IOException ex) { throw new MARSHAL(ex.toString()); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/322bdf31032fa8067da8c0c35cf403ba70c4c1c4/MessageHeader.java/buggy/core/src/classpath/gnu/gnu/CORBA/GIOP/MessageHeader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
855,
12,
6290,
18,
1594,
18,
4348,
277,
3256,
13,
5411,
1216,
490,
985,
2664,
1013,
225,
288,
565,
775,
1377,
288,
3639,
29382,
302,
267,
273,
394,
29382,
12,
376,
793,
1769,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
855,
12,
6290,
18,
1594,
18,
4348,
277,
3256,
13,
5411,
1216,
490,
985,
2664,
1013,
225,
288,
565,
775,
1377,
288,
3639,
29382,
302,
267,
273,
394,
29382,
12,
376,
793,
1769,... |
comment = new Comment(report, commentNum++); | comment = new Comment(attributeFactory, report, commentNum++); | public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { characters = new StringBuffer(); BugzillaReportElement tag = BugzillaReportElement.UNKNOWN; try { tag = BugzillaReportElement.valueOf(localName.trim().toUpperCase()); } catch (RuntimeException e) { if (e instanceof IllegalArgumentException) { // ignore unrecognized tags return; } throw e; } switch (tag) { case BUGZILLA: // Note: here we can get the bugzilla version if necessary break; case BUG: if (attributes != null && (attributes.getValue("error") != null)) { errorMessage = attributes.getValue("error"); } break; case LONG_DESC: comment = new Comment(report, commentNum++); break; case ATTACHMENT: attachment = new ReportAttachment(); if (attributes != null && (attributes.getValue(BugzillaReportElement.IS_OBSOLETE.getKeyString()) != null)) { attachment.addAttribute(BugzillaReportElement.IS_OBSOLETE, new RepositoryTaskAttribute( BugzillaReportElement.IS_OBSOLETE)); } break; } } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/d6adf902ecafbef942349464348e4435750dd099/SaxBugReportContentHandler.java/clean/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugReportContentHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
13591,
12,
780,
2003,
16,
514,
11927,
16,
514,
22914,
16,
9055,
1677,
13,
1216,
14366,
288,
202,
202,
20558,
273,
394,
6674,
5621,
202,
202,
19865,
15990,
4820,
1046,
1047,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
780,
2003,
16,
514,
11927,
16,
514,
22914,
16,
9055,
1677,
13,
1216,
14366,
288,
202,
202,
20558,
273,
394,
6674,
5621,
202,
202,
19865,
15990,
4820,
1046,
1047,... |
if (mName.equals(ICalTok.RRULE.toString()) || mName.equals(ICalTok.EXRULE.toString())) sw.write(mValue); else sw.write(escape(mValue)); | if (mValue != null) { if (mName.equals(ICalTok.RRULE.toString()) || mName.equals(ICalTok.EXRULE.toString())) sw.write(mValue); else sw.write(escape(mValue)); } | public void toICalendar(Writer w) throws IOException { StringWriter sw = new StringWriter(); sw.write(escape(mName)); for (ZParameter param: mParameters) param.toICalendar(sw); sw.write(':'); if (mName.equals(ICalTok.RRULE.toString()) || mName.equals(ICalTok.EXRULE.toString())) sw.write(mValue); else sw.write(escape(mValue)); // Write with folding. String rawval = sw.toString(); int len = rawval.length(); for (int i = 0; i < len; i += CHARS_PER_FOLDED_LINE) { int upto = Math.min(i + CHARS_PER_FOLDED_LINE, len); String segment = rawval.substring(i, upto); if (i > 0) { w.write(LINE_BREAK); w.write(' '); } w.write(segment); } w.write(LINE_BREAK); } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/d2bb4f39fb971bbc73c0ecff01cbd6d1962c353b/ZCalendar.java/clean/ZimbraServer/src/java/com/zimbra/cs/mailbox/calendar/ZCalendar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
358,
2871,
287,
2843,
12,
2289,
341,
13,
1216,
1860,
288,
5411,
17436,
1352,
273,
394,
17436,
5621,
13491,
1352,
18,
2626,
12,
6939,
12,
81,
461,
10019,
5411,
364,
261,
62,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
358,
2871,
287,
2843,
12,
2289,
341,
13,
1216,
1860,
288,
5411,
17436,
1352,
273,
394,
17436,
5621,
13491,
1352,
18,
2626,
12,
6939,
12,
81,
461,
10019,
5411,
364,
261,
62,
1... |
lblForeground.setText("Color:"); | lblForeground.setText(Messages.getString("FontDefinitionDialog.Lbl.Color")); | private void placeComponents() { GridLayout glContent = new GridLayout(); glContent.verticalSpacing = 5; glContent.horizontalSpacing = 5; glContent.marginHeight = 7; glContent.marginWidth = 7; glContent.numColumns = 9; cmpContent = new Composite(shell, SWT.NONE); cmpContent.setLayout(glContent); Label lblFont = new Label(cmpContent, SWT.NONE); GridData gdLFont = new GridData(); gdLFont.heightHint = 22; lblFont.setLayoutData(gdLFont); lblFont.setText("Font:"); cmbFontNames = new Combo(cmpContent, SWT.DROP_DOWN | SWT.READ_ONLY); GridData gdCMBFontNames = new GridData(GridData.FILL_HORIZONTAL); gdCMBFontNames.horizontalSpan = 8; cmbFontNames.setLayoutData(gdCMBFontNames); cmbFontNames.addSelectionListener(this); Label lblSize = new Label(cmpContent, SWT.NONE); GridData gdLSize = new GridData(); gdLSize.heightHint = 22; lblSize.setLayoutData(gdLSize); lblSize.setText("Size:"); iscFontSizes = new IntegerSpinControl(cmpContent, SWT.NONE, (int) fdCurrent.getSize()); GridData gdISCFontSizes = new GridData(GridData.FILL_HORIZONTAL); gdISCFontSizes.horizontalSpan = 3; iscFontSizes.setLayoutData(gdISCFontSizes); iscFontSizes.setMinimum(MIN_FONT_SIZE); iscFontSizes.setMaximum(MAX_FONT_SIZE); iscFontSizes.addListener(this); Label lblForeground = new Label(cmpContent, SWT.NONE); GridData gdLForeground = new GridData(); gdLForeground.horizontalSpan = 2; lblForeground.setLayoutData(gdLForeground); lblForeground.setText("Color:"); fccColor = new FillChooserComposite(cmpContent, SWT.NONE, cdCurrent, false, false); GridData gdFCCColor = new GridData(GridData.FILL_HORIZONTAL); gdFCCColor.horizontalSpan = 3; fccColor.setLayoutData(gdFCCColor); fccColor.addListener(this); Label lblStyle = new Label(cmpContent, SWT.NONE); GridData gdLStyle = new GridData(); gdLStyle.heightHint = 22; // gdLStyle.horizontalSpan = 2; lblStyle.setLayoutData(gdLStyle); lblStyle.setText("Style:"); btnBold = new Button(cmpContent, SWT.TOGGLE); GridData gdBBold = new GridData(GridData.FILL_HORIZONTAL); btnBold.setLayoutData(gdBBold); // TODO: This should be an image btnBold.setText("B"); btnBold.addSelectionListener(this); btnBold.setSelection(fdCurrent.isBold()); btnItalic = new Button(cmpContent, SWT.TOGGLE); GridData gdBItalic = new GridData(GridData.FILL_HORIZONTAL); btnItalic.setLayoutData(gdBItalic); // TODO: This should be an image btnItalic.setText("I"); btnItalic.addSelectionListener(this); btnItalic.setSelection(fdCurrent.isItalic()); btnUnderline = new Button(cmpContent, SWT.TOGGLE); GridData gdBUnderline = new GridData(GridData.FILL_HORIZONTAL); btnUnderline.setLayoutData(gdBUnderline); // TODO: This should be an image btnUnderline.setText("U"); btnUnderline.addSelectionListener(this); btnUnderline.setSelection(fdCurrent.isUnderline()); Label lblFormat = new Label(cmpContent, SWT.NONE); GridData gdLFormat = new GridData(GridData.VERTICAL_ALIGN_FILL); gdLFormat.horizontalSpan = 2; gdLFormat.verticalSpan = 2; lblFormat.setLayoutData(gdLFormat); lblFormat.setText("Format:"); cbStrikethru = new Button(cmpContent, SWT.CHECK); GridData gdCBStrikethru = new GridData(GridData.FILL_HORIZONTAL); gdCBStrikethru.horizontalSpan = 2; gdCBStrikethru.heightHint = 20; cbStrikethru.setLayoutData(gdCBStrikethru); cbStrikethru.addSelectionListener(this); cbStrikethru.setText("Strikethrough"); cbStrikethru.setSelection(fdCurrent.isStrikethrough()); Label lblDummy1 = new Label(cmpContent, SWT.NONE); GridData gdLDummy1 = new GridData(); gdLDummy1.horizontalSpan = 6; lblDummy1.setLayoutData(gdLDummy1); cbWrap = new Button(cmpContent, SWT.CHECK); GridData gdCBWrap = new GridData(GridData.FILL_HORIZONTAL); gdCBWrap.horizontalSpan = 2; gdCBWrap.heightHint = 20; cbWrap.setLayoutData(gdCBWrap); cbWrap.addSelectionListener(this); cbWrap.setText("Wrap"); cbWrap.setSelection(fdCurrent.isWordWrap()); createRotationPanel(); createAlignmentPanel(); FillLayout flPreview = new FillLayout(); flPreview.marginHeight = 2; flPreview.marginWidth = 3; grpPreview = new Group(cmpContent, SWT.NONE); grpPreview.setText("Preview"); GridData gdGRPPreview = new GridData(GridData.FILL_BOTH); gdGRPPreview.horizontalSpan = 9; grpPreview.setLayoutData(gdGRPPreview); grpPreview.setLayout(flPreview); fcPreview = new FontCanvas(grpPreview, SWT.NONE, fdCurrent, cdCurrent, true, true, true); createButtonPanel(); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/7793e94b4d7fab5891f226c6c937e37d85bebad8/FontDefinitionDialog.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/FontDefinitionDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3166,
7171,
1435,
565,
288,
3639,
7145,
3744,
5118,
1350,
273,
394,
7145,
3744,
5621,
3639,
5118,
1350,
18,
17824,
18006,
273,
1381,
31,
3639,
5118,
1350,
18,
18396,
18006,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3166,
7171,
1435,
565,
288,
3639,
7145,
3744,
5118,
1350,
273,
394,
7145,
3744,
5621,
3639,
5118,
1350,
18,
17824,
18006,
273,
1381,
31,
3639,
5118,
1350,
18,
18396,
18006,
273,
... |
final PsiStatement statementLabeled = labeledStatement.getStatement(); return statementMustAssignVariableOrFail(field, statementLabeled, checkedMethods); } else if (statement instanceof PsiIfStatement) { return ifStatementMustAssignVariableOrFail(field, (PsiIfStatement) statement, checkedMethods); } else if (statement instanceof PsiTryStatement) { return tryStatementMustAssignVariableOrFail(field, (PsiTryStatement) statement, checkedMethods); } else if (statement instanceof PsiSwitchStatement) { | final PsiStatement statementLabeled = labeledStatement .getStatement(); return statementMustAssignVariableOrFail(field, statementLabeled, checkedMethods); } else if(statement instanceof PsiIfStatement){ return ifStatementMustAssignVariableOrFail(field, (PsiIfStatement) statement, checkedMethods); } else if(statement instanceof PsiTryStatement){ return tryStatementMustAssignVariableOrFail(field, (PsiTryStatement) statement, checkedMethods); } else if(statement instanceof PsiSwitchStatement){ | private static boolean statementMustAssignVariableOrFail(@NotNull PsiVariable field, PsiStatement statement, Set<MethodSignature> checkedMethods) { if (statement == null) { return false; } if(statementMustThrowException(statement)) { return true; } if (statement instanceof PsiBreakStatement || statement instanceof PsiContinueStatement || statement instanceof PsiAssertStatement || statement instanceof PsiEmptyStatement) { return false; } else if (statement instanceof PsiReturnStatement) { final PsiReturnStatement returnStatement = (PsiReturnStatement) statement; final PsiExpression returnValue = returnStatement.getReturnValue(); return expressionMustAssignVariableOrFail(field, returnValue, checkedMethods); } else if (statement instanceof PsiThrowStatement) { final PsiThrowStatement throwStatement = (PsiThrowStatement) statement; final PsiExpression exception = throwStatement.getException(); return expressionMustAssignVariableOrFail(field, exception, checkedMethods); } else if (statement instanceof PsiExpressionListStatement) { final PsiExpressionListStatement list = (PsiExpressionListStatement) statement; final PsiExpressionList expressionList = list.getExpressionList(); final PsiExpression[] expressions = expressionList.getExpressions(); for(final PsiExpression expression : expressions){ if(expressionMustAssignVariableOrFail(field, expression, checkedMethods)){ return true; } } return false; } else if (statement instanceof PsiExpressionStatement) { final PsiExpressionStatement expressionStatement = (PsiExpressionStatement) statement; final PsiExpression expression = expressionStatement.getExpression(); return expressionMustAssignVariableOrFail(field, expression, checkedMethods); } else if (statement instanceof PsiDeclarationStatement) { return declarationStatementMustAssignVariableOrFail(field, (PsiDeclarationStatement) statement, checkedMethods); } else if (statement instanceof PsiForStatement) { return forStatementMustAssignVariableOrFail(field, (PsiForStatement) statement, checkedMethods); } else if (statement instanceof PsiForeachStatement) { return foreachStatementMustAssignVariableOrFail(field, (PsiForeachStatement) statement); } else if (statement instanceof PsiWhileStatement) { return whileStatementMustAssignVariableOrFail(field, (PsiWhileStatement) statement, checkedMethods); } else if (statement instanceof PsiDoWhileStatement) { return doWhileMustAssignVariableOrFail(field, (PsiDoWhileStatement) statement, checkedMethods); } else if (statement instanceof PsiSynchronizedStatement) { final PsiCodeBlock body = ((PsiSynchronizedStatement) statement).getBody(); return cachingblockMustAssignVariableOrFail(field, body, checkedMethods); } else if (statement instanceof PsiBlockStatement) { final PsiCodeBlock codeBlock = ((PsiBlockStatement) statement).getCodeBlock(); return cachingblockMustAssignVariableOrFail(field, codeBlock, checkedMethods); } else if (statement instanceof PsiLabeledStatement) { final PsiLabeledStatement labeledStatement = (PsiLabeledStatement) statement; final PsiStatement statementLabeled = labeledStatement.getStatement(); return statementMustAssignVariableOrFail(field, statementLabeled, checkedMethods); } else if (statement instanceof PsiIfStatement) { return ifStatementMustAssignVariableOrFail(field, (PsiIfStatement) statement, checkedMethods); } else if (statement instanceof PsiTryStatement) { return tryStatementMustAssignVariableOrFail(field, (PsiTryStatement) statement, checkedMethods); } else if (statement instanceof PsiSwitchStatement) { return false; } else // unknown statement type { return false; } } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/fc3fc1341db4aa6d26930bf45116ec44c28fc569/InitializationUtils.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/psiutils/InitializationUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
3021,
10136,
4910,
3092,
18492,
26964,
5962,
453,
7722,
3092,
652,
16,
453,
7722,
3406,
3021,
16,
1000,
32,
1305,
5374,
34,
5950,
4712,
13,
288,
3639,
309,
261,
11516,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
3021,
10136,
4910,
3092,
18492,
26964,
5962,
453,
7722,
3092,
652,
16,
453,
7722,
3406,
3021,
16,
1000,
32,
1305,
5374,
34,
5950,
4712,
13,
288,
3639,
309,
261,
11516,
42... |
String value = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_DATAREFERENCE + i); | String value = CmsImport.getChildElementTextValue( dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_DATAREFERENCE + i); | protected CmsMasterDataSet getMasterDataSet(int subId, Element masterElement) throws CmsException { String datasetfile = null, username = null, groupname = null, accessFlags = null, publicationDate = null, purgeDate = null, creationDate = null, flags = null, feedId = null, feedReference = null, feedFilename = null, title = null, master_id = null; CmsMasterDataSet newDataset = new CmsMasterDataSet(); // get the file with the dataset of the master datasetfile = ((Element) masterElement.selectNodes("./" + CmsExportModuledata.C_EXPORT_TAG_MASTER_DATASET).get(0)).getTextTrim(); Document datasetXml = CmsImportVersion1.getXmlDocument(getFileInputStream(datasetfile)); Element dataset = (Element) datasetXml.getRootElement().selectNodes("./" + CmsExportModuledata.C_EXPORT_TAG_MASTER_DATASET).get(0); // get the information from the dataset and add it to the dataset // first add the subid newDataset.m_subId = subId; master_id = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_ID); if (master_id != null) { newDataset.m_masterId = new CmsUUID(master_id); } else { newDataset.m_masterId = CmsUUID.getNullUUID(); } // get the id of the user or set the owner to the current user username = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_USER); CmsUUID userId = null; try { if ((username != null) && !("".equals(username.trim()))) { userId = m_cms.readUser(username).getId(); } } catch (Exception e) { // userId will be current user userId = m_cms.getRequestContext().currentUser().getId(); } newDataset.m_userId = userId; // get the id of the group or set the group to the current user groupname = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_GROUP); CmsUUID groupId = CmsUUID.getNullUUID(); try { if ((groupname != null) && !("".equals(groupname.trim()))) { groupId = m_cms.readGroup(groupname).getId(); } } catch (Exception e) { try { groupId = m_cms.readGroup(OpenCms.getDefaultUsers().getGroupUsers()).getId(); } catch (Exception e2) { // ignore } } newDataset.m_groupId = groupId; // set the accessflags or the default flags accessFlags = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_ACCESSFLAGS); try { newDataset.m_accessFlags = Integer.parseInt(accessFlags); } catch (Exception e) { newDataset.m_accessFlags = com.opencms.core.I_CmsConstants.C_ACCESS_DEFAULT_FLAGS; } // set the publication date publicationDate = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_PUBLICATIONDATE); try { newDataset.m_publicationDate = convertDate(publicationDate); } catch (Exception e) { // ignore } // set the purge date purgeDate = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_PURGEDATE); try { newDataset.m_purgeDate = convertDate(purgeDate); } catch (Exception e) { // ignore } // set the creation date if possible try { creationDate = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_CREATEDATE); newDataset.m_dateCreated = convertDate(creationDate); } catch (Exception e) { // ignore } // set the flags flags = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_FLAGS); try { newDataset.m_flags = Integer.parseInt(flags); } catch (Exception e) { // ignore } // set the feedid feedId = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_FEEDID); try { newDataset.m_feedId = Integer.parseInt(feedId); } catch (Exception e) { // ignore } // set the feedreference feedReference = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_FEEDREFERENCE); try { newDataset.m_feedReference = Integer.parseInt(feedReference); } catch (Exception e) { // ignore } // set the feedfilenam feedFilename = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_FEEDFILENAME); newDataset.m_feedFilename = feedFilename; // set the masters title title = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_TITLE); newDataset.m_title = title; // set the values of data_big for (int i = 0; i < newDataset.m_dataBig.length; i++) { String filename = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_DATABIG + i); String value = new String(); if (filename != null && !"".equals(filename.trim())) { // get the value from the file value = new String(getFileBytes(filename)); } newDataset.m_dataBig[i] = value; } // get the values of data_medium for (int i = 0; i < newDataset.m_dataMedium.length; i++) { String filename = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_DATAMEDIUM + i); String value = new String(); if (filename != null && !"".equals(filename.trim())) { // get the value from the file value = new String(getFileBytes(filename)); } newDataset.m_dataMedium[i] = value; } // get the values of data_small for (int i = 0; i < newDataset.m_dataSmall.length; i++) { String filename = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_DATASMALL + i); String value = new String(); if (filename != null && !"".equals(filename.trim())) { // get the value from the file value = new String(getFileBytes(filename)); } newDataset.m_dataSmall[i] = value; } // get the values of data_int for (int i = 0; i < newDataset.m_dataInt.length; i++) { String value = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_DATAINT + i); try { newDataset.m_dataInt[i] = new Integer(value).intValue(); } catch (Exception e) { newDataset.m_dataInt[i] = 0; } } // get the values of data_reference for (int i = 0; i < newDataset.m_dataReference.length; i++) { String value = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_DATAREFERENCE + i); try { newDataset.m_dataReference[i] = new Integer(value).intValue(); } catch (Exception e) { newDataset.m_dataReference[i] = 0; } } // get the values of data_date for (int i = 0; i < newDataset.m_dataDate.length; i++) { String value = CmsImport.getChildElementTextValue(dataset, CmsExportModuledata.C_EXPORT_TAG_MASTER_DATADATE + i); try { newDataset.m_dataDate[i] = convertDate(value); } catch (Exception e) { newDataset.m_dataDate[i] = 0; } } return newDataset; } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/88860f55b9c735c7dd01b24ea1419cb95dc77799/CmsImportModuledata.java/buggy/src-modules/com/opencms/legacy/CmsImportModuledata.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
2149,
7786,
13676,
27607,
13676,
12,
474,
720,
548,
16,
3010,
4171,
1046,
13,
1216,
11228,
288,
3639,
514,
3709,
768,
273,
446,
16,
2718,
273,
446,
16,
25329,
273,
446,
16,
2006,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2149,
7786,
13676,
27607,
13676,
12,
474,
720,
548,
16,
3010,
4171,
1046,
13,
1216,
11228,
288,
3639,
514,
3709,
768,
273,
446,
16,
2718,
273,
446,
16,
25329,
273,
446,
16,
2006,
... |
+ siblingNumber | + S | public String makeTreeNodeId(int level, TreeNode parent, int siblingNumber) { return "TREENODE_LEVEL" + Constants.DELIMITER + level + Constants.DELIMITER + "PARENTNODEID" + Constants.DELIMITER + "[" + (parent == null ? "NOPARENTID" : parent.getId()) + "]" + Constants.DELIMITER + "SIBLINGNUMBER" + Constants.DELIMITER + siblingNumber + Constants.DELIMITER + "ID"; } | 5235 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5235/eb28eb7a536f6911851c1420be30d88ad043ad97/Fixtures.java/buggy/signet/test/edu/internet2/middleware/signet/test/Fixtures.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
1221,
12513,
548,
12,
474,
1801,
16,
20270,
982,
16,
509,
10841,
1854,
13,
225,
288,
565,
327,
377,
202,
6,
56,
15878,
2712,
67,
10398,
6,
4202,
397,
5245,
18,
19722,
1377,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
1221,
12513,
548,
12,
474,
1801,
16,
20270,
982,
16,
509,
10841,
1854,
13,
225,
288,
565,
327,
377,
202,
6,
56,
15878,
2712,
67,
10398,
6,
4202,
397,
5245,
18,
19722,
1377,
... |
IMCServiceInterface imcref = ApplicationServer.getIMCServiceInterface(); | ImcmsServices imcref = Imcms.getServices(); | public void doGet( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException { // Lets get the standard parameters and validate them MetaInfo.Parameters params = MetaInfo.getParameters( req ); //if (super.assertNoEmptyStringsInPropertyValues(req, res, params) == false) return ; // Lets get an user object imcode.server.user.UserDomainObject user = super.getUserObj( req ); if ( user == null ) return; int testMetaId = params.getMetaId(); if ( !isUserAuthorized( res, testMetaId, user, req ) ) { return; } String action = req.getParameter( "action" ); if ( action == null ) { //OBS FIXA FELMEDELANDENA String header = "ChatManager servlet. "; ChatError err = new ChatError( req, res, header, 3 ); log( header + err.getErrorMsg() ); return; } else if ( action.equalsIgnoreCase( "NEW" ) ) { //log("Lets add a chat"); HttpSession session = req.getSession( false ); if ( session != null ) { // log("Ok nu stter vi metavrdena"); setSessionAttributes( session, params ); } req.setAttribute( "action", "NEW" ); RequestDispatcher myDispatcher; myDispatcher = req.getRequestDispatcher( "/servlet/ChatCreator" ); myDispatcher.forward( req, res ); return; } else if ( action.equalsIgnoreCase( "VIEW" ) ) { // Lets store the standard metavalues in his session object HttpSession session = req.getSession( false ); if ( session != null ) {// lets check if user is active in an other chat, if so then log him out ChatMember theChatMember = (ChatMember)session.getAttribute( "theChatMember" ); if ( theChatMember != null ) { ChatSystemMessage systemMessage = new ChatSystemMessage( theChatMember, ChatSystemMessage.USER_TIMEDOUT_MSG ); IMCServiceInterface imcref = ApplicationServer.getIMCServiceInterface(); logOutMember( theChatMember, systemMessage, imcref ); } // log("Ok nu stter vi metavrdena"); setSessionAttributes( session, params ); } req.setAttribute( "login_type", "login" ); RequestDispatcher myDispatcher; myDispatcher = req.getRequestDispatcher( "/servlet/ChatLogin" ); myDispatcher.forward( req, res ); return; } else if ( action.equalsIgnoreCase( "CHANGE" ) ) { req.setAttribute( "metadata", "meta" ); RequestDispatcher myDispatcher; myDispatcher = req.getRequestDispatcher( "ChangeExternalDoc2" ); myDispatcher.forward( req, res ); return; } // End if } // End doGet | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/d060a6873350aa2972f54c354321cf3756f50e6f/ChatManager.java/clean/server/src/com/imcode/imcms/servlet/chat/ChatManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
23611,
12,
9984,
1111,
16,
12446,
400,
262,
1216,
16517,
16,
1860,
288,
3639,
368,
511,
2413,
336,
326,
4529,
1472,
471,
1954,
2182,
3639,
6565,
966,
18,
2402,
859,
273,
6565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23611,
12,
9984,
1111,
16,
12446,
400,
262,
1216,
16517,
16,
1860,
288,
3639,
368,
511,
2413,
336,
326,
4529,
1472,
471,
1954,
2182,
3639,
6565,
966,
18,
2402,
859,
273,
6565,
... |
if (x == 0 || y == 0 || x == end || y == end) data.setPixel(x + xoffset, y + yoffset, 1); else data.setPixel(x + xoffset, y + yoffset, 2); | if (x == 0 || y == 0 || x == end || y == end) { data.setPixel(x + xoffset, y + yoffset, 1); } else { data.setPixel(x + xoffset, y + yoffset, 2); } | private ImageData createColorImage(Control w, RGB color) { GC gc = new GC(w); FontMetrics fm = gc.getFontMetrics(); int size = fm.getAscent(); gc.dispose(); int indent = 6; int extent = DEFAULT_EXTENT; if (w instanceof Table) extent = ((Table) w).getItemHeight() - 1; else if (w instanceof Tree) extent = ((Tree) w).getItemHeight() - 1; else if (w instanceof TableTree) extent = ((TableTree) w).getItemHeight() - 1; if (size > extent) size = extent; int width = indent + size; int height = extent; int xoffset = indent; int yoffset = (height - size) / 2; RGB black = new RGB(0, 0, 0); PaletteData dataPalette = new PaletteData(new RGB[] { black, black, color }); ImageData data = new ImageData(width, height, 4, dataPalette); data.transparentPixel = 0; int end = size - 1; for (int y = 0; y < size; y++) { for (int x = 0; x < size; x++) { if (x == 0 || y == 0 || x == end || y == end) data.setPixel(x + xoffset, y + yoffset, 1); else data.setPixel(x + xoffset, y + yoffset, 2); } } return data; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/391f2606b4ea2c1fb5052d938ca90877ee7631f6/ColorCellEditor.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ColorCellEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3421,
751,
752,
2957,
2040,
12,
3367,
341,
16,
11510,
2036,
13,
288,
3639,
15085,
8859,
273,
394,
15085,
12,
91,
1769,
3639,
10063,
5653,
10940,
273,
8859,
18,
588,
5711,
5653,
5621... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3421,
751,
752,
2957,
2040,
12,
3367,
341,
16,
11510,
2036,
13,
288,
3639,
15085,
8859,
273,
394,
15085,
12,
91,
1769,
3639,
10063,
5653,
10940,
273,
8859,
18,
588,
5711,
5653,
5621... |
public TA_RetCode MEDPRICE( int startIdx, int endIdx, double inHigh[], double inLow[], MInteger outBegIdx, MInteger outNbElement, double outReal[] ){ int outIdx, i; if( startIdx < 0 ) return TA_RetCode. TA_OUT_OF_RANGE_START_INDEX; if( (endIdx < 0) || (endIdx < startIdx)) return TA_RetCode. TA_OUT_OF_RANGE_END_INDEX; outIdx = 0; for( i=startIdx; i <= endIdx; i++ ) { outReal[outIdx++] = (inHigh[i]+inLow[i])/2.0; } outNbElement.value = outIdx; outBegIdx.value = startIdx; return TA_RetCode. TA_SUCCESS;} | 7231 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7231/1bccb7a13486c61b10e8ebdf0c938797539a3f3d/Core.java/clean/ta-lib/java/src/TA/Lib/Core.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
9833,
67,
7055,
1085,
25773,
7698,
1441,
12,
474,
1937,
4223,
16,
474,
409,
4223,
16,
9056,
267,
8573,
63,
6487,
9056,
267,
10520,
63,
6487,
49,
4522,
659,
24059,
4223,
16,
49,
4522,
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,
1071,
9833,
67,
7055,
1085,
25773,
7698,
1441,
12,
474,
1937,
4223,
16,
474,
409,
4223,
16,
9056,
267,
8573,
63,
6487,
9056,
267,
10520,
63,
6487,
49,
4522,
659,
24059,
4223,
16,
49,
4522,
6... | ||
for (int i = 0; i < virtualProviders.length; i++) { if (virtualProviders[i].hasItemState(id)) { return virtualProviders[i].getItemState(id); } } | public ItemState getItemState(ItemId id) throws NoSuchItemStateException, ItemStateException { // check if there is a virtual state for the specified item for (int i = 0; i < virtualProviders.length; i++) { if (virtualProviders[i].hasItemState(id)) { return virtualProviders[i].getItemState(id); } } // first check if the specified item has been transiently removed if (transientStateMgr.hasItemStateInAttic(id)) { /** * check if there's new transient state for the specified item * (e.g. if a property with name 'x' has been removed and a new * property with same name has been created); * this will throw a NoSuchItemStateException if there's no new * transient state */ return transientStateMgr.getItemState(id); } // check if there's transient state for the specified item if (transientStateMgr.hasItemState(id)) { return transientStateMgr.getItemState(id); } // check if there's persistent state for the specified item if (persistentStateMgr.hasItemState(id)) { return persistentStateMgr.getItemState(id); } throw new NoSuchItemStateException(id.toString()); } | 48761 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48761/cc14ab987cea8d4ad557b4084ab5ad5b28be918b/SessionItemStateManager.java/buggy/src/java/org/apache/jackrabbit/core/state/SessionItemStateManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4342,
1119,
8143,
1119,
12,
17673,
612,
13,
5411,
1216,
5823,
1180,
5060,
16,
4342,
5060,
288,
3639,
368,
866,
309,
1915,
353,
279,
5024,
919,
364,
326,
1269,
761,
3639,
364,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4342,
1119,
8143,
1119,
12,
17673,
612,
13,
5411,
1216,
5823,
1180,
5060,
16,
4342,
5060,
288,
3639,
368,
866,
309,
1915,
353,
279,
5024,
919,
364,
326,
1269,
761,
3639,
364,
261,
... | |
theComponentPackage.createPackageContents(); | theDataPackage.createPackageContents(); | public static TypePackage init() { if (isInited) return (TypePackage)EPackage.Registry.INSTANCE.getEPackage(TypePackage.eNS_URI); // Obtain or create and register package TypePackageImpl theTypePackage = (TypePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof TypePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new TypePackageImpl()); isInited = true; // Initialize simple dependencies XMLTypePackageImpl.init(); // Obtain or create and register interdependencies AttributePackageImpl theAttributePackage = (AttributePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(AttributePackage.eNS_URI) instanceof AttributePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(AttributePackage.eNS_URI) : AttributePackageImpl.eINSTANCE); ComponentPackageImpl theComponentPackage = (ComponentPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ComponentPackage.eNS_URI) instanceof ComponentPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ComponentPackage.eNS_URI) : ComponentPackageImpl.eINSTANCE); LayoutPackageImpl theLayoutPackage = (LayoutPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LayoutPackage.eNS_URI) instanceof LayoutPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LayoutPackage.eNS_URI) : LayoutPackageImpl.eINSTANCE); DataPackageImpl theDataPackage = (DataPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DataPackage.eNS_URI) instanceof DataPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DataPackage.eNS_URI) : DataPackageImpl.eINSTANCE); ModelPackageImpl theModelPackage = (ModelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ModelPackage.eNS_URI) instanceof ModelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ModelPackage.eNS_URI) : ModelPackageImpl.eINSTANCE); // Create package meta-data objects theTypePackage.createPackageContents(); theAttributePackage.createPackageContents(); theComponentPackage.createPackageContents(); theLayoutPackage.createPackageContents(); theDataPackage.createPackageContents(); theModelPackage.createPackageContents(); // Initialize created meta-data theTypePackage.initializePackageContents(); theAttributePackage.initializePackageContents(); theComponentPackage.initializePackageContents(); theLayoutPackage.initializePackageContents(); theDataPackage.initializePackageContents(); theModelPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theTypePackage.freeze(); return theTypePackage; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/TypePackageImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/type/impl/TypePackageImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1412,
2261,
1208,
1435,
565,
288,
3639,
309,
261,
291,
2570,
329,
13,
327,
261,
559,
2261,
13,
41,
2261,
18,
4243,
18,
13341,
18,
588,
41,
2261,
12,
559,
2261,
18,
73,
3156... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1412,
2261,
1208,
1435,
565,
288,
3639,
309,
261,
291,
2570,
329,
13,
327,
261,
559,
2261,
13,
41,
2261,
18,
4243,
18,
13341,
18,
588,
41,
2261,
12,
559,
2261,
18,
73,
3156... |
void check(String object, int right) throws SQLException { | void check(Object object, int right) throws SQLException { | void check(String object, int right) throws SQLException { uUser.check(object, right); } | 49087 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49087/06a84b6609c132cbe9732546d6ee94682675eaf5/Session.java/buggy/base-one/trunk/src/org/hsqldb/Session.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
866,
12,
921,
733,
16,
509,
2145,
13,
1216,
6483,
288,
3639,
582,
1299,
18,
1893,
12,
1612,
16,
2145,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
866,
12,
921,
733,
16,
509,
2145,
13,
1216,
6483,
288,
3639,
582,
1299,
18,
1893,
12,
1612,
16,
2145,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
} else if (isOneway(messageInfo) && handlerResult) { | } else if (isOneway(messageInfo)) { | protected SOAPMessage doSend(MessageInfo messageInfo) { //change from LogicalEPTFactory to ContactInfoBase - should be changed back when we have things working EPTFactory contactInfo = messageInfo.getEPTFactory(); SOAPXMLEncoder encoder = (SOAPXMLEncoder) contactInfo.getEncoder(messageInfo); SOAPMessage sm = null; boolean handlerResult = true; boolean isRequestResponse = (messageInfo.getMEP() == MessageStruct.REQUEST_RESPONSE_MEP); try { if (messageInfo.getMetaData(DispatchContext.DISPATCH_MESSAGE_MODE) == Service.Mode.MESSAGE) { sm = (SOAPMessage) messageInfo.getData()[0]; // Ensure supplied message is encoded according to conneg FastInfosetUtil.ensureCorrectEncoding(messageInfo, sm); } SOAPHandlerContext handlerContext = null; InternalMessage im = encoder.toInternalMessage(messageInfo); HandlerChainCaller caller = getHandlerChainCaller(messageInfo); if (caller.hasHandlers()) { im = preHandlerOutboundHook(sm, im); handlerContext = new SOAPHandlerContext(messageInfo, im, sm); encoder.setAttachmentsMap(messageInfo, im); updateMessageContext(messageInfo, handlerContext); try { JAXWSAttachmentMarshaller am = MessageInfoUtil.getAttachmentMarshaller(messageInfo); boolean isXopped = false; //there are handlers so disable Xop encoding if enabled, so that they dont // see xop:Include reference if ((am != null) && am.isXOPPackage()) { isXopped = am.isXOPPackage(); am.setXOPPackage(false); } handlerResult = callHandlersOnRequest(handlerContext); // now put back the old value if ((am != null)) { am.setXOPPackage(isXopped); } } catch (ProtocolException pe) { handlerResult = false; if (MessageContextUtil.ignoreFaultInMessage( handlerContext.getMessageContext())) { // ignore fault in this case and use exception throw new WebServiceException(pe); } } sm = handlerContext.getSOAPMessage(); postHandlerOutboundHook(messageInfo, handlerContext, sm); if (sm == null) { sm = encoder.toSOAPMessage(handlerContext.getInternalMessage(), messageInfo); } // the only case where no message is sent if (isRequestResponse && !handlerResult) { SOAPXMLDecoder decoder = (SOAPXMLDecoder) contactInfo.getDecoder(messageInfo); im = decoder.toInternalMessage(sm, messageInfo); decoder.toMessageInfo(im, messageInfo); return sm; } } // Setting encoder here is necessary for calls to getBindingId() messageInfo.setEncoder(encoder); SystemHandlerDelegate systemHandlerDelegate = ((com.sun.xml.ws.spi.runtime.Binding) getBinding(messageInfo)). getSystemHandlerDelegate(); if (systemHandlerDelegate != null) { if (handlerContext == null) { handlerContext = new SOAPHandlerContext(messageInfo, im, sm); updateMessageContext(messageInfo, handlerContext); } encoder.setAttachmentsMap(messageInfo, im); //already used im, we can set that to null if ((sm != null) && (im != null)) handlerContext.setInternalMessage(null); handlerContext.getMessageContext().put( MessageContext.MESSAGE_OUTBOUND_PROPERTY, Boolean.TRUE); handlerContext.getBindingId(); handlerResult = systemHandlerDelegate.processRequest( handlerContext.getSHDSOAPMessageContext()); sm = handlerContext.getSOAPMessage(); } if (sm == null) sm = encoder.toSOAPMessage(im, messageInfo); Map<String, Object> context = processMetadata(messageInfo, sm);/* // set the MIME headers on connection headers Map<String, List<String>> ch = new HashMap<String, List<String>>(); for (Iterator iter = sm.getMimeHeaders().getAllHeaders(); iter.hasNext();) { List<String> h = new ArrayList<String>(); MimeHeader mh = (MimeHeader) iter.next(); h.clear(); h.add(mh.getValue()); ch.put(mh.getName(), h); } */ setConnection(messageInfo, context); //((WSConnection) messageInfo.getConnection()).setHeaders(ch); if (!isAsync(messageInfo)) { WSConnection connection = (WSConnection) messageInfo.getConnection(); logRequestMessage(sm, messageInfo); SOAPConnectionUtil.sendResponse(connection, sm); } // if handlerResult is false, the receive has already happened if (isRequestResponse && handlerResult) { receive(messageInfo); } else if (isOneway(messageInfo) && handlerResult) { checkReturnStatus(messageInfo); } } catch (WebServiceException wse) { setResponseType(wse, messageInfo); messageInfo.setResponse(wse); } catch (Throwable e) { WebServiceException wse = new WebServiceException(e); setResponseType(wse, messageInfo); messageInfo.setResponse(wse); } return sm; } | 9667 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9667/fbd8fde23bc48f3ba11d856015696d0b4c787f3e/SOAPMessageDispatcher.java/buggy/jaxws-ri/rt/src/com/sun/xml/ws/protocol/soap/client/SOAPMessageDispatcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
16434,
1079,
741,
3826,
12,
1079,
966,
883,
966,
13,
288,
3639,
368,
3427,
628,
17085,
41,
1856,
1733,
358,
13329,
966,
2171,
300,
1410,
506,
3550,
1473,
1347,
732,
1240,
9198,
5960... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16434,
1079,
741,
3826,
12,
1079,
966,
883,
966,
13,
288,
3639,
368,
3427,
628,
17085,
41,
1856,
1733,
358,
13329,
966,
2171,
300,
1410,
506,
3550,
1473,
1347,
732,
1240,
9198,
5960... |
Display display = PlatformUI.createDisplay(); | Display display = createDisplay(); | public Object run(Object args) throws Exception { // create and startup the display for the workbench Display display = PlatformUI.createDisplay(); try { Shell shell = new Shell(display, SWT.ON_TOP); if (!checkJavaRuntimeVersion(shell)) { Platform.endSplash(); return EXIT_OK; } try { if (!checkInstanceLocation(shell)) { Platform.endSplash(); return EXIT_OK; } } finally { if (shell != null) shell.dispose(); } // create the workbench with this advisor and run it until it exits // N.B. createWorkbench remembers the advisor, and also registers // the workbench globally so that all UI plug-ins can find it using // PlatformUI.getWorkbench() or AbstractUIPlugin.getWorkbench() int returnCode = PlatformUI.createAndRunWorkbench(display, new IDEWorkbenchAdvisor()); // the workbench doesn't support relaunch yet (bug 61809) so // for now restart is used, and exit data properties are checked // here to substitute in the relaunch return code if needed if (returnCode != PlatformUI.RETURN_RESTART) return EXIT_OK; // if the exit code property has been set to the relaunch code, then // return that code now, otherwise this is a normal restart return EXIT_RELAUNCH.equals(Integer.getInteger(PROP_EXIT_CODE)) ? EXIT_RELAUNCH : EXIT_RESTART; } finally { if (display != null) display.dispose(); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/21086b812be7e3fe1ea7cbac3964998220564723/IDEApplication.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEApplication.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
1086,
12,
921,
833,
13,
1216,
1185,
288,
202,
202,
759,
752,
471,
11850,
326,
2562,
364,
326,
1440,
22144,
202,
202,
4236,
2562,
273,
11810,
5370,
18,
2640,
4236,
5621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
1086,
12,
921,
833,
13,
1216,
1185,
288,
202,
202,
759,
752,
471,
11850,
326,
2562,
364,
326,
1440,
22144,
202,
202,
4236,
2562,
273,
11810,
5370,
18,
2640,
4236,
5621,
... |
System.out.println("Rename failed " + srcs[i]); | throw new IOException("Rename failed " + srcs[i]); | public void rename(String srcf, String dstf) throws IOException { Path [] srcs = fs.globPaths( new Path(srcf) ); Path dst = new Path(dstf); if( srcs.length > 1 && !fs.isDirectory(dst)) { throw new IOException( "When moving multiple files, " + "destination should be a directory." ); } for( int i=0; i<srcs.length; i++ ) { if (fs.rename(srcs[i], dst)) { System.out.println("Renamed " + srcs[i] + " to " + dstf); } else { System.out.println("Rename failed " + srcs[i]); } } } | 53958 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53958/4da477ae9ed8190f1d92cd94320b1b102038dbcd/DFSShell.java/clean/src/java/org/apache/hadoop/dfs/DFSShell.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
6472,
12,
780,
1705,
74,
16,
514,
3046,
74,
13,
1216,
1860,
288,
1377,
2666,
5378,
28403,
273,
2662,
18,
10581,
4466,
12,
394,
2666,
12,
4816,
74,
13,
11272,
1377,
2666,
3046... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6472,
12,
780,
1705,
74,
16,
514,
3046,
74,
13,
1216,
1860,
288,
1377,
2666,
5378,
28403,
273,
2662,
18,
10581,
4466,
12,
394,
2666,
12,
4816,
74,
13,
11272,
1377,
2666,
3046... |
while (Character.isDigit(ch) || (Character.toLowerCase(ch) >= 'a' && Character.toLowerCase(ch) <= 'f')) { token.append(ch); nextCh(); | while (Character.isDigit(ch) || (Character.toLowerCase(ch) >= 'a' && Character.toLowerCase(ch) <= 'f')) { token.append(ch); nextCh(); | int nextToken(StringBuffer token) { int sy = sy_end; token.setLength(0); while (Character.isWhitespace(ch)) nextCh(); tokenStart = s-1; switch (ch) { case '\'': case '"': { char term = ch; nextCh(); do { while (ch != term && ch != EOF) { token.append(ch); nextCh(); } if (ch == EOF) break; nextCh(); if (ch != term) break; token.append(ch); nextCh(); } while (true); sy = (term == '"')? sy_ident: sy_string; } break; case '[': { while (ch != ']' && ch != EOF) { token.append(ch); nextCh(); } if (ch == ']') nextCh(); sy = sy_ident; } break; case '<': { token.append(ch); nextCh(); if (ch == '>' || ch == '=') { token.append(ch); nextCh(); } sy = sy_operator; } break; case '>': { token.append(ch); nextCh(); if (ch == '=') { token.append(ch); nextCh(); } sy = sy_operator; } break; case '!': { token.append(ch); nextCh(); if (ch == '<' || ch == '>' || ch == '=') { token.append(ch); nextCh(); } sy = sy_operator; } break; case '+': case '-': case '/': case '*': case '=': case '%': case '^': case '~': case '&': case '|': { token.append(ch); nextCh(); sy = sy_operator; } break; case ',': { sy = sy_comma; } break; case EOF: { sy = sy_end; } break; default: if (Character.isLetter(ch) || ch == '@' || ch == '#' || ch == '_') { while (Character.isLetterOrDigit(ch) || ch == '@' || ch == '#' || ch == '_' || ch == '$') { token.append(ch); nextCh(); } // Need to do proper lookup here String tst = token.toString().toLowerCase(); if (tst.equals("select") || tst.equals("from") || tst.equals("where")) { sy = sy_sqlword; } else { sy = sy_ident; } } else if (Character.isDigit(ch)) { token.append(ch); nextCh(); if (Character.toLowerCase(ch) == 'x' && token.charAt(0) == '0'){ token.append(ch); while (Character.isDigit(ch) || (Character.toLowerCase(ch) >= 'a' && Character.toLowerCase(ch) <= 'f')) { token.append(ch); nextCh(); } sy = sy_binary; } else { while (Character.isDigit(ch)) { token.append(ch); nextCh(); } if (ch == '.') { token.append(ch); nextCh(); while (Character.isDigit(ch)) { token.append(ch); nextCh(); } } if (Character.toLowerCase(ch) == 'e') { token.append(ch); nextCh(); if (ch == '-' || ch == '+') { token.append(ch); nextCh(); } while (Character.isDigit(ch)) { token.append(ch); nextCh(); } } sy = sy_number; } } else { token.append(ch); nextCh(); sy = sy_misc; } break; } return sy; } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/a1860a9e8b5bd3a4746f73dee3bfb600f564b4e2/SQLParser.java/buggy/src/main/net/sourceforge/jtds/jdbc/SQLParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
509,
9617,
12,
780,
1892,
1147,
13,
565,
288,
3639,
509,
1393,
273,
1393,
67,
409,
31,
3639,
1147,
18,
542,
1782,
12,
20,
1769,
3639,
1323,
261,
7069,
18,
291,
9431,
12,
343,
3719,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
509,
9617,
12,
780,
1892,
1147,
13,
565,
288,
3639,
509,
1393,
273,
1393,
67,
409,
31,
3639,
1147,
18,
542,
1782,
12,
20,
1769,
3639,
1323,
261,
7069,
18,
291,
9431,
12,
343,
3719,
10... |
public synchronized void documentChanged(DocumentEvent e) { Document document = e.getDocument(); if(myLexer instanceof JspHighlightLexer && myEditor != null && myEditor.getProject() != null){ final PsiDocumentManager instance = PsiDocumentManager.getInstance(myEditor.getProject()); final PsiFile psiFile = instance.getPsiFile(document); if(psiFile instanceof JspFile) ((JspHighlightLexer)myLexer).setBaseFile((JspFile)psiFile); } if(mySegments.getSegmentCount() == 0) { setText(document.getCharsSequence()); return; } CharSequence text = document.getCharsSequence(); int oldStartOffset = e.getOffset(); final int oldStartIndex = mySegments.findSegmentIndex(oldStartOffset); int startIndex = oldStartIndex; int data; do { data = mySegments.getSegmentData(startIndex); if (isInitialState(data)|| startIndex == 0) break; startIndex--; } while (true); int startOffset = mySegments.getSegmentStart(startIndex); int newEndOffset = e.getOffset() + e.getNewLength(); myLexer.start(CharArrayUtil.fromSequence(text), startOffset, text.length(), myInitialState); SegmentArrayWithData insertSegments = new SegmentArrayWithData(); int oldEndIndex = -1; int insertSegmentCount = 0; int repaintEnd = -1; int lastTokenStart = -1; while (myLexer.getTokenType() != null) { if (startIndex >= oldStartIndex) break; int tokenStart = myLexer.getTokenStart(); if (tokenStart == lastTokenStart) { throw new IllegalStateException("Error while updating lexer: " + e + " document text: " + e.getDocument().getText()); } int tokenEnd = myLexer.getTokenEnd(); int lexerState = myLexer.getState(); data = packData(myLexer.getTokenType(), lexerState); if (mySegments.getSegmentStart(startIndex) != tokenStart || mySegments.getSegmentEnd(startIndex) != tokenEnd || mySegments.getSegmentData(startIndex) != data) { break; } startIndex++; myLexer.advance(); lastTokenStart = tokenStart; } startOffset = mySegments.getSegmentStart(startIndex); while(myLexer.getTokenType() != null) { int tokenStart = myLexer.getTokenStart(); if (tokenStart == lastTokenStart) { throw new IllegalStateException("Error while updating lexer: " + e + " document text: " + e.getDocument().getText()); } lastTokenStart = tokenStart; int tokenEnd = myLexer.getTokenEnd(); int lexerState = myLexer.getState(); data = packData(myLexer.getTokenType(), lexerState); if(tokenStart >= newEndOffset && lexerState == myInitialState) { int shiftedTokenStart = tokenStart - e.getNewLength() + e.getOldLength(); int index = mySegments.findSegmentIndex(shiftedTokenStart); if (mySegments.getSegmentStart(index) == shiftedTokenStart && mySegments.getSegmentData(index) == data) { repaintEnd = tokenStart; oldEndIndex = index; break; } } insertSegments.setElementAt(insertSegmentCount, tokenStart, tokenEnd, data); insertSegmentCount++; myLexer.advance(); } final int shift = e.getNewLength() - e.getOldLength(); if (repaintEnd > 0) { while (insertSegmentCount > 0 && oldEndIndex > 0) { if (!segmentsEqual(mySegments, oldEndIndex - 1, insertSegments, insertSegmentCount - 1, shift)) { break; } insertSegmentCount--; oldEndIndex--; repaintEnd = insertSegments.getSegmentStart(insertSegmentCount); insertSegments.remove(insertSegmentCount, insertSegmentCount + 1); } } if(repaintEnd == -1) { repaintEnd = text.length(); } if (oldEndIndex < 0){ oldEndIndex = mySegments.getSegmentCount(); } mySegments.shiftSegments(oldEndIndex, shift); mySegments.remove(startIndex, oldEndIndex); mySegments.insert(insertSegments, startIndex); int lastDocOffset = e.getDocument().getTextLength(); checkUpdateCorrect(lastDocOffset); if (insertSegmentCount == 0 || oldEndIndex == startIndex + 1 && insertSegmentCount == 1 && data == mySegments.getSegmentData(startIndex)) { return; } ((EditorEx) myEditor).repaint(startOffset, repaintEnd); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/0b0d0a1436249df13d747a760e032b658d695aff/LexerEditorHighlighter.java/clean/source/com/intellij/openapi/editor/ex/util/LexerEditorHighlighter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
3852,
918,
1668,
5033,
12,
2519,
1133,
425,
13,
288,
2519,
1668,
273,
425,
18,
588,
2519,
5621,
430,
12,
4811,
13356,
1276,
19300,
16205,
13356,
597,
3399,
6946,
480,
446,
597,
3399,
694... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3852,
918,
1668,
5033,
12,
2519,
1133,
425,
13,
288,
2519,
1668,
273,
425,
18,
588,
2519,
5621,
430,
12,
4811,
13356,
1276,
19300,
16205,
13356,
597,
3399,
6946,
480,
446,
597,
3399,
694... | ||
char c = iterator.next(); | char c = iterator.current(); iterator.next(); | public int next() { startPosition = iterator.getIndex(); char c = iterator.next(); if (c == CharacterIterator.DONE) { kind = EOF; } else if (Character.isJavaIdentifierStart(c)) { boolean couldBeKeyword = false; if (Character.isLowerCase(c)) { buf.append(c); couldBeKeyword = true; } while (true) { c = iterator.current(); if (!Character.isJavaIdentifierPart(c)) break; c = iterator.next(); if (couldBeKeyword) { if (!Character.isLowerCase(c) || buf.length() >= MAX_KEYWORD_LENGTH) couldBeKeyword = false; else buf.append(c); } } kind = NORMAL_TEXT; if (couldBeKeyword) { if (KEYWORDS.contains(buf.toString())) kind = KEYWORD; buf.setLength(0); } } else if (c == '/') { char c2 = iterator.current(); if (c2 == '/') { while (true) { c2 = iterator.next(); if (c2 == '\n' || c2 == '\r') break; } kind = COMMENT; return kind; } else if (c2 == '*') { scanComment: while (true) { c2 = iterator.next(); if (c2 == '*') { do { c2 = iterator.next(); if (c2 == '/') break scanComment; } while(c2 == '*'); } } kind = JAVADOC; return kind; } } else if (c == '"') { kind = QUOTE; while (true) { char c2 = iterator.next(); if (c2 == '"' || c2 == '\n' || c2 == '\r') break; if (c2 == '\\') { c2 = iterator.next(); if (c2 == '\n' || c2 == '\r') break; } } } else kind = NORMAL_TEXT; // System.out.println(kind + " " + startPosition + "-" + iterator.getIndex()); return kind; } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/bf8ba79faa8700d501a5d2c5f7fe7b33dc9564bf/JavaScanner.java/buggy/findbugs/src/java5/edu/umd/cs/findbugs/sourceViewer/JavaScanner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
1024,
1435,
288,
202,
202,
1937,
2555,
273,
2775,
18,
588,
1016,
5621,
202,
202,
3001,
276,
273,
2775,
18,
4285,
5621,
202,
202,
430,
261,
71,
422,
6577,
3198,
18,
26875,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
1024,
1435,
288,
202,
202,
1937,
2555,
273,
2775,
18,
588,
1016,
5621,
202,
202,
3001,
276,
273,
2775,
18,
4285,
5621,
202,
202,
430,
261,
71,
422,
6577,
3198,
18,
26875,... |
TextUtils.createTabs(getTextPane()); | getTextPane().setTabSize(AWPrefs.getEditorTabSize()); | public void applyFont() { getTextPane().setFont(new Font(AWPrefs.getEditorFont(), Font.PLAIN, AWPrefs.getEditorFontSize())); TextUtils.createTabs(getTextPane()); } | 4430 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4430/7d10fc62dd364c5d7d612bfc98500e0202fd7f02/CEditorText.java/buggy/src/org/antlr/works/components/text/CEditorText.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2230,
5711,
1435,
288,
3639,
6701,
8485,
7675,
542,
5711,
12,
2704,
10063,
12,
12999,
1386,
2556,
18,
588,
6946,
5711,
9334,
10063,
18,
26549,
16,
13228,
1386,
2556,
18,
588,
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,
2230,
5711,
1435,
288,
3639,
6701,
8485,
7675,
542,
5711,
12,
2704,
10063,
12,
12999,
1386,
2556,
18,
588,
6946,
5711,
9334,
10063,
18,
26549,
16,
13228,
1386,
2556,
18,
588,
6... |
public void acceptDrop (int dropAction) | public void acceptDrop(int dropAction) | public void acceptDrop (int dropAction) { context.acceptDrop (dropAction); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/53983e95556bf4b775130b06570aa2ea08d85628/DropTargetDropEvent.java/clean/core/src/classpath/java/java/awt/dnd/DropTargetDropEvent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2791,
7544,
12,
474,
3640,
1803,
13,
225,
288,
565,
819,
18,
9436,
7544,
261,
7285,
1803,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2791,
7544,
12,
474,
3640,
1803,
13,
225,
288,
565,
819,
18,
9436,
7544,
261,
7285,
1803,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
prefix = qname.substring(0, colon1); | prefix = qname.substring(0, colon1); if( namespaceURI == null || ( prefix.equals("xml") && !namespaceURI.equals(NamespaceContext.XML_URI) )){ String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NAMESPACE_ERR", null); throw new DOMException(DOMException.NAMESPACE_ERR, msg); } | private void setName(String namespaceURI, String qname) { String prefix; // DOM Level 3: namespace URI is never empty string. this.namespaceURI = namespaceURI; if (namespaceURI != null) { this.namespaceURI = (namespaceURI.length() == 0) ? null : namespaceURI; } int colon1 = qname.indexOf(':'); int colon2 = qname.lastIndexOf(':'); ownerDocument().checkNamespaceWF(qname, colon1, colon2); if (colon1 < 0) { // there is no prefix localName = qname; ownerDocument().checkQName(null, localName); if (qname.equals("xmlns") && (namespaceURI == null || !namespaceURI.equals(NamespaceContext.XMLNS_URI)) || (namespaceURI!=null && namespaceURI.equals(NamespaceContext.XMLNS_URI) && !qname.equals("xmlns"))) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NAMESPACE_ERR", null); throw new DOMException(DOMException.NAMESPACE_ERR, msg); } } else { prefix = qname.substring(0, colon1); localName = qname.substring(colon2 + 1); ownerDocument().checkQName(prefix, localName); ownerDocument().checkDOMNSErr(prefix, namespaceURI); } } | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/39ac0bdc9afef35f1a8d3690dc4e1ea1f4b0b78c/ElementNSImpl.java/clean/src/org/apache/xerces/dom/ElementNSImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
6788,
12,
780,
19421,
16,
514,
12621,
13,
288,
202,
202,
780,
1633,
31,
202,
202,
759,
4703,
4557,
890,
30,
1981,
3699,
353,
5903,
1008,
533,
18,
202,
202,
2211,
18,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
6788,
12,
780,
19421,
16,
514,
12621,
13,
288,
202,
202,
780,
1633,
31,
202,
202,
759,
4703,
4557,
890,
30,
1981,
3699,
353,
5903,
1008,
533,
18,
202,
202,
2211,
18,
4... |
repeatBody(); | if (hasMoreResultSets) { if (hasNext) { repeatBody(); } | public void start(String uri, String localname, String qName, Attributes attributes) throws SAXException { addAllDefaultElementHandlers(); // Optional result sets count final int allowedResultSetCount; { final String resultSetsAttribute = attributes.getValue("result-sets"); allowedResultSetCount = (resultSetsAttribute == null) ? 1 : (resultSetsAttribute.equals(UNBOUNDED) ? -1 : Integer.parseInt(resultSetsAttribute)); } final SQLProcessorInterpreterContext interpreterContext = getInterpreterContext(); try { final PreparedStatement stmt = interpreterContext.getStatement(0); final boolean hasNext = !getInterpreterContext().isEmptyResultSet(); if (SQLProcessor.logger.isDebugEnabled()) SQLProcessor.logger.debug("Preparing to execute result set: hasNext = " + hasNext + ", statement = " + interpreterContext.getStatementString()); if (hasNext) { // There is a current non-empty result-set if (stmt != null) { int currentCount = 0; do { if (SQLProcessor.logger.isDebugEnabled()) SQLProcessor.logger.debug("Executing result set: currentCount = " + currentCount); // NOTE: Initially, a result set has already been made available repeatBody(); // One more result set has been processed currentCount++; // Try to go to next result set final boolean hasMoreResultSets = setResultSetInfo(interpreterContext, stmt, stmt.getMoreResults()); if (!hasMoreResultSets || (allowedResultSetCount != -1 && currentCount >= allowedResultSetCount)) { // We have processed all the result sets we can process break; } } while (true); } } else if (stmt != null) { // Prepare result set info for the next potential result-set interrpeter setResultSetInfo(interpreterContext, stmt, stmt.getMoreResults()); } } catch (SQLException e) { throw new ValidationException(e, new LocationData(getDocumentLocator())); } } | 51410 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51410/79138155da6d7ec8199b3f3589e2ffb223af2568/ResultSetInterpreter.java/buggy/src/java/org/orbeon/oxf/processor/sql/interpreters/ResultSetInterpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
787,
12,
780,
2003,
16,
514,
1191,
529,
16,
514,
22914,
16,
9055,
1677,
13,
1216,
14366,
288,
3639,
5428,
1868,
1046,
6919,
5621,
3639,
368,
4055,
563,
1678,
1056,
3639,
727,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
787,
12,
780,
2003,
16,
514,
1191,
529,
16,
514,
22914,
16,
9055,
1677,
13,
1216,
14366,
288,
3639,
5428,
1868,
1046,
6919,
5621,
3639,
368,
4055,
563,
1678,
1056,
3639,
727,
... |
if(domainClass.getMappedBy().equalsIgnoreCase( GrailsDomainClass.GORM )) { this.domainClasses.add(domainClass); } return this; } | if(domainClass.getMappedBy().equalsIgnoreCase( GrailsDomainClass.GORM )) { this.domainClasses.add(domainClass); } return this; } | public GrailsDomainConfiguration addDomainClass( GrailsDomainClass domainClass ) { if(domainClass.getMappedBy().equalsIgnoreCase( GrailsDomainClass.GORM )) { this.domainClasses.add(domainClass); } return this; } | 50129 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50129/903f4b388a57a464f9d14176ea5d25485de66436/DefaultGrailsDomainConfiguration.java/buggy/src/persistence/org/codehaus/groovy/grails/orm/hibernate/cfg/DefaultGrailsDomainConfiguration.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
10812,
14573,
3748,
1750,
527,
3748,
797,
12,
10812,
14573,
3748,
797,
2461,
797,
262,
288,
202,
202,
430,
12,
4308,
797,
18,
588,
12868,
858,
7675,
14963,
5556,
12,
10812,
1457... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10812,
14573,
3748,
1750,
527,
3748,
797,
12,
10812,
14573,
3748,
797,
2461,
797,
262,
288,
202,
202,
430,
12,
4308,
797,
18,
588,
12868,
858,
7675,
14963,
5556,
12,
10812,
1457... |
debugLog("new: " + messageId); | infoLog("new: " + messageId); | private String convertToSml(SyndEntry e) { String subject; // Calculate messageId, and check if we have got the message already String feedHash = sha1(urlToLoad); String itemHash = sha1(e.getTitle() + e.getDescription()); Date d = e.getPublishedDate(); String time; if(d!=null) time = "" + d.getTime(); else time = "" + new Date().getTime(); String outputFileName = outputDir + "/" + messageNumber; String messageId = feedHash + ":" + itemHash + ":" + time + ":" + outputFileName; // Check if we already have this if (existsInHistory(messageId)) return null; debugLog("new: " + messageId); try { String sml=""; subject=e.getTitle(); List cats = e.getCategories(); Iterator iter = cats.iterator(); String tags = feedTag; while (iter.hasNext()) { SyndCategory c = (SyndCategory) iter.next(); debugLog("Name: "+c.getName()); debugLog("uri:"+c.getTaxonomyUri()); String tag=c.getName(); tag=tag.replaceAll("[^a-zA-z.-_:]","_"); tags += "\t" + feedTag + "." + tag; } SyndContent content; List l = e.getContents(); if(l!=null) { debugLog("There is content"); iter = l.iterator(); while(iter.hasNext()) { content = (SyndContent)iter.next(); String c = content.getValue(); debugLog("Content: "+c); sml += htmlToSml(c); sml += "\n"; } } String source=e.getUri(); if(source.indexOf("http")<0) source=baseUrl+source; sml += "[link schema=\"web\" location=\""+source+"\"]source[/link]\n"; if(pushToSyndie) { debugLog("user.blog: "+user.getBlogStr()); debugLog("user.id: "+bm.getNextBlogEntry(user)); debugLog("subject: "+subject); debugLog("tags: "+tags); debugLog("sml: "+sml); debugLog(""); BlogURI uri = bm.createBlogEntry( user, false, subject, tags, null, sml, fileNames, fileStreams, fileTypes); if(uri==null) { debugLog("pushToSyndie failure."); return null; } else debugLog("pushToSyndie success, uri: "+uri.toString()); } else { FileOutputStream fos; fos = new FileOutputStream(messagePath); sml=subject + "\nTags: " + tags + "\n\n" + sml; fos.write(sml.getBytes()); if (pushScript != null) { if (!execPushScript(""+messageNumber, time)) { debugLog("################## push failed"); } else { debugLog("push success"); } } } messageNumber++; return messageId; } catch (FileNotFoundException e1) { e1.printStackTrace(); } catch (IOException e2) { e2.printStackTrace(); } return null; } | 3808 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3808/9050d7c218bc5eb51eb7cbd68bc0b214bcf9614b/Sucker.java/clean/apps/syndie/java/src/net/i2p/syndie/Sucker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
8137,
55,
781,
12,
10503,
72,
1622,
425,
13,
288,
3639,
514,
3221,
31,
7734,
368,
9029,
19090,
16,
471,
866,
309,
732,
1240,
2363,
326,
883,
1818,
3639,
514,
4746,
2310,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
8137,
55,
781,
12,
10503,
72,
1622,
425,
13,
288,
3639,
514,
3221,
31,
7734,
368,
9029,
19090,
16,
471,
866,
309,
732,
1240,
2363,
326,
883,
1818,
3639,
514,
4746,
2310,
273,... |
nodeList.add(listNode2); | nodeList.add(listNode3); | ArrayList new30() { ArrayList nodeList = new ArrayList(); ArrayList nodeArrayList1 = (ArrayList) pop(); TypedLinkedList listNode2 = new TypedLinkedList(); { PKeyvalDecl pkeyvaldeclNode1; pkeyvaldeclNode1 = (PKeyvalDecl)nodeArrayList1.get(0); if(pkeyvaldeclNode1 != null) { listNode2.add(pkeyvaldeclNode1); } } nodeList.add(listNode2); return nodeList; } | 50059 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50059/a343b73e05abe516d42c4d6672f63a8325be4a98/Parser.java/clean/sub/source/net/sourceforge/texlipse/bibparser/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
2407,
394,
5082,
1435,
565,
288,
3639,
2407,
10198,
273,
394,
2407,
5621,
3639,
2407,
756,
19558,
21,
273,
261,
19558,
13,
1843,
5621,
3639,
13833,
13174,
682,
666,
907,
22,
273,
394,
138... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2407,
394,
5082,
1435,
565,
288,
3639,
2407,
10198,
273,
394,
2407,
5621,
3639,
2407,
756,
19558,
21,
273,
261,
19558,
13,
1843,
5621,
3639,
13833,
13174,
682,
666,
907,
22,
273,
394,
138... |
private void createLabel( Composite parent, String content, int width ) | private void createLabel( Composite parent, String content ) | private void createLabel( Composite parent, String content, int width ) { Label label = new Label( parent, SWT.NONE ); if ( content != null ) { label.setText( content ); } setLabelLayoutData( label, width ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/31a80f48beb9d599facbdada555a36a918b898f1/ParameterDialog.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/ParameterDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
2224,
12,
14728,
982,
16,
514,
913,
16,
509,
1835,
262,
202,
95,
202,
202,
2224,
1433,
273,
394,
5287,
12,
982,
16,
348,
8588,
18,
9826,
11272,
202,
202,
430,
261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
2224,
12,
14728,
982,
16,
514,
913,
16,
509,
1835,
262,
202,
95,
202,
202,
2224,
1433,
273,
394,
5287,
12,
982,
16,
348,
8588,
18,
9826,
11272,
202,
202,
430,
261... |
num = getDecimalValue(c, state); | num = getDecimalValue(c, state, 0xFFFF, "msg.overlarge.backref"); | parseTerm(CompilerState state) { char[] src = state.cpbegin; char c = src[state.cp++]; int nDigits = 2; int parenBaseCount = state.parenCount; int num, tmp; RENode term; int termStart; int ocp = state.cp; switch (c) { /* assertions and atoms */ case '^': state.result = new RENode(REOP_BOL); state.progLength++; return true; case '$': state.result = new RENode(REOP_EOL); state.progLength++; return true; case '\\': if (state.cp < state.cpend) { c = src[state.cp++]; switch (c) { /* assertion escapes */ case 'b' : state.result = new RENode(REOP_WBDRY); state.progLength++; return true; case 'B': state.result = new RENode(REOP_WNONBDRY); state.progLength++; return true; /* Decimal escape */ case '0':/* * Under 'strict' ECMA 3, we interpret \0 as NUL and don't accept octal. * However, (XXX and since Rhino doesn't have a 'strict' mode) we'll just * behave the old way for compatibility reasons. * (see http://bugzilla.mozilla.org/show_bug.cgi?id=141078) * */ /* octal escape */ num = 0; while (state.cp < state.cpend) { c = src[state.cp]; if ((c >= '0') && (c <= '7')) { state.cp++; tmp = 8 * num + (c - '0'); if (tmp > 0377) break; num = tmp; } else break; } c = (char)(num); doFlat(state, c); break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': termStart = state.cp - 1; num = getDecimalValue(c, state); /* * n > 9 and > count of parentheses, * then treat as octal instead. */ if ((num > 9) && (num > state.parenCount)) { state.cp = termStart; num = 0; while (state.cp < state.cpend) { c = src[state.cp]; if ((c >= '0') && (c <= '7')) { state.cp++; tmp = 8 * num + (c - '0'); if (tmp > 0377) break; num = tmp; } else break; } c = (char)(num); doFlat(state, c); break; } /* otherwise, it's a back-reference */ state.result = new RENode(REOP_BACKREF); state.result.parenIndex = num - 1; state.progLength += 3; break; /* Control escape */ case 'f': c = 0xC; doFlat(state, c); break; case 'n': c = 0xA; doFlat(state, c); break; case 'r': c = 0xD; doFlat(state, c); break; case 't': c = 0x9; doFlat(state, c); break; case 'v': c = 0xB; doFlat(state, c); break; /* Control letter */ case 'c': if (((state.cp + 1) < state.cpend) && Character.isLetter(src[state.cp + 1])) c = (char)(src[state.cp++] & 0x1F); else { /* back off to accepting the original '\' as a literal */ --state.cp; c = '\\'; } doFlat(state, c); break; /* UnicodeEscapeSequence */ case 'u': nDigits += 2; // fall thru... /* HexEscapeSequence */ case 'x': { int n = 0; int i; for (i = 0; (i < nDigits) && (state.cp < state.cpend); i++) { int digit; c = src[state.cp++]; if (!isHex(c)) { /* * back off to accepting the original * 'u' or 'x' as a literal */ state.cp -= (i + 2); n = src[state.cp++]; break; } n = (n << 4) | unHex(c); } c = (char)(n); } doFlat(state, c); break; /* Character class escapes */ case 'd': state.result = new RENode(REOP_DIGIT); state.progLength++; break; case 'D': state.result = new RENode(REOP_NONDIGIT); state.progLength++; break; case 's': state.result = new RENode(REOP_SPACE); state.progLength++; break; case 'S': state.result = new RENode(REOP_NONSPACE); state.progLength++; break; case 'w': state.result = new RENode(REOP_ALNUM); state.progLength++; break; case 'W': state.result = new RENode(REOP_NONALNUM); state.progLength++; break; /* IdentityEscape */ default: state.result = new RENode(REOP_FLAT); state.result.chr = c; state.result.length = 1; state.result.flatIndex = state.cp - 1; state.progLength += 3; break; } break; } else { /* a trailing '\' is an error */ reportError("msg.trail.backslash", ""); return false; } case '(': { RENode result = null; termStart = state.cp; if (state.cp + 1 < state.cpend && src[state.cp] == '?' && ((c = src[state.cp + 1]) == '=' || c == '!' || c == ':')) { state.cp += 2; if (c == '=') { result = new RENode(REOP_ASSERT); /* ASSERT, <next>, ... ASSERTTEST */ state.progLength += 4; } else if (c == '!') { result = new RENode(REOP_ASSERT_NOT); /* ASSERTNOT, <next>, ... ASSERTNOTTEST */ state.progLength += 4; } } else { result = new RENode(REOP_LPAREN); /* LPAREN, <index>, ... RPAREN, <index> */ state.progLength += 6; result.parenIndex = state.parenCount++; } ++state.parenNesting; if (!parseDisjunction(state)) return false; if (state.cp == state.cpend || src[state.cp] != ')') { reportError("msg.unterm.paren", ""); return false; } ++state.cp; --state.parenNesting; if (result != null) { result.kid = state.result; state.result = result; } break; } case ')': reportError("msg.re.unmatched.right.paren", ""); return false; case '[': state.result = new RENode(REOP_CLASS); termStart = state.cp; state.result.startIndex = termStart; while (true) { if (state.cp == state.cpend) { reportError("msg.unterm.class", ""); return false; } if (src[state.cp] == '\\') state.cp++; else { if (src[state.cp] == ']') { state.result.kidlen = state.cp - termStart; break; } } state.cp++; } state.result.index = state.classCount++; /* * Call calculateBitmapSize now as we want any errors it finds * to be reported during the parse phase, not at execution. */ if (!calculateBitmapSize(state, state.result, src, termStart, state.cp++)) return false; state.progLength += 3; /* CLASS, <index> */ break; case '.': state.result = new RENode(REOP_DOT); state.progLength++; break; case '*': case '+': case '?': reportError("msg.bad.quant", String.valueOf(src[state.cp - 1])); return false; case '{': /* Treat left-curly in a non-quantifier context as an error only * if it's followed immediately by a decimal digit. * This is an Perl extension. */ if ((state.cp != state.cpend) && isDigit(src[state.cp])) { reportError("msg.bad.quant", String.valueOf(src[state.cp - 1])); return false; } // fall thru... default: state.result = new RENode(REOP_FLAT); state.result.chr = c; state.result.length = 1; state.result.flatIndex = state.cp - 1; state.progLength += 3; break; } term = state.result; boolean hasQ = false; if (state.cp < state.cpend) { switch (src[state.cp]) { case '+': state.result = new RENode(REOP_QUANT); state.result.min = 1; state.result.max = -1; /* <PLUS>, <parencount>, <parenindex>, <next> ... <ENDCHILD> */ state.progLength += 8; hasQ = true; break; case '*': state.result = new RENode(REOP_QUANT); state.result.min = 0; state.result.max = -1; /* <STAR>, <parencount>, <parenindex>, <next> ... <ENDCHILD> */ state.progLength += 8; hasQ = true; break; case '?': state.result = new RENode(REOP_QUANT); state.result.min = 0; state.result.max = 1; /* <OPT>, <parencount>, <parenindex>, <next> ... <ENDCHILD> */ state.progLength += 8; hasQ = true; break; case '{': { int min = 0; int max = -1; int errIndex = state.cp++; c = src[state.cp]; if (isDigit(c)) { ++state.cp; min = getDecimalValue(c, state); c = src[state.cp]; } else { /* For Perl etc. compatibility, if a curly is not * followed by a proper digit, back off from it * being a quantifier, and chew it up as a literal * atom next time instead. */ --state.cp; return true; } state.result = new RENode(REOP_QUANT); if ((min >> 16) != 0) { reportError("msg.overlarge.max", String.valueOf(src[state.cp])); return false; } if (c == ',') { c = src[++state.cp]; if (isDigit(c)) { ++state.cp; max = getDecimalValue(c, state); c = src[state.cp]; if ((max >> 16) != 0) { reportError("msg.overlarge.max", String.valueOf(src[state.cp])); return false; } if (min > max) { reportError("msg.max.lt.min", String.valueOf(src[state.cp])); return false; } } if (max == 0) { reportError("msg.zero.quant", String.valueOf(src[state.cp])); return false; } } else { max = min; } state.result.min = min; state.result.max = max; /* QUANT, <min>, <max>, <parencount>, <parenindex>, <next> ... <ENDCHILD> */ state.progLength += 12; if (c == '}') { hasQ = true; break; } else { reportError("msg.unterm.quant", String.valueOf(src[state.cp])); return false; } } } } if (!hasQ) return true; ++state.cp; state.result.kid = term; state.result.parenIndex = parenBaseCount; state.result.parenCount = state.parenCount - parenBaseCount; if ((state.cp < state.cpend) && (src[state.cp] == '?')) { ++state.cp; state.result.greedy = false; } else state.result.greedy = true; return true; } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/497a0f766cc99c8e45495dadad51256e065545d1/NativeRegExp.java/buggy/js/rhino/src/org/mozilla/javascript/regexp/NativeRegExp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1109,
4065,
12,
9213,
1119,
919,
13,
565,
288,
3639,
1149,
8526,
1705,
273,
919,
18,
4057,
10086,
31,
3639,
1149,
276,
273,
1705,
63,
2019,
18,
4057,
9904,
15533,
3639,
509,
290,
9537,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
4065,
12,
9213,
1119,
919,
13,
565,
288,
3639,
1149,
8526,
1705,
273,
919,
18,
4057,
10086,
31,
3639,
1149,
276,
273,
1705,
63,
2019,
18,
4057,
9904,
15533,
3639,
509,
290,
9537,
... |
else if ( !Artifact.SCOPE_TEST.equals( artifact.getScope() ) && !Artifact.SCOPE_PROVIDED.equals( artifact.getScope() ) ) | else if ( !Artifact.SCOPE_PROVIDED.equals( artifact.getScope() ) ) | public void buildWebapp( MavenProject project ) throws IOException { getLog().info( "Assembling webapp " + project.getArtifactId() + " in " + webappDirectory ); File libDirectory = new File( webappDirectory, WEB_INF + "/lib" ); File tldDirectory = new File( webappDirectory, WEB_INF + "/tld" ); File webappClassesDirectory = new File( webappDirectory, WEB_INF + "/classes" ); File classesDirectory = new File( this.classesDirectory ); if ( classesDirectory.exists() ) { FileUtils.copyDirectoryStructure( classesDirectory, webappClassesDirectory ); } Set artifacts = project.getArtifacts(); for ( Iterator iter = artifacts.iterator(); iter.hasNext(); ) { Artifact artifact = (Artifact) iter.next(); // TODO: scope handler // TODO: use classpath instead // Include runtime and compile time libraries // [jc, 21-June]: handle TLDs as a special-case. if ( "tld".equals( artifact.getType() ) ) { FileUtils.copyFileToDirectory( artifact.getFile(), tldDirectory ); } // [jc, 21-June]: filter POMs out of the /lib copy process. else if ( "pom".equals( artifact.getType() ) ) { // don't mess with these...they'd only be here for inclusion of dependencies. } // [jc, 21-June]: I'm removing ( "jar".equals( artifact.getType() ) ) from consideration here // we'll handle anything that's NOT a POM or a TLD as a binary library to go in /lib else if ( !Artifact.SCOPE_TEST.equals( artifact.getScope() ) && !Artifact.SCOPE_PROVIDED.equals( artifact.getScope() ) ) { FileUtils.copyFileToDirectory( artifact.getFile(), libDirectory ); } } } | 47050 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47050/fd3e9fe9e29b5a6d361320f8a629a28803c4436b/WarMojo.java/clean/maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1361,
4079,
2910,
12,
17176,
4109,
1984,
262,
3639,
1216,
1860,
565,
288,
3639,
9189,
7675,
1376,
12,
315,
1463,
5747,
2456,
28945,
315,
397,
1984,
18,
588,
7581,
548,
1435,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1361,
4079,
2910,
12,
17176,
4109,
1984,
262,
3639,
1216,
1860,
565,
288,
3639,
9189,
7675,
1376,
12,
315,
1463,
5747,
2456,
28945,
315,
397,
1984,
18,
588,
7581,
548,
1435,
39... |
}); | temp.doLayout(); temp.repaint(); temp.invalidate(); temp.validate(); } }); } else { remove_button.setEnabled(false); } | private void addEmbeddedElement(Object value, PropertyDefinition prop_def, int row) { // Embedded Element // Adding a List EmbeddedElementPanel editor_list = new EmbeddedElementPanel((ConfigElement)value, mColor); ((TableLayout)this.getLayout()).insertRow(row, TableLayout.PREFERRED); TableLayoutConstraints c = new TableLayoutConstraints(0, row, 1, row, TableLayout.FULL, TableLayout.FULL); this.add(editor_list, c); if(prop_def.isVariable()) { JButton remove_button = new JButton(); remove_button.setIcon(mRemoveIcon); remove_button.setMargin(new Insets(0,0,0,0)); remove_button.setBorderPainted(false); remove_button.setFocusPainted(false); remove_button.setContentAreaFilled(false); final ConfigElement temp_elm = mConfigElement; final Object temp_value = value; final String temp_string = prop_def.getToken(); remove_button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { System.out.println("1"); PropertyComponent temp = (PropertyComponent)((Component)evt.getSource()).getParent(); temp_elm.removeProperty(temp_string, temp_value); if(temp.getLayout() instanceof TableLayout) { System.out.println("2"); TableLayout tl = (TableLayout)temp.getLayout(); // Get the row that this panel is in. TableLayoutConstraints tlc = tl.getConstraints((Component)evt.getSource()); int row = tlc.row1; temp.remove((Component)evt.getSource()); tl.deleteRow(row); } temp.doLayout(); temp.repaint(); temp.invalidate(); temp.validate(); } }); TableLayoutConstraints c4 = new TableLayoutConstraints(2, row, 2, row, TableLayout.LEFT, TableLayout.TOP); add(remove_button, c4); } this.refresh(); editor_list.refresh(); } | 49828 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49828/815e5c52b6fdf3a84f4f766ad8a5b269097f084b/PropertySheet.java/clean/modules/jackal/editors/org/vrjuggler/jccl/editors/PropertySheet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
918,
527,
14980,
1046,
12,
921,
460,
16,
4276,
1852,
2270,
67,
536,
16,
509,
1027,
13,
282,
288,
1377,
368,
21829,
3010,
1377,
368,
21240,
279,
987,
1377,
21829,
1046,
5537,
4858,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
918,
527,
14980,
1046,
12,
921,
460,
16,
4276,
1852,
2270,
67,
536,
16,
509,
1027,
13,
282,
288,
1377,
368,
21829,
3010,
1377,
368,
21240,
279,
987,
1377,
21829,
1046,
5537,
4858,
... |
boolean newIndexerValue = optionPage.getIndexerValue(); | boolean newIndexerValue = optionPage.getIndexerValue(); boolean newIndexerProblemsValue = optionPage.getIndexerProblemsValue(); | public boolean performOk() { boolean newIndexerValue = optionPage.getIndexerValue(); if (oldIndexerValue != newIndexerValue){ //persist new value IProject tempProject = getProject(); optionPage.persistIndexerValue(tempProject); //if indexer is now on send a index all request if (newIndexerValue) CCorePlugin.getDefault().getCoreModel().getIndexManager().indexAll(tempProject); } return true; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/4b1ecbf65bb678389b4b1c10e9689458753d9194/IndexerOptionPropertyPage.java/clean/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerOptionPropertyPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3073,
8809,
1435,
288,
1082,
202,
6494,
394,
20877,
620,
273,
1456,
1964,
18,
588,
20877,
620,
5621,
6862,
202,
430,
261,
1673,
20877,
620,
480,
394,
20877,
620,
15329,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3073,
8809,
1435,
288,
1082,
202,
6494,
394,
20877,
620,
273,
1456,
1964,
18,
588,
20877,
620,
5621,
6862,
202,
430,
261,
1673,
20877,
620,
480,
394,
20877,
620,
15329,
10... |
showPageFlippingAbortDialog(); selectCurrentPageAgain(); | handleError(); | public void run() { Object data = event.item.getData(); if (data instanceof IPreferenceNode) { if (!isCurrentPageValid()) { showPageFlippingAbortDialog(); selectCurrentPageAgain(); } else if (!showPage((IPreferenceNode) data)) { // Page flipping wasn't successful showPageFlippingAbortDialog(); selectCurrentPageAgain(); } else { // Everything went well currentTreeItem = (TreeItem) event.item; } // Keep focus in tree. See bugs 2692, 2621, and 6775. tree.setFocus(); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/15c9e41b785818b84c42cba3259622d8138d9995/PreferenceDialog.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
202,
482,
918,
1086,
1435,
288,
25083,
202,
921,
501,
273,
871,
18,
1726,
18,
588,
751,
5621,
25083,
202,
430,
261,
892,
1276,
467,
9624,
907,
13,
288,
6862,
1082,
202,
430,
16051,
291... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
202,
482,
918,
1086,
1435,
288,
25083,
202,
921,
501,
273,
871,
18,
1726,
18,
588,
751,
5621,
25083,
202,
430,
261,
892,
1276,
467,
9624,
907,
13,
288,
6862,
1082,
202,
430,
16051,
291... |
_t = __t1985; | _t = __t1986; | public final void inputfromstate(AST _t) throws RecognitionException { AST inputfromstate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t1985 = _t; AST tmp2018_AST_in = (AST)_t; match(_t,INPUT); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case STREAM: { stream_name(_t); _t = _retTree; break; } case FROM: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp2019_AST_in = (AST)_t; match(_t,FROM); _t = _t.getNextSibling(); io_phrase(_t); _t = _retTree; state_end(_t); _t = _retTree; _t = __t1985; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/865876f0e6319c071fef156818ff116c276cfdff/TreeParser01.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
810,
2080,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
810,
2080,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
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,
727,
918,
810,
2080,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
810,
2080,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,... |
log.trace("service state was set successfully (" + service_state.size() + " entries"); | log.trace("service state was set successfully (" + service_state.size() + " entries)"); | public void fetchServiceInformation() throws Exception { while(true) { Address coord=getCoordinator(), local_address=channel != null? channel.getLocalAddress() : null; boolean is_coord=coord != null && local_address != null && local_address.equals(coord); if(is_coord) { if(log.isTraceEnabled()) log.trace("I'm coordinator, will not fetch service state information"); break; } ServiceInfo si=new ServiceInfo(ServiceInfo.STATE_REQ, null, null, null); MuxHeader hdr=new MuxHeader(si); Message state_req=new Message(coord, null, null); state_req.putHeader(NAME, hdr); service_state_promise.reset(); channel.send(state_req); try { byte[] state=(byte[])service_state_promise.getResultWithTimeout(2000); if(state != null) { Map new_state=(Map)Util.objectFromByteBuffer(state); synchronized(service_state) { service_state.clear(); service_state.putAll(new_state); } if(log.isTraceEnabled()) log.trace("service state was set successfully (" + service_state.size() + " entries"); } else { if(log.isWarnEnabled()) log.warn("received service state was null"); } break; } catch(TimeoutException e) { if(log.isTraceEnabled()) log.trace("timed out waiting for service state from " + coord + ", retrying"); } } } | 50160 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50160/6d35abae263ab7b7f0769fc10c655764ce762d4c/Multiplexer.java/clean/src/org/jgroups/mux/Multiplexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2158,
1179,
5369,
1435,
1216,
1185,
288,
3639,
1323,
12,
3767,
13,
288,
5411,
5267,
2745,
33,
588,
25307,
9334,
1191,
67,
2867,
33,
4327,
480,
446,
35,
1904,
18,
588,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2158,
1179,
5369,
1435,
1216,
1185,
288,
3639,
1323,
12,
3767,
13,
288,
5411,
5267,
2745,
33,
588,
25307,
9334,
1191,
67,
2867,
33,
4327,
480,
446,
35,
1904,
18,
588,
2042,
1... |
protected CoderResult encodeLoop (CharBuffer in, ByteBuffer out) { // TODO: Optimize this in the case in.hasArray() / out.hasArray() if (needsByteOrderMark) { if (out.remaining () < 2) return CoderResult.OVERFLOW; put (out, BYTE_ORDER_MARK); needsByteOrderMark = false; } int inPos = in.position (); try { while (in.hasRemaining ()) { char c = in.get (); if (0xD800 <= c && c <= 0xDFFF) { // c is a surrogate // make sure c is a high surrogate if (c > 0xDBFF) return CoderResult.malformedForLength (1); if (in.remaining () < 1) return CoderResult.UNDERFLOW; char d = in.get (); // make sure d is a low surrogate if (d < 0xDC00 || d > 0xDFFF) return CoderResult.malformedForLength (1); put (out, c); put (out, d); inPos += 2; } else { if (out.remaining () < 2) return CoderResult.OVERFLOW; put (out, c); inPos++; } } return CoderResult.UNDERFLOW; } finally { in.position (inPos); } } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/92038d25ca011c85e26640a575247dacb269ccc7/UTF_16Encoder.java/clean/libraries/javalib/gnu/java/nio/charset/UTF_16Encoder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
39,
5350,
1253,
3015,
6452,
12,
2156,
1892,
267,
16,
12242,
659,
15329,
759,
6241,
30,
13930,
452,
546,
291,
267,
451,
557,
448,
267,
18,
5332,
1076,
1435,
19,
659,
18,
5332,
1076,
143... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
39,
5350,
1253,
3015,
6452,
12,
2156,
1892,
267,
16,
12242,
659,
15329,
759,
6241,
30,
13930,
452,
546,
291,
267,
451,
557,
448,
267,
18,
5332,
1076,
1435,
19,
659,
18,
5332,
1076,
143... | ||
String path = ""; if (aMozBinDirectory != null) { path = aMozBinDirectory + File.separator; } System.load(path + System.mapLibraryName("javaxpcomglue")); | registerJavaXPCOMMethods(aMozBinDirectory); | public nsIServiceManager initXPCOM(File aMozBinDirectory, IAppFileLocProvider aAppFileLocProvider) { // load JNI library String path = ""; if (aMozBinDirectory != null) { path = aMozBinDirectory + File.separator; } System.load(path + System.mapLibraryName("javaxpcomglue")); return initXPCOMNative(aMozBinDirectory, aAppFileLocProvider); } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/18020ea13b14108435c19a95a4429ab48d865ecb/XPCOMImpl.java/clean/extensions/java/xpcom/src/org/mozilla/xpcom/internal/XPCOMImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3153,
45,
1179,
1318,
1208,
60,
3513,
1872,
12,
812,
279,
49,
11142,
9913,
2853,
16,
1850,
467,
3371,
812,
1333,
2249,
279,
3371,
812,
1333,
2249,
13,
288,
565,
368,
1262,
804,
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,
282,
1071,
3153,
45,
1179,
1318,
1208,
60,
3513,
1872,
12,
812,
279,
49,
11142,
9913,
2853,
16,
1850,
467,
3371,
812,
1333,
2249,
279,
3371,
812,
1333,
2249,
13,
288,
565,
368,
1262,
804,
50... |
public void startClient() { System.out.println("Client"); ClientOptions options = new ClientOptions("Client", PORT, "127.0.0.1"); options.show(); options.waitForOptions(); options.dispose(); String name = options.getName(); int port = options.getPort(); String address = options.getAddress(); ClientMessenger messenger = null; try { messenger = new ClientMessenger(address, port, name, new GameObjectStreamFactory(m_data)); } catch(Exception e) { JOptionPane.showMessageDialog(null, e.getMessage()); startClient(); return; } ChatFrame chatFrame = new ChatFrame(messenger); chatFrame.show(); IGameLoader loader = m_data.getGameLoader(); ClientStartup startup = new ClientStartup(loader, m_data, messenger); startup.setVisible(true); startup.waitForPlayers(); startup.dispose(); Map playerMapping = startup.getLocalPlayerMapping(); Set playerSet = loader.createPlayers(playerMapping); ClientGame clientGame = new ClientGame(m_data, playerSet, messenger, messenger.getServerNode()); chatFrame.getChat().showTranscript(clientGame.getTranscript()); m_data.getGameLoader().startGame(clientGame, playerSet); messenger.send(new ClientReady(), messenger.getServerNode()); } | 8339 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8339/65dc97c8bd1d73da6a21d79d5ad468e6bb971a9b/GameRunner.java/buggy/src/games/strategy/engine/framework/GameRunner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
787,
1227,
1435,
202,
95,
202,
202,
3163,
18,
659,
18,
8222,
2932,
1227,
8863,
9506,
202,
1227,
1320,
702,
273,
394,
2445,
1320,
2932,
1227,
3113,
20987,
16,
315,
14260,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1227,
1435,
202,
95,
202,
202,
3163,
18,
659,
18,
8222,
2932,
1227,
8863,
9506,
202,
1227,
1320,
702,
273,
394,
2445,
1320,
2932,
1227,
3113,
20987,
16,
315,
14260,
... | ||
public boolean isFFirstMerged() { return fFirstMerged.isSet(field_1_rgf); } | 509 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/509/79d06dc2b5e839d92f501b1ff8ea15e53d646732/TCAbstractType.java/clean/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/TCAbstractType.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
353,
2246,
920,
19043,
1435,
565,
288,
3639,
327,
284,
3759,
19043,
18,
291,
694,
12,
1518,
67,
21,
67,
26876,
74,
1769,
5411,
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,
377,
1071,
1250,
353,
2246,
920,
19043,
1435,
565,
288,
3639,
327,
284,
3759,
19043,
18,
291,
694,
12,
1518,
67,
21,
67,
26876,
74,
1769,
5411,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | ||
return false; | Component parent = getParent(); boolean retVal = false; if (parent instanceof JViewport) { JViewport viewport = (JViewport) parent; Dimension pref = getPreferredSize(); if (viewport.getSize().height > pref.height) retVal = true; if ((getLayoutOrientation() == VERTICAL_WRAP) && (getVisibleRowCount() <= 0)) retVal = true; } return retVal; | public boolean getScrollableTracksViewportHeight() { return false; } | 27835 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27835/7878167de36c868f3f4b0f507094bb155efbb199/JList.java/clean/libjava/javax/swing/JList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
11971,
30453,
22138,
22743,
2686,
1435,
225,
288,
565,
5435,
982,
273,
5089,
5621,
1250,
12197,
273,
629,
31,
309,
261,
2938,
1276,
804,
22743,
13,
288,
804,
22743,
10482,
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,
282,
1071,
1250,
11971,
30453,
22138,
22743,
2686,
1435,
225,
288,
565,
5435,
982,
273,
5089,
5621,
1250,
12197,
273,
629,
31,
309,
261,
2938,
1276,
804,
22743,
13,
288,
804,
22743,
10482,
273,
... |
int firstLine = textArea.getFirstPhysicalLine(); int lastLine = textArea.getLastPhysicalLine(); | int _firstLine = textArea.getFirstPhysicalLine(); int _lastLine = textArea.getLastPhysicalLine(); | public void transactionComplete(Buffer buffer) { if(textArea.getDisplayManager() == DisplayManager.this) { if(delayedUpdate) { if(delayedMultilineUpdate) { textArea.invalidateScreenLineRange( textArea.chunkCache .getScreenLineOfOffset( delayedUpdateStart,0), textArea.getVisibleLines()); delayedMultilineUpdate = false; } else { textArea.invalidateLineRange( delayedUpdateStart, delayedUpdateEnd); } int firstLine = textArea.getFirstPhysicalLine(); int lastLine = textArea.getLastPhysicalLine(); int line = delayedUpdateStart; if(!isLineVisible(line)) line = getNextVisibleLine(line); while(line != -1 && line <= delayedUpdateEnd) { if(line < firstLine || line > lastLine) { getScreenLineCount(line); } line = getNextVisibleLine(line); } _notifyScreenLineChanges(); } textArea._finishCaretUpdate(); } delayedUpdate = false; } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/7d4c1f2074306678cb112e5d3b833070ea55c36b/DisplayManager.java/buggy/org/gjt/sp/jedit/textarea/DisplayManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
2492,
6322,
12,
1892,
1613,
13,
202,
202,
95,
1082,
202,
430,
12,
955,
5484,
18,
588,
4236,
1318,
1435,
422,
9311,
1318,
18,
2211,
13,
1082,
202,
95,
9506,
202,
430,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
2492,
6322,
12,
1892,
1613,
13,
202,
202,
95,
1082,
202,
430,
12,
955,
5484,
18,
588,
4236,
1318,
1435,
422,
9311,
1318,
18,
2211,
13,
1082,
202,
95,
9506,
202,
430,
1... |
public void testBug36769(){ boolean testPassed = false; try{ Writer code = new StringWriter(); code.write("template <class A, B> cls<A, C>::operator op &() const {}\n"); code.write("template <class A, B> cls<A, C>::cls() {}\n"); code.write("template <class A, B> cls<A, C>::~cls() {}\n"); | public void testBug36769() throws Exception { Writer code = new StringWriter(); code.write("template <class A, B> cls<A, C>::operator op &() const {}\n"); code.write("template <class A, B> cls<A, C>::cls() {}\n"); code.write("template <class A, B> cls<A, C>::~cls() {}\n"); | public void testBug36769(){ boolean testPassed = false; try{ Writer code = new StringWriter(); code.write("template <class A, B> cls<A, C>::operator op &() const {}\n"); code.write("template <class A, B> cls<A, C>::cls() {}\n"); code.write("template <class A, B> cls<A, C>::~cls() {}\n"); TranslationUnit tu = parse( code.toString()); testPassed = true; } catch( Throwable e ){ if( ! (e instanceof ParserException)) fail( "Unexpected Error: " + e.getMessage() ); } if( testPassed ) fail( "The expected error did not occur."); } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/fcd010f569236801f1aded20abe270579381da56/ACEFailedTest.java/clean/core/org.eclipse.cdt.ui.tests/failures/org/eclipse/cdt/core/parser/failedTests/ACEFailedTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
19865,
5718,
6669,
29,
1435,
95,
202,
202,
6494,
1842,
22530,
273,
629,
31,
202,
202,
698,
95,
1082,
202,
2289,
981,
273,
394,
17436,
5621,
1082,
202,
710,
18,
2626... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19865,
5718,
6669,
29,
1435,
95,
202,
202,
6494,
1842,
22530,
273,
629,
31,
202,
202,
698,
95,
1082,
202,
2289,
981,
273,
394,
17436,
5621,
1082,
202,
710,
18,
2626... |
return (Segment) segment.addNew(new MondrianSegment()); } | return (Segment) segment.addNew(new MondrianSegment()); } | public Segment createSegment() throws OLAPException { return (Segment) segment.addNew(new MondrianSegment()); } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/b5b5168edc3af09cb74945a80b0c36e6630ed502/MondrianEdgeView.java/buggy/src/main/mondrian/jolap/MondrianEdgeView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
10807,
752,
4131,
1435,
1216,
531,
48,
2203,
503,
288,
202,
202,
2463,
261,
4131,
13,
3267,
18,
1289,
1908,
12,
2704,
490,
1434,
566,
304,
4131,
10663,
202,
97,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
10807,
752,
4131,
1435,
1216,
531,
48,
2203,
503,
288,
202,
202,
2463,
261,
4131,
13,
3267,
18,
1289,
1908,
12,
2704,
490,
1434,
566,
304,
4131,
10663,
202,
97,
2,
-100,
-100,... |
ViewSashContainer mainLayout) { | ViewSashContainer mainLayout, Perspective perspective) { | public PerspectiveHelper(WorkbenchPage workbenchPage, ViewSashContainer mainLayout) { this.page = workbenchPage; this.mainLayout = mainLayout; // Determine if reparenting is allowed by checking if some arbitrary // Composite supports reparenting. This is used to determine if // detached views should be enabled. this.detachable = false; Composite client = workbenchPage.getClientComposite(); if (client != null) { Composite testChild = new Composite(client, SWT.NONE); this.detachable = testChild.isReparentable(); testChild.dispose(); } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/f6ab0d6f9de401e0c1adadb524f47fd9c160d98f/PerspectiveHelper.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
453,
414,
16772,
2276,
12,
2421,
22144,
1964,
1440,
22144,
1964,
16,
5411,
4441,
55,
961,
2170,
2774,
3744,
16,
453,
414,
16772,
26651,
13,
288,
3639,
333,
18,
2433,
273,
1440,
2214... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
453,
414,
16772,
2276,
12,
2421,
22144,
1964,
1440,
22144,
1964,
16,
5411,
4441,
55,
961,
2170,
2774,
3744,
16,
453,
414,
16772,
26651,
13,
288,
3639,
333,
18,
2433,
273,
1440,
2214... |
results.put(nameDeclaration, usages); | results.put(decl, usages); | public void applyTo(Object o) { NameDeclaration nameDeclaration = (NameDeclaration)o; List usages = (List)decls.get(nameDeclaration); if (!usages.isEmpty()) { if (lookingForUsed) { results.put(nameDeclaration, usages); } } else { if (!lookingForUsed) { results.put(nameDeclaration, usages); } } } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/9a940e0cc57577c730a54adf2582612581cb05af/VariableUsageFinderFunction.java/clean/pmd/src/net/sourceforge/pmd/symboltable/VariableUsageFinderFunction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
28681,
12,
921,
320,
13,
288,
3639,
1770,
6094,
508,
6094,
273,
261,
461,
6094,
13,
83,
31,
3639,
987,
584,
1023,
273,
261,
682,
13,
323,
6429,
18,
588,
12,
529,
6094,
1769... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
28681,
12,
921,
320,
13,
288,
3639,
1770,
6094,
508,
6094,
273,
261,
461,
6094,
13,
83,
31,
3639,
987,
584,
1023,
273,
261,
682,
13,
323,
6429,
18,
588,
12,
529,
6094,
1769... |
private IRubyObject getConstantInner(String name, boolean exclude) { IRubyObject objectClass = getRuntime().getObject(); boolean retryForModule = false; RubyModule p = this; retry: while (true) { while (p != null) { IRubyObject constant = p.getConstantAt(name); if (constant == null) { if (getRuntime().getLoadService().autoload(name) != null) { continue; } } if (constant != null) { if (exclude && p == objectClass && this != objectClass) { getRuntime().getWarnings().warn("toplevel constant " + name + " referenced by " + getName() + "::" + name); } return constant; } p = p.getSuperClass(); } if (!exclude && !retryForModule && getClass().equals(RubyModule.class)) { retryForModule = true; p = getRuntime().getObject(); continue retry; } break; } return callMethod(getRuntime().getCurrentContext(), "const_missing", RubySymbol.newSymbol(getRuntime(), name)); } | 45298 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45298/1278c5bb3507a052d150d814f15453542ae41aed/RubyModule.java/buggy/src/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
15908,
10340,
921,
24337,
2857,
12,
780,
508,
16,
1250,
4433,
13,
288,
3639,
15908,
10340,
921,
23992,
273,
18814,
7675,
588,
921,
5621,
3639,
1250,
3300,
1290,
3120,
273,
629,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
15908,
10340,
921,
24337,
2857,
12,
780,
508,
16,
1250,
4433,
13,
288,
3639,
15908,
10340,
921,
23992,
273,
18814,
7675,
588,
921,
5621,
3639,
1250,
3300,
1290,
3120,
273,
629,
31,
... | ||
System.out.close(); System.err.close(); | originalErrStream.close(); shutdownErrLogStream.close(); | public static void main(String[] args) throws Exception { hostName = TestUtil.getHostName(); if (hostName.equals("localhost")) NETWORKSERVER_PORT = 20000; else NETWORKSERVER_PORT = 1527; // Load harness properties. ij.getPropertyArg(args); // "runTest()" is going to try to connect to the database through // the server at port NETWORKSERVER_PORT. Thus, we have to // start the server on that port before calling runTest. // Except when we are using a remote server, then we assume the port is 1527, // and we assume the server has been started already try { TestUtil.loadDriver(); } catch (Exception e) { e.printStackTrace(); } if (hostName.equals("localhost")) { // Start the NetworkServer on another thread networkServer = new NetworkServerControl(InetAddress.getByName("localhost"),NETWORKSERVER_PORT); networkServer.start(null); // Wait for the NetworkServer to start. if (!isServerStarted(networkServer, 60)) System.exit(-1); } // Now, go ahead and run the test. try { dataSourcePermissions_net tester = new dataSourcePermissions_net(); tester.setProperties(); tester.runTest(); if (TestUtil.isDerbyNetClientFramework()) tester.testClientDataSourceProperties(); new dataSourcePermissions_net().cleanUp(); } catch (Exception e) { // if we catch an exception of some sort, we need to make sure to // close our streams before returning; otherwise, we can get // hangs in the harness. SO, catching all exceptions here keeps // us from exiting before closing the necessary streams. System.out.println("FAIL - Exiting due to unexpected error: " + e.getMessage()); e.printStackTrace(); } // Shutdown the server. if (hostName.equals("localhost")) { networkServer.shutdown(); // how do we do this with the new api? //networkServer.join(); Thread.sleep(5000); } System.out.println("Completed dataSourcePermissions_net"); System.out.close(); System.err.close(); } | 56322 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56322/c73df2b05a9c69582b2dbe75cddaf479a2b6ecae/dataSourcePermissions_net.java/clean/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dataSourcePermissions_net.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1185,
288,
202,
202,
2564,
461,
273,
7766,
1304,
18,
588,
20946,
5621,
202,
202,
430,
261,
2564,
461,
18,
14963,
2932,
13014,
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,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1185,
288,
202,
202,
2564,
461,
273,
7766,
1304,
18,
588,
20946,
5621,
202,
202,
430,
261,
2564,
461,
18,
14963,
2932,
13014,
6,
... |
.addClass(lhsType_.getSignature()).describe("CLASS_REFTYPE") .addClass(rhsType_.getSignature()).describe("CLASS_REFTYPE") .addSourceLine(this.classContext, methodGen, sourceFile, location.getHandle()) | .addType(originalLhsType.getSignature()) .addType(originalRhsType.getSignature()) .addSourceLine(this.classContext, methodGen, sourceFile, location.getHandle()) | private void checkEqualsComparison( Location location, JavaClass jclass, MethodGen methodGen, TypeDataflow typeDataflow) throws DataflowAnalysisException { InstructionHandle handle = location.getHandle(); String sourceFile = jclass.getSourceFileName(); TypeFrame frame = typeDataflow.getFactAtLocation(location); if (frame.getStackDepth() < 2) throw new DataflowAnalysisException("Stack underflow", methodGen, handle); int numSlots = frame.getNumSlots(); Type lhsType_ = frame.getValue(numSlots - 2); Type rhsType_ = frame.getValue(numSlots - 1); // Ignore top and bottom values if (lhsType_.getType() == T_TOP || lhsType_.getType() == T_BOTTOM || rhsType_.getType() == T_TOP || rhsType_.getType() == T_BOTTOM) return; if (!(lhsType_ instanceof ReferenceType) || !(rhsType_ instanceof ReferenceType)) { if (rhsType_.getType() == T_NULL) { boolean isTestCase = false; Method method = methodGen.getMethod(); if (method.getName().startsWith("test") && method.isPublic() && method.getSignature().equals("()V") || methodGen.getClassName().endsWith("Test")) isTestCase = true; // A literal null value was passed directly to equals(). if (!isTestCase) bugReporter.reportBug(new BugInstance(this, "EC_NULL_ARG", NORMAL_PRIORITY) .addClassAndMethod(methodGen, sourceFile) .addSourceLine(this.classContext, methodGen, sourceFile, location.getHandle())); } else if (lhsType_.getType() == T_NULL) { // Hmm...in this case, equals() is being invoked on // a literal null value. This is really the // purview of FindNullDeref. So, we'll just do nothing. } else { bugReporter.logError("equals() used to compare non-object type(s) " + lhsType_ + " and " + rhsType_ + " in " + SignatureConverter.convertMethodSignature(methodGen) + " at " + location.getHandle()); } return; } if (lhsType_ instanceof ArrayType && rhsType_ instanceof ArrayType) { bugReporter.reportBug(new BugInstance(this, "EC_BAD_ARRAY_COMPARE", NORMAL_PRIORITY) .addClassAndMethod(methodGen, sourceFile) .addClass(lhsType_.getSignature()).describe("CLASS_REFTYPE") .addClass(rhsType_.getSignature()).describe("CLASS_REFTYPE") .addSourceLine(this.classContext, methodGen, sourceFile, location.getHandle()) ); do { lhsType_ = ((ArrayType)lhsType_).getElementType(); rhsType_ = ((ArrayType)rhsType_).getElementType(); } while (lhsType_ instanceof ArrayType && rhsType_ instanceof ArrayType); } if (lhsType_ instanceof ArrayType) { int priority = HIGH_PRIORITY; if (rhsType_.equals(ObjectType.OBJECT)) priority = LOW_PRIORITY; bugReporter.reportBug(new BugInstance(this, "EC_ARRAY_AND_NONARRAY", priority) .addClassAndMethod(methodGen, sourceFile) .addClass(lhsType_.getSignature()).describe("CLASS_REFTYPE") .addClass(rhsType_.getSignature()).describe("CLASS_REFTYPE") .addSourceLine(this.classContext, methodGen, sourceFile, location.getHandle()) ); } if (rhsType_ instanceof ArrayType) { int priority = HIGH_PRIORITY; if (lhsType_.equals(ObjectType.OBJECT)) priority = LOW_PRIORITY; bugReporter.reportBug(new BugInstance(this, "EC_ARRAY_AND_NONARRAY", priority) .addClassAndMethod(methodGen, sourceFile) .addClass(rhsType_.getSignature()).describe("CLASS_REFTYPE") .addClass(lhsType_.getSignature()).describe("CLASS_REFTYPE") .addSourceLine(this.classContext, methodGen, sourceFile, location.getHandle()) ); } if (lhsType_.equals(rhsType_)) return; // For now, ignore the case where either reference is not // of an object type. (It could be either an array or null.) if (!(lhsType_ instanceof ObjectType) || !(rhsType_ instanceof ObjectType)) return; ObjectType lhsType = (ObjectType) lhsType_; ObjectType rhsType = (ObjectType) rhsType_; int priority = LOW_PRIORITY + 1; String bugType = "EC_UNRELATED_TYPES"; // See if the types are related by inheritance. try { if (!Hierarchy.isSubtype(lhsType, rhsType) && !Hierarchy.isSubtype(rhsType, lhsType)) { AnalysisContext analysisContext = AnalysisContext.currentAnalysisContext(); // Look up the classes JavaClass lhsClass = analysisContext.lookupClass(lhsType.getClassName()); JavaClass rhsClass = analysisContext.lookupClass(rhsType.getClassName()); if (!lhsClass.isInterface() && !rhsClass.isInterface()) { // Both are class types, and therefore there is no possible way // the compared objects can have the same runtime type. priority = HIGH_PRIORITY; } else { /* if (DEBUG) { System.out.println("Subtypes of " + lhsClass.getClassName() + " are " + classSetToString(analysisContext.getSubtypes().getTransitiveSubtypes(lhsClass))); System.out.println("Subtypes of " + rhsClass.getClassName() + " are " + classSetToString(analysisContext.getSubtypes().getTransitiveSubtypes(rhsClass))); } */ // Look up the common subtypes of the two types. If the // intersection does not contain at least one instantiable class, // then issue a warning of the appropriate type. Set<JavaClass> commonSubtypes = analysisContext.getSubtypes().getTransitiveCommonSubtypes(lhsClass, rhsClass); if (!containsAtLeastOneInstantiableClass(commonSubtypes)) { priority = HIGH_PRIORITY; bugType = (lhsClass.isInterface() && rhsClass.isInterface()) ? "EC_UNRELATED_INTERFACES" : "EC_UNRELATED_CLASS_AND_INTERFACE"; } } } } catch (ClassNotFoundException e) { bugReporter.reportMissingClass(e); return; } if (methodGen.getName().startsWith("test") && methodGen.getSignature().equals("()V")) { try { if (Hierarchy.isSubtype(methodGen.getClassName(), "junit.framework.TestCase")) priority+=2; } catch (ClassNotFoundException e) { priority+=2; } } if (priority <= LOW_PRIORITY) { bugReporter.reportBug(new BugInstance(this, bugType, priority) .addClassAndMethod(methodGen, sourceFile) .addClass(lhsType.getClassName()).describe("CLASS_REFTYPE") .addClass(rhsType.getClassName()).describe("CLASS_REFTYPE") .addSourceLine(this.classContext, methodGen, sourceFile, location.getHandle()) ); } } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/2f8b77f480b729ea472b34ed4fbc483b72cc8b46/FindRefComparison.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/detect/FindRefComparison.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
866,
8867,
16059,
12,
1082,
202,
2735,
2117,
16,
1082,
202,
5852,
797,
525,
1106,
16,
1082,
202,
1305,
7642,
707,
7642,
16,
1082,
202,
559,
751,
2426,
618,
751,
2426,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
866,
8867,
16059,
12,
1082,
202,
2735,
2117,
16,
1082,
202,
5852,
797,
525,
1106,
16,
1082,
202,
1305,
7642,
707,
7642,
16,
1082,
202,
559,
751,
2426,
618,
751,
2426,
13... |
RepositoryConfigurationFactory factory = RepositoryConfigurationFactory.getInstance(); | RepositoryConfigurationFactory factory = new RepositoryConfigurationFactory(); | public void testEclipseRDFProductConfig() throws Exception { RepositoryConfigurationFactory factory = RepositoryConfigurationFactory.getInstance(); TaskRepository repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, IBugzillaConstants.ECLIPSE_BUGZILLA_URL); RepositoryConfiguration config = factory.getConfiguration(repository.getUrl(), null, repository.getUserName(), repository.getPassword(), null); assertNotNull(config); assertEquals("2.20.1", config.getInstallVersion()); assertEquals(7, config.getStatusValues().size()); assertEquals(8, config.getResolutions().size()); assertEquals(6, config.getPlatforms().size()); assertEquals(28, config.getOSs().size()); assertEquals(5, config.getPriorities().size()); assertEquals(7, config.getSeverities().size()); assertEquals(53, config.getProducts().size()); assertEquals(4, config.getOpenStatusValues().size()); assertEquals(10, config.getComponents("Mylar").size()); assertEquals(21, config.getKeywords().size()); // assertEquals(10, config.getComponents("Hyades").size()); // assertEquals(1, config.getTargetMilestones("TestProduct").size()); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/24469f8f139dabc60654018ab057291e5f25633b/BugzillaConfigurationTest.java/buggy/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
23057,
10472,
30137,
4133,
809,
1435,
1216,
1185,
288,
202,
202,
3305,
1750,
1733,
3272,
273,
6281,
1750,
1733,
18,
588,
1442,
5621,
202,
202,
2174,
3305,
3352,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
23057,
10472,
30137,
4133,
809,
1435,
1216,
1185,
288,
202,
202,
3305,
1750,
1733,
3272,
273,
6281,
1750,
1733,
18,
588,
1442,
5621,
202,
202,
2174,
3305,
3352,
273,
... |
public void configure(Configuration cfg) { | protected void configure(Configuration cfg) { | public void configure(Configuration cfg) { setBaseURL(FopFactory.getBaseURLfromConfig(cfg, "base")); if (cfg.getChild("target-resolution", false) != null) { this.targetResolution = cfg.getChild("target-resolution").getValueAsFloat( DEFAULT_TARGET_RESOLUTION); log.info("Target resolution set to: " + targetResolution + "dpi (px2mm=" + getTargetPixelUnitToMillimeter() + ")"); } } | 5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/fb3a04efdccd87f197d0502a8be1348e06481306/FOUserAgent.java/buggy/src/java/org/apache/fop/apps/FOUserAgent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
5068,
12,
1750,
2776,
13,
288,
3639,
26435,
1785,
12,
42,
556,
1733,
18,
588,
29064,
2080,
809,
12,
7066,
16,
315,
1969,
7923,
1769,
3639,
309,
261,
7066,
18,
588,
1763,
2932... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
5068,
12,
1750,
2776,
13,
288,
3639,
26435,
1785,
12,
42,
556,
1733,
18,
588,
29064,
2080,
809,
12,
7066,
16,
315,
1969,
7923,
1769,
3639,
309,
261,
7066,
18,
588,
1763,
2932... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.