rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
sellingList = new JComboBox( sellables ); | sellingList = new JComboBox( inventory ); | public StoreManageTableModel( LockableListModel model ) { super( new String [] { "Item Name", "Price", model == StoreManager.getSoldItemList() ? "Lowest" : " ", "Qty", "Lim", " ", " " }, new Class [] { AdventureResult.class, Integer.class, Integer.class, Integer.class, Boolean.class, JButton.class, JButton.class }, new boolean [] { model != StoreManager.getSoldItemList(), true, false, model != StoreManager.getSoldItemList(), true, false, false }, model ); if ( model != StoreManager.getSoldItemList() ) { sellingList = new JComboBox( sellables ); Vector value = new Vector(); value.add( new AdventureResult( "- select an item -", 1, false ) ); value.add( new Integer(0) ); value.add( new Integer(0) ); value.add( new Integer(0) ); value.add( new Boolean( false ) ); model.add( value ); } } | 50364 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50364/9070eed55ede6346617dc6514eff6c36d1586c7c/StoreManageFrame.java/buggy/src/net/sourceforge/kolmafia/StoreManageFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
4994,
21258,
1388,
1488,
12,
3488,
429,
682,
1488,
938,
262,
202,
202,
95,
1082,
202,
9565,
12,
394,
514,
5378,
288,
315,
1180,
1770,
3113,
315,
5147,
3113,
938,
422,
4994,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
4994,
21258,
1388,
1488,
12,
3488,
429,
682,
1488,
938,
262,
202,
202,
95,
1082,
202,
9565,
12,
394,
514,
5378,
288,
315,
1180,
1770,
3113,
315,
5147,
3113,
938,
422,
4994,
1... |
static void pushRegExpArray(ClassFileWriter cfw, ScriptOrFnNode n, int contextArg, int scopeArg) { // precompile all regexp literals int regexpCount = n.getRegexpCount(); if (regexpCount == 0) badTree(); cfw.addPush(regexpCount); cfw.add(ByteCode.ANEWARRAY, "java/lang/Object"); cfw.addALoad(contextArg); cfw.addInvoke(ByteCode.INVOKESTATIC, "org/mozilla/javascript/ScriptRuntime", "checkRegExpProxy", "(Lorg/mozilla/javascript/Context;" +")Lorg/mozilla/javascript/RegExpProxy;"); for (int i = 0; i != regexpCount; ++i) { cfw.add(ByteCode.DUP2); // Stack structure: proxy, array, proxy, array cfw.addALoad(contextArg); cfw.addALoad(scopeArg); cfw.addPush(n.getRegexpString(i)); String regexpFlags = n.getRegexpFlags(i); if (regexpFlags == null) { cfw.add(ByteCode.ACONST_NULL); } else { cfw.addPush(regexpFlags); } cfw.addInvoke(ByteCode.INVOKEINTERFACE, "org/mozilla/javascript/RegExpProxy", "newRegExp", "(Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +"Ljava/lang/String;Ljava/lang/String;" +")Ljava/lang/Object;"); // Stack structure: result of newRegExp, array, proxy, array cfw.addPush(i); cfw.add(ByteCode.SWAP); cfw.add(ByteCode.AASTORE); // Stack structure: proxy, array } // remove proxy cfw.add(ByteCode.POP); } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/f0adcfbccd267d98f6196c9da9266683cca49fd2/Codegen.java/clean/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
760,
918,
1817,
13673,
1076,
12,
797,
812,
2289,
6080,
91,
16,
3651,
1162,
5372,
907,
290,
16,
474,
819,
4117,
16,
474,
2146,
4117,
15329,
759,
675,
11100,
777,
7195,
18228,
474,
7195,
1380,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
760,
918,
1817,
13673,
1076,
12,
797,
812,
2289,
6080,
91,
16,
3651,
1162,
5372,
907,
290,
16,
474,
819,
4117,
16,
474,
2146,
4117,
15329,
759,
675,
11100,
777,
7195,
18228,
474,
7195,
1380,
... | ||
public Search getSearch(String id) throws NeedsRefreshException { return (Search) cache.getFromCache(id); | public Search getSearch(String id, ServiceLocator locator) throws NeedsRefreshException { Search search=null; ByteBufferWrapper w=(ByteBufferWrapper)cache.getFromCache(id); if(w!=null){ try { long time=System.currentTimeMillis(); ByteArrayInputStream is=new ByteArrayInputStream(w.getContents()); GZIPInputStream gs = new GZIPInputStream(is); DataInputStream dis = new DataInputStream(gs); search = new Search(locator); search.readFields(dis); long delta=System.currentTimeMillis()-time; if(LOG.isDebugEnabled()){ LOG.debug("Decompressing cache entry took: " + delta + "ms."); } search.init(); } catch (IOException e) { LOG.info("Could not get cached object: " + e); } } return search; | public Search getSearch(String id) throws NeedsRefreshException { return (Search) cache.getFromCache(id); } | 1316 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1316/53d32f722db195b06d82a6398c48bbc15bcff2d5/CacheManager.java/buggy/contrib/web2/plugins/web-caching-oscache/src/java/org/apache/nutch/webapp/CacheManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5167,
15627,
12,
780,
612,
13,
1216,
29164,
8323,
503,
225,
288,
565,
327,
261,
2979,
13,
1247,
18,
588,
19800,
12,
350,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5167,
15627,
12,
780,
612,
13,
1216,
29164,
8323,
503,
225,
288,
565,
327,
261,
2979,
13,
1247,
18,
588,
19800,
12,
350,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
NormalizedFile oldFile = new NormalizedFile(oldNameString.getValue()); | NormalizedFile oldFile = new NormalizedFile(oldNameString.toString()); | public IRubyObject rename(IRubyObject oldName, IRubyObject newName) { RubyString oldNameString = RubyString.stringValue(oldName); RubyString newNameString = RubyString.stringValue(newName); oldNameString.checkSafeString(); newNameString.checkSafeString(); NormalizedFile oldFile = new NormalizedFile(oldNameString.getValue()); if (!oldFile.exists()) { throw getRuntime().newErrnoENOENTError("No such file: " + oldNameString.getValue()); } oldFile.renameTo(new NormalizedFile(newNameString.getValue())); return RubyFixnum.zero(getRuntime()); } | 49476 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49476/9f2efc63a858fa0507245b207025eab027840a04/FileMetaClass.java/clean/src/org/jruby/runtime/builtin/meta/FileMetaClass.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
6472,
12,
7937,
10340,
921,
22916,
16,
15908,
10340,
921,
13253,
13,
288,
377,
202,
54,
10340,
780,
22916,
780,
273,
19817,
780,
18,
1080,
620,
12,
1673,
461,
176... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
6472,
12,
7937,
10340,
921,
22916,
16,
15908,
10340,
921,
13253,
13,
288,
377,
202,
54,
10340,
780,
22916,
780,
273,
19817,
780,
18,
1080,
620,
12,
1673,
461,
176... |
reporter.warn( "Ignoring gump repository id: \'" + v3Model.getGumpRepositoryId() + "\'. This is not supported in v4 POMs." ); | reporter.warn( "Ignoring gump repository id: \'" + v3Model.getGumpRepositoryId() + "\'. This is not supported in v4 POMs." ); | private void warnOfUnsupportedMainModelElements( org.apache.maven.model.v3_0_0.Model v3Model, Reporter reporter ) throws ReportWriteException { if ( StringUtils.isNotEmpty( v3Model.getExtend() ) ) { reporter.warn( "Ignoring non-portable parent declaration: " + v3Model.getExtend() ); } if ( StringUtils.isNotEmpty( v3Model.getGumpRepositoryId() ) ) { reporter.warn( "Ignoring gump repository id: \'" + v3Model.getGumpRepositoryId() + "\'. This is not supported in v4 POMs." ); } if ( notEmpty( v3Model.getVersions() ) ) { reporter.warn( "Ignoring <versions/> section. This is not supported in v4 POMs." ); } if ( notEmpty( v3Model.getBranches() ) ) { reporter.warn( "Ignoring <branches/> section. This is not supported in v4 POMs." ); } Properties v3ModelProperties = v3Model.getProperties(); if ( v3ModelProperties != null && !v3ModelProperties.isEmpty() ) { reporter.warn( "Ignoring <properties/> section. It is not supported in v4 POMs." ); } if ( StringUtils.isNotEmpty( v3Model.getPackage() ) ) { reporter.warn( "Ignoring <package/>. It is not supported in v4 POMs." ); } if ( notEmpty( v3Model.getPackageGroups() ) ) { reporter.warn( "Ignoring <packageGroups/> section. It is not supported in v4 POMs." ); } if ( StringUtils.isNotEmpty( v3Model.getLogo() ) ) { reporter.warn( "Ignoring <logo/> for project. It is not supported in v4 POMs." ); } if ( StringUtils.isNotEmpty( v3Model.getShortDescription() ) ) { reporter.warn( "Ignoring <shortDescription/>. It is not supported in v4 POMs." ); } } | 50542 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50542/6e51d420ed174d20446e7387dab144f9c1a9eed0/PomV3ToV4Translator.java/clean/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/translate/PomV3ToV4Translator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1894,
951,
8544,
6376,
1488,
3471,
12,
2358,
18,
19211,
18,
81,
7638,
18,
2284,
18,
90,
23,
67,
20,
67,
20,
18,
1488,
331,
23,
1488,
16,
25585,
11528,
262,
3639,
1216,
8706... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1894,
951,
8544,
6376,
1488,
3471,
12,
2358,
18,
19211,
18,
81,
7638,
18,
2284,
18,
90,
23,
67,
20,
67,
20,
18,
1488,
331,
23,
1488,
16,
25585,
11528,
262,
3639,
1216,
8706... |
TreeMap listeners = getListeners(listener.getClass()); | TreeMap listeners = null; try { listeners = getListeners(listener.getClass()); } catch (NotificationException e) { logger.warn(e.getMessage(), e); return; } | public void unregisterListener(UMOServerNotificationListener listener) { TreeMap listeners = getListeners(listener.getClass()); synchronized (listeners) { listeners.remove(listener); } } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/bc5e72512e472e5267081176f8ca34b64d2ee0cb/ServerNotificationManager.java/buggy/mule/src/java/org/mule/impl/internal/notifications/ServerNotificationManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
10232,
2223,
12,
2799,
51,
2081,
4386,
2223,
2991,
13,
565,
288,
3639,
16381,
4679,
273,
446,
31,
775,
288,
4679,
273,
336,
5583,
12,
12757,
18,
588,
797,
10663,
289,
1044,
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,
1071,
918,
10232,
2223,
12,
2799,
51,
2081,
4386,
2223,
2991,
13,
565,
288,
3639,
16381,
4679,
273,
446,
31,
775,
288,
4679,
273,
336,
5583,
12,
12757,
18,
588,
797,
10663,
289,
1044,
2... |
if (dataModel instanceof DefaultComboBoxModel) ((DefaultComboBoxModel) dataModel).removeAllElements(); | if (dataModel instanceof DefaultComboBoxModel) { ((DefaultComboBoxModel) dataModel).removeAllElements(); } else if(dataModel instanceof MutableComboBoxModel){ MutableComboBoxModel mcbm = (MutableComboBoxModel) dataModel; /* We intentionally remove the items backwards to support * models which shift their content to the beginning (e.g. * linked lists) */ for(int i=mcbm.getSize()-1; i >= 0; i--) { mcbm.removeElementAt(i); } } else { throw new RuntimeException("Unable to remove the items because the data model it is not an instance of MutableComboBoxModel."); } | public void removeAllItems() { if (dataModel instanceof DefaultComboBoxModel) ((DefaultComboBoxModel) dataModel).removeAllElements(); } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/afd5c0ff01c2742fd202b8024455897d82c40368/JComboBox.java/clean/javax/swing/JComboBox.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
12787,
3126,
1435,
225,
288,
565,
309,
261,
892,
1488,
1276,
2989,
22199,
1488,
13,
1377,
14015,
1868,
22199,
1488,
13,
27600,
2934,
4479,
1595,
3471,
5621,
225,
289,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
12787,
3126,
1435,
225,
288,
565,
309,
261,
892,
1488,
1276,
2989,
22199,
1488,
13,
1377,
14015,
1868,
22199,
1488,
13,
27600,
2934,
4479,
1595,
3471,
5621,
225,
289,
2,
-100,
... |
Pack pack = new Pack(name, description, osConstraints, required, preselected); | Pack pack = new Pack(name, description, osConstraints, required, preselected); | public ZipOutputStream addPack(int packNumber, String name, List osConstraints, boolean required, String description, boolean preselected) throws Exception { sendMsg("Adding pack #" + packNumber + " : " + name + " ..."); // Adds it in the packs array Pack pack = new Pack(name, description, osConstraints, required, preselected); packs.add(packNumber, pack); // Returns the suiting output stream String entryName = "packs/pack" + packNumber; ZipEntry entry = new ZipEntry(entryName); outJar.putNextEntry(entry); return outJar; } | 46579 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46579/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/StdPackager.java/buggy/src/lib/com/izforge/izpack/compiler/StdPackager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
8603,
4632,
527,
4420,
12,
474,
2298,
1854,
16,
514,
508,
16,
987,
1140,
4878,
16,
1250,
1931,
16,
4766,
514,
2477,
16,
1250,
4075,
292,
828,
13,
1216,
1185,
225,
288,
565,
1366,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8603,
4632,
527,
4420,
12,
474,
2298,
1854,
16,
514,
508,
16,
987,
1140,
4878,
16,
1250,
1931,
16,
4766,
514,
2477,
16,
1250,
4075,
292,
828,
13,
1216,
1185,
225,
288,
565,
1366,
... |
private static TVDataServiceInterface loadDataLoader(String name) { TVDataServiceInterface result=null; String fName=name+".jar"; File f=new File("tvdataloader",fName); try { URL[] urls={ f.toURL() }; ClassLoader dataloaderClassLoader=new java.net.URLClassLoader(urls,ClassLoader.getSystemClassLoader()); Class c=dataloaderClassLoader.loadClass(name.toLowerCase()+"."+name); result=(tvdataloader.TVDataServiceInterface)c.newInstance(); } catch (Exception exc) { exc.printStackTrace(); } return result; } | private TVDataServiceInterface loadDataLoader(String name) { TVDataServiceInterface result=null; String fName=name+".jar"; File f=new File("tvdataloader",fName); try { URL[] urls={ f.toURL() }; ClassLoader dataloaderClassLoader=new java.net.URLClassLoader(urls,ClassLoader.getSystemClassLoader()); Class c=dataloaderClassLoader.loadClass(name.toLowerCase()+"."+name); result=(tvdataloader.TVDataServiceInterface)c.newInstance(); } catch (Exception exc) { exc.printStackTrace(); } return result; } | private static TVDataServiceInterface loadDataLoader(String name) { TVDataServiceInterface result=null; String fName=name+".jar"; File f=new File("tvdataloader",fName); try { URL[] urls={ f.toURL() }; ClassLoader dataloaderClassLoader=new java.net.URLClassLoader(urls,ClassLoader.getSystemClassLoader()); Class c=dataloaderClassLoader.loadClass(name.toLowerCase()+"."+name); result=(tvdataloader.TVDataServiceInterface)c.newInstance(); } catch (Exception exc) { //String msg = mLocalizer.msg("error.5", "Loading tv data service failed!\n({0})", //f.getAbsolutePath(), exc); //ErrorHandler.handle(msg, exc); exc.printStackTrace(); } return result; } | 9266 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9266/da48e5d235c56c6219b3e4f529d27be81001e4a8/DataLoaderManager.java/buggy/tvbrowser/src/tvbrowser/core/DataLoaderManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
225,
3238,
760,
399,
58,
751,
18348,
29422,
2886,
12,
780,
508,
13,
288,
202,
26924,
282,
202,
15579,
751,
18348,
563,
33,
2011,
31,
202,
282,
202,
780,
284,
461,
33,
529,
9078,
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,
3196,
225,
3238,
760,
399,
58,
751,
18348,
29422,
2886,
12,
780,
508,
13,
288,
202,
26924,
282,
202,
15579,
751,
18348,
563,
33,
2011,
31,
202,
282,
202,
780,
284,
461,
33,
529,
9078,
18,
... |
java.util.List times = org.quartz.helpers.TriggerUtils.computeFireTimes(ct, null, 25); | java.util.List times = TriggerUtils.computeFireTimes(ct, null, 25); | public static void main(String[] args) // TODO: remove method after good // unit testing throws Exception { String expr = "0 0 9 * * ?"; if(args != null && args.length > 0 && args[0] != null) expr = args[0]; CronTrigger ct = new CronTrigger("t", "g", "j", "g", new Date(), null, expr);// ct.setTimeZone(TimeZone.getTimeZone("Africa/Harare")); System.err.println(ct.getExpressionSummary()); System.err.println("tz=" + ct.getTimeZone().getID()); System.err.println(); java.util.List times = org.quartz.helpers.TriggerUtils.computeFireTimes(ct, null, 25); for (int i = 0; i < times.size(); i++) { System.err.println("firetime = " + times.get(i)); } Calendar tt = Calendar.getInstance(); tt.set(Calendar.DATE, 17); tt.set(Calendar.MONTH, 5 - 1); tt.set(Calendar.HOUR, 11); tt.set(Calendar.MINUTE, 0); tt.set(Calendar.SECOND, 7); System.err.println("\nWill fire on: " + tt.getTime() + " -- " + ct.willFireOn(tt, false)); // CRON Expression: 0 0 9 * * ?//// TimeZone.getDefault().getDisplayName() = Central African Time// TimeZone.getDefault().getID() = Africa/Harare ////// System.err.println();//// System.err.println();//// System.err.println();//// System.err.println("Daylight test:");//////// CronTrigger trigger = new CronTrigger();//////// TimeZone timeZone = TimeZone.getTimeZone("America/Los_Angeles");//// // TimeZone timeZone = TimeZone.getDefault();//////// trigger.setTimeZone(timeZone);//// trigger.setCronExpression("0 0 1 ? 4 *");//////// Date start = new Date(1056319200000L);//// Date end = new Date(1087682399000L);//////// trigger.setStartTime(start);//// trigger.setEndTime(end);//////// Date next = new Date(1056232800000L);//// while (next != null) {//// next = trigger.getFireTimeAfter(next);//// if (next != null) {//// Calendar cal = Calendar.getInstance();//// cal.setTimeZone(timeZone);//// cal.setTime(next);//// System.err.println(cal.get(Calendar.MONTH) + "/"//// + cal.get(Calendar.DATE) + "/" + cal.get(Calendar.YEAR)//// + " - " + cal.get(Calendar.HOUR_OF_DAY) + ":"//// + cal.get(Calendar.MINUTE));//// }//// }//////// System.err.println();//// System.err.println();//// System.err.println();//// System.err.println("Midnight test:");//////// trigger = new CronTrigger();//////// timeZone = TimeZone.getTimeZone("Asia/Jerusalem");//// // timeZone = TimeZone.getTimeZone("America/Los_Angeles");//// // TimeZone timeZone = TimeZone.getDefault();//////// trigger.setTimeZone(timeZone);//// trigger.setCronExpression("0 /15 * ? 4 *");//////// start = new Date(1056319200000L);//// end = new Date(1087682399000L);//////// trigger.setStartTime(start);//// trigger.setEndTime(end);//////// next = new Date(1056232800000L);//// while (next != null) {//// next = trigger.getFireTimeAfter(next);//// if (next != null) {//// Calendar cal = Calendar.getInstance();//// cal.setTimeZone(timeZone);//// cal.setTime(next);//// System.err.println(cal.get(Calendar.MONTH) + "/"//// + cal.get(Calendar.DATE) + "/" + cal.get(Calendar.YEAR)//// + " - " + cal.get(Calendar.HOUR_OF_DAY) + ":"//// + cal.get(Calendar.MINUTE));//// }//// } } | 3431 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3431/c939920919442b5bb042307d4a45cb601abad757/CronTrigger.java/clean/src/java/org/quartz/CronTrigger.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
368,
2660,
30,
1206,
707,
1839,
7494,
5411,
368,
2836,
7769,
5411,
1216,
1185,
288,
5411,
514,
3065,
273,
315,
20,
374,
2468,
380,
380,
692... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
368,
2660,
30,
1206,
707,
1839,
7494,
5411,
368,
2836,
7769,
5411,
1216,
1185,
288,
5411,
514,
3065,
273,
315,
20,
374,
2468,
380,
380,
692... |
runTests(new TestDescriptor[]{ new TestDescriptor(TEST1, "Five stmts in one switch case, should be flagged", 1, rule), new TestDescriptor(TEST2, "One stmt in one switch case, ok", 0, rule), new TestDescriptor(TEST3, "Five stmts, 5 cases, OK", 0, rule), }); } | runTests(rule); } | public void testAll() { runTests(new TestDescriptor[]{ new TestDescriptor(TEST1, "Five stmts in one switch case, should be flagged", 1, rule), new TestDescriptor(TEST2, "One stmt in one switch case, ok", 0, rule), new TestDescriptor(TEST3, "Five stmts, 5 cases, OK", 0, rule), }); } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/4e45de9075eeb015245ff09f8f8c58cf0f98bbf3/SwitchDensityTest.java/clean/pmd/regress/test/net/sourceforge/pmd/rules/design/SwitchDensityTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1595,
1435,
288,
3639,
1086,
14650,
12,
2704,
7766,
3187,
63,
7073,
5411,
394,
7766,
3187,
12,
16961,
21,
16,
315,
42,
688,
15452,
316,
1245,
1620,
648,
16,
1410,
506,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1595,
1435,
288,
3639,
1086,
14650,
12,
2704,
7766,
3187,
63,
7073,
5411,
394,
7766,
3187,
12,
16961,
21,
16,
315,
42,
688,
15452,
316,
1245,
1620,
648,
16,
1410,
506,
... |
Symbol[] literal_identifiers, | String[] literal_identifiers, | public static Pattern translate_pattern (Object pattern, Symbol[] literal_identifiers, java.util.Vector pattern_names, StringBuffer pattern_nesting, int nesting, Translator tr ) { if (pattern instanceof Pair) { Pair pair = (Pair) pattern; if (pair.cdr instanceof Pair) { Pair cdr_pair = (Pair) pair.cdr; if (cdr_pair.car == SyntaxRule.dots3) { if (cdr_pair.cdr != List.Empty) tr.syntaxError ("junk follows ... in syntax-rule pattern"); Pattern car_pat = translate_pattern (pair.car, literal_identifiers, pattern_names, pattern_nesting, nesting + 1, tr); return new ListRepeatPat (car_pat); } } Pattern car_pat = translate_pattern (pair.car, literal_identifiers, pattern_names, pattern_nesting, nesting, tr); return new PairPat (car_pat, translate_pattern (pair.cdr, literal_identifiers, pattern_names, pattern_nesting, nesting, tr)); } else if (pattern instanceof Symbol) { for (int i = literal_identifiers.length; --i >= 0; ) { // NOTE - should also generate check that the binding of the // pattern at macro definition time matches that at macro // application type. However, we currently only support // define-syntax (and not let[rec]-syntax) so it is not necessary. if (literal_identifiers[i] == pattern) return new EqualPat (pattern); } if (pattern_names.contains (pattern)) tr.syntaxError ("duplicated pattern variable " + pattern); pattern_names.addElement (pattern); pattern_nesting.append ((char) nesting); return new AnyPat (); } else return new EqualPat (pattern); } | 36952 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/36952/9933571afc04a317d6c4f5d01a969d3b5695a14e/SyntaxRules.java/clean/kawa/lang/SyntaxRules.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
6830,
4204,
67,
4951,
261,
921,
1936,
16,
25083,
282,
8565,
8526,
7158,
67,
20218,
16,
25083,
282,
2252,
18,
1367,
18,
5018,
1936,
67,
1973,
16,
25083,
282,
6674,
1936,
67,
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,
282,
1071,
760,
6830,
4204,
67,
4951,
261,
921,
1936,
16,
25083,
282,
8565,
8526,
7158,
67,
20218,
16,
25083,
282,
2252,
18,
1367,
18,
5018,
1936,
67,
1973,
16,
25083,
282,
6674,
1936,
67,
8... |
new DirectoryDialog(importPBWOProjectPathField.getShell()); | new DirectoryDialog(importPBProjectPathField.getShell()); | private void handleImportBrowseButtonPressed() { DirectoryDialog dialog = new DirectoryDialog(importPBWOProjectPathField.getShell()); dialog.setMessage(Messages.getString("WOProjectCreationPage.creationOptions.directoryDialogLabel")); //$NON-NLS-1$ String dirName = getImportPBWOProjectPathFieldValue(); if (!dirName.equals("")) { //$NON-NLS-1$ File path = new File(dirName); if (path.exists()) dialog.setFilterPath(new Path(dirName).toOSString()); } String selectedDirectory = dialog.open(); if (selectedDirectory != null) { importPBWOProjectPathFieldValue = selectedDirectory; importPBWOProjectPathField.setText(importPBWOProjectPathFieldValue); } } | 46678 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46678/dfd92ce82129a5cfd776d51dadbf123d5138fd65/WOProjectCreationPage.java/clean/src/wolips/java/org/objectstyle/wolips/wizards/WOProjectCreationPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1640,
5010,
27304,
3616,
24624,
1435,
288,
202,
202,
2853,
6353,
6176,
273,
1082,
202,
2704,
8930,
6353,
12,
5666,
20724,
59,
51,
4109,
743,
974,
18,
588,
13220,
10663,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1640,
5010,
27304,
3616,
24624,
1435,
288,
202,
202,
2853,
6353,
6176,
273,
1082,
202,
2704,
8930,
6353,
12,
5666,
20724,
59,
51,
4109,
743,
974,
18,
588,
13220,
10663,
20... |
askForMethodMenuItem.setMnemonic(KeyEvent.VK_F); | askForMethodMenuItem.setMnemonic(KeyEvent.VK_M); | private JMenu makeOptionsMenu() { JMenu menu = new JMenu(messageBundle.getString("menu.options")); menu.setMnemonic(KeyEvent.VK_I); JMenuItem menuItem; //Save Automatically on compilation. if (jeliotUserProperties.containsKey("save_automatically")) { editor.setSaveAutomatically(Boolean.valueOf( jeliotUserProperties.getStringProperty("save_automatically")) .booleanValue()); } else { jeliotUserProperties.setStringProperty("save_automatically", Boolean .toString(editor.isSaveAutomatically())); } final JCheckBoxMenuItem saveAutomaticallyOnCompilationMenuItem = new JCheckBoxMenuItem( messageBundle.getString("menu.options.save_automatically"), editor.isSaveAutomatically()); saveAutomaticallyOnCompilationMenuItem .addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { boolean saveAutomatically = saveAutomaticallyOnCompilationMenuItem .getState(); editor.setSaveAutomatically(saveAutomatically); jeliotUserProperties.setBooleanProperty("save_automatically", saveAutomatically); } }); menu.add(saveAutomaticallyOnCompilationMenuItem); //Ask for method if (jeliotUserProperties.containsKey("ask_for_method")) { askForMethod = jeliotUserProperties.getBooleanProperty("ask_for_method"); } else { jeliotUserProperties.setBooleanProperty("ask_for_method", askForMethod); } final JCheckBoxMenuItem askForMethodMenuItem = new JCheckBoxMenuItem( messageBundle.getString("menu.options.ask_for_method"), askForMethod); askForMethodMenuItem.setMnemonic(KeyEvent.VK_F); askForMethodMenuItem.setAccelerator(KeyStroke.getKeyStroke( KeyEvent.VK_F, ActionEvent.CTRL_MASK)); askForMethodMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { askForMethod = askForMethodMenuItem.getState(); jeliotUserProperties.setStringProperty("ask_for_method", Boolean .toString(askForMethod)); } }); menu.add(askForMethodMenuItem); //Pause on message if (jeliotUserProperties.containsKey("pause_on_message")) { showMessagesInDialogs = jeliotUserProperties .getBooleanProperty("pause_on_message"); } else { jeliotUserProperties.setBooleanProperty("pause_on_message", showMessagesInDialogs); } final JCheckBoxMenuItem pauseOnMessageMenuItem = new JCheckBoxMenuItem( messageBundle.getString("menu.options.pause_on_message"), showMessagesInDialogs); pauseOnMessageMenuItem.setMnemonic(KeyEvent.VK_D); pauseOnMessageMenuItem.setAccelerator(KeyStroke.getKeyStroke( KeyEvent.VK_D, ActionEvent.CTRL_MASK)); pauseOnMessageMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showMessagesInDialogs = pauseOnMessageMenuItem.getState(); jeliotUserProperties.setBooleanProperty("pause_on_message", showMessagesInDialogs); } }); menu.add(pauseOnMessageMenuItem); //Show history view final Jeliot j = jeliot; final JTabbedPane jtp = this.tabbedPane; final int index = jtp.indexOfTab(messageBundle .getString("tab.title.history")); if (jeliotUserProperties.containsKey("show_history_view")) { j.getHistoryView().setEnabled( jeliotUserProperties.getBooleanProperty("show_history_view")); } else { jeliotUserProperties.setBooleanProperty("show_history_view", j .getHistoryView().isEnabled()); } final JCheckBoxMenuItem enableHistoryViewMenuItem = new JCheckBoxMenuItem( messageBundle.getString("menu.options.show_history_view"), jeliot.getHistoryView().isEnabled()); enableHistoryViewMenuItem.setMnemonic(KeyEvent.VK_D); enableHistoryViewMenuItem.setAccelerator(KeyStroke.getKeyStroke( KeyEvent.VK_H, ActionEvent.CTRL_MASK)); enableHistoryViewMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { boolean state = enableHistoryViewMenuItem.getState(); j.getHistoryView().setEnabled(state); if (codeNest.getLeftComponent() instanceof CodePane2) { jtp.setEnabledAt(index, state); } jeliotUserProperties.setBooleanProperty("show_history_view", j .getHistoryView().isEnabled()); } }); menu.add(enableHistoryViewMenuItem); menu.addSeparator(); //Select font for editor and code pane. menuItem = new JMenuItem(messageBundle .getString("menu.options.font_select")); menuItem.setMnemonic(KeyEvent.VK_L); menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, ActionEvent.CTRL_MASK)); menuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Font f = null; try { f = JFontChooser.showDialog(frame, editor.getTextArea() .getPainter().getFont()); } catch (Exception e1) { DebugUtil.handleThrowable(e1); /* if (DebugUtil.DEBUGGING) { jeliot.output(e1.toString()); StackTraceElement[] s = e1.getStackTrace(); for (int i = 0; i < s.length; i++) { jeliot.output(s[i].toString() + "\n"); } } */ } if (f != null) { editor.getTextArea().getPainter().setFont(f); getCodePane().getTextArea().getPainter().setFont(f); propertiesBundle.setFontProperty("font.code_pane", f); propertiesBundle.setFontProperty("font.code_editor", f); } } }); menu.add(menuItem); return menu; } | 49293 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49293/4f8e3bd480c250109c4e88a15fb468e8d6463729/JeliotWindow.java/buggy/src/jeliot/gui/JeliotWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
804,
4599,
1221,
1320,
4599,
1435,
288,
3639,
804,
4599,
3824,
273,
394,
804,
4599,
12,
2150,
3405,
18,
588,
780,
2932,
5414,
18,
2116,
7923,
1769,
3639,
3824,
18,
542,
29668,
20918... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
804,
4599,
1221,
1320,
4599,
1435,
288,
3639,
804,
4599,
3824,
273,
394,
804,
4599,
12,
2150,
3405,
18,
588,
780,
2932,
5414,
18,
2116,
7923,
1769,
3639,
3824,
18,
542,
29668,
20918... |
AISchedulePK pk = new AISchedulePK(ids[i]); aiScheduleLocal = asdao.findByPrimaryKey(pk); | aiScheduleLocal = asdao.findById(ids[i]); | public void deleteAIJob(AuthzSubjectValue subject, Integer ids[]) throws NamingException, AutoinventoryException { AIScheduleDAO asdao = DAOFactory.getDAOFactory().getAIScheduleDAO(); AISchedule aiScheduleLocal; for (int i = 0; i < ids.length; i++) { try { AISchedulePK pk = new AISchedulePK(ids[i]); aiScheduleLocal = asdao.findByPrimaryKey(pk); this.scheduler.deleteJob(aiScheduleLocal.getJobName(), GROUP); asdao.remove(aiScheduleLocal); } catch (Exception e) { throw new AutoinventoryException("Unable to remove job: " + e.getMessage()); } } } | 52591 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52591/5b5340cb0d18f5736d423826ddf9afcd22ec015f/AIScheduleManagerEJBImpl.java/clean/src/org/hyperic/hq/autoinventory/server/session/AIScheduleManagerEJBImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1430,
18194,
2278,
12,
1730,
94,
6638,
620,
3221,
16,
18701,
2144,
3258,
63,
5717,
3639,
1216,
26890,
16,
11809,
885,
7792,
503,
565,
288,
3639,
432,
5127,
2847,
18485,
487,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1430,
18194,
2278,
12,
1730,
94,
6638,
620,
3221,
16,
18701,
2144,
3258,
63,
5717,
3639,
1216,
26890,
16,
11809,
885,
7792,
503,
565,
288,
3639,
432,
5127,
2847,
18485,
487,
24... |
Assert.assertEquals(0, LISTENER.preEvent.getPostSize()); Assert.assertEquals(0, LISTENER.preEvent.getSizeChange()); Assert.assertEquals(false, LISTENER.preEvent.isSizeChanged()); | public static void doTestAddAll(ObservedFactory factory) { ObservedCollection coll = factory.createObservedCollection(LISTENER); LISTENER.preEvent = null; LISTENER.postEvent = null; Assert.assertEquals(0, coll.size()); coll.addAll(SIX_SEVEN_LIST); Assert.assertEquals(2, coll.size()); // pre Assert.assertSame(coll, LISTENER.preEvent.getSourceCollection()); Assert.assertSame(coll.getHandler(), LISTENER.preEvent.getHandler()); Assert.assertEquals(ModificationEventType.ADD_ALL, LISTENER.preEvent.getType()); Assert.assertEquals(-1, LISTENER.preEvent.getChangeIndex()); Assert.assertSame(SIX_SEVEN_LIST, LISTENER.preEvent.getChangeObject()); Assert.assertSame(SIX_SEVEN_LIST, LISTENER.preEvent.getChangeCollection()); Assert.assertEquals(1, LISTENER.preEvent.getChangeRepeat()); Assert.assertSame(null, LISTENER.preEvent.getResult()); Assert.assertEquals(0, LISTENER.preEvent.getPreSize()); Assert.assertEquals(0, LISTENER.preEvent.getPostSize()); Assert.assertEquals(0, LISTENER.preEvent.getSizeChange()); Assert.assertEquals(false, LISTENER.preEvent.isSizeChanged()); // post Assert.assertSame(coll, LISTENER.postEvent.getSourceCollection()); Assert.assertSame(coll.getHandler(), LISTENER.postEvent.getHandler()); Assert.assertEquals(ModificationEventType.ADD_ALL, LISTENER.postEvent.getType()); Assert.assertEquals(-1, LISTENER.postEvent.getChangeIndex()); Assert.assertSame(SIX_SEVEN_LIST, LISTENER.postEvent.getChangeObject()); Assert.assertSame(SIX_SEVEN_LIST, LISTENER.preEvent.getChangeCollection()); Assert.assertEquals(1, LISTENER.postEvent.getChangeRepeat()); Assert.assertSame(Boolean.TRUE, LISTENER.postEvent.getResult()); Assert.assertEquals(0, LISTENER.postEvent.getPreSize()); Assert.assertEquals(2, LISTENER.postEvent.getPostSize()); Assert.assertEquals(2, LISTENER.postEvent.getSizeChange()); Assert.assertEquals(true, LISTENER.postEvent.isSizeChanged()); } | 55609 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55609/9547b0caa64373a6494995cfc7eff5e2ffe613ec/ObservedTestHelper.java/clean/src/test/org/apache/commons/collections/observed/ObservedTestHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
741,
4709,
986,
1595,
12,
9013,
2155,
1733,
3272,
13,
288,
3639,
13992,
2155,
2532,
4508,
273,
3272,
18,
2640,
9013,
2155,
2532,
12,
26421,
1769,
7734,
15130,
8196,
18,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
4709,
986,
1595,
12,
9013,
2155,
1733,
3272,
13,
288,
3639,
13992,
2155,
2532,
4508,
273,
3272,
18,
2640,
9013,
2155,
2532,
12,
26421,
1769,
7734,
15130,
8196,
18,
14... | |
super.addImpl(comp, constraints, index); | if (comp == rootPane) super.addImpl(comp, constraints, index); else { if (isRootPaneCheckingEnabled()) throw new Error("Do not use add() on JWindow directly. Use " + "getContentPane().add() instead"); getContentPane().add(comp, constraints, index); } | protected void addImpl(Component comp, Object constraints, int index) { super.addImpl(comp, constraints, index); } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/4d1547f3e8f6ca6d9919b2574b466f7d83941970/JWindow.java/buggy/libraries/javalib/javax/swing/JWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
527,
2828,
12,
1841,
1161,
16,
1033,
6237,
16,
509,
770,
13,
225,
288,
1377,
309,
261,
2919,
422,
1365,
8485,
13,
2240,
18,
1289,
2828,
12,
2919,
16,
6237,
16,
770,
1769,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
527,
2828,
12,
1841,
1161,
16,
1033,
6237,
16,
509,
770,
13,
225,
288,
1377,
309,
261,
2919,
422,
1365,
8485,
13,
2240,
18,
1289,
2828,
12,
2919,
16,
6237,
16,
770,
1769,
4... |
label_24: | label_26: | final public void ConditionalOrExpression() throws ParseException { /*@bgen(jjtree) #ConditionalOrExpression(> 1) */ ASTConditionalOrExpression jjtn000 = new ASTConditionalOrExpression(this, JJTCONDITIONALOREXPRESSION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { ConditionalAndExpression(); label_24: while (true) { switch (jj_nt.kind) { case SC_OR: ; break; default: jj_la1[63] = jj_gen; break label_24; } jj_consume_token(SC_OR); ConditionalAndExpression(); } } 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 (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); } } } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/3afd4630754ba5d6642f3e8a1c9aa5162eff7e9f/JavaParser.java/buggy/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
918,
22466,
23695,
1435,
1216,
10616,
288,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
468,
14132,
23695,
12,
34,
404,
13,
1195,
225,
9183,
14132,
23695,
10684,
5088,
3784,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
918,
22466,
23695,
1435,
1216,
10616,
288,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
468,
14132,
23695,
12,
34,
404,
13,
1195,
225,
9183,
14132,
23695,
10684,
5088,
3784,
273,
... |
double[] aspect = new double[] {xasp, 0, 0, 0, 0, yasp, 0, 0, 0, 0, zasp, 0, 0, 0, 0, 1}; | double[] aspect = new double[] {xasp, 0, 0, 0, 0, yasp, 0, 0, 0, 0, zasp, 0, 0, 0, 0, 1}; | protected double[] makeDefaultMatrix() { DisplayImpl display = window.getDisplay(); if (display == null || display instanceof DisplayImplJ2D) return null; double scale = window.is3D() ? DEFAULT_ZOOM_3D : DEFAULT_ZOOM_2D; double rotate = window.is3D() ? DEFAULT_ROTATION : 0; double[] newMatrix = display.make_matrix(rotate, 0, 0, scale, 0, 0, 0); double[] aspect = new double[] {xasp, 0, 0, 0, 0, yasp, 0, 0, 0, 0, zasp, 0, 0, 0, 0, 1}; return display.multiply_matrix(newMatrix, aspect); } | 55415 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55415/6f36904668128b96bda94bc9cbdbc6e040d3deb1/ViewHandler.java/clean/loci/visbio/view/ViewHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1645,
8526,
1221,
1868,
4635,
1435,
288,
565,
9311,
2828,
2562,
273,
2742,
18,
588,
4236,
5621,
565,
309,
261,
5417,
422,
446,
747,
2562,
1276,
9311,
2828,
46,
22,
40,
13,
327,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1645,
8526,
1221,
1868,
4635,
1435,
288,
565,
9311,
2828,
2562,
273,
2742,
18,
588,
4236,
5621,
565,
309,
261,
5417,
422,
446,
747,
2562,
1276,
9311,
2828,
46,
22,
40,
13,
327,
44... |
double mb = (double) (pages<<LOG_BYTES_IN_PAGE) / (double) (1<<20); | double mb = (double) (pages << LOG_BYTES_IN_PAGE) / (double) (1 << 20); | private static void printPages(int pages, int mode) { double mb = (double) (pages<<LOG_BYTES_IN_PAGE) / (double) (1<<20); switch (mode) { case PAGES: Log.write(pages); Log.write(" pgs"); break; case MB: Log.write(mb); Log.write(" Mb"); break; case PAGES_MB: Log.write(pages); Log.write(" pgs ("); Log.write(mb); Log.write(" Mb)"); break; case MB_PAGES: Log.write(mb); Log.write(" Mb ("); Log.write(pages); Log.write(" pgs)"); break; default: Assert.fail("writePages passed illegal printing mode"); } } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/30524c62fa391922d51289c03075f714c772951c/Space.java/buggy/MMTk/src/org/mmtk/policy/Space.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
1172,
5716,
12,
474,
4689,
16,
509,
1965,
13,
288,
565,
1645,
4903,
273,
261,
9056,
13,
261,
7267,
2296,
2018,
67,
13718,
67,
706,
67,
11219,
13,
342,
261,
9056,
13,
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,
3238,
760,
918,
1172,
5716,
12,
474,
4689,
16,
509,
1965,
13,
288,
565,
1645,
4903,
273,
261,
9056,
13,
261,
7267,
2296,
2018,
67,
13718,
67,
706,
67,
11219,
13,
342,
261,
9056,
13,
2... |
getAxisForProcessing( ) ); | getAxisForProcessing( ), getAxisAngleType( ) ); | public void widgetSelected( SelectionEvent e ) { // detach popup dialogue if ( detachPopup( e.widget ) ) { return; } if ( e.widget instanceof Button && ( ( (Button) e.widget ).getStyle( ) & SWT.TOGGLE ) == SWT.TOGGLE && ( (Button) e.widget ).getSelection( ) ) { selectAllButtons( false ); ( (Button) e.widget ).setSelection( true ); } if ( e.widget.equals( btnAxisTitle ) ) { popupShell = createPopupShell( ); popupSheet = new AxisTextSheet( popupShell, getContext( ), getAxisForProcessing( ), getAxisAngleType( ) ); getWizard( ).attachPopup( btnAxisTitle.getText( ), -1, -1 ); } else if ( e.widget.equals( btnGridlines ) ) { popupShell = createPopupShell( ); popupSheet = new AxisGridLinesSheet( popupShell, getContext( ), getAxisForProcessing( ) ); getWizard( ).attachPopup( btnGridlines.getText( ), -1, -1 ); } else if ( e.widget.equals( btnMarkers ) ) { popupShell = createPopupShell( ); popupSheet = new AxisMarkersSheet( popupShell, getContext( ), getAxisForProcessing( ) ); getWizard( ).attachPopup( btnMarkers.getText( ), -1, -1 ); } else if ( e.widget.equals( btnScale ) ) { popupShell = createPopupShell( ); popupSheet = new AxisScaleSheet( popupShell, getContext( ), getAxisForProcessing( ) ); getWizard( ).attachPopup( btnScale.getText( ), -1, -1 ); } else if ( e.widget.equals( btnInteractivity ) ) { popupShell = createPopupShell( ); popupSheet = new InteractivitySheet( popupShell, getContext( ), getAxisForProcessing( ).getTriggers( ), false, true ); getWizard( ).attachPopup( btnInteractivity.getText( ), -1, -1 ); } if ( e.widget.equals( cmbTypes ) ) { AxisType axisType = AxisType.getByName( LiteralHelper.axisTypeSet.getNameByDisplayName( cmbTypes.getText( ) ) ); // Update the Sample Data without event fired. boolean isNotificaionIgnored = ChartAdapter.isNotificationIgnored( ); ChartAdapter.ignoreNotifications( true ); convertSampleData( axisType ); ChartAdapter.ignoreNotifications( isNotificaionIgnored ); // Set type and refresh the preview getAxisForProcessing( ).setType( axisType ); // Update popup UI refreshPopupSheet( ); } else if ( e.widget.equals( cmbOrigin ) ) { if ( LiteralHelper.intersectionTypeSet.getNameByDisplayName( cmbOrigin.getText( ) ) .equals( IntersectionType.VALUE_LITERAL.getName( ) ) ) { lblValue.setEnabled( true ); txtValue.setEnabled( true ); } else { lblValue.setEnabled( false ); txtValue.setEnabled( false ); } getAxisForProcessing( ).getOrigin( ) .setType( IntersectionType.getByName( LiteralHelper.intersectionTypeSet.getNameByDisplayName( cmbOrigin.getText( ) ) ) ); } else if ( e.widget.equals( btnVisible ) ) { getAxisForProcessing( ).getLabel( ) .setVisible( btnVisible.getSelection( ) ); refreshPopupSheet( ); } else if ( e.widget.equals( btnFormatSpecifier ) ) { String sAxisTitle = Messages.getString( "OrthogonalAxisDataSheetImpl.Lbl.OrthogonalAxis" ); //$NON-NLS-1$ try { String sTitleString = getAxisForProcessing( ).getTitle( ) .getCaption( ) .getValue( ); int iSeparatorIndex = sTitleString.indexOf( ExternalizedTextEditorComposite.SEPARATOR ); if ( iSeparatorIndex > 0 ) { sTitleString = sTitleString.substring( iSeparatorIndex ); } else if ( iSeparatorIndex == 0 ) { sTitleString = sTitleString.substring( ExternalizedTextEditorComposite.SEPARATOR.length( ) ); } sAxisTitle += " (" + sTitleString + ")"; //$NON-NLS-1$ //$NON-NLS-2$ } catch ( NullPointerException e1 ) { } FormatSpecifier formatspecifier = null; if ( getAxisForProcessing( ).getFormatSpecifier( ) != null ) { formatspecifier = getAxisForProcessing( ).getFormatSpecifier( ); } FormatSpecifierDialog editor = new FormatSpecifierDialog( cmpContent.getShell( ), formatspecifier, sAxisTitle ); if ( !editor.wasCancelled( ) ) { if ( editor.getFormatSpecifier( ) == null ) { getAxisForProcessing( ).eUnset( ComponentPackage.eINSTANCE.getAxis_FormatSpecifier( ) ); return; } getAxisForProcessing( ).setFormatSpecifier( editor.getFormatSpecifier( ) ); } } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/715c71906e414fba917c5dc22762acad694dcabe/AbstractAxisSubtask.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/format/axis/AbstractAxisSubtask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3604,
7416,
12,
12977,
1133,
425,
262,
202,
95,
202,
202,
759,
10199,
10431,
6176,
344,
202,
202,
430,
261,
10199,
13770,
12,
425,
18,
6587,
262,
262,
202,
202,
95,
1082,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3604,
7416,
12,
12977,
1133,
425,
262,
202,
95,
202,
202,
759,
10199,
10431,
6176,
344,
202,
202,
430,
261,
10199,
13770,
12,
425,
18,
6587,
262,
262,
202,
202,
95,
1082,... |
ite.getCause().printStackTrace(); throw ite; | throw ite.getCause(); | public static boolean setServices(Object child, ServiceBroker servicebroker) { Class childClass = child.getClass(); try { Method[] methods = childClass.getMethods(); int l = methods.length; for (int i=0; i<l; i++) { // look at all the methods Method m = methods[i]; String s = m.getName(); if ("setBindingSite".equals(s)) continue; Class[] params = m.getParameterTypes(); if (s.startsWith("set") && params.length == 1) { Class p = params[0]; if (Service.class.isAssignableFrom(p)) { String pname = p.getName(); { // trim the package off the classname int dot = pname.lastIndexOf("."); if (dot>-1) pname = pname.substring(dot+1); } if (s.endsWith(pname)) { // ok: m is a "public setX(X)" method where X is a Service. // Let's try getting the service... Object service = servicebroker.getService(child, p, null); Object[] args = new Object[] { service }; try { m.invoke(child, args); } catch (InvocationTargetException ite) { ite.getCause().printStackTrace(); throw ite; } } } } } } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(e.toString()); } return true; } | 7981 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7981/167ea3c3d3998c886fec2e98641afd076ee684a0/BindingUtility.java/buggy/core/src/org/cougaar/core/component/BindingUtility.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1250,
444,
5676,
12,
921,
1151,
16,
1956,
11194,
1156,
21722,
13,
288,
565,
1659,
1151,
797,
273,
1151,
18,
588,
797,
5621,
565,
775,
288,
1377,
2985,
8526,
2590,
273,
1151,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
5676,
12,
921,
1151,
16,
1956,
11194,
1156,
21722,
13,
288,
565,
1659,
1151,
797,
273,
1151,
18,
588,
797,
5621,
565,
775,
288,
1377,
2985,
8526,
2590,
273,
1151,
... |
timeoutThread = new Thread(new TimeoutRunnable(), "FitClient timeout"); timeoutThread.start(); earlyTerminationThread = new Thread(new EarlyTerminationRunnable(), "FitClient early termination"); earlyTerminationThread.start(); waitForConnection(); } catch(Exception e) { listener.exceptionOccurred(e); } } | timeoutThread = new Thread(new TimeoutRunnable(), "FitClient timeout"); timeoutThread.start(); earlyTerminationThread = new Thread(new EarlyTerminationRunnable(), "FitClient early termination"); earlyTerminationThread.start(); waitForConnection(); } catch (Exception e) { listener.exceptionOccurred(e); } } | public void start() throws Exception { try { commandRunner.start(); timeoutThread = new Thread(new TimeoutRunnable(), "FitClient timeout"); timeoutThread.start(); earlyTerminationThread = new Thread(new EarlyTerminationRunnable(), "FitClient early termination"); earlyTerminationThread.start(); waitForConnection(); } catch(Exception e) { listener.exceptionOccurred(e); } } | 49785 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49785/59b5c516aa1e48abf081d18257e2b7c16b352512/CommandRunningFitClient.java/clean/src/fitnesse/components/CommandRunningFitClient.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
787,
1435,
1216,
1185,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
3076,
9709,
18,
1937,
5621,
1082,
202,
4538,
3830,
273,
394,
4884,
12,
2704,
7804,
20013,
9334,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
787,
1435,
1216,
1185,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
3076,
9709,
18,
1937,
5621,
1082,
202,
4538,
3830,
273,
394,
4884,
12,
2704,
7804,
20013,
9334,
31... |
String knownName = null; | PetName pn = null; | public void receiveEnd() { _postBodyBuffer.append("</td></tr>\n"); _postBodyBuffer.append("<tr ").append(getClass("summDetail")).append(" >\n"); _postBodyBuffer.append("<form action=\"").append(getAttachmentURLBase()).append("\">\n"); _postBodyBuffer.append("<td colspan=\"2\" valign=\"top\" align=\"left\" ").append(getClass("summDetail")).append("> \n"); if (_files.size() > 0) { _postBodyBuffer.append(getSpan("summDetailAttachment")).append("Attachments:</span> "); _postBodyBuffer.append("<select ").append(getClass("summDetailAttachmentId")).append(" name=\"").append(ArchiveViewerBean.PARAM_ATTACHMENT).append("\">\n"); for (int i = 0; i < _files.size(); i++) { _postBodyBuffer.append("<option value=\"").append(i).append("\">"); File f = (File)_files.get(i); String name = (String)_filenames.get(i); String type = (String)_fileTypes.get(i); _postBodyBuffer.append(sanitizeString(name)); _postBodyBuffer.append(" (").append(f.length()/1024).append("KB"); _postBodyBuffer.append(", type ").append(sanitizeString(type)).append(")</option>\n"); } _postBodyBuffer.append("</select>\n"); _postBodyBuffer.append("<input ").append(getClass("summDetailAttachmentDl")).append(" type=\"submit\" value=\"Download\" name=\"Download\" /><br />\n"); } if (_blogs.size() > 0) { _postBodyBuffer.append(getSpan("summDetailBlog")).append("Blog references:</span> "); for (int i = 0; i < _blogs.size(); i++) { Blog b = (Blog)_blogs.get(i); boolean expanded = (_user != null ? _user.getShowExpanded() : false); boolean images = (_user != null ? _user.getShowImages() : false); _postBodyBuffer.append("<a ").append(getClass("summDetailBlogLink")).append(" href=\""); _postBodyBuffer.append(getPageURL(new Hash(Base64.decode(b.hash)), b.tag, b.entryId, -1, -1, expanded, images)); _postBodyBuffer.append("\">").append(sanitizeString(b.name)).append("</a> "); } _postBodyBuffer.append("<br />\n"); } if (_links.size() > 0) { _postBodyBuffer.append(getSpan("summDetailExternal")).append("External links:</span> "); for (int i = 0; i < _links.size(); i++) { Link l = (Link)_links.get(i); _postBodyBuffer.append("<a ").append(getClass("summDetailExternalLink")).append(" href=\"externallink.jsp?"); if (l.schema != null) _postBodyBuffer.append("schema=").append(sanitizeURL(l.schema)).append('&'); if (l.location != null) _postBodyBuffer.append("location=").append(sanitizeURL(l.location)).append('&'); _postBodyBuffer.append("\">").append(sanitizeString(l.location)); _postBodyBuffer.append(getSpan("summDetailExternalNet")).append(" (").append(sanitizeString(l.schema)).append(")</span></a> "); } _postBodyBuffer.append("<br />\n"); } if (_addresses.size() > 0) { _postBodyBuffer.append(getSpan("summDetailAddr")).append("Addresses:</span>"); for (int i = 0; i < _addresses.size(); i++) { Address a = (Address)_addresses.get(i); String knownName = null; if (_user != null) knownName = _user.getPetNameDB().getByLocation(a.location).getName(); if (knownName != null) { _postBodyBuffer.append(' ').append(getSpan("summDetailAddrKnown")); _postBodyBuffer.append(sanitizeString(knownName)).append("</span>"); } else { _postBodyBuffer.append(" <a ").append(getClass("summDetailAddrLink")).append(" href=\"addresses.jsp?"); if (a.schema != null) _postBodyBuffer.append("network=").append(sanitizeTagParam(a.schema)).append('&'); if (a.location != null) _postBodyBuffer.append("location=").append(sanitizeTagParam(a.location)).append('&'); if (a.name != null) _postBodyBuffer.append("name=").append(sanitizeTagParam(a.name)).append('&'); if (a.protocol != null) _postBodyBuffer.append("protocol=").append(sanitizeTagParam(a.protocol)).append('&'); _postBodyBuffer.append("\">").append(sanitizeString(a.name)).append("</a>"); } importAddress(a); } _postBodyBuffer.append("<br />\n"); } if (_archives.size() > 0) { _postBodyBuffer.append(getSpan("summDetailArchive")).append("Archives:</span>"); for (int i = 0; i < _archives.size(); i++) { ArchiveRef a = (ArchiveRef)_archives.get(i); _postBodyBuffer.append(" <a ").append(getClass("summDetailArchiveLink")).append(" href=\"").append(getArchiveURL(null, new SafeURL(a.locationSchema + "://" + a.location))); _postBodyBuffer.append("\">").append(sanitizeString(a.name)).append("</a>"); if (a.description != null) _postBodyBuffer.append(": ").append(getSpan("summDetailArchiveDesc")).append(sanitizeString(a.description)).append("</span>"); if (null == _user.getPetNameDB().getByLocation(a.location)) { _postBodyBuffer.append(" <a ").append(getClass("summDetailArchiveBookmark")).append(" href=\""); _postBodyBuffer.append(getBookmarkURL(a.name, a.location, a.locationSchema, "syndiearchive")); _postBodyBuffer.append("\">bookmark</a>"); } } _postBodyBuffer.append("<br />\n"); } _postBodyBuffer.append("</td>\n</form>\n</tr>\n"); _postBodyBuffer.append("</table>\n"); } | 3808 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3808/f282fe38545cf54f690b8fd2c8e2402795ab428f/HTMLPreviewRenderer.java/buggy/apps/syndie/java/src/net/i2p/syndie/sml/HTMLPreviewRenderer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
6798,
1638,
1435,
288,
540,
389,
18031,
1892,
18,
6923,
2932,
1757,
4465,
4695,
313,
5333,
82,
8863,
3639,
389,
18031,
1892,
18,
6923,
2932,
32,
313,
315,
2934,
6923,
12,
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,
918,
6798,
1638,
1435,
288,
540,
389,
18031,
1892,
18,
6923,
2932,
1757,
4465,
4695,
313,
5333,
82,
8863,
3639,
389,
18031,
1892,
18,
6923,
2932,
32,
313,
315,
2934,
6923,
12,
588,
... |
gd.heightHint = convertVerticalDLUsToPixels(colorButton, IDialogConstants.BUTTON_HEIGHT); | protected void doFillIntoGrid(Composite parent, int numColumns) { Control control = getLabelControl(parent); GridData gd = new GridData(); gd.horizontalSpan = numColumns - 1; control.setLayoutData(gd); Button colorButton = getChangeControl(parent); gd = new GridData(); gd.heightHint = convertVerticalDLUsToPixels(colorButton, IDialogConstants.BUTTON_HEIGHT); int widthHint = convertHorizontalDLUsToPixels(colorButton, IDialogConstants.BUTTON_WIDTH); gd.widthHint = Math.max(widthHint, colorButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x); colorButton.setLayoutData(gd); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/ff9766620c37e7b908d6ba9cf2c948d423981dd1/ColorFieldEditor.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/ColorFieldEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
741,
8026,
5952,
6313,
12,
9400,
982,
16,
509,
30109,
13,
288,
202,
202,
3367,
3325,
273,
11237,
3367,
12,
2938,
1769,
202,
202,
6313,
751,
15551,
273,
394,
7145,
751,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
741,
8026,
5952,
6313,
12,
9400,
982,
16,
509,
30109,
13,
288,
202,
202,
3367,
3325,
273,
11237,
3367,
12,
2938,
1769,
202,
202,
6313,
751,
15551,
273,
394,
7145,
751,
5... | |
public final VmField getField(String name) { return getField(name, null); | public final VmField getField(String name, String signature) { VmField f = getDeclaredField(name, signature); if (f != null) { return f; } if (superClass != null) { f = superClass.getField(name, signature); if (f != null) { return f; } } final int cnt = getNoInterfaces(); for (int i = 0; i < cnt; i++) { f = allInterfaceTable[i].getField(name, signature); if (f != null) { return f; } } return null; | public final VmField getField(String name) { return getField(name, null); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/34018d58ddf97a144be387eabd5b8ae715c6f8a5/VmType.java/buggy/core/src/core/org/jnode/vm/classmgr/VmType.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
776,
81,
974,
5031,
12,
780,
508,
13,
288,
202,
202,
2463,
5031,
12,
529,
16,
446,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
776,
81,
974,
5031,
12,
780,
508,
13,
288,
202,
202,
2463,
5031,
12,
529,
16,
446,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
return args[index]; | public Object get(int index, Scriptable start) { if (0 <= index && index < args.length) { NativeFunction f = activation.funObj; if (index < f.argCount) { String argName = f.argNames[index]; for (int i=index+1; i < f.argNames.length; i++) { if (argName.equals(f.argNames[i])) { // duplicate parameter name, must use initial // parameter value Object[] orig = activation.getOriginalArguments(); return index < orig.length ? orig[index] : Undefined.instance; } } return activation.get(f.argNames[index], activation); } return args[index]; } return super.get(index, start); } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/794d568298790ba12e38918d4901ce31556a8b27/Arguments.java/clean/js/rhino/src/org/mozilla/javascript/Arguments.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
336,
12,
474,
770,
16,
22780,
787,
13,
288,
3639,
309,
261,
20,
1648,
770,
597,
770,
411,
833,
18,
2469,
13,
288,
5411,
16717,
2083,
284,
273,
10027,
18,
12125,
2675,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
336,
12,
474,
770,
16,
22780,
787,
13,
288,
3639,
309,
261,
20,
1648,
770,
597,
770,
411,
833,
18,
2469,
13,
288,
5411,
16717,
2083,
284,
273,
10027,
18,
12125,
2675,
31,
... | |
answer = resolveTypeName(identifier); | String ret = resolveTypeName(identifier); if (ret!=null) answer = Type.makeType(ret); | protected String resolvedName(AST node) { if (isType(TYPE, node)) { node = node.getFirstChild(); } String answer = null; if (isType(DOT, node) || isType(OPTIONAL_DOT, node)) { answer = qualifiedName(node); } else if (isPrimitiveTypeLiteral(node)) { answer = node.getText(); } else if (isType(INDEX_OP, node) || isType(ARRAY_DECLARATOR, node)) { AST child = node.getFirstChild(); String text = resolvedName(child); // TODO sometimes we have ARRAY_DECLARATOR->typeName // and sometimes we have typeName->ARRAY_DECLARATOR // so here's a little fudge while we be more consistent in the Antlr if (text.endsWith("[]")) { return text; } return text + "[]"; } else { String identifier = node.getText(); answer = resolveTypeName(identifier); } AST nextSibling = node.getNextSibling(); if (isType(INDEX_OP, nextSibling) || isType(ARRAY_DECLARATOR, node)) { return answer + "[]"; } else { return answer; } } | 6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/0e621fdecf3e8ab9db2fe9eea10bae5d2dc4b695/AntlrParserPlugin.java/clean/src/main/org/codehaus/groovy/antlr/AntlrParserPlugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
4640,
461,
12,
9053,
756,
13,
288,
3639,
309,
261,
291,
559,
12,
2399,
16,
756,
3719,
288,
5411,
756,
273,
756,
18,
588,
3759,
1763,
5621,
3639,
289,
3639,
514,
5803,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
4640,
461,
12,
9053,
756,
13,
288,
3639,
309,
261,
291,
559,
12,
2399,
16,
756,
3719,
288,
5411,
756,
273,
756,
18,
588,
3759,
1763,
5621,
3639,
289,
3639,
514,
5803,
273,
... |
jj_la1[206] = jj_gen; | jj_la1[208] = jj_gen; | final public List<Type> TypeArguments() throws ParseException { List<Type> typeArgs = new LinkedList<Type>(); ReferenceType hookedType = new ReferenceType("java.lang.Object"); Type temp = new HookType(hookedType, false); Token hook = null; Token supered = null; jj_consume_token(LESS); if (jj_2_78(2147483647)) { hook = jj_consume_token(HOOK); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: case SUPER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: jj_consume_token(EXTENDS); break; case SUPER: jj_consume_token(SUPER); break; default: jj_la1[203] = jj_gen; jj_consume_token(-1); throw new ParseException(); } hookedType = ReferenceTypeName(); break; default: jj_la1[204] = jj_gen; ; } } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: case IDENTIFIER: temp = type(); break; default: jj_la1[205] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } if(hook!= null) temp = new HookType(hookedType, (supered!=null)); typeArgs.add(temp); label_72: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[206] = jj_gen; break label_72; } jj_consume_token(COMMA); if (jj_2_79(2147483647)) { hook = jj_consume_token(HOOK); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: case SUPER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: jj_consume_token(EXTENDS); break; case SUPER: jj_consume_token(SUPER); break; default: jj_la1[207] = jj_gen; jj_consume_token(-1); throw new ParseException(); } hookedType = ReferenceTypeName(); break; default: jj_la1[208] = jj_gen; ; } } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: case IDENTIFIER: temp = type(); break; default: jj_la1[209] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } if(hook!= null) temp = new HookType(hookedType, (supered!=null)); typeArgs.add(temp); } RightAngledBracket(); {if (true) return typeArgs;} throw new Error("Missing return statement in function"); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/0b7f9842c42a34509d077a5e1d655daf0b8192d6/Parser.java/clean/dynamicjava/src/koala/dynamicjava/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
987,
32,
559,
34,
1412,
4628,
1435,
1216,
10616,
288,
565,
987,
32,
559,
34,
618,
2615,
273,
394,
10688,
32,
559,
34,
5621,
565,
6268,
559,
3953,
329,
559,
273,
394,
6268,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
32,
559,
34,
1412,
4628,
1435,
1216,
10616,
288,
565,
987,
32,
559,
34,
618,
2615,
273,
394,
10688,
32,
559,
34,
5621,
565,
6268,
559,
3953,
329,
559,
273,
394,
6268,
... |
private boolean isPluginInstalled( String groupId, String artifactId, String version ) | private boolean isPluginInstalled( String pluginKey ) | private boolean isPluginInstalled( String groupId, String artifactId, String version ) {// String key = PluginDescriptor.constructPluginKey( groupId, artifactId, version ); // TODO: see comment in getPluginDescriptor String key = groupId + ":" + artifactId; return pluginDescriptors.containsKey( key ); } | 50542 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50542/a96a03d0a0c5e023c0935bcb92977454bd45fadd/DefaultPluginManager.java/buggy/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
353,
3773,
16747,
12,
514,
1909,
653,
262,
565,
288,
759,
3639,
514,
498,
273,
6258,
3187,
18,
10062,
3773,
653,
12,
6612,
16,
25496,
16,
1177,
11272,
3639,
368,
2660,
30,
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,
1250,
353,
3773,
16747,
12,
514,
1909,
653,
262,
565,
288,
759,
3639,
514,
498,
273,
6258,
3187,
18,
10062,
3773,
653,
12,
6612,
16,
25496,
16,
1177,
11272,
3639,
368,
2660,
30,
2... |
public final void updateShellKludge(final Shell shell) { final Shell currentActiveShell = contextAuthority.getActiveShell(); if (currentActiveShell != shell) { contextAuthority.sourceChanged(ISources.ACTIVE_SHELL, ISources.ACTIVE_SHELL_NAME, shell); } | public final void updateShellKludge() { contextAuthority.updateShellKludge(); | public final void updateShellKludge(final Shell shell) { final Shell currentActiveShell = contextAuthority.getActiveShell(); if (currentActiveShell != shell) { contextAuthority.sourceChanged(ISources.ACTIVE_SHELL, ISources.ACTIVE_SHELL_NAME, shell); } } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/539b29bd9f4ed0020b6fce0d726b8d740d87469d/ContextService.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/ContextService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1089,
13220,
47,
80,
27110,
12,
6385,
19433,
5972,
13,
288,
202,
202,
6385,
19433,
783,
3896,
13220,
273,
819,
10962,
18,
588,
3896,
13220,
5621,
202,
202,
430,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1089,
13220,
47,
80,
27110,
12,
6385,
19433,
5972,
13,
288,
202,
202,
6385,
19433,
783,
3896,
13220,
273,
819,
10962,
18,
588,
3896,
13220,
5621,
202,
202,
430,
261,
... |
public org.quickfix.field.LegInstrRegistry getLegInstrRegistry() throws FieldNotFound { org.quickfix.field.LegInstrRegistry value = new org.quickfix.field.LegInstrRegistry(); | public quickfix.field.LegInstrRegistry getLegInstrRegistry() throws FieldNotFound { quickfix.field.LegInstrRegistry value = new quickfix.field.LegInstrRegistry(); | public org.quickfix.field.LegInstrRegistry getLegInstrRegistry() throws FieldNotFound { org.quickfix.field.LegInstrRegistry value = new org.quickfix.field.LegInstrRegistry(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/SecurityListRequest.java/buggy/src/java/src/quickfix/fix44/SecurityListRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
382,
701,
4243,
336,
8329,
382,
701,
4243,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
382,
701,
4243,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8329,
382,
701,
4243,
336,
8329,
382,
701,
4243,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
382,
701,
4243,
46... |
public Buddies(GameObjects gameObjects) { super("Buddies", j2DClient.SCREEN_WIDTH - 132, 265, 132, 200); setTitleBar(true); setFrame(true); setMoveable(true); setMinimizeable(true); SpriteStore st = SpriteStore.get(); online = st.getSprite("data/gui/buddy_online.png"); offline = st.getSprite("data/gui/buddy_offline.png"); buddies = new LinkedList<String>(); } | 4438 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4438/5647b293a3291529beeb6bbd858ef447bf7e41bd/Buddies.java/clean/src/games/stendhal/client/gui/wt/Buddies.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
38,
20567,
606,
12,
12496,
921,
1055,
339,
4710,
15329,
202,
202,
9565,
2932,
38,
20567,
606,
3113,
78,
22,
40,
1227,
18,
27908,
67,
10023,
17,
22152,
16,
30281,
16,
22152,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
38,
20567,
606,
12,
12496,
921,
1055,
339,
4710,
15329,
202,
202,
9565,
2932,
38,
20567,
606,
3113,
78,
22,
40,
1227,
18,
27908,
67,
10023,
17,
22152,
16,
30281,
16,
22152,
16... | ||
private void endStep() | protected void endStep() | private void endStep() { Step step = (Step) peekFrame().removeFirst(); addPredicates( step, popFrame().iterator() ); push( step ); } | 47970 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47970/ac3463638303694af3b1dcae3442081f242c6473/JaxenHandler.java/clean/src/java/main/org/jaxen/JaxenHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
679,
4160,
1435,
565,
288,
3639,
8693,
2235,
273,
261,
4160,
13,
8032,
3219,
7675,
4479,
3759,
5621,
3639,
527,
26916,
12,
2235,
16,
15604,
1843,
3219,
7675,
9838,
1435,
11272,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
679,
4160,
1435,
565,
288,
3639,
8693,
2235,
273,
261,
4160,
13,
8032,
3219,
7675,
4479,
3759,
5621,
3639,
527,
26916,
12,
2235,
16,
15604,
1843,
3219,
7675,
9838,
1435,
11272,
... |
new CreateFont(Editor.this).show(); | new AutoFormat(Editor.this).show(); | public void actionPerformed(ActionEvent e) { //new CreateFont().show(sketch.dataFolder); new CreateFont(Editor.this).show(); } | 8833 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8833/df9c62c674c9ec39fae64b7f8b39991eb55be432/Editor.java/clean/app/Editor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
1850,
368,
2704,
1788,
5711,
7675,
4500,
12,
7771,
1593,
18,
892,
3899,
1769,
540,
394,
8064,
1630,
12,
6946,
18,
2211,
2934,
4500,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
1850,
368,
2704,
1788,
5711,
7675,
4500,
12,
7771,
1593,
18,
892,
3899,
1769,
540,
394,
8064,
1630,
12,
6946,
18,
2211,
2934,
4500,
5621,
... |
return false; | return type == ResultSet.TYPE_SCROLL_SENSITIVE; | public boolean othersUpdatesAreVisible(int type) throws SQLException { // Updates not supported, so just return false return false; } | 439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/2ce6f7e2b23ed87507133d17d13f4c0ffba806f4/JtdsDatabaseMetaData.java/clean/trunk/jtds/src/main/net/sourceforge/jtds/jdbc/JtdsDatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
10654,
5121,
4704,
6207,
12,
474,
618,
13,
1216,
6483,
288,
3639,
368,
15419,
486,
3260,
16,
1427,
2537,
327,
629,
3639,
327,
618,
422,
10842,
18,
2399,
67,
2312,
14555,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
10654,
5121,
4704,
6207,
12,
474,
618,
13,
1216,
6483,
288,
3639,
368,
15419,
486,
3260,
16,
1427,
2537,
327,
629,
3639,
327,
618,
422,
10842,
18,
2399,
67,
2312,
14555,
67,
... |
if (obj instanceof RubyString) { return (RubyString) obj; } return (RubyString) obj.callMethod("to_s"); | return (RubyString) (obj instanceof RubyString ? obj : obj.callMethod("to_s")); | public static RubyString objAsString(IRubyObject obj) { if (obj instanceof RubyString) { return (RubyString) obj; } return (RubyString) obj.callMethod("to_s"); } | 47984 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47984/c3988bcedc9973ff7f8c24ac6423ecb89f3ada35/RubyString.java/clean/src/org/jruby/RubyString.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
19817,
780,
1081,
8092,
12,
7937,
10340,
921,
1081,
13,
288,
202,
202,
430,
261,
2603,
1276,
19817,
780,
13,
288,
1082,
202,
2463,
261,
54,
10340,
780,
13,
1081,
31,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
19817,
780,
1081,
8092,
12,
7937,
10340,
921,
1081,
13,
288,
202,
202,
430,
261,
2603,
1276,
19817,
780,
13,
288,
1082,
202,
2463,
261,
54,
10340,
780,
13,
1081,
31,
202,... |
Route r = m.getLandRoute(t2, territory); | Route r = map.getLandRoute(neighborOfMyEnemy, enemyTerritory); | public Collection selectCombatMoves() { //Medium AI GameMap m = m_data.getMap(); //PlayerList pls = m_data.getPlayerList(); Iterator i1 = m_data.getPlayerList().getPlayers().iterator(); Collection c = new ArrayList(); AllianceTracker m_allies = m_data.getAllianceTracker(); Collection moves = new ArrayList(); int best = 0; Collection bestmoves = new ArrayList(); //System.out.println("Combat"); while(i1.hasNext() ) { PlayerID p = (PlayerID)i1.next(); //System.out.println(p.toString()); if(!m_allies.isAllied(m_id, p)) { c.addAll(m.getTerritoriesOwnedBy(p)); } } Iterator iter = c.iterator(); while(iter.hasNext() ) { Territory territory = (Territory) iter.next(); //x++; Collection u = new ArrayList(); //Set adjacent = m.getNeighbors(territory, 3); Iterator iter2 = m.getNeighbors(territory, 3).iterator(); while(iter2.hasNext() ) { Territory t2 = (Territory) iter2.next(); if(!t2.isWater() && m_allies.isAllied(m_id,t2.getOwner()) && t2.getUnits().getUnits().size() >=1) { Collection temp = new ArrayList(); temp.addAll(t2.getUnits().getUnits()); Collection newu = selectUnitsWithRange(m_id, temp, m.getLandDistance(territory, t2)); //System.out.println("Current Fitness " + t2.getUnits().getUnits().size()); Route r = m.getLandRoute(t2, territory); if(r != null && r.getLength() >= 1) { boolean trap = true; //System.out.println(r.getStart().toString()); for(int q = 0; q < r.getLength() - 1; q++) { //System.out.println(r.at(q).toString()); if(!m_allies.isAllied(r.at(q).getOwner(), m_id)) trap = false; } MoveDescription cow = new MoveDescription(newu, r); if(trap && newu.size() >= 1 && newu.size() <= temp.size()) { moves.add(cow); u.addAll(newu); } } } } if(u.size() != 0) { Collection temp = new ArrayList(); temp.addAll(territory.getUnits().getUnits()); int current = evaluateAttackhelper(u, temp); //System.out.println("Current Fitness " + current); if(territory.getUnits().getUnits().size() == 0) { //System.out.println("empty Country" + best); //current = best + 1; } if(current > best) { best = current; bestmoves = moves; moves = new ArrayList(); } } } Iterator cow = bestmoves.iterator(); while(cow.hasNext()) { //MoveDescription temp = (MoveDescription)cow.next(); //System.out.println("Move " + temp.toString()); } //if(bestmoves == null || bestmoves.isEmpty()) { //System.out.println("turn " + m_id.toString()); //System.out.println("Current Fitness " + best); //System.out.println("There are Moves"); } return bestmoves; } | 8909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8909/0d04facb896d950d5339227d75dfe8acdc1d554a/AI.java/buggy/triplea/src/games/strategy/triplea/troxAI/AI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2200,
2027,
11328,
270,
19297,
1435,
202,
95,
202,
759,
25599,
432,
45,
202,
202,
12496,
863,
312,
273,
312,
67,
892,
18,
588,
863,
5621,
202,
202,
759,
12148,
682,
886,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2200,
2027,
11328,
270,
19297,
1435,
202,
95,
202,
759,
25599,
432,
45,
202,
202,
12496,
863,
312,
273,
312,
67,
892,
18,
588,
863,
5621,
202,
202,
759,
12148,
682,
886,
87,
... |
super (); | public BorderUIResource(Border delegate) { super (); this.delegate = delegate; } | 25337 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25337/d092ccafae9945813bbf1be1db3d5e5bd006a90b/BorderUIResource.java/buggy/libjava/javax/swing/plaf/BorderUIResource.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
13525,
5370,
1420,
12,
8107,
7152,
13,
565,
288,
202,
9565,
261,
1769,
202,
2211,
18,
22216,
273,
7152,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
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,
13525,
5370,
1420,
12,
8107,
7152,
13,
565,
288,
202,
9565,
261,
1769,
202,
2211,
18,
22216,
273,
7152,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
return reminderDate; | return reminderDate; | protected Object openDialogBox(Control cellEditorWindow) { ReminderDialog dialog = new ReminderDialog(cellEditorWindow.getShell()); dialog.open(); reminderDate = dialog.getDate(); return reminderDate; } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/bcbd1b8c581189a4c534dc6fd11d8f91c9494e67/ReminderCellEditor.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/planner/ui/ReminderCellEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1033,
1696,
6353,
3514,
12,
3367,
2484,
6946,
3829,
13,
288,
202,
202,
1933,
14055,
6353,
6176,
273,
394,
2663,
14055,
6353,
12,
3855,
6946,
3829,
18,
588,
13220,
10663,
202,
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,
1117,
1033,
1696,
6353,
3514,
12,
3367,
2484,
6946,
3829,
13,
288,
202,
202,
1933,
14055,
6353,
6176,
273,
394,
2663,
14055,
6353,
12,
3855,
6946,
3829,
18,
588,
13220,
10663,
202,
2... |
ISaveableModel model = selectedModels[i]; | Saveable model = selectedModels[i]; | private static boolean saveModels(ISaveableModelSource modelSource, final IWorkbenchWindow window) { ISaveableModel[] selectedModels = modelSource.getActiveModels(); final ArrayList dirtyModels = new ArrayList(); for (int i = 0; i < selectedModels.length; i++) { ISaveableModel model = selectedModels[i]; if (model.isDirty()) { dirtyModels.add(model); } } if (dirtyModels.isEmpty()) { return true; } // Create save block. IRunnableWithProgress progressOp = new IRunnableWithProgress() { public void run(IProgressMonitor monitor) { IProgressMonitor monitorWrap = new EventLoopProgressMonitor(monitor); monitorWrap.beginTask("", dirtyModels.size()); //$NON-NLS-1$ for (Iterator i = dirtyModels.iterator(); i.hasNext();) { ISaveableModel model = (ISaveableModel) i.next(); // handle case where this model got saved as a result of saving another if (!model.isDirty()) { monitor.worked(1); continue; } try { model.doSave(new SubProgressMonitor(monitorWrap, 1)); } catch (CoreException e) { ErrorDialog.openError(window.getShell(), WorkbenchMessages.Error, e.getMessage(), e.getStatus()); } if (monitor.isCanceled()) { break; } } monitorWrap.done(); } }; // Do the save. return runProgressMonitorOperation(WorkbenchMessages.Save, progressOp, window); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/1b0dac5907b7e377a3c295ce4c321d6a5feea581/SaveableHelper.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveableHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
1250,
1923,
8430,
12,
45,
4755,
429,
1488,
1830,
938,
1830,
16,
727,
467,
2421,
22144,
3829,
2742,
13,
288,
202,
202,
45,
4755,
429,
1488,
8526,
3170,
8430,
273,
938,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
1250,
1923,
8430,
12,
45,
4755,
429,
1488,
1830,
938,
1830,
16,
727,
467,
2421,
22144,
3829,
2742,
13,
288,
202,
202,
45,
4755,
429,
1488,
8526,
3170,
8430,
273,
938,
18... |
protected static String generateDocumentFromReport( HttpServletRequest request ) { String fileName = getReport( request ); if ( fileName.indexOf( '.' ) >= 0 ) { fileName = fileName.substring( 0, fileName.lastIndexOf( '.' ) ) + SUFFIX_REPORT_DOCUMENT; } else { fileName = fileName + SUFFIX_REPORT_DOCUMENT; } return fileName; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/2859505a2b515915ac277ff18417d7d9ce65a593/ParameterAccessor.java/buggy/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/utility/ParameterAccessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
3845,
780,
7163,
2519,
1265,
4820,
12,
1082,
202,
2940,
18572,
2293,
13,
202,
95,
202,
202,
780,
17812,
33,
588,
4820,
12,
2293,
1769,
202,
202,
430,
12,
17812,
18,
31806,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
3845,
780,
7163,
2519,
1265,
4820,
12,
1082,
202,
2940,
18572,
2293,
13,
202,
95,
202,
202,
780,
17812,
33,
588,
4820,
12,
2293,
1769,
202,
202,
430,
12,
17812,
18,
31806,
26... | ||
((JComponent) frame.getRootPane().getGlassPane()).setOpaque(false); frame.getRootPane().getGlassPane().setVisible(true); | ((JComponent) frame.getRootPane().getGlassPane()).setOpaque(false); frame.getRootPane().getGlassPane().setVisible(true); | public void installUI(JComponent c) { if (c instanceof JInternalFrame) { frame = (JInternalFrame) c; internalFrameLayout = createLayoutManager(); frame.setLayout(internalFrameLayout); ((JComponent) frame.getRootPane().getGlassPane()).setOpaque(false); frame.getRootPane().getGlassPane().setVisible(true); installDefaults(); installListeners(); installComponents(); installKeyboardActions(); frame.setOpaque(true); frame.invalidate(); } } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/fb7120a9ec0e190272c5b7001972c43826c4cb9f/BasicInternalFrameUI.java/clean/libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3799,
5370,
12,
46,
1841,
276,
13,
225,
288,
565,
309,
261,
71,
1276,
804,
3061,
3219,
13,
1377,
288,
202,
3789,
273,
261,
46,
3061,
3219,
13,
276,
31,
202,
7236,
3219,
374... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3799,
5370,
12,
46,
1841,
276,
13,
225,
288,
565,
309,
261,
71,
1276,
804,
3061,
3219,
13,
1377,
288,
202,
3789,
273,
261,
46,
3061,
3219,
13,
276,
31,
202,
7236,
3219,
374... |
result.append('='); | result.append("=\""); | private String tagify(String begin, String end, String value) { StringBuffer result = new StringBuffer(); result.append('<'); result.append(begin); if (value != null) { result.append('='); result.append(value); } result.append('>'); result.append(this.string); result.append("</"); result.append((end == null) ? begin : end); result.append('>'); return result.toString(); } | 13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/42056e97d4bd3429bd5b2362591efeab56ec20ff/NativeString.java/clean/js/rhino/src/org/mozilla/javascript/NativeString.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
1047,
1164,
12,
780,
2376,
16,
514,
679,
16,
514,
460,
13,
288,
3639,
6674,
563,
273,
394,
6674,
5621,
3639,
563,
18,
6923,
2668,
32,
8284,
3639,
563,
18,
6923,
12,
10086,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
1047,
1164,
12,
780,
2376,
16,
514,
679,
16,
514,
460,
13,
288,
3639,
6674,
563,
273,
394,
6674,
5621,
3639,
563,
18,
6923,
2668,
32,
8284,
3639,
563,
18,
6923,
12,
10086,
... |
handCursor = new Cursor(parent.getDisplay(), SWT.CURSOR_HAND); busyCursor = new Cursor(parent.getDisplay(), SWT.CURSOR_WAIT); | setHandCursor(new Cursor(parent.getDisplay(), SWT.CURSOR_HAND)); setBusyCursor(new Cursor(parent.getDisplay(), SWT.CURSOR_WAIT)); | protected Control createDialogArea(Composite parent) { handCursor = new Cursor(parent.getDisplay(), SWT.CURSOR_HAND); busyCursor = new Cursor(parent.getDisplay(), SWT.CURSOR_WAIT); getShell().addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { handCursor.dispose(); busyCursor.dispose(); } }); ImageDescriptor imageDescriptor = aboutInfo.getAboutImage(); // may be null if (imageDescriptor != null) image = imageDescriptor.createImage(); if (image == null || image.getBounds().width <= MAX_IMAGE_WIDTH_FOR_TEXT) { // show text String aboutText = aboutInfo.getAboutText(); if (aboutText != null) { // get an about item item = scan(aboutText); } } // page group Composite outer = (Composite)super.createDialogArea(parent); outer.setSize(outer.computeSize(SWT.DEFAULT, SWT.DEFAULT)); GridLayout layout = new GridLayout(); outer.setLayout(layout); outer.setLayoutData(new GridData(GridData.FILL_BOTH)); // the image & text Composite topContainer = new Composite(outer, SWT.NONE); layout = new GridLayout(); layout.numColumns = (image == null || item == null ? 1 : 2); layout.marginWidth = 0; topContainer.setLayout(layout); GridData data = new GridData(); data.horizontalAlignment = GridData.FILL; data.grabExcessHorizontalSpace = true; topContainer.setLayoutData(data); //image on left side of dialog if (image != null) { Label imageLabel = new Label(topContainer, SWT.NONE); data = new GridData(); data.horizontalAlignment = GridData.FILL; data.verticalAlignment = GridData.BEGINNING; data.grabExcessHorizontalSpace = false; imageLabel.setLayoutData(data); imageLabel.setImage(image); } if (item != null) { // text on the right StyledText styledText = new StyledText(topContainer, SWT.MULTI | SWT.READ_ONLY); styledText.setCaret(null); styledText.setFont(parent.getFont()); data = new GridData(); data.horizontalAlignment = GridData.FILL; data.verticalAlignment = GridData.BEGINNING; data.grabExcessHorizontalSpace = true; data.widthHint = convertWidthInCharsToPixels(ABOUT_TEXT_WIDTH); data.heightHint = convertHeightInCharsToPixels(ABOUT_TEXT_HEIGHT); styledText.setText(item.getText()); styledText.setLayoutData(data); styledText.setCursor(null); styledText.setBackground(topContainer.getBackground()); setLinkRanges(styledText, item.getLinkRanges()); addListeners(styledText); } // horizontal bar Label bar = new Label(outer, SWT.HORIZONTAL | SWT.SEPARATOR); data = new GridData(); data.horizontalAlignment = GridData.FILL; bar.setLayoutData(data); // feature images Composite featureContainer = new Composite(outer, SWT.NONE); RowLayout rowLayout = new RowLayout(); rowLayout.wrap = true; featureContainer.setLayout(rowLayout); data = new GridData(); data.horizontalAlignment = GridData.FILL; featureContainer.setLayoutData(data); Workbench workbench = (Workbench)PlatformUI.getWorkbench(); final AboutInfo[] infoArray = getFeaturesInfo(); for (int i = 0; i < infoArray.length; i++) { ImageDescriptor desc = infoArray[i].getFeatureImage(); Image image = null; if (desc != null) { Button button = new Button(featureContainer, SWT.FLAT | SWT.PUSH); button.setData(infoArray[i]); image = desc.createImage(); images.add(image); button.setImage(image); String name = infoArray[i].getFeatureLabel(); if (name == null) name = ""; button.setToolTipText(name); button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { AboutFeaturesDialog d = new AboutFeaturesDialog(getShell()); d.setInitialSelection((AboutInfo)event.widget.getData()); d.open(); } }); } } // spacer bar = new Label(outer, SWT.NONE); data = new GridData(); data.horizontalAlignment = GridData.FILL; bar.setLayoutData(data); // button composite Composite buttonComposite = new Composite(outer, SWT.NONE); // create a layout with spacing and margins appropriate for the font size. layout = new GridLayout(); layout.numColumns = 2; // this is incremented by createButton layout.makeColumnsEqualWidth = true; layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); buttonComposite.setLayout(layout); data = new GridData(); data.horizontalAlignment = GridData.BEGINNING; buttonComposite.setLayoutData(data); Button button = new Button(buttonComposite, SWT.PUSH); button.setText(WorkbenchMessages.getString("AboutDialog.featureInfo")); //$NON-NLS-1$ data = new GridData(); data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT); int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH); data.widthHint = Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x); button.setLayoutData(data); button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { new AboutFeaturesDialog(getShell()).open(); } }); button = new Button(buttonComposite, SWT.PUSH); button.setText(WorkbenchMessages.getString("AboutDialog.pluginInfo")); //$NON-NLS-1$ data = new GridData(); data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT); widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH); data.widthHint = Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x); button.setLayoutData(data); button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { new AboutPluginsDialog(getShell()).open(); } }); return outer;} | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/aad51dfaddc72e86744ea23938d289b2a66a7393/AboutDialog.java/clean/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/dialogs/AboutDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
8888,
752,
6353,
5484,
12,
9400,
982,
13,
288,
202,
2349,
6688,
273,
394,
13949,
12,
2938,
18,
588,
4236,
9334,
348,
8588,
18,
7509,
55,
916,
67,
12346,
1769,
202,
9274,
93,
6688,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
8888,
752,
6353,
5484,
12,
9400,
982,
13,
288,
202,
2349,
6688,
273,
394,
13949,
12,
2938,
18,
588,
4236,
9334,
348,
8588,
18,
7509,
55,
916,
67,
12346,
1769,
202,
9274,
93,
6688,
273,... |
runThread = Thread.currentThread(); | private void realRun() { runThread = Thread.currentThread(); // Send Accepted Message accepted = DMT.createFNPSSKAccepted(uid, pubKey == null); try { source.send(accepted, this); } catch (NotConnectedException e1) { Logger.minor(this, "Lost connection to source"); return; } if(pubKey == null) { // Wait for pub key Logger.minor(this, "Waiting for pubkey on "+uid); MessageFilter mfPK = MessageFilter.create().setType(DMT.FNPSSKPubKey).setField(DMT.UID, uid).setSource(source).setTimeout(PUBKEY_TIMEOUT); try { Message pk = node.usm.waitFor(mfPK, this); if(pk == null) { Logger.normal(this, "Failed to receive FNPSSKPubKey for "+uid); return; } byte[] pubkeyAsBytes = ((ShortBuffer)pk.getObject(DMT.PUBKEY_AS_BYTES)).getData(); try { pubKey = new DSAPublicKey(pubkeyAsBytes); Logger.minor(this, "Got pubkey on "+uid+" : "+pubKey); Message confirm = DMT.createFNPSSKPubKeyAccepted(uid); try { source.sendAsync(confirm, null, 0, this); } catch (NotConnectedException e) { Logger.minor(this, "Lost connection to source on "+uid); return; } } catch (IOException e) { Logger.error(this, "Invalid pubkey from "+source+" on "+uid); Message msg = DMT.createFNPDataInsertRejected(uid, DMT.DATA_INSERT_REJECTED_SSK_ERROR); try { source.send(msg, this); } catch (NotConnectedException ee) { // Ignore } return; } } catch (DisconnectedException e) { Logger.minor(this, "Lost connection to source on "+uid); return; } } try { key.setPubKey(pubKey); block = new SSKBlock(data, headers, key, false); } catch (SSKVerifyException e1) { Logger.error(this, "Invalid SSK from "+source, e1); Message msg = DMT.createFNPDataInsertRejected(uid, DMT.DATA_INSERT_REJECTED_SSK_ERROR); try { source.send(msg, this); } catch (NotConnectedException e) { // Ignore } return; } SSKBlock storedBlock = node.fetch(key); if((storedBlock != null) && !storedBlock.equals(block)) { Message msg = DMT.createFNPSSKDataFound(uid, storedBlock.getRawHeaders(), storedBlock.getRawData()); try { source.send(msg, this); } catch (NotConnectedException e) { Logger.minor(this, "Lost connection to source on "+uid); } block = storedBlock; } Logger.minor(this, "Got block for "+key+" for "+uid); if(htl == 0) { Message msg = DMT.createFNPInsertReply(uid); sentSuccess = true; try { source.send(msg, this); } catch (NotConnectedException e) { // Ignore } canCommit = true; finish(SSKInsertSender.SUCCESS); return; } if(htl > 0) sender = node.makeInsertSender(block, htl, uid, source, false, closestLoc, true); boolean receivedRejectedOverload = false; while(true) { synchronized(sender) { try { if(sender.getStatus() == SSKInsertSender.NOT_FINISHED) sender.wait(5000); } catch (InterruptedException e) { // Ignore } } if((!receivedRejectedOverload) && sender.receivedRejectedOverload()) { receivedRejectedOverload = true; // Forward it Message m = DMT.createFNPRejectedOverload(uid, false); try { source.send(m, this); } catch (NotConnectedException e) { Logger.minor(this, "Lost connection to source"); return; } } if(sender.hasRecentlyCollided()) { // Forward collision data = sender.getData(); headers = sender.getHeaders(); try { block = new SSKBlock(data, headers, key, true); } catch (SSKVerifyException e1) { // Is verified elsewhere... throw new Error("Impossible: "+e1); } Message msg = DMT.createFNPSSKDataFound(uid, headers, data); try { source.send(msg, this); } catch (NotConnectedException e) { Logger.minor(this, "Lost connection to source"); return; } } int status = sender.getStatus(); if(status == SSKInsertSender.NOT_FINISHED) { continue; } // Local RejectedOverload's (fatal). // Internal error counts as overload. It'd only create a timeout otherwise, which is the same thing anyway. // We *really* need a good way to deal with nodes that constantly R_O! if((status == SSKInsertSender.TIMED_OUT) || (status == SSKInsertSender.GENERATED_REJECTED_OVERLOAD) || (status == SSKInsertSender.INTERNAL_ERROR)) { Message msg = DMT.createFNPRejectedOverload(uid, true); try { source.send(msg, this); } catch (NotConnectedException e) { Logger.minor(this, "Lost connection to source"); return; } // Might as well store it anyway. if((status == SSKInsertSender.TIMED_OUT) || (status == SSKInsertSender.GENERATED_REJECTED_OVERLOAD)) canCommit = true; finish(status); return; } if((status == SSKInsertSender.ROUTE_NOT_FOUND) || (status == SSKInsertSender.ROUTE_REALLY_NOT_FOUND)) { Message msg = DMT.createFNPRouteNotFound(uid, sender.getHTL()); try { source.send(msg, null); } catch (NotConnectedException e) { Logger.minor(this, "Lost connection to source"); return; } canCommit = true; finish(status); return; } if(status == SSKInsertSender.SUCCESS) { Message msg = DMT.createFNPInsertReply(uid); sentSuccess = true; try { source.send(msg, null); } catch (NotConnectedException e) { Logger.minor(this, "Lost connection to source"); return; } canCommit = true; finish(status); return; } // Otherwise...? Logger.error(this, "Unknown status code: "+sender.getStatusString()); Message msg = DMT.createFNPRejectedOverload(uid, true); try { source.send(msg, null); } catch (NotConnectedException e) { // Ignore } finish(status); return; } } | 46731 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46731/eda25544c98825ea7f1e9ddd5c08127cd671f788/SSKInsertHandler.java/buggy/src/freenet/node/SSKInsertHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2863,
1997,
1435,
288,
8227,
368,
2479,
8662,
329,
3639,
2350,
8494,
273,
463,
6152,
18,
2640,
19793,
52,
1260,
47,
18047,
12,
1911,
16,
18659,
422,
446,
1769,
7734,
775,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2863,
1997,
1435,
288,
8227,
368,
2479,
8662,
329,
3639,
2350,
8494,
273,
463,
6152,
18,
2640,
19793,
52,
1260,
47,
18047,
12,
1911,
16,
18659,
422,
446,
1769,
7734,
775,
288,
... | |
if (enablement == null) | if (enablement == null) { | public boolean isEnabledFor(IStructuredSelection aStructuredSelection) { if (enablement == null) return false; IEvaluationContext context = null; Iterator elements = aStructuredSelection.iterator(); while (elements.hasNext()) { context = new EvaluationContext(null, elements.next()); try { if (enablement.evaluate(context) == EvaluationResult.FALSE || enablement.evaluate(context) == EvaluationResult.NOT_LOADED) return false; } catch (CoreException e) { NavigatorPlugin.log(IStatus.ERROR, 0, e.getMessage(), e); return false; } } return true; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/CommonActionProviderDescriptor.java/buggy/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/actions/CommonActionProviderDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
12047,
1290,
12,
45,
30733,
6233,
279,
30733,
6233,
13,
288,
202,
202,
430,
261,
7589,
475,
422,
446,
13,
1082,
202,
2463,
629,
31,
202,
202,
45,
13468,
1042,
819,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
12047,
1290,
12,
45,
30733,
6233,
279,
30733,
6233,
13,
288,
202,
202,
430,
261,
7589,
475,
422,
446,
13,
1082,
202,
2463,
629,
31,
202,
202,
45,
13468,
1042,
819,
273,
... |
return new scenarios.bienenstock.agenteninfo.Info(0, entfernung, false, true); | return new scenarios.bienenstock.agenteninfo.Info(0, entfernung, false, true, nutzen); | private Info konvertiereInfo(Koordinate pos, int infoX, int infoY, boolean richtungMitteilen, boolean entfernungMitteilen) { double relativX = (double) pos.gibXPosition() - (double) infoX; double relativY = (double) pos.gibYPosition() - (double) infoY; double entfernung; double richtung; double zufallsZahl = ((zufallsGenerator.nextDouble() * 2.00) - 1.00); entfernung = Math.sqrt((relativX * relativX) + (relativY * relativY)); entfernung = entfernung + (entfernung * zufallsZahl * ((Double) parameter.gibWert( "unschaerfeEntfernung")).doubleValue()); zufallsZahl = ((zufallsGenerator.nextDouble() * 2.00) - 1.00); richtung = Math.atan(relativY / relativX); richtung = richtung + (richtung * zufallsZahl * ((Double) parameter.gibWert( "unschaerfeWinkel")).doubleValue()); if (richtungMitteilen && entfernungMitteilen) { return new scenarios.bienenstock.agenteninfo.Info(richtung, entfernung, true, true); } else if (richtungMitteilen) { return new scenarios.bienenstock.agenteninfo.Info(richtung, 0, true, false); } else if (entfernungMitteilen) { return new scenarios.bienenstock.agenteninfo.Info(0, entfernung, false, true); } else { return new scenarios.bienenstock.agenteninfo.Info(0, 0, false, false); } } | 12198 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12198/65767443b3b38c2bacb742c0be2b6fe63abd73a7/Karte.java/clean/branches/eugen/source/scenarios/bienenstock/umgebung/Karte.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3807,
417,
265,
1097,
77,
822,
966,
12,
47,
83,
22454,
949,
16,
5411,
509,
1123,
60,
16,
5411,
509,
1123,
61,
16,
5411,
1250,
436,
335,
647,
20651,
49,
305,
736,
330,
275,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3807,
417,
265,
1097,
77,
822,
966,
12,
47,
83,
22454,
949,
16,
5411,
509,
1123,
60,
16,
5411,
509,
1123,
61,
16,
5411,
1250,
436,
335,
647,
20651,
49,
305,
736,
330,
275,
16,
... |
public void handleEvent(Event e) { if (!isValid()) { return; } char key = e.character; // Traverse events are handled depending on whether the // event has a character. if (e.type == SWT.Traverse) { // If the traverse event contains a legitimate character, // then we must set doit false so that the widget will // receive the key event. We return immediately so that // the character is handled only in the key event. // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=132101 if (key != 0) { e.doit = false; return; } // Traversal does not contain a character. Set doit true // to indicate TRAVERSE_NONE will occur and that no key // event will be triggered. We will check for navigation // keys below. e.detail = SWT.TRAVERSE_NONE; e.doit = true; } else { // Default is to only propagate when configured that way. // Some keys will always set doit to false anyway. e.doit = propagateKeys; } // No character. Check for navigation keys. if (key == 0) { int newSelection = proposalTable.getSelectionIndex(); int visibleRows = (proposalTable.getSize().y / proposalTable .getItemHeight()) - 1; switch (e.keyCode) { case SWT.ARROW_UP: newSelection -= 1; if (newSelection < 0) { newSelection = proposalTable.getItemCount() - 1; } // Not typical - usually we get this as a Traverse and // therefore it never propagates. Added for consistency. if (e.type == SWT.KeyDown) { // don't propagate to control e.doit = false; } break; case SWT.ARROW_DOWN: newSelection += 1; if (newSelection > proposalTable.getItemCount() - 1) { newSelection = 0; } // Not typical - usually we get this as a Traverse and // therefore it never propagates. Added for consistency. if (e.type == SWT.KeyDown) { // don't propagate to control e.doit = false; } break; case SWT.PAGE_DOWN: newSelection += visibleRows; if (newSelection >= proposalTable.getItemCount()) { newSelection = proposalTable.getItemCount() - 1; } if (e.type == SWT.KeyDown) { // don't propagate to control e.doit = false; } break; case SWT.PAGE_UP: newSelection -= visibleRows; if (newSelection < 0) { newSelection = 0; } if (e.type == SWT.KeyDown) { // don't propagate to control e.doit = false; } break; case SWT.HOME: newSelection = 0; if (e.type == SWT.KeyDown) { // don't propagate to control e.doit = false; } break; case SWT.END: newSelection = proposalTable.getItemCount() - 1; if (e.type == SWT.KeyDown) { // don't propagate to control e.doit = false; } break; // If received as a Traverse, these should propagate // to the control as keydown. If received as a keydown, // proposals should be recomputed since the cursor // position has changed. case SWT.ARROW_LEFT: case SWT.ARROW_RIGHT: if (e.type == SWT.Traverse) { e.doit = false; } else { e.doit = true; String contents = getControlContentAdapter().getControlContents( getControl()); // If there are no contents, changes in cursor position // have no effect. Note also that we do not affect the filter // text on ARROW_LEFT as we would with BS. if (contents.length() > 0) { asyncRecomputeProposals(filterText); } } break; // Any unknown keycodes will cause the popup to close. // Modifier keys are explicitly checked and ignored because // they are not complete yet (no character). default: if (e.keyCode != SWT.CAPS_LOCK && e.keyCode != SWT.MOD1 && e.keyCode != SWT.MOD2 && e.keyCode != SWT.MOD3 && e.keyCode != SWT.MOD4) { close(); } return; } // If any of these navigation events caused a new selection, // then handle that now and return. if (newSelection >= 0) { selectProposal(newSelection); } return; } // key != 0 // Check for special keys involved in cancelling, accepting, or // filtering the proposals. switch (key) { case SWT.ESC: e.doit = false; close(); break; case SWT.LF: case SWT.CR: e.doit = false; Object p = getSelectedProposal(); if (p != null) { acceptCurrentProposal(); } close(); break; case SWT.TAB: e.doit = false; getShell().setFocus(); return; case SWT.BS: // Backspace should back out of any stored filter text if (filterStyle != FILTER_NONE) { // We have no filter to back out of, so do nothing if (filterText.length() == 0) { return; } // There is filter to back out of filterText = filterText.substring(0, filterText .length() - 1); asyncRecomputeProposals(filterText); return; } // There is no filtering provided by us, but some // clients provide their own filtering based on content. // Recompute the proposals if the cursor position // will change (is not at 0). int pos = getControlContentAdapter().getCursorPosition(getControl()); // We rely on the fact that the contents and pos do not yet // reflect the result of the BS. If the contents were already empty, then BS should not cause // a recompute. if (pos > 0) { asyncRecomputeProposals(filterText); } break; default: // If the key is a defined unicode character, and not one of // the special cases processed above, update the filter text // and filter the proposals. if (Character.isDefined(key)) { if (filterStyle == FILTER_CUMULATIVE) { filterText = filterText + String.valueOf(key); } else if (filterStyle == FILTER_CHARACTER) { filterText = String.valueOf(key); } // Recompute proposals after processing this event. asyncRecomputeProposals(filterText); } break; } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/3c8429a60e5e65142c6024e843a14c5deaeb91fd/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,
225,
918,
225,
1640,
1133,
12,
1133,
225,
425,
13,
225,
288,
9506,
202,
430,
225,
16051,
26810,
10756,
225,
288,
6862,
202,
2463,
31,
9506,
202,
97,
9506,
202,
3001,
225,
498... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
918,
225,
1640,
1133,
12,
1133,
225,
425,
13,
225,
288,
9506,
202,
430,
225,
16051,
26810,
10756,
225,
288,
6862,
202,
2463,
31,
9506,
202,
97,
9506,
202,
3001,
225,
498... | ||
removeSymbol = ControlFactory.createPushButton(symbolButtonComp, CUIPlugin.getResourceString(REMOVE)); | editSymbol = ControlFactory.createPushButton(symbolButtonComp, MakeUIPlugin.getResourceString(EDIT)); editSymbol.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { editSymbolListItem(); } }); editSymbol.setEnabled(true); editSymbol.setFont(parent.getFont()); editSymbol.setLayoutData(new GridData()); SWTUtil.setButtonDimensionHint(editSymbol); removeSymbol = ControlFactory.createPushButton(symbolButtonComp, MakeUIPlugin.getResourceString(REMOVE)); | private void createSymbolListButtons(Composite parent) { // Create a composite for the buttons symbolButtonComp = ControlFactory.createComposite(parent, 1); symbolButtonComp.setFont(parent.getFont()); // Add the buttons addSymbol = ControlFactory.createPushButton(symbolButtonComp, CUIPlugin.getResourceString(NEW)); addSymbol.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleAddSymbol(); } }); addSymbol.setEnabled(true); addSymbol.setFont(parent.getFont()); addSymbol.setLayoutData(new GridData()); SWTUtil.setButtonDimensionHint(addSymbol); removeSymbol = ControlFactory.createPushButton(symbolButtonComp, CUIPlugin.getResourceString(REMOVE)); removeSymbol.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleRemoveSymbol(); } }); removeSymbol.setFont(parent.getFont()); removeSymbol.setLayoutData(new GridData()); SWTUtil.setButtonDimensionHint(removeSymbol); symbolUp = ControlFactory.createPushButton(symbolButtonComp, CUIPlugin.getResourceString(UP)); symbolUp.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleSymbolUp(); } }); symbolUp.setFont(parent.getFont()); symbolUp.setLayoutData(new GridData()); SWTUtil.setButtonDimensionHint(symbolUp); symbolDown = ControlFactory.createPushButton(symbolButtonComp, CUIPlugin.getResourceString(DOWN)); symbolDown.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleSymbolDown(); } }); symbolDown.setFont(parent.getFont()); symbolDown.setLayoutData(new GridData()); SWTUtil.setButtonDimensionHint(symbolDown); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/e7b658fd5f4d09eefb2c9fd778c040936cd69a2e/BuildPathInfoBlock.java/clean/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/BuildPathInfoBlock.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
5335,
682,
14388,
12,
9400,
982,
13,
288,
202,
202,
759,
1788,
279,
9635,
364,
326,
9502,
202,
202,
7175,
3616,
2945,
273,
8888,
1733,
18,
2640,
9400,
12,
2938,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
5335,
682,
14388,
12,
9400,
982,
13,
288,
202,
202,
759,
1788,
279,
9635,
364,
326,
9502,
202,
202,
7175,
3616,
2945,
273,
8888,
1733,
18,
2640,
9400,
12,
2938,
16,... |
int numberQuadruple = base64Data.length/FOURBYTE; byte decodedData[] = null; byte b1=0,b2=0,b3=0, b4=0, marker0=0, marker1=0; | if (base64Data == null) return null; | public static byte[] decode( byte[] base64Data ) { int numberQuadruple = base64Data.length/FOURBYTE; byte decodedData[] = null; byte b1=0,b2=0,b3=0, b4=0, marker0=0, marker1=0; // Throw away anything not in base64Data // Adjust size int encodedIndex = 0; int dataIndex = 0; decodedData = new byte[ numberQuadruple*3 + 1 ]; for (int i = 0; i<numberQuadruple; i++ ) { dataIndex = i*4; marker0 = base64Data[dataIndex +2]; marker1 = base64Data[dataIndex +3]; b1 = base64Alphabet[base64Data[dataIndex]]; b2 = base64Alphabet[base64Data[dataIndex +1]]; if ( marker0 != PAD && marker1 != PAD ) { //No PAD e.g 3cQl b3 = base64Alphabet[ marker0 ]; b4 = base64Alphabet[ marker1 ]; decodedData[encodedIndex] = (byte)( b1 <<2 | b2>>4 ) ; decodedData[encodedIndex+1] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) ); decodedData[encodedIndex+2] = (byte)( b3<<6 | b4 ); } else if ( marker0 == PAD ) { //Two PAD e.g. 3c[Pad][Pad] decodedData[encodedIndex] = (byte)( b1 <<2 | b2>>4 ) ; decodedData[encodedIndex+1] = (byte)((b2 & 0xf)<<4 ); decodedData[encodedIndex+2] = (byte) 0; } else if ( marker1 == PAD ) { //One PAD e.g. 3cQ[Pad] b3 = base64Alphabet[ marker0 ]; decodedData[encodedIndex] = (byte)( b1 <<2 | b2>>4 ); decodedData[encodedIndex+1] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) ); decodedData[encodedIndex+2] = (byte)( b3<<6); } encodedIndex += 3; } return decodedData; } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/883e3640a5fdfbff1ae8c32eabc60743dc590d6c/Base64.java/clean/src/org/apache/xerces/utils/Base64.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1160,
8526,
2495,
12,
1160,
8526,
1026,
1105,
751,
262,
288,
3639,
509,
1377,
1300,
24483,
86,
2268,
565,
273,
1026,
1105,
751,
18,
2469,
19,
3313,
1099,
15377,
31,
3639,
1160,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1160,
8526,
2495,
12,
1160,
8526,
1026,
1105,
751,
262,
288,
3639,
509,
1377,
1300,
24483,
86,
2268,
565,
273,
1026,
1105,
751,
18,
2469,
19,
3313,
1099,
15377,
31,
3639,
1160,... |
switch ( eDerivedStructuralFeatureID( eFeature ) ) | switch ( featureID ) | public void eSet( EStructuralFeature eFeature, Object newValue ) { switch ( eDerivedStructuralFeatureID( eFeature ) ) { case ComponentPackage.NEEDLE__LINE_ATTRIBUTES : setLineAttributes( (LineAttributes) newValue ); return; case ComponentPackage.NEEDLE__DECORATOR : setDecorator( (LineDecorator) newValue ); return; } eDynamicSet( eFeature, newValue ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/036e8c78765730b146e5854b9d6c397a296fed86/NeedleImpl.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/component/impl/NeedleImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
20199,
12,
512,
14372,
4595,
425,
4595,
16,
1033,
6129,
262,
202,
95,
202,
202,
9610,
261,
425,
21007,
14372,
4595,
734,
12,
425,
4595,
262,
262,
202,
202,
95,
1082,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
20199,
12,
512,
14372,
4595,
425,
4595,
16,
1033,
6129,
262,
202,
95,
202,
202,
9610,
261,
425,
21007,
14372,
4595,
734,
12,
425,
4595,
262,
262,
202,
202,
95,
1082,
202,... |
if (!getCurrentUser().isSuperAdmin() && !user.getInternal().equals( getCurrentUser() )) { | if (!getCurrentUser().isSuperAdmin() && !user.equals( getCurrentUser() )) { | void isSuperAdminOrSameUser(User user) throws NoPermissionException { if (!getCurrentUser().isSuperAdmin() && !user.getInternal().equals( getCurrentUser() )) { throw new NoPermissionException( "Must be the same user or " + RoleDomainObject.SUPERADMIN.getName() ); } } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/7f82c1b21b1bcaa6c2aa86c97aefb09ad909ec1f/SecurityChecker.java/clean/server/src/com/imcode/imcms/api/SecurityChecker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
353,
8051,
4446,
1162,
8650,
1299,
12,
1299,
729,
13,
1216,
2631,
5041,
503,
288,
3639,
309,
16051,
588,
3935,
1299,
7675,
291,
8051,
4446,
1435,
597,
401,
1355,
18,
14963,
12,
21995... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
353,
8051,
4446,
1162,
8650,
1299,
12,
1299,
729,
13,
1216,
2631,
5041,
503,
288,
3639,
309,
16051,
588,
3935,
1299,
7675,
291,
8051,
4446,
1435,
597,
401,
1355,
18,
14963,
12,
21995... |
{ return null; } | { return null; } | public Adapter createSeriesAdapter() { return null; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/bdab78403751f288b76844a99f50b999c34fb491/ComponentAdapterFactory.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/component/util/ComponentAdapterFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
14238,
752,
6485,
4216,
1435,
565,
288,
3639,
327,
446,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
14238,
752,
6485,
4216,
1435,
565,
288,
3639,
327,
446,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
this.insert_new_line_before_else_in_if_statement = false; | public void setDefaultSettings() { this.alignment_for_arguments_in_allocation_expression = Alignment.M_COMPACT_SPLIT; this.alignment_for_arguments_in_enum_constant = Alignment.M_COMPACT_SPLIT; this.alignment_for_arguments_in_explicit_constructor_call = Alignment.M_COMPACT_SPLIT; this.alignment_for_arguments_in_method_invocation = Alignment.M_COMPACT_SPLIT; this.alignment_for_arguments_in_qualified_allocation_expression = Alignment.M_COMPACT_SPLIT; this.alignment_for_assignment = Alignment.M_NO_ALIGNMENT; this.alignment_for_binary_expression = Alignment.M_COMPACT_SPLIT; this.alignment_for_compact_if = Alignment.M_ONE_PER_LINE_SPLIT | Alignment.M_INDENT_BY_ONE; this.alignment_for_conditional_expression = Alignment.M_ONE_PER_LINE_SPLIT; this.alignment_for_enum_constants = Alignment.NONE; this.alignment_for_expressions_in_array_initializer = Alignment.M_COMPACT_SPLIT; this.alignment_for_multiple_fields = Alignment.M_COMPACT_SPLIT; this.alignment_for_parameters_in_constructor_declaration = Alignment.M_COMPACT_SPLIT; this.alignment_for_parameters_in_method_declaration = Alignment.M_COMPACT_SPLIT; this.alignment_for_selector_in_method_invocation = Alignment.M_COMPACT_SPLIT; this.alignment_for_superclass_in_type_declaration = Alignment.M_NEXT_SHIFTED_SPLIT; this.alignment_for_superinterfaces_in_enum_declaration = Alignment.M_NEXT_SHIFTED_SPLIT; this.alignment_for_superinterfaces_in_type_declaration = Alignment.M_NEXT_SHIFTED_SPLIT; this.alignment_for_throws_clause_in_constructor_declaration = Alignment.M_COMPACT_SPLIT; this.alignment_for_throws_clause_in_method_declaration = Alignment.M_COMPACT_SPLIT; this.align_type_members_on_columns = false; this.brace_position_for_array_initializer = DefaultCodeFormatterConstants.END_OF_LINE; this.brace_position_for_block = DefaultCodeFormatterConstants.END_OF_LINE; this.brace_position_for_block_in_case = DefaultCodeFormatterConstants.END_OF_LINE; this.brace_position_for_constructor_declaration = DefaultCodeFormatterConstants.END_OF_LINE; this.brace_position_for_enum_constant = DefaultCodeFormatterConstants.END_OF_LINE; this.brace_position_for_enum_declaration = DefaultCodeFormatterConstants.END_OF_LINE; this.brace_position_for_method_declaration = DefaultCodeFormatterConstants.END_OF_LINE; this.brace_position_for_type_declaration = DefaultCodeFormatterConstants.END_OF_LINE; this.brace_position_for_switch = DefaultCodeFormatterConstants.END_OF_LINE;// this.comment_clear_blank_lines = false;// this.comment_format = true;// this.comment_format_header = false;// this.comment_format_html = true;// this.comment_format_source = true;// this.comment_indent_parameter_description = true;// this.comment_indent_root_tags = true;// this.comment_insert_empty_line_before_root_tags = true;// this.comment_insert_new_line_for_parameter = true;// this.comment_line_length = 80; this.continuation_indentation = 2; this.continuation_indentation_for_array_initializer = 2;// this.blank_lines_after_imports = 0;// this.blank_lines_after_package = 0;// this.blank_lines_before_field = 0;// this.blank_lines_before_first_class_body_declaration = 0;// this.blank_lines_before_imports = 0;// this.blank_lines_before_member_type = 0;// this.blank_lines_before_method = 0;// this.blank_lines_before_new_chunk = 0;// this.blank_lines_before_package = 0;// this.blank_lines_between_type_declarations = 0;// this.blank_lines_at_beginning_of_method_body = 0; this.indent_statements_compare_to_block = true; this.indent_statements_compare_to_body = true; this.indent_body_declarations_compare_to_enum_constant_header = true; this.indent_body_declarations_compare_to_enum_declaration_header = true; this.indent_body_declarations_compare_to_access_specifier = true; this.indent_breaks_compare_to_cases = true; this.indent_empty_lines = false; this.indent_switchstatements_compare_to_cases = true; this.indent_switchstatements_compare_to_switch = true; this.indentation_size = 4;// this.insert_new_line_after_opening_brace_in_array_initializer = false;// this.insert_new_line_at_end_of_file_if_missing = false;// this.insert_new_line_before_catch_in_try_statement = false;// this.insert_new_line_before_closing_brace_in_array_initializer = false;// this.insert_new_line_before_else_in_if_statement = false;// this.insert_new_line_before_finally_in_try_statement = false;// this.insert_new_line_before_while_in_do_statement = false;// this.insert_new_line_in_empty_block = true;// this.insert_new_line_in_empty_enum_constant = true;// this.insert_new_line_in_empty_enum_declaration = true;// this.insert_new_line_in_empty_method_body = true;// this.insert_new_line_in_empty_type_declaration = true;// this.insert_space_after_and_in_type_parameter = true;// this.insert_space_after_assignment_operator = true;// this.insert_space_after_binary_operator = true;// this.insert_space_after_closing_angle_bracket_in_type_arguments = true;// this.insert_space_after_closing_angle_bracket_in_type_parameters = true;// this.insert_space_after_closing_paren_in_cast = true;// this.insert_space_after_closing_brace_in_block = true;// this.insert_space_after_colon_in_assert = true;// this.insert_space_after_colon_in_case = true;// this.insert_space_after_colon_in_conditional = true;// this.insert_space_after_colon_in_for = true;// this.insert_space_after_colon_in_labeled_statement = true;// this.insert_space_after_comma_in_allocation_expression = true;// this.insert_space_after_comma_in_array_initializer = true;// this.insert_space_after_comma_in_constructor_declaration_parameters = true;// this.insert_space_after_comma_in_constructor_declaration_throws = true;// this.insert_space_after_comma_in_enum_constant_arguments = true;// this.insert_space_after_comma_in_enum_declarations = true;// this.insert_space_after_comma_in_explicit_constructor_call_arguments = true;// this.insert_space_after_comma_in_for_increments = true;// this.insert_space_after_comma_in_for_inits = true;// this.insert_space_after_comma_in_method_invocation_arguments = true;// this.insert_space_after_comma_in_method_declaration_parameters = true;// this.insert_space_after_comma_in_method_declaration_throws = true;// this.insert_space_after_comma_in_multiple_field_declarations = true;// this.insert_space_after_comma_in_multiple_local_declarations = true;// this.insert_space_after_comma_in_parameterized_type_reference = true;// this.insert_space_after_comma_in_superinterfaces = true;// this.insert_space_after_comma_in_type_arguments = true;// this.insert_space_after_comma_in_type_parameters = true;// this.insert_space_after_ellipsis = true;// this.insert_space_after_opening_angle_bracket_in_parameterized_type_reference = false;// this.insert_space_after_opening_angle_bracket_in_type_arguments = false;// this.insert_space_after_opening_angle_bracket_in_type_parameters = false;// this.insert_space_after_opening_bracket_in_array_allocation_expression = false;// this.insert_space_after_opening_bracket_in_array_reference = false;// this.insert_space_after_opening_brace_in_array_initializer = false;// this.insert_space_after_opening_paren_in_cast = false;// this.insert_space_after_opening_paren_in_catch = false;// this.insert_space_after_opening_paren_in_constructor_declaration = false;// this.insert_space_after_opening_paren_in_enum_constant = false;// this.insert_space_after_opening_paren_in_for = false;// this.insert_space_after_opening_paren_in_if = false;// this.insert_space_after_opening_paren_in_method_declaration = false;// this.insert_space_after_opening_paren_in_method_invocation = false;// this.insert_space_after_opening_paren_in_parenthesized_expression = false;// this.insert_space_after_opening_paren_in_switch = false;// this.insert_space_after_opening_paren_in_synchronized = false;// this.insert_space_after_opening_paren_in_while = false;// this.insert_space_after_postfix_operator = false;// this.insert_space_after_prefix_operator = false;// this.insert_space_after_question_in_conditional = true;// this.insert_space_after_question_in_wilcard = false;// this.insert_space_after_semicolon_in_for = true;// this.insert_space_after_unary_operator = false;// this.insert_space_before_and_in_type_parameter = true;// this.insert_space_before_assignment_operator = true;// this.insert_space_before_binary_operator = true;// this.insert_space_before_closing_angle_bracket_in_parameterized_type_reference = false;// this.insert_space_before_closing_angle_bracket_in_type_arguments = false;// this.insert_space_before_closing_angle_bracket_in_type_parameters = false;// this.insert_space_before_closing_brace_in_array_initializer = false;// this.insert_space_before_closing_bracket_in_array_allocation_expression = false;// this.insert_space_before_closing_bracket_in_array_reference = false;// this.insert_space_before_closing_paren_in_cast = false;// this.insert_space_before_closing_paren_in_catch = false;// this.insert_space_before_closing_paren_in_constructor_declaration = false;// this.insert_space_before_closing_paren_in_enum_constant = false;// this.insert_space_before_closing_paren_in_for = false;// this.insert_space_before_closing_paren_in_if = false;// this.insert_space_before_closing_paren_in_method_declaration = false;// this.insert_space_before_closing_paren_in_method_invocation = false;// this.insert_space_before_closing_paren_in_parenthesized_expression = false;// this.insert_space_before_closing_paren_in_switch = false;// this.insert_space_before_closing_paren_in_synchronized = false;// this.insert_space_before_closing_paren_in_while = false;// this.insert_space_before_colon_in_assert = true;// this.insert_space_before_colon_in_case = true;// this.insert_space_before_colon_in_conditional = true;// this.insert_space_before_colon_in_default = true;// this.insert_space_before_colon_in_for = true;// this.insert_space_before_colon_in_labeled_statement = true;// this.insert_space_before_comma_in_allocation_expression = false;// this.insert_space_before_comma_in_array_initializer = false;// this.insert_space_before_comma_in_constructor_declaration_parameters = false;// this.insert_space_before_comma_in_constructor_declaration_throws = false;// this.insert_space_before_comma_in_enum_constant_arguments = false;// this.insert_space_before_comma_in_enum_declarations = false;// this.insert_space_before_comma_in_explicit_constructor_call_arguments = false;// this.insert_space_before_comma_in_for_increments = false;// this.insert_space_before_comma_in_for_inits = false;// this.insert_space_before_comma_in_method_invocation_arguments = false;// this.insert_space_before_comma_in_method_declaration_parameters = false;// this.insert_space_before_comma_in_method_declaration_throws = false;// this.insert_space_before_comma_in_multiple_field_declarations = false;// this.insert_space_before_comma_in_multiple_local_declarations = false;// this.insert_space_before_comma_in_parameterized_type_reference = false;// this.insert_space_before_comma_in_superinterfaces = false;// this.insert_space_before_comma_in_type_arguments = false;// this.insert_space_before_comma_in_type_parameters = false;// this.insert_space_before_ellipsis = false;// this.insert_space_before_parenthesized_expression_in_return = true;// this.insert_space_before_opening_angle_bracket_in_parameterized_type_reference = false;// this.insert_space_before_opening_angle_bracket_in_type_arguments = false;// this.insert_space_before_opening_angle_bracket_in_type_parameters = false;// this.insert_space_before_opening_brace_in_array_initializer = false;// this.insert_space_before_opening_brace_in_block = true;// this.insert_space_before_opening_brace_in_constructor_declaration = true;// this.insert_space_before_opening_brace_in_enum_constant = true;// this.insert_space_before_opening_brace_in_enum_declaration = true;// this.insert_space_before_opening_brace_in_method_declaration = true;// this.insert_space_before_opening_brace_in_switch = true;// this.insert_space_before_opening_brace_in_type_declaration = true;// this.insert_space_before_opening_bracket_in_array_allocation_expression = false;// this.insert_space_before_opening_bracket_in_array_reference = false;// this.insert_space_before_opening_bracket_in_array_type_reference = false;// this.insert_space_before_opening_paren_in_catch = true;// this.insert_space_before_opening_paren_in_constructor_declaration = false;// this.insert_space_before_opening_paren_in_enum_constant = false;// this.insert_space_before_opening_paren_in_for = true;// this.insert_space_before_opening_paren_in_if = true;// this.insert_space_before_opening_paren_in_method_invocation = false;// this.insert_space_before_opening_paren_in_method_declaration = false;// this.insert_space_before_opening_paren_in_switch = true;// this.insert_space_before_opening_paren_in_synchronized = true;// this.insert_space_before_opening_paren_in_parenthesized_expression = false;// this.insert_space_before_opening_paren_in_while = true;// this.insert_space_before_postfix_operator = false;// this.insert_space_before_prefix_operator = false;// this.insert_space_before_question_in_conditional = true;// this.insert_space_before_question_in_wilcard = false;// this.insert_space_before_semicolon = false;// this.insert_space_before_semicolon_in_for = false;// this.insert_space_before_unary_operator = false;// this.insert_space_between_brackets_in_array_type_reference = false;// this.insert_space_between_empty_braces_in_array_initializer = false;// this.insert_space_between_empty_brackets_in_array_allocation_expression = false;// this.insert_space_between_empty_parens_in_constructor_declaration = false;// this.insert_space_between_empty_parens_in_enum_constant = false;// this.insert_space_between_empty_parens_in_method_declaration = false;// this.insert_space_between_empty_parens_in_method_invocation = false;// this.compact_else_if = true;// this.keep_guardian_clause_on_one_line = false;// this.keep_else_statement_on_same_line = false;// this.keep_empty_array_initializer_on_one_line = false;// this.keep_simple_if_on_one_line = false;// this.keep_then_statement_on_same_line = false;// this.number_of_empty_lines_to_preserve = 1;// this.put_empty_statement_on_new_line = false; this.tab_size = 4; this.page_width = 80; this.tab_char = TAB; // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=49081 this.use_tabs_only_for_leading_indentations = false; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/12f3dd59c579048e11942c9768bb3f6c6a45e156/DefaultCodeFormatterOptions.java/clean/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/DefaultCodeFormatterOptions.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
84,
440,
933,
76,
291,
18,
6387,
67,
2704,
67,
1369,
67,
5771,
67,
12107,
67,
267,
67,
430,
67,
11516,
273,
629,
31,
918,
2211,
18,
6387,
67,
2704,
67,
1369,
67,
5771,
67,
1210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
84,
440,
933,
76,
291,
18,
6387,
67,
2704,
67,
1369,
67,
5771,
67,
12107,
67,
267,
67,
430,
67,
11516,
273,
629,
31,
918,
2211,
18,
6387,
67,
2704,
67,
1369,
67,
5771,
67,
1210... | |
while(ipIter.hasNext()) { String ip = (String)ipIter.next(); IPEntry ipEntry = (IPEntry)ipLookupTable.get(ip); | while (ipIter.hasNext()) { String ip = (String) ipIter.next(); IPEntry ipEntry = (IPEntry) ipLookupTable.get(ip); | public void discoverDomains(Map ipLookupTable) { Iterator ipIter = getUniqueIPList().keySet().iterator(); while(ipIter.hasNext()) { String ip = (String)ipIter.next(); IPEntry ipEntry = (IPEntry)ipLookupTable.get(ip); if (ipEntry == null) { ipEntry = IPEntry.getIPEntry(ip); ipLookupTable.put(ip, ipEntry); } addDomain(ipEntry.getDomain()); } } | 8719 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8719/efb83d08bf3214ba362adb9486345c128a00bae7/IPTable.java/clean/usage/java/reports/source/src/org/globus/usage/report/common/IPTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
10372,
15531,
12,
863,
2359,
6609,
1388,
13,
288,
3639,
4498,
2359,
2360,
273,
16076,
2579,
682,
7675,
856,
694,
7675,
9838,
5621,
3639,
1323,
12,
625,
2360,
18,
5332,
2134,
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,
918,
10372,
15531,
12,
863,
2359,
6609,
1388,
13,
288,
3639,
4498,
2359,
2360,
273,
16076,
2579,
682,
7675,
856,
694,
7675,
9838,
5621,
3639,
1323,
12,
625,
2360,
18,
5332,
2134,
10... |
public org.quickfix.field.UnderlyingInstrRegistry getUnderlyingInstrRegistry() throws FieldNotFound { org.quickfix.field.UnderlyingInstrRegistry value = new org.quickfix.field.UnderlyingInstrRegistry(); | public quickfix.field.UnderlyingInstrRegistry getUnderlyingInstrRegistry() throws FieldNotFound { quickfix.field.UnderlyingInstrRegistry value = new quickfix.field.UnderlyingInstrRegistry(); | public org.quickfix.field.UnderlyingInstrRegistry getUnderlyingInstrRegistry() throws FieldNotFound { org.quickfix.field.UnderlyingInstrRegistry value = new org.quickfix.field.UnderlyingInstrRegistry(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/AllocationReport.java/clean/src/java/src/quickfix/fix44/AllocationReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
382,
701,
4243,
10833,
765,
6291,
382,
701,
4243,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
382,
701,
4243,
10833,
765,
6291,
382,
701,
4243,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,... |
readRepositoryClient(elements[j]); | readRepositoryConnector(elements[j]); | public static void initExtensions(TaskListWriter writer) { List<ITaskListExternalizer> externalizers = new ArrayList<ITaskListExternalizer>(); if (!extensionsRead) { IExtensionRegistry registry = Platform.getExtensionRegistry(); // HACK: has to be read first IExtensionPoint repositoriesExtensionPoint = registry.getExtensionPoint(EXTENSION_REPOSITORIES); IExtension[] repositoryExtensions = repositoriesExtensionPoint.getExtensions(); for (int i = 0; i < repositoryExtensions.length; i++) { IConfigurationElement[] elements = repositoryExtensions[i].getConfigurationElements(); for (int j = 0; j < elements.length; j++) { if (elements[j].getName().equals(ELMNT_REPOSITORY_TYPE)) { readRepositoryClient(elements[j]); } else if (elements[j].getName().equals(ELMNT_EXTERNALIZER)) { readExternalizer(elements[j], externalizers); } } } IExtensionPoint extensionPoint = registry.getExtensionPoint(EXTENSION_TASK_CONTRIBUTOR); IExtension[] extensions = extensionPoint.getExtensions(); for (int i = 0; i < extensions.length; i++) { IConfigurationElement[] elements = extensions[i].getConfigurationElements(); for (int j = 0; j < elements.length; j++) { // if (elements[j].getName().compareTo(ELMNT_TASK_HANDLER) // == 0) { // readExternalizer(elements[j], externalizers); // } else if (elements[j].getName().equals(DYNAMIC_POPUP_ELEMENT)) { readDynamicPopupContributor(elements[j]); } } } IExtensionPoint templatesExtensionPoint = registry.getExtensionPoint(EXTENSION_TEMPLATES); IExtension[] templateExtensions = templatesExtensionPoint.getExtensions(); for (int i = 0; i < templateExtensions.length; i++) { IConfigurationElement[] elements = templateExtensions[i].getConfigurationElements(); for (int j = 0; j < elements.length; j++) { if (elements[j].getName().equals(EXTENSION_TMPL_REPOSITORY)) { readRepositoryTemplate(elements[j]); } } } // for (int i = 0; i < extensions.length; i++) { // IConfigurationElement[] elements = // extensions[i].getConfigurationElements(); // for (int j = 0; j < elements.length; j++) { // if (elements[j].getName().compareTo(ELMNT_REPOSITORY_CLIENT) == // 0) { // readRepositoryClient(elements[j]); // } // } // } IExtensionPoint editorsExtensionPoint = registry.getExtensionPoint(EXTENSION_EDITORS); IExtension[] editors = editorsExtensionPoint.getExtensions(); for (int i = 0; i < editors.length; i++) { IConfigurationElement[] elements = editors[i].getConfigurationElements(); for (int j = 0; j < elements.length; j++) { if (elements[j].getName().equals(ELMNT_EDITOR_FACTORY)) { readEditorFactory(elements[j]); // } else if // (elements[j].getName().equals(ELMNT_HYPERLINK_LISTENER)) // { // readHyperlinkListener(elements[j]); } else if (elements[j].getName().equals(ELMNT_HYPERLINK_DETECTOR)) { readHyperlinkDetector(elements[j]); } } } writer.setDelegateExternalizers(externalizers); extensionsRead = true; } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/72d80f551ca060c2734122d72e119e0cdf881f12/TasksUiExtensionReader.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
1208,
7513,
12,
2174,
682,
2289,
2633,
13,
288,
202,
202,
682,
32,
1285,
835,
682,
6841,
1824,
34,
3903,
8426,
273,
394,
2407,
32,
1285,
835,
682,
6841,
1824,
34,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
1208,
7513,
12,
2174,
682,
2289,
2633,
13,
288,
202,
202,
682,
32,
1285,
835,
682,
6841,
1824,
34,
3903,
8426,
273,
394,
2407,
32,
1285,
835,
682,
6841,
1824,
34,
... |
nextEnd.add(Calendar.WEEK_OF_YEAR, 1); | nextEnd.add(Calendar.WEEK_OF_YEAR, NUM_WEEKS_NEXT); | private void setupCalendarRanges() { // Current week GregorianCalendar currentBegin = new GregorianCalendar(); Date startTime = new Date(); currentBegin.setTime(startTime); snapToStartOfWeek(currentBegin); GregorianCalendar currentEnd = new GregorianCalendar(); snapToEndOfWeek(currentEnd); thisWeek = new DateRangeContainer(currentBegin, currentEnd, DESCRIPTION_THIS_WEEK); dateRangeContainers.add(thisWeek); GregorianCalendar previousStart = new GregorianCalendar(); previousStart.setTime(new Date()); previousStart.add(Calendar.WEEK_OF_YEAR, -1); snapToStartOfWeek(previousStart); GregorianCalendar previousEnd = new GregorianCalendar(); previousEnd.setTime(new Date()); previousEnd.add(Calendar.WEEK_OF_YEAR, -1); snapToEndOfWeek(previousEnd); dateRangeContainers.add(new DateRangeContainer(previousStart.getTime(), previousEnd.getTime(), DESCRIPTION_PREVIOUS_WEEK)); GregorianCalendar nextStart = new GregorianCalendar(); nextStart.setTime(new Date()); nextStart.add(Calendar.WEEK_OF_YEAR, 1); snapToStartOfWeek(nextStart); GregorianCalendar nextEnd = new GregorianCalendar(); nextEnd.setTime(new Date()); nextEnd.add(Calendar.WEEK_OF_YEAR, 1); snapToEndOfWeek(nextEnd); dateRangeContainers.add(new DateRangeContainer(nextStart.getTime(), nextEnd.getTime(), DESCRIPTION_NEXT_WEEK)); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/c29c23c636bb639b7e8cc579bace87394392644a/TaskListManager.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/provisional/tasklist/TaskListManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3875,
7335,
9932,
1435,
288,
202,
202,
759,
6562,
4860,
202,
202,
31560,
7335,
783,
8149,
273,
394,
28033,
5621,
202,
202,
1626,
8657,
273,
394,
2167,
5621,
202,
202,
2972... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3875,
7335,
9932,
1435,
288,
202,
202,
759,
6562,
4860,
202,
202,
31560,
7335,
783,
8149,
273,
394,
28033,
5621,
202,
202,
1626,
8657,
273,
394,
2167,
5621,
202,
202,
2972... |
public org.quickfix.field.CollAction getCollAction() throws FieldNotFound { org.quickfix.field.CollAction value = new org.quickfix.field.CollAction(); | public quickfix.field.CollAction getCollAction() throws FieldNotFound { quickfix.field.CollAction value = new quickfix.field.CollAction(); | public org.quickfix.field.CollAction getCollAction() throws FieldNotFound { org.quickfix.field.CollAction value = new org.quickfix.field.CollAction(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/CollateralAssignment.java/buggy/src/java/src/quickfix/fix44/CollateralAssignment.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
13535,
1803,
336,
13535,
1803,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
13535,
1803,
460,
273,
394,
2358,
18,
19525,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
13535,
1803,
336,
13535,
1803,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
13535,
1803,
460,
273,
394,
2358,
18,
19525,... |
|| DesignChoiceConstants.MAP_OPERATOR_LIKE.equals( operatorValue ) ) | || DesignChoiceConstants.MAP_OPERATOR_LIKE .equals( operatorValue ) ) | public static int determineValueVisible( String operatorValue ) { if ( DesignChoiceConstants.MAP_OPERATOR_ANY.equals( operatorValue ) || DesignChoiceConstants.MAP_OPERATOR_FALSE.equals( operatorValue ) || DesignChoiceConstants.MAP_OPERATOR_TRUE.equals( operatorValue ) || DesignChoiceConstants.MAP_OPERATOR_NULL.equals( operatorValue ) || DesignChoiceConstants.MAP_OPERATOR_NOT_NULL.equals( operatorValue ) ) { return 0; } else if ( DesignChoiceConstants.MAP_OPERATOR_LT.equals( operatorValue ) || DesignChoiceConstants.MAP_OPERATOR_LE.equals( operatorValue ) || DesignChoiceConstants.MAP_OPERATOR_EQ.equals( operatorValue ) || DesignChoiceConstants.MAP_OPERATOR_NE.equals( operatorValue ) || DesignChoiceConstants.MAP_OPERATOR_GE.equals( operatorValue ) || DesignChoiceConstants.MAP_OPERATOR_GT.equals( operatorValue ) || DesignChoiceConstants.MAP_OPERATOR_LIKE.equals( operatorValue ) ) { return 1; } else if ( DesignChoiceConstants.MAP_OPERATOR_BETWEEN.equals( operatorValue ) || DesignChoiceConstants.MAP_OPERATOR_NOT_BETWEEN.equals( operatorValue ) ) { return 2; } return 1; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/0259bf7e90fb00d8350d4373f648a82b62d3ecd5/MapRuleBuilder.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/MapRuleBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
509,
4199,
620,
6207,
12,
514,
3726,
620,
262,
202,
95,
202,
202,
430,
261,
29703,
10538,
2918,
18,
8352,
67,
26110,
67,
15409,
18,
14963,
12,
3726,
620,
262,
9506,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
509,
4199,
620,
6207,
12,
514,
3726,
620,
262,
202,
95,
202,
202,
430,
261,
29703,
10538,
2918,
18,
8352,
67,
26110,
67,
15409,
18,
14963,
12,
3726,
620,
262,
9506,
202,
... |
static OPT_Operand getTIB (OPT_Instruction s, OPT_IR ir, OPT_TypeOperand type) { VM_Type t = type.getVMType(); if (VM.BuildForIA32 && !MM_Interface.MOVES_TIBS && VM.runningVM && t != null && t.isResolved()) { Address addr = VM_Magic.objectAsAddress(t.getTypeInformationBlock()); return new OPT_AddressConstantOperand(addr); } else { OPT_RegisterOperand res = ir.regpool.makeTemp(VM_TypeReference.JavaLangObjectArray); s.insertBack(Unary.create(GET_CLASS_TIB, res, type)); return res.copyD2U(); } | static OPT_RegisterOperand getTIB (OPT_Instruction s, OPT_IR ir, OPT_Operand obj, OPT_Operand guard) { OPT_RegisterOperand res = ir.regpool.makeTemp(VM_TypeReference.JavaLangObjectArray); OPT_Instruction s2 = GuardedUnary.create(GET_OBJ_TIB, res, obj, guard); s.insertBack(s2); return res.copyD2U(); | static OPT_Operand getTIB (OPT_Instruction s, OPT_IR ir, OPT_TypeOperand type) { VM_Type t = type.getVMType(); if (VM.BuildForIA32 && !MM_Interface.MOVES_TIBS && VM.runningVM && t != null && t.isResolved()) { Address addr = VM_Magic.objectAsAddress(t.getTypeInformationBlock()); return new OPT_AddressConstantOperand(addr); } else { OPT_RegisterOperand res = ir.regpool.makeTemp(VM_TypeReference.JavaLangObjectArray); s.insertBack(Unary.create(GET_CLASS_TIB, res, type)); return res.copyD2U(); } } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/4c73853a2c4e63df89a0f88c960b730836a00cca/OPT_ConvertToLowLevelIR.java/buggy/rvm/src/vm/compilers/optimizing/ir/conversions/hir2lir/OPT_ConvertToLowLevelIR.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
16456,
67,
10265,
3181,
13450,
261,
15620,
67,
11983,
272,
16,
16456,
67,
7937,
9482,
16,
17311,
16456,
67,
559,
10265,
618,
13,
288,
565,
8251,
67,
559,
268,
273,
618,
18,
588,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
16456,
67,
10265,
3181,
13450,
261,
15620,
67,
11983,
272,
16,
16456,
67,
7937,
9482,
16,
17311,
16456,
67,
559,
10265,
618,
13,
288,
565,
8251,
67,
559,
268,
273,
618,
18,
588,
73... |
generateReturnResult(cfw, retType); | generateReturnResult(cfw, returnType); | private static void generateMethod(ClassFileWriter cfw, String genName, String methodName, Class[] parms, Class returnType) { StringBuffer sb = new StringBuffer(); sb.append('('); short arrayLocal = 1; // includes this. for (int i = 0; i < parms.length; i++) { Class type = parms[i]; appendTypeString(sb, type); if (type.equals(Long.TYPE) || type.equals(Double.TYPE)) arrayLocal += 2; else arrayLocal += 1; } sb.append(')'); appendTypeString(sb, returnType); String methodSignature = sb.toString(); // System.out.println("generating " + m.getName() + methodSignature); // System.out.flush(); cfw.startMethod(methodName, methodSignature, ClassFileWriter.ACC_PUBLIC); cfw.add(ByteCode.BIPUSH, (byte) parms.length); // > 255 parms? cfw.add(ByteCode.ANEWARRAY, "java/lang/Object"); cfw.add(ByteCode.ASTORE, arrayLocal); // allocate a local variable to store the scope used to wrap native objects. short scopeLocal = (short) (arrayLocal + 1); boolean loadedScope = false; int paramOffset = 1; for (int i = 0; i < parms.length; i++) { cfw.add(ByteCode.ALOAD, arrayLocal); cfw.add(ByteCode.BIPUSH, i); if (parms[i].isPrimitive()) { paramOffset = generateWrapParam(cfw, paramOffset, parms[i]); } else { // An arbitary Java object; call Context.toObject to wrap in // a Scriptable object cfw.add(ByteCode.ALOAD, paramOffset++); if (! loadedScope) { // load this.self into a local the first time it's needed. // it will provide the scope needed by Context.toObject(). cfw.add(ByteCode.ALOAD_0); cfw.add(ByteCode.GETFIELD, genName, "self", "Lorg/mozilla/javascript/Scriptable;"); cfw.add(ByteCode.ASTORE, scopeLocal); loadedScope = true; } cfw.add(ByteCode.ALOAD, scopeLocal); // Get argument Class cfw.addLoadConstant(parms[i].getName()); cfw.add(ByteCode.INVOKESTATIC, "org/mozilla/javascript/ScriptRuntime", "loadClassName", "(Ljava/lang/String;)", "Ljava/lang/Class;"); cfw.add(ByteCode.INVOKESTATIC, "org/mozilla/javascript/JavaAdapter", "toObject", "(Ljava/lang/Object;" + "Lorg/mozilla/javascript/Scriptable;" + "Ljava/lang/Class;)", "Lorg/mozilla/javascript/Scriptable;"); } cfw.add(ByteCode.AASTORE); } cfw.add(ByteCode.ALOAD_0); // this cfw.add(ByteCode.GETFIELD, genName, "self", "Lorg/mozilla/javascript/Scriptable;"); cfw.addLoadConstant(methodName); cfw.add(ByteCode.ALOAD, arrayLocal); // go through utility method, which creates a Context to run the // method in. cfw.add(ByteCode.INVOKESTATIC, "org/mozilla/javascript/JavaAdapter", "callMethod", "(Lorg/mozilla/javascript/Scriptable;" + "Ljava/lang/String;[Ljava/lang/Object;)", "Ljava/lang/Object;"); Class retType = returnType; if (retType.equals(Void.TYPE)) { cfw.add(ByteCode.POP); cfw.add(ByteCode.RETURN); } else { generateReturnResult(cfw, retType); } cfw.stopMethod((short)(scopeLocal + 1), null); } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/561cf27d9800e6f27583c1f2241f29d0ace7e910/JavaAdapter.java/clean/js/rhino/org/mozilla/javascript/JavaAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
2103,
1305,
12,
797,
812,
2289,
6080,
91,
16,
514,
3157,
461,
16,
4766,
3639,
514,
4918,
16,
1659,
8526,
17902,
16,
4766,
4202,
1659,
9424,
13,
377,
288,
3639,
6674,
239... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
2103,
1305,
12,
797,
812,
2289,
6080,
91,
16,
514,
3157,
461,
16,
4766,
3639,
514,
4918,
16,
1659,
8526,
17902,
16,
4766,
4202,
1659,
9424,
13,
377,
288,
3639,
6674,
239... |
public void testIntegerOps() throws ExceptionReturnedException { Pair[] cases = new Pair[] {// // plus// Pair.make("5+6", new Integer(5 + 6)),// // minus// Pair.make("6-5", new Integer(6 - 5)),// // times// Pair.make("6*5", new Integer(6*5)),// // divide// Pair.make("6/5", new Integer(6/5)),// // modulo// Pair.make("6%5", new Integer(6%5)),// // bit and// Pair.make("6&5", new Integer(6 & 5)),// // bit or// Pair.make("6 | 5", new Integer(6 | 5)),// // bit xor// Pair.make("6^5", new Integer(6 ^ 5)),// // bit complement// Pair.make("~6", new Integer(~6)), // unary plus// Pair.make("+5", new Integer(+5)),// // unary minus// Pair.make("-5", new Integer(-5)), // left shift Pair.make("400 << 5", new Integer(400 << 5)), // right shift Pair.make("400 >> 5", new Integer(400 >> 5)), // unsigned right shift Pair.make("400 >>> 5", new Integer(400 >>> 5)),// // less than// Pair.make("5 < 4", new Boolean(5 < 4)),// // less than or equal to// Pair.make("4 <= 4", new Boolean(4 <= 4)), Pair.make("4 <= 5", new Boolean(4 <= 5)),// // greater than// Pair.make("5 > 4", new Boolean(5 > 4)), Pair.make("5 > 5", new Boolean(5 > 5)),// // greater than or equal to// Pair.make("5 >= 4", new Boolean(5 >= 4)), Pair.make("5 >= 5", new Boolean(5 >= 5)),// // equal to// Pair.make("5 == 5", new Boolean(5 == 5)), Pair.make("5 == 6", new Boolean(// 5 == 6)),// // not equal to Pair.make("5 != 6", new Boolean(5 != 6)), Pair.make("5 != 5", new Boolean( 5 != 5)) }; tester(cases); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/555a52426e0b7a46bbe7591ec5d5d45d18885291/JavaInterpreterTest.java/clean/drjava/src/edu/rice/cs/drjava/model/repl/JavaInterpreterTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
4522,
8132,
1435,
1216,
1185,
22360,
503,
288,
565,
8599,
8526,
6088,
273,
394,
8599,
8526,
288,
759,
1377,
368,
8737,
759,
1377,
8599,
18,
6540,
2932,
25,
15,
26,
3113,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
4522,
8132,
1435,
1216,
1185,
22360,
503,
288,
565,
8599,
8526,
6088,
273,
394,
8599,
8526,
288,
759,
1377,
368,
8737,
759,
1377,
8599,
18,
6540,
2932,
25,
15,
26,
3113,
... | ||
try { setOnmousedown((String) evalAttr("onmousedown", getOnmousedownExpr(), String.class)); } catch (NullAttributeException ex) { } | if ((string = EvalHelper.evalString("onkeyup", getOnkeyupExpr(), this, pageContext)) != null) setOnkeyup(string); | private void evaluateExpressions() throws JspException { try { setAccesskey((String) evalAttr("accessKey", getAccesskeyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setAlt((String) evalAttr("alt", getAltExpr(), String.class)); } catch (NullAttributeException ex) { } try { setAltKey((String) evalAttr("altKey", getAltKeyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { } try { setIndexed(((Boolean) evalAttr("indexed", getIndexedExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { } try { setOnblur((String) evalAttr("onblur", getOnblurExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnchange((String) evalAttr("onchange", getOnchangeExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnclick((String) evalAttr("onclick", getOnclickExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOndblclick((String) evalAttr("ondblclick", getOndblclickExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnfocus((String) evalAttr("onfocus", getOnfocusExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeydown((String) evalAttr("onkeydown", getOnkeydownExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeypress((String) evalAttr("onkeypress", getOnkeypressExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeyup((String) evalAttr("onkeyup", getOnkeyupExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmousedown((String) evalAttr("onmousedown", getOnmousedownExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmousemove((String) evalAttr("onmousemove", getOnmousemoveExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseout((String) evalAttr("onmouseout", getOnmouseoutExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseover((String) evalAttr("onmouseover", getOnmouseoverExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseup((String) evalAttr("onmouseup", getOnmouseupExpr(), String.class)); } catch (NullAttributeException ex) { } try { setProperty((String) evalAttr("property", getPropertyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyle((String) evalAttr("style", getStyleExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyleClass((String) evalAttr("styleClass", getStyleClassExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyleId((String) evalAttr("styleId", getStyleIdExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTabindex((String) evalAttr("tabindex", getTabindexExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTitle((String) evalAttr("title", getTitleExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTitleKey((String) evalAttr("titleKey", getTitleKeyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setValue((String) evalAttr("value", getValueExpr(), String.class)); } catch (NullAttributeException ex) { } } | 54704 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54704/022bd23c954cf673e53731849d562b3c295473f1/ELButtonTag.java/buggy/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELButtonTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
1862,
856,
12443,
780,
13,
5302,
3843,
2932,
3860,
653,
3113,
21909,
856,
4742,
9334,
4766,
6647,
514,
18,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
1862,
856,
12443,
780,
13,
5302,
3843,
2932,
3860,
653,
3113,
21909,
856,
4742,
9334,
4766,
6647,
514,
18,
1106,
... |
/*@bgen(jjtree) EnumDeclaration */ ASTEnumDeclaration jjtn000 = new ASTEnumDeclaration(this, JJTENUMDECLARATION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); Token t; try { label_6: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case FINAL: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: ; break; default: jj_la1[13] = jj_gen; break label_6; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case PUBLIC: jj_consume_token(PUBLIC); jjtn000.setPublic(); break; case PROTECTED: jj_consume_token(PROTECTED); jjtn000.setProtected(); break; case PRIVATE: jj_consume_token(PRIVATE); jjtn000.setPrivate(); break; case STATIC: jj_consume_token(STATIC); jjtn000.setStatic(); break; case FINAL: jj_consume_token(FINAL); jjtn000.setFinal(); break; default: jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } t = jj_consume_token(IDENTIFIER); if (!t.image.equals("enum")) { { if (true) throw new ParseException("ERROR: expecting enum"); } } if (!this.isJDK15) { { if (true) throw new ParseException("ERROR: Can't use enum as a keyword in pre-JDK 1.5 target"); } } jj_consume_token(IDENTIFIER); jj_consume_token(LBRACE); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IMPLEMENTS: jj_consume_token(IMPLEMENTS); NameList(); break; default: jj_la1[15] = jj_gen; ; } EnumElement(); label_7: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: ; break; default: jj_la1[16] = jj_gen; break label_7; } jj_consume_token(COMMA); EnumElement(); } jj_consume_token(RBRACE); jj_consume_token(SEMICOLON); } 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); } | /*@bgen(jjtree) EnumDeclaration */ ASTEnumDeclaration jjtn000 = new ASTEnumDeclaration(this, JJTENUMDECLARATION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);Token t; try { label_6: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FINAL: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: ; break; default: jj_la1[13] = jj_gen; break label_6; | final public void EnumDeclaration() throws ParseException { /*@bgen(jjtree) EnumDeclaration */ ASTEnumDeclaration jjtn000 = new ASTEnumDeclaration(this, JJTENUMDECLARATION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); Token t; try { label_6: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case FINAL: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: ; break; default: jj_la1[13] = jj_gen; break label_6; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case PUBLIC: jj_consume_token(PUBLIC); jjtn000.setPublic(); break; case PROTECTED: jj_consume_token(PROTECTED); jjtn000.setProtected(); break; case PRIVATE: jj_consume_token(PRIVATE); jjtn000.setPrivate(); break; case STATIC: jj_consume_token(STATIC); jjtn000.setStatic(); break; case FINAL: jj_consume_token(FINAL); jjtn000.setFinal(); break; default: jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } t = jj_consume_token(IDENTIFIER); if (!t.image.equals("enum")) { { if (true) throw new ParseException("ERROR: expecting enum"); } } if (!this.isJDK15) { { if (true) throw new ParseException("ERROR: Can't use enum as a keyword in pre-JDK 1.5 target"); } } jj_consume_token(IDENTIFIER); jj_consume_token(LBRACE); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IMPLEMENTS: jj_consume_token(IMPLEMENTS); NameList(); break; default: jj_la1[15] = jj_gen; ; } EnumElement(); label_7: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: ; break; default: jj_la1[16] = jj_gen; break label_7; } jj_consume_token(COMMA); EnumElement(); } jj_consume_token(RBRACE); jj_consume_token(SEMICOLON); } 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/94275a63a29bc394e85b2f505b6478b6f7c76d82/JavaParser.java/clean/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
727,
1071,
918,
6057,
6094,
1435,
1216,
10616,
288,
3639,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
6057,
6094,
1195,
3639,
9183,
3572,
6094,
10684,
5088,
3784,
273,
394,
9183,
3572,
6094... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
1071,
918,
6057,
6094,
1435,
1216,
10616,
288,
3639,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
6057,
6094,
1195,
3639,
9183,
3572,
6094,
10684,
5088,
3784,
273,
394,
9183,
3572,
6094... |
list.add(Mnemonic.toInteger(type)); | list.add(Mnemonic.toInteger(typecode)); | rdataFromString(Tokenizer st, Name origin) throws IOException { next = st.getName(origin); List list = new ArrayList(); while (true) { Tokenizer.Token t = st.get(); if (!t.isString()) break; int type = Type.value(t.value); if (type < 0) { throw st.exception("Invalid type: " + t.value); } list.add(Mnemonic.toInteger(type)); } st.unget(); types = listToArray(list); Arrays.sort(types);} | 4227 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4227/48f845cc8a60c7b2d9d2a9f41783a0136c2d3519/NSECRecord.java/buggy/org/xbill/DNS/NSECRecord.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
24291,
9193,
12,
10524,
384,
16,
1770,
4026,
13,
1216,
1860,
288,
202,
4285,
273,
384,
18,
17994,
12,
10012,
1769,
202,
682,
666,
273,
394,
2407,
5621,
202,
17523,
261,
3767,
13,
288,
202,
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,
24291,
9193,
12,
10524,
384,
16,
1770,
4026,
13,
1216,
1860,
288,
202,
4285,
273,
384,
18,
17994,
12,
10012,
1769,
202,
682,
666,
273,
394,
2407,
5621,
202,
17523,
261,
3767,
13,
288,
202,
2... |
openSess(); /* This doesn't work - at least with mysql Connection conn = sess.connection(); PreparedStatement ps = null; ps = conn.prepareStatement("SET REFERENTIAL_INTEGRITY FALSE"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from bedework_settings"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from adminGroupMembers"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from adminGroups"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from alarms"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from alarm_attendees"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from attendees"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from auth"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from authprefcalendars"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from authprefCategories"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from authprefLocations"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from authprefs"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from authprefSponsors"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from calendars"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from categories"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from eventrrules"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from events"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from event_attendees"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from event_categories"); ps.executeUpdate(); if (globals.from2p3px) { ps = conn.prepareStatement("delete from filters"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from filter_categories"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from filter_creators"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from filter_locations"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from filter_sponsors"); ps.executeUpdate(); ps.close(); } ps = conn.prepareStatement("delete from locations"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from organizers"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from preferences"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from sponsors"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from subscriptions"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from synchdata"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from synchinfo"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from synchstate"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from timezones"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from todos"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from users"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from user_subscriptions"); ps.executeUpdate(); ps.close(); /* ps = conn.prepareStatement("delete from lastmods"); ps.executeUpdate(); ps.close(); * / ps = conn.prepareStatement("SET REFERENTIAL_INTEGRITY TRUE"); ps.executeUpdate(); ps.close(); */ closeSess(); | public void open() throws Throwable { openSess(); /* This doesn't work - at least with mysql Connection conn = sess.connection(); PreparedStatement ps = null; ps = conn.prepareStatement("SET REFERENTIAL_INTEGRITY FALSE"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from bedework_settings"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from adminGroupMembers"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from adminGroups"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from alarms"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from alarm_attendees"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from attendees"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from auth"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from authprefcalendars"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from authprefCategories"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from authprefLocations"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from authprefs"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from authprefSponsors"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from calendars"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from categories"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from eventrrules"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from events"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from event_attendees"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from event_categories"); ps.executeUpdate(); if (globals.from2p3px) { ps = conn.prepareStatement("delete from filters"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from filter_categories"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from filter_creators"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from filter_locations"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from filter_sponsors"); ps.executeUpdate(); ps.close(); } ps = conn.prepareStatement("delete from locations"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from organizers"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from preferences"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from sponsors"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from subscriptions"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from synchdata"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from synchinfo"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from synchstate"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from timezones"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from todos"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from users"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from user_subscriptions"); ps.executeUpdate(); ps.close(); /* ps = conn.prepareStatement("delete from lastmods"); ps.executeUpdate(); ps.close(); * / ps = conn.prepareStatement("SET REFERENTIAL_INTEGRITY TRUE"); ps.executeUpdate(); ps.close(); */ closeSess(); } | 50848 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50848/40c287aaf617bc68bc691dc011f9dba62217b009/HibRestore.java/buggy/calendar3/dumprestore/src/org/bedework/dumprestore/restore/HibRestore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1696,
1435,
1216,
4206,
288,
565,
1696,
55,
403,
5621,
565,
1748,
1220,
3302,
1404,
1440,
300,
622,
4520,
598,
7219,
565,
4050,
1487,
273,
8451,
18,
4071,
5621,
565,
16913,
425... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1696,
1435,
1216,
4206,
288,
565,
1696,
55,
403,
5621,
565,
1748,
1220,
3302,
1404,
1440,
300,
622,
4520,
598,
7219,
565,
4050,
1487,
273,
8451,
18,
4071,
5621,
565,
16913,
425... | |
public void setUp() { | public void setUp() throws Exception { super.setUp(); | public void setUp() { runtime = Ruby.getDefaultInstance(); } | 49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/c8b66db475de1dc66f347884891dd70d9943689b/TestObjectSpace.java/buggy/test/org/jruby/test/TestObjectSpace.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
24292,
1435,
1216,
1185,
288,
2240,
18,
542,
1211,
5621,
3639,
3099,
273,
19817,
18,
588,
1868,
1442,
5621,
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,
0,
0,
0,
0,
0,
0,
0,
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,
24292,
1435,
1216,
1185,
288,
2240,
18,
542,
1211,
5621,
3639,
3099,
273,
19817,
18,
588,
1868,
1442,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
final float kernelData[] = new float [radius * 2 + 1]; | final float kernelData[] = new float [2*(radius-1) + 1]; | private float [] computeQualityKernelData(int radius, float stdDev){ final float kernelData[] = new float [radius * 2 + 1]; float sum = 0; // Used to normalise the kernel final int w = 2*radius+1; // Kernel width for(int i=0; i<w; i++){ kernelData[i] = (float)(Math.pow(Math.E, -(i-radius)*(i-radius)/ (2*stdDev*stdDev)) / (SQRT2PI*stdDev)); sum += kernelData[i]; } // Normalise: make elements sum to 1 for(int i=0; i<w; i++){ kernelData[i] /= sum; } return kernelData; } | 46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/da693c4911589c79c8624bf7cfb63d7bcf498d2c/GaussianBlurOp.java/clean/sources/org/apache/batik/ext/awt/image/renderable/GaussianBlurOp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1431,
5378,
3671,
14846,
11286,
751,
12,
474,
5725,
16,
1431,
2044,
8870,
15329,
3639,
727,
1431,
5536,
751,
8526,
273,
394,
1431,
306,
22,
21556,
11282,
17,
21,
13,
397,
404,
15533... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1431,
5378,
3671,
14846,
11286,
751,
12,
474,
5725,
16,
1431,
2044,
8870,
15329,
3639,
727,
1431,
5536,
751,
8526,
273,
394,
1431,
306,
22,
21556,
11282,
17,
21,
13,
397,
404,
15533... |
System.err.println("@tlh: " + "BEGIN"); | private Set prefixKeySet(String prefix) {// String locale = getLocaleID();// synchronized (conn) { try {// stmts.keySet.setString(1,locale); ResultSet rs = getPrefixKeySet(prefix); // TODO: is there a better way to map a ResultSet into a Set? Set s = new HashSet();// System.err.println("@001: " + "BEGIN"); while(rs.next()) { String xpath = (xpt.getById(rs.getInt(1)));// if(-1!=xpath.indexOf("001")) {// System.err.println("@001: " + xpath);// } s.add(xpath); // xpath //rs.getString(2); // origXpath }// System.err.println("@001: " + "END"); return Collections.unmodifiableSet(s); // TODO: 0 // TODO: ??? } catch(SQLException se) { logger.severe("CLDRDBSource: Failed to query source ("+tree + "/" + getLocaleID() +"): " + SurveyMain.unchainSqlException(se)); return null; }// } } | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/8725b84214da14acf681aedd835ab70bf6d5a89c/CLDRDBSource.java/clean/tools/java/org/unicode/cldr/web/CLDRDBSource.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2332,
18,
370,
18,
8222,
2932,
36,
6172,
76,
30,
315,
397,
315,
16061,
8863,
2332,
18,
370,
18,
8222,
2932,
36,
6172,
76,
30,
315,
397,
315,
16061,
8863,
2332,
18,
370,
18,
8222,
2932,
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,
2332,
18,
370,
18,
8222,
2932,
36,
6172,
76,
30,
315,
397,
315,
16061,
8863,
2332,
18,
370,
18,
8222,
2932,
36,
6172,
76,
30,
315,
397,
315,
16061,
8863,
2332,
18,
370,
18,
8222,
2932,
36,... | |
int deeper = depth+1; | int deeper = depth + 1; | private final void countRows(Object node, Object parent, int depth) { Integer n = new Integer(row2node.size()); row2node.put(n, node); NodeRecord nr = new NodeRecord(n.intValue(), depth, node, parent); nodes.put(node, nr); // For expanded nodes and for the root node. if (expanded.contains(node)) { int sc = treeModel.getChildCount(node); int deeper = depth+1; for (int i = 0; i < sc; i++) { Object child = treeModel.getChild(node, i); countRows(child, node, deeper); } } } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/33d89dd7043c676b02ff34fe991288e8240f95d6/FixedHeightLayoutCache.java/buggy/javax/swing/tree/FixedHeightLayoutCache.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
727,
918,
1056,
4300,
12,
921,
756,
16,
1033,
982,
16,
509,
3598,
13,
225,
288,
565,
2144,
290,
273,
394,
2144,
12,
492,
22,
2159,
18,
1467,
10663,
565,
1027,
22,
2159,
18,
458,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
727,
918,
1056,
4300,
12,
921,
756,
16,
1033,
982,
16,
509,
3598,
13,
225,
288,
565,
2144,
290,
273,
394,
2144,
12,
492,
22,
2159,
18,
1467,
10663,
565,
1027,
22,
2159,
18,
458,... |
List myCopy = new ArrayList(); | private String processElement(ICompilationUnit unit, char[] source) { CompilerOptions options = new CompilerOptions(unit.getJavaProject().getOptions(true)); ASTParser parser = ASTParser.newParser(AST.JLS3); parser.setCompilerOptions(options.getMap()); parser.setSource(source); parser.setKind(ASTParser.K_COMPILATION_UNIT); parser.setResolveBindings(false); org.eclipse.jdt.core.dom.CompilationUnit domUnit = (org.eclipse.jdt.core.dom.CompilationUnit) parser.createAST(null); final AST localAst = domUnit.getAST(); final ASTRewrite rewriter = ASTRewrite.create(localAst); RangeMarker[] markers = null; final boolean needPositionsMapping = this.positions != null; if (needPositionsMapping) { markers = new RangeMarker[this.positions.length]; for (int i= 0; i < this.positions.length; i++) { markers[i]= new RangeMarker(this.positions[i], 0); } } String generatedSource = new String(source); Document document = new Document(generatedSource); domUnit.accept(new ASTVisitor() { public boolean visit(org.eclipse.jdt.core.dom.CompilationUnit compilationUnit) { ListRewrite listRewrite = rewriter.getListRewrite(compilationUnit, org.eclipse.jdt.core.dom.CompilationUnit.TYPES_PROPERTY); List myCopy = new ArrayList(); List types = compilationUnit.types(); final int length = types.size(); myCopy.addAll(types); Collections.sort(myCopy, SortElementsOperation.this.comparator); for (int i = 0; i < length; i++) { listRewrite.replace((ASTNode) types.get(i), rewriter.createMoveTarget((ASTNode) myCopy.get(i)), null); } return true; } public boolean visit(AnnotationTypeDeclaration annotationTypeDeclaration) { ListRewrite listRewrite = rewriter.getListRewrite(annotationTypeDeclaration, AnnotationTypeDeclaration.BODY_DECLARATIONS_PROPERTY); List myCopy = new ArrayList(); List bodyDeclarations = annotationTypeDeclaration.bodyDeclarations(); final int length = bodyDeclarations.size(); myCopy.addAll(bodyDeclarations); Collections.sort(myCopy, SortElementsOperation.this.comparator); for (int i = 0; i < length; i++) { listRewrite.replace((ASTNode) bodyDeclarations.get(i), rewriter.createMoveTarget((ASTNode) myCopy.get(i)), null); } return true; } public boolean visit(AnonymousClassDeclaration anonymousClassDeclaration) { ListRewrite listRewrite = rewriter.getListRewrite(anonymousClassDeclaration, AnonymousClassDeclaration.BODY_DECLARATIONS_PROPERTY); List myCopy = new ArrayList(); List bodyDeclarations = anonymousClassDeclaration.bodyDeclarations(); final int length = bodyDeclarations.size(); myCopy.addAll(bodyDeclarations); Collections.sort(myCopy, SortElementsOperation.this.comparator); for (int i = 0; i < length; i++) { listRewrite.replace((ASTNode) bodyDeclarations.get(i), rewriter.createMoveTarget((ASTNode) myCopy.get(i)), null); } return true; } public boolean visit(TypeDeclaration typeDeclaration) { ListRewrite listRewrite = rewriter.getListRewrite(typeDeclaration, TypeDeclaration.BODY_DECLARATIONS_PROPERTY); List myCopy = new ArrayList(); List bodyDeclarations = typeDeclaration.bodyDeclarations(); final int length = bodyDeclarations.size(); myCopy.addAll(bodyDeclarations); Collections.sort(myCopy, SortElementsOperation.this.comparator); for (int i = 0; i < length; i++) { listRewrite.replace((ASTNode) bodyDeclarations.get(i), rewriter.createMoveTarget((ASTNode) myCopy.get(i)), null); } return true; } public boolean visit(EnumDeclaration enumDeclaration) { ListRewrite listRewrite = rewriter.getListRewrite(enumDeclaration, EnumDeclaration.BODY_DECLARATIONS_PROPERTY); List myCopy = new ArrayList(); List bodyDeclarations = enumDeclaration.bodyDeclarations(); int length = bodyDeclarations.size(); myCopy.addAll(bodyDeclarations); Collections.sort(myCopy, SortElementsOperation.this.comparator); for (int i = 0; i < length; i++) { listRewrite.replace((ASTNode) bodyDeclarations.get(i), rewriter.createMoveTarget((ASTNode) myCopy.get(i)), null); } listRewrite = rewriter.getListRewrite(enumDeclaration, EnumDeclaration.ENUM_CONSTANTS_PROPERTY); myCopy = new ArrayList(); List enumConstants = enumDeclaration.enumConstants(); length = enumConstants.size(); myCopy.addAll(enumConstants); Collections.sort(myCopy, SortElementsOperation.this.comparator); for (int i = 0; i < length; i++) { listRewrite.replace((ASTNode) enumConstants.get(i), rewriter.createMoveTarget((ASTNode) myCopy.get(i)), null); } return true; } }); TextEdit edits = rewriter.rewriteAST(document, null); if (needPositionsMapping) { for (int i = 0, max = markers.length; i < max; i++) { insert(edits, markers[i]); } } try { edits.apply(document, TextEdit.UPDATE_REGIONS); generatedSource = document.get(); if (needPositionsMapping) { for (int i= 0, max = markers.length; i < max; i++) { this.positions[i]= markers[i].getOffset(); } } } catch (BadLocationException e) { // ignore } return generatedSource; } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/f03da9e9320c8704d1b0fcb8d39d1dffc230906f/SortElementsOperation.java/buggy/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SortElementsOperation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
1207,
1046,
12,
45,
19184,
2802,
2836,
16,
1149,
8526,
1084,
13,
288,
202,
202,
9213,
1320,
702,
273,
394,
12972,
1320,
12,
4873,
18,
588,
5852,
4109,
7675,
588,
1320,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1207,
1046,
12,
45,
19184,
2802,
2836,
16,
1149,
8526,
1084,
13,
288,
202,
202,
9213,
1320,
702,
273,
394,
12972,
1320,
12,
4873,
18,
588,
5852,
4109,
7675,
588,
1320,
1... | |
final ActionGroup mainActionGroup = CustomizableActionsSchemas.getInstance().getMainMenuActionGroup(); | final ActionGroup mainActionGroup = (ActionGroup)CustomizableActionsSchemas.getInstance().getCorrectedAction(IdeActions.GROUP_MAIN_MENU); | private void expandActionGroup(final DataContext context, final ArrayList newVisibleActions, ActionManager actionManager) { final ActionGroup mainActionGroup = CustomizableActionsSchemas.getInstance().getMainMenuActionGroup(); if (mainActionGroup == null) return; final AnAction[] children = mainActionGroup.getChildren(null); for (int i = 0; i < children.length; i++) { final AnAction action = children[i]; if (!(action instanceof ActionGroup)) { continue; } final Presentation presentation=myPresentationFactory.getPresentation(action); final AnActionEvent e = new AnActionEvent(null, context, ActionPlaces.MAIN_MENU, presentation, actionManager, 0); action.update(e); if(presentation.isVisible()){ // add only visible items newVisibleActions.add(action); } } } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/a6bf3a8fd4f4c29e857800743aa7ef405a078de9/IdeMenuBar.java/clean/source/com/intellij/openapi/wm/impl/IdeMenuBar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
4542,
1803,
1114,
12,
6385,
1910,
1042,
819,
16,
4766,
727,
2407,
394,
6207,
6100,
16,
4766,
4382,
1318,
1301,
1318,
13,
288,
565,
727,
4382,
1114,
2774,
1803,
1114,
273,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
4542,
1803,
1114,
12,
6385,
1910,
1042,
819,
16,
4766,
727,
2407,
394,
6207,
6100,
16,
4766,
4382,
1318,
1301,
1318,
13,
288,
565,
727,
4382,
1114,
2774,
1803,
1114,
273,
261,
... |
String rubyDir = jrubyHome + File.separatorChar + "lib" + File.separatorChar + "ruby" + File.separatorChar; | char sep = File.separatorChar; String rubyDir = jrubyHome + sep + "lib" + sep + "ruby" + sep; | public void init(Ruby runtime, List additionalDirectories) { for (Iterator iter = additionalDirectories.iterator(); iter.hasNext();) { addPath((String)iter.next()); } if (runtime.getSafeLevel() == 0) { String jrubyLib = System.getProperty("jruby.lib"); if (jrubyLib != null) { addPath(jrubyLib); } } String jrubyHome = System.getProperty("jruby.home"); if (jrubyHome != null) { String rubyDir = jrubyHome + File.separatorChar + "lib" + File.separatorChar + "ruby" + File.separatorChar; addPath(rubyDir + "site_ruby" + File.separatorChar + Constants.RUBY_MAJOR_VERSION); addPath(rubyDir + "site_ruby" + File.separatorChar + Constants.RUBY_MAJOR_VERSION + File.separatorChar + "java"); addPath(rubyDir + "site_ruby"); addPath(rubyDir + Constants.RUBY_MAJOR_VERSION); addPath(rubyDir + Constants.RUBY_MAJOR_VERSION + File.separatorChar + "java"); } if (runtime.getSafeLevel() == 0) { addPath("."); } } | 47619 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47619/61503e7396c70acb6ed9f50922ff044d1fcc4bcc/LoadService.java/clean/src/org/jruby/internal/runtime/load/LoadService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
12,
54,
10340,
3099,
16,
987,
3312,
13071,
13,
288,
3639,
364,
261,
3198,
1400,
273,
3312,
13071,
18,
9838,
5621,
1400,
18,
5332,
2134,
5621,
13,
288,
5411,
25505,
12443,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
12,
54,
10340,
3099,
16,
987,
3312,
13071,
13,
288,
3639,
364,
261,
3198,
1400,
273,
3312,
13071,
18,
9838,
5621,
1400,
18,
5332,
2134,
5621,
13,
288,
5411,
25505,
12443,... |
String source = samples[i]; Date dateSource = isoBC.parse(source); | String source = getRandomDate(date1950, date2010); Date dateSource = neutralFormat.parse(source); | private void addSamples(DateFormat x, boolean isDate, List result) throws ParseException { Object[] arguments = new Object[samples.length]; StringBuffer htmlMessage = new StringBuffer(); htmlMessage.append("<table border='1' cellpadding='2'><tr><th width='33%'>Number</th><th width='34%'>Localized Format</th></tr>"); for (int i = 0; i < samples.length; ++i) { String source = samples[i]; Date dateSource = isoBC.parse(source); String formatted = x.format(dateSource); Date parsed = x.parse(formatted); String resource = isoBC.format(parsed); arguments[i] = source + " \u2192 \u200E" + formatted + "\u200E \u2192 " + resource; htmlMessage.append("<tr><td>") .append(TransliteratorUtilities.toXML.transliterate(source)) .append("</td><td>") .append(TransliteratorUtilities.toXML.transliterate(formatted)) .append("</td><td>") .append(TransliteratorUtilities.toXML.transliterate(resource)) .append("</td></tr>"); } htmlMessage.append("</table>"); CheckStatus item = new CheckStatus().setCause(this).setType(CheckStatus.exampleType) .setMessage(SampleList, arguments) .setHTMLMessage(htmlMessage.toString()); result.add(item); } | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/5f498162d259bda29596000157c48b05c3fae30e/CheckDates.java/buggy/tools/java/org/unicode/cldr/test/CheckDates.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
527,
13239,
12,
11878,
619,
16,
1250,
28931,
16,
987,
563,
13,
1216,
10616,
288,
202,
202,
921,
8526,
1775,
273,
394,
1033,
63,
7319,
18,
2469,
15533,
202,
202,
780,
189... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
527,
13239,
12,
11878,
619,
16,
1250,
28931,
16,
987,
563,
13,
1216,
10616,
288,
202,
202,
921,
8526,
1775,
273,
394,
1033,
63,
7319,
18,
2469,
15533,
202,
202,
780,
189... |
" cr=" + (addcr==-1 ? "add" : addcr==0 ? "asis" : "remove") + " tab=" + (addtab==-1 ? "add" : addtab==0 ? "asis" : "remove") + " eof=" + (ctrlz==-1 ? "add" : ctrlz==0 ? "asis" : "remove") + | " cr=" + (addcr==1 ? "add" : addcr==0 ? "asis" : "remove") + " tab=" + (addtab==1 ? "add" : addtab==0 ? "asis" : "remove") + " eof=" + (ctrlz==1 ? "add" : ctrlz==0 ? "asis" : "remove") + | public void execute() throws BuildException { // first off, make sure that we've got a srcdir and destdir if (srcDir == null) { throw new BuildException("srcdir attribute must be set!"); } if (!srcDir.exists()) { throw new BuildException("srcdir does not exist!"); } if (!srcDir.isDirectory()) { throw new BuildException("srcdir is not a directory!"); } if (destDir != null) { if (!destDir.exists()) { throw new BuildException("destdir does not exist!"); } if (!destDir.isDirectory()) { throw new BuildException("destdir is not a directory!"); } } // log options used log("options:" + " cr=" + (addcr==-1 ? "add" : addcr==0 ? "asis" : "remove") + " tab=" + (addtab==-1 ? "add" : addtab==0 ? "asis" : "remove") + " eof=" + (ctrlz==-1 ? "add" : ctrlz==0 ? "asis" : "remove") + " tablength=" + tablength, Project.MSG_VERBOSE); DirectoryScanner ds = super.getDirectoryScanner(srcDir); String[] files = ds.getIncludedFiles(); for (int i = 0; i < files.length; i++) { File srcFile = new File(srcDir, files[i]); // read the contents of the file int count = (int)srcFile.length(); byte indata[] = new byte[count]; try { FileInputStream inStream = new FileInputStream(srcFile); inStream.read(indata); inStream.close(); } catch (IOException e) { throw new BuildException(e); } // count the number of cr, lf, and tab characters int cr = 0; int lf = 0; int tab = 0; for (int k=0; k<count; k++) { byte c = indata[k]; if (c == '\r') cr++; if (c == '\n') lf++; if (c == '\t') tab++; } // check for trailing eof boolean eof = ((count>0) && (indata[count-1] == 0x1A)); // log stats (before fixes) log(srcFile + ": size=" + count + " cr=" + cr + " lf=" + lf + " tab=" + tab + " eof=" + eof, Project.MSG_VERBOSE); // determine the output buffer size (slightly pessimisticly) int outsize = count; if (addcr != 0) outsize-=cr; if (addcr == +1) outsize+=lf; if (addtab == -1) outsize+=tab*(tablength-1); if (ctrlz == +1) outsize+=1; // copy the data byte outdata[] = new byte[outsize]; int o = 0; // output offset int line = o; // beginning of line int col = 0; // desired column for (int k=0; k<count; k++) { switch (indata[k]) { case (byte)' ': // advance column if (addtab == 0) outdata[o++]=(byte)' '; col++; break; case (byte)'\t': if (addtab == 0) { // treat like any other character outdata[o++]=(byte)'\t'; col++; } else { // advance column to next tab stop col = (col|(tablength-1))+1; } break; case (byte)'\r': if (addcr == 0) { // treat like any other character outdata[o++]=(byte)'\r'; col++; } break; case (byte)'\n': // start a new line (optional CR followed by LF) if (addcr == +1) outdata[o++]=(byte)'\r'; outdata[o++]=(byte)'\n'; line=o; col=0; break; default: // add tabs if two or more spaces are required if (addtab>0 && o+1<line+col) { // determine logical column int diff=o-line; // add tabs until this column would be passed // note: the start of line is adjusted to match while ((diff|(tablength-1))<col) { outdata[o++]=(byte)'\t'; line-=(tablength-1)-(diff&(tablength-1)); diff=o-line; }; }; // space out to desired column while (o<line+col) outdata[o++]=(byte)' '; // append desired character outdata[o++]=indata[k]; col++; } } // add or remove an eof character as required if (ctrlz == +1) { if (outdata[o-1]!=0x1A) outdata[o++]=0x1A; } else if (ctrlz == -1) { if (o>2 && outdata[o-1]==0x0A && outdata[o-2]==0x1A) o--; if (o>1 && outdata[o-1]==0x1A) o--; } // output the data try { File destFile = srcFile; if (destDir != null) destFile = new File(destDir, files[i]); FileOutputStream outStream = new FileOutputStream(destFile); outStream.write(outdata,0,o); outStream.close(); } catch (IOException e) { throw new BuildException(e); } } /* end for */ } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/6231c77d24ce79d308b50e46097851fa8dc63e93/FixCRLF.java/buggy/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1836,
1435,
1216,
18463,
288,
3639,
368,
1122,
3397,
16,
1221,
3071,
716,
732,
8081,
2363,
279,
1705,
1214,
471,
1570,
1214,
3639,
309,
261,
4816,
1621,
422,
446,
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,
1836,
1435,
1216,
18463,
288,
3639,
368,
1122,
3397,
16,
1221,
3071,
716,
732,
8081,
2363,
279,
1705,
1214,
471,
1570,
1214,
3639,
309,
261,
4816,
1621,
422,
446,
13,
288,
5411... |
protected void execute(IProgressMonitor monitor) throws CoreException { monitor.beginTask("", 2000); project.create(record.description, new SubProgressMonitor(monitor, 1000)); | protected void execute(IProgressMonitor monitor) throws CoreException { monitor.beginTask("", 2000); project.create(record.description, new SubProgressMonitor( monitor, 1000)); | private boolean createExistingProject(final ProjectRecord record) { String projectName = record.getProjectName(); final IWorkspace workspace = ResourcesPlugin.getWorkspace(); final IProject project = workspace.getRoot().getProject(projectName); if (record.description == null) { record.description = workspace.newProjectDescription(projectName); IPath locationPath = new Path(record.projectFile.getAbsolutePath()); //If it is under the root use the default location if (Platform.getLocation().isPrefixOf(locationPath)) record.description.setLocation(null); else record.description.setLocation(locationPath); } else record.description.setName(projectName); // create the new project operation WorkspaceModifyOperation op = new WorkspaceModifyOperation() { protected void execute(IProgressMonitor monitor) throws CoreException { monitor.beginTask("", 2000); //$NON-NLS-1$ project.create(record.description, new SubProgressMonitor(monitor, 1000)); if (monitor.isCanceled()) throw new OperationCanceledException(); project.open(IResource.BACKGROUND_REFRESH, new SubProgressMonitor(monitor, 1000)); } }; // run the new project creation operation try { getContainer().run(true, true, op); } catch (InterruptedException e) { return false; } catch (InvocationTargetException e) { // ie.- one of the steps resulted in a core exception Throwable t = e.getTargetException(); if (t instanceof CoreException) { if (((CoreException) t).getStatus().getCode() == IResourceStatus.CASE_VARIANT_EXISTS) { MessageDialog.openError(getShell(), DataTransferMessages.getString("WizardExternalProjectImportPage.errorMessage "), //$NON-NLS-1$ DataTransferMessages.getString("WizardProjectsImportPage.CaseVariantError") //$NON-NLS-1$ ); } else { ErrorDialog.openError(getShell(), DataTransferMessages.getString("WizardExternalProjectImportPage.errorMessage "), //$NON-NLS-1$ null, ((CoreException) t).getStatus()); } } return false; } return true; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/320f342281f01d0eab3a23189cdf15882a2124b5/WizardProjectsImportPage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
752,
9895,
4109,
12,
6385,
5420,
2115,
1409,
13,
288,
202,
202,
780,
17234,
273,
1409,
18,
588,
4109,
461,
5621,
202,
202,
6385,
467,
8241,
6003,
273,
8128,
3773,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
752,
9895,
4109,
12,
6385,
5420,
2115,
1409,
13,
288,
202,
202,
780,
17234,
273,
1409,
18,
588,
4109,
461,
5621,
202,
202,
6385,
467,
8241,
6003,
273,
8128,
3773,
18,
5... |
static String[] splitArgs(String args) { | static String[] splitArgs(String args) { | static String[] splitArgs(String args) { ArrayList argList = new ArrayList(); char[] ch = args.toCharArray(); int clen = ch.length; int state = OUTSIDE; int argstart = 0; for(int c=0; c<=clen; c++) { boolean last = (c==clen); int lastState = state; boolean endToken = false; if(!last) { if(ch[c]=='\'') { if(state == OUTSIDE) { state = SINGLEQ; } else if(state == SINGLEQ) { state = OUTSIDE; } endToken = (state != lastState); } else if(ch[c]=='"') { if(state == OUTSIDE) { state = DOUBLEQ; } else if(state == DOUBLEQ) { state = OUTSIDE; } endToken = (state != lastState); } else if(ch[c]==' ') { if(state == OUTSIDE) { endToken = true; } } } if(last || endToken) { if(c == argstart) { // unquoted space } else { String a; a = args.substring(argstart, c); argList.add(a); } argstart = c+1; lastState = state; } } return (String[])argList.toArray(new String[0]); } | 49248 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49248/e10b40e8014547113799b2653164e8c990d41209/PipeMapRed.java/buggy/src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeMapRed.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
514,
8526,
1416,
2615,
12,
780,
833,
13,
225,
288,
565,
2407,
1501,
682,
273,
394,
2407,
5621,
565,
1149,
8526,
462,
273,
833,
18,
869,
15936,
5621,
565,
509,
29059,
273,
462,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
514,
8526,
1416,
2615,
12,
780,
833,
13,
225,
288,
565,
2407,
1501,
682,
273,
394,
2407,
5621,
565,
1149,
8526,
462,
273,
833,
18,
869,
15936,
5621,
565,
509,
29059,
273,
462,
18,
... |
(String[][])RPC.call(GET_SEGMENTS, params, defaultAddresses, this.nutchConf); | (String[][])RPC.call(GET_SEGMENTS, params, defaultAddresses, this.conf); | public void updateSegments() throws IOException { int liveServers=0; int liveSegments=0; Vector liveAddresses=new Vector(); // build segmentToAddress map Object[][] params = new Object[defaultAddresses.length][0]; String[][] results = (String[][])RPC.call(GET_SEGMENTS, params, defaultAddresses, this.nutchConf); for (int i = 0; i < results.length; i++) { // process results of call InetSocketAddress addr = defaultAddresses[i]; String[] segments = results[i]; if (segments == null) { LOG.warning("Client: no segments from: " + addr); continue; } for (int j = 0; j < segments.length; j++) { LOG.finest("Client: segment "+segments[j]+" at "+addr); segmentToAddress.put(segments[j], addr); } liveAddresses.add(addr); liveServers++; liveSegments+=segments.length; } this.liveAddresses = (InetSocketAddress[]) // update liveAddresses liveAddresses.toArray(new InetSocketAddress[liveAddresses.size()]); LOG.info("STATS: "+liveServers+" servers, "+liveSegments+" segments."); } | 46828 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46828/25437bc825d50715dcc9a289a1b4c8fbbc6aced1/DistributedSearch.java/clean/src/java/org/apache/nutch/searcher/DistributedSearch.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1089,
7946,
1435,
1216,
1860,
288,
5411,
509,
8429,
11913,
33,
20,
31,
1377,
509,
8429,
7946,
33,
20,
31,
1377,
5589,
8429,
7148,
33,
2704,
5589,
5621,
5411,
368,
1361,
3267,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1089,
7946,
1435,
1216,
1860,
288,
5411,
509,
8429,
11913,
33,
20,
31,
1377,
509,
8429,
7946,
33,
20,
31,
1377,
5589,
8429,
7148,
33,
2704,
5589,
5621,
5411,
368,
1361,
3267,
... |
buffer = (buffer << 8) | bufferTmp[pos++]; | buffer = (buffer << 8) | (bufferTmp[pos++] & 0xFFL); | public long readUBits(int n) throws IOException { // Note: As this method is called quite frequently, I'm // optimizing for speed instead of code readability. Consult // your local C, Assembler or other bit fiddling wizard if you // have trouble understanding it. // Try to read as many bytes as necessary // The super.read() throws an IndexOutOfBoundsException if n >> 56 int byteCount = n >>> 4; int bytesRead = super.read(bufferTmp, 0, byteCount); // Shift as many bytes into the buffer as have been actually read int pos = 0; switch (bytesRead) { case 7: buffer = (buffer << 8) | bufferTmp[pos++]; case 6: buffer = (buffer << 8) | bufferTmp[pos++]; case 5: buffer = (buffer << 8) | bufferTmp[pos++]; case 4: buffer = (buffer << 8) | bufferTmp[pos++]; case 3: buffer = (buffer << 8) | bufferTmp[pos++]; case 2: buffer = (buffer << 8) | bufferTmp[pos++]; case 1: buffer = (buffer << 8) | bufferTmp[pos++]; case 0: break; default: // Paranoia code. This should never happen. throw new Error("Ooops. I seem to have read " + bytesRead + " bytes into a 7 byte array without an " + "Exception. Something's definitely " + "fishy here, please debug..."); } // Count the bits we've read from the underlying stream. bitsLeft += (bytesRead << 4); // OK, we're done reading bits. Now check if we've got enough // bits to satisfy the demand if (bytesRead != byteCount) throw new EOFException(); // Calculate the return value, and keep the remaining bits in // the buffer. There are never more than 7 bits remaining. long retval = buffer >>> bitsLeft; long mask = -1L >>> bitsLeft; buffer &= mask; return retval; } | 11735 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11735/0ceb5f4f51e31a1789e4454a380541132fc1e009/BitInputStream.java/buggy/spark/src/de/tivano/flash/swf/common/BitInputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1525,
855,
3457,
1282,
12,
474,
290,
13,
1216,
1860,
288,
202,
759,
3609,
30,
2970,
333,
707,
353,
2566,
25102,
13821,
23351,
16,
467,
17784,
202,
759,
5213,
6894,
364,
8632,
3560,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1525,
855,
3457,
1282,
12,
474,
290,
13,
1216,
1860,
288,
202,
759,
3609,
30,
2970,
333,
707,
353,
2566,
25102,
13821,
23351,
16,
467,
17784,
202,
759,
5213,
6894,
364,
8632,
3560,
... |
else { System.err.println( usage ); System.exit( 1 ); } | System.err.println(); System.err.flush(); | public static void main( String[] args ) { /* Set up usage message. */ String usage = "Usage: " + getCommandName() + " "; char[] padc = new char[ usage.length() ]; Arrays.fill( padc, ' ' ); String pad = "\n" + new String( padc ); usage += "[-disk] [-debug] [-h[elp]] [-v[erbose]]" + pad + "[-ifmt <in-format>] [-ofmt <out-format>]" + pad + "[<in-table> [<out-table>]]"; /* Process flags. */ List argList = new ArrayList( Arrays.asList( args ) ); String ifmt = null; String ofmt = null; String in = null; String out = null; List flags = new ArrayList(); for ( Iterator it = argList.iterator(); it.hasNext(); ) { String arg = (String) it.next(); if ( arg.equals( "-disk" ) || arg.equals( "-debug" ) || arg.equals( "-v" ) || arg.equals( "-verbose" ) ) { it.remove(); flags.add( arg ); } else if ( arg.equals( "-h" ) || arg.equals( "-help" ) ) { System.out.println( usage ); System.out.println( extraHelp() ); return; } else if ( arg.equals( "-ifmt" ) ) { it.remove(); if ( it.hasNext() ) { ifmt = (String) it.next(); it.remove(); } else { System.err.println( usage ); System.exit( 1 ); } } else if ( arg.equals( "-ofmt" ) ) { it.remove(); if ( it.hasNext() ) { ofmt = (String) it.next(); it.remove(); } else { System.err.println( usage ); System.exit( 1 ); } } else if ( arg.startsWith( "-" ) ) { System.err.println( usage ); System.exit( 1 ); } else if ( in == null ) { it.remove(); in = arg; } else if ( out == null ) { it.remove(); out = arg; } else { System.err.println( usage ); System.exit( 1 ); } } /* Construct TablePipe argument list. */ List tpArgs = new ArrayList(); tpArgs.addAll( flags ); if ( ifmt != null ) { tpArgs.add( "-ifmt" ); tpArgs.add( ifmt ); } tpArgs.add( "-write" ); if ( ofmt != null ) { tpArgs.add( "-ofmt" ); tpArgs.add( ofmt ); } if ( out != null ) { tpArgs.add( "-o" ); tpArgs.add( out ); } if ( in != null ) { tpArgs.add( in ); } /* Execute TablePipe. */ TablePipe.main( (String[]) tpArgs.toArray( new String[ 0 ] ) ); } | 48494 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48494/b111cd7c18c244eaca198194febe84dfa865a951/TableCopy.java/clean/ttools/src/main/uk/ac/starlink/ttools/TableCopy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
514,
8526,
833,
262,
288,
3639,
1748,
1000,
731,
4084,
883,
18,
1195,
3639,
514,
4084,
273,
315,
5357,
30,
315,
397,
12856,
461,
1435,
397,
315,
13636,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
514,
8526,
833,
262,
288,
3639,
1748,
1000,
731,
4084,
883,
18,
1195,
3639,
514,
4084,
273,
315,
5357,
30,
315,
397,
12856,
461,
1435,
397,
315,
13636,
3639,
1... |
checkUpdateable(); | public boolean rowUpdated() throws SQLException { checkOpen(); checkUpdateable(); return getRowStat() == SQL_ROW_UPDATED; } | 439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/9477cf393a38cb907b531a19cffdf83b206c5062/MSCursorResultSet.java/buggy/trunk/jtds/src/main/net/sourceforge/jtds/jdbc/MSCursorResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1027,
7381,
1435,
1216,
6483,
288,
3639,
866,
3678,
5621,
9079,
327,
11835,
5000,
1435,
422,
3063,
67,
11226,
67,
8217,
40,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1027,
7381,
1435,
1216,
6483,
288,
3639,
866,
3678,
5621,
9079,
327,
11835,
5000,
1435,
422,
3063,
67,
11226,
67,
8217,
40,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100... | |
if(log.isInfoEnabled()) log.info("[SUSPECT] suspect hdr is " + hdr); | if(log.isDebugEnabled()) log.debug("[SUSPECT] suspect hdr is " + hdr); | public void up(Event evt) { Message msg; FdHeader hdr=null; Object sender, tmphdr; switch(evt.getType()) { case Event.SET_LOCAL_ADDRESS: local_addr=(Address)evt.getArg(); break; case Event.MSG: msg=(Message)evt.getArg(); tmphdr=msg.getHeader(getName()); if(tmphdr == null || !(tmphdr instanceof FdHeader)) { if(ping_dest != null && (sender=msg.getSrc()) != null) { if(ping_dest.equals(sender)) { last_ack=System.currentTimeMillis(); if(log.isTraceEnabled()) log.trace("received msg from " + sender + " (counts as ack)"); num_tries=0; } } break; // message did not originate from FD layer, just pass up } hdr=(FdHeader)msg.removeHeader(getName()); switch(hdr.type) { case FdHeader.HEARTBEAT: // heartbeat request; send heartbeat ack Address hb_sender=msg.getSrc(); Message hb_ack=new Message(msg.getSrc(), null, null); FdHeader tmp_hdr=new FdHeader(FdHeader.HEARTBEAT_ACK); // 1. Send an ack tmp_hdr.from=local_addr; hb_ack.putHeader(getName(), tmp_hdr); passDown(new Event(Event.MSG, hb_ack)); // 2. Shun the sender of a HEARTBEAT message if that sender is not a member. This will cause // the sender to leave the group (and possibly rejoin it later) if(shun) shunInvalidHeartbeatSender(hb_sender); break; // don't pass up ! case FdHeader.HEARTBEAT_ACK: // heartbeat ack if(ping_dest != null && ping_dest.equals(hdr.from)) { last_ack=System.currentTimeMillis(); num_tries=0; if(log.isInfoEnabled()) log.info("received ack from " + hdr.from); } else { stop(); ping_dest=(Address)getPingDest(members); if(ping_dest != null) { try { startMonitor(); } catch(Exception ex) { if(log.isWarnEnabled()) log.warn("exception when calling startMonitor(): " + ex); } } } break; case FdHeader.SUSPECT: if(hdr.mbrs != null) { if(log.isInfoEnabled()) log.info("[SUSPECT] suspect hdr is " + hdr); for(int i=0; i < hdr.mbrs.size(); i++) { Address m=(Address)hdr.mbrs.elementAt(i); if(local_addr != null && m.equals(local_addr)) { if(log.isWarnEnabled()) log.warn("I was suspected, but will not remove myself from membership " + "(waiting for EXIT message)"); } else { pingable_mbrs.remove(m); ping_dest=(Address)getPingDest(pingable_mbrs); } passUp(new Event(Event.SUSPECT, m)); passDown(new Event(Event.SUSPECT, m)); } } break; case FdHeader.NOT_MEMBER: if(shun) { if(log.isInfoEnabled()) log.info("[NOT_MEMBER] I'm being shunned; exiting"); passUp(new Event(Event.EXIT)); } break; } return; } passUp(evt); // pass up to the layer above us } | 49475 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49475/f4d48c5d12530ffb09ab46034b71d9594b0f1287/FD.java/buggy/src/org/jgroups/protocols/FD.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
731,
12,
1133,
6324,
13,
288,
3639,
2350,
1234,
31,
3639,
30431,
1864,
7723,
33,
2011,
31,
3639,
1033,
5793,
16,
6118,
844,
3069,
31,
3639,
1620,
12,
73,
11734,
18,
588,
559,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
731,
12,
1133,
6324,
13,
288,
3639,
2350,
1234,
31,
3639,
30431,
1864,
7723,
33,
2011,
31,
3639,
1033,
5793,
16,
6118,
844,
3069,
31,
3639,
1620,
12,
73,
11734,
18,
588,
559,... |
EditorMenuManager manager = (EditorMenuManager)wrappers.get(i); | EditorMenuManager manager = (EditorMenuManager) wrappers.get(i); | public void updateEnabledAllowed() { // update the items in the map IContributionItem[] items = EditorMenuManager.super.getItems(); for (int i = 0; i < items.length; i++) { IContributionItem item = items[i]; item.update(IContributionManagerOverrides.P_ENABLED); } // update the wrapped menus if (wrappers != null) { for (int i = 0; i < wrappers.size(); i++) { EditorMenuManager manager = (EditorMenuManager)wrappers.get(i); manager.setEnabledAllowed(enabledAllowed); } } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/5ddde0e384bac44f41aeb754525f7bdab6a04e11/EditorMenuManager.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorMenuManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
1089,
1526,
5042,
1435,
288,
1082,
202,
759,
1089,
326,
1516,
316,
326,
852,
1082,
202,
45,
442,
4027,
1180,
8526,
1516,
273,
18451,
4599,
1318,
18,
9565,
18,
588,
3126,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
1089,
1526,
5042,
1435,
288,
1082,
202,
759,
1089,
326,
1516,
316,
326,
852,
1082,
202,
45,
442,
4027,
1180,
8526,
1516,
273,
18451,
4599,
1318,
18,
9565,
18,
588,
3126,
... |
IsotopeFactory isofac = IsotopeFactory.getInstance(); | IsotopeFactory isofac = IsotopeFactory.getInstance(new ChemObject().getBuilder()); | public void testIsElement_String() throws Exception { IsotopeFactory isofac = IsotopeFactory.getInstance(); assertTrue(isofac.isElement("C")); } | 1306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1306/99fe3519d35ad1fd276844ab16fa237c545a01fc/IsotopeFactoryTest.java/buggy/src/org/openscience/cdk/test/config/IsotopeFactoryTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2520,
1046,
67,
780,
1435,
1216,
1185,
288,
202,
202,
2520,
18946,
1733,
8702,
11639,
273,
2585,
18946,
1733,
18,
588,
1442,
5621,
202,
202,
11231,
5510,
12,
9699,
11639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
1842,
2520,
1046,
67,
780,
1435,
1216,
1185,
288,
202,
202,
2520,
18946,
1733,
8702,
11639,
273,
2585,
18946,
1733,
18,
588,
1442,
5621,
202,
202,
11231,
5510,
12,
9699,
11639,
... |
"Failed to create a TI->RI register request", exc); | "Failed to create a TI->RI register request", exc); | protected Request createTiRegisterRequest() throws TiUnexpectedError { try { return createRequest( Request.REGISTER, tiAddressFactory, tiHeaderFactory, tiMessageFactory, tiSipProvider, riSipProvider, null, null, null); } catch (Throwable exc) { throw new TiUnexpectedError( "Failed to create a TI->RI register request", exc); } } | 7607 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7607/d3bce65e49e71ee7df15bd72fd338535d4501bc1/MessageFlowHarness.java/buggy/trunk/src/test/tck/msgflow/MessageFlowHarness.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1567,
752,
56,
77,
3996,
691,
1435,
1216,
399,
77,
7762,
668,
288,
202,
202,
698,
288,
1082,
202,
2463,
15798,
12,
9506,
202,
691,
18,
27511,
16,
9506,
202,
9096,
1887,
1733,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1567,
752,
56,
77,
3996,
691,
1435,
1216,
399,
77,
7762,
668,
288,
202,
202,
698,
288,
1082,
202,
2463,
15798,
12,
9506,
202,
691,
18,
27511,
16,
9506,
202,
9096,
1887,
1733,... |
int i; Object lhs; final int maxStack = theData.itsMaxStack; | final Object DBL_MRK = Interpreter.DBL_MRK; final Scriptable undefined = Undefined.instance; final int VAR_SHFT = theData.itsMaxStack; | public static Object interpret(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, NativeFunction fnOrScript, InterpreterData theData) throws JavaScriptException { if (cx.interpreterSecurityDomain != theData.securityDomain) { // If securityDomain is different, update domain in Cotext // and call self under new domain Object savedDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = theData.securityDomain; try { return interpret(cx, scope, thisObj, args, fnOrScript, theData); } finally { cx.interpreterSecurityDomain = savedDomain; } } int i; Object lhs; final int maxStack = theData.itsMaxStack; final int maxVars = (fnOrScript.argNames == null) ? 0 : fnOrScript.argNames.length; final int maxLocals = theData.itsMaxLocals; final int maxTryDepth = theData.itsMaxTryDepth; final int VAR_SHFT = maxStack; final int LOCAL_SHFT = VAR_SHFT + maxVars; final int TRY_SCOPE_SHFT = LOCAL_SHFT + maxLocals;// stack[0 <= i < VAR_SHFT]: stack data// stack[VAR_SHFT <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_SCOPE_SHFT]: used for newtemp/usetemp// stack[TRY_SCOPE_SHFT <= i]: try scopes// when 0 <= i < LOCAL_SHFT and stack[x] == DBL_MRK,// sDbl[i] gives the number value final Object DBL_MRK = Interpreter.DBL_MRK; Object[] stack = new Object[TRY_SCOPE_SHFT + maxTryDepth]; double[] sDbl = new double[TRY_SCOPE_SHFT]; int stackTop = -1; byte[] iCode = theData.itsICode; String[] strings = theData.itsStringTable; int pc = 0; int iCodeLength = theData.itsICodeTop; final Scriptable undefined = Undefined.instance; if (maxVars != 0) { int definedArgs = fnOrScript.argCount; if (definedArgs != 0) { if (definedArgs > args.length) { definedArgs = args.length; } for (i = 0; i != definedArgs; ++i) { stack[VAR_SHFT + i] = args[i]; } } for (i = definedArgs; i != maxVars; ++i) { stack[VAR_SHFT + i] = undefined; } } if (theData.itsNestedFunctions != null) { for (i = 0; i < theData.itsNestedFunctions.length; i++) createFunctionObject(theData.itsNestedFunctions[i], scope); } Object id; Object rhs, val; double valDbl; boolean valBln; int count; int slot; String name = null; Object[] outArgs; int lIntValue; double lDbl; int rIntValue; double rDbl;// tryStack[2 * i]: starting pc of catch block// tryStack[2 * i + 1]: starting pc of finally block int[] tryStack = null; int tryStackTop = 0; InterpreterFrame frame = null; if (cx.debugger != null) { frame = new InterpreterFrame(scope, theData, fnOrScript); cx.pushFrame(frame); } Object result = undefined; int pcPrevBranch = pc; final int instructionThreshold = cx.instructionThreshold; // During function call this will be set to -1 so catch can properly // adjust it int instructionCount = cx.instructionCount; // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; while (pc < iCodeLength) { try { switch (iCode[pc] & 0xff) { case TokenStream.ENDTRY : tryStackTop--; break; case TokenStream.TRY : if (tryStackTop == 0) { tryStack = new int[maxTryDepth * 2]; } i = getTarget(iCode, pc + 1); if (i == pc) i = 0; tryStack[tryStackTop * 2] = i; i = getTarget(iCode, pc + 3); if (i == (pc + 2)) i = 0; tryStack[tryStackTop * 2 + 1] = i; stack[TRY_SCOPE_SHFT + tryStackTop] = scope; ++tryStackTop; pc += 4; break; case TokenStream.GE : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl <= lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.LE : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl <= rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.GT : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl < lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.LT : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl < rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.IN : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); valBln = ScriptRuntime.in(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.INSTANCEOF : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); valBln = ScriptRuntime.instanceOf(scope, lhs, rhs); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.EQ : --stackTop; valBln = do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.NE : --stackTop; valBln = !do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.SHEQ : --stackTop; valBln = do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.SHNE : --stackTop; valBln = !do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.IFNE : val = stack[stackTop]; if (val != DBL_MRK) { valBln = !ScriptRuntime.toBoolean(val); } else { valDbl = sDbl[stackTop]; valBln = !(valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount (instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.IFEQ : val = stack[stackTop]; if (val != DBL_MRK) { valBln = ScriptRuntime.toBoolean(val); } else { valDbl = sDbl[stackTop]; valBln = (valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount (instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.GOTO : if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.GOSUB : sDbl[++stackTop] = pc + 3; if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.RETSUB : slot = (iCode[pc + 1] & 0xFF); if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = (int)sDbl[LOCAL_SHFT + slot]; continue; case TokenStream.POP : stackTop--; break; case TokenStream.DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; break; case TokenStream.POPV : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break; case TokenStream.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; pc = getTarget(iCode, pc + 1); break; case TokenStream.BITNOT : rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; break; case TokenStream.BITAND : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; break; case TokenStream.BITOR : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; break; case TokenStream.BITXOR : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; break; case TokenStream.LSH : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; break; case TokenStream.RSH : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; break; case TokenStream.URSH : rIntValue = stack_int32(stack, sDbl, stackTop) & 0x1F; --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ScriptRuntime.toUint32(lDbl) >>> rIntValue; break; case TokenStream.ADD : --stackTop; do_add(stack, sDbl, stackTop); break; case TokenStream.SUB : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; break; case TokenStream.NEG : rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; break; case TokenStream.POS : rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; break; case TokenStream.MUL : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; break; case TokenStream.DIV : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; // Detect the divide by zero or let Java do it ? sDbl[stackTop] = lDbl / rDbl; break; case TokenStream.MOD : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; break; case TokenStream.BINDNAME : name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.bind(scope, name); pc += 2; break; case TokenStream.GETBASE : name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.getBase(scope, name); pc += 2; break; case TokenStream.SETNAME : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; // what about class cast exception here for lhs? stack[stackTop] = ScriptRuntime.setName ((Scriptable)lhs, rhs, scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.DELPROP : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.delete(lhs, rhs); break; case TokenStream.GETPROP : name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; case TokenStream.SETPROP : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; case TokenStream.GETELEM : do_getElem(cx, stack, sDbl, stackTop, scope); --stackTop; break; case TokenStream.SETELEM : do_setElem(cx, stack, sDbl, stackTop, scope); stackTop -= 2; break; case TokenStream.PROPINC : name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrement(lhs, name, scope); break; case TokenStream.PROPDEC : name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrement(lhs, name, scope); break; case TokenStream.ELEMINC : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrementElem(lhs, rhs, scope); break; case TokenStream.ELEMDEC : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrementElem(lhs, rhs, scope); break; case TokenStream.GETTHIS : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getThis((Scriptable)lhs); break; case TokenStream.NEWTEMP : slot = (iCode[++pc] & 0xFF); stack[LOCAL_SHFT + slot] = stack[stackTop]; sDbl[LOCAL_SHFT + slot] = sDbl[stackTop]; break; case TokenStream.USETEMP : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + slot]; sDbl[stackTop] = sDbl[LOCAL_SHFT + slot]; break; case TokenStream.CALLSPECIAL : if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int lineNum = getShort(iCode, pc + 1); name = strings[getShort(iCode, pc + 3)]; count = getShort(iCode, pc + 5); outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.callSpecial( cx, lhs, rhs, outArgs, thisObj, scope, name, lineNum); pc += 6; instructionCount = cx.instructionCount; break; case TokenStream.CALL : if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } cx.instructionCount = instructionCount; count = getShort(iCode, pc + 3); outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); if (lhs == undefined) { i = getShort(iCode, pc + 1); if (i != -1) lhs = strings[i]; } Scriptable calleeScope = scope; if (theData.itsNeedsActivation) { calleeScope = ScriptableObject. getTopLevelScope(scope); } stack[stackTop] = ScriptRuntime.call(cx, lhs, rhs, outArgs, calleeScope); pc += 4; instructionCount = cx.instructionCount; break; case TokenStream.NEW : if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } count = getShort(iCode, pc + 3); outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); if (lhs == undefined && getShort(iCode, pc + 1) != -1) { // special code for better error message for call // to undefined lhs = strings[getShort(iCode, pc + 1)]; } stack[stackTop] = ScriptRuntime.newObject(cx, lhs, outArgs, scope); pc += 4; instructionCount = cx.instructionCount; break; case TokenStream.TYPEOF : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); break; case TokenStream.TYPEOFNAME : name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; case TokenStream.STRING : stack[++stackTop] = strings[getShort(iCode, pc + 1)]; pc += 2; break; case SHORTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc + 1); pc += 2; break; case INTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc + 1); pc += 4; break; case TokenStream.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = theData. itsDoubleTable[getShort(iCode, pc + 1)]; pc += 2; break; case TokenStream.NAME : stack[++stackTop] = ScriptRuntime.name (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.NAMEINC : stack[++stackTop] = ScriptRuntime.postIncrement (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.NAMEDEC : stack[++stackTop] = ScriptRuntime.postDecrement (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.SETVAR : slot = (iCode[++pc] & 0xFF); stack[VAR_SHFT + slot] = stack[stackTop]; sDbl[VAR_SHFT + slot] = sDbl[stackTop]; break; case TokenStream.GETVAR : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; break; case TokenStream.VARINC : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) + 1.0; break; case TokenStream.VARDEC : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) - 1.0; break; case TokenStream.ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; break; case TokenStream.ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; break; case TokenStream.NULL : stack[++stackTop] = null; break; case TokenStream.THIS : stack[++stackTop] = thisObj; break; case TokenStream.THISFN : stack[++stackTop] = fnOrScript; break; case TokenStream.FALSE : stack[++stackTop] = Boolean.FALSE; break; case TokenStream.TRUE : stack[++stackTop] = Boolean.TRUE; break; case TokenStream.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case TokenStream.THROW : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; throw new JavaScriptException(result); case TokenStream.JTHROW : result = stack[stackTop]; // No need to check for DBL_MRK: result is Exception --stackTop; if (result instanceof JavaScriptException) throw (JavaScriptException)result; else throw (RuntimeException)result; case TokenStream.ENTERWITH : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); break; case TokenStream.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); break; case TokenStream.NEWSCOPE : stack[++stackTop] = ScriptRuntime.newScope(); break; case TokenStream.ENUMINIT : slot = (iCode[++pc] & 0xFF); lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + slot] = ScriptRuntime.initEnum(lhs, scope); break; case TokenStream.ENUMNEXT : slot = (iCode[++pc] & 0xFF); val = stack[LOCAL_SHFT + slot]; ++stackTop; stack[stackTop] = ScriptRuntime. nextEnum((Enumeration)val); break; case TokenStream.GETPROTO : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProto(lhs, scope); break; case TokenStream.GETPARENT : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs); break; case TokenStream.GETSCOPEPARENT : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs, scope); break; case TokenStream.SETPROTO : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProto(lhs, rhs, scope); break; case TokenStream.SETPARENT : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setParent(lhs, rhs, scope); break; case TokenStream.SCOPE : stack[++stackTop] = scope; break; case TokenStream.CLOSURE : i = getShort(iCode, pc + 1); stack[++stackTop] = new InterpretedFunction( theData.itsNestedFunctions[i], scope, cx); createFunctionObject( (InterpretedFunction)stack[stackTop], scope); pc += 2; break; case TokenStream.OBJECT : i = getShort(iCode, pc + 1); stack[++stackTop] = theData.itsRegExpLiterals[i]; pc += 2; break; case SOURCEFILE_ICODE : cx.interpreterSourceFile = theData.itsSourceFile; break; case LINE_ICODE : case BREAKPOINT_ICODE : i = getShort(iCode, pc + 1); cx.interpreterLine = i; if (frame != null) frame.setLineNumber(i); if ((iCode[pc] & 0xff) == BREAKPOINT_ICODE || cx.inLineStepMode) { cx.getDebuggableEngine(). getDebugger().handleBreakpointHit(cx); } pc += 2; break; default : dumpICode(theData); throw new RuntimeException("Unknown icode : " + (iCode[pc] & 0xff) + " @ pc : " + pc); } pc++; } catch (Throwable ex) { if (instructionThreshold != 0) { if (instructionCount < 0) { // throw during function call instructionCount = cx.instructionCount; } else { // throw during any other operation instructionCount += pc - pcPrevBranch; cx.instructionCount = instructionCount; } } final int SCRIPT_THROW = 0, ECMA = 1, RUNTIME = 2, OTHER = 3; int exType; Object errObj; // Object seen by catch for (;;) { if (ex instanceof JavaScriptException) { errObj = ScriptRuntime. unwrapJavaScriptException((JavaScriptException)ex); exType = SCRIPT_THROW; } else if (ex instanceof EcmaError) { // an offical ECMA error object, errObj = ((EcmaError)ex).getErrorObject(); exType = ECMA; } else if (ex instanceof WrappedException) { Object w = ((WrappedException) ex).unwrap(); if (w instanceof Throwable) { ex = (Throwable) w; continue; } errObj = ex; exType = RUNTIME; } else if (ex instanceof RuntimeException) { errObj = ex; exType = RUNTIME; } else { errObj = ex; // Error instance exType = OTHER; } break; } if (exType != OTHER && cx.debugger != null) { cx.debugger.handleExceptionThrown(cx, errObj); } boolean rethrow = true; if (exType != OTHER && tryStackTop > 0) { --tryStackTop; if (exType == SCRIPT_THROW || exType == ECMA) { // Check for catch only for // JavaScriptException and EcmaError pc = tryStack[tryStackTop * 2]; if (pc != 0) { // Has catch block rethrow = false; } } if (rethrow) { pc = tryStack[tryStackTop * 2 + 1]; if (pc != 0) { // has finally block rethrow = false; errObj = ex; } } } if (rethrow) { if (frame != null) cx.popFrame(); if (exType == SCRIPT_THROW) throw (JavaScriptException)ex; if (exType == ECMA || exType == RUNTIME) throw (RuntimeException)ex; throw (Error)ex; } // We caught an exception, // Notify instruction observer if necessary // and point pcPrevBranch to start of catch/finally block if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { // Note: this can throw Error cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc; // prepare stack and restore this function's security domain. scope = (Scriptable)stack[TRY_SCOPE_SHFT + tryStackTop]; stackTop = 0; stack[0] = errObj; } } if (frame != null) cx.popFrame(); if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } cx.instructionCount = instructionCount; } return result; } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/052726b68e684efc593535d50a73767571084837/Interpreter.java/clean/js/rhino/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
4766,
282,
22780,
15261,
16,
1033,
8526,
833,
16,
4766,
282,
16717,
2083,
2295,
1162,
3651,
16,
4766,
282,
5294,
11599,
751,
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,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
4766,
282,
22780,
15261,
16,
1033,
8526,
833,
16,
4766,
282,
16717,
2083,
2295,
1162,
3651,
16,
4766,
282,
5294,
11599,
751,
3... |
PropertyHandle propHandle = (PropertyHandle) iter.next( ); | PropertyHandle propHandle = ( PropertyHandle ) iter.next( ); | private void setupReportElement( ReportElementDesign element, DesignElementHandle handle ) { element.setHandle( handle ); element.setName( handle.getName( ) ); element.setID( handle.getID( ) ); DesignElementHandle extend = handle.getExtends( ); if ( extend != null ) { element.setExtends( extend.getName( ) ); } // handle the properties Iterator iter = handle.getPropertyIterator( ); if ( iter != null ) { PropertyHandle propHandle = (PropertyHandle) iter.next( ); if ( propHandle != null && propHandle.isSet( ) ) { String name = propHandle.getDefn( ).getName( ); Object value = propHandle.getValue( ); assert name != null; assert value != null; Map properties = element.getCustomProperties( ); assert properties != null; properties.put( name, value ); } } setupNamedExpressions( handle, element.getNamedExpressions( ) ); setupElementIDMap( element ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/f00a46b07796c055e2a16e0f1243a9ebd4826670/EngineIRVisitor.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/parser/EngineIRVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3875,
4820,
1046,
12,
8706,
1046,
15478,
930,
16,
1082,
202,
15478,
1046,
3259,
1640,
262,
202,
95,
202,
202,
2956,
18,
542,
3259,
12,
1640,
11272,
202,
202,
2956,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3875,
4820,
1046,
12,
8706,
1046,
15478,
930,
16,
1082,
202,
15478,
1046,
3259,
1640,
262,
202,
95,
202,
202,
2956,
18,
542,
3259,
12,
1640,
11272,
202,
202,
2956,
18,
5... |
return getChildren(_inputElement); } | return getChildren(_inputElement); } | public Object[] getElements(Object _inputElement) { return getChildren(_inputElement); } | 2575 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2575/8124a2eab3b65cb02a74dc08a8def0fb75ca9f7d/EOModelOutlineContentProvider.java/clean/wolips/plugins/org.objectstyle.wolips.eomodeler/java/org/objectstyle/wolips/eomodeler/outline/EOModelOutlineContentProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1033,
8526,
8886,
12,
921,
389,
2630,
1046,
13,
288,
565,
327,
10268,
24899,
2630,
1046,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1033,
8526,
8886,
12,
921,
389,
2630,
1046,
13,
288,
565,
327,
10268,
24899,
2630,
1046,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
String prepareSQL(JtdsPreparedStatement pstmt, | synchronized String prepareSQL(JtdsPreparedStatement pstmt, | String prepareSQL(JtdsPreparedStatement pstmt, String sql, ParamInfo[] params, boolean returnKeys) throws SQLException { if (prepareSql == TdsCore.UNPREPARED || prepareSql == TdsCore.EXECUTE_SQL) { return null; // User selected not to use procs } if (serverType == Driver.SYBASE) { if (tdsVersion != Driver.TDS50) { return null; // No longer support stored procs with 4.2 } if (returnKeys) { return null; // Sybase cannot use @@IDENTITY in proc } } // // Check parameters set and obtain native types // for (int i = 0; i < params.length; i++) { if (!params[i].isSet) { throw new SQLException(Messages.get("error.prepare.paramnotset", Integer.toString(i+1)), "07000"); } TdsData.getNativeType(this, params[i]); if (serverType == Driver.SYBASE) { if (params[i].sqlType.equals("text") || params[i].sqlType.equals("image")) { return null; // Sybase does not support text/image params } } } String key = Support.getStatementKey(sql, params, serverType, getCatalog()); // // See if we have already built this one // ProcEntry proc = (ProcEntry) statementCache.get(key); if (proc != null) { if (serverType == Driver.SYBASE) { pstmt.setColMetaData(proc.colMetaData); pstmt.setParamMetaData(proc.paramMetaData); } return proc.name; } // // No, so create the stored procedure now // proc = new ProcEntry(); if (serverType == Driver.SQLSERVER) { proc.name = baseTds.microsoftPrepare(sql, params, pstmt.getResultSetType(), pstmt.getResultSetConcurrency()); if (proc.name == null) { return null; } // TODO Find some way of getting parameter meta data for MS } else { proc.name = baseTds.sybasePrepare(sql, params); if (proc.name == null) { return null; } // Sybase gives us lots of useful information about the result set proc.colMetaData = baseTds.getColumns(); proc.paramMetaData = baseTds.getParameters(); pstmt.setColMetaData(proc.colMetaData); pstmt.setParamMetaData(proc.paramMetaData); } // OK we have built a proc so add it to the cache. addCachedProcedure(key, proc); // Add the handle to the prepared statement so that the handles // can be used to clean up the statement cache properly when the // prepared statement is closed. if (pstmt.handles == null) { pstmt.handles = new ArrayList(1); } pstmt.handles.add(proc); // Give the user the name return proc.name; } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/0c7f0d6aee952bc761910a68a83324bc7b2b401b/ConnectionJDBC2.java/clean/src/main/net/sourceforge/jtds/jdbc/ConnectionJDBC2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3852,
514,
2911,
3997,
12,
46,
88,
2377,
29325,
293,
10589,
16,
4766,
282,
514,
1847,
16,
4766,
282,
3014,
966,
8526,
859,
16,
4766,
282,
1250,
327,
2396,
13,
565,
1216,
6483,
288,
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,
3852,
514,
2911,
3997,
12,
46,
88,
2377,
29325,
293,
10589,
16,
4766,
282,
514,
1847,
16,
4766,
282,
3014,
966,
8526,
859,
16,
4766,
282,
1250,
327,
2396,
13,
565,
1216,
6483,
288,
3639... |
JLabel topicClustersLabel = new JLabel("Topic Clustering Attempts:"); | JLabel topicClustersLabel = new JLabel("Topic Clustering Attempts:"); | public SolutionPanel(JFrame frame, Solver solver, ChangeMonitor monitor) { super("Solutions", solver, monitor, new ShowSolutionWindow(frame), BoxLayout.LINE_AXIS); this.frame = frame; // Create a timer for monitoring calculations timer = new Timer(500, new TimerListener()); // Set up the solution list JPanel solListPanel = new JPanel(); solListPanel.setLayout(new BoxLayout(solListPanel, BoxLayout.PAGE_AXIS)); JScrollPane scroller = new JScrollPane(getList()); scroller.setMinimumSize(new Dimension(200, 200)); solListPanel.add(scroller); JButton showButton = new JButton("Show"); showButton.setActionCommand(getEditCommand()); showButton.addActionListener(this); showButton.setAlignmentX(Component.CENTER_ALIGNMENT); solListPanel.add(showButton); add(solListPanel); add(Box.createRigidArea(new Dimension(10, 0))); // Set up the solution parameter panel JPanel solparPanel = new JPanel(); solparPanel.setLayout(new BoxLayout(solparPanel, BoxLayout.PAGE_AXIS)); NumberFormat intFormat = NumberFormat.getIntegerInstance(); JLabel topicClustersLabel = new JLabel("Topic Clustering Attempts:"); JLabel personAssignmentsLabel = new JLabel("Person Assignment Attempts:"); JLabel attemptsLabel = new JLabel("Maximum Assignment Attempts:"); JLabel keepBestLabel = new JLabel("Keep Best Solutions:"); topicClustersField = new JFormattedTextField(); topicClustersField.setValue(new Integer(5)); topicClustersField.setColumns(4); personAssignmentsField = new JFormattedTextField(); personAssignmentsField.setValue(new Integer(5)); personAssignmentsField.setColumns(4); attemptsField = new JFormattedTextField(); attemptsField.setValue(new Integer(100000)); attemptsField.setColumns(8); keepBestField = new JFormattedTextField(); keepBestField.setValue(new Integer(10)); keepBestField.setColumns(4); JPanel valuePanel = new JPanel(); valuePanel.setLayout(new BoxLayout(valuePanel, BoxLayout.LINE_AXIS)); valuePanel.setBorder(BorderFactory.createEmptyBorder(10,0,10,0)); solparPanel.add(valuePanel); JPanel labelPanel = new JPanel(new GridLayout(0,1)); valuePanel.add(labelPanel); labelPanel.add(topicClustersLabel); labelPanel.add(personAssignmentsLabel); labelPanel.add(attemptsLabel); labelPanel.add(keepBestLabel); valuePanel.add(Box.createRigidArea(new Dimension(10, 0))); JPanel fieldPanel = new JPanel(new GridLayout(0,1)); valuePanel.add(fieldPanel); fieldPanel.add(topicClustersField); fieldPanel.add(personAssignmentsField); fieldPanel.add(attemptsField); fieldPanel.add(keepBestField); solveButton = new JButton("Solve"); solveButton.setActionCommand("solve"); solveButton.addActionListener(this); solveButton.setAlignmentX(Component.CENTER_ALIGNMENT); solparPanel.add(solveButton); Dimension minSize = new Dimension(0, 0); Dimension prefSize = new Dimension(0, Short.MAX_VALUE); solparPanel.add(new Box.Filler(minSize, prefSize, prefSize)); // solparPanel.add(Box.createVerticalGlue()); add(solparPanel); } | 13096 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13096/f93bba80106986868cf60850520776bb1345d36c/SolutionPanel.java/buggy/trunk/openSess/SolutionPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
29172,
5537,
12,
46,
3219,
2623,
16,
348,
10521,
12776,
16,
7576,
7187,
6438,
13,
225,
288,
565,
2240,
2932,
20608,
6170,
3113,
12776,
16,
6438,
16,
394,
9674,
16135,
3829,
12,
3789... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29172,
5537,
12,
46,
3219,
2623,
16,
348,
10521,
12776,
16,
7576,
7187,
6438,
13,
225,
288,
565,
2240,
2932,
20608,
6170,
3113,
12776,
16,
6438,
16,
394,
9674,
16135,
3829,
12,
3789... |
return getObjselect(); | return getObjSelect(); | private String getOpType() { if (getPname() != null) { return getPname(); } else { return getObjselect(); } } | 639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/6d9a0692313ea26e0d7eccf1be7e1d85d51c56a9/CCUnlock.java/clean/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnlock.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
26459,
559,
1435,
288,
3639,
309,
261,
588,
52,
529,
1435,
480,
446,
13,
288,
5411,
327,
1689,
529,
5621,
3639,
289,
469,
288,
5411,
327,
336,
2675,
3391,
5621,
3639,
289,
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,
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,
3238,
514,
26459,
559,
1435,
288,
3639,
309,
261,
588,
52,
529,
1435,
480,
446,
13,
288,
5411,
327,
1689,
529,
5621,
3639,
289,
469,
288,
5411,
327,
336,
2675,
3391,
5621,
3639,
289,
56... |
runtime.setVerbose(RubyBoolean.newBoolean(runtime, newValue != runtime.getFalse())); | runtime.setVerbose(runtime.newBoolean(newValue != runtime.getFalse())); | private static void initializeRuntime(final Ruby runtime, String filename) { IRubyObject argumentArray = RubyArray.newArray(runtime, JavaUtil.convertJavaArrayToRuby(runtime, commandline.scriptArguments)); runtime.setVerbose(RubyBoolean.newBoolean(runtime, commandline.verbose)); // $VERBOSE can be true, false, or nil. Any non-false-nil value will get stored as true runtime.getGlobalVariables().define("$VERBOSE", new IAccessor() { public IRubyObject getValue() { return runtime.getVerbose(); } public IRubyObject setValue(IRubyObject newValue) { if (newValue.isNil()) { runtime.setVerbose(newValue); } else { runtime.setVerbose(RubyBoolean.newBoolean(runtime, newValue != runtime.getFalse())); } return newValue; } }); runtime.getClasses().getObjectClass().setConstant("$VERBOSE", commandline.verbose ? runtime.getTrue() : runtime.getNil()); runtime.defineGlobalConstant("ARGV", argumentArray); // I guess ENV is not a hash, but should support a to_hash, though // it supposedly supports methods of a Hash? Also, I think that // RubyGlobal may need to create an empty ENV var in the case that // the runtime is not initialized by Main. Properties envs = new Properties(); runtime.defineGlobalConstant("ENV", RubyHash.newHash(runtime, envs, null)); defineGlobal(runtime, "$-p", commandline.assumePrinting); defineGlobal(runtime, "$-n", commandline.assumeLoop); defineGlobal(runtime, "$-a", commandline.sDoSplit); defineGlobal(runtime, "$-l", commandline.processLineEnds); runtime.getGlobalVariables().defineReadonly("$*", new ValueAccessor(argumentArray)); runtime.defineVariable(new RubyGlobal.StringGlobalVariable(runtime, "$0", RubyString.newString(runtime, filename))); runtime.getLoadService().init(runtime, commandline.loadPaths()); Iterator iter = commandline.requiredLibraries().iterator(); while (iter.hasNext()) { String scriptName = (String) iter.next(); RubyKernel.require(runtime.getTopSelf(), RubyString.newString(runtime, scriptName)); } } | 45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/870e1da9b41bfdbae259e1fc5f18fc8b76686998/Main.java/buggy/src/org/jruby/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
4046,
5576,
12,
6385,
19817,
3099,
16,
514,
1544,
13,
288,
3639,
15908,
10340,
921,
1237,
1076,
273,
19817,
1076,
18,
2704,
1076,
12,
9448,
16,
5110,
1304,
18,
6283,
5852,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
4046,
5576,
12,
6385,
19817,
3099,
16,
514,
1544,
13,
288,
3639,
15908,
10340,
921,
1237,
1076,
273,
19817,
1076,
18,
2704,
1076,
12,
9448,
16,
5110,
1304,
18,
6283,
5852,... |
optimizations(); createCCode(); | public TraceIRtoC(RawTile tile) { this.tile = tile; this.str = new StringWriter(); this.p = new TabbedPrintWriter(str); //optimize the SIR code, if not disabled optimizations(); //now start generating the code createCCode(); } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/6dd3e702937beee26c8d9666bb445a0bbae2ea66/TraceIRtoC.java/clean/streams/src/at/dms/kjc/spacetime/TraceIRtoC.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2677,
7937,
869,
39,
12,
4809,
9337,
4769,
13,
377,
288,
202,
2211,
18,
15368,
273,
4769,
31,
202,
2211,
18,
701,
273,
394,
17436,
5621,
202,
2211,
18,
84,
273,
394,
9483,
2992,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2677,
7937,
869,
39,
12,
4809,
9337,
4769,
13,
377,
288,
202,
2211,
18,
15368,
273,
4769,
31,
202,
2211,
18,
701,
273,
394,
17436,
5621,
202,
2211,
18,
84,
273,
394,
9483,
2992,
... | |
myViewingPanel.requestFocusInWindow(); | myViewingPanel.requestFocus(); | public ImplementationViewComponent(PsiElement[] elements) { super(new BorderLayout()); myElements = new PsiElement[elements.length]; myIndex = 0; FileDescriptor[] files = new FileDescriptor[myElements.length]; for (int i = 0; i < elements.length; i++) { myElements[i] = elements[i].getNavigationElement(); files[i] = new FileDescriptor(myElements[i].getContainingFile().getVirtualFile()); } final Project project = myElements[0].getProject(); EditorFactory factory = EditorFactory.getInstance(); Document doc = factory.createDocument(""); doc.setReadOnly(true); myEditor = factory.createEditor(doc, project); EditorHighlighter highlighter = HighlighterFactory.createHighlighter(project, myElements[0].getContainingFile().getName()); ((EditorEx)myEditor).setHighlighter(highlighter); ((EditorEx)myEditor).setBackgroundColor(EditorFragmentComponent.getBackgroundColor(myEditor)); myEditor.getSettings().setAdditionalLinesCount(1); myEditor.getSettings().setAdditionalColumnsCount(1); myEditor.getSettings().setLineMarkerAreaShown(false); myEditor.getSettings().setLineNumbersShown(false); myEditor.getSettings().setFoldingOutlineShown(false); myBinarySwitch = new CardLayout(); myViewingPanel = new JPanel(myBinarySwitch); myViewingPanel.add(myEditor.getComponent(), "Text"); myBinaryPanel = new JPanel(new BorderLayout()); myViewingPanel.add(myBinaryPanel, "Binary"); add(myViewingPanel, BorderLayout.CENTER); final ActionToolbar toolbar = createToolbar(); myLocationLabel = new JLabel(); myCountLabel = new JLabel(); JPanel header = new JPanel(new BorderLayout()); header.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); JPanel toolbarPanel = new JPanel(new FlowLayout()); toolbarPanel.add(toolbar.getComponent()); if (myElements.length > 1) { myFileChooser = new JComboBox(files); myFileChooser.setRenderer(new DefaultListCellRenderer() { public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); VirtualFile file = ((FileDescriptor)value).myFile; setIcon(file.getIcon()); setForeground(FileStatusManager.getInstance(project).getStatus(file).getColor()); setText(file.getPresentableName()); return this; } }); myFileChooser.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { int index = myFileChooser.getSelectedIndex(); if (myIndex != index) { myIndex = index; updateControls(); } } }); toolbarPanel.add(myFileChooser); toolbarPanel.add(myCountLabel); } else { final JLabel label = new JLabel(); VirtualFile file = myElements[0].getContainingFile().getVirtualFile(); label.setIcon(file.getIcon()); label.setForeground(FileStatusManager.getInstance(project).getStatus(file).getColor()); label.setText(file.getPresentableName()); label.setBorder(new CompoundBorder(IdeBorderFactory.createBorder(), IdeBorderFactory.createEmptyBorder(0, 0, 0, 5))); toolbarPanel.add(label); } header.add(toolbarPanel, BorderLayout.WEST); header.add(myLocationLabel, BorderLayout.EAST); add(header, BorderLayout.NORTH); setPreferredSize(new Dimension(600, 400)); updateControls(); SwingUtilities.invokeLater(new Runnable() { public void run() { if (myFileChooser != null) { myFileChooser.requestFocusInWindow(); } else { myViewingPanel.requestFocusInWindow(); } } }); } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/a8211ef078510587b804305d31dc6f6fb3a34db5/ImplementationViewComponent.java/clean/source/com/intellij/codeInsight/hint/ImplementationViewComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
25379,
1767,
1841,
12,
52,
7722,
1046,
8526,
2186,
13,
288,
565,
2240,
12,
2704,
30814,
10663,
565,
3399,
3471,
273,
394,
453,
7722,
1046,
63,
6274,
18,
2469,
15533,
565,
3399,
1016... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
25379,
1767,
1841,
12,
52,
7722,
1046,
8526,
2186,
13,
288,
565,
2240,
12,
2704,
30814,
10663,
565,
3399,
3471,
273,
394,
453,
7722,
1046,
63,
6274,
18,
2469,
15533,
565,
3399,
1016... |
final IntItem val = vstack.popInt(); val.loadIf(eContext, ~Item.Kind.LOCAL); | final IntItem val = vstack.popInt(); val.load(eContext); | private final void ishift(int operation) { final IntItem shift = vstack.popInt(); final boolean isconst = shift.isConstant(); if (!isconst) { L1AHelper.requestRegister(eContext, ECX, shift); shift.loadTo(eContext, ECX); } // Pop & load final IntItem val = vstack.popInt(); val.loadIf(eContext, ~Item.Kind.LOCAL); if (val.isLocal()) { final int fpOffset = val.getOffsetToFP(); if (isconst) { final int offset = shift.getValue(); os.writeShift(operation, FP, fpOffset, offset); } else { os.writeShift_CL(operation, FP, fpOffset); } } else { final Register valr = val.getRegister(); if (isconst) { final int offset = shift.getValue(); os.writeShift(operation, valr, offset); } else { os.writeShift_CL(operation, valr); } } // Release shift.release(eContext); // Push result vstack.push(val); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/4c9e1b93fdcd3878abf615621ec6a36bf839ab10/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
727,
918,
353,
76,
2136,
12,
474,
1674,
13,
288,
202,
202,
6385,
3094,
1180,
4654,
273,
19510,
18,
5120,
1702,
5621,
202,
202,
6385,
1250,
353,
10248,
273,
4654,
18,
291,
690... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
918,
353,
76,
2136,
12,
474,
1674,
13,
288,
202,
202,
6385,
3094,
1180,
4654,
273,
19510,
18,
5120,
1702,
5621,
202,
202,
6385,
1250,
353,
10248,
273,
4654,
18,
291,
690... |
} catch ( IOException ioe) {} | } catch (IOException ioe) { } | public static File resolveFile( File baseFile, String filename) { String filenm = filename; if ('/' != File.separatorChar) { filenm = filename.replace('/', File.separatorChar); } if ('\\' != File.separatorChar) { filenm = filename.replace('\\', File.separatorChar); } // deal with absolute files if (filenm.startsWith(File.separator)) { File file = new File(filenm); try { file = file.getCanonicalFile(); } catch ( IOException ioe) {} return file; } // FIXME: I'm almost certain this // removal is unnecessary, as getAbsoluteFile() strips // them. However, I'm not sure about this UNC stuff. (JT) char[] chars = filename.toCharArray(); StringBuffer sb = new StringBuffer(); //remove duplicate file separators in succession - except //on win32 at start of filename as UNC filenames can //be \\AComputer\AShare\myfile.txt int start = 0; if ('\\' == File.separatorChar) { sb.append(filenm.charAt(0)); start++; } for (int i = start; i < chars.length; i++) { boolean doubleSeparator = File.separatorChar == chars[i] && File.separatorChar == chars[i - 1]; if (!doubleSeparator) { sb.append(chars[i]); } } filenm = sb.toString(); //must be relative File file = (new File(baseFile, filenm)).getAbsoluteFile(); try { file = file.getCanonicalFile(); } catch ( IOException ioe) {} return file; } | 56629 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56629/ae3c2a773ceec5a2a6f82115f2ac004a8bac2eed/FilenameUtils.java/clean/src/java/org/apache/commons/io/FilenameUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1387,
2245,
812,
12,
1387,
1026,
812,
16,
514,
1544,
13,
288,
3639,
514,
661,
275,
81,
273,
1544,
31,
3639,
309,
7707,
2473,
480,
1387,
18,
11287,
2156,
13,
288,
5411,
661,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1387,
2245,
812,
12,
1387,
1026,
812,
16,
514,
1544,
13,
288,
3639,
514,
661,
275,
81,
273,
1544,
31,
3639,
309,
7707,
2473,
480,
1387,
18,
11287,
2156,
13,
288,
5411,
661,
... |
public int getStereoParity() { return this.stereoParity; } | public int getStereoParity() { return stereoParity; } | public int getStereoParity() { return this.stereoParity; } | 45254 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45254/a0fe2ba9ebb5b30198ad5632dce2a72cb9cfd6d0/Atom.java/buggy/org/openscience/cdk/Atom.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
1322,
22854,
1553,
560,
1435,
288,
202,
202,
2463,
333,
18,
334,
822,
83,
1553,
560,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
1322,
22854,
1553,
560,
1435,
288,
202,
202,
2463,
333,
18,
334,
822,
83,
1553,
560,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
return super.getHibernateTemplate().executeFind( new HibernateCallback() { | return super.getHibernateTemplate().execute( new HibernateCallback() { | protected Object doInvokeInternal(final Class clazz, String methodName, final Object[] arguments) { if(arguments.length == 0) throw new MissingMethodException(methodName,clazz,arguments); final Object arg = arguments[0]; // if the arg is an instance of the class find by example if(arg instanceof String) { final String query = (String)arg; if(!query.matches( "from "+clazz.getName()+".*" )) { throw new GrailsQueryException("Invalid query ["+query+"] for domain class ["+clazz+"]"); } return super.getHibernateTemplate().executeFind( new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException { Query q = session.createQuery(query); Object[] queryArgs = null; int max = -1; if(arguments.length > 1) { if(arguments[1] instanceof List) { queryArgs = ((List)arguments[1]).toArray(); } else if(arguments[1].getClass().isArray()) { queryArgs = (Object[])arguments[1]; } } max = retrieveMaxValue(arguments); if(queryArgs != null) { for (int i = 0; i < queryArgs.length; i++) { q.setParameter(i, queryArgs[i]); } } if(max > -1) { q.setMaxResults(max); } List results = q.list(); if(results.size() > 0) return results.get(0); return null; } private int retrieveMaxValue(Object[] arguments) { int max = -1; if(arguments.length > 1) { if(arguments[1] instanceof Integer) { max = ((Integer)arguments[1]).intValue(); } if(arguments.length > 2) { if(arguments[2] instanceof Integer) { max = ((Integer)arguments[2]).intValue(); } } } return max; } }); } if(clazz.isAssignableFrom( arg.getClass() )) { return super.getHibernateTemplate().executeFind( new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException { Example example = Example.create(arg) .ignoreCase(); Criteria crit = session.createCriteria(clazz); crit.add(example); List results = crit.list(); if(results.size() > 0) return results.get(0); return null; } }); } throw new MissingMethodException(methodName,clazz,arguments); } | 51576 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51576/f814c586140c5edf05cf9bc794e80f0ee76ae0ab/FindPersistentMethod.java/buggy/src/persistence/org/codehaus/groovy/grails/orm/hibernate/metaclass/FindPersistentMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1033,
741,
10969,
3061,
12,
6385,
1659,
4003,
16,
514,
4918,
16,
1082,
202,
6385,
1033,
8526,
1775,
13,
288,
9506,
202,
430,
12,
7099,
18,
2469,
422,
374,
13,
1082,
202,
1284... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1033,
741,
10969,
3061,
12,
6385,
1659,
4003,
16,
514,
4918,
16,
1082,
202,
6385,
1033,
8526,
1775,
13,
288,
9506,
202,
430,
12,
7099,
18,
2469,
422,
374,
13,
1082,
202,
1284... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.