rem stringlengths 1 53.3k | add stringlengths 0 80.5k | context stringlengths 6 326k | meta stringlengths 141 403 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
protected void addCharacters(char data[], int start, int length) { | protected void addCharacters(char data[], int start, int length, Locator locator) { | protected void addCharacters(char data[], int start, int length) { if (textInfo == null) { // Really only need one of these, but need to get fontInfo // stored in propMgr for later use. propMgr.setFontInfo(getFOTreeControl()); textInfo = propMgr.getTextLayoutProps(getFOTreeControl()); } FOText ft = new FOText(data, start, length, textInfo, this); /* characters() processing empty for FOTreeHandler, not empty for RTF & MIFHandlers */ getFOTreeControl().getFOInputHandler().characters(ft.ca, ft.start, ft.length); addChild(ft); } | 5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/a9562b6773199d07aefd242da47f89acd59becf0/FObjMixed.java/clean/src/java/org/apache/fop/fo/FObjMixed.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
527,
11600,
12,
3001,
501,
63,
6487,
509,
787,
16,
509,
769,
16,
2851,
639,
8871,
13,
288,
3639,
309,
261,
955,
966,
422,
446,
13,
288,
5411,
368,
868,
1230,
1338,
1608,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
527,
11600,
12,
3001,
501,
63,
6487,
509,
787,
16,
509,
769,
16,
2851,
639,
8871,
13,
288,
3639,
309,
261,
955,
966,
422,
446,
13,
288,
5411,
368,
868,
1230,
1338,
1608,
12... |
this.shell = shellToAdd; this.shell.attachTo(coreToUse); | this._shell = shell; this._shell.attachTo(core); | public void addShell(Shell shellToAdd, Core coreToUse) { this.shell = shellToAdd; this.shell.attachTo(coreToUse); if (this.stdOutAppender != null) { this.stdOutAppender.watch(this.shell); } if (this.stdErrAppender != null) { this.stdErrAppender.watch(this.shell); } } | 49735 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49735/6a34a4cb5cc8374e5588b5833b5726f8ca03111d/Console.java/buggy/JavaSource/org/aitools/programd/interfaces/Console.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
13220,
12,
13220,
5972,
13786,
16,
4586,
2922,
18762,
13,
565,
288,
3639,
333,
18,
10304,
273,
5972,
13786,
31,
3639,
333,
18,
10304,
18,
7331,
774,
12,
3644,
18762,
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,
527,
13220,
12,
13220,
5972,
13786,
16,
4586,
2922,
18762,
13,
565,
288,
3639,
333,
18,
10304,
273,
5972,
13786,
31,
3639,
333,
18,
10304,
18,
7331,
774,
12,
3644,
18762,
1769,... |
public int getNormOffset(Point p0, Point p1, Point p2){ dd = (float)( ( (p2.x-p1.x)*(p0.y-p1.y) - (p0.x-p1.x)*(p2.y-p1.y) ) / Math.sqrt( (p2.x-p1.x)*(p2.x-p1.x) + (p2.y-p1.y)*(p2.y-p1.y) ) ); offset = -1 * (int) Math.round(dd); return offset; } | public static final int getNormOffset(Point p0, Point p1, Point p2){ float dd = (float)( ( (p2.x-p1.x)*(p0.y-p1.y) - (p0.x-p1.x)*(p2.y-p1.y) ) / Math.sqrt( (p2.x-p1.x)*(p2.x-p1.x) + (p2.y-p1.y)*(p2.y-p1.y) ) ); int offset = -1 * (int) Math.round(dd); return offset; } | public int getNormOffset(Point p0, Point p1, Point p2){ // p0: annotation's position // p1: edge's starting point // p2: edge's ending point dd = (float)( ( (p2.x-p1.x)*(p0.y-p1.y) - (p0.x-p1.x)*(p2.y-p1.y) ) / Math.sqrt( (p2.x-p1.x)*(p2.x-p1.x) + (p2.y-p1.y)*(p2.y-p1.y) ) ); offset = -1 * (int) Math.round(dd); //System.out.println("distance: " + d); return offset; } | 1732 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1732/74651828ffb41ff6412406677303505af1edf469/AnnotationHelper.java/clean/src/org/tigris/gef/presentation/AnnotationHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
509,
11069,
535,
2335,
12,
2148,
293,
20,
16,
4686,
293,
21,
16,
4686,
293,
22,
15329,
202,
202,
759,
293,
20,
30,
3204,
1807,
1754,
202,
282,
202,
759,
293,
21,
30,
3591,
1807,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
11069,
535,
2335,
12,
2148,
293,
20,
16,
4686,
293,
21,
16,
4686,
293,
22,
15329,
202,
202,
759,
293,
20,
30,
3204,
1807,
1754,
202,
282,
202,
759,
293,
21,
30,
3591,
1807,... |
if (modes.isWriteable()) { | if (modes.isWriteable() && output != System.out && output != System.err) { | public void close() throws IOException, BadDescriptorException { if (!isOpen()) { throw new BadDescriptorException(); } isOpen = false; if (modes.isReadable()) { input.close(); } if (modes.isWriteable()) { output.close(); } } | 47619 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47619/24fc00ac9f647542a77f440ea686cea2d209f347/IOHandlerUnseekable.java/buggy/src/org/jruby/util/IOHandlerUnseekable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1746,
1435,
1216,
1860,
16,
6107,
3187,
503,
288,
3639,
309,
16051,
291,
3678,
10756,
288,
540,
202,
12849,
394,
6107,
3187,
503,
5621,
3639,
289,
7734,
16633,
273,
629,
31,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1746,
1435,
1216,
1860,
16,
6107,
3187,
503,
288,
3639,
309,
16051,
291,
3678,
10756,
288,
540,
202,
12849,
394,
6107,
3187,
503,
5621,
3639,
289,
7734,
16633,
273,
629,
31,
36... |
output.dumpObject(RubySymbol.newSymbol(runtime, className)); | output.dumpObject(RubySymbol.newSymbol(getRuntime(), className)); | public void marshalTo(MarshalStream output) throws java.io.IOException { output.write('S'); String className = getMetaClass().getName(); if (className == null) { throw new ArgumentError(runtime, "can't dump anonymous class"); } output.dumpObject(RubySymbol.newSymbol(runtime, className)); List members = ((RubyArray) getInstanceVariable(classOf(), "__member__")).getList(); output.dumpInt(members.size()); for (int i = 0; i < members.size(); i++) { RubySymbol name = (RubySymbol) members.get(i); output.dumpObject(name); output.dumpObject(values[i]); } } | 47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyStruct.java/clean/src/org/jruby/RubyStruct.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
10893,
774,
12,
8105,
1228,
876,
13,
1216,
2252,
18,
1594,
18,
14106,
288,
3639,
876,
18,
2626,
2668,
55,
8284,
3639,
514,
2658,
273,
11312,
797,
7675,
17994,
5621,
3639,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
10893,
774,
12,
8105,
1228,
876,
13,
1216,
2252,
18,
1594,
18,
14106,
288,
3639,
876,
18,
2626,
2668,
55,
8284,
3639,
514,
2658,
273,
11312,
797,
7675,
17994,
5621,
3639,
309,
... |
public Feature getFeature() throws IOException { if (outputQueue.size() == 0) { if (segmentEnd) { segmentEnd = false; outputQueue.add(new Feature(Signal.SEGMENT_END, featureID.getNextID())); } else { Cepstrum input = predecessor.getCepstrum(); if (input == null) { return null; } else { if (input.hasContent()) { // "featureBlockSize-1" since first Cepstrum already read int numberFeatures = readCepstra(featureBlockSize - 1, input); if (numberFeatures > 0) { computeFeatures(numberFeatures); } } else if (input.getSignal().equals(Signal.SEGMENT_START)) { segmentStart = true; outputQueue.add(new Feature(input.getSignal(), featureID.getNextID())); } } } } if (outputQueue.size() > 0) { return (Feature) outputQueue.remove(0); } else { return null; } } | 8321 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8321/1543530d5450786e7ca159628ae7754c75a95409/FeatureExtractor.java/clean/sphinx4/edu/cmu/sphinx/frontend/FeatureExtractor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
225,
7881,
225,
17961,
1435,
225,
1216,
225,
1860,
225,
288,
7734,
309,
225,
261,
2844,
3183,
18,
1467,
1435,
225,
422,
225,
374,
13,
225,
288,
13491,
309,
225,
261,
9273,
1638,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
7881,
225,
17961,
1435,
225,
1216,
225,
1860,
225,
288,
7734,
309,
225,
261,
2844,
3183,
18,
1467,
1435,
225,
422,
225,
374,
13,
225,
288,
13491,
309,
225,
261,
9273,
1638,
1... | ||
prefsDialog.addPanel(faderbox); | public PatchEdit () { super("JSynthLib"); instance = this; // phil@muqus.com (so can pop-up windows with PatchEdit as the boolean loadPrefsSuccessfull,loadDriverSuccessfull; this.appConfig = new AppConfig(); prefsDialog=new PrefsDialog (this); loadPrefsSuccessfull=loadPrefs (); // Add the configuration panels to the prefsDialog prefsDialog.addPanel(new /*TODO org.jsynthlib.*/GeneralConfigPanel(appConfig)); prefsDialog.addPanel(new /*TODO org.jsynthlib.*/DirectoryConfigPanel(appConfig)); /*TODO org.jsynthlib.*/FaderBoxConfigPanel faderbox = new /*TODO org.jsynthlib.*/FaderBoxConfigPanel(appConfig); /*TODO org.jsynthlib.midi.*/MidiConfigPanel midiConfigPanel = null; try { midiConfigPanel = new /*TODO org.jsynthlib.midi.*/MidiConfigPanel(appConfig); midiConfigPanel.addDriverChangeListener(this); midiConfigPanel.addDriverChangeListener(faderbox); // Notify the faderbox, too... - emenaker 2003.03.19 prefsDialog.addPanel(midiConfigPanel); MidiIn = MidiOut = midiConfigPanel.getMidiWrapper(); } catch (Exception e) { System.err.println(e); e.printStackTrace(); } prefsDialog.addPanel(faderbox); prefsDialog.addPanel(new /*TODO org.jsynthlib.*/NoteChooserConfigPanel(appConfig)); prefsDialog.init (); //loads in the config file and sets parameters // Now lets set up how the pretty application should look int inset = 100; Dimension screenSize = Toolkit.getDefaultToolkit ().getScreenSize (); setBounds (inset, inset, screenSize.width - inset*2, screenSize.height-inset*2); //Quit this app when the big window closes. addWindowListener (new WindowAdapter () { public void windowClosing (WindowEvent e) { savePrefs (); // We shouldn't need to unload the midi driver if the whole JVM is going away. // unloadMidiDriver(); System.exit (0); } }); //Set up the GUI. desktop = new JDesktopPane (); setJMenuBar (createMenus ()); desktop.setOpaque (false); Container c=getContentPane (); c.add (desktop,BorderLayout.CENTER); desktop.putClientProperty ("JDesktopPane.dragMode", "outline"); setVisible (true); if (!loadPrefsSuccessfull) ErrorMsg.reportError ("Error", "Unable to load user preferences. Defaults loaded\n If you've just installed or just upgraded this software, this is normal."); //if (!loadDriverSuccessfull) //ErrorMsg.reportError ("Error","Unable to Initialize MIDI IN/OUT! \nMidi Transfer will be unavailable this session.\nChange the Initialization Port Settings under Preferences and restart."); //Set up a silly little dialog we can pop up for the user to gawk at while we do time consuming work later on. waitDialog=new WaitDialog (this); // Start pumping MIDI information from Input --> Output so the user can play a MIDI Keyboard and make pretty music beginEcho (); } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/8a19252880179e41617863bfe75fd833bc064a4d/PatchEdit.java/clean/JSynthLib/core/PatchEdit.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
12042,
4666,
1832,
565,
288,
3639,
2240,
2932,
6479,
878,
451,
5664,
8863,
3639,
791,
273,
333,
31,
2868,
368,
1844,
330,
36,
13297,
372,
87,
18,
832,
261,
2048,
848,
1843,
17,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12042,
4666,
1832,
565,
288,
3639,
2240,
2932,
6479,
878,
451,
5664,
8863,
3639,
791,
273,
333,
31,
2868,
368,
1844,
330,
36,
13297,
372,
87,
18,
832,
261,
2048,
848,
1843,
17,
41... | |
rb_define_method(rb_cString, "to_f", rb_str_to_f, 0); rb_define_method(rb_cString, "to_s", rb_str_to_s, 0); rb_define_method(rb_cString, "to_str", rb_str_to_s, 0); | */ stringClass.defineMethod("to_s", getMethod("m_to_s", false)); stringClass.defineMethod("to_str", getMethod("m_to_s", false)); /* | public static RubyClass createStringClass(Ruby ruby) { org.jruby.RubyClass stringClass = ruby.defineClass("String", ruby.getObjectClass()); // stringClass.includeModule(ruby.getModules().getComparable()); // stringClass.includeModule(ruby.getModules().getEnumerable()); stringClass.defineSingletonMethod("new", getSingletonMethodNew()); stringClass.defineMethod("initialize", getMethodInitialize());/* rb_define_method(rb_cString, "clone", rb_str_clone, 0); rb_define_method(rb_cString, "dup", rb_str_dup, 0); rb_define_method(rb_cString, "<=>", rb_str_cmp_m, 1); rb_define_method(rb_cString, "==", rb_str_equal, 1); rb_define_method(rb_cString, "===", rb_str_equal, 1); rb_define_method(rb_cString, "eql?", rb_str_equal, 1); rb_define_method(rb_cString, "hash", rb_str_hash_m, 0); rb_define_method(rb_cString, "+", rb_str_plus, 1); rb_define_method(rb_cString, "*", rb_str_times, 1); rb_define_method(rb_cString, "%", rb_str_format, 1); */ stringClass.defineMethod("[]", getMethodSlice()); /*rb_define_method(rb_cString, "[]=", rb_str_aset_m, -1); rb_define_method(rb_cString, "length", rb_str_length, 0); rb_define_method(rb_cString, "size", rb_str_length, 0); rb_define_method(rb_cString, "empty?", rb_str_empty, 0); rb_define_method(rb_cString, "=~", rb_str_match, 1); rb_define_method(rb_cString, "~", rb_str_match2, 0); rb_define_method(rb_cString, "succ", rb_str_succ, 0); rb_define_method(rb_cString, "succ!", rb_str_succ_bang, 0); rb_define_method(rb_cString, "next", rb_str_succ, 0); rb_define_method(rb_cString, "next!", rb_str_succ_bang, 0); rb_define_method(rb_cString, "upto", rb_str_upto_m, 1); rb_define_method(rb_cString, "index", rb_str_index_m, -1); rb_define_method(rb_cString, "rindex", rb_str_rindex, -1); rb_define_method(rb_cString, "replace", rb_str_replace_m, 1); rb_define_method(rb_cString, "to_i", rb_str_to_i, 0); rb_define_method(rb_cString, "to_f", rb_str_to_f, 0); rb_define_method(rb_cString, "to_s", rb_str_to_s, 0); rb_define_method(rb_cString, "to_str", rb_str_to_s, 0); rb_define_method(rb_cString, "inspect", rb_str_inspect, 0); rb_define_method(rb_cString, "dump", rb_str_dump, 0); rb_define_method(rb_cString, "upcase", rb_str_upcase, 0); rb_define_method(rb_cString, "downcase", rb_str_downcase, 0); rb_define_method(rb_cString, "capitalize", rb_str_capitalize, 0); rb_define_method(rb_cString, "swapcase", rb_str_swapcase, 0); rb_define_method(rb_cString, "upcase!", rb_str_upcase_bang, 0); rb_define_method(rb_cString, "downcase!", rb_str_downcase_bang, 0); rb_define_method(rb_cString, "capitalize!", rb_str_capitalize_bang, 0); rb_define_method(rb_cString, "swapcase!", rb_str_swapcase_bang, 0); rb_define_method(rb_cString, "hex", rb_str_hex, 0); rb_define_method(rb_cString, "oct", rb_str_oct, 0); rb_define_method(rb_cString, "split", rb_str_split_m, -1);*/ stringClass.defineMethod("reverse", getMethodReverse()); /*rb_define_method(rb_cString, "reverse!", rb_str_reverse_bang, 0); rb_define_method(rb_cString, "concat", rb_str_concat, 1); rb_define_method(rb_cString, "<<", rb_str_concat, 1); rb_define_method(rb_cString, "crypt", rb_str_crypt, 1); rb_define_method(rb_cString, "intern", rb_str_intern, 0); rb_define_method(rb_cString, "include?", rb_str_include, 1); rb_define_method(rb_cString, "scan", rb_str_scan, 1); rb_define_method(rb_cString, "ljust", rb_str_ljust, 1); rb_define_method(rb_cString, "rjust", rb_str_rjust, 1); rb_define_method(rb_cString, "center", rb_str_center, 1); rb_define_method(rb_cString, "sub", rb_str_sub, -1); rb_define_method(rb_cString, "gsub", rb_str_gsub, -1); rb_define_method(rb_cString, "chop", rb_str_chop, 0); rb_define_method(rb_cString, "chomp", rb_str_chomp, -1); rb_define_method(rb_cString, "strip", rb_str_strip, 0); rb_define_method(rb_cString, "sub!", rb_str_sub_bang, -1); rb_define_method(rb_cString, "gsub!", rb_str_gsub_bang, -1); rb_define_method(rb_cString, "strip!", rb_str_strip_bang, 0); rb_define_method(rb_cString, "chop!", rb_str_chop_bang, 0); rb_define_method(rb_cString, "chomp!", rb_str_chomp_bang, -1); rb_define_method(rb_cString, "tr", rb_str_tr, 2); rb_define_method(rb_cString, "tr_s", rb_str_tr_s, 2); rb_define_method(rb_cString, "delete", rb_str_delete, -1); rb_define_method(rb_cString, "squeeze", rb_str_squeeze, -1); rb_define_method(rb_cString, "count", rb_str_count, -1); rb_define_method(rb_cString, "tr!", rb_str_tr_bang, 2); rb_define_method(rb_cString, "tr_s!", rb_str_tr_s_bang, 2); rb_define_method(rb_cString, "delete!", rb_str_delete_bang, -1); rb_define_method(rb_cString, "squeeze!", rb_str_squeeze_bang, -1); rb_define_method(rb_cString, "each_line", rb_str_each_line, -1); rb_define_method(rb_cString, "each", rb_str_each_line, -1); rb_define_method(rb_cString, "each_byte", rb_str_each_byte, 0); rb_define_method(rb_cString, "sum", rb_str_sum, -1); rb_define_global_function("sub", rb_f_sub, -1); rb_define_global_function("gsub", rb_f_gsub, -1); rb_define_global_function("sub!", rb_f_sub_bang, -1); rb_define_global_function("gsub!", rb_f_gsub_bang, -1); rb_define_global_function("chop", rb_f_chop, 0); rb_define_global_function("chop!", rb_f_chop_bang, 0); rb_define_global_function("chomp", rb_f_chomp, -1); rb_define_global_function("chomp!", rb_f_chomp_bang, -1); rb_define_global_function("split", rb_f_split, -1); rb_define_global_function("scan", rb_f_scan, 1);*/ stringClass.defineMethod("slice", getMethodSlice()); /*rb_define_method(rb_cString, "slice!", rb_str_slice_bang, -1); id_to_s = rb_intern("to_s"); rb_fs = Qnil; rb_define_hooked_variable("$;", &rb_fs, 0, rb_str_setter); rb_define_hooked_variable("$-F", &rb_fs, 0, rb_str_setter);*/ return stringClass; } | 46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RbString.java/buggy/org/jruby/core/RbString.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
752,
780,
797,
12,
54,
10340,
22155,
13,
288,
3639,
2358,
18,
78,
27768,
18,
54,
10340,
797,
533,
797,
273,
22155,
18,
11255,
797,
2932,
780,
3113,
22155,
18,
588... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
752,
780,
797,
12,
54,
10340,
22155,
13,
288,
3639,
2358,
18,
78,
27768,
18,
54,
10340,
797,
533,
797,
273,
22155,
18,
11255,
797,
2932,
780,
3113,
22155,
18,
588... |
if( fileName.toUpperCase().endsWith(".XSD")) | if ( fileName.toUpperCase( ).endsWith( ".XSD" ) ) | public static ATreeNode getSchemaTree( String fileName ) throws OdaException { if( fileName.toUpperCase().endsWith(".XSD")) return XSDFileSchemaTreePopulator.getSchemaTree( fileName ); else return new XMLFileSchemaTreePopulator().getSchemaTree( fileName ); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/145a679d5a271527073531183c90d5bb2a955ab0/SchemaPopulationUtil.java/buggy/data/org.eclipse.birt.report.data.oda.xml/src/org/eclipse/birt/report/data/oda/xml/util/ui/SchemaPopulationUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
432,
12513,
11088,
2471,
12,
514,
3968,
262,
1082,
202,
15069,
531,
2414,
503,
202,
95,
202,
202,
430,
12,
3968,
18,
869,
8915,
7675,
5839,
1190,
2932,
18,
31244,
6,
3719... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
432,
12513,
11088,
2471,
12,
514,
3968,
262,
1082,
202,
15069,
531,
2414,
503,
202,
95,
202,
202,
430,
12,
3968,
18,
869,
8915,
7675,
5839,
1190,
2932,
18,
31244,
6,
3719... |
layoutBlock( xs, cm, p.getBounds( ), p.getInsets( ), cbl, rtc ); | layoutBlock( xs, cm, pl.getBounds( ), pl.getInsets( ), cbl, rtc ); | private void doLayout_tmp( IDisplayServer xs, Chart cm, Bounds boFull, RunTimeContext rtc ) throws ChartException { final boolean isRightToLeft = rtc.isRightToLeft( ); Block bl = cm.getBlock( ); bl.setBounds( boFull ); Insets ins = bl.getInsets( ); Bounds bo = boFull.adjustedInstance( ins ); Legend lg = cm.getLegend( ); Plot p = cm.getPlot( ); TitleBlock tb = cm.getTitle( ); Size szTitle = ( !tb.isVisible( ) ) ? SizeImpl.create( 0, 0 ) : tb.getPreferredSize( xs, cm, rtc ); Bounds boPlot = p.getBounds( ); Bounds boLegend = lg.getBounds( ); // Layout title in North Anchor by default. Bounds boTitle = tb.getBounds( ); Anchor titleAnchor = tb.getAnchor( ); boTitle.setLeft( bo.getLeft( ) ); boTitle.setWidth( bo.getWidth( ) ); boTitle.setTop( bo.getTop( ) ); boTitle.setHeight( szTitle.getHeight( ) ); Size szLegend = ( !lg.isVisible( ) ) ? SizeImpl.create( 0, 0 ) : lg.getPreferredSize( xs, cm, rtc ); if ( !lg.isSetPosition( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, Messages.getString( "error.legend.position", //$NON-NLS-1$ ULocale.getDefault( ) ) ); } double plotWidthHint = -1, plotHeightHint = -1; if ( p.isSetWidthHint( ) ) { plotWidthHint = p.getWidthHint( ); } if ( p.isSetHeightHint( ) ) { plotHeightHint = p.getHeightHint( ); } double plotLeft, plotTop; // SETUP THE POSITION OF THE LEGEND AND THE PLOT Position po = lg.getPosition( ); // swap right/left if ( isRightToLeft ) { if ( po == Position.RIGHT_LITERAL ) { po = Position.LEFT_LITERAL; } else if ( po == Position.LEFT_LITERAL ) { po = Position.RIGHT_LITERAL; } } // restrict lenged size to 1/3 of the total block size. // TODO use better layout solution final double renderLegendHeight = szLegend.getHeight( ); final double renderLegendWidth = szLegend.getWidth( ); switch ( po.getValue( ) ) { case Position.ABOVE : case Position.BELOW : // restrict height if ( szLegend.getHeight( ) > bo.getHeight( ) / 3 ) { szLegend.setHeight( bo.getHeight( ) / 3 ); } break; case Position.LEFT : case Position.RIGHT : case Position.OUTSIDE : // restrict width if ( szLegend.getWidth( ) > bo.getWidth( ) / 3 ) { szLegend.setWidth( bo.getWidth( ) / 3 ); } break; default : // ignore other cases break; } Anchor anchor = p.getAnchor( ); // swap west/east if ( isRightToLeft ) { switch ( anchor.getValue( ) ) { case Anchor.EAST : anchor = Anchor.WEST_LITERAL; break; case Anchor.NORTH_EAST : anchor = Anchor.NORTH_WEST_LITERAL; break; case Anchor.SOUTH_EAST : anchor = Anchor.SOUTH_WEST_LITERAL; break; case Anchor.WEST : anchor = Anchor.EAST_LITERAL; break; case Anchor.NORTH_WEST : anchor = Anchor.NORTH_EAST_LITERAL; break; case Anchor.SOUTH_WEST : anchor = Anchor.SOUTH_EAST_LITERAL; break; } } switch ( po.getValue( ) ) { case Position.INSIDE : boPlot.setWidth( plotWidthHint < 0 ? bo.getWidth( ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - szTitle.getHeight( ) ) : plotHeightHint ); switch ( titleAnchor.getValue( ) ) { case Anchor.EAST : case Anchor.WEST : boPlot.setWidth( plotWidthHint < 0 ? ( bo.getWidth( ) - szTitle.getWidth( ) ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? bo.getHeight( ) : plotHeightHint ); boTitle.setHeight( bo.getHeight( ) ); boTitle.setWidth( szTitle.getWidth( ) ); break; case Anchor.SOUTH : case Anchor.SOUTH_EAST : case Anchor.SOUTH_WEST : boTitle.setTop( bo.getTop( ) + bo.getHeight( ) - szTitle.getHeight( ) ); break; } plotLeft = bo.getLeft( ); plotTop = bo.getTop( ); switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : plotLeft = bo.getLeft( ) + szTitle.getWidth( ); break; case Anchor.EAST : boTitle.setLeft( bo.getLeft( ) + bo.getWidth( ) - szTitle.getWidth( ) ); break; case Anchor.NORTH : case Anchor.NORTH_EAST : case Anchor.NORTH_WEST : plotTop = bo.getTop( ) + szTitle.getHeight( ); break; } // adjust left. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - szTitle.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - szTitle.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; } // adjust top. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; } boPlot.setLeft( plotLeft ); boPlot.setTop( plotTop ); boLegend.set( 0, 0, szLegend.getWidth( ), szLegend.getHeight( ) ); break; case Position.RIGHT : case Position.OUTSIDE : boLegend.setWidth( szLegend.getWidth( ) ); boLegend.setHeight( bo.getHeight( ) - szTitle.getHeight( ) ); boPlot.setWidth( plotWidthHint < 0 ? ( bo.getWidth( ) - boLegend.getWidth( ) ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - szTitle.getHeight( ) ) : plotHeightHint ); switch ( titleAnchor.getValue( ) ) { case Anchor.EAST : case Anchor.WEST : boPlot.setWidth( plotWidthHint < 0 ? ( bo.getWidth( ) - boLegend.getWidth( ) - szTitle.getWidth( ) ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? bo.getHeight( ) : plotHeightHint ); boTitle.setHeight( bo.getHeight( ) ); boTitle.setWidth( szTitle.getWidth( ) ); boLegend.setHeight( bo.getHeight( ) ); break; case Anchor.SOUTH : case Anchor.SOUTH_EAST : case Anchor.SOUTH_WEST : boTitle.setTop( bo.getTop( ) + bo.getHeight( ) - szTitle.getHeight( ) ); break; } boLegend.setTop( bo.getTop( ) ); boLegend.setLeft( bo.getLeft( ) + bo.getWidth( ) - szLegend.getWidth( ) ); plotLeft = bo.getLeft( ); plotTop = bo.getTop( ); switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : plotLeft = bo.getLeft( ) + szTitle.getWidth( ); break; case Anchor.EAST : boTitle.setLeft( bo.getLeft( ) + bo.getWidth( ) - szTitle.getWidth( ) ); boLegend.setLeft( boTitle.getLeft( ) - szLegend.getWidth( ) ); break; case Anchor.NORTH : case Anchor.NORTH_EAST : case Anchor.NORTH_WEST : plotTop = bo.getTop( ) + szTitle.getHeight( ); boLegend.setTop( bo.getTop( ) + szTitle.getHeight( ) ); break; } // adjust left. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - szTitle.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - szTitle.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; } // adjust top. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; } boPlot.setLeft( plotLeft ); boPlot.setTop( plotTop ); break; case Position.LEFT : boLegend.setWidth( renderLegendWidth ); boLegend.setHeight( bo.getHeight( ) - szTitle.getHeight( ) ); boPlot.setWidth( plotWidthHint < 0 ? ( bo.getWidth( ) - boLegend.getWidth( ) ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - szTitle.getHeight( ) ) : plotHeightHint ); switch ( titleAnchor.getValue( ) ) { case Anchor.EAST : case Anchor.WEST : boPlot.setWidth( plotWidthHint < 0 ? ( bo.getWidth( ) - boLegend.getWidth( ) - szTitle.getWidth( ) ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? bo.getHeight( ) : plotHeightHint ); boTitle.setHeight( bo.getHeight( ) ); boTitle.setWidth( szTitle.getWidth( ) ); boLegend.setHeight( bo.getHeight( ) ); break; case Anchor.SOUTH : case Anchor.SOUTH_EAST : case Anchor.SOUTH_WEST : boTitle.setTop( bo.getTop( ) + bo.getHeight( ) - szTitle.getHeight( ) ); break; } boLegend.setTop( bo.getTop( ) ); boLegend.setLeft( bo.getLeft( ) + szLegend.getWidth( ) - renderLegendWidth ); plotLeft = bo.getLeft( ) + szLegend.getWidth( ); plotTop = bo.getTop( ); switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : boLegend.setLeft( bo.getLeft( ) + szTitle.getWidth( ) + szLegend.getWidth( ) - renderLegendWidth ); plotLeft = bo.getLeft( ) + szTitle.getWidth( ) + szLegend.getWidth( ); break; case Anchor.EAST : boTitle.setLeft( bo.getLeft( ) + bo.getWidth( ) - szTitle.getWidth( ) ); break; case Anchor.NORTH : case Anchor.NORTH_EAST : case Anchor.NORTH_WEST : plotTop = bo.getTop( ) + szTitle.getHeight( ); boLegend.setTop( bo.getTop( ) + szTitle.getHeight( ) ); break; } // adjust left. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - szTitle.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - szTitle.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; } // adjust top. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; } boPlot.setLeft( plotLeft ); boPlot.setTop( plotTop ); break; case Position.ABOVE : boLegend.setWidth( bo.getWidth( ) ); boLegend.setHeight( renderLegendHeight ); boPlot.setWidth( plotWidthHint < 0 ? bo.getWidth( ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - szTitle.getHeight( ) - szLegend.getHeight( ) ) : plotHeightHint ); switch ( titleAnchor.getValue( ) ) { case Anchor.EAST : case Anchor.WEST : boPlot.setWidth( plotWidthHint < 0 ? ( bo.getWidth( ) - szTitle.getWidth( ) ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - boLegend.getHeight( ) ) : plotHeightHint ); boTitle.setHeight( bo.getHeight( ) ); boTitle.setWidth( szTitle.getWidth( ) ); boLegend.setWidth( bo.getWidth( ) - szTitle.getWidth( ) ); break; case Anchor.SOUTH : case Anchor.SOUTH_EAST : case Anchor.SOUTH_WEST : boTitle.setTop( bo.getTop( ) + bo.getHeight( ) - szTitle.getHeight( ) ); break; } boLegend.setTop( bo.getTop( ) + szLegend.getHeight( ) - renderLegendHeight ); boLegend.setLeft( bo.getLeft( ) ); plotLeft = bo.getLeft( ); plotTop = bo.getTop( ) + szLegend.getHeight( ); switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : boLegend.setLeft( bo.getLeft( ) + szTitle.getWidth( ) ); plotLeft = bo.getLeft( ) + szTitle.getWidth( ); break; case Anchor.EAST : boTitle.setLeft( bo.getLeft( ) + bo.getWidth( ) - szTitle.getWidth( ) ); break; case Anchor.NORTH : case Anchor.NORTH_EAST : case Anchor.NORTH_WEST : plotTop = bo.getTop( ) + szLegend.getHeight( ) + szTitle.getHeight( ); boLegend.setTop( bo.getTop( ) + szTitle.getHeight( ) + szLegend.getHeight( ) - renderLegendHeight ); break; } // adjust left. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - szTitle.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - szTitle.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; } // adjust top. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - szTitle.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - szTitle.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; } boPlot.setLeft( plotLeft ); boPlot.setTop( plotTop ); break; case Position.BELOW : boLegend.setWidth( bo.getWidth( ) ); boLegend.setHeight( szLegend.getHeight( ) ); boPlot.setWidth( plotWidthHint < 0 ? bo.getWidth( ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - boTitle.getHeight( ) - boLegend.getHeight( ) ) : plotHeightHint ); switch ( titleAnchor.getValue( ) ) { case Anchor.EAST : case Anchor.WEST : boPlot.setWidth( plotWidthHint < 0 ? ( bo.getWidth( ) - szTitle.getWidth( ) ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - boLegend.getHeight( ) ) : plotHeightHint ); boTitle.setHeight( bo.getHeight( ) ); boTitle.setWidth( szTitle.getWidth( ) ); boLegend.setWidth( bo.getWidth( ) - szTitle.getWidth( ) ); break; case Anchor.SOUTH : case Anchor.SOUTH_EAST : case Anchor.SOUTH_WEST : boTitle.setTop( bo.getTop( ) + bo.getHeight( ) - szTitle.getHeight( ) ); break; } boLegend.setTop( bo.getTop( ) + bo.getHeight( ) - szLegend.getHeight( ) ); boLegend.setLeft( bo.getLeft( ) ); plotLeft = bo.getLeft( ); plotTop = bo.getTop( ); switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : boLegend.setLeft( bo.getLeft( ) + szTitle.getWidth( ) ); plotLeft = bo.getLeft( ) + szTitle.getWidth( ); break; case Anchor.EAST : boTitle.setLeft( bo.getLeft( ) + bo.getWidth( ) - szTitle.getWidth( ) ); break; case Anchor.NORTH : case Anchor.NORTH_EAST : case Anchor.NORTH_WEST : plotTop = bo.getTop( ) + szTitle.getHeight( ); break; case Anchor.SOUTH : case Anchor.SOUTH_EAST : case Anchor.SOUTH_WEST : boLegend.setTop( boTitle.getTop( ) - szLegend.getHeight( ) ); break; } // adjust left. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - szTitle.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - szTitle.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; } // adjust top. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - szTitle.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - szTitle.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; } boPlot.setLeft( plotLeft ); boPlot.setTop( plotTop ); break; } // layout custom blocks. for ( Iterator itr = bl.getChildren( ).iterator( ); itr.hasNext( ); ) { Block cbl = (Block) itr.next( ); if ( cbl != lg && cbl != p && cbl != tb ) { layoutBlock( xs, cm, bl.getBounds( ), bl.getInsets( ), cbl, rtc ); } } // layout custom legend blocks. for ( Iterator itr = lg.getChildren( ).iterator( ); itr.hasNext( ); ) { Block cbl = (Block) itr.next( ); layoutBlock( xs, cm, lg.getBounds( ), lg.getInsets( ), cbl, rtc ); } // layout custom title blocks. for ( Iterator itr = tb.getChildren( ).iterator( ); itr.hasNext( ); ) { Block cbl = (Block) itr.next( ); layoutBlock( xs, cm, tb.getBounds( ), tb.getInsets( ), cbl, rtc ); } // layout custom plot blocks. for ( Iterator itr = p.getChildren( ).iterator( ); itr.hasNext( ); ) { Block cbl = (Block) itr.next( ); layoutBlock( xs, cm, p.getBounds( ), p.getInsets( ), cbl, rtc ); } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/bdbe857d641e2e27600409e7bb20f1950ed1536b/LayoutManager.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/internal/layout/LayoutManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
741,
3744,
67,
5645,
12,
1599,
291,
1601,
2081,
9280,
16,
14804,
5003,
16,
20382,
800,
5080,
16,
1082,
202,
1997,
950,
1042,
436,
5111,
262,
1216,
14804,
503,
202,
95,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
741,
3744,
67,
5645,
12,
1599,
291,
1601,
2081,
9280,
16,
14804,
5003,
16,
20382,
800,
5080,
16,
1082,
202,
1997,
950,
1042,
436,
5111,
262,
1216,
14804,
503,
202,
95,
2... |
if (_dtd == null) _dtd = new DTDMonitor(); | public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException { // Create new contained for unparsed entities if (_dtd == null) _dtd = new DTDMonitor(); _dtd.unparsedEntityDecl(name, publicId, systemId, notationName); } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/b5ae7f28ec2079614308680de6424fe233f827dc/TransformerHandlerImpl.java/buggy/src/org/apache/xalan/xsltc/trax/TransformerHandlerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
27810,
1943,
3456,
12,
780,
508,
16,
514,
1071,
548,
16,
6862,
282,
514,
30083,
16,
514,
12155,
461,
13,
202,
15069,
14366,
377,
288,
202,
759,
1788,
394,
7542,
364,
27810,
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,
377,
1071,
918,
27810,
1943,
3456,
12,
780,
508,
16,
514,
1071,
548,
16,
6862,
282,
514,
30083,
16,
514,
12155,
461,
13,
202,
15069,
14366,
377,
288,
202,
759,
1788,
394,
7542,
364,
27810,
5... | |
public BadPaddingException(String msg) { super(msg); | public BadPaddingException() { super(); | public BadPaddingException(String msg) { super(msg); } | 13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/3634d4d94b208431471fe506f413f97d460c7602/BadPaddingException.java/buggy/security/jss/org/mozilla/jss/crypto/BadPaddingException.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6107,
9485,
503,
12,
780,
1234,
13,
288,
3639,
2240,
12,
3576,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6107,
9485,
503,
12,
780,
1234,
13,
288,
3639,
2240,
12,
3576,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
this.me.stopProtocol(this); | this.jimmy_.stopProtocol(this); | public boolean tlvDecode(ICQTlv t){ switch(t.getType()){ case 0: break; case 1: break; case 2: break; case 3: break; case 4: break; case 5: System.out.println("Got Cookie"); this.bos = new String(t.getContent()); this.cookie = this.response.getTlv(2).getContent(); break; case 6: break; case 7: break; case 8: System.out.print("Error: "); switch(Utils.bytesToInt(t.getContent(),true)){ case 0x1E: System.out.println("Incorrect uin &/or password"); this.me.stopProtocol(this); break; } //Drops auth error message break; default: break; } return true; } | 56431 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56431/074ac828d109cf303158742492d96658346a515c/ICQProtocol.java/buggy/trunk/jimmy/icq/ICQProtocol.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
268,
3070,
6615,
12,
2871,
53,
56,
3070,
268,
15329,
9506,
202,
9610,
12,
88,
18,
588,
559,
10756,
95,
202,
202,
3593,
202,
374,
30,
1082,
202,
8820,
31,
202,
202,
359... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
268,
3070,
6615,
12,
2871,
53,
56,
3070,
268,
15329,
9506,
202,
9610,
12,
88,
18,
588,
559,
10756,
95,
202,
202,
3593,
202,
374,
30,
1082,
202,
8820,
31,
202,
202,
359... |
return Character.isLetterOrDigit(ch) || ch == '_'; | return Character.isLetterOrDigit(ch) || ch == '_'; | public static final boolean isIdentChar(char ch) { return Character.isLetterOrDigit(ch) || ch == '_'; } | 47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyId.java/clean/org/jruby/RubyId.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
727,
1250,
353,
6106,
2156,
12,
3001,
462,
13,
288,
202,
2463,
6577,
18,
291,
13938,
1162,
10907,
12,
343,
13,
747,
462,
422,
4427,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
727,
1250,
353,
6106,
2156,
12,
3001,
462,
13,
288,
202,
2463,
6577,
18,
291,
13938,
1162,
10907,
12,
343,
13,
747,
462,
422,
4427,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
... |
return configElement; } | return configElement; } | public IConfigurationElement getConfigElement() { return configElement; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/78fbd411aa8150e2bef41f7938bc2fc29c4fe55d/PerspectiveDescriptor.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
1750,
1046,
4367,
1046,
1435,
288,
3639,
327,
642,
1046,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
1750,
1046,
4367,
1046,
1435,
288,
3639,
327,
642,
1046,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Callback s_new = new ReflectionCallbackMethod(RubyTime.class, "s_new", false, true); | Callback s_new = CallbackFactory.getSingletonMethod(RubyTime.class, "s_new"); | public static RubyClass createTimeClass(Ruby ruby) { RubyClass timeClass = ruby.defineClass("Time", ruby.getClasses().getObjectClass()); Callback s_new = new ReflectionCallbackMethod(RubyTime.class, "s_new", false, true); timeClass.defineSingletonMethod("new", s_new); timeClass.defineSingletonMethod("now", s_new); timeClass.defineMethod("-", CallbackFactory.getMethod(RubyTime.class, "op_minus", RubyObject.class)); timeClass.defineMethod("to_s", CallbackFactory.getMethod(RubyTime.class, "to_s")); timeClass.defineMethod("inspect", CallbackFactory.getMethod(RubyTime.class, "to_s")); return timeClass; } | 48300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48300/6076c5ab87d25a488469aa1a32f1d2c9c9e470b2/RubyTime.java/clean/org/jruby/RubyTime.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
752,
950,
797,
12,
54,
10340,
22155,
13,
288,
3639,
19817,
797,
813,
797,
273,
22155,
18,
11255,
797,
2932,
950,
3113,
22155,
18,
588,
4818,
7675,
588,
921,
797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
752,
950,
797,
12,
54,
10340,
22155,
13,
288,
3639,
19817,
797,
813,
797,
273,
22155,
18,
11255,
797,
2932,
950,
3113,
22155,
18,
588,
4818,
7675,
588,
921,
797,
... |
existingPlatformValue.getId(), | existingPlatform.getId(), | public void visitPlatform ( AIPlatform aiplatform, AuthzSubjectValue subject, Log log, PlatformManagerLocal pmLocal, ConfigManagerLocal configMgr, CPropManagerLocal cpropMgr, List createdResources ) throws AIQApprovalException, PermissionException { Integer id = aiplatform.getId(); log.info("(approve) visiting platform: " + id + " fqdn=" + aiplatform.getFqdn()); // Clear out previous platform existingPlatformValue = null; AIPlatformValue aiplatformValue = aiplatform.getAIPlatformValue(); PlatformValue existingPlatform; PlatformValue newPlatformValue; AppdefEntityID appdefEntityId; int qstat = aiplatform.getQueueStatus(); switch (qstat) { case AIQueueConstants.Q_STATUS_PLACEHOLDER: // We don't approve placeholders. Just let them sit // in the queue. break; case AIQueueConstants.Q_STATUS_ADDED: // This platform exists in the queue but not in appdef, // so add it to appdef. // Before we add it, make sure it's not already there... existingPlatform = getExistingPlatformValue(subject, pmLocal, aiplatformValue); if ( existingPlatform != null ) { appdefEntityId = new AppdefEntityID(AppdefEntityConstants.APPDEF_TYPE_AIPLATFORM, id); log.error("Platform already added: platformid=" + existingPlatform.getId() + ", " + "cannot approve AIPlatform " + id); throw new AIQApprovalException(appdefEntityId, AIQApprovalException.ERR_ADDED_TO_APPDEF); } // Add the AI platform to appdef log.info("AIQ: calling to platform LH to create..."); try { Integer pk = pmLocal.createPlatform(subject, aiplatformValue); try { newPlatformValue = pmLocal.getPlatformById(subject, pk); appdefEntityId = new AppdefEntityID( AppdefEntityConstants.APPDEF_TYPE_PLATFORM, newPlatformValue.getId()); } catch (PlatformNotFoundException e) { throw new SystemException("Could not find the platform we just " + " created: " + pk); } setCustomProperties(log, aiplatform, newPlatformValue, cpropMgr); createdResources.add(appdefEntityId); } catch (PermissionException e) { throw e; } catch (ValidationException e) { throw new SystemException("Error creating platform from AI data.", e); } catch (ApplicationException e) { appdefEntityId = new AppdefEntityID(AppdefEntityConstants.APPDEF_TYPE_AIPLATFORM, id); throw new AIQApprovalException(appdefEntityId, e.getMessage()); } // catch create exception if duplicate AI platform gets imported // at the same time. If we find that there are other cases, // which causes the create exception, then we have to look at more // details. catch ( CreateException e ) { // check if this create exception is caused by an existing platform. existingPlatform = getExistingPlatformValue(subject, pmLocal, aiplatformValue); if ( existingPlatform != null ) { appdefEntityId = new AppdefEntityID(AppdefEntityConstants.APPDEF_TYPE_AIPLATFORM, id); log.error("Platform already added: platformid=" + existingPlatform.getId() + ", " + "cannot approve AIPlatform " + id); throw new AIQApprovalException(appdefEntityId, AIQApprovalException.ERR_ADDED_TO_APPDEF); } else { throw new SystemException("Error creating platform from " + "AI data.", e); } } if (aiplatformValue.isPlatformDevice()) { try { AIConversionUtil.configurePlatform(subject, log, existingPlatformValue.getId(), aiplatform.getProductConfig(), aiplatform.getMeasurementConfig(), aiplatform.getControlConfig(), null, true, configMgr); } catch (Exception e) { log.warn("Error configuring platform: " + e, e); } } log.info("AIQ: created platform (" + aiplatformValue.getId() + "): " + aiplatformValue); break; case AIQueueConstants.Q_STATUS_CHANGED: // This platform exists in the queue and in appdef. // We wish to sync the appdef attributes to match // the queue. // Check to make sure the platform is still in appdef. // Update existing platform attributes. log.info("AIQ: updating appdef platform..."); try { pmLocal.updateWithAI(aiplatformValue, subject.getName()); } catch (PlatformNotFoundException e) { // If it has been removed, that's an error. appdefEntityId = new AppdefEntityID( AppdefEntityConstants.APPDEF_TYPE_AIPLATFORM, id); log.error("Platform removed from appdef, " + "cannot approve AIPlatform " + id); throw new AIQApprovalException(appdefEntityId, AIQApprovalException.ERR_REMOVED_FROM_APPDEF); } catch ( Exception e ) { throw new SystemException("Error updating platform using " + "AI data.", e); } existingPlatform = getExistingPlatformValue(subject, pmLocal, aiplatformValue); setCustomProperties(log, aiplatform, existingPlatform, cpropMgr); if (aiplatformValue.isPlatformDevice()) { try { AIConversionUtil.configurePlatform(subject, log, existingPlatformValue.getId(), aiplatform.getProductConfig(), aiplatform.getMeasurementConfig(), aiplatform.getControlConfig(), null, true, configMgr); } catch (Exception e) { log.warn("Error configuring platform: " + e, e); } } log.info("AIQ: appdef platform updated."); break; case AIQueueConstants.Q_STATUS_REMOVED: // This platform has been removed (in other words, AI no longer // detects it) however it is still present in the appdef model. // We wish to remove the appdef platform. // If the platform has already been removed, do nothing. existingPlatform = getExistingPlatformValue(subject, pmLocal, aiplatformValue); if ( existingPlatform == null ) { log.warn("Platform has already been removed, cannot " + "remove aiplatform=" + id); return; } // Remove the platform, the 'true' here mean a // deep/recursive removal. try { pmLocal.removePlatform(subject, existingPlatform.getId(), true); } catch ( PermissionException e ) { throw e; } catch ( Exception e ) { throw new SystemException("Error removing platform using " + "AI data.", e); } break; default: log.error("Unknown queue state: " + qstat); throw new SystemException("Unknown queue state: " + qstat); } } | 52591 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52591/2ea002db9a39d87298688a383be6dd90e8782fe5/AIQRV_approve.java/buggy/src/org/hyperic/hq/appdef/server/session/AIQRV_approve.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
8201,
261,
432,
45,
8201,
14679,
9898,
16,
27573,
3123,
94,
6638,
620,
3221,
16,
4766,
1827,
613,
16,
4766,
11810,
1318,
2042,
7430,
2042,
16,
27573,
1903,
1318,
2042,
64... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3757,
8201,
261,
432,
45,
8201,
14679,
9898,
16,
27573,
3123,
94,
6638,
620,
3221,
16,
4766,
1827,
613,
16,
4766,
11810,
1318,
2042,
7430,
2042,
16,
27573,
1903,
1318,
2042,
64... |
if (focusControl == proposalTable || focusControl == control || scrollbarClicked) | if (focusControl == proposalTable || scrollbarClicked) | public void handleEvent(final Event e) { // If focus is leaving an important widget if (e.type == SWT.FocusOut) { scrollbarClicked = false; // Ignore this event if it's only happening because focus // is moving between the popup shell, control, or scrollbar. // Do this in an async since the focus is not actually switched // when this event is received. e.display.asyncExec(new Runnable() { public void run() { if (proposalTable == null || proposalTable.isDisposed()) return; Control focusControl = e.display.getFocusControl(); if (focusControl == proposalTable || focusControl == control || scrollbarClicked) return; close(); } }); return; } // Scroll bar has been clicked. Remember this for focus event processing. if (e.type == SWT.Selection) { scrollbarClicked = true; return; } // If the shell is deactivating, we should close unless this shell is the // reason why. if (e.type == SWT.Deactivate) { e.display.asyncExec(new Runnable() { public void run() { if (proposalTable == null || proposalTable.isDisposed()) return; Control focusControl = e.display.getFocusControl(); if (focusControl == proposalTable || focusControl == control || scrollbarClicked) return; close(); } }); return; } // For all other events, merely getting them dictates closure. if (e.widget == control.getShell()) close(); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/e86767bca90c6512253f517086ea9c4cc5f088bd/ContentProposalAdapter.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposalAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1640,
1133,
12,
6385,
2587,
425,
13,
288,
9506,
202,
759,
971,
7155,
353,
15086,
392,
10802,
3604,
9506,
202,
430,
261,
73,
18,
723,
422,
348,
8588,
18,
9233,
1182,
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,
1875,
202,
482,
918,
1640,
1133,
12,
6385,
2587,
425,
13,
288,
9506,
202,
759,
971,
7155,
353,
15086,
392,
10802,
3604,
9506,
202,
430,
261,
73,
18,
723,
422,
348,
8588,
18,
9233,
1182,
13,
... |
} | } | private void initializePlugins() { for (Iterator i = plugins.values().iterator(); i.hasNext();) { Object plugin = i.next(); if(plugin instanceof ApplicationContextAware) { ((ApplicationContextAware)plugin).setApplicationContext(applicationContext); } } } | 26970 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/26970/9a48c67ca976a6eec32ecffd53cc3161656dc01a/DefaultGrailsPluginManager.java/buggy/src/commons/org/codehaus/groovy/grails/plugins/DefaultGrailsPluginManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
4046,
9461,
1435,
288,
202,
202,
1884,
261,
3198,
277,
273,
4799,
18,
2372,
7675,
9838,
5621,
277,
18,
5332,
2134,
5621,
13,
288,
1082,
202,
921,
1909,
273,
277,
18,
428... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4046,
9461,
1435,
288,
202,
202,
1884,
261,
3198,
277,
273,
4799,
18,
2372,
7675,
9838,
5621,
277,
18,
5332,
2134,
5621,
13,
288,
1082,
202,
921,
1909,
273,
277,
18,
428... |
fieldPointcuts[i].getExpression(), fieldPointcuts[i]); | callerSidePointcuts[i].getExpression(), callerSidePointcuts[i]); | public void addCallerSidePointcuts(final CallerSidePointcut[] fieldPointcuts) { synchronized (m_callerSidePointcuts) { for (int i = 0; i < fieldPointcuts.length; i++) { m_callerSidePointcuts.put( fieldPointcuts[i].getExpression(), fieldPointcuts[i]); } } } | 7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/c0ad9fd621e3e04228079c4d3161cf221ca08acb/Aspect.java/buggy/aspectwerkz/src/main/org/codehaus/aspectwerkz/Aspect.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
11095,
8895,
2148,
5150,
87,
12,
6385,
20646,
8895,
2148,
5150,
8526,
652,
2148,
5150,
87,
13,
288,
3639,
3852,
261,
81,
67,
16140,
8895,
2148,
5150,
87,
13,
288,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
11095,
8895,
2148,
5150,
87,
12,
6385,
20646,
8895,
2148,
5150,
8526,
652,
2148,
5150,
87,
13,
288,
3639,
3852,
261,
81,
67,
16140,
8895,
2148,
5150,
87,
13,
288,
5411,
... |
evaluateReader(cx, scope, in, filename, 1, securityDomain); | evaluateScript(cx, scope, in, null, filename, 1, securityDomain); | static void processFileSecure(Context cx, Scriptable scope, String filename, Object securityDomain) { Reader in = null; // Try filename first as URL try { URL url = new URL(filename); InputStream is = url.openStream(); in = new BufferedReader(new InputStreamReader(is)); } catch (MalformedURLException mfex) { // fall through to try it as a file in = null; } catch (IOException ioex) { Context.reportError(ToolErrorReporter.getMessage( "msg.couldnt.open.url", filename, ioex.toString())); exitCode = EXITCODE_FILE_NOT_FOUND; return; } if (in == null) { // Try filename as file try { in = new PushbackReader(new FileReader(filename)); int c = in.read(); // Support the executable script #! syntax: If // the first line begins with a '#', treat the whole // line as a comment. if (c == '#') { while ((c = in.read()) != -1) { if (c == '\n' || c == '\r') break; } ((PushbackReader) in).unread(c); } else { // No '#' line, just reopen the file and forget it // ever happened. OPT closing and reopening // undoubtedly carries some cost. Is this faster // or slower than leaving the PushbackReader // around? in.close(); in = new FileReader(filename); } filename = new java.io.File(filename).getCanonicalPath(); } catch (FileNotFoundException ex) { Context.reportError(ToolErrorReporter.getMessage( "msg.couldnt.open", filename)); exitCode = EXITCODE_FILE_NOT_FOUND; return; } catch (IOException ioe) { global.getErr().println(ioe.toString()); } } // Here we evalute the entire contents of the file as // a script. Text is printed only if the print() function // is called. evaluateReader(cx, scope, in, filename, 1, securityDomain); } | 19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/ddfb9f0bb7279a9ff4f16a972c23b88fc6e367a4/Main.java/clean/toolsrc/org/mozilla/javascript/tools/shell/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
918,
1207,
812,
12834,
12,
1042,
9494,
16,
22780,
2146,
16,
21394,
514,
1544,
16,
1033,
4373,
3748,
13,
565,
288,
3639,
5393,
316,
273,
446,
31,
3639,
368,
6161,
1544,
1122,
487,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
918,
1207,
812,
12834,
12,
1042,
9494,
16,
22780,
2146,
16,
21394,
514,
1544,
16,
1033,
4373,
3748,
13,
565,
288,
3639,
5393,
316,
273,
446,
31,
3639,
368,
6161,
1544,
1122,
487,
1... |
d.date = ScriptRuntime.NaN; return d.date; | this.date = ScriptRuntime.NaN; return this.date; | private static double makeTime(Scriptable dateObj, Object[] args, int maxargs, boolean local, Function funObj) { int i; double conv[] = new double[4]; double hour, min, sec, msec; double lorutime; /* Local or UTC version of date */ double time; double result; NativeDate d = checkInstance(dateObj, funObj); double date = d.date; /* just return NaN if the date is already NaN */ if (date != date) return date; /* Satisfy the ECMA rule that if a function is called with * fewer arguments than the specified formal arguments, the * remaining arguments are set to undefined. Seems like all * the Date.setWhatever functions in ECMA are only varargs * beyond the first argument; this should be set to undefined * if it's not given. This means that "d = new Date(); * d.setMilliseconds()" returns NaN. Blech. */ if (args.length == 0) args = ScriptRuntime.padArguments(args, 1); for (i = 0; i < args.length && i < maxargs; i++) { conv[i] = ScriptRuntime.toNumber(args[i]); // limit checks that happen in MakeTime in ECMA. if (conv[i] != conv[i] || Double.isInfinite(conv[i])) { d.date = ScriptRuntime.NaN; return d.date; } conv[i] = ScriptRuntime.toInteger(conv[i]); } if (local) lorutime = LocalTime(date); else lorutime = date; i = 0; int stop = args.length; if (maxargs >= 4 && i < stop) hour = conv[i++]; else hour = HourFromTime(lorutime); if (maxargs >= 3 && i < stop) min = conv[i++]; else min = MinFromTime(lorutime); if (maxargs >= 2 && i < stop) sec = conv[i++]; else sec = SecFromTime(lorutime); if (maxargs >= 1 && i < stop) msec = conv[i++]; else msec = msFromTime(lorutime); time = MakeTime(hour, min, sec, msec); result = MakeDate(Day(lorutime), time); if (local) result = internalUTC(result); date = TimeClip(result); d.date = date; return date; } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/1f40b84b6c54487dd6f26829d1ebda36a7567a38/NativeDate.java/clean/js/rhino/src/org/mozilla/javascript/NativeDate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1645,
1221,
950,
12,
3651,
429,
1509,
2675,
16,
1033,
8526,
833,
16,
4766,
282,
509,
943,
1968,
16,
1250,
1191,
16,
4766,
282,
4284,
9831,
2675,
13,
565,
288,
3639,
509,
277,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1645,
1221,
950,
12,
3651,
429,
1509,
2675,
16,
1033,
8526,
833,
16,
4766,
282,
509,
943,
1968,
16,
1250,
1191,
16,
4766,
282,
4284,
9831,
2675,
13,
565,
288,
3639,
509,
277,... |
variables.put(getVarName(), Integer.toString(current)); | variables.put(getVarName(), Long.toString(current)); | public synchronized void iterationStart(LoopIterationEvent event) { // Cannot use getThreadContext() as not cloned per thread JMeterVariables variables = JMeterContextService.getContext().getVariables(); int start = getStart(), end = getEnd(), increment = getIncrement(); if (!isPerUser()) { if (globalCounter == -1 || globalCounter > end) { globalCounter = start; } variables.put(getVarName(), Integer.toString(globalCounter)); globalCounter += increment; } else { String value = variables.get(getVarName()); if (value == null) { variables.put(getVarName(), Integer.toString(start)); } else { try { int current = Integer.parseInt(value); current += increment; if (current > end) { current = start; } variables.put(getVarName(), Integer.toString(current)); } catch (NumberFormatException e) { log.info("Bad number in Counter config", e); } } } } | 50179 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50179/82cda7240c4c8ade1a7b2f9e884f395b64cd0a0f/CounterConfig.java/clean/src/components/org/apache/jmeter/modifiers/CounterConfig.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
6532,
1685,
12,
6452,
10795,
1133,
871,
13,
288,
202,
202,
759,
14143,
999,
24459,
1042,
1435,
487,
486,
13027,
1534,
2650,
202,
202,
46,
16935,
6158,
3152,
273,
804,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
6532,
1685,
12,
6452,
10795,
1133,
871,
13,
288,
202,
202,
759,
14143,
999,
24459,
1042,
1435,
487,
486,
13027,
1534,
2650,
202,
202,
46,
16935,
6158,
3152,
273,
804,... |
TextFieldBean servicename_input = new TextFieldBean(); | TextFieldBean servicename_input = event.getTextFieldBean("TFSERVICENAME"+tmfservice.getMessageType()); | private DefaultTableModel getMessagingFrame(FormEvent event, boolean readonly) { DefaultTableModel model = new DefaultTableModel(); PortletRequest req = event.getPortletRequest(); TableRowBean trMessaging = new TableRowBean(); TableCellBean tcMessagingDesc = new TableCellBean(); TableCellBean tcMessagingUserid = new TableCellBean(); TextBean tbMessagingDesc = event.getTextBean("tbMessagingDesc"); TextBean tbMessagingUserid = event.getTextBean("tbMessagingUserid"); String text = this.getLocalizedText(req, "PROFILE_MESSAGING_SERVICE"); tbMessagingDesc.setValue(text); tcMessagingDesc.addBean(tbMessagingDesc); tbMessagingUserid = event.getTextBean("tbMessagingUserid"); text = this.getLocalizedText(req, "PROFILE_MESSAGING_USERID"); tbMessagingUserid.setValue(text); tcMessagingUserid.addBean(tbMessagingUserid); trMessaging.addBean(tcMessagingDesc); trMessaging.addBean(tcMessagingUserid); // add the header to the model trMessaging.setHeader(true); model.addTableRowBean(trMessaging); List services = tms.getServices(); if (services.size()==0) { TableRowBean noServiceRow = new TableRowBean(); TableCellBean noServiceCell1 = new TableCellBean(); TableCellBean noServiceCell2 = new TableCellBean(); String localeText = this.getLocalizedText(req, "PROFILE_MESSAGING_NO_SERVICE_CONFIGURED"); TextBean noServiceText = new TextBean(); noServiceText.setValue(localeText); noServiceCell1.addBean(noServiceText); TextBean noServiceText2 = new TextBean(); noServiceText2.setValue(" "); noServiceCell2.addBean(noServiceText2); noServiceRow.addBean(noServiceCell1); noServiceRow.addBean(noServiceCell2); model.addTableRowBean(noServiceRow); } else { for (int i=0;i<services.size();i++) { TmfService tmfservice = (TmfService) services.get(i); // tablerow TableRowBean trService = new TableRowBean(); // NAME TableCellBean tcServiceName = new TableCellBean(); // make text TextBean servicename = new TextBean(); String localeText = this.getLocalizedText(req, tmfservice.getDescription()); servicename.setValue(localeText); tcServiceName.addBean(servicename); trService.addBean(tcServiceName); // INPUT TableCellBean tcServiceInput = new TableCellBean(); // make inputfield TextFieldBean servicename_input = new TextFieldBean(); TmfUser user = tms.getUser(req.getUser().getUserID()); if (user!=null) { servicename_input.setValue(user.getUserNameForMessagetype(tmfservice.getMessageType())); } servicename_input.setDisabled(readonly); tcServiceInput.addBean(servicename_input); trService.addBean(tcServiceInput); model.addTableRowBean(trService); } } return model; } | 49343 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49343/2c7b61a379ee875c3e084b017c62aa1566e3c27d/ProfileManagerPortlet.java/clean/src/org/gridlab/gridsphere/portlets/core/user/ProfileManagerPortlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
2989,
1388,
1488,
30926,
3219,
12,
1204,
1133,
871,
16,
1250,
17102,
13,
288,
3639,
2989,
1388,
1488,
938,
273,
394,
2989,
1388,
1488,
5621,
3639,
21305,
691,
1111,
273,
871,
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,
3238,
2989,
1388,
1488,
30926,
3219,
12,
1204,
1133,
871,
16,
1250,
17102,
13,
288,
3639,
2989,
1388,
1488,
938,
273,
394,
2989,
1388,
1488,
5621,
3639,
21305,
691,
1111,
273,
871,
18,
58... |
final SortedSet modifierKeys = new TreeSet(); NaturalKey naturalKey = null; if ((accelerator & SWT.ALT) != 0) modifierKeys.add(ModifierKey.ALT); if ((accelerator & SWT.COMMAND) != 0) modifierKeys.add(ModifierKey.COMMAND); if ((accelerator & SWT.CTRL) != 0) modifierKeys.add(ModifierKey.CTRL); if ((accelerator & SWT.SHIFT) != 0) modifierKeys.add(ModifierKey.SHIFT); if (((accelerator & SWT.KEY_MASK) == 0) && (accelerator != 0)) { naturalKey = null; | final int modifierKeys = accelerator & SWT.MODIFIER_MASK; final int naturalKey; if (accelerator == modifierKeys) { naturalKey = Integer.MIN_VALUE; | public static final KeyStroke convertAcceleratorToKeyStroke(int accelerator) { final SortedSet modifierKeys = new TreeSet(); NaturalKey naturalKey = null; if ((accelerator & SWT.ALT) != 0) modifierKeys.add(ModifierKey.ALT); if ((accelerator & SWT.COMMAND) != 0) modifierKeys.add(ModifierKey.COMMAND); if ((accelerator & SWT.CTRL) != 0) modifierKeys.add(ModifierKey.CTRL); if ((accelerator & SWT.SHIFT) != 0) modifierKeys.add(ModifierKey.SHIFT); if (((accelerator & SWT.KEY_MASK) == 0) && (accelerator != 0)) { // There were only accelerators naturalKey = null; } else { // There were other keys. accelerator &= SWT.KEY_MASK; switch (accelerator) { case SWT.ARROW_DOWN: naturalKey = SpecialKey.ARROW_DOWN; break; case SWT.ARROW_LEFT: naturalKey = SpecialKey.ARROW_LEFT; break; case SWT.ARROW_RIGHT: naturalKey = SpecialKey.ARROW_RIGHT; break; case SWT.ARROW_UP: naturalKey = SpecialKey.ARROW_UP; break; case SWT.BREAK: naturalKey = SpecialKey.BREAK; break; case SWT.CAPS_LOCK: naturalKey = SpecialKey.CAPS_LOCK; break; case SWT.END: naturalKey = SpecialKey.END; break; case SWT.F1: naturalKey = SpecialKey.F1; break; case SWT.F10: naturalKey = SpecialKey.F10; break; case SWT.F11: naturalKey = SpecialKey.F11; break; case SWT.F12: naturalKey = SpecialKey.F12; break; case SWT.F2: naturalKey = SpecialKey.F2; break; case SWT.F3: naturalKey = SpecialKey.F3; break; case SWT.F4: naturalKey = SpecialKey.F4; break; case SWT.F5: naturalKey = SpecialKey.F5; break; case SWT.F6: naturalKey = SpecialKey.F6; break; case SWT.F7: naturalKey = SpecialKey.F7; break; case SWT.F8: naturalKey = SpecialKey.F8; break; case SWT.F9: naturalKey = SpecialKey.F9; break; case SWT.HOME: naturalKey = SpecialKey.HOME; break; case SWT.INSERT: naturalKey = SpecialKey.INSERT; break; case SWT.KEYPAD_0: naturalKey = SpecialKey.NUMPAD_0; break; case SWT.KEYPAD_1: naturalKey = SpecialKey.NUMPAD_1; break; case SWT.KEYPAD_2: naturalKey = SpecialKey.NUMPAD_2; break; case SWT.KEYPAD_3: naturalKey = SpecialKey.NUMPAD_3; break; case SWT.KEYPAD_4: naturalKey = SpecialKey.NUMPAD_4; break; case SWT.KEYPAD_5: naturalKey = SpecialKey.NUMPAD_5; break; case SWT.KEYPAD_6: naturalKey = SpecialKey.NUMPAD_6; break; case SWT.KEYPAD_7: naturalKey = SpecialKey.NUMPAD_7; break; case SWT.KEYPAD_8: naturalKey = SpecialKey.NUMPAD_8; break; case SWT.KEYPAD_9: naturalKey = SpecialKey.NUMPAD_9; break; case SWT.KEYPAD_ADD: naturalKey = SpecialKey.NUMPAD_ADD; break; case SWT.KEYPAD_CR: naturalKey = SpecialKey.NUMPAD_ENTER; break; case SWT.KEYPAD_DECIMAL: naturalKey = SpecialKey.NUMPAD_DECIMAL; break; case SWT.KEYPAD_DIVIDE: naturalKey = SpecialKey.NUMPAD_DIVIDE; break; case SWT.KEYPAD_EQUAL: naturalKey = SpecialKey.NUMPAD_EQUAL; break; case SWT.KEYPAD_MULTIPLY: naturalKey = SpecialKey.NUMPAD_MULTIPLY; break; case SWT.KEYPAD_SUBTRACT: naturalKey = SpecialKey.NUMPAD_SUBTRACT; break; case SWT.NUM_LOCK: naturalKey = SpecialKey.NUM_LOCK; break; case SWT.PAGE_DOWN: naturalKey = SpecialKey.PAGE_DOWN; break; case SWT.PAGE_UP: naturalKey = SpecialKey.PAGE_UP; break; case SWT.PAUSE: naturalKey = SpecialKey.PAUSE; break; case SWT.PRINT_SCREEN: naturalKey = SpecialKey.PRINT_SCREEN; break; case SWT.SCROLL_LOCK: naturalKey = SpecialKey.SCROLL_LOCK; break; default: naturalKey = CharacterKey .getInstance((char) (accelerator & 0xFFFF)); } } return KeyStroke.getInstance(modifierKeys, naturalKey); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/092230ba080f34842abb8d636b3b6894254f8cc5/SWTKeySupport.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/SWTKeySupport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
727,
1929,
14602,
1765,
28417,
774,
653,
14602,
12,
474,
15153,
7385,
13,
288,
202,
202,
6385,
22123,
9606,
2396,
273,
394,
19461,
5621,
202,
202,
23779,
3766,
653,
15145,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
1929,
14602,
1765,
28417,
774,
653,
14602,
12,
474,
15153,
7385,
13,
288,
202,
202,
6385,
22123,
9606,
2396,
273,
394,
19461,
5621,
202,
202,
23779,
3766,
653,
15145,
... |
public List getGetFieldPointcuts(final String className, | public List getGetFieldPointcuts(final ClassMetaData classMetaData, | public List getGetFieldPointcuts(final String className, final FieldMetaData fieldMetaData) { if (className == null) throw new IllegalArgumentException("class name can not be null"); if (fieldMetaData == null) throw new IllegalArgumentException("field meta-data can not be null"); initialize(); Integer hashKey = calculateHash(className, fieldMetaData); // if cached; return the cached list if (m_getFieldPointcutCache.containsKey(hashKey)) { return (List)m_getFieldPointcutCache.get(hashKey); } List pointcuts = new ArrayList(); for (Iterator it = m_aspects.values().iterator(); it.hasNext();) { Aspect aspect = (Aspect)it.next(); pointcuts.addAll(aspect.getGetFieldPointcuts(className, fieldMetaData)); } synchronized (m_getFieldPointcutCache) { m_getFieldPointcutCache.put(hashKey, pointcuts); } return pointcuts; } | 7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/797e662bcd4bca47d6ac84f41fbf32bf15013a33/AspectWerkz.java/buggy/aspectwerkz/src/main/org/codehaus/aspectwerkz/AspectWerkz.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
336,
967,
974,
2148,
5150,
87,
12,
6385,
1659,
6998,
667,
6998,
16,
19694,
727,
2286,
6998,
652,
6998,
13,
288,
3639,
309,
261,
12434,
422,
446,
13,
604,
394,
2754,
2932,
110... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
336,
967,
974,
2148,
5150,
87,
12,
6385,
1659,
6998,
667,
6998,
16,
19694,
727,
2286,
6998,
652,
6998,
13,
288,
3639,
309,
261,
12434,
422,
446,
13,
604,
394,
2754,
2932,
110... |
il.insert(fact.createBranchInstruction(Constants.GOTO, sk)); | il.insert(InstructionFactory.createBranchInstruction(Constants.GOTO, sk)); | private InstructionList createJumpBasedOnBooleanOnStack() { InstructionList il = new InstructionList(); if (sk == fk) { // don't bother generating if it doesn't matter if (sk != next) { il.insert(fact.createBranchInstruction(Constants.GOTO, sk)); } return il; } if (fk == next) { il.insert(fact.createBranchInstruction(Constants.IFNE, sk)); } else if (sk == next) { il.insert(fact.createBranchInstruction(Constants.IFEQ, fk)); } else { il.insert(fact.createBranchInstruction(Constants.GOTO, sk)); il.insert(fact.createBranchInstruction(Constants.IFEQ, fk)); } return il; } | 53148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53148/fde423ac335eb547834bb6f1b0ec51ddfac51cd6/BcelRenderer.java/clean/weaver/src/org/aspectj/weaver/bcel/BcelRenderer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
24605,
682,
752,
26743,
9802,
1398,
5507,
1398,
2624,
1435,
288,
202,
202,
11983,
682,
14254,
273,
394,
24605,
682,
5621,
3639,
309,
261,
7771,
422,
10949,
13,
288,
5411,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
24605,
682,
752,
26743,
9802,
1398,
5507,
1398,
2624,
1435,
288,
202,
202,
11983,
682,
14254,
273,
394,
24605,
682,
5621,
3639,
309,
261,
7771,
422,
10949,
13,
288,
5411,
368,
... |
vertex[normalIndex - 2] .cross(vertex[normalIndex + 1]) .normalize(); | vertex[normalIndex - 2].subtract(vertex[normalIndex]) .cross(vertex[normalIndex + 1].subtract(vertex[normalIndex])) .normalizeLocal(); | public void tessellate() { if(patch == null) { return; } int u = 0, v; float py, px, pyold; int detailLevel = patch.getDetailLevel(); Vector3f[] temp = new Vector3f[4]; Vector3f[] last = new Vector3f[detailLevel + 1]; temp[0] = patch.getAnchor(0, 3); temp[1] = patch.getAnchor(1, 3); temp[2] = patch.getAnchor(2, 3); temp[3] = patch.getAnchor(3, 3); for (v = 0; v <= detailLevel; v++) { px = ((float) v) / ((float) detailLevel); last[v] = calcBerstein(px, temp); } u = 1; Vector3f[] vertex = new Vector3f[((detailLevel * 2) + 2) * detailLevel]; Vector2f[] texture = new Vector2f[((detailLevel * 2) + 2) * detailLevel]; Vector3f[] normal = new Vector3f[vertex.length]; int[] indices = new int[detailLevel * detailLevel * 6]; int count = 0; for (u = 1; u <= detailLevel; u++) { py = ((float) u) / ((float) detailLevel); pyold = (u - 1.0f) / (detailLevel); temp[0] = calcBerstein(py, patch.getAnchors()[0]); temp[1] = calcBerstein(py, patch.getAnchors()[1]); temp[2] = calcBerstein(py, patch.getAnchors()[2]); temp[3] = calcBerstein(py, patch.getAnchors()[3]); for (v = 0; v <= detailLevel; v++) { px = ((float) v) / ((float) detailLevel); texture[count] = new Vector2f(pyold, px); vertex[count] = new Vector3f(last[v].x, last[v].y, last[v].z); count++; last[v] = calcBerstein(px, temp); texture[count] = new Vector2f(py, px); vertex[count] = new Vector3f(last[v].x, last[v].y, last[v].z); count++; } } int index = -1; for (int i = 0; i < detailLevel * detailLevel * 6; i = i + 6) { index++; if (i > 0 && i % (detailLevel * 6) == 0) { index += 1; } indices[i] = 2 * index; indices[(i + 1)] = (2 * index) + 1; indices[(i + 2)] = (2 * index) + 2; indices[(i + 3)] = (2 * index) + 3; indices[(i + 4)] = (2 * index) + 2; indices[(i + 5)] = (2 * index) + 1; } int normalIndex = 0; for (int i = 0; i < detailLevel; i++) { for (int j = 0; j < (detailLevel * 2) + 2; j++) { if (j % 2 == 0) { if (i == 0) { if (j < (detailLevel * 2)) { //right cross up normal[normalIndex] = vertex[normalIndex + 1] .cross(vertex[normalIndex + 2]) .normalize(); } else { //down cross right normal[normalIndex] = vertex[normalIndex - 2] .cross(vertex[normalIndex + 1]) .normalize(); } } else { normal[normalIndex] = normal[normalIndex - (detailLevel * 2 + 1)].normalize(); } } else { if (j < (detailLevel * 2) + 1) { //up cross left normal[normalIndex] = vertex[normalIndex + 2].cross(vertex[normalIndex - 1]).normalize(); } else { //left cross down normal[normalIndex] = vertex[normalIndex - 1].cross(vertex[normalIndex - 2]).normalize(); } } normalIndex++; } } setVertices(vertex); setTextures(texture); setIndices(indices); setNormals(normal); } | 19503 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19503/74f7f4695fcdb311614f78a197f5fc2164aa1b95/BezierMesh.java/buggy/src/com/jme/scene/BezierMesh.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
268,
403,
1165,
340,
1435,
288,
3639,
309,
12,
2272,
422,
446,
13,
288,
5411,
327,
31,
3639,
289,
3639,
509,
582,
273,
374,
16,
331,
31,
3639,
1431,
2395,
16,
10318,
16,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
268,
403,
1165,
340,
1435,
288,
3639,
309,
12,
2272,
422,
446,
13,
288,
5411,
327,
31,
3639,
289,
3639,
509,
582,
273,
374,
16,
331,
31,
3639,
1431,
2395,
16,
10318,
16,
23... |
public boolean isFocusCycleRoot() | public boolean isFocusCycleRoot(Container c) | public boolean isFocusCycleRoot() { return false; } | 13625 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13625/0da56f8faf07352467cbff76f7f508bd42b6fb73/Container.java/buggy/libjava/java/awt/Container.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
353,
9233,
13279,
2375,
12,
2170,
276,
13,
225,
288,
565,
327,
629,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
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,
282,
1071,
1250,
353,
9233,
13279,
2375,
12,
2170,
276,
13,
225,
288,
565,
327,
629,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
{if(PAContext.DebugExecution){System.out.print("\nparser "+context.engine.litMode()+":\""+x.image+"\"");System.out.flush();System.err.flush();}} | {if(PAContext.DebugExecution){System.out.print("\nparser ["+jj_input_stream.getBeginLine()+","+jj_input_stream.getBeginColumn()+"]"+context.engine.litMode()+":\""+x.image+"\"");System.out.flush();System.err.flush();}} | final public void parse(PAContext context) throws ParseException { Token x = null; try { label_1: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case STRING_LITERAL: case IDENTIFIER: case KEY_IDENTIFIER: case IMMEDIATE_IDENTIFIER: case LBRACE: case RBRACE: case LBRACKET: case RBRACKET: case LDICT: case RDICT: ; break; default: jj_la1[0] = jj_gen; break label_1; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case STRING_LITERAL: case IDENTIFIER: case KEY_IDENTIFIER: case IMMEDIATE_IDENTIFIER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER_LITERAL: x = jj_consume_token(INTEGER_LITERAL); try { {if(PAContext.DebugExecution){System.out.print("\nparser ["+jj_input_stream.bufpos+"]"+context.engine.litMode()+":\""+x.image+"\"");System.out.flush();System.err.flush();}} context.engine.process(new Integer(x.image)); } catch(NumberFormatException e) { {if (true) throw new ParseException(ExceptionString("int_literal",jj_input_stream,context,token,e));} } catch(PainterException e) { {if (true) throw new ParseException(ExceptionString("int_literal",jj_input_stream,context,token,e));} } break; case FLOATING_POINT_LITERAL: x = jj_consume_token(FLOATING_POINT_LITERAL); try { {if(PAContext.DebugExecution){System.out.print("\nparser ["+jj_input_stream.bufpos+"]"+context.engine.litMode()+":\""+x.image+"\"");System.out.flush();System.err.flush();}} context.engine.process(new Double(x.image)); } catch(NumberFormatException e) { {if (true) throw new ParseException(ExceptionString("float_literal",jj_input_stream,context,token,e));} } catch(PainterException e) { {if (true) throw new ParseException(ExceptionString("float_literal",jj_input_stream,context,token,e));} } break; case STRING_LITERAL: x = jj_consume_token(STRING_LITERAL); try { {if(PAContext.DebugExecution){System.out.print("\nparser "+context.engine.litMode()+":\""+x.image+"\"");System.out.flush();System.err.flush();}} context.engine.process(x.image.substring(1, x.image.length() -1)); } catch(PainterException e) { {if (true) throw new ParseException(ExceptionString("string_literal",jj_input_stream,context,token,e));} } break; case IDENTIFIER: x = jj_consume_token(IDENTIFIER); try { {if(PAContext.DebugExecution){System.out.print("\nparser "+context.engine.litMode()+":\""+x.image+"\"");System.out.flush();System.err.flush();}} context.engine.process(new PAToken(x.image, PAToken.IDENTIFIER)); } catch(PainterException e) { {if (true) throw new ParseException(ExceptionString("identifier",jj_input_stream,context,token,e));} } break; case KEY_IDENTIFIER: x = jj_consume_token(KEY_IDENTIFIER); try { {if(PAContext.DebugExecution){System.out.print("\nparser "+context.engine.litMode()+":\""+x.image+"\"");System.out.flush();System.err.flush();}} context.engine.process(new PAToken(x.image.substring(1, x.image.length()), PAToken.KEY)); } catch(PainterException e) { {if (true) throw new ParseException(ExceptionString("key_identifier",jj_input_stream,context,token,e));} } break; case IMMEDIATE_IDENTIFIER: x = jj_consume_token(IMMEDIATE_IDENTIFIER); try { {if(PAContext.DebugExecution){System.out.print("\nparser "+context.engine.litMode()+":\""+x.image+"\"");System.out.flush();System.err.flush();}} context.engine.process(new PAToken(x.image.substring(2, x.image.length()), PAToken.IMMEDIATE)); } catch(PainterException e) { {if (true) throw new ParseException(ExceptionString("immediate_identifier",jj_input_stream,context,token,e));} } break; default: jj_la1[1] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; case LBRACE: jj_consume_token(LBRACE); try { {if(PAContext.DebugExecution){System.out.print("\nparser "+context.engine.litMode()+":\""+token.image+"\"");System.out.flush();System.err.flush();}} context.engine.process(new PAToken(null, PAToken.START_PROCEDURE)); } catch(PainterException e) { {if (true) throw new ParseException(ExceptionString("lbrace",jj_input_stream,context,token,e));} } break; case RBRACE: jj_consume_token(RBRACE); try { {if(PAContext.DebugExecution){System.out.print("\nparser "+context.engine.litMode()+":\""+token.image+"\"");System.out.flush();System.err.flush();}} context.engine.process(new PAToken(null, PAToken.END_PROCEDURE)); } catch(PainterException e) { {if (true) throw new ParseException(ExceptionString("rbrace",jj_input_stream,context,token,e));} } break; case LBRACKET: jj_consume_token(LBRACKET); try { {if(PAContext.DebugExecution){System.out.print("\nparser "+context.engine.litMode()+":\""+token.image+"\"");System.out.flush();System.err.flush();}} context.engine.process(new PAToken(null, PAToken.START_ARRAY)); } catch(PainterException e) { {if (true) throw new ParseException(ExceptionString("lbracket",jj_input_stream,context,token,e));} } break; case RBRACKET: jj_consume_token(RBRACKET); try { {if(PAContext.DebugExecution){System.out.print("\nparser "+context.engine.litMode()+":\""+token.image+"\"");System.out.flush();System.err.flush();}} context.engine.process(new PAToken(null, PAToken.END_ARRAY)); } catch(PainterException e) { {if (true) throw new ParseException(ExceptionString("rbracket",jj_input_stream,context,token,e));} } break; case LDICT: jj_consume_token(LDICT); try { {if(PAContext.DebugExecution){System.out.print("\nparser "+context.engine.litMode()+":\""+token.image+"\"");System.out.flush();System.err.flush();}} context.engine.process(new PAToken(null, PAToken.START_DICT)); } catch(PainterException e) { {if (true) throw new ParseException(ExceptionString("ldict",jj_input_stream,context,token,e));} } break; case RDICT: jj_consume_token(RDICT); try { {if(PAContext.DebugExecution){System.out.print("\nparser "+context.engine.litMode()+":\""+token.image+"\"");System.out.flush();System.err.flush();}} context.engine.process(new PAToken(null, PAToken.END_DICT)); } catch(PainterException e) { {if (true) throw new ParseException(ExceptionString("rdict",jj_input_stream,context,token,e));} } break; default: jj_la1[2] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } catch (ParseException e) { System.out.flush();System.err.flush(); //System.out.println("Fehlerhaftes Element in Spalte "+e.currentToken.beginColumn+" in Eingabedatei in Zeile="+e.currentToken.next.beginLine+" in Zeichen Nr. "+e.currentToken.next.beginColumn+". >"+e.currentToken.next.image+"< wurde hier nicht erwartet."); //System.err.println("Fehler:"+e); e.printStackTrace(); error_skipto(WHITESPACE); System.exit(0); } } | 3011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3011/3cd4a973dbdca1f7072d8e189d388c5a878cc9a6/PAParser.java/buggy/itext/src/com/lowagie/text/pdf/codec/postscript/PAParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
918,
1109,
12,
4066,
1042,
819,
13,
1216,
10616,
288,
3639,
3155,
619,
273,
446,
31,
565,
775,
288,
1377,
1433,
67,
21,
30,
1377,
1323,
261,
3767,
13,
288,
3639,
1620,
14015,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
1071,
918,
1109,
12,
4066,
1042,
819,
13,
1216,
10616,
288,
3639,
3155,
619,
273,
446,
31,
565,
775,
288,
1377,
1433,
67,
21,
30,
1377,
1323,
261,
3767,
13,
288,
3639,
1620,
14015,... |
public void tearDown() { v1=v2=v3=null; | public void tearDown() throws Exception { super.tearDown(); v1=v2=v3=null; | public void tearDown() { v1=v2=v3=null; } | 3550 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3550/13de68466e3cf7fde6ee0bde0cee09a33e837e89/ViewIdTest.java/clean/tests/junit/org/jgroups/tests/ViewIdTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
268,
2091,
4164,
1435,
288,
202,
90,
21,
33,
90,
22,
33,
90,
23,
33,
2011,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
268,
2091,
4164,
1435,
288,
202,
90,
21,
33,
90,
22,
33,
90,
23,
33,
2011,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
init = nf.createLeaf(Token.VOID); | init = nf.createLeaf(Token.EMPTY); | private Object statementHelper(TokenStream ts) throws IOException, ParserException { Object pn = null; // If skipsemi == true, don't add SEMI + EOL to source at the // end of this statment. For compound statements, IF/FOR etc. boolean skipsemi = false; int tt; tt = ts.getToken(); switch(tt) { case Token.IF: { skipsemi = true; decompiler.addToken(Token.IF); int lineno = ts.getLineno(); Object cond = condition(ts); decompiler.addEOL(Token.LC); Object ifTrue = statement(ts); Object ifFalse = null; if (ts.matchToken(Token.ELSE)) { decompiler.addToken(Token.RC); decompiler.addToken(Token.ELSE); decompiler.addEOL(Token.LC); ifFalse = statement(ts); } decompiler.addEOL(Token.RC); pn = nf.createIf(cond, ifTrue, ifFalse, lineno); break; } case Token.SWITCH: { skipsemi = true; decompiler.addToken(Token.SWITCH); pn = nf.createSwitch(ts.getLineno()); Object cur_case = null; // to kill warning Object case_statements; mustMatchToken(ts, Token.LP, "msg.no.paren.switch"); decompiler.addToken(Token.LP); nf.addChildToBack(pn, expr(ts, false)); mustMatchToken(ts, Token.RP, "msg.no.paren.after.switch"); decompiler.addToken(Token.RP); mustMatchToken(ts, Token.LC, "msg.no.brace.switch"); decompiler.addEOL(Token.LC); while ((tt = ts.getToken()) != Token.RC && tt != Token.EOF) { switch(tt) { case Token.CASE: decompiler.addToken(Token.CASE); cur_case = nf.createUnary(Token.CASE, expr(ts, false)); decompiler.addEOL(Token.COLON); break; case Token.DEFAULT: cur_case = nf.createLeaf(Token.DEFAULT); decompiler.addToken(Token.DEFAULT); decompiler.addEOL(Token.COLON); // XXX check that there isn't more than one default break; default: reportError(ts, "msg.bad.switch"); break; } mustMatchToken(ts, Token.COLON, "msg.no.colon.case"); case_statements = nf.createLeaf(Token.BLOCK); while ((tt = ts.peekToken()) != Token.RC && tt != Token.CASE && tt != Token.DEFAULT && tt != Token.EOF) { nf.addChildToBack(case_statements, statement(ts)); } // assert cur_case nf.addChildToBack(cur_case, case_statements); nf.addChildToBack(pn, cur_case); } decompiler.addEOL(Token.RC); break; } case Token.WHILE: { skipsemi = true; decompiler.addToken(Token.WHILE); int lineno = ts.getLineno(); Object cond = condition(ts); decompiler.addEOL(Token.LC); Object body = statement(ts); decompiler.addEOL(Token.RC); pn = nf.createWhile(cond, body, lineno); break; } case Token.DO: { decompiler.addToken(Token.DO); decompiler.addEOL(Token.LC); int lineno = ts.getLineno(); Object body = statement(ts); decompiler.addToken(Token.RC); mustMatchToken(ts, Token.WHILE, "msg.no.while.do"); decompiler.addToken(Token.WHILE); Object cond = condition(ts); pn = nf.createDoWhile(body, cond, lineno); break; } case Token.FOR: { skipsemi = true; decompiler.addToken(Token.FOR); int lineno = ts.getLineno(); Object init; // Node init is also foo in 'foo in Object' Object cond; // Node cond is also object in 'foo in Object' Object incr = null; // to kill warning Object body; mustMatchToken(ts, Token.LP, "msg.no.paren.for"); decompiler.addToken(Token.LP); tt = ts.peekToken(); if (tt == Token.SEMI) { init = nf.createLeaf(Token.VOID); } else { if (tt == Token.VAR) { // set init to a var list or initial ts.getToken(); // throw away the 'var' token init = variables(ts, true); } else { init = expr(ts, true); } } if (ts.matchToken(Token.IN)) { decompiler.addToken(Token.IN); // 'cond' is the object over which we're iterating cond = expr(ts, false); } else { // ordinary for loop mustMatchToken(ts, Token.SEMI, "msg.no.semi.for"); decompiler.addToken(Token.SEMI); if (ts.peekToken() == Token.SEMI) { // no loop condition cond = nf.createLeaf(Token.VOID); } else { cond = expr(ts, false); } mustMatchToken(ts, Token.SEMI, "msg.no.semi.for.cond"); decompiler.addToken(Token.SEMI); if (ts.peekToken() == Token.RP) { incr = nf.createLeaf(Token.VOID); } else { incr = expr(ts, false); } } mustMatchToken(ts, Token.RP, "msg.no.paren.for.ctrl"); decompiler.addToken(Token.RP); decompiler.addEOL(Token.LC); body = statement(ts); decompiler.addEOL(Token.RC); if (incr == null) { // cond could be null if 'in obj' got eaten by the init node. pn = nf.createForIn(init, cond, body, lineno); } else { pn = nf.createFor(init, cond, incr, body, lineno); } break; } case Token.TRY: { int lineno = ts.getLineno(); Object tryblock; Object catchblocks = null; Object finallyblock = null; skipsemi = true; decompiler.addToken(Token.TRY); decompiler.addEOL(Token.LC); tryblock = statement(ts); decompiler.addEOL(Token.RC); catchblocks = nf.createLeaf(Token.BLOCK); boolean sawDefaultCatch = false; int peek = ts.peekToken(); if (peek == Token.CATCH) { while (ts.matchToken(Token.CATCH)) { if (sawDefaultCatch) { reportError(ts, "msg.catch.unreachable"); } decompiler.addToken(Token.CATCH); mustMatchToken(ts, Token.LP, "msg.no.paren.catch"); decompiler.addToken(Token.LP); mustMatchToken(ts, Token.NAME, "msg.bad.catchcond"); String varName = ts.getString(); decompiler.addName(varName); Object catchCond = null; if (ts.matchToken(Token.IF)) { decompiler.addToken(Token.IF); catchCond = expr(ts, false); } else { sawDefaultCatch = true; } mustMatchToken(ts, Token.RP, "msg.bad.catchcond"); decompiler.addToken(Token.RP); mustMatchToken(ts, Token.LC, "msg.no.brace.catchblock"); decompiler.addEOL(Token.LC); nf.addChildToBack(catchblocks, nf.createCatch(varName, catchCond, statements(ts), ts.getLineno())); mustMatchToken(ts, Token.RC, "msg.no.brace.after.body"); decompiler.addEOL(Token.RC); } } else if (peek != Token.FINALLY) { mustMatchToken(ts, Token.FINALLY, "msg.try.no.catchfinally"); } if (ts.matchToken(Token.FINALLY)) { decompiler.addToken(Token.FINALLY); decompiler.addEOL(Token.LC); finallyblock = statement(ts); decompiler.addEOL(Token.RC); } pn = nf.createTryCatchFinally(tryblock, catchblocks, finallyblock, lineno); break; } case Token.THROW: { int lineno = ts.getLineno(); decompiler.addToken(Token.THROW); pn = nf.createThrow(expr(ts, false), lineno); if (lineno == ts.getLineno()) checkWellTerminated(ts); break; } case Token.BREAK: { int lineno = ts.getLineno(); decompiler.addToken(Token.BREAK); // matchLabel only matches if there is one String label = matchLabel(ts); if (label != null) { decompiler.addName(label); } pn = nf.createBreak(label, lineno); break; } case Token.CONTINUE: { int lineno = ts.getLineno(); decompiler.addToken(Token.CONTINUE); // matchLabel only matches if there is one String label = matchLabel(ts); if (label != null) { decompiler.addName(label); } pn = nf.createContinue(label, lineno); break; } case Token.WITH: { skipsemi = true; decompiler.addToken(Token.WITH); int lineno = ts.getLineno(); mustMatchToken(ts, Token.LP, "msg.no.paren.with"); decompiler.addToken(Token.LP); Object obj = expr(ts, false); mustMatchToken(ts, Token.RP, "msg.no.paren.after.with"); decompiler.addToken(Token.RP); decompiler.addEOL(Token.LC); Object body = statement(ts); decompiler.addEOL(Token.RC); pn = nf.createWith(obj, body, lineno); break; } case Token.VAR: { int lineno = ts.getLineno(); pn = variables(ts, false); if (ts.getLineno() == lineno) checkWellTerminated(ts); break; } case Token.RETURN: { Object retExpr = null; decompiler.addToken(Token.RETURN); // bail if we're not in a (toplevel) function if ((ts.flags & ts.TSF_FUNCTION) == 0) reportError(ts, "msg.bad.return"); /* This is ugly, but we don't want to require a semicolon. */ ts.flags |= ts.TSF_REGEXP; tt = ts.peekTokenSameLine(); ts.flags &= ~ts.TSF_REGEXP; int lineno = ts.getLineno(); if (tt != Token.EOF && tt != Token.EOL && tt != Token.SEMI && tt != Token.RC) { retExpr = expr(ts, false); if (ts.getLineno() == lineno) checkWellTerminated(ts); ts.flags |= ts.TSF_RETURN_EXPR; } else { ts.flags |= ts.TSF_RETURN_VOID; } // XXX ASSERT pn pn = nf.createReturn(retExpr, lineno); break; } case Token.LC: skipsemi = true; pn = statements(ts); mustMatchToken(ts, Token.RC, "msg.no.brace.block"); break; case Token.ERROR: // Fall thru, to have a node for error recovery to work on case Token.EOL: case Token.SEMI: pn = nf.createLeaf(Token.VOID); skipsemi = true; break; case Token.FUNCTION: { pn = function(ts, FunctionNode.FUNCTION_EXPRESSION_STATEMENT); break; } default: { int lastExprType = tt; int tokenno = ts.getTokenno(); ts.ungetToken(tt); int lineno = ts.getLineno(); pn = expr(ts, false); if (ts.peekToken() == Token.COLON) { /* check that the last thing the tokenizer returned was a * NAME and that only one token was consumed. */ if (lastExprType != Token.NAME || (ts.getTokenno() != tokenno)) reportError(ts, "msg.bad.label"); ts.getToken(); // eat the COLON /* in the C source, the label is associated with the * statement that follows: * nf.addChildToBack(pn, statement(ts)); */ String name = ts.getString(); pn = nf.createLabel(name, lineno); // depend on decompiling lookahead to guess that that // last name was a label. decompiler.addEOL(Token.COLON); return pn; } pn = nf.createExprStatement(pn, lineno); if (ts.getLineno() == lineno) { checkWellTerminated(ts); } break; } } ts.matchToken(Token.SEMI); if (!skipsemi) { decompiler.addEOL(Token.SEMI); } return pn; } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/9fce703481e10b63f4a6c2a5b81c29dc4fac9dca/Parser.java/buggy/js/rhino/src/org/mozilla/javascript/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
3021,
2276,
12,
1345,
1228,
3742,
13,
3639,
1216,
1860,
16,
27990,
565,
288,
3639,
1033,
11059,
273,
446,
31,
3639,
368,
971,
2488,
307,
9197,
422,
638,
16,
2727,
1404,
527,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
3021,
2276,
12,
1345,
1228,
3742,
13,
3639,
1216,
1860,
16,
27990,
565,
288,
3639,
1033,
11059,
273,
446,
31,
3639,
368,
971,
2488,
307,
9197,
422,
638,
16,
2727,
1404,
527,
... |
if (isStaticMethod) { Class[] types = new Class[argumentTypes.length + 1]; System.arraycopy(argumentTypes, 0, types, 1, argumentTypes.length); types[0] = IRubyObject.class; argumentTypes = types; } try { | if (isStaticMethod) { Class[] types = new Class[argumentTypes.length + 1]; System.arraycopy(argumentTypes, 0, types, 1, argumentTypes.length); types[0] = IRubyObject.class; argumentTypes = types; } try { | public ReflectionCallback( Class type, String methodName, Class[] argumentTypes, boolean isRestArgs, boolean isStaticMethod, Arity arity) { super(type, methodName, argumentTypes, isRestArgs, isStaticMethod, arity); if (isStaticMethod) { Class[] types = new Class[argumentTypes.length + 1]; System.arraycopy(argumentTypes, 0, types, 1, argumentTypes.length); types[0] = IRubyObject.class; argumentTypes = types; } try { this.method = type.getMethod(methodName, argumentTypes); } catch (NoSuchMethodException e) { throw new RuntimeException( "NoSuchMethodException: Cannot get method \"" + methodName + "\" in class \"" + type.getName() + "\" by Reflection."); } catch (SecurityException e) { throw new RuntimeException( "SecurityException: Cannot get method \"" + methodName + "\" in class \"" + type.getName() + "\" by Reflection."); } } | 49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/765ab8f2eeed4e7c0c131b35b7ecadb0ee2855fd/ReflectionCallback.java/buggy/src/org/jruby/runtime/callback/ReflectionCallback.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5685,
2428,
12,
3639,
1659,
618,
16,
3639,
514,
4918,
16,
3639,
1659,
8526,
1237,
2016,
16,
3639,
1250,
353,
5188,
2615,
16,
3639,
1250,
16116,
1305,
16,
3639,
1201,
560,
19353,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5685,
2428,
12,
3639,
1659,
618,
16,
3639,
514,
4918,
16,
3639,
1659,
8526,
1237,
2016,
16,
3639,
1250,
353,
5188,
2615,
16,
3639,
1250,
16116,
1305,
16,
3639,
1201,
560,
19353,
13,... |
attributeName), attributeType); | attributeName, attributeType), attributeType); | public static IObservableList observeDetailList(Realm realm, IObservableValue master, String attributeName, Class attributeType) { return MasterDetailObservables.detailList(master, listFactory(realm, attributeName), attributeType); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/ffebdcfaf4de61ff1c556d0208f0146a8ce45e70/BeansObservables.java/buggy/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/BeansObservables.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1665,
3745,
682,
19389,
6109,
682,
12,
22545,
11319,
16,
1082,
202,
4294,
3745,
620,
4171,
16,
514,
9734,
16,
1659,
1566,
559,
13,
288,
202,
202,
2463,
13453,
6109,
26199,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1665,
3745,
682,
19389,
6109,
682,
12,
22545,
11319,
16,
1082,
202,
4294,
3745,
620,
4171,
16,
514,
9734,
16,
1659,
1566,
559,
13,
288,
202,
202,
2463,
13453,
6109,
26199,
... |
WorkbenchJob job = new WorkbenchJob(window.getShell().getDisplay(), ActivityMessages.getString("ManagerJob")) { | public void activityManagerChanged(ActivityManagerEvent activityManagerEvent) { Set activityIds = mutableActivityManager.getEnabledActivityIds(); // only update the windows if we've not processed this new enablement state already. if (!activityIds.equals(lastEnabled)) { lastEnabled = new HashSet(activityIds); // refresh the managers on all windows. IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows(); for (int i = 0; i < windows.length; i++) { if (windows[i] instanceof WorkbenchWindow) { final WorkbenchWindow window = (WorkbenchWindow) windows[i]; WorkbenchJob job = new WorkbenchJob(window.getShell().getDisplay(), ActivityMessages.getString("ManagerJob")) { //$NON-NLS-1$ /* (non-Javadoc) * @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor) */ public IStatus runInUIThread(IProgressMonitor monitor) { IContributionManager manager = window.getMenuBarManager(); if (manager != null) manager.update(true); manager = window.getCoolBarManager(); if (manager != null) manager.update(true); manager = window.getToolBarManager(); if (manager != null) manager.update(true); manager = window.getStatusLineManager(); if (manager != null) manager.update(true); return Status.OK_STATUS; } }; job.setSystem(true); job.schedule(); } } } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/4dd90155ddf8107b3b465a7558ab3121d6bd2652/WorkbenchActivitySupport.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/WorkbenchActivitySupport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
5728,
1318,
5033,
12,
6193,
1318,
1133,
5728,
1318,
1133,
13,
288,
9506,
202,
694,
5728,
2673,
273,
16074,
6193,
1318,
18,
588,
1526,
6193,
2673,
5621,
9506,
202,
759,
133... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
5728,
1318,
5033,
12,
6193,
1318,
1133,
5728,
1318,
1133,
13,
288,
9506,
202,
694,
5728,
2673,
273,
16074,
6193,
1318,
18,
588,
1526,
6193,
2673,
5621,
9506,
202,
759,
133... | |
public FileConnector() { | public FileConnector() { | public FileConnector() { filenameParser = new SimpleFilenameParser(); } | 28323 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28323/a8694feed791240a786f09082dcf342f719e5760/FileConnector.java/buggy/providers/file/src/java/org/mule/providers/file/FileConnector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1387,
7487,
1435,
565,
288,
3639,
1544,
2678,
273,
394,
4477,
5359,
2678,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1387,
7487,
1435,
565,
288,
3639,
1544,
2678,
273,
394,
4477,
5359,
2678,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
((ToHeader) ringing.getHeader(ToHeader.NAME)).getTag(), | riToTag, | public void testDialogProperties() { try { //CallId assertEquals( "The Dialog did not have the right Call ID.", ((CallIdHeader) riInvite.getHeader(CallIdHeader.NAME)) .getCallId(), dialog.getCallId().getCallId()); //Tran assertSame( "The Dialog.getTransaction did not return the right transaction.", cliTran, dialog.getFirstTransaction()); //LocalParty assertEquals( "Dialog.getLocalParty() returned a bad address.", ((FromHeader) tiInvite.getHeader(FromHeader.NAME)).getAddress(), dialog.getLocalParty()); //SeqNum assertTrue( "Dialog.getLocalSequenceNumber() returned a bad value.", 1 == dialog.getLocalSequenceNumber()); //LocalTag assertEquals( "Dialog.getLocalTag() returned a bad tag", ((FromHeader) riInvite.getHeader(FromHeader.NAME)).getTag(), dialog.getLocalTag()); //RemoteParty assertEquals( "Dialog.getRemoteParty() returned a bad address.", ((ToHeader) tiInvite.getHeader(ToHeader.NAME)).getAddress(), dialog.getRemoteParty()); //RemoteTag assertEquals( "Dialog.getRemoteTag() returned a bad tag", ((ToHeader) ringing.getHeader(ToHeader.NAME)).getTag(), dialog.getRemoteTag()); //is server assertFalse( "Dialog.isServer returned true for a client side dialog", dialog.isServer()); } catch (Throwable exc) { exc.printStackTrace(); fail(exc.getClass().getName() + ": " + exc.getMessage()); } assertTrue(new Exception().getStackTrace()[0].toString(), true); } | 7607 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7607/843e5bbf3c6787d0081582193c197162522f77ae/DialogTest.java/buggy/trunk/src/test/tck/msgflow/DialogTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
6353,
2297,
1435,
288,
202,
202,
698,
288,
1082,
202,
759,
1477,
548,
1082,
202,
11231,
8867,
12,
9506,
202,
6,
1986,
17242,
5061,
486,
1240,
326,
2145,
3049,
1599,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6353,
2297,
1435,
288,
202,
202,
698,
288,
1082,
202,
759,
1477,
548,
1082,
202,
11231,
8867,
12,
9506,
202,
6,
1986,
17242,
5061,
486,
1240,
326,
2145,
3049,
1599,
... |
if (lastDecompiledResult == null || lastDecompiledResult.getDecompiledCode() == null) { | if (lastDecompiledResult == null) { | private void setSelectionInBytecodeView() { if (lastDecompiledResult == null || lastDecompiledResult.getDecompiledCode() == null) { return; } int startLine = currentSelection.getStartLine() + 1; String linePattern = DecompileResult.SOURCE_LINE_PREFIX + startLine + DecompileResult.SOURCE_LINE_SUFFIX; int idx = lastDecompiledResult.getDecompiledCode().indexOf(linePattern); if (idx > 0) { try { int offsetAtLine = idx; int offsetEnd = lastDecompiledResult.getDecompiledCode().indexOf('\n', idx); textControl.setSelection(offsetAtLine, offsetEnd); } catch (IllegalArgumentException e) { BytecodeOutlinePlugin.error(null, e); } } } | 8320 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8320/06956b11ae8b08a76d08092c252b9a202d4d1ab8/BytecodeOutlineView.java/clean/eclipse/plugin/src/de/loskutov/bco/views/BytecodeOutlineView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
444,
6233,
382,
858,
16651,
1767,
1435,
288,
3639,
309,
261,
2722,
17731,
84,
1411,
1253,
422,
446,
5411,
747,
1142,
17731,
84,
1411,
1253,
18,
588,
17731,
84,
1411,
1085,
1435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
6233,
382,
858,
16651,
1767,
1435,
288,
3639,
309,
261,
2722,
17731,
84,
1411,
1253,
422,
446,
5411,
747,
1142,
17731,
84,
1411,
1253,
18,
588,
17731,
84,
1411,
1085,
1435... |
String size = (String) DesignerConstants.fontMap .get( DesignChoiceConstants.FONT_SIZE_MEDIUM ); | String size = (String) DesignerConstants.fontMap.get( DesignChoiceConstants.FONT_SIZE_MEDIUM ); | private static int getSmallerFontSizeIntValue( DesignElementHandle handle ) { if ( !( handle instanceof ReportItemHandle ) ) { if ( handle instanceof ModuleHandle ) { // return 10. String size = (String) DesignerConstants.fontMap .get( DesignChoiceConstants.FONT_SIZE_MEDIUM ); return Integer.parseInt( size ) - 1; } if ( handle instanceof GroupHandle ) { handle = handle.getContainer( ); } } Object fontSizeValue =getModelFontSize(handle); if ( fontSizeValue instanceof DimensionValue ) { int gParentFontSize = getFontSizeIntValue( handle.getContainer( ) ); int size = (int) CSSUtil.convertToPoint( fontSizeValue, gParentFontSize ) - 1; if ( size < 1 ) { return 1; } return size; } else if ( fontSizeValue instanceof String ) { String fontSize = (String) fontSizeValue; if ( fontSize.equals( DesignChoiceConstants.FONT_SIZE_LARGER ) ) { return getLargerFontSizeIntValue( handle.getContainer( ) ); } else if ( fontSize.equals( DesignChoiceConstants.FONT_SIZE_SMALLER ) ) { return getSmallerFontSizeIntValue( handle.getContainer( ) ); } else { for ( int i = DesignerConstants.fontSizes.length - 1; i > 0; i-- ) { if ( fontSize.equals( DesignerConstants.fontSizes[i][0] ) ) { return Integer .parseInt( DesignerConstants.fontSizes[i - 1][1] ); } } return Integer.parseInt( DesignerConstants.fontSizes[0][1] ); } } else { // return 10 -1. String size = (String) DesignerConstants.fontMap .get( DesignChoiceConstants.FONT_SIZE_MEDIUM ); return Integer.parseInt( size ) - 1; } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/32c331232f8bfd4ee9610e9105bb35ff9427651f/DEUtil.java/clean/UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/util/DEUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
509,
1322,
81,
454,
264,
22688,
1702,
620,
12,
29703,
1046,
3259,
1640,
262,
202,
95,
202,
202,
430,
261,
401,
12,
1640,
1276,
8706,
1180,
3259,
262,
262,
202,
202,
95,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
509,
1322,
81,
454,
264,
22688,
1702,
620,
12,
29703,
1046,
3259,
1640,
262,
202,
95,
202,
202,
430,
261,
401,
12,
1640,
1276,
8706,
1180,
3259,
262,
262,
202,
202,
95,
... |
public ConstantInstruction(int opcode, Object constant) { this(opcode, constant, -1); | ConstantInstruction(int opcode, Object constant) { super(opcode); this.constant = constant; | public ConstantInstruction(int opcode, Object constant) { this(opcode, constant, -1); } | 5628 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5628/3b2648f2701255bc1c18283b0e4f29f3befd3216/ConstantInstruction.java/buggy/jode/jode/bytecode/ConstantInstruction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10551,
11983,
12,
474,
11396,
16,
1033,
5381,
13,
288,
202,
2211,
12,
556,
710,
16,
5381,
16,
300,
21,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10551,
11983,
12,
474,
11396,
16,
1033,
5381,
13,
288,
202,
2211,
12,
556,
710,
16,
5381,
16,
300,
21,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
forms.addElement(sexp); | if (isImportedInstance) { forms.insertElementAt(sexp, formsStart); formsStart++; } else forms.addElement(sexp); | public static boolean importDefinitions (Type type, String uri, Vector forms, ScopeExp defs, Compilation tr) { Language language = tr.getLanguage(); boolean immediate = tr.immediate && defs instanceof ModuleExp; String tname = type.getName(); Object instance = null; ClassType t = (ClassType) type; boolean isRunnable = t.isSubtype(Compilation.typeRunnable); Declaration decl = null; ClassType thisType = ClassType.make("kawa.standard.require"); ModuleInfo info = ModuleInfo.find(tname); Expression[] args = { new QuoteExp(tname) }; Expression dofind = Invoke.makeInvokeStatic(thisType, "find", args); Field instanceField = null; dofind.setLine(tr); ModuleExp mod = new ModuleExp(); // Should skip if immediate. FIXME ClassType typeFieldLocation = ClassType.make("gnu.kawa.reflect.FieldLocation"); for (;;) { Class rclass = t.getReflectClass(); for (Field fld = t.getFields(); fld != null; fld = fld.getNext()) { int flags = fld.getFlags(); if ((flags & Access.PUBLIC) == 0) continue; String fname = fld.getName(); boolean isStatic = (flags & Access.STATIC) != 0; if (! isStatic && instance == null) { instance = info.getInstance(); String iname = tname.replace('.', '$') + "$instance"; decl = new Declaration(iname, type); decl.setPrivate(true); defs.addDeclaration(decl); decl.setCanRead(true); if (immediate) { decl.noteValue(new QuoteExp(instance)); } else { decl.noteValue(dofind); SetExp sexp = new SetExp(decl, dofind); sexp.setLine(tr); sexp.setDefining(true); forms.addElement(sexp); decl.setFlag(Declaration.EARLY_INIT); // If Runnable, we need to set decl value in initializer, // and later 'run' it, so it needs to be stored in a field. if (isRunnable) decl.setSimple(false); } } java.lang.reflect.Field rfield; Object fvalue; boolean isFinal; try { rfield = rclass.getField(fname); isFinal = (rfield.getModifiers() & Access.FINAL) != 0; if (isFinal) fvalue = rfield.get(instance); else fvalue = Undefined.getInstance(); } catch (Exception ex) { throw WrappedException.wrapIfNeeded(ex); } Type ftype = fld.getType(); boolean isAlias = ftype.isSubtype(Compilation.typeLocation); Declaration fdecl = makeDeclInModule(mod, fvalue, fld, language); Object fdname = fdecl.getSymbol(); if (fname.startsWith(Declaration.PRIVATE_PREFIX)) continue; if (fname.endsWith("$instance")) { if (isStatic && fname.equals("$instance")) instanceField = fld; continue; } /* if (tr.immediate && defs instanceof ModuleExp) { // FIXME use ClassMemberLocation.define Symbol sym; if (fdname instanceof Symbol) sym = (Symbol) fdname; else sym = Symbol.make(uri == null ? "" : uri, fdname.toString()); Environment env = Environment.getCurrent(); if (isAlias && isFinal) env.addLocation(sym, null, (Location) fvalue); else { Object property = null; if (isFinal && (fdecl.isProcedureDecl() || fvalue instanceof Macro) && (tr.getLanguage() .hasSeparateFunctionNamespace())) property = EnvironmentKey.FUNCTION; env.addLocation(sym, property, new ClassMemberLocation(instance, rfield)); } } */ // We create an alias in the current context that points // a dummy declaration in the exported module. Normally, // followAliases will skip the alias, so we use the latter. // But if the binding is re-exported (or EXTERNAL_ACCESS // gets set), then we need a separate declaration. // (If EXTERNAL_ACCESS, the field gets PRIVATE_PREFIX.) Object aname; if (fdname instanceof Symbol) aname = fdname; else { String sname = fdname.toString(); if (uri == null) aname = sname.intern(); else aname = Symbol.make(uri, sname); } try { Declaration adecl = defs.getDefine(aname, 'w', tr); adecl.setAlias(true); adecl.setIndirectBinding(true); Expression fexp; ReferenceExp fref; if (immediate) { if (isFinal && isStatic) { // An optimization. adecl.setType(fdecl.getType()); adecl.setAlias(false); adecl.setIndirectBinding(isAlias); } else fvalue = new FieldLocation(instance, t, fname); fexp = new QuoteExp(fvalue); adecl.setCanRead(true); fref = null; } else { fref = new ReferenceExp(fdecl); fref.context = decl; fref.setDontDereference(true); fexp = fref; adecl.setPrivate(true); } if ((rfield.getModifiers() & Access.FINAL) != 0 && ! isAlias) { adecl.setFlag(Declaration.IS_CONSTANT); } if (fdecl.isProcedureDecl()) adecl.setProcedureDecl(true); if (isStatic) adecl.setFlag(Declaration.STATIC_SPECIFIED); /* if (fvalue instanceof gnu.mapping.Location) { Declaration fdecl = new Declaration(aname, ftype); fdecl.base = decl; fdecl.field = fld; ReferenceExp ref = new ReferenceExp(fdecl); ref.setDontDereference(true); fexp = ref; } else { int j = 0; Method m; if (isStatic) { m = makeClassMemberLocation2; args = new Expression[2]; } else { m = makeClassMemberLocation3; args = new Expression[3]; args[j++] = new ReferenceExp(decl); } args[j++] = new QuoteExp(t.getName()); args[j++] = new QuoteExp(fname); fexp = new ApplyExp(m, args); } */ if (! immediate) { SetExp sexp = new SetExp(adecl, fexp); adecl.setFlag(Declaration.EARLY_INIT); sexp.setDefining(true); forms.addElement(sexp); } adecl.noteValue(fexp); adecl.setFlag(Declaration.IS_IMPORTED); adecl.setSimple(false); tr.push(adecl); // Add to translation env. } catch (Exception ex) { throw new WrappedException(ex); } } t = t.getSuperclass(); if (t == null) break; } if (isRunnable) { if (immediate) { forms.addElement(new ApplyExp(ClassType.make("gnu.expr.ModuleInfo") .getDeclaredMethod("getRunInstance", 0), new Expression[] { new QuoteExp(info)})); } else { Method run = Compilation.typeRunnable.getDeclaredMethod("run", 0); if (decl != null) // Need to make sure 'run' is invoked. dofind = new ReferenceExp(decl); else { if (instanceField != null) { //Optimization args = new Expression[] { new QuoteExp(type), new QuoteExp("$instance") }; dofind = new ApplyExp(SlotGet.staticField, args); } //else //dofind = Convert.makeCoercion(dofind, Type.void_type); } dofind = new ApplyExp(run, new Expression[] { dofind }); dofind.setLine(tr); forms.addElement(dofind); } } tr.mustCompileHere(); return true; } | 36952 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/36952/f525ea41b4380e2b2e69fbe8acaaeac1d8735f65/require.java/clean/kawa/standard/require.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1250,
1930,
7130,
261,
559,
618,
16,
514,
2003,
16,
5589,
10138,
16,
25083,
282,
5468,
2966,
17588,
16,
22416,
433,
13,
225,
288,
565,
9889,
2653,
273,
433,
18,
588,
3779,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1250,
1930,
7130,
261,
559,
618,
16,
514,
2003,
16,
5589,
10138,
16,
25083,
282,
5468,
2966,
17588,
16,
22416,
433,
13,
225,
288,
565,
9889,
2653,
273,
433,
18,
588,
3779,
56... |
StoreIncomingBlob redoRecorder = new StoreIncomingBlob(mDigest, mMsgSize, mMailboxIdList); redoRecorder.start(getTimestamp()); redoRecorder.setBlobBodyInfo(mData, mPath, mVolumeId); redoRecorder.log(); | StoreIncomingBlob redoRecorder = null; if (!getUnloggedReplay()) { redoRecorder = new StoreIncomingBlob(mDigest, mMsgSize, mMailboxIdList); redoRecorder.start(getTimestamp()); redoRecorder.setBlobBodyInfo(mData, mPath, mVolumeId); redoRecorder.log(); } | public void redo() throws Exception { // Execution of redo is logged to current redo logger. For most other // ops this is handled by Mailbox class, but StoreIncomingBlob is an // exception because of the way it is used in Mailbox. StoreIncomingBlob redoRecorder = new StoreIncomingBlob(mDigest, mMsgSize, mMailboxIdList); redoRecorder.start(getTimestamp()); redoRecorder.setBlobBodyInfo(mData, mPath, mVolumeId); redoRecorder.log(); boolean success = false; try { StoreManager.getInstance().storeIncoming(mData, mDigest, mPath, mVolumeId); success = true; } finally { if (success) redoRecorder.commit(); else redoRecorder.abort(); } } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/08650de5e4f902628b2f20a31d7080319cc9e188/StoreIncomingBlob.java/buggy/ZimbraServer/src/java/com/zimbra/cs/redolog/op/StoreIncomingBlob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
24524,
1435,
1216,
1185,
288,
3639,
368,
8687,
434,
24524,
353,
7545,
358,
783,
24524,
1194,
18,
225,
2457,
4486,
1308,
3639,
368,
6727,
333,
353,
7681,
635,
11542,
2147,
667,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
24524,
1435,
1216,
1185,
288,
3639,
368,
8687,
434,
24524,
353,
7545,
358,
783,
24524,
1194,
18,
225,
2457,
4486,
1308,
3639,
368,
6727,
333,
353,
7681,
635,
11542,
2147,
667,
... |
log.debug("RESPONSE: " + response.getText()); | if (log.isDebugEnabled()) { log.debug("RESPONSE: " + response.getText()); } | public void doTest(String jspName) throws Exception { WebRequest request = new GetMethodWebRequest(jspName); WebResponse response = runner.getResponse(request); log.debug("RESPONSE: " + response.getText()); WebTable[] tables = response.getTables(); assertEquals("Expected one table in result.", 1, tables.length); assertEquals("Column not grouped.", "", tables[0].getCellAsText(2, 0)); assertEquals("Column not grouped.", "", tables[0].getCellAsText(2, 1)); assertEquals("Column should not be grouped.", KnownValue.CAMEL, tables[0].getCellAsText(2, 2)); } | 7284 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7284/3b50c79e3280d9a33c9a06029bc6d0021644bdb0/GroupTest.java/clean/displaytag/src/test/java/org/displaytag/tags/GroupTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
4709,
12,
780,
22535,
461,
13,
1216,
1185,
565,
288,
3639,
2999,
691,
590,
273,
394,
968,
1305,
4079,
691,
12,
24926,
461,
1769,
3639,
2999,
1064,
766,
273,
8419,
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,
918,
741,
4709,
12,
780,
22535,
461,
13,
1216,
1185,
565,
288,
3639,
2999,
691,
590,
273,
394,
968,
1305,
4079,
691,
12,
24926,
461,
1769,
3639,
2999,
1064,
766,
273,
8419,
18,
58... |
debugMessage("reconfiguring item: begin"); | debug("reconfiguring item: begin"); | protected void reconfigItem() { debugMessage("reconfiguring item: begin"); Image old = _item.getImage(); Image icon = getIcon(); if (icon != null) { Rectangle bounds = icon.getBounds(); if ( (bounds.width > TAB_ICON_SIZE) || (bounds.height > TAB_ICON_SIZE) ) icon = ImageUtil.resize(icon, TAB_ICON_SIZE, TAB_ICON_SIZE, true); _item.setImage(icon); } else { _item.setImage(null); } if (old != null) ImageUtil.dispose(old); _item.setText((null != getName() ? getName() : "")); _item.setToolTipText((null != getDescription() ? getDescription() : "")); debugMessage("reconfiguring item: complete"); } | 27487 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27487/faa7191e3c6c23c9bf8c3a1ef3c62476b25b1150/BrowserTab.java/buggy/src/syndie/gui/BrowserTab.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
283,
1425,
1180,
1435,
288,
3639,
1198,
2932,
266,
1425,
4017,
761,
30,
2376,
8863,
3639,
3421,
1592,
273,
389,
1726,
18,
588,
2040,
5621,
3639,
3421,
4126,
273,
21724,
5621,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
283,
1425,
1180,
1435,
288,
3639,
1198,
2932,
266,
1425,
4017,
761,
30,
2376,
8863,
3639,
3421,
1592,
273,
389,
1726,
18,
588,
2040,
5621,
3639,
3421,
4126,
273,
21724,
5621,
3... |
String canonicalName = cs.name (); | String canonicalName = cs.name().toLowerCase(); | private void addCharset (Charset cs) { String canonicalName = cs.name (); charsets.put (canonicalName, cs); for (Iterator i = cs.aliases ().iterator (); i.hasNext (); ) canonicalNames.put (i.next (), canonicalName); } | 1739 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1739/8b9521b543363733791b0cb3aa8b0aad118ae75e/Provider.java/clean/libjava/gnu/java/nio/charset/Provider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
527,
9652,
261,
9652,
2873,
13,
225,
288,
565,
514,
7378,
461,
273,
2873,
18,
529,
7675,
869,
5630,
5621,
565,
1149,
4424,
18,
458,
261,
18288,
461,
16,
2873,
1769,
565,
364,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
9652,
261,
9652,
2873,
13,
225,
288,
565,
514,
7378,
461,
273,
2873,
18,
529,
7675,
869,
5630,
5621,
565,
1149,
4424,
18,
458,
261,
18288,
461,
16,
2873,
1769,
565,
364,... |
setText(s); | public void setTextContents(String s) throws NotImplementedException { // TODO } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
7883,
12,
87,
1769,
7883,
12,
87,
1769,
7883,
12,
87,
1769,
7883,
12,
87,
1769,
1071,
542,
1528,
12,
87,
1769,
918,
542,
1528,
12,
87,
1769,
7883,
6323,
12,
780,
542,
1528,
12,
87,
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,
7883,
12,
87,
1769,
7883,
12,
87,
1769,
7883,
12,
87,
1769,
7883,
12,
87,
1769,
1071,
542,
1528,
12,
87,
1769,
918,
542,
1528,
12,
87,
1769,
7883,
6323,
12,
780,
542,
1528,
12,
87,
1769,
... | |
AST __t1779 = _t; | AST __t1783 = _t; | public final void putstate(AST _t) throws RecognitionException { AST putstate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t1767 = _t; AST tmp1127_AST_in = (AST)_t; match(_t,PUT); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; if ((_t.getType()==STREAM)) { stream_name(_t); _t = _retTree; } else if ((_tokenSet_20.member(_t.getType()))) { } else { throw new NoViableAltException(_t); } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case CONTROL: { AST tmp1128_AST_in = (AST)_t; match(_t,CONTROL); _t = _t.getNextSibling(); break; } case UNFORMATTED: { AST tmp1129_AST_in = (AST)_t; match(_t,UNFORMATTED); _t = _t.getNextSibling(); break; } default: if (_t==null) _t=ASTNULL; if ((_tokenSet_21.member(_t.getType()))) { } else { throw new NoViableAltException(_t); } } } { _loop1782: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case SKIP: { skipphrase(_t); _t = _retTree; break; } case SPACE: { spacephrase(_t); _t = _retTree; break; } default: boolean synPredMatched1774 = false; if (_t==null) _t=ASTNULL; if (((_t.getType()==NULL_KW))) { AST __t1774 = _t; synPredMatched1774 = true; inputState.guessing++; try { { AST __t1772 = _t; AST tmp1130_AST_in = (AST)_t; match(_t,NULL_KW); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LEFTPAREN: { AST tmp1131_AST_in = (AST)_t; match(_t,LEFTPAREN); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1772; _t = _t.getNextSibling(); } } catch (RecognitionException pe) { synPredMatched1774 = false; } _t = __t1774;inputState.guessing--; } if ( synPredMatched1774 ) { AST __t1775 = _t; AST tmp1132_AST_in = (AST)_t; match(_t,NULL_KW); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LEFTPAREN: { funargs(_t); _t = _retTree; break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1775; _t = _t.getNextSibling(); } else if ((_tokenSet_4.member(_t.getType()))) { expression(_t); _t = _retTree; { _loop1781: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case FORMAT: { AST __t1778 = _t; AST tmp1133_AST_in = (AST)_t; match(_t,FORMAT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1778; _t = _t.getNextSibling(); break; } case AT: { AST __t1779 = _t; AST tmp1134_AST_in = (AST)_t; match(_t,AT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1779; _t = _t.getNextSibling(); break; } case TO: { AST __t1780 = _t; AST tmp1135_AST_in = (AST)_t; match(_t,TO); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1780; _t = _t.getNextSibling(); break; } default: { break _loop1781; } } } while (true); } } else { break _loop1782; } } } while (true); } state_end(_t); _t = _retTree; _t = __t1767; _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,
1378,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
1378,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1378,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
1378,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053... |
public void setMessage(String newMessage, int newType) { message = newMessage; messageType = newType; | public void setMessage(String newMessage) { setMessage(newMessage, NONE); | public void setMessage(String newMessage, int newType) { message = newMessage; messageType = newType; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/5abf6fabfddc9bb4eb33acac1f3b4c05f76ac7b1/DialogPage.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
15227,
12,
780,
394,
1079,
16,
509,
23319,
13,
288,
3639,
883,
273,
394,
1079,
31,
3639,
22402,
273,
23319,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
15227,
12,
780,
394,
1079,
16,
509,
23319,
13,
288,
3639,
883,
273,
394,
1079,
31,
3639,
22402,
273,
23319,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
"Possible Bugzilla Failure", | "Possible Bugzilla Client Failure", | protected void execute(final IProgressMonitor monitor) throws CoreException { try { form.post(); PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable(){ public void run() { // TODO what do we do if the editor is closed if (ExistingBugEditor.this != null && !ExistingBugEditor.this.isDisposed()) { changeDirtyStatus(false); BugzillaPlugin.getDefault().getWorkbench() .getActiveWorkbenchWindow().getActivePage() .closeEditor(ExistingBugEditor.this, true); } OfflineView.removeReport(bug); } }); } catch (final BugzillaException e) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { BugzillaPlugin.getDefault().logAndShowExceptionDetailsDialog( e, "occurred while posting the bug.", "I/O Error"); } }); submitButton.setEnabled(true); ExistingBugEditor.this.showBusy(false); } catch (final PossibleBugzillaFailureException e) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { WebBrowserDialog.openAcceptAgreement(null, "Possible Bugzilla Failure", "Bugzilla may not have posted your bug.\n" + e.getMessage(), form.getError()); BugzillaPlugin.log(e); } }); submitButton.setEnabled(true); ExistingBugEditor.this.showBusy(false); } catch (final LoginException e) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { MessageDialog.openError(null, "Login Error", "Bugzilla could not post your bug since your login name or password is incorrect.\nPlease check your settings in the bugzilla preferences. "); } }); submitButton.setEnabled(true); ExistingBugEditor.this.showBusy(false); } } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/e0585963d6415b2b9656625939c1d2145719eafc/ExistingBugEditor.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/editor/ExistingBugEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
1117,
918,
1836,
12,
6385,
467,
5491,
7187,
6438,
13,
6862,
202,
15069,
30015,
288,
9506,
202,
698,
288,
6862,
202,
687,
18,
2767,
5621,
6862,
202,
8201,
5370,
18,
588,
2421,
22144,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
1117,
918,
1836,
12,
6385,
467,
5491,
7187,
6438,
13,
6862,
202,
15069,
30015,
288,
9506,
202,
698,
288,
6862,
202,
687,
18,
2767,
5621,
6862,
202,
8201,
5370,
18,
588,
2421,
22144,... |
GUI.startView(de.willuhn.jameica.fibu.gui.views.BuchungListe.class,null); | GUI.startView(de.willuhn.jameica.fibu.gui.views.BuchungListe.class,context); | public void handleAction(Object context) throws ApplicationException { GUI.startView(de.willuhn.jameica.fibu.gui.views.BuchungListe.class,null); } | 47584 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47584/5be46f337965e08dfa80c210ca2a97dbb334da07/BuchungListe.java/clean/src/de/willuhn/jameica/fibu/gui/action/BuchungListe.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1640,
1803,
12,
921,
819,
13,
1216,
28816,
225,
288,
565,
10978,
18,
1937,
1767,
12,
323,
18,
20194,
89,
76,
82,
18,
78,
339,
26433,
18,
74,
495,
89,
18,
20292,
18,
7061,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1640,
1803,
12,
921,
819,
13,
1216,
28816,
225,
288,
565,
10978,
18,
1937,
1767,
12,
323,
18,
20194,
89,
76,
82,
18,
78,
339,
26433,
18,
74,
495,
89,
18,
20292,
18,
7061,
... |
if(response!=null) { return response; } | public Object getPayload() { if(response!=null) { return response; } if(in!=null) { return in; } return nullPayload; } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/ac61a4c8fd733ad8da69574e3acbf85511d4472f/StreamMessageAdapter.java/buggy/mule/src/main/java/org/mule/providers/streaming/StreamMessageAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
19275,
1435,
288,
3639,
309,
12,
2740,
5,
33,
2011,
13,
288,
5411,
327,
766,
31,
3639,
289,
3639,
309,
12,
267,
5,
33,
2011,
13,
288,
5411,
327,
316,
31,
3639,
289,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
19275,
1435,
288,
3639,
309,
12,
2740,
5,
33,
2011,
13,
288,
5411,
327,
766,
31,
3639,
289,
3639,
309,
12,
267,
5,
33,
2011,
13,
288,
5411,
327,
316,
31,
3639,
289,
3639,
... | |
angle = angle + addAngle; | angle = angle + addAngle; | public void populatePolygonCorners(Vector atomsToDraw, Point2d rotationCenter, double startAngle, double addAngle, double radius) { Atom connectAtom = null; double angle = startAngle; double newX; double newY; double x; double y; logger.debug("populatePolygonCorners->startAngle: ", Math.toDegrees(angle)); Vector points = new Vector(); Atom atom = null; logger.debug(" centerX:", rotationCenter.x); logger.debug(" centerY:", rotationCenter.y); logger.debug(" radius :", radius); for (int i = 0; i < atomsToDraw.size(); i++) { angle = angle + addAngle; if (angle >= 2.0 * Math.PI) { angle -= 2.0 * Math.PI; } logger.debug("populatePolygonCorners->angle: ", Math.toDegrees(angle)); x = Math.cos(angle) * radius; y = Math.sin(angle) * radius; newX = x + rotationCenter.x; newY = y + rotationCenter.y; logger.debug(" newX:", newX); logger.debug(" newY:", newY); points.addElement(new Point2d(newX, newY)); if (logger.isDebugEnabled()) try { logger.debug("populatePolygonCorners->connectAtom: " + (molecule.getAtomNumber(connectAtom) + 1) + " placed at " + connectAtom.getPoint2d()); } catch (Exception exc) { //nothing to catch here. This is just for logging } } for (int i = 0; i < atomsToDraw.size(); i++) { connectAtom = (Atom) atomsToDraw.elementAt(i); connectAtom.setPoint2d((Point2d) points.elementAt(i)); connectAtom.setFlag(CDKConstants.ISPLACED, true); } } | 46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/f4a9dcb7738a0078daa9b6cc35cec13ebc5a3207/AtomPlacer.java/clean/src/org/openscience/cdk/layout/AtomPlacer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
6490,
11787,
6217,
9646,
12,
5018,
9006,
774,
6493,
16,
4686,
22,
72,
6752,
8449,
16,
1645,
787,
8467,
16,
1645,
527,
8467,
16,
1645,
5725,
13,
202,
95,
202,
202,
3641,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6490,
11787,
6217,
9646,
12,
5018,
9006,
774,
6493,
16,
4686,
22,
72,
6752,
8449,
16,
1645,
787,
8467,
16,
1645,
527,
8467,
16,
1645,
5725,
13,
202,
95,
202,
202,
3641,
... |
StringBuilder buffer = new StringBuilder(); TypeInterface elType = array.getElementType(); if (elType instanceof TypeInstantiation) { ExpressionEmitter exprEmitter = new ExpressionEmitter(); TypeInstantiation inst = (TypeInstantiation)elType; Iterable<Expression> arguments = inst.getArguments(); for (Expression arg : arguments) { String javaArg = exprEmitter.emit(arg); buffer.append(", "); buffer.append(javaArg); } /* CompoundType compound = inst.getBaseType(); CompoundEmitter ce = null; if (compound instanceof SequenceType) { ce = new SequenceEmitter(null, (SequenceType)compound); } else if (compound instanceof UnionType) { ce = new UnionEmitter(null, (UnionType)compound); } if (ce != null) { result = ce.getActualParameterList(); } */ } return buffer.toString(); | StringBuilder buffer = new StringBuilder(); TypeInterface elType = array.getElementType(); if (elType instanceof TypeInstantiation) { ExpressionEmitter exprEmitter = new ExpressionEmitter(); TypeInstantiation inst = (TypeInstantiation) elType; Iterable<Expression> arguments = inst.getArguments(); for (Expression arg : arguments) { String javaArg = exprEmitter.emit(arg); buffer.append(", "); buffer.append(javaArg); } } return buffer.toString(); | public String getActualParameterList() { StringBuilder buffer = new StringBuilder(); TypeInterface elType = array.getElementType(); if (elType instanceof TypeInstantiation) { ExpressionEmitter exprEmitter = new ExpressionEmitter(); TypeInstantiation inst = (TypeInstantiation)elType; Iterable<Expression> arguments = inst.getArguments(); for (Expression arg : arguments) { String javaArg = exprEmitter.emit(arg); buffer.append(", "); buffer.append(javaArg); } /* CompoundType compound = inst.getBaseType(); CompoundEmitter ce = null; if (compound instanceof SequenceType) { ce = new SequenceEmitter(null, (SequenceType)compound); } else if (compound instanceof UnionType) { ce = new UnionEmitter(null, (UnionType)compound); } if (ce != null) { result = ce.getActualParameterList(); }*/ } return buffer.toString(); } | 57502 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57502/927ade2ec2397ef48ee3d4b21e29c5c9b7eccde2/ArrayEmitter.java/clean/trunk/dstools-antlr/src/datascript/emit/java/ArrayEmitter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
20208,
1662,
682,
1435,
565,
288,
377,
202,
21253,
1613,
273,
394,
3225,
5621,
377,
202,
559,
1358,
415,
559,
273,
526,
18,
588,
17481,
5621,
377,
202,
377,
202,
430,
261,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
20208,
1662,
682,
1435,
565,
288,
377,
202,
21253,
1613,
273,
394,
3225,
5621,
377,
202,
559,
1358,
415,
559,
273,
526,
18,
588,
17481,
5621,
377,
202,
377,
202,
430,
261,
29... |
results.add(row); | results.add(row); | public List rows(String sql) throws SQLException { List results = new ArrayList(); Connection connection = createConnection(); Statement statement = connection.createStatement(); configure(statement); ResultSet rs = null; try { log.fine(sql); rs = statement.executeQuery(sql); while (rs.next()) { ResultSetMetaData metadata = rs.getMetaData(); LinkedHashMap lhm = new LinkedHashMap(metadata.getColumnCount(),1,true); for(int i=1 ; i<=metadata.getColumnCount() ; i++) { lhm.put(metadata.getColumnName(i),rs.getObject(i)); } GroovyRowResult row = new GroovyRowResult(lhm); results.add(row); } return(results); } catch (SQLException e) { log.log(Level.FINE, "Failed to execute: " + sql, e); throw e; } finally { closeResources(connection, statement, rs); } } | 6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/c7f166c8667836098e1b5d24208dcf93c2f4669c/Sql.java/buggy/src/main/groovy/sql/Sql.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1377,
1071,
987,
2595,
12,
780,
1847,
13,
1216,
6483,
288,
377,
202,
682,
1686,
273,
394,
2407,
5621,
3639,
4050,
1459,
273,
27870,
5621,
3639,
8056,
3021,
273,
1459,
18,
2640,
3406,
5621,
363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1377,
1071,
987,
2595,
12,
780,
1847,
13,
1216,
6483,
288,
377,
202,
682,
1686,
273,
394,
2407,
5621,
3639,
4050,
1459,
273,
27870,
5621,
3639,
8056,
3021,
273,
1459,
18,
2640,
3406,
5621,
363... |
else if(property.isManyToMany()) { if(!property.isOwningSide()) collection.setInverse(true); bindSimpleValue( property,key,mappings ); | else if(property.isManyToMany() /*&& property.isOwningSide()*/) { bindDependentKeyValue(property,key,mappings); | private static void bindCollectionSecondPass(GrailsDomainClassProperty property, Mappings mappings, Map persistentClasses, Collection collection, Map inheritedMetas) { PersistentClass associatedClass = null; // Configure one-to-many if(collection.isOneToMany()) { OneToMany oneToMany = (OneToMany)collection.getElement(); String associatedClassName = oneToMany.getReferencedEntityName(); associatedClass = (PersistentClass)persistentClasses.get(associatedClassName); // if there is no persistent class for the association throw // exception if(associatedClass == null) { throw new MappingException( "Association references unmapped class: " + oneToMany.getReferencedEntityName() ); } oneToMany.setAssociatedClass( associatedClass ); if(!property.isManyToMany()) collection.setCollectionTable( associatedClass.getTable() ); collection.setLazy(true); // is it sorted? if(SortedSet.class.isAssignableFrom(property.getType())) { collection.setSorted(true); } LOG.info( "Mapping collection: " + collection.getRole() + " -> " + collection.getCollectionTable().getName() ); } // setup the primary key references KeyValue keyValue; String propertyRef = collection.getReferencedPropertyName(); // this is to support mapping by a property if(propertyRef == null) { keyValue = collection.getOwner().getIdentifier(); } else { keyValue = (KeyValue)collection.getOwner().getProperty( propertyRef ).getValue(); } DependantValue key = new DependantValue(collection.getCollectionTable(), keyValue); key.setTypeName(null); // if(property.isBidirectional()) { GrailsDomainClassProperty otherSide = property.getOtherSide(); if(otherSide.isManyToOne()) { collection.setInverse(true); Iterator mappedByColumns = associatedClass.getProperty( otherSide.getName() ).getValue().getColumnIterator(); while(mappedByColumns.hasNext()) { Column column = (Column)mappedByColumns.next(); linkValueUsingAColumnCopy(otherSide,column,key); } } else if(property.isManyToMany()) { if(!property.isOwningSide()) collection.setInverse(true); bindSimpleValue( property,key,mappings ); } } else { bindSimpleValue( property,key,mappings ); } collection.setKey( key ); // make required and non-updateable key.setNullable(false); key.setUpdateable(false); // if we have a many-to-many// if(property.isManyToMany()) {// ManyToOne element = new ManyToOne( collection.getCollectionTable() );// collection.setElement(element);// bindManyToOne(property,element, mappings);// } else if ( property.isOneToMany() && !property.isBidirectional() ) { // for non-inverse one-to-many, with a not-null fk, add a backref! OneToMany oneToMany = (OneToMany) collection.getElement(); String entityName = oneToMany.getReferencedEntityName(); PersistentClass referenced = mappings.getClass( entityName ); Backref prop = new Backref(); prop.setEntityName(property.getDomainClass().getFullName()); prop.setName('_' + property.getDomainClass().getShortName() + '_' + property.getName() + "Backref" ); prop.setUpdateable( true ); prop.setInsertable( true ); prop.setCollectionRole( collection.getRole() ); prop.setValue( collection.getKey() ); prop.setOptional( true ); referenced.addProperty( prop ); } } | 52953 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52953/fe351f9f0f376d45dd59d502c6d56321bf14f907/GrailsDomainBinder.java/clean/src/persistence/org/codehaus/groovy/grails/orm/hibernate/cfg/GrailsDomainBinder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
1993,
2532,
8211,
6433,
12,
14571,
14573,
3748,
797,
1396,
1272,
16,
1635,
4675,
7990,
16,
1635,
9195,
4818,
16,
2200,
1849,
16,
1635,
12078,
30853,
13,
288,
202,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
1993,
2532,
8211,
6433,
12,
14571,
14573,
3748,
797,
1396,
1272,
16,
1635,
4675,
7990,
16,
1635,
9195,
4818,
16,
2200,
1849,
16,
1635,
12078,
30853,
13,
288,
202,
202... |
List<DataProxy> runners = AbstractEngine.getDataContext().retrieveByRestriction( YNetRunner.class, new LogicalRestriction( new PropertyRestriction( "archived", Comparison.EQUAL, false), Operation.AND, new PropertyRestriction( "YNetID", Comparison.EQUAL, "singletask" ) ), null ); /* * When we cancel a case, should we * delete all its workItems??? * */ List items = context.retrieveAll(YWorkItem.class, null); | List<DataProxy> runners = AbstractEngine.getDataContext().retrieveByRestriction( YNetRunner.class, new LogicalRestriction( new PropertyRestriction( "archived", Comparison.EQUAL, false), Operation.AND, new PropertyRestriction( "YNetID", Comparison.EQUAL, "singletask" ) ), null ); /* * When we cancel a case, should we * delete all its workItems??? * */ List items = context.retrieveAll(YWorkItem.class, null); | public void testTransaction() { try { System.out.println("Testing transactions"); StringProducer spx = StringProducerYAWL.getInstance(); File f = spx.getTranslatedFile("SingleTask.xml", true); YEngineInterface engine = (YEngineInterface) EngineFactory.getTransactionalEngine(); DataContext context = AbstractEngine.getDataContext(); LinkedList errors = new LinkedList(); engine.addSpecifications(f, false, errors); String caseid_string = engine.launchCase("test", "singletask", null, null); System.out.println(engine.getStateForCase(caseid_string)); List<DataProxy> runners = AbstractEngine.getDataContext().retrieveByRestriction( YNetRunner.class, new LogicalRestriction( new PropertyRestriction( "archived", Comparison.EQUAL, false), Operation.AND, new PropertyRestriction( "YNetID", Comparison.EQUAL, "singletask" ) ), null ); /* * When we cancel a case, should we * delete all its workItems??? * */ List items = context.retrieveAll(YWorkItem.class, null); //System.out.println(runners.size()); //System.out.println(items.size()); assertTrue("" + runners.size(), runners.size()==1); //assertTrue(items.size()==1); YIdentifier caseid = engine.getCaseID(caseid_string); engine.cancelCase(caseid); engine.unloadSpecification("singletask"); //EngineClearer.clear(engine); System.out.println(engine.getStateForCase(caseid_string)); } catch (Exception e) { StringWriter sw = new StringWriter(); sw.write( e.toString() + "\n" ); e.printStackTrace(new PrintWriter(sw)); fail( sw.toString() ); } } | 51637 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51637/8bb1bc0b226c7853a6ed2d9451cc4db680fe84d8/TestPersistenceTransactions.java/buggy/yawl/test/au/edu/qut/yawl/persistence/engine/TestPersistenceTransactions.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
3342,
1435,
288,
202,
202,
698,
288,
6862,
202,
3163,
18,
659,
18,
8222,
2932,
22218,
8938,
8863,
1082,
202,
780,
12140,
1694,
92,
273,
514,
12140,
61,
12999,
48,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3342,
1435,
288,
202,
202,
698,
288,
6862,
202,
3163,
18,
659,
18,
8222,
2932,
22218,
8938,
8863,
1082,
202,
780,
12140,
1694,
92,
273,
514,
12140,
61,
12999,
48,
1... |
throw new TypeError(runtime, name + " is not a module."); | throw getRuntime().newTypeError(name + " is not a module."); | public RubyModule defineModuleUnder(String name) { IRubyObject type = getConstantAt(name); if (type == null) { return (RubyModule) setConstant(name, getRuntime().defineModuleUnder(name, this)); } if (!(type instanceof RubyModule)) { throw new TypeError(runtime, name + " is not a module."); } return (RubyModule) type; } | 49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyModule.java/buggy/src/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
3120,
4426,
3120,
14655,
12,
780,
508,
13,
288,
3639,
15908,
10340,
921,
618,
273,
24337,
861,
12,
529,
1769,
7734,
309,
261,
723,
422,
446,
13,
288,
5411,
327,
261,
54,
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,
1071,
19817,
3120,
4426,
3120,
14655,
12,
780,
508,
13,
288,
3639,
15908,
10340,
921,
618,
273,
24337,
861,
12,
529,
1769,
7734,
309,
261,
723,
422,
446,
13,
288,
5411,
327,
261,
54,
10... |
messageBuffer.append( "inside the definition for plugin: \'" + mojo.getPluginDescriptor().getArtifactId() + "\'specify the following:\n\n<configuration>\n ...\n <" + param.getName() + ">VALUE</" + param.getName() + ">\n</configuration>" ); | messageBuffer.append( "inside the definition for plugin: \'" + mojo.getPluginDescriptor().getArtifactId() + "\'specify the following:\n\n<configuration>\n ...\n <" + param.getName() + ">VALUE</" + param.getName() + ">\n</configuration>" ); | private void decomposeParameterIntoUserInstructions( MojoDescriptor mojo, Parameter param, StringBuffer messageBuffer ) { String expression = param.getExpression(); if ( param.isEditable() ) { messageBuffer.append( "inside the definition for plugin: \'" + mojo.getPluginDescriptor().getArtifactId() + "\'specify the following:\n\n<configuration>\n ...\n <" + param.getName() + ">VALUE</" + param.getName() + ">\n</configuration>" ); String alias = param.getAlias(); if ( StringUtils.isNotEmpty( alias ) ) { messageBuffer.append( "\n\n-OR-\n\n<configuration>\n ...\n <" + alias + ">VALUE</" + alias + ">\n</configuration>\n" ); } } if ( StringUtils.isEmpty( expression ) ) { messageBuffer.append( "." ); } else { StringBuffer expressionMessageBuffer = new StringBuffer(); if ( param.isEditable() ) { expressionMessageBuffer.append( "\n\n-OR-\n\n" ); } Matcher exprMatcher = Pattern.compile( "\\$\\{(.+)\\}" ).matcher( expression ); boolean unmodifiableElementsFound = false; boolean activeElementsFound = false; int elementCount = 0; while ( exprMatcher.find() ) { elementCount++; activeElementsFound = true; String subExpression = exprMatcher.group( 1 ); StringTokenizer expressionParts = new StringTokenizer( subExpression, "." ); String firstPart = expressionParts.nextToken(); if ( expressionParts.hasMoreTokens() && ( "project".equals( firstPart ) || "settings".equals( firstPart ) ) ) { addParameterConfigDocumentation( firstPart, exprMatcher.group( 0 ), subExpression, expressionMessageBuffer ); } else if ( UNMODIFIABLE_EXPRESSIONS.contains( subExpression ) ) { unmodifiableElementsFound = true; } else { expressionMessageBuffer.append( "on the command line, specify: \'-D" ).append( subExpression ).append("=VALUE\'" ); } } if ( activeElementsFound ) { messageBuffer.append( expressionMessageBuffer ); } else { messageBuffer.append( " (found static expression: \'" + expression + "\' which may act as a default value).\n" ); } if ( unmodifiableElementsFound ) { if ( elementCount > 1 ) { messageBuffer.append( " " ); } messageBuffer.append( "NOTE: One or more purely derived expression elements were detected in \'" + expression + "\'.\n If you continue to get this error after any other expression elements are specified correctly," + "\n please report this issue to the Maven development team.\n" ); } } } | 50542 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50542/63b3f71f6d4ab4ca0093d626eb5551c5c567120a/PluginConfigurationDiagnoser.java/clean/maven-core/src/main/java/org/apache/maven/usability/PluginConfigurationDiagnoser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
24476,
1662,
5952,
1299,
26712,
12,
15931,
3187,
312,
10007,
16,
5498,
579,
16,
4766,
7682,
6674,
883,
1892,
262,
565,
288,
3639,
514,
2652,
273,
579,
18,
588,
2300,
5621,
3639... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
24476,
1662,
5952,
1299,
26712,
12,
15931,
3187,
312,
10007,
16,
5498,
579,
16,
4766,
7682,
6674,
883,
1892,
262,
565,
288,
3639,
514,
2652,
273,
579,
18,
588,
2300,
5621,
3639... |
private String createSelect(DFAgentDescription dfdTemplate){ | private String createSelect(DFAgentDescription dfdTemplate) throws Exception { | private String createSelect(DFAgentDescription dfdTemplate){ StringBuffer select = new StringBuffer("SELECT dfagentdescr.aid, dfagentdescr.lease FROM dfagentdescr"); List lAs = new ArrayList(); List lWhere = new ArrayList(); // Name AID agentAID = dfdTemplate.getName(); if(agentAID != null){ lWhere.add(" dfagentdescr.aid = '"+agentAID.getName()+"'"); } // Lease time Date lease = dfdTemplate.getLeaseTime(); if(lease != null){ lWhere.add(" dfagentdescr.lease = '-1' OR dfagentdescr.lease > '"+lease.getTime()+"'"); } // Languages Iterator iter = dfdTemplate.getAllLanguages(); int i=0; while(iter.hasNext()){ String tmp = "language"+i; lAs.add(", language AS "+tmp); lWhere.add(tmp+".language='"+(String)iter.next()+"'"); lWhere.add(tmp+".aid=dfagentdescr.aid"); i++; } // Ontologies iter = dfdTemplate.getAllOntologies(); i = 0; while(iter.hasNext()){ String tmp = "ontology"+i; lAs.add(", ontology AS "+tmp); lWhere.add(tmp+".ontology='"+(String)iter.next()+"'"); lWhere.add(tmp+".aid=dfagentdescr.aid"); i++; } // Protocols iter = dfdTemplate.getAllProtocols(); i = 0; while(iter.hasNext()){ String tmp = "protocol"+i; lAs.add(", protocol AS "+tmp); lWhere.add(tmp+".protocol='"+(String)iter.next()+"'"); lWhere.add(tmp+".aid=dfagentdescr.aid"); i++; } // Services iter = dfdTemplate.getAllServices(); i = 0; while(iter.hasNext()){ ServiceDescription service = (ServiceDescription)iter.next(); String serviceName = service.getName(); String serviceType = service.getType(); String serviceOwner = service.getOwnership(); // Service name, type and ownership String tmp = "service"+i; lAs.add(", service AS "+tmp); if(serviceName != null){ lWhere.add(tmp+".sname='"+serviceName+"'"); } if(serviceType != null){ lWhere.add(tmp+".stype='"+serviceType+"'"); } if(serviceOwner != null){ lWhere.add(tmp+".sownership='"+serviceOwner+"'"); } lWhere.add(tmp+".aid=dfagentdescr.aid"); i++; // Service languages Iterator iterS = service.getAllLanguages(); int j = 0; while(iterS.hasNext()){ String tmp1 = "servicelanguage"+j; lAs.add(", servicelanguage AS "+tmp1); lWhere.add(tmp1+".language='"+(String)iterS.next()+"'"); lWhere.add(tmp1+".aid=dfagentdescr.aid"); j++; } // Service ontologies iterS = service.getAllOntologies(); j = 0; while(iterS.hasNext()){ String tmp1 = "serviceontology"+j; lAs.add(", serviceontology AS "+tmp1); lWhere.add(tmp1+".ontology='"+(String)iterS.next()+"'"); lWhere.add(tmp1+".aid=dfagentdescr.aid"); j++; } // Service protocols iterS = service.getAllProtocols(); j = 0; while(iterS.hasNext()){ String tmp1 = "serviceprotocol"+j; lAs.add(", serviceprotocol AS "+tmp1); lWhere.add(tmp1+".protocol='"+(String)iterS.next()+"'"); lWhere.add(tmp1+".aid=dfagentdescr.aid"); j++; } // Service properties iterS = service.getAllProperties(); j = 0; while(iterS.hasNext()){ String tmp1 = "serviceproperty"+j; lAs.add(", serviceproperty AS "+tmp1); Property prop = (Property) iterS.next(); lWhere.add(tmp1+".propkey='"+prop.getName()+"' and "+tmp1+".propval='"+prop.getValue().toString()+"'"); lWhere.add(tmp1+".aid=dfagentdescr.aid"); j++; } } // Concatenate all AS iter = lAs.iterator(); while (iter.hasNext()) { select.append((String) iter.next()); } // Concatenate all WHERE if (lWhere.size() > 0) { select.append(" WHERE "); } iter = lWhere.iterator(); i = 0; while (iter.hasNext()) { if(i > 0) { select.append(" and "); } select.append((String) iter.next()); ++i; } return select.toString(); } | 5505 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5505/38d217b88886a386e2b9e42d9dee681a431b19cd/DFDBKB.java/clean/src/jade/domain/DFDBKB.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
752,
3391,
12,
40,
2046,
75,
319,
3291,
3013,
72,
2283,
15329,
1082,
202,
780,
1892,
2027,
273,
394,
6674,
2932,
4803,
3013,
5629,
28313,
18,
20736,
16,
3013,
5629,
28313,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
752,
3391,
12,
40,
2046,
75,
319,
3291,
3013,
72,
2283,
15329,
1082,
202,
780,
1892,
2027,
273,
394,
6674,
2932,
4803,
3013,
5629,
28313,
18,
20736,
16,
3013,
5629,
28313,... |
vars.put(refName + "_matchNr", "" + matches.size()); | vars.put(refName + REF_MATCH_NR, "" + matches.size()); | public void process() { initTemplate(); JMeterContext context = getThreadContext(); if (context.getPreviousResult() == null || context.getPreviousResult().getResponseData() == null) { return; } log.debug("RegexExtractor processing result"); // Fetch some variables JMeterVariables vars = context.getVariables(); String refName = getRefName(); int matchNumber = getMatchNumber(); vars.put(refName, getDefaultValue()); Perl5Matcher matcher = (Perl5Matcher) localMatcher.get(); PatternMatcherInput input = new PatternMatcherInput(useHeaders() ? context.getPreviousResult() .getResponseHeaders() : new String(context.getPreviousResult().getResponseData())); log.debug("Regex = " + getRegex()); try { Pattern pattern = patternCache.getPattern(getRegex(), Perl5Compiler.READ_ONLY_MASK); List matches = new ArrayList(); int x = 0; boolean done = false; do { if (matcher.contains(input, pattern)) { log.debug("RegexExtractor: Match found!"); matches.add(matcher.getMatch()); } else { done = true; } x++; } while (x != matchNumber && !done); try { MatchResult match; if (matchNumber >= 0) {// Original match behaviour match = getCorrectMatch(matches, matchNumber); if (match != null) { vars.put(refName, generateResult(match)); saveGroups(vars, refName, match); } } else // < 0 means we save all the matches { int prevCount = 0; String prevString = vars.get(refName + "_matchNr"); if (prevString != null) { try { prevCount = Integer.parseInt(prevString); } catch (NumberFormatException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } vars.put(refName + "_matchNr", "" + matches.size());// Save // the // count for (int i = 1; i <= matches.size(); i++) { match = getCorrectMatch(matches, i); if (match != null) { vars.put(refName + "_" + i, generateResult(match)); saveGroups(vars, refName + "_" + i, match); } } for (int i = matches.size() + 1; i <= prevCount; i++) { vars.remove(refName + "_" + i); vars.remove(refName + "_" + i + "_g0");// Remove known // groups ... vars.remove(refName + "_" + i + "_g1");// ... // TODO remove other groups if present? } } } catch (RuntimeException e) { log.warn("Error while generating result"); } } catch (MalformedCachePatternException e) { log.warn("Error in pattern: " + getRegex()); } } | 50179 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50179/704a4705c2a23947abe2e4e37e6e56ecbf1c6948/RegexExtractor.java/buggy/src/components/org/apache/jmeter/extractor/RegexExtractor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1207,
1435,
288,
202,
202,
2738,
2283,
5621,
202,
202,
46,
16935,
1042,
819,
273,
24459,
1042,
5621,
202,
202,
430,
261,
2472,
18,
588,
8351,
1253,
1435,
422,
446,
747,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1207,
1435,
288,
202,
202,
2738,
2283,
5621,
202,
202,
46,
16935,
1042,
819,
273,
24459,
1042,
5621,
202,
202,
430,
261,
2472,
18,
588,
8351,
1253,
1435,
422,
446,
747,
8... |
private void restyle(InlineBox ib) { | private void restyle(Box ib) { | private void restyle(InlineBox ib) { if(prev == ib) { return; } if(ib == null) panel.hovered_element = null; else panel.hovered_element = ib.getRealElement(); // if moved out of the old block then unstyle it if(prev != null) { boolean restyled = panel.getContext().css.wasHoverRestyled(prev.getRealElement()); //u.p("previous was styled = " + restyled); //u.p("prev = " + prev); CalculatedStyle style = panel.getContext().css.getStyle(prev.getRealElement()); //u.p("prev calc style = " + style); //u.p("prev color = " + style.getColor()); if(restyled) { Layout lt = LayoutFactory.getLayout(prev.getRealElement()); if(lt instanceof InlineLayout) { ((InlineLayout)lt).restyle(panel.getContext(), prev); panel.repaint(); } } } prev = ib; // return if no new hovered block; if(ib == null) { return; } boolean restyled = panel.getContext().css.wasHoverRestyled(ib.getRealElement()); //u.p("was styled = " + restyled); CalculatedStyle style = panel.getContext().css.getStyle(ib.getRealElement()); //u.p("color = " + style.getColor()); // if the block has a hover style then restyle it if(restyled) { Layout lt = LayoutFactory.getLayout(ib.getRealElement()); if(lt instanceof InlineLayout) { ((InlineLayout)lt).restyle(panel.getContext(), ib); panel.repaint(); } } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/95d146365b773a18a7e529af5965f0a6034c5e7b/HoverListener.java/buggy/src/java/org/xhtmlrenderer/swing/HoverListener.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3127,
1362,
12,
3514,
9834,
13,
288,
3639,
309,
12,
10001,
422,
9834,
13,
288,
5411,
327,
31,
3639,
289,
3639,
309,
12,
495,
422,
446,
13,
6594,
18,
24969,
329,
67,
2956,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3127,
1362,
12,
3514,
9834,
13,
288,
3639,
309,
12,
10001,
422,
9834,
13,
288,
5411,
327,
31,
3639,
289,
3639,
309,
12,
495,
422,
446,
13,
6594,
18,
24969,
329,
67,
2956,
2... |
private void setRefPart(String partID, LayoutPart part) { | /*package*/ void setRefPart(String partID, LayoutPart part) { | private void setRefPart(String partID, LayoutPart part) { mapIDtoPart.put(partID, part);} | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/c0af1544b5ec57401dd4ae96da6647fd73a74363/PageLayout.java/clean/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/PageLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
444,
1957,
1988,
12,
780,
1087,
734,
16,
9995,
1988,
1087,
13,
288,
202,
1458,
734,
869,
1988,
18,
458,
12,
2680,
734,
16,
1087,
1769,
97,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
444,
1957,
1988,
12,
780,
1087,
734,
16,
9995,
1988,
1087,
13,
288,
202,
1458,
734,
869,
1988,
18,
458,
12,
2680,
734,
16,
1087,
1769,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
jj_la1[4] = jj_gen; | jj_la1[6] = jj_gen; | final public void TypeDeclaration() throws ParseException { /*@bgen(jjtree) TypeDeclaration */ ASTTypeDeclaration jjtn000 = new ASTTypeDeclaration(this, JJTTYPEDECLARATION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { if (jj_2_1(2147483647)) { ClassDeclaration(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case INTERFACE: case PUBLIC: case STRICTFP: InterfaceDeclaration(); break; case SEMICOLON: jj_consume_token(SEMICOLON); break; default: jj_la1[4] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (RuntimeException)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/6b2ea5d38e0b6b4adb468f80aa5e82b2d9884c6d/JavaParser.java/buggy/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
918,
1412,
6094,
1435,
1216,
10616,
288,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
1412,
6094,
1195,
225,
9183,
559,
6094,
10684,
5088,
3784,
273,
394,
9183,
559,
6094,
12,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
918,
1412,
6094,
1435,
1216,
10616,
288,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
1412,
6094,
1195,
225,
9183,
559,
6094,
10684,
5088,
3784,
273,
394,
9183,
559,
6094,
12,
2... |
defineClass(scope, clazz, false); | defineClass(scope, clazz, false, false); | public static void defineClass(Scriptable scope, Class clazz) throws IllegalAccessException, InstantiationException, InvocationTargetException { defineClass(scope, clazz, false); } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/90e539e23a63f1d6163bcf5ecbba210f41ec355b/ScriptableObject.java/buggy/js/rhino/src/org/mozilla/javascript/ScriptableObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
4426,
797,
12,
3651,
429,
2146,
16,
1659,
4003,
13,
3639,
1216,
11900,
16,
19248,
16,
9079,
15342,
565,
288,
3639,
4426,
797,
12,
4887,
16,
4003,
16,
629,
16,
629,
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,
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,
760,
918,
4426,
797,
12,
3651,
429,
2146,
16,
1659,
4003,
13,
3639,
1216,
11900,
16,
19248,
16,
9079,
15342,
565,
288,
3639,
4426,
797,
12,
4887,
16,
4003,
16,
629,
16,
629,
1769,... |
updateNodeDescriptor(node, descriptor); | updateNodeDescriptor(descriptor); | public void run() { updateNodeDescriptor(node, descriptor); Object element = descriptor.getElement(); if (element != null) { myUnbuiltNodes.remove(node); myUpdater.addSubtreeToUpdateByElement(element); myUpdater.performUpdate(); for (int i = 0; i < node.getChildCount(); i++) { TreeNode child = node.getChildAt(i); if (isLoadingNode(child)) { if (TreeBuilderUtil.isNodeSelected(myTree, node)) { myTree.addSelectionPath(new TreePath(myTreeModel.getPathToRoot(node))); } myTreeModel.removeNodeFromParent((MutableTreeNode)child); break; } } } } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/79983140f40dc8ecc67455148b033588aa3927ee/AbstractTreeBuilder.java/buggy/openapi/src/com/intellij/ide/util/treeView/AbstractTreeBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1086,
1435,
288,
3639,
1089,
907,
3187,
12,
12628,
1769,
3639,
1033,
930,
273,
4950,
18,
21336,
5621,
3639,
309,
261,
2956,
480,
446,
13,
288,
1850,
3399,
984,
12406,
3205,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1086,
1435,
288,
3639,
1089,
907,
3187,
12,
12628,
1769,
3639,
1033,
930,
273,
4950,
18,
21336,
5621,
3639,
309,
261,
2956,
480,
446,
13,
288,
1850,
3399,
984,
12406,
3205,
18... |
public org.quickfix.field.UnderlyingSecurityIDSource getUnderlyingSecurityIDSource() throws FieldNotFound { org.quickfix.field.UnderlyingSecurityIDSource value = new org.quickfix.field.UnderlyingSecurityIDSource(); | public quickfix.field.UnderlyingSecurityIDSource getUnderlyingSecurityIDSource() throws FieldNotFound { quickfix.field.UnderlyingSecurityIDSource value = new quickfix.field.UnderlyingSecurityIDSource(); | public org.quickfix.field.UnderlyingSecurityIDSource getUnderlyingSecurityIDSource() throws FieldNotFound { org.quickfix.field.UnderlyingSecurityIDSource value = new org.quickfix.field.UnderlyingSecurityIDSource(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/NewOrderSingle.java/clean/src/java/src/quickfix/fix44/NewOrderSingle.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
4368,
734,
1830,
10833,
765,
6291,
4368,
734,
1830,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
629... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
4368,
734,
1830,
10833,
765,
6291,
4368,
734,
1830,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
629... |
endOfDoubleBondConfiguration.push(((Vector)v.get(positionInVector-1)).get(0)); | if(v.get(positionInVector-1) instanceof Vector) endOfDoubleBondConfiguration.push(((Vector)v.get(positionInVector-1)).get(0)); else endOfDoubleBondConfiguration.push((Atom)v.get(positionInVector-2)); | private void parseChain(Vector v, StringBuffer buffer, AtomContainer container, Atom parent, boolean chiral, boolean[] doubleBondConfiguration, Vector vectorBefore){ int positionInVector=0; Atom atom; for(int h=0;h<v.size();h++){ Object o=v.get(h); if(o instanceof Atom) { atom = (Atom)o; if(parent != null) { parseBond(buffer, atom, parent, container); } else { if(chiral&&isStereo(container,atom)) parent=(Atom)((Vector)v.get(1)).get(0); } parseAtom(atom, buffer, container, chiral,doubleBondConfiguration,parent); /*The principle of making chiral smiles is quite simple, although the code is pretty uggly. The Atoms connected to the chiral center are put in sorted[] in the order they have to appear in the smiles. Then the Vector v is rearranged according to sorted[]*/ if(chiral && isStereo(container,atom)){ Atom[] sorted=null; Vector chiralNeighbours=container.getConnectedAtomsVector(atom); if(isTetrahedral(container,atom)>0) sorted=new Atom[3]; if(isTetrahedral(container,atom)==1){ if(container.getBond(parent,atom).getStereo()==CDKConstants.STEREO_BOND_DOWN){ for(int i=0;i<chiralNeighbours.size();i++){ if(chiralNeighbours.get(i)!=parent){ if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==0&&isLeft(((Atom)chiralNeighbours.get(i)),parent,atom)&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[0]=(Atom)chiralNeighbours.get(i); } if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==0&&!isLeft(((Atom)chiralNeighbours.get(i)),parent,atom)&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[2]=(Atom)chiralNeighbours.get(i); } if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==CDKConstants.STEREO_BOND_UP&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[1]=(Atom)chiralNeighbours.get(i); } } } } if(container.getBond(parent,atom).getStereo()==CDKConstants.STEREO_BOND_UP){ for(int i=0;i<chiralNeighbours.size();i++){ if(chiralNeighbours.get(i)!=parent){ if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==0&&isLeft(((Atom)chiralNeighbours.get(i)),parent,atom)&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[2]=(Atom)chiralNeighbours.get(i); } if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==0&&!isLeft(((Atom)chiralNeighbours.get(i)),parent,atom)&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[1]=(Atom)chiralNeighbours.get(i); } if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==CDKConstants.STEREO_BOND_DOWN&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[0]=(Atom)chiralNeighbours.get(i); } } } } if(container.getBond(parent,atom).getStereo()==CDKConstants.STEREO_BOND_UNDEFINED||container.getBond(parent,atom).getStereo()==0){ boolean normalBindingIsLeft=false; for(int i=0;i<chiralNeighbours.size();i++){ if(chiralNeighbours.get(i)!=parent){ if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==0){ if(isLeft(((Atom)chiralNeighbours.get(i)),parent,atom)){ normalBindingIsLeft=true; break; } } } } for(int i=0;i<chiralNeighbours.size();i++){ if(chiralNeighbours.get(i)!=parent){ if(normalBindingIsLeft){ if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==0){ sorted[0]=(Atom)chiralNeighbours.get(i); } if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==CDKConstants.STEREO_BOND_UP){ sorted[2]=(Atom)chiralNeighbours.get(i); } if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==CDKConstants.STEREO_BOND_DOWN){ sorted[1]=(Atom)chiralNeighbours.get(i); } } else { if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==CDKConstants.STEREO_BOND_UP){ sorted[1]=(Atom)chiralNeighbours.get(i); } if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==0){ sorted[0]=(Atom)chiralNeighbours.get(i); } if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==CDKConstants.STEREO_BOND_DOWN){ sorted[2]=(Atom)chiralNeighbours.get(i); } } } } } } if(isTetrahedral(container,atom)==2){ if(container.getBond(parent,atom).getStereo()==CDKConstants.STEREO_BOND_UP){ for(int i=0;i<chiralNeighbours.size();i++){ if(chiralNeighbours.get(i)!=parent){ if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==CDKConstants.STEREO_BOND_DOWN&&isLeft(((Atom)chiralNeighbours.get(i)),parent,atom)&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[1]=(Atom)chiralNeighbours.get(i); } if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==CDKConstants.STEREO_BOND_DOWN&&!isLeft(((Atom)chiralNeighbours.get(i)),parent,atom)&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[2]=(Atom)chiralNeighbours.get(i); } if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==CDKConstants.STEREO_BOND_UP&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[0]=(Atom)chiralNeighbours.get(i); } } } } if(container.getBond(parent,atom).getStereo()==CDKConstants.STEREO_BOND_DOWN){ for(int i=0;i<chiralNeighbours.size();i++){ if(chiralNeighbours.get(i)!=parent){ if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==CDKConstants.STEREO_BOND_UP&&isLeft(((Atom)chiralNeighbours.get(i)),parent,atom)&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[0]=(Atom)chiralNeighbours.get(i); } if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==CDKConstants.STEREO_BOND_UP&&!isLeft(((Atom)chiralNeighbours.get(i)),parent,atom)&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[2]=(Atom)chiralNeighbours.get(i); } if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==CDKConstants.STEREO_BOND_DOWN&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[1]=(Atom)chiralNeighbours.get(i); } } } } } if(isTetrahedral(container,atom)==3){ if(container.getBond(parent,atom).getStereo()==CDKConstants.STEREO_BOND_UP){ TreeMap hm=new TreeMap(); for(int i=0;i<chiralNeighbours.size();i++){ if(chiralNeighbours.get(i)!=parent&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ hm.put(new Double(giveAngle(atom, parent, ((Atom)chiralNeighbours.get(i)))),new Integer(i)); } } Object[] ohere=hm.values().toArray(); for(int i=ohere.length-1;i>-1;i--){ sorted[i]=((Atom)chiralNeighbours.get(((Integer)ohere[i]).intValue())); } } if(container.getBond(parent,atom).getStereo()==0){ for(int i=0;i<chiralNeighbours.size();i++){ if(chiralNeighbours.get(i)!=parent){ if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==0&&isLeft(((Atom)chiralNeighbours.get(i)),parent,atom)&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[2]=(Atom)chiralNeighbours.get(i); } if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==0&&!isLeft(((Atom)chiralNeighbours.get(i)),parent,atom)&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[1]=(Atom)chiralNeighbours.get(i); } if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==CDKConstants.STEREO_BOND_UP&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[0]=(Atom)chiralNeighbours.get(i); } } } } } if(isTetrahedral(container,atom)==4){ if(container.getBond(parent,atom).getStereo()==CDKConstants.STEREO_BOND_DOWN){ TreeMap hm=new TreeMap(); for(int i=0;i<chiralNeighbours.size();i++){ if(chiralNeighbours.get(i)!=parent&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ hm.put(new Double(giveAngle(atom, parent, ((Atom)chiralNeighbours.get(i)))),new Integer(i)); } } Object[] ohere=hm.values().toArray(); for(int i=ohere.length-1;i>-1;i--){ sorted[i]=((Atom)chiralNeighbours.get(((Integer)ohere[i]).intValue())); } } if(container.getBond(parent,atom).getStereo()==0){ for(int i=0;i<chiralNeighbours.size();i++){ if(chiralNeighbours.get(i)!=parent){ if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==0&&isLeft(((Atom)chiralNeighbours.get(i)),parent,atom)&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[2]=(Atom)chiralNeighbours.get(i); } if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==0&&!isLeft(((Atom)chiralNeighbours.get(i)),parent,atom)&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[1]=(Atom)chiralNeighbours.get(i); } if(container.getBond((Atom)chiralNeighbours.get(i),atom).getStereo()==CDKConstants.STEREO_BOND_DOWN&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ sorted[0]=(Atom)chiralNeighbours.get(i); } } } } } if(isSquarePlanar(container,atom)){ sorted=new Atom[3]; //This produces a U=SP1 order in every case TreeMap hm=new TreeMap(); for(int i=0;i<chiralNeighbours.size();i++){ if(chiralNeighbours.get(i)!=parent&&!isBondBroken((Atom)chiralNeighbours.get(i),atom)){ hm.put(new Double(giveAngle(atom, parent, ((Atom)chiralNeighbours.get(i)))),new Integer(i)); } } Object[] ohere=hm.values().toArray(); for(int i=0;i<ohere.length;i++){ sorted[i]=((Atom)chiralNeighbours.get(((Integer)ohere[i]).intValue())); } } if(isTrigonalBipyramidalOrOctahedral(container, atom)){ sorted=new Atom[container.getConnectedAtoms(atom).length-1]; TreeMap hm=new TreeMap(); if(container.getBond(parent,atom).getStereo()==CDKConstants.STEREO_BOND_UP){ for(int i=0;i<chiralNeighbours.size();i++){ if(container.getBond(atom,(Atom)chiralNeighbours.get(i)).getStereo()==0) hm.put(new Double(giveAngle(atom, parent, ((Atom)chiralNeighbours.get(i)))),new Integer(i)); if(container.getBond(atom,(Atom)chiralNeighbours.get(i)).getStereo()==CDKConstants.STEREO_BOND_DOWN) sorted[sorted.length-1]=(Atom)chiralNeighbours.get(i); } Object[] ohere=hm.values().toArray(); for(int i=0;i<ohere.length;i++){ sorted[i]=((Atom)chiralNeighbours.get(((Integer)ohere[i]).intValue())); } } if(container.getBond(parent,atom).getStereo()==CDKConstants.STEREO_BOND_DOWN){ for(int i=0;i<chiralNeighbours.size();i++){ if(container.getBond(atom,(Atom)chiralNeighbours.get(i)).getStereo()==0) hm.put(new Double(giveAngle(atom, parent, ((Atom)chiralNeighbours.get(i)))),new Integer(i)); if(container.getBond(atom,(Atom)chiralNeighbours.get(i)).getStereo()==CDKConstants.STEREO_BOND_UP) sorted[sorted.length-1]=(Atom)chiralNeighbours.get(i); } Object[] ohere=hm.values().toArray(); for(int i=0;i<ohere.length;i++){ sorted[i]=((Atom)chiralNeighbours.get(((Integer)ohere[i]).intValue())); } } if(container.getBond(parent,atom).getStereo()==0){ for(int i=0;i<chiralNeighbours.size();i++){ if(chiralNeighbours.get(i)!=parent){ if(container.getBond(atom,(Atom)chiralNeighbours.get(i)).getStereo()==0) hm.put(new Double((giveAngleFromMiddle(atom, parent, ((Atom)chiralNeighbours.get(i))))),new Integer(i)); if(container.getBond(atom,(Atom)chiralNeighbours.get(i)).getStereo()==CDKConstants.STEREO_BOND_UP) sorted[0]=(Atom)chiralNeighbours.get(i); if(container.getBond(atom,(Atom)chiralNeighbours.get(i)).getStereo()==CDKConstants.STEREO_BOND_DOWN) sorted[sorted.length-2]=(Atom)chiralNeighbours.get(i); } } Object[] ohere=hm.values().toArray(); sorted[sorted.length-1]=((Atom)chiralNeighbours.get(((Integer)ohere[ohere.length-1]).intValue())); if(ohere.length==2){ sorted[sorted.length-3]=((Atom)chiralNeighbours.get(((Integer)ohere[0]).intValue())); if(giveAngleFromMiddle(atom, parent, ((Atom)chiralNeighbours.get(((Integer)ohere[1]).intValue())))<0){ Atom dummy=sorted[sorted.length-2]; sorted[sorted.length-2]=sorted[0]; sorted[0]=dummy; } } if(ohere.length==3){ sorted[sorted.length-3]=sorted[sorted.length-2]; sorted[sorted.length-2]=((Atom)chiralNeighbours.get(((Integer)ohere[ohere.length-2]).intValue())); sorted[sorted.length-4]=((Atom)chiralNeighbours.get(((Integer)ohere[ohere.length-3]).intValue())); } } } if(sorted!=null){ int numberOfAtoms=3; if(isTrigonalBipyramidalOrOctahedral(container, atom)) numberOfAtoms=container.getConnectedAtoms(atom).length-1; Object[] omy=new Object[numberOfAtoms]; Object[] onew=new Object[numberOfAtoms]; for(int k=getRingOpenings(atom).size();k<numberOfAtoms;k++){ omy[k]=v.get(positionInVector+1+k-getRingOpenings(atom).size()); } for(int k=0;k<sorted.length;k++){ if(sorted[k]!=null){ for(int m=0;m<omy.length;m++){ if(omy[m] instanceof Atom){ if(omy[m]==sorted[k]){ onew[k]=omy[m]; } } else { if(omy[m]==null){ onew[k]=null; } else { if(((Vector)omy[m]).get(0)==sorted[k]){ onew[k]=omy[m]; } } } } } else { onew[k]=null; } } if(onew[numberOfAtoms-1] instanceof Vector){ for(int i=0;i<numberOfAtoms;i++){ if(onew[i] instanceof Atom){ Vector vtemp=new Vector(); vtemp.add(onew[i]); for(int k=positionInVector+1+numberOfAtoms;k<v.size();k++){ vtemp.add(v.get(k)); } Vector vtemp2=new Vector(); for(int k=0;k<positionInVector+1+numberOfAtoms-1;k++){ if(k==positionInVector+1+i){ vtemp2.add(vtemp); } else { if(k>positionInVector){ vtemp2.add(onew[k-positionInVector-1]); } else { vtemp2.add(v.get(k)); } } } for(int k=0;k<((Vector)onew[numberOfAtoms-1]).size();k++){ vtemp2.add(((Vector)onew[numberOfAtoms-1]).get(k)); } break; } } } else { int k=0; for(int m=0;m<onew.length;m++){ if(onew[m]!=null){ v.set(positionInVector+1+k,onew[m]); k++; } } } } } if(atom!=null&&parent!=null && isEndOfDoubleBond(container,atom,parent,doubleBondConfiguration)){ int position=-1; if(v.get(positionInVector+1) instanceof Vector){ if(positionInVector>0){ endOfDoubleBondConfiguration.push(((Vector)v.get(positionInVector-1)).get(0)); endOfDoubleBondConfiguration.push(new Integer(positionInVector+1)); }else{ for(int i=0;i<vectorBefore.size();i++){ if(vectorBefore.get(i) instanceof Atom && ((Atom)vectorBefore.get(i)).getPoint2D().equals(parent.getPoint2D())) position=i; } endOfDoubleBondConfiguration.push(vectorBefore.get(position-1)); endOfDoubleBondConfiguration.push(new Integer(positionInVector+1)); } } else { Atom viewFrom=null; if(positionInVector>2){ if(v.get(positionInVector-2) instanceof Atom) viewFrom=(Atom)v.get(positionInVector-2); else viewFrom=(Atom)((Vector)v.get(positionInVector-2)).get(0); }else{ if(vectorBefore==null) viewFrom=(Atom)v.get(positionInVector-1); else viewFrom=(Atom)vectorBefore.get(position-1); } boolean oldAtom=isLeft(viewFrom,atom, parent); boolean newAtom=isLeft((Atom)v.get(positionInVector+1),parent,atom); if(oldAtom==newAtom) buffer.append('\\'); else buffer.append('/'); } } parent = atom; } else { //Have Vector boolean brackets = true; if(isRingOpening(parent) && container.getBondCount(parent) < 4) brackets = false; if(brackets) buffer.append('('); parseChain((Vector)o, buffer, container, parent, chiral, doubleBondConfiguration,v); if(brackets) buffer.append(')'); if(!beginnOfDoubleBondConfiguration.empty()){ Atom beginn=(Atom)beginnOfDoubleBondConfiguration.pop(); if(container.getBondNumber(beginn,parent)!=-1 && doubleBondConfiguration[container.getBondNumber(beginn,parent)]){ if(!endOfDoubleBondConfiguration.empty()){ Integer integer=(Integer)endOfDoubleBondConfiguration.pop(); Atom viewFrom=(Atom)endOfDoubleBondConfiguration.pop(); if(v.indexOf(o)==integer.intValue()) { Atom[] atomsOfParent=container.getConnectedAtoms(parent); Atom[] atomsOfViewFrom=container.getConnectedAtoms(viewFrom); Atom between=null; for(int i=0;i<atomsOfParent.length;i++){ for(int k=0;k<atomsOfViewFrom.length;k++){ if(atomsOfParent[i]==atomsOfViewFrom[k]) between=atomsOfParent[i]; } } boolean oldAtom=isLeft(viewFrom,parent,between); boolean newAtom=isLeft((Atom)v.get(positionInVector+1),between,parent); if(oldAtom==newAtom) buffer.append('/'); else buffer.append('\\'); } else { endOfDoubleBondConfiguration.push(viewFrom); endOfDoubleBondConfiguration.push(integer); } } } else { beginnOfDoubleBondConfiguration.push(beginn); } } } positionInVector++; } } | 46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/1dba54ed56688a58f5f2db4d67ace4d758a40669/SmilesGenerator.java/buggy/src/org/openscience/cdk/smiles/SmilesGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1109,
3893,
12,
5018,
331,
16,
6674,
1613,
16,
7149,
2170,
1478,
16,
7149,
982,
16,
1250,
462,
481,
287,
16,
1250,
8526,
1645,
9807,
1750,
16,
5589,
3806,
4649,
15329,
565,
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,
1109,
3893,
12,
5018,
331,
16,
6674,
1613,
16,
7149,
2170,
1478,
16,
7149,
982,
16,
1250,
462,
481,
287,
16,
1250,
8526,
1645,
9807,
1750,
16,
5589,
3806,
4649,
15329,
565,
5... |
setCompletionValues(scope,CompletionKind.VARIABLE_TYPE, KeywordSetKey.DECLARATION ); endDeclaration( namespaceDefinition ); namespaceDeclarationLoop : while (LT(1) != IToken.tRBRACE) { int checkToken = LA(1).hashCode(); switch (LT(1)) { case IToken.tRBRACE : break namespaceDeclarationLoop; default : try { declaration(namespaceDefinition, null, null, KeywordSetKey.DECLARATION); } catch (BacktrackException bt) { failParse(bt); if (checkToken == LA(1).hashCode()) failParseWithErrorHandling(); } } if (checkToken == LA(1).hashCode()) failParseWithErrorHandling(); } setCompletionValues(scope, CompletionKind.NO_SUCH_KIND,KeywordSetKey.EMPTY ); IToken last = consume(IToken.tRBRACE); namespaceDefinition.setEndingOffsetAndLineNumber( last.getOffset() + last.getLength(), last.getLineNumber()); setCompletionValues(scope, kind, KeywordSetKey.DECLARATION ); namespaceDefinition.exitScope( requestor, astFactory.getReferenceManager() ); | try { setCompletionValues(scope,CompletionKind.VARIABLE_TYPE, KeywordSetKey.DECLARATION ); endDeclaration( namespaceDefinition ); namespaceDeclarationLoop : while (LT(1) != IToken.tRBRACE) { int checkToken = LA(1).hashCode(); switch (LT(1)) { case IToken.tRBRACE : break namespaceDeclarationLoop; default : try { declaration(namespaceDefinition, null, null, KeywordSetKey.DECLARATION); } catch (BacktrackException bt) { failParse(bt); if (checkToken == LA(1).hashCode()) failParseWithErrorHandling(); } } if (checkToken == LA(1).hashCode()) failParseWithErrorHandling(); } setCompletionValues(scope, CompletionKind.NO_SUCH_KIND,KeywordSetKey.EMPTY ); IToken last = consume(IToken.tRBRACE); namespaceDefinition.setEndingOffsetAndLineNumber( last.getOffset() + last.getLength(), last.getLineNumber()); setCompletionValues(scope, kind, KeywordSetKey.DECLARATION ); } finally { namespaceDefinition.exitScope( requestor, astFactory.getReferenceManager() ); } | protected IASTDeclaration namespaceDefinition(IASTScope scope) throws BacktrackException, EndOfFileException { IToken first = consume(IToken.t_namespace); IASTCompletionNode.CompletionKind kind = getCompletionKindForDeclaration(scope, null); setCompletionValues(scope,CompletionKind.NAMESPACE_REFERENCE, KeywordSetKey.EMPTY ); IToken identifier = null; // optional name if (LT(1) == IToken.tIDENTIFIER) identifier = identifier(); if (LT(1) == IToken.tLBRACE) { IToken lbrace = consume(); IASTNamespaceDefinition namespaceDefinition = null; try { namespaceDefinition = astFactory.createNamespaceDefinition( scope, (identifier == null ? EMPTY_STRING: identifier.getCharImage()), //$NON-NLS-1$ first.getOffset(), first.getLineNumber(), (identifier == null ? first.getOffset() : identifier.getOffset()), (identifier == null ? first.getEndOffset() : identifier.getEndOffset() ), (identifier == null ? first.getLineNumber() : identifier.getLineNumber() ), first.getFilename()); } catch (Exception e1) { logException( "namespaceDefinition:createNamespaceDefinition", e1 ); //$NON-NLS-1$ throwBacktrack(first.getOffset(), lbrace.getEndOffset(), first.getLineNumber(), first.getFilename()); return null; } namespaceDefinition.enterScope( requestor, astFactory.getReferenceManager() ); setCompletionValues(scope,CompletionKind.VARIABLE_TYPE, KeywordSetKey.DECLARATION ); endDeclaration( namespaceDefinition ); namespaceDeclarationLoop : while (LT(1) != IToken.tRBRACE) { int checkToken = LA(1).hashCode(); switch (LT(1)) { case IToken.tRBRACE : //consume(Token.tRBRACE); break namespaceDeclarationLoop; default : try { declaration(namespaceDefinition, null, null, KeywordSetKey.DECLARATION); } catch (BacktrackException bt) { failParse(bt); if (checkToken == LA(1).hashCode()) failParseWithErrorHandling(); } } if (checkToken == LA(1).hashCode()) failParseWithErrorHandling(); } setCompletionValues(scope, CompletionKind.NO_SUCH_KIND,KeywordSetKey.EMPTY ); // consume the } IToken last = consume(IToken.tRBRACE); namespaceDefinition.setEndingOffsetAndLineNumber( last.getOffset() + last.getLength(), last.getLineNumber()); setCompletionValues(scope, kind, KeywordSetKey.DECLARATION ); namespaceDefinition.exitScope( requestor, astFactory.getReferenceManager() ); return namespaceDefinition; } else if( LT(1) == IToken.tASSIGN ) { setCompletionValues(scope, CompletionKind.NO_SUCH_KIND,KeywordSetKey.EMPTY); IToken assign = consume( IToken.tASSIGN ); if( identifier == null ) { throwBacktrack(first.getOffset(), assign.getEndOffset(), first.getLineNumber(), first.getFilename()); return null; } ITokenDuple duple = name(scope, CompletionKind.NAMESPACE_REFERENCE, KeywordSetKey.EMPTY); IToken semi = consume( IToken.tSEMI ); setCompletionValues(scope, kind, KeywordSetKey.DECLARATION ); IASTNamespaceAlias alias = null; try { alias = astFactory.createNamespaceAlias( scope, identifier.getCharImage(), duple, first.getOffset(), first.getLineNumber(), identifier.getOffset(), identifier.getEndOffset(), identifier.getLineNumber(), duple.getLastToken().getEndOffset(), duple.getLastToken().getLineNumber() ); } catch (Exception e1) { logException( "namespaceDefinition:createNamespaceAlias", e1 ); //$NON-NLS-1$ throwBacktrack(first.getOffset(), semi.getEndOffset(), first.getLineNumber(), first.getFilename()); return null; } return alias; } else { int endOffset = ( lastToken != null ) ? lastToken.getEndOffset() : 0 ; throwBacktrack(first.getOffset(), endOffset, first.getLineNumber(), first.getFilename()); return null; } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/903d1ac7a89ce402e80c5c3f7a46d78291b0ffd1/Parser.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
467,
9053,
6094,
1981,
1852,
12,
45,
9053,
3876,
2146,
13,
3639,
1216,
4297,
4101,
503,
16,
4403,
951,
812,
503,
565,
288,
3639,
467,
1345,
1122,
273,
7865,
12,
1285,
969,
18,
88,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
467,
9053,
6094,
1981,
1852,
12,
45,
9053,
3876,
2146,
13,
3639,
1216,
4297,
4101,
503,
16,
4403,
951,
812,
503,
565,
288,
3639,
467,
1345,
1122,
273,
7865,
12,
1285,
969,
18,
88,... |
double bsign = (coll.tri1.getBody() == body1) ? -vsign : vsign; for (MeshVertex v : coll.tri1.getVertices()) { double dist = bsign*v.getPosition().subtract(planePoint).mult(planeNormal); | for (MeshVertex v : coll.getTri1().getVertices()) { double dist = -vsign*v.getPosition().subtract(planePoint).mult(planeNormal); | private void calcPlane() { // Find a point on the plane by averaging all collision line endpoints planePoint = new Vector3D(); for (CollisionPoint coll : intersections) { planePoint = planePoint.add(coll.lineFrom).add(coll.lineTo); } planePoint = planePoint.mult(0.5/intersections.size()); // Find the plane normal by averaging the normals of all triangles planeNormal = new Vector3D(); for (CollisionPoint coll : intersections) { Vector3D n = coll.lineFrom.subtract(planePoint).cross(coll.lineFrom.subtract(planePoint)); if (n.magnitude() > 1e-6) { // Flip this normal if it's pointing in the opposite direction to the previous ones if (planeNormal.mult(n) < 0.0) n = n.mult(-1.0); planeNormal = planeNormal.add(n); } } planeNormal = planeNormal.normalize(); // Find the relative velocity (body2 minus body1) of the bodies at the plane Vector3D r1 = planePoint.subtract(body1.getCoMPosition()); Vector3D r2 = planePoint.subtract(body1.getCoMPosition()); Vector3D v1 = body1.getAngularVelocity().cross(r1).add(body1.getCoMVelocity()); Vector3D v2 = body2.getAngularVelocity().cross(r2).add(body2.getCoMVelocity()); double vsign = (v2.subtract(v1).mult(planeNormal) < 0.0) ? -1.0 : +1.0; // Find the point of maximum penetration through the plane double dmax = -1e20; for (CollisionPoint coll : intersections) { double bsign = (coll.tri1.getBody() == body1) ? -vsign : vsign; for (MeshVertex v : coll.tri1.getVertices()) { double dist = bsign*v.getPosition().subtract(planePoint).mult(planeNormal); if (dist > dmax) { penetrationPoint = v.getPosition(); dmax = dist; } } } // The sign of the plane normal is chosen arbitrarily. Flip it such that the // point of maximum penetration lies on the forbidden side. if (penetrationPoint.subtract(planePoint).mult(planeNormal) > 0.0) { planeNormal = planeNormal.mult(-1.0); } } | 46524 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46524/2dde958d369cd70298e4ef110082197e41b35d42/Collision.java/buggy/de/kleppmann/maniation/geometry/Collision.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
7029,
19505,
1435,
288,
3639,
368,
4163,
279,
1634,
603,
326,
11017,
635,
23713,
5755,
777,
17740,
980,
7902,
3639,
11017,
2148,
273,
394,
5589,
23,
40,
5621,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
7029,
19505,
1435,
288,
3639,
368,
4163,
279,
1634,
603,
326,
11017,
635,
23713,
5755,
777,
17740,
980,
7902,
3639,
11017,
2148,
273,
394,
5589,
23,
40,
5621,
3639,
364,
261,
1... |
environment.setVariable(name, parser.parse(valueString)); } | environment.setVariable(name, parser.parse(valueString)); } | public void setVariable( String name, String valueString ) throws CalculatorException { environment.setVariable(name, parser.parse(valueString)); } | 57371 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57371/c26c57f3ac4851e6bc9c5df8515ac73f4045eebf/Calculator.java/buggy/jmock/examples/calculator/src/org/jmock/examples/calculator/Calculator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
20357,
12,
514,
508,
16,
514,
24998,
262,
1216,
15994,
639,
503,
288,
202,
202,
10274,
18,
542,
3092,
12,
529,
16,
2082,
18,
2670,
12,
1132,
780,
10019,
202,
97,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20357,
12,
514,
508,
16,
514,
24998,
262,
1216,
15994,
639,
503,
288,
202,
202,
10274,
18,
542,
3092,
12,
529,
16,
2082,
18,
2670,
12,
1132,
780,
10019,
202,
97,
2,
-10... |
cfw.addALoad(2); | private void emitRegExpInit(ClassFileWriter cfw) { // precompile all regexp literals int totalRegCount = 0; for (int i = 0; i != scriptOrFnNodes.length; ++i) { totalRegCount += scriptOrFnNodes[i].getRegexpCount(); } if (totalRegCount == 0) { return; } cfw.startMethod(REGEXP_INIT_METHOD_NAME, REGEXP_INIT_METHOD_SIGNATURE, (short)(ClassFileWriter.ACC_STATIC | ClassFileWriter.ACC_PRIVATE | ClassFileWriter.ACC_SYNCHRONIZED)); cfw.addField("_reInitDone", "Z", (short)(ClassFileWriter.ACC_STATIC | ClassFileWriter.ACC_PRIVATE)); cfw.add(ByteCode.GETSTATIC, mainClassName, "_reInitDone", "Z"); int doInit = cfw.acquireLabel(); cfw.add(ByteCode.IFEQ, doInit); cfw.add(ByteCode.RETURN); cfw.markLabel(doInit); for (int i = 0; i != scriptOrFnNodes.length; ++i) { ScriptOrFnNode n = scriptOrFnNodes[i]; int regCount = n.getRegexpCount(); for (int j = 0; j != regCount; ++j) { String reFieldName = getCompiledRegexpName(n, j); String reFieldType = "Ljava/lang/Object;"; String reString = n.getRegexpString(j); String reFlags = n.getRegexpFlags(j); cfw.addField(reFieldName, reFieldType, (short)(ClassFileWriter.ACC_STATIC | ClassFileWriter.ACC_PRIVATE)); cfw.addALoad(0); // proxy cfw.addALoad(1); // context cfw.addALoad(2); // scope cfw.addPush(reString); if (reFlags == null) { cfw.add(ByteCode.ACONST_NULL); } else { cfw.addPush(reFlags); } cfw.addInvoke(ByteCode.INVOKEINTERFACE, "org/mozilla/javascript/RegExpProxy", "compileRegExp", "(Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +"Ljava/lang/String;Ljava/lang/String;" +")Ljava/lang/Object;"); cfw.add(ByteCode.PUTSTATIC, mainClassName, reFieldName, reFieldType); } } cfw.addPush(1); cfw.add(ByteCode.PUTSTATIC, mainClassName, "_reInitDone", "Z"); cfw.add(ByteCode.RETURN); cfw.stopMethod((short)3, null); } | 12564 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12564/40f7554390dea10ea64bd490d09230d2c0814929/Codegen.java/buggy/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3626,
13673,
2570,
12,
797,
812,
2289,
6080,
91,
13,
565,
288,
3639,
368,
675,
11100,
777,
7195,
18228,
3639,
509,
2078,
1617,
1380,
273,
374,
31,
3639,
364,
261,
474,
277,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3626,
13673,
2570,
12,
797,
812,
2289,
6080,
91,
13,
565,
288,
3639,
368,
675,
11100,
777,
7195,
18228,
3639,
509,
2078,
1617,
1380,
273,
374,
31,
3639,
364,
261,
474,
277,
2... | |
private static boolean startsWithXml(String s, int i) { if (s.length() < i + 3) return false; if (s.charAt(i) != 'X' && s.charAt(i) != 'x') return false; if (s.charAt(i + 1) != 'M' && s.charAt(i + 1) != 'm') return false; if (s.charAt(i + 2) != 'L' && s.charAt(i + 2) != 'l') return false; return true; } | 3520 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3520/d2e93dc48652df02041fc2d02a6828d06d2ac5fb/QNameHelper.java/clean/v1/src/common/org/apache/xmlbeans/impl/common/QNameHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
4969,
4432,
12,
780,
272,
16,
509,
277,
13,
565,
288,
3639,
309,
261,
87,
18,
2469,
1435,
411,
277,
397,
890,
13,
5411,
327,
629,
31,
7734,
309,
261,
87,
18,
3001,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4969,
4432,
12,
780,
272,
16,
509,
277,
13,
565,
288,
3639,
309,
261,
87,
18,
2469,
1435,
411,
277,
397,
890,
13,
5411,
327,
629,
31,
7734,
309,
261,
87,
18,
3001,
... | ||
Server server = serverLocalHome.findByPrimaryKey(new ServerPK(id)); | Server server = serverLocalHome.findById(id); | public ServerLightValue getServerLightValue(Integer id) throws ServerNotFoundException { try { ServerDAO serverLocalHome = getServerDAO(); Server server = serverLocalHome.findByPrimaryKey(new ServerPK(id)); return server.getServerLightValue(); } catch (ObjectNotFoundException e) { throw new ServerNotFoundException(id, e); } } | 52591 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52591/5b5340cb0d18f5736d423826ddf9afcd22ec015f/ServerManagerEJBImpl.java/clean/src/org/hyperic/hq/appdef/server/session/ServerManagerEJBImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3224,
12128,
620,
11543,
12128,
620,
12,
4522,
612,
13,
3639,
1216,
3224,
3990,
288,
3639,
775,
288,
5411,
3224,
18485,
1438,
2042,
8684,
273,
11543,
18485,
5621,
5411,
3224,
1438,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3224,
12128,
620,
11543,
12128,
620,
12,
4522,
612,
13,
3639,
1216,
3224,
3990,
288,
3639,
775,
288,
5411,
3224,
18485,
1438,
2042,
8684,
273,
11543,
18485,
5621,
5411,
3224,
1438,
27... |
private int traverseAttributeGroupDeclFromAnotherSchema( String attGrpName , String uriStr, ComplexTypeInfo typeInfo, Vector anyAttDecls ) throws Exception { SchemaGrammar aGrammar = (SchemaGrammar) fGrammarResolver.getGrammar(uriStr); if (uriStr == null || aGrammar == null || ! (aGrammar instanceof SchemaGrammar) ) { // REVISIT: Localize reportGenericSchemaError("!!Schema not found in #traverseAttributeGroupDeclFromAnotherSchema, schema uri : " + uriStr); return -1; } // attribute name Element attGrpDecl = (Element) aGrammar.topLevelAttrGrpDecls.get((Object)attGrpName); if (attGrpDecl == null) { // REVISIT: Localize reportGenericSchemaError( "no attribute group named \"" + attGrpName + "\" was defined in schema : " + uriStr); return -1; } NamespacesScope saveNSMapping = fNamespacesScope; int saveTargetNSUri = fTargetNSURI; fTargetNSURI = fStringPool.addSymbol(aGrammar.getTargetNamespaceURI()); fNamespacesScope = aGrammar.getNamespacesScope(); // attribute type int attType = -1; int enumeration = -1; Element child = checkContent(attGrpDecl, XUtil.getFirstChildElement(attGrpDecl), true); for (; child != null ; child = XUtil.getNextSiblingElement(child)) { //child attribute couldn't be a top-level attribute DEFINITION, if ( child.getLocalName().equals(SchemaSymbols.ELT_ATTRIBUTE) ){ String childAttName = child.getAttribute(SchemaSymbols.ATT_NAME); if ( childAttName.length() > 0 ) { Hashtable attDeclRegistry = aGrammar.getAttributeDeclRegistry(); if (attDeclRegistry != null) { if (attDeclRegistry.get((Object)childAttName) != null ){ addAttributeDeclFromAnotherSchema(childAttName, uriStr, typeInfo); return -1; } } } else traverseAttributeDecl(child, typeInfo, false); } else if ( child.getLocalName().equals(SchemaSymbols.ELT_ATTRIBUTEGROUP) ) { traverseAttributeGroupDecl(child, typeInfo, anyAttDecls); } else if ( child.getLocalName().equals(SchemaSymbols.ELT_ANYATTRIBUTE) ) { anyAttDecls.addElement(traverseAnyAttribute(child)); break; } else { // REVISIT: Localize reportGenericSchemaError("Invalid content for attributeGroup"); } } fNamespacesScope = saveNSMapping; fTargetNSURI = saveTargetNSUri; if(child != null) { // REVISIT: Localize reportGenericSchemaError("Invalid content for attributeGroup"); } return -1; } // end of method traverseAttributeGroupFromAnotherSchema | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/87731f2b2070ba79da173a5e6be82410b096d7c5/TraverseSchema.java/buggy/src/org/apache/xerces/validators/schema/TraverseSchema.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
10080,
1499,
1114,
3456,
1265,
37,
24413,
3078,
12,
514,
2403,
43,
13832,
461,
269,
514,
2003,
1585,
16,
4766,
17311,
16060,
17305,
23112,
16,
4766,
11794,
5589,
1281,
3075,
1799... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
10080,
1499,
1114,
3456,
1265,
37,
24413,
3078,
12,
514,
2403,
43,
13832,
461,
269,
514,
2003,
1585,
16,
4766,
17311,
16060,
17305,
23112,
16,
4766,
11794,
5589,
1281,
3075,
1799... | ||
typePrint(inType); | printType(inType); | private void printHeader(SIRStream self, String type) { CType inType = self.getInputType(); CType outType = self.getOutputType(); // Consider special-case inputs and outputs for feedback loops. if (self instanceof SIRFeedbackLoop) { SIRFeedbackLoop fl = (SIRFeedbackLoop)self; SIRJoiner joiner = fl.getJoiner(); if (joiner.getType() == SIRJoinType.NULL || (joiner.getType() == SIRJoinType.WEIGHTED_RR && joiner.getWeight(0) == 0)) inType = CStdType.Void; SIRSplitter splitter = fl.getSplitter(); if (splitter.getType() == SIRSplitType.NULL || (splitter.getType() == SIRSplitType.WEIGHTED_RR && splitter.getWeight(0) == 0)) outType = CStdType.Void; } if (inType != null && outType != null) { typePrint(inType); p.print("->"); typePrint(outType); p.print(" "); } p.print(type); if (self.getIdent() != null) { // if the parent is null, this is the top-level stream; // there is only one of it, so print its [non-unique] // ident rather than its [unique] name so the class name // matches the filename if (self.getParent() == null) p.print(" " + self.getIdent()); else p.print(" " + self.getName()); } // In SIR, streams don't have parameter lists, but their // init functions do. Print a parameter list. JMethodDeclaration init = self.getInit(); JFormalParameter[] parameters = init.getParameters(); if (parameters.length > 0) { p.print("("); boolean first = true; for (int i = 0; i < parameters.length; i++) { if (!first) p.print(", "); first = false; parameters[i].accept(this); } p.print(")"); } p.newLine(); } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/32b92db6e0fa0cfebda2c73d104665aa19efdd90/SIRToStreamIt.java/clean/streams/src/at/dms/kjc/sir/SIRToStreamIt.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1172,
1864,
12,
2320,
54,
1228,
365,
16,
514,
618,
13,
565,
288,
3639,
385,
559,
316,
559,
273,
365,
18,
588,
1210,
559,
5621,
3639,
385,
559,
596,
559,
273,
365,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1172,
1864,
12,
2320,
54,
1228,
365,
16,
514,
618,
13,
565,
288,
3639,
385,
559,
316,
559,
273,
365,
18,
588,
1210,
559,
5621,
3639,
385,
559,
596,
559,
273,
365,
18,
588,
... |
selectors = new DataDefinitionSelector[seriesDefnsArray.length]; for ( int i = 0; i < seriesDefnsArray.length; i++ ) | if ( wizardContext.isMoreAxesSupported( ) ) | public Composite createArea( Composite parent ) { Label topAngle = new Label( parent, SWT.NONE ); { topAngle.setLayoutData( new GridData( GridData.HORIZONTAL_ALIGN_END ) ); topAngle.setImage( UIHelper.getImage( ChartUIConstancts.IMAGE_RA_TOPRIGHT ) ); } cmpLeft = new Group( parent, SWT.NONE ); { GridLayout gridLayout = new GridLayout( ); gridLayout.marginWidth = 0; gridLayout.marginHeight = 0; cmpLeft.setLayout( gridLayout ); cmpLeft.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); cmpLeft.setText( areaTitle ); } selectors = new DataDefinitionSelector[seriesDefnsArray.length]; for ( int i = 0; i < seriesDefnsArray.length; i++ ) { // Remove the title when only single series, i.e. axisIndex is 0 int axisIndex = seriesDefnsArray.length == 1 ? 0 : i + 1; selectors[i] = new DataDefinitionSelector( chart, axisIndex, seriesDefnsArray[i], serviceprovider, oContext, sTitle, selectDataUI ); if ( chart instanceof DialChart ) { selectors[i].setSelectionPrefix( Messages.getString( "DialBottomAreaComponent.Label.Dial" ) ); //$NON-NLS-1$ } selectors[i].createArea( cmpLeft ); } Label bottomAngle = new Label( parent, SWT.NONE ); { bottomAngle.setLayoutData( new GridData( GridData.HORIZONTAL_ALIGN_END ) ); bottomAngle.setImage( UIHelper.getImage( ChartUIConstancts.IMAGE_RA_BOTTOMRIGHT ) ); } return cmpLeft; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/28738ea1377c73d595430451bea56e1444db4233/MultipleSeriesSelectorComponent.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/data/MultipleSeriesSelectorComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
14728,
752,
5484,
12,
14728,
982,
262,
202,
95,
202,
202,
2224,
1760,
8467,
273,
394,
5287,
12,
982,
16,
348,
8588,
18,
9826,
11272,
202,
202,
95,
1082,
202,
3669,
8467,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
14728,
752,
5484,
12,
14728,
982,
262,
202,
95,
202,
202,
2224,
1760,
8467,
273,
394,
5287,
12,
982,
16,
348,
8588,
18,
9826,
11272,
202,
202,
95,
1082,
202,
3669,
8467,
18,
... |
FrontEnd fe = new SimpleFrontEnd("FrontEnd", testName, fet.getAudioSource()); | FrontEnd fe = new SimpleFrontEnd(); fe.initialize("FrontEnd", testName, fet.getAudioSource()); | public static void main(String[] argv) { if (argv.length < 3) { System.out.println ("Usage: java testClass <testName> " + "<propertiesFile> <audiofilename>"); } try { String testName = argv[0]; String propertiesFile = argv[1]; String audioFile = argv[2]; ProcessorTest fet = new ProcessorTest (testName, propertiesFile, audioFile); FrontEnd fe = new SimpleFrontEnd("FrontEnd", testName, fet.getAudioSource()); FeatureFrame featureFrame = null; do { featureFrame = fe.getFeatureFrame(25, null); } while (featureFrame != null); if (fet.getDumpTimes()) { Timer.dumpAll(); } } catch (Exception e) { e.printStackTrace(); } } | 47105 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47105/58131397bfe3bc5758921efabffa9de421265967/FrontEndTest.java/clean/sphinx4/tests/frontend/FrontEndTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
5261,
13,
288,
202,
430,
261,
19485,
18,
2469,
411,
890,
13,
288,
202,
565,
2332,
18,
659,
18,
8222,
7734,
7566,
5357,
30,
2252,
1842,
797,
411,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
5261,
13,
288,
202,
430,
261,
19485,
18,
2469,
411,
890,
13,
288,
202,
565,
2332,
18,
659,
18,
8222,
7734,
7566,
5357,
30,
2252,
1842,
797,
411,
3... |
body.unsetExceptionHandler(exception); | body.unsetExceptionHandler(exception); | public static Handler unsetExceptionHandler(Class exception, int levelID, Object target) { // We keep a trace of the removed handler Class handlerClass = null; Handler handler = null; // The correct level is identified HashMap level = null; switch (levelID) { // Default level must not be modified ! case (Handler.ID_Default): if (logger.isDebugEnabled()) { logger.debug( "*** ERROR : CAN'T REMOVE ANY HANDLER from DEFAULT LEVEL !"); } return null; case (Handler.ID_VM): if (VMLevel != null) { handlerClass = (Class) level.remove(exception); } break; case (Handler.ID_Body): // The target object must be a body if (((target != null) && target instanceof UniversalBody)) { // Get the body of the target object UniversalBody body = ((BodyProxy) ((org.objectweb.proactive.core.mop.StubObject) target).getProxy()).getBody(); try { if (body instanceof ActiveBody) { // Local body body.unsetExceptionHandler(exception); } else if (body instanceof RemoteBodyAdapter) { // Remote body body.getRemoteAdapter().unsetExceptionHandler(exception); } } catch (ProActiveException e) { if (logger.isDebugEnabled()) { logger.debug("*** ERROR while UNSETTING handler for " + exception.getName() + " in BODY LEVEL"); } } } break; case (Handler.ID_Proxy): // The target object must be a proxy if (((target != null) && target instanceof AbstractProxy)) { // Create a request to associate handler to the distant body try { handler = ((AbstractProxy) target).unsetExceptionHandler(exception); return handler; } catch (ProActiveException e) { if (logger.isDebugEnabled()) { logger.debug("*** ERROR while UNSETTING handler for " + exception.getName() + " in PROXY LEVEL"); } } } break; case (Handler.ID_Future): break; case (Handler.ID_Code): if (codeLevel != null) { handlerClass = (Class) level.remove(exception); } } // Instantiation of the removed handler if (handlerClass != null) { try { handler = (Handler) handlerClass.newInstance(); if (logger.isDebugEnabled()) { logger.debug("*** REMOVE [" + handler.getClass().getName() + "] FOR [" + exception.getName() + "] AT LEVEL " + levelID); } } catch (Exception e) { if (logger.isDebugEnabled()) { logger.debug("*** ERROR during class [" + handlerClass.getName() + "] instantiation"); } } } return handler; } | 23362 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/23362/2f1b7c86a3954051c326f351de2d6cf4d7c5f89b/ProActive.java/buggy/src/org/objectweb/proactive/ProActive.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
4663,
2646,
18894,
12,
797,
1520,
16,
509,
1801,
734,
16,
3639,
1033,
1018,
13,
288,
3639,
368,
1660,
3455,
279,
2606,
434,
326,
3723,
1838,
3639,
1659,
1838,
797,
273,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4663,
2646,
18894,
12,
797,
1520,
16,
509,
1801,
734,
16,
3639,
1033,
1018,
13,
288,
3639,
368,
1660,
3455,
279,
2606,
434,
326,
3723,
1838,
3639,
1659,
1838,
797,
273,
446,
... |
public void resolvePrefixTables() throws SAXException | public void resolvePrefixTables() throws SAXException | public void resolvePrefixTables() throws SAXException { // Always start with a fresh prefix table! m_prefixTable = null; Vector m_declaredPrefixes = getDeclaredPrefixes(); // If we have declared declarations, then we look for // a parent that has namespace decls, and add them // to this element's decls. Otherwise we just point // to the parent that has decls. if(null != m_declaredPrefixes) { // Add this element's declared prefixes to the // prefix table. int n = m_declaredPrefixes.size(); for(int i = 0; i < n; i++) { XMLNSDecl decl = (XMLNSDecl)m_declaredPrefixes.elementAt(i); String prefix = decl.getPrefix(); String uri = decl.getURI(); boolean shouldExclude = excludeResultNSDecl(prefix, uri); // Create a new prefix table if one has not already been created. if(null == m_prefixTable) m_prefixTable = new Vector(); m_prefixTable.addElement(new XMLNSDecl(prefix, uri, shouldExclude)); } } ElemTemplateElement parent = (ElemTemplateElement)this.getParentNode(); if(null != parent) { // The prefix table of the parent should never be null! Vector prefixes = parent.m_prefixTable; if (null == m_excludeResultPrefixes && null == m_prefixTable) { // Nothing to combine, so just use parent's table! this.m_prefixTable = parent.m_prefixTable; } else { if (null == m_prefixTable) m_prefixTable = new Vector(); // Add the prefixes from the parent's prefix table. int n = prefixes.size(); for(int i = 0; i < n; i++) { XMLNSDecl decl = (XMLNSDecl)prefixes.elementAt(i); boolean isexcluded = decl.getIsExcluded(); if (!isexcluded) { boolean shouldExclude = excludeResultNSDecl(decl.getPrefix(), decl.getURI()); if(shouldExclude != isexcluded) { decl = new XMLNSDecl(decl.getPrefix(), decl.getURI(), shouldExclude); } } m_prefixTable.addElement(decl); } } } else if(null == m_prefixTable) { // Must be stylesheet element without any result prefixes! m_prefixTable = new Vector(); } // Resolve the children's prefix tables. for(ElemTemplateElement child = m_firstChild; child != null; child = child.m_nextSibling) { child.resolvePrefixTables(); } } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/77ad973f1d6ad8f28fd358f2ba4d4c63da65d953/ElemLiteralResult.java/buggy/src/org/apache/xalan/templates/ElemLiteralResult.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2245,
2244,
6905,
1435,
565,
1216,
14366,
225,
288,
565,
368,
14178,
787,
598,
279,
12186,
1633,
1014,
5,
565,
312,
67,
3239,
1388,
273,
446,
31,
565,
5589,
312,
67,
16571,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2245,
2244,
6905,
1435,
565,
1216,
14366,
225,
288,
565,
368,
14178,
787,
598,
279,
12186,
1633,
1014,
5,
565,
312,
67,
3239,
1388,
273,
446,
31,
565,
5589,
312,
67,
16571,
1... |
public void setDate(int parameterIndex, java.sql.Date x) throws SQLException { if (null == x) { setNull(parameterIndex, Types.OTHER); } else { SimpleDateFormat df = (SimpleDateFormat) tl_df.get(); if (df == null) { df = new SimpleDateFormat("''yyyy-MM-dd''"); tl_df.set(df); } set(parameterIndex, df.format(x)); } // The above is how the date should be handled. // // However, in JDK's prior to 1.1.6 (confirmed with the // Linux jdk1.1.3 and the Win95 JRE1.1.5), SimpleDateFormat seems // to format a date to the previous day. So the fix is to add a day // before formatting. // // PS: 86400000 is one day // //set(parameterIndex, df.format(new java.util.Date(x.getTime()+86400000))); } | 52628 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52628/cdebcad6af70ec13bd89f11cf7f3d8b7d5278f50/PreparedStatement.java/buggy/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
17604,
12,
474,
25412,
16,
2252,
18,
4669,
18,
1626,
619,
13,
1216,
6483,
202,
95,
202,
202,
430,
261,
2011,
422,
619,
13,
202,
202,
95,
1082,
202,
542,
2041,
12,
6775,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17604,
12,
474,
25412,
16,
2252,
18,
4669,
18,
1626,
619,
13,
1216,
6483,
202,
95,
202,
202,
430,
261,
2011,
422,
619,
13,
202,
202,
95,
1082,
202,
542,
2041,
12,
6775,... | ||
type.setPosition(Position.line(clazz.pos), getSourceFilename()); | if (global.args.debuginfo.value) type.setPosition(Position.line(clazz.pos), getSourceFilename()); | private void genClass(Symbol clazz, Tree[] body) { Symbol outerClass = currentClass; currentClass = clazz; if (clazz.isModuleClass()) { tc.getModuleField(clazz); } final TypeBuilder type = (TypeBuilder)tc.getType(clazz); type.setPosition(Position.line(clazz.pos), getSourceFilename()); emitSymtab(clazz); for (int i = 0; i < body.length; i++) { Symbol sym = body[i].symbol(); switch (body[i]) { case Empty: break; case ValDef(_, _, _, _): // just to generate the field declaration // the rhs should've been moved to the constructor body tc.createField(sym); break; case ClassDef(_, _, _, _, _, Template impl): genClass(sym, impl.body); break; case DefDef(_, _, _, ValDef[][] vparams, Tree tpe, Tree rhs):// if (!currentMethod.IsAbstract()) { if (!sym.isDeferred()) { currentMethod = tc.getMethod(sym); checkMain(currentMethod, Position.line(body[i].pos)); genDef(sym, vparams[0], rhs, msilType(tpe.type)); } break; default: assert false : "Illegal class body definition: " + Debug.show(body[i]); } } currentClass = outerClass; } //genClass() | 48012 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48012/e62db728e857ced8d60fdac6c655b89f77ca4f50/GenMSIL.java/buggy/sources/scalac/backend/msil/GenMSIL.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3157,
797,
12,
5335,
4003,
16,
4902,
8526,
1417,
13,
288,
202,
5335,
6390,
797,
273,
28742,
31,
202,
2972,
797,
273,
4003,
31,
202,
430,
261,
830,
3638,
18,
291,
3120,
797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3157,
797,
12,
5335,
4003,
16,
4902,
8526,
1417,
13,
288,
202,
5335,
6390,
797,
273,
28742,
31,
202,
2972,
797,
273,
4003,
31,
202,
430,
261,
830,
3638,
18,
291,
3120,
797,
... |
program.addCompilationUnit(cu); String prettyPrint = cu.toString(); Collection collection = new LinkedList(); cu.errorCheck(collection); System.out.println("Errors:"); for(Iterator iter = collection.iterator(); iter.hasNext(); ) { String s = (String)iter.next(); System.out.println(s); if(!s.equals("")) error = true; | catch (FileNotFoundException e) { System.err.println(e); error = false; | public static void main(String args[]) { Program program = new Program(); ServerSocket server = null; try { server = new ServerSocket(12345); } catch(IOException e) { System.err.println("Could not listen to port 12345"); System.exit(1); } System.out.println("Server active"); while(true) { Socket socket = null; try { socket = server.accept(); } catch (IOException e) { System.err.println("Accept failed"); System.exit(1); } try { PrintWriter out = new PrintWriter(socket.getOutputStream(), true); BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream())); String msg = in.readLine(); if(msg.equals("shutdown")) { System.out.println("Exiting"); System.exit(0); } else if(msg.equals("reset")) { program = new Program(); System.out.println("Reset"); } else { String path = msg; ClassFile.pushClassPath(msg); msg = in.readLine(); boolean error = false; String errorMessage = ""; while (!msg.equals("end")) { msg = msg.substring(0, msg.length()-5); System.out.println("Processing: " + msg); try { CompilationUnit cu = new ClassFile(msg).getCompilationUnit(); //CompilationUnit cu = JavaCompiler.parse(path + msg); for(int k = 0; k < cu.getNumTypeDecl(); k++) { String name = ((TypeDecl)cu.getTypeDeclListNoTransform().getChildNoTransform(k)).fullName(); for(int i = 0; i < program.getNumCompilationUnit(); i++) { CompilationUnit unit = program.getCompilationUnit(i); for(int j = 0; j < unit.getNumTypeDecl(); j++) { if(unit.getTypeDecl(j).fullName().equals(name)) { program = new Program(); } } } } program.addCompilationUnit(cu); String prettyPrint = cu.toString(); Collection collection = new LinkedList(); cu.errorCheck(collection); System.out.println("Errors:"); for(Iterator iter = collection.iterator(); iter.hasNext(); ) { String s = (String)iter.next(); System.out.println(s); if(!s.equals("")) error = true; } } catch (FileNotFoundException e) { System.err.println(e); error = false; } catch (IOException e) { e.printStackTrace(); error = true; } catch (Error e) { System.err.println(e); e.printStackTrace(); error = true; } catch (Exception e) { errorMessage = msg + ":" + e.toString().substring(e.toString().indexOf(':')+2); System.err.println(e.toString().substring(e.toString().indexOf(':')+2)); e.printStackTrace(); error = true; } msg = in.readLine(); } out.println(error ? "error:" + errorMessage : "ok"); out.flush(); System.out.println("Done"); ClassFile.popClassPath(); } out.close(); in.close(); } catch(IOException e) { System.err.println("IOException"); System.exit(1); } } //long code = System.currentTimeMillis() - start - program.parseTime; //program.codeGen(); // //program.printTypes(); //System.err.println("Parse: " + program.parseTime); //System.err.println("Analysis + print: " + code); } | 236 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/236/ad6f036d996954056152df7c1ea9d17320047aac/TestServer.java/buggy/JastAddJ/Java1.4Frontend/server/TestServer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
833,
63,
5717,
288,
565,
13586,
5402,
273,
394,
13586,
5621,
565,
3224,
4534,
1438,
273,
446,
31,
565,
775,
288,
1377,
1438,
273,
394,
3224,
4534,
12,
213... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
833,
63,
5717,
288,
565,
13586,
5402,
273,
394,
13586,
5621,
565,
3224,
4534,
1438,
273,
446,
31,
565,
775,
288,
1377,
1438,
273,
394,
3224,
4534,
12,
213... |
public void assertCreation(IJavaElement newElement) { assertCreation(new IJavaElement[] {newElement}); | public void assertCreation(IJavaElement[] newElements) { for (int i = 0; i < newElements.length; i++) { IJavaElement newElement = newElements[i]; assertTrue("Element should be present after creation", newElement.exists()); } | public void assertCreation(IJavaElement newElement) { assertCreation(new IJavaElement[] {newElement});} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/0a6cb9139841c5f6143bc94201bfcbd6024601de/AbstractJavaModelTests.java/buggy/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1815,
9906,
12,
45,
5852,
1046,
31308,
13,
288,
202,
11231,
9906,
12,
2704,
467,
5852,
1046,
8526,
288,
2704,
1046,
22938,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1815,
9906,
12,
45,
5852,
1046,
31308,
13,
288,
202,
11231,
9906,
12,
2704,
467,
5852,
1046,
8526,
288,
2704,
1046,
22938,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
s[i] = (byte) Integer.parseInt(f[i], 16); | String[] f = findTA.getText().split(" "); byte[] s = new byte[f.length]; for (int i = 0; i < f.length; i++) { s[i] = (byte) Integer.parseInt(f[i], 16); } int off = rom.find(findOff, s); if (off == -1) { JOptionPane.showMessageDialog(findWindow, "The search you entered\n" + "is not in the ROM.", "Unable to find", JOptionPane.ERROR_MESSAGE); findOff = 0; } else { findOff = off + 1; gotoOffset(off); } | protected void find() { String[] f = findTA.getText().split(" "); byte[] s = new byte[f.length]; for (int i = 0; i < f.length; i++) { s[i] = (byte) Integer.parseInt(f[i], 16); } int off = rom.find(findOff, s); if (off == -1) { JOptionPane.showMessageDialog(findWindow, "The search you entered\n" + "is not in the ROM.", "Unable to find", JOptionPane.ERROR_MESSAGE); findOff = 0; } else { findOff = off + 1; gotoOffset(off); } } | 3699 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3699/f7dbfa5edc01271e916180f10a34f91dc84c503d/HexEditor.java/clean/src/net/starmen/pkhack/HexEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1104,
1435,
565,
288,
3639,
514,
8526,
284,
273,
1104,
9833,
18,
588,
1528,
7675,
4939,
2932,
315,
1769,
3639,
1160,
8526,
272,
273,
394,
1160,
63,
74,
18,
2469,
15533,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1104,
1435,
565,
288,
3639,
514,
8526,
284,
273,
1104,
9833,
18,
588,
1528,
7675,
4939,
2932,
315,
1769,
3639,
1160,
8526,
272,
273,
394,
1160,
63,
74,
18,
2469,
15533,
3639,
... |
String elementName = ( (DesignElementHandle) firstSelectedElement ) .getDefn( ).getName( ); | String elementName = ( (DesignElementHandle) firstSelectedElement ).getDefn( ) .getName( ); | public void buildContextMenu( IMenuManager menuManager ) { GEFActionConstants.addStandardActionGroups( menuManager ); Object firstSelectedElement = getFirstElement( ); Object selectedElements = getSelectedElement( ); Object multiSelection = getMultiSelectedElement( ); // special for dealing with multi selected elements (items). if ( isMutilSelection( multiSelection ) ) { menuManager.appendToGroup( GEFActionConstants.GROUP_UNDO, getAction( ActionFactory.UNDO.getId( ) ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_UNDO, getAction( ActionFactory.REDO.getId( ) ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new CutAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new CopyAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new PasteAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new DeleteAction( selectedElements ) ); if ( isRootElementHandleClass( multiSelection ) ) { Action action = new RefreshModuleHandleAction(selectedElements); menuManager.add(action ); createInsertElementMenu( menuManager, GEFActionConstants.GROUP_EDIT ); createThemeMenu( menuManager, GEFActionConstants.GROUP_REST ); } if ( isListHandleCalss( multiSelection ) ) { IAction action = getAction( CreatePlaceHolderPartAction.ID ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, action ); } createStyleMenu( menuManager, GEFActionConstants.GROUP_REST ); if ( Policy.TRACING_MENU_SHOW ) { System.out .println( "Menu(for Editor) >> Shows for multi-selcetion." ); //$NON-NLS-1$ } } // ----------------------------------------------------------------- else if ( firstSelectedElement instanceof DesignElementHandle ) { menuManager.appendToGroup( GEFActionConstants.GROUP_UNDO, getAction( ActionFactory.UNDO.getId( ) ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_UNDO, getAction( ActionFactory.REDO.getId( ) ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new CutAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new CopyAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new PasteAction( selectedElements ) ); createStyleMenu( menuManager, GEFActionConstants.GROUP_REST ); if ( ( (IStructuredSelection) getSelection( ) ).size( ) == 1 ) { Object element = ( (IStructuredSelection) getSelection( ) ) .getFirstElement( ); if ( element instanceof LabelEditPart || element instanceof ImageEditPart ) { IAction action = getAction( GEFActionConstants.DIRECT_EDIT ); action.setAccelerator( SWT.F2 ); if ( element instanceof DataEditPart ) { action .setText( Messages .getString( "SchematicContextMenuProvider.ActionText.editData" ) ); //$NON-NLS-1$ } else { action .setText( Messages .getString( "SchematicContextMenuProvider.ActionText.editLabel" ) ); //$NON-NLS-1$ } menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, action ); } if ( firstSelectedElement instanceof ReportItemHandle ) { IAction action = getAction( CreatePlaceHolderPartAction.ID ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, action ); action = getAction( RevertToReportItemPartAction.ID ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, action ); action = getAction( RevertToTemplatePartAction.ID ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, action ); } if ( firstSelectedElement instanceof TemplateReportItemHandle ) { IAction action = getAction( RevertToReportItemPartAction.ID ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, action ); } } if ( firstSelectedElement instanceof RowHandle ) { if ( getRowHandles( ).size( ) != 0 ) { MenuManager insertMenu = new MenuManager( INSERT_MENU_ITEM_TEXT ); MenuManager rowMenu = new MenuManager( INSERT_ROW_MENU_ITEM_TEXT ); rowMenu.add( getAction( InsertRowAboveAction.ID ) ); rowMenu.add( getAction( InsertRowBelowAction.ID ) ); RowHandle row = (RowHandle) getRowHandles( ).get( 0 ); if ( !( row.getContainer( ) instanceof GridHandle ) ) { insertMenu.add( getAction( IncludeHeaderAction.ID ) ); insertMenu.add( getAction( IncludeDetailAction.ID ) ); insertMenu.add( getAction( IncludeFooterAction.ID ) ); } insertMenu.add( rowMenu ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, insertMenu ); } // delete row action. menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, getAction( DeleteRowAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( MergeAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( SplitAction.ID ) ); } else if ( firstSelectedElement instanceof ColumnHandle ) { menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, new InsertPasteColumnAction( selectedElements ) ); if ( getColumnHandles( ).size( ) != 0 ) { MenuManager subMenu = new MenuManager( INSERT_MENU_ITEM_TEXT ); subMenu.add( getAction( InsertColumnRightAction.ID ) ); subMenu.add( getAction( InsertColumnLeftAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, subMenu ); } // delete column action. menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, getAction( DeleteColumnAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( MergeAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( SplitAction.ID ) ); } else if ( firstSelectedElement instanceof CellHandle ) { createInsertElementMenu( menuManager, GEFActionConstants.GROUP_EDIT ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( MergeAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( SplitAction.ID ) ); // delete action in cell menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new DeleteAction( selectedElements ) ); } else { // common delete action menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new DeleteAction( selectedElements ) ); } if ( Policy.TRACING_MENU_SHOW ) { System.out.println( "Menu(for Editor) >> Shows for " //$NON-NLS-1$ + ( (DesignElementHandle) firstSelectedElement ) .getDefn( ).getDisplayName( ) ); } } else if ( firstSelectedElement instanceof SlotHandle ) { menuManager.appendToGroup( GEFActionConstants.GROUP_UNDO, getAction( ActionFactory.UNDO.getId( ) ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_UNDO, getAction( ActionFactory.REDO.getId( ) ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new CutAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new CopyAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new PasteAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new DeleteAction( selectedElements ) ); createInsertElementMenu( menuManager, GEFActionConstants.GROUP_EDIT ); if ( Policy.TRACING_MENU_SHOW ) { System.out.println( "Menu(for Editor) >> Shows for the slot " //$NON-NLS-1$ + ( (SlotHandle) firstSelectedElement ).getSlotID( ) + " of " //$NON-NLS-1$ + ( (SlotHandle) firstSelectedElement ) .getElementHandle( ).getDefn( ) .getDisplayName( ) ); } } else { } if ( !getTableEditParts( ).isEmpty( ) ) { createInsertGroupMenu( menuManager, GEFActionConstants.GROUP_ADD ); menuManager.appendToGroup( GEFActionConstants.GROUP_ADD, getAction( DeleteTableGroupAction.ID ) ); if ( getTableEditParts( ).size( ) == 1 ) { createEditGroupMenu( menuManager, GEFActionConstants.GROUP_ADD ); Separator separator = new Separator( EditBindingAction.ID ); menuManager.add( separator ); menuManager.appendToGroup( EditBindingAction.ID, getAction( EditBindingAction.ID ) ); } } if ( !getListEditParts( ).isEmpty( ) ) { createInsertGroupMenu( menuManager, GEFActionConstants.GROUP_ADD ); menuManager.appendToGroup( GEFActionConstants.GROUP_ADD, getAction( DeleteListGroupAction.ID ) ); if ( getListEditParts( ).size( ) == 1 ) { createEditGroupMenu( menuManager, GEFActionConstants.GROUP_ADD ); Separator separator = new Separator( EditBindingAction.ID ); menuManager.add( separator ); menuManager.appendToGroup( EditBindingAction.ID, getAction( EditBindingAction.ID ) ); } } if ( getElements( ).size( ) == 1 || isMutilSelection( multiSelection ) ) { if ( firstSelectedElement instanceof DesignElementHandle ) { String elementName = ( (DesignElementHandle) firstSelectedElement ) .getDefn( ).getName( ); IMenuBuilder menuBuilder = ExtensionPointManager.getInstance( ) .getMenuBuilder( elementName ); if ( menuBuilder != null ) { menuBuilder.buildMenu( menuManager, getElements( ) ); } } } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/d23060ee35f066be9e9cce3acd409c8723a10ff5/SchematicContextMenuProvider.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/editors/schematic/providers/SchematicContextMenuProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1361,
27315,
12,
467,
4599,
1318,
3824,
1318,
262,
202,
95,
202,
202,
7113,
42,
1803,
2918,
18,
1289,
8336,
1803,
3621,
12,
3824,
1318,
11272,
202,
202,
921,
1122,
7416,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1361,
27315,
12,
467,
4599,
1318,
3824,
1318,
262,
202,
95,
202,
202,
7113,
42,
1803,
2918,
18,
1289,
8336,
1803,
3621,
12,
3824,
1318,
11272,
202,
202,
921,
1122,
7416,
... |
Name name6 = new LdapDN( "cn=HomeDir" ); Name name7 = new LdapDN( "cn=HomeDir,cn=John" ); Name name8 = new LdapDN( "cn=HomeDir,cn=John,ou=Marketing" ); | Name name6 = new LdapDN( "cn=HomeDir" ); Name name7 = new LdapDN( "cn=HomeDir,cn=John" ); Name name8 = new LdapDN( "cn=HomeDir,cn=John,ou=Marketing" ); | public void testEndsWith() throws Exception { Name name0 = new LdapDN( "cn=HomeDir,cn=John,ou=Marketing,ou=East" ); Name name1 = new LdapDN( "cn=HomeDir,cn=John,ou=Marketing,ou=East" ); Name name2 = new LdapDN( "cn=John,ou=Marketing,ou=East" ); Name name3 = new LdapDN( "ou=Marketing,ou=East" ); Name name4 = new LdapDN( "ou=East" ); Name name5 = new LdapDN( "" ); Name name6 = new LdapDN( "cn=HomeDir" ); Name name7 = new LdapDN( "cn=HomeDir,cn=John" ); Name name8 = new LdapDN( "cn=HomeDir,cn=John,ou=Marketing" ); assertTrue( name0.endsWith( name1 ) ); assertTrue( !name0.endsWith( name2 ) ); assertTrue( !name0.endsWith( name3 ) ); assertTrue( !name0.endsWith( name4 ) ); assertTrue( name0.endsWith( name5 ) ); assertTrue( name0.endsWith( name6 ) ); assertTrue( name0.endsWith( name7 ) ); assertTrue( name0.endsWith( name8 ) ); /* * Hashtable env = new Hashtable() ; env.put( * Context.SECURITY_AUTHENTICATION, "simple" ) ; env.put( * Context.SECURITY_PRINCIPAL, "cn=admin,dc=example,dc=com" ) ; env.put( * Context.SECURITY_CREDENTIALS, "jPasswordField1" ) ; env.put( * Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" ) ; * env.put( Context.PROVIDER_URL, * "ldap://localhost:1396/dc=example,dc=com" ) ; DirContext ctx = new * InitialDirContext( env ) ; NamingEnumeration enum = ctx.listBindings( "" ) ; * Name name0 = new LdapDN( "ou=Special Users,dc=example,dc=com" ) ; * Name name1 = new LdapDN( "dc=example,dc=com" ) ; Name name2 = new * LdapDN( "dc=com" ) ; Name name3 = new LdapDN( "ou=Special Users" ) ; * Name name4 = new LdapDN( "ou=Special Users,dc=example" ) ; Name name5 = * new LdapDN( "" ) ; while ( enum.hasMore() ) { Binding binding = ( * Binding ) enum.next() ; DirContext dirCtx = ( DirContext ) * binding.getObject() ; NameParser parser = dirCtx.getNameParser( "" ) ; * Name namex = parser.parse( dirCtx.getNameInNamespace() ) ; // * DirContext dirCtx = ( DirContext ) enum.next() ; } */ } | 54578 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54578/34d16a3366af953bef4b3d5f4cf0e7c6bda29ba6/LdapDNTest.java/clean/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
24980,
1190,
1435,
1216,
1185,
565,
288,
3639,
1770,
508,
20,
273,
394,
18053,
8609,
12,
315,
10305,
33,
8684,
1621,
16,
10305,
33,
46,
22223,
16,
1395,
33,
3882,
21747,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24980,
1190,
1435,
1216,
1185,
565,
288,
3639,
1770,
508,
20,
273,
394,
18053,
8609,
12,
315,
10305,
33,
8684,
1621,
16,
10305,
33,
46,
22223,
16,
1395,
33,
3882,
21747,
... |
}); } catch (final Throwable t) { SwingUtilities.invokeLater(new Runnable() { public void run() { DataSetTabSet.this.martTab.getMartTabSet() .getMartBuilder().showStackTrace(t); } }); } } | public void run() { try { // Add the restriction. MartBuilderUtils .restrictRelation(dataset, relation, expression, firstColumnAliases, secondColumnAliases); SwingUtilities.invokeLater(new Runnable() { public void run() { // If it is an internal relation, repaint the schema // diagram. if (!relation.isExternal()) DataSetTabSet.this.martTab .getSchemaTabSet() .repaintSchemaDiagram( relation.getFirstKey() .getTable().getSchema()); // Otherwise, it is external, so repaint the schema // overview diagram. else DataSetTabSet.this.martTab.getSchemaTabSet() .repaintOverviewDiagram(); // Update the explanation diagram so that it // correctly reflects the changed relation. DataSetTabSet.this.repaintExplanationDialog(); // Update the modified status for the tabset. DataSetTabSet.this.martTab.getMartTabSet() .setModifiedStatus(true); } }); } catch (final Throwable t) { SwingUtilities.invokeLater(new Runnable() { public void run() { DataSetTabSet.this.martTab.getMartTabSet() .getMartBuilder().showStackTrace(t); } }); } } | 2000 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2000/697fc52b912bb5a1524113edc0e15bf091f78336/DataSetTabSet.java/clean/src/java/org/biomart/builder/view/gui/DataSetTabSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1086,
1435,
288,
9506,
202,
698,
288,
6862,
202,
759,
1436,
326,
9318,
18,
6862,
202,
49,
485,
1263,
1989,
6862,
1082,
202,
18,
30604,
3963,
12,
8682,
16,
2533,
16,
2652... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1086,
1435,
288,
9506,
202,
698,
288,
6862,
202,
759,
1436,
326,
9318,
18,
6862,
202,
49,
485,
1263,
1989,
6862,
1082,
202,
18,
30604,
3963,
12,
8682,
16,
2533,
16,
2652... | |
throw new NO_RESOURCES("Unable to open the server socket"); | NO_RESOURCES bad = new NO_RESOURCES("Unable to open the server socket."); bad.initCause(ex); throw bad; | public int getFreePort() throws BAD_OPERATION { ServerSocket s; try { // If there are some previously freed ports, use them first. if (!freed_ports.isEmpty()) { Integer free = (Integer) freed_ports.getLast(); freed_ports.removeLast(); s = new ServerSocket(free.intValue()); s.close(); return free.intValue(); } } catch (Exception ex) { // This may be thrown if the request for the new port has arrived // before the current service is completly shutdown. // OK then, use a new port. } for (int i = Port; i < Port + 20; i++) { try { s = new ServerSocket(i); s.close(); Port = i + 1; return s.getLocalPort(); } catch (IOException ex) { // Repeat the loop if this exception has been thrown. } } try { // Try any port. s = new ServerSocket(); s.close(); return s.getLocalPort(); } catch (IOException ex1) { throw new NO_RESOURCES("Unable to open the server socket"); } } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/530b07ccb0c4fb1bf75b0623599a435d741fe9e8/Functional_ORB.java/buggy/libraries/javalib/gnu/CORBA/Functional_ORB.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
2812,
992,
2617,
1435,
5375,
1216,
16467,
67,
22040,
225,
288,
565,
3224,
4534,
272,
31,
565,
775,
1377,
288,
3639,
368,
971,
1915,
854,
2690,
7243,
28004,
9048,
16,
999,
2182,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
2812,
992,
2617,
1435,
5375,
1216,
16467,
67,
22040,
225,
288,
565,
3224,
4534,
272,
31,
565,
775,
1377,
288,
3639,
368,
971,
1915,
854,
2690,
7243,
28004,
9048,
16,
999,
2182,... |
return ResourceNavigatorMessages.getString("ResourceManager.toolTip"); | return ResourceNavigatorMessages.getString("ResourceManager.toolTip"); | String getToolTipText(Object element) { if (element instanceof IResource) { IPath path = ((IResource) element).getFullPath(); if (path.isRoot()) { return ResourceNavigatorMessages.getString("ResourceManager.toolTip"); //$NON-NLS-1$ } else { return path.makeRelative().toString(); } } else { return ((ILabelProvider) getTreeViewer().getLabelProvider()).getText( element); } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/80cfecc0fb5392981e25acee0f567feb8ed55185/ResourceNavigator.java/clean/bundles/org.eclipse.ui/Eclipse UI Standard Components/org/eclipse/ui/views/navigator/ResourceNavigator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
780,
336,
29250,
1528,
12,
921,
930,
13,
288,
202,
202,
430,
261,
2956,
1276,
467,
1420,
13,
288,
1082,
202,
45,
743,
589,
273,
14015,
45,
1420,
13,
930,
2934,
588,
24173,
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,
780,
336,
29250,
1528,
12,
921,
930,
13,
288,
202,
202,
430,
261,
2956,
1276,
467,
1420,
13,
288,
1082,
202,
45,
743,
589,
273,
14015,
45,
1420,
13,
930,
2934,
588,
24173,
5621,
... |
tuple[3] = relKind.getBytes(); | tuple[3] = (relKind==null) ? null : relKind.getBytes(); | public java.sql.ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String types[]) throws SQLException { // Handle default value for types if(types==null) types = defaultTableTypes; if(tableNamePattern==null) tableNamePattern="%"; // the field descriptors for the new ResultSet Field f[] = new Field[5]; java.sql.ResultSet r; // ResultSet for the SQL query that we need to do Vector v = new Vector(); // The new ResultSet tuple stuff f[0] = new Field(connection, "TABLE_CAT", iVarcharOid, 32); f[1] = new Field(connection, "TABLE_SCHEM", iVarcharOid, 32); f[2] = new Field(connection, "TABLE_NAME", iVarcharOid, 32); f[3] = new Field(connection, "TABLE_TYPE", iVarcharOid, 32); f[4] = new Field(connection, "REMARKS", iVarcharOid, 32); // Now form the query StringBuffer sql = new StringBuffer("select relname,oid,relkind from pg_class where ("); boolean notFirst=false; for(int i=0;i<types.length;i++) { for(int j=0;j<getTableTypes.length;j++) if(getTableTypes[j][0].equals(types[i])) { if(notFirst) sql.append(" or "); sql.append(getTableTypes[j][1]); notFirst=true; } } // Added by Stefan Andreasen <stefan@linux.kapow.dk> // Now take the pattern into account sql.append(") and relname like '"); sql.append(tableNamePattern.toLowerCase()); sql.append("' order by relkind, relname"); // Now run the query r = connection.ExecSQL(sql.toString()); byte remarks[]; while (r.next()) { byte[][] tuple = new byte[5][0]; // Fetch the description for the table (if any) java.sql.ResultSet dr = connection.ExecSQL("select description from pg_description where objoid="+r.getInt(2)); if(((org.postgresql.ResultSet)dr).getTupleCount()==1) { dr.next(); remarks = dr.getBytes(1); } else remarks = defaultRemarks; dr.close(); String relKind; switch (r.getBytes(3)[0]) { case 'r': relKind = "TABLE"; break; case 'i': relKind = "INDEX"; break; case 'S': relKind = "SEQUENCE"; break; default: relKind = null; } tuple[0] = null; // Catalog name tuple[1] = null; // Schema name tuple[2] = r.getBytes(1); // Table name tuple[3] = relKind.getBytes(); // Table type tuple[4] = remarks; // Remarks v.addElement(tuple); } r.close(); return new ResultSet(connection, f, v, "OK", 1); } | 49504 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49504/863c9d11f13cf8afff70242660d39bd70b5743c8/DatabaseMetaData.java/clean/src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2252,
18,
4669,
18,
13198,
29002,
12,
780,
6222,
16,
514,
1963,
3234,
16,
514,
4775,
3234,
16,
514,
1953,
63,
5717,
1216,
6483,
225,
288,
565,
368,
5004,
805,
460,
364,
1953,
565,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2252,
18,
4669,
18,
13198,
29002,
12,
780,
6222,
16,
514,
1963,
3234,
16,
514,
4775,
3234,
16,
514,
1953,
63,
5717,
1216,
6483,
225,
288,
565,
368,
5004,
805,
460,
364,
1953,
565,... |
private int lang_id; private int user_type; | private int lang_id; private int user_type; | public imcode.server.User verifyUser(String login, String password) { login = login.trim() ; User user = null ; String[] user_data = sqlProcedure("GetUserByLogin ", new String[] { login } ) ; /* The columns are: 0 user_id, 1 login_name, 2 login_password, 3 first_name, 4 last_name, 5 title, 6 company, 7 address, 8 city, 9 zip, 10 country, 11 county_council, 12 email, 13 lang_id 14 lang_prefix, 15 user_type, 16 active, 17 create_date */ // if resultSet > 0 a user is found if ( user_data.length > 0 ) { user = new User() ; /* user object private int userId ; private String loginName ; //varchar 50 private String password ; //varchar 15 private String firstName; //varchar 25 private String lastName; //varchar 30 private String title; //varchar 30 private String company; //varchar 30 private String address; //varchar 40 private String city; //varchar 30 private String zip; //varchar 15 private String country; //varchar 30 private String county_council; //varchar 30 private String emailAddress; //varchar 50 private int lang_id; private int user_type; private boolean active ; //int private Date create_date; //smalldatetime private String langPrefix; private int template_group = -1 ; private String loginType ; */ user.setUserId ( Integer.parseInt( user_data[0] ) ) ; user.setLoginName ( user_data[1] ) ; user.setPassword ( user_data[2].trim() ) ; user.setFirstName ( user_data[3] ) ; user.setLastName ( user_data[4] ) ; user.setTitle ( user_data[5] ) ; user.setCompany ( user_data[6] ) ; user.setAddress ( user_data[7] ) ; user.setCity ( user_data[8] ) ; user.setZip ( user_data[9] ) ; user.setCountry ( user_data[10] ) ; user.setCountyCouncil ( user_data[11] ) ; user.setEmailAddress ( user_data[12] ) ; user.setLangId ( Integer.parseInt( user_data[13] ) ) ; user.setUserType ( Integer.parseInt( user_data[15] ) ) ; user.setActive ( 0 != Integer.parseInt( user_data[16] ) ) ; user.setCreateDate ( user_data[17] ) ; user.setLangPrefix ( user_data[14] ) ; String login_password_from_db = user.getPassword() ; String login_password_from_form = password ; if ( login_password_from_db.equals(login_password_from_form) && user.isActive()){ this.updateLogs("->User " + login + " succesfully logged in.") ; } else if (!user.isActive() ) { this.updateLogs("->User " + (login) + " tried to logged in: User deleted!") ; return null ; } else { this.updateLogs("->User " + (login) + " tried to logged in: Wrong password!") ; return null ; } } else { this.updateLogs("->User " + (login) + " tried to logged in: User not found!") ; return null ; } return user ; } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/f231d16af5b11e6f3f5820c909b7c86f64a2db7a/IMCService.java/buggy/server/src/imcode/server/IMCService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
709,
710,
18,
3567,
18,
1299,
3929,
1299,
12,
780,
3925,
16,
514,
2201,
13,
288,
202,
5819,
273,
3925,
18,
5290,
1435,
274,
202,
1299,
729,
273,
446,
274,
202,
780,
8526,
729,
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,
709,
710,
18,
3567,
18,
1299,
3929,
1299,
12,
780,
3925,
16,
514,
2201,
13,
288,
202,
5819,
273,
3925,
18,
5290,
1435,
274,
202,
1299,
729,
273,
446,
274,
202,
780,
8526,
729,
6... |
if(shouldInject(classNode)) { injectIdProperty(classNode); injectVersionProperty(classNode); injectToStringMethod(classNode); injectAssociations(classNode); } | public void performInjection(SourceUnit source, GeneratorContext context, ClassNode classNode) { // TODO Implement injection of properties } | 53275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53275/b6ef9ddec7862d8efa8e6b63db67dfa714830c8a/DefaultGrailsDomainClassInjector.java/buggy/src/commons/org/codehaus/groovy/grails/injection/DefaultGrailsDomainClassInjector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
309,
12,
13139,
15598,
12,
1106,
907,
3719,
288,
4590,
548,
1396,
12,
1106,
907,
1769,
225,
4590,
1444,
1396,
12,
1106,
907,
1769,
225,
4590,
5808,
1305,
12,
1106,
907,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
309,
12,
13139,
15598,
12,
1106,
907,
3719,
288,
4590,
548,
1396,
12,
1106,
907,
1769,
225,
4590,
1444,
1396,
12,
1106,
907,
1769,
225,
4590,
5808,
1305,
12,
1106,
907,
1769,
... | |
if (item.hasimage && item.hastext) { NavParams sideparams = new NavParams(); sideparams.viewtype = NavParams.SIDE_VIEW; sideparams.viewID = FramesetProducer.VIEWID; UIInternalLink.make(tofill, "switch-side", sideparams); } if (item.hasimage) { NavParams sideparams = new NavParams(); sideparams.viewtype = NavParams.IMAGE_VIEW; sideparams.viewID = FramesetProducer.VIEWID; UIInternalLink.make(tofill, "switch-image", sideparams); } if (item.hastext) { NavParams sideparams = new NavParams(); sideparams.viewtype = NavParams.TEXT_VIEW; sideparams.viewID = FramesetProducer.VIEWID; UIInternalLink.make(tofill, "switch-text", sideparams); | String next = itemcollection.adjust(recparams.itemID, ItemCollection.NEXT); if (next != null) { UIInternalLink.make(tofill, "next", new RecordParams(next)); | public void fillComponents(UIContainer tofill, ViewParameters viewparams, ComponentChecker checker) { RecordParams recparams = (RecordParams) viewparams; ItemDetails item = itemcollection.getItem(recparams.itemID); UIOutput.make(tofill, "identifier", recparams.itemID); if (item.hasimage && item.hastext) { NavParams sideparams = new NavParams(); sideparams.viewtype = NavParams.SIDE_VIEW; sideparams.viewID = FramesetProducer.VIEWID; UIInternalLink.make(tofill, "switch-side", sideparams); } if (item.hasimage) { NavParams sideparams = new NavParams(); sideparams.viewtype = NavParams.IMAGE_VIEW; sideparams.viewID = FramesetProducer.VIEWID; UIInternalLink.make(tofill, "switch-image", sideparams); } if (item.hastext) { NavParams sideparams = new NavParams(); sideparams.viewtype = NavParams.TEXT_VIEW; sideparams.viewID = FramesetProducer.VIEWID; UIInternalLink.make(tofill, "switch-text", sideparams); } try { DocHit[] hits = indexItemSearcher.getItemHit(recparams.itemID); Document hit = hits[0].document; String concise = hit.get("reference"); UIOutput.make(tofill, "concise", concise); String notes = hit.get("notes"); UIOutput.make(tofill, "detailed", notes); } catch (Exception e) { Logger.log.warn("Error performing search", e); } } | 8847 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8847/e0263fb3c855109c1e7186377b5df7c8ff69d29a/RecordProducer.java/buggy/src/java/uk/org/ponder/darwin/rsf/producers/RecordProducer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3636,
7171,
12,
5370,
2170,
358,
5935,
16,
4441,
2402,
1476,
2010,
16,
4202,
5435,
8847,
12489,
13,
288,
565,
5059,
1370,
1950,
2010,
273,
261,
2115,
1370,
13,
1476,
2010,
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,
282,
1071,
918,
3636,
7171,
12,
5370,
2170,
358,
5935,
16,
4441,
2402,
1476,
2010,
16,
4202,
5435,
8847,
12489,
13,
288,
565,
5059,
1370,
1950,
2010,
273,
261,
2115,
1370,
13,
1476,
2010,
31,
... |
if (linkTargetPath != null) fileHandle.createLink(linkTargetPath, | if (linkTargetPath != null) { fileHandle.createLink(linkTargetPath, | protected void createFile(IFile fileHandle, InputStream contents, IProgressMonitor monitor) throws CoreException { if (contents == null) contents = new ByteArrayInputStream(new byte[0]); try { // Create a new file resource in the workspace if (linkTargetPath != null) fileHandle.createLink(linkTargetPath, IResource.ALLOW_MISSING_LOCAL, monitor); else { IPath path = fileHandle.getFullPath(); IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); int numSegments= path.segmentCount(); if (numSegments > 2 && !root.getFolder(path.removeLastSegments(1)).exists()) { // If the direct parent of the path doesn't exist, try to create the // necessary directories. for (int i= numSegments - 2; i > 0; i--) { IFolder folder = root.getFolder(path.removeLastSegments(i)); if (!folder.exists()) { folder.create(false, true, monitor); } } } fileHandle.create(contents, false, monitor); } } catch (CoreException e) { // If the file already existed locally, just refresh to get contents if (e.getStatus().getCode() == IResourceStatus.PATH_OCCUPIED) fileHandle.refreshLocal(IResource.DEPTH_ZERO, null); else throw e; } if (monitor.isCanceled()) throw new OperationCanceledException(); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/WizardNewFileCreationPage.java/clean/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFileCreationPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
21266,
12,
45,
812,
26662,
16,
5037,
2939,
16,
5411,
467,
5491,
7187,
6438,
13,
1216,
30015,
288,
3639,
309,
261,
3980,
422,
446,
13,
5411,
2939,
273,
394,
16180,
12,
2704,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21266,
12,
45,
812,
26662,
16,
5037,
2939,
16,
5411,
467,
5491,
7187,
6438,
13,
1216,
30015,
288,
3639,
309,
261,
3980,
422,
446,
13,
5411,
2939,
273,
394,
16180,
12,
2704,
1... |
public void run() { // TODO: clean up exception handling if (throwable.getCause() instanceof BugzillaException) { MessageDialog.openError(null, IBugzillaConstants.TITLE_MESSAGE_DIALOG, "Bugzilla could not post your bug."); } else if (throwable.getCause() instanceof PossibleBugzillaFailureException) { String attributes = ""; if (bugReport != null) { for (AbstractRepositoryReportAttribute attribute : bugReport.getAttributes()) { attributes += attribute.getID() + "=" + attribute.getValue() + " | "; } MylarStatusHandler.log(attributes, BugzillaRepositoryConnector.class); } WebBrowserDialog.openAcceptAgreement(null, IBugzillaConstants.TITLE_MESSAGE_DIALOG, "Possible problem posting Bugzilla report.\n" + throwable.getCause().getMessage(), form.getError()); } else if (throwable.getCause() instanceof LoginException) { MessageDialog.openError(null, IBugzillaConstants.TITLE_MESSAGE_DIALOG, "Bugzilla could not post your bug since your login name or password is incorrect." + " Ensure proper repository configuration in " + TaskRepositoriesView.NAME + "."); } else { MylarStatusHandler.fail(throwable, "could not post bug", false); MessageDialog.openError(null, IBugzillaConstants.TITLE_MESSAGE_DIALOG, "Could not post bug. Check repository credentials and connectivity.\n\n" + throwable); } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/5e1b9d2e7e1408c07add5d8461b84651ed66e89a/BugzillaRepositoryConnector.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositoryConnector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
15106,
202,
482,
6459,
2681,
1435,
95,
6862,
9506,
202,
759,
6241,
30,
16732,
4064,
26822,
6862,
9506,
202,
430,
12,
12849,
429,
18,
588,
10683,
1435,
1336,
792,
19865,
15990,
503,
15329,
6862,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
15106,
202,
482,
6459,
2681,
1435,
95,
6862,
9506,
202,
759,
6241,
30,
16732,
4064,
26822,
6862,
9506,
202,
430,
12,
12849,
429,
18,
588,
10683,
1435,
1336,
792,
19865,
15990,
503,
15329,
6862,
... | ||
return viewer.getControl( ); | return container; | public Control getControl( ) { if ( viewer == null ) return null; return viewer.getControl( ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/97ec512e11440a7aef4cabaf9a1d56dca5de4b0b/ReportPropertySheetPage.java/clean/UI/org.eclipse.birt.report.designer.ui.editors/src/org/eclipse/birt/report/designer/internal/ui/views/property/ReportPropertySheetPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8888,
27174,
12,
262,
202,
95,
202,
202,
430,
261,
14157,
422,
446,
262,
1082,
202,
2463,
446,
31,
202,
202,
2463,
14157,
18,
588,
3367,
12,
11272,
202,
97,
2,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8888,
27174,
12,
262,
202,
95,
202,
202,
430,
261,
14157,
422,
446,
262,
1082,
202,
2463,
446,
31,
202,
202,
2463,
14157,
18,
588,
3367,
12,
11272,
202,
97,
2,
-100,
-100,
-... |
return displayDiff((ElementDef)other, null, 0); | return displayDiff((ElementDef)other, null, 0); | public boolean equals(Object other) { try { return displayDiff((ElementDef)other, null, 0); } catch (ClassCastException ex) { return false; } } | 4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/b5b5168edc3af09cb74945a80b0c36e6630ed502/ElementDef.java/buggy/src/main/mondrian/xom/ElementDef.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1606,
12,
921,
1308,
13,
202,
95,
5411,
775,
288,
202,
202,
2463,
2562,
5938,
12443,
1046,
3262,
13,
3011,
16,
446,
16,
374,
1769,
5411,
289,
1044,
261,
797,
22768,
431,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1606,
12,
921,
1308,
13,
202,
95,
5411,
775,
288,
202,
202,
2463,
2562,
5938,
12443,
1046,
3262,
13,
3011,
16,
446,
16,
374,
1769,
5411,
289,
1044,
261,
797,
22768,
431,... |
if (j != null) _context.jobQueue().addJob(j); | j.getTiming().setStartAfter(_context.clock().now()); _context.jobQueue().addJob(j); | public void publish(LeaseSet localLeaseSet) { if (!_initialized) return; Hash h = localLeaseSet.getDestination().calculateHash(); try { store(h, localLeaseSet); } catch (IllegalArgumentException iae) { _log.error("wtf, locally published leaseSet is not valid?", iae); return; } synchronized (_explicitSendKeys) { _explicitSendKeys.add(h); } Job j = null; synchronized (_publishingLeaseSets) { boolean isNew = _publishingLeaseSets.add(h); if (isNew) j = new RepublishLeaseSetJob(_context, this, h); } if (j != null) _context.jobQueue().addJob(j); } | 27493 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27493/bc626ece2d2f61e1246a0c597f733962ed58b0db/KademliaNetworkDatabaseFacade.java/clean/router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3808,
12,
17746,
694,
1191,
17746,
694,
13,
288,
3639,
309,
16051,
67,
13227,
13,
327,
31,
3639,
2474,
366,
273,
1191,
17746,
694,
18,
588,
5683,
7675,
11162,
2310,
5621,
3639,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3808,
12,
17746,
694,
1191,
17746,
694,
13,
288,
3639,
309,
16051,
67,
13227,
13,
327,
31,
3639,
2474,
366,
273,
1191,
17746,
694,
18,
588,
5683,
7675,
11162,
2310,
5621,
3639,... |
} else if (in.match('=')) { | } else if (matchChar('=')) { | public int getToken() throws IOException { int c; tokenno++; // Check for pushed-back token if (this.pushbackToken != EOF) { int result = this.pushbackToken; this.pushbackToken = EOF; return result; } // Eat whitespace, possibly sensitive to newlines. do { c = in.read(); if (c == '\n') { flags &= ~TSF_DIRTYLINE; if ((flags & TSF_NEWLINES) != 0) break; } } while (isJSSpace(c) || c == '\n'); if (c == EOF_CHAR) return EOF; if (c != '-' && c != '\n') flags |= TSF_DIRTYLINE; // identifier/keyword/instanceof? // watch out for starting with a <backslash> boolean identifierStart; boolean isUnicodeEscapeStart = false; if (c == '\\') { c = in.read(); if (c == 'u') { identifierStart = true; isUnicodeEscapeStart = true; stringBufferTop = 0; } else { identifierStart = false; c = '\\'; in.unread(); } } 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 = in.read(); 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 = in.read(); if (c == '\\') { c = in.read(); if (c == 'u') { isUnicodeEscapeStart = true; containsEscape = true; } else { reportSyntaxError("msg.illegal.character", null); return ERROR; } } else { if (!Character.isJavaIdentifierPart((char)c)) { break; } addToString(c); } } } in.unread(); 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 = str; return NAME; } // is it a number? if (isDigit(c) || (c == '.' && isDigit(in.peek()))) { stringBufferTop = 0; int base = 10; if (c == '0') { c = in.read(); if (c == 'x' || c == 'X') { base = 16; c = in.read(); } else if (isDigit(c)) { base = 8; } else { addToString('0'); } } if (base == 16) { while (0 <= xDigitToInt(c)) { addToString(c); c = in.read(); } } 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 = in.read(); } } boolean isInteger = true; if (base == 10 && (c == '.' || c == 'e' || c == 'E')) { isInteger = false; if (c == '.') { do { addToString(c); c = in.read(); } while (isDigit(c)); } if (c == 'e' || c == 'E') { addToString(c); c = in.read(); if (c == '+' || c == '-') { addToString(c); c = in.read(); } if (!isDigit(c)) { reportSyntaxError("msg.missing.exponent", null); return ERROR; } do { addToString(c); c = in.read(); } while (isDigit(c)); } } in.unread(); 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; int val = 0; stringBufferTop = 0; c = in.read(); strLoop: while (c != quoteChar) { if (c == '\n' || c == EOF_CHAR) { in.unread(); reportSyntaxError("msg.unterminated.string.lit", null); return ERROR; } if (c == '\\') { // We've hit an escaped character c = in.read(); 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'); int escapeVal = 0; for (int i = 0; i != 4; ++i) { c = in.read(); 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 = in.read(); int escapeVal = xDigitToInt(c); if (escapeVal < 0) { addToString('x'); continue strLoop; } else { int c1 = c; c = in.read(); 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') { val = c - '0'; c = in.read(); if ('0' <= c && c < '8') { val = 8 * val + c - '0'; c = in.read(); 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 = in.read(); } } in.unread(); c = val; } } } addToString(c); c = in.read(); } this.string = getStringFromBuffer(); return STRING; } switch (c) { case '\n': return EOL; case ';': return SEMI; case '[': return LB; case ']': return RB; case '{': return LC; case '}': return RC; case '(': return LP; case ')': return RP; case ',': return COMMA; case '?': return HOOK; case ':': return COLON; case '.': return DOT; case '|': if (in.match('|')) { return OR; } else if (in.match('=')) { this.op = BITOR; return ASSIGN; } else { return BITOR; } case '^': if (in.match('=')) { this.op = BITXOR; return ASSIGN; } else { return BITXOR; } case '&': if (in.match('&')) { return AND; } else if (in.match('=')) { this.op = BITAND; return ASSIGN; } else { return BITAND; } case '=': if (in.match('=')) { if (in.match('=')) this.op = SHEQ; else this.op = EQ; return EQOP; } else { this.op = NOP; return ASSIGN; } case '!': if (in.match('=')) { if (in.match('=')) this.op = SHNE; else this.op = NE; return EQOP; } else { this.op = NOT; return UNARYOP; } case '<': /* NB:treat HTML begin-comment as comment-till-eol */ if (in.match('!')) { if (in.match('-')) { if (in.match('-')) { skipLine(); return getToken(); // in place of 'goto retry' } in.unread(); } in.unread(); } if (in.match('<')) { if (in.match('=')) { this.op = LSH; return ASSIGN; } else { this.op = LSH; return SHOP; } } else { if (in.match('=')) { this.op = LE; return RELOP; } else { this.op = LT; return RELOP; } } case '>': if (in.match('>')) { if (in.match('>')) { if (in.match('=')) { this.op = URSH; return ASSIGN; } else { this.op = URSH; return SHOP; } } else { if (in.match('=')) { this.op = RSH; return ASSIGN; } else { this.op = RSH; return SHOP; } } } else { if (in.match('=')) { this.op = GE; return RELOP; } else { this.op = GT; return RELOP; } } case '*': if (in.match('=')) { this.op = MUL; return ASSIGN; } else { return MUL; } case '/': // is it a // comment? if (in.match('/')) { skipLine(); return getToken(); } if (in.match('*')) { while ((c = in.read()) != -1 && !(c == '*' && in.match('/'))) { ; // empty loop body } if (c == EOF_CHAR) { reportSyntaxError("msg.unterminated.comment", null); return ERROR; } return getToken(); // `goto retry' } // is it a regexp? if ((flags & TSF_REGEXP) != 0) { stringBufferTop = 0; while ((c = in.read()) != '/') { if (c == '\n' || c == EOF_CHAR) { in.unread(); reportSyntaxError("msg.unterminated.re.lit", null); return ERROR; } if (c == '\\') { addToString(c); c = in.read(); } addToString(c); } int reEnd = stringBufferTop; while (true) { if (in.match('g')) addToString('g'); else if (in.match('i')) addToString('i'); else if (in.match('m')) addToString('m'); else break; } if (isAlpha(in.peek())) { 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 (in.match('=')) { this.op = DIV; return ASSIGN; } else { return DIV; } case '%': this.op = MOD; if (in.match('=')) { return ASSIGN; } else { return MOD; } case '~': this.op = BITNOT; return UNARYOP; case '+': if (in.match('=')) { this.op = ADD; return ASSIGN; } else if (in.match('+')) { return INC; } else { return ADD; } case '-': if (in.match('=')) { this.op = SUB; c = ASSIGN; } else if (in.match('-')) { if (0 == (flags & TSF_DIRTYLINE)) { // treat HTML end-comment after possible whitespace // after line start as comment-utill-eol if (in.match('>')) { skipLine(); return getToken(); } } c = DEC; } else { c = SUB; } flags |= TSF_DIRTYLINE; return c; default: reportSyntaxError("msg.illegal.character", null); return ERROR; } } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/8d78476dde863807579dcd20202decfcfcc9f7f1/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,
... |
jj_la1[95] = jj_gen; | jj_la1[97] = jj_gen; | final public void StatementExpression() throws ParseException { /*@bgen(jjtree) StatementExpression */ ASTStatementExpression jjtn000 = new ASTStatementExpression(this, JJTSTATEMENTEXPRESSION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: PreIncrementExpression(); break; case DECR: PreDecrementExpression(); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: PrimaryExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSIGN: case INCR: case DECR: case PLUSASSIGN: case MINUSASSIGN: case STARASSIGN: case SLASHASSIGN: case ANDASSIGN: case ORASSIGN: case XORASSIGN: case REMASSIGN: case LSHIFTASSIGN: case RSIGNEDSHIFTASSIGN: case RUNSIGNEDSHIFTASSIGN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: jj_consume_token(INCR); break; case DECR: jj_consume_token(DECR); break; case ASSIGN: case PLUSASSIGN: case MINUSASSIGN: case STARASSIGN: case SLASHASSIGN: case ANDASSIGN: case ORASSIGN: case XORASSIGN: case REMASSIGN: case LSHIFTASSIGN: case RSIGNEDSHIFTASSIGN: case RUNSIGNEDSHIFTASSIGN: AssignmentOperator(); Expression(); break; default: jj_la1[95] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[96] = jj_gen; ; } break; default: jj_la1[97] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (RuntimeException)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/6b2ea5d38e0b6b4adb468f80aa5e82b2d9884c6d/JavaParser.java/clean/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
918,
8056,
2300,
1435,
1216,
10616,
288,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
8056,
2300,
1195,
225,
9183,
3406,
2300,
10684,
5088,
3784,
273,
394,
9183,
3406,
2300,
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,
282,
727,
1071,
918,
8056,
2300,
1435,
1216,
10616,
288,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
8056,
2300,
1195,
225,
9183,
3406,
2300,
10684,
5088,
3784,
273,
394,
9183,
3406,
2300,
12,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.